lago_ruby 0.46.1.pre.beta → 0.49.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +15 -10
- data/docs/AddOnBaseInput.md +2 -0
- data/docs/AddOnCreateInputAddOn.md +2 -0
- data/docs/AddOnObject.md +2 -0
- data/docs/BillableMetricBaseInput.md +3 -1
- data/docs/BillableMetricCreateInputBillableMetric.md +3 -1
- data/docs/BillableMetricObject.md +3 -1
- data/docs/ChargeObject.md +2 -0
- data/docs/CouponObject.md +3 -1
- data/docs/CreditNoteItemObjectFee.md +2 -0
- data/docs/CreditObjectItem.md +2 -2
- data/docs/CustomerChargeUsageObject.md +2 -0
- data/docs/CustomerChargeUsageObjectGroupsInner.md +2 -0
- data/docs/CustomerPastUsage.md +20 -0
- data/docs/CustomerUsageObject.md +2 -0
- data/docs/CustomersApi.md +82 -0
- data/docs/EventInputEvent.md +2 -2
- data/docs/EventInputEventTimestamp.md +15 -0
- data/docs/EventObject.md +1 -1
- data/docs/FeeObject.md +2 -0
- data/docs/FeeObjectItem.md +2 -0
- data/docs/GroupPropertiesObject.md +2 -0
- data/docs/InvoiceOneOffCreateInputInvoiceFeesInner.md +2 -0
- data/docs/PlanCreateInputPlan.md +3 -1
- data/docs/PlanCreateInputPlanChargesInner.md +2 -0
- data/docs/PlanObject.md +3 -1
- data/docs/PlanUpdateInputPlan.md +3 -1
- data/docs/PlanUpdateInputPlanChargesInner.md +2 -0
- data/docs/SubscriptionCreateInputSubscription.md +2 -0
- data/docs/SubscriptionObject.md +2 -0
- data/docs/SubscriptionUpdateInputSubscription.md +2 -0
- data/docs/SubscriptionsApi.md +70 -0
- data/docs/WebhookEndpoint.md +18 -0
- data/docs/WebhookEndpointCreateInput.md +18 -0
- data/docs/WebhookEndpointCreateInputWebhookEndpoint.md +20 -0
- data/docs/WebhookEndpointObject.md +26 -0
- data/docs/WebhookEndpointUpdateInput.md +18 -0
- data/docs/WebhookEndpointsApi.md +28 -28
- data/docs/WebhookEndpointsPaginated.md +20 -0
- data/lago_ruby.gemspec +2 -2
- data/lib/lago_ruby/api/add_ons_api.rb +2 -2
- data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
- data/lib/lago_ruby/api/coupons_api.rb +2 -2
- data/lib/lago_ruby/api/credit_notes_api.rb +2 -2
- data/lib/lago_ruby/api/customers_api.rb +84 -2
- data/lib/lago_ruby/api/events_api.rb +2 -2
- data/lib/lago_ruby/api/fees_api.rb +2 -2
- data/lib/lago_ruby/api/invoices_api.rb +2 -2
- data/lib/lago_ruby/api/organizations_api.rb +2 -2
- data/lib/lago_ruby/api/plans_api.rb +2 -2
- data/lib/lago_ruby/api/subscriptions_api.rb +65 -2
- data/lib/lago_ruby/api/taxes_api.rb +2 -2
- data/lib/lago_ruby/api/wallets_api.rb +2 -2
- data/lib/lago_ruby/api/webhook_endpoints_api.rb +35 -35
- data/lib/lago_ruby/api/webhooks_api.rb +2 -2
- data/lib/lago_ruby/api_client.rb +4 -3
- data/lib/lago_ruby/api_error.rb +2 -2
- data/lib/lago_ruby/configuration.rb +3 -2
- data/lib/lago_ruby/models/add_on.rb +2 -2
- data/lib/lago_ruby/models/add_on_base_input.rb +13 -3
- data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
- data/lib/lago_ruby/models/add_on_create_input_add_on.rb +13 -3
- data/lib/lago_ruby/models/add_on_object.rb +13 -3
- data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
- data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
- data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
- data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
- data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
- data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
- data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
- data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
- data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
- data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
- data/lib/lago_ruby/models/billable_metric.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_base_input.rb +29 -6
- data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +29 -6
- data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_object.rb +29 -6
- data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
- data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
- data/lib/lago_ruby/models/charge_object.rb +13 -3
- data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
- data/lib/lago_ruby/models/charge_properties.rb +2 -2
- data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
- data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
- data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
- data/lib/lago_ruby/models/country.rb +2 -2
- data/lib/lago_ruby/models/coupon.rb +2 -2
- data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
- data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
- data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
- data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
- data/lib/lago_ruby/models/coupon_object.rb +16 -6
- data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
- data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
- data/lib/lago_ruby/models/credit_note.rb +2 -2
- data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
- data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
- data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +2 -2
- data/lib/lago_ruby/models/credit_note_create_input_credit_note_items_inner.rb +2 -2
- data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
- data/lib/lago_ruby/models/credit_note_item_object_fee.rb +13 -3
- data/lib/lago_ruby/models/credit_note_object.rb +2 -2
- data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
- data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
- data/lib/lago_ruby/models/credit_notes.rb +2 -2
- data/lib/lago_ruby/models/credit_object.rb +2 -2
- data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
- data/lib/lago_ruby/models/credit_object_item.rb +13 -13
- data/lib/lago_ruby/models/currency.rb +2 -2
- data/lib/lago_ruby/models/customer.rb +2 -2
- data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object.rb +20 -3
- data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +13 -3
- data/lib/lago_ruby/models/customer_create_input.rb +2 -2
- data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
- data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
- data/lib/lago_ruby/models/customer_metadata.rb +2 -2
- data/lib/lago_ruby/models/customer_object.rb +2 -2
- data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
- data/lib/lago_ruby/models/customer_past_usage.rb +239 -0
- data/lib/lago_ruby/models/customer_usage.rb +2 -2
- data/lib/lago_ruby/models/customer_usage_object.rb +14 -3
- data/lib/lago_ruby/models/customers_paginated.rb +2 -2
- data/lib/lago_ruby/models/event.rb +2 -2
- data/lib/lago_ruby/models/event_batch_input.rb +2 -2
- data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
- data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
- data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
- data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
- data/lib/lago_ruby/models/event_input.rb +2 -2
- data/lib/lago_ruby/models/event_input_event.rb +3 -4
- data/lib/lago_ruby/models/event_input_event_timestamp.rb +105 -0
- data/lib/lago_ruby/models/event_object.rb +2 -2
- data/lib/lago_ruby/models/event_object_properties.rb +2 -2
- data/lib/lago_ruby/models/fee.rb +2 -2
- data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
- data/lib/lago_ruby/models/fee_object.rb +13 -3
- data/lib/lago_ruby/models/fee_object_item.rb +13 -3
- data/lib/lago_ruby/models/fee_update_input.rb +2 -2
- data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
- data/lib/lago_ruby/models/fees.rb +2 -2
- data/lib/lago_ruby/models/fees_paginated.rb +2 -2
- data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
- data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
- data/lib/lago_ruby/models/group_object.rb +2 -2
- data/lib/lago_ruby/models/group_properties_object.rb +13 -3
- data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
- data/lib/lago_ruby/models/groups_paginated.rb +2 -2
- data/lib/lago_ruby/models/invoice.rb +2 -2
- data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
- data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
- data/lib/lago_ruby/models/invoice_object.rb +2 -2
- data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
- data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
- data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +13 -3
- data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
- data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
- data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
- data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
- data/lib/lago_ruby/models/organization.rb +2 -2
- data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
- data/lib/lago_ruby/models/organization_object.rb +2 -2
- data/lib/lago_ruby/models/organization_update_input.rb +2 -2
- data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
- data/lib/lago_ruby/models/pagination_meta.rb +2 -2
- data/lib/lago_ruby/models/plan.rb +2 -2
- data/lib/lago_ruby/models/plan_create_input.rb +2 -2
- data/lib/lago_ruby/models/plan_create_input_plan.rb +13 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +13 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
- data/lib/lago_ruby/models/plan_object.rb +13 -3
- data/lib/lago_ruby/models/plan_update_input.rb +2 -2
- data/lib/lago_ruby/models/plan_update_input_plan.rb +13 -3
- data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +13 -3
- data/lib/lago_ruby/models/plans_paginated.rb +2 -2
- data/lib/lago_ruby/models/subscription.rb +2 -2
- data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
- data/lib/lago_ruby/models/subscription_create_input_subscription.rb +13 -3
- data/lib/lago_ruby/models/subscription_object.rb +13 -3
- data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
- data/lib/lago_ruby/models/subscription_update_input_subscription.rb +13 -3
- data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
- data/lib/lago_ruby/models/tax.rb +2 -2
- data/lib/lago_ruby/models/tax_base_input.rb +2 -2
- data/lib/lago_ruby/models/tax_create_input.rb +2 -2
- data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
- data/lib/lago_ruby/models/tax_object.rb +2 -2
- data/lib/lago_ruby/models/tax_update_input.rb +2 -2
- data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
- data/lib/lago_ruby/models/timezone.rb +2 -2
- data/lib/lago_ruby/models/wallet.rb +2 -2
- data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
- data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
- data/lib/lago_ruby/models/wallet_object.rb +2 -2
- data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
- data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
- data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
- data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
- data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
- data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
- data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
- data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoint.rb +221 -0
- data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +214 -0
- data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +267 -0
- data/lib/lago_ruby/models/webhook_endpoint_object.rb +317 -0
- data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +214 -0
- data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +239 -0
- data/lib/lago_ruby/version.rb +3 -3
- data/lib/lago_ruby.rb +10 -7
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/customer_past_usage_spec.rb +42 -0
- data/spec/models/event_input_event_timestamp_spec.rb +21 -0
- data/spec/models/{create_webhook_endpoint_request_spec.rb → webhook_endpoint_create_input_spec.rb} +8 -8
- data/spec/models/{create_webhook_endpoint_request_webhook_endpoint_spec.rb → webhook_endpoint_create_input_webhook_endpoint_spec.rb} +8 -8
- data/spec/models/{create_webhook_endpoint200_response_webhook_endpoint_spec.rb → webhook_endpoint_object_spec.rb} +8 -8
- data/spec/models/{create_webhook_endpoint200_response_spec.rb → webhook_endpoint_spec.rb} +8 -8
- data/spec/models/webhook_endpoint_update_input_spec.rb +34 -0
- data/spec/models/{find_all_webhook_endpoints200_response_spec.rb → webhook_endpoints_paginated_spec.rb} +8 -8
- data/spec/spec_helper.rb +2 -2
- metadata +179 -157
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23e57e890bfe8c0b19773bcb8eb4923fc46a1aa0abb5787074fda52d7fdd344b
|
4
|
+
data.tar.gz: 3ff0bd599f9260095aa49eacc114b4f2570532142033ab1273213de4fb21aabb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c542123cabbf5f5f652526fadeaae108f92c08eca199a1fed15749fcd4d83f75b28bc13ed30b4919dfe84f1376ff74e50221ef2435adef570484c42eb339657b
|
7
|
+
data.tar.gz: e9c14cebd5062a44286c1b8fc94377d729392cd8d9bac89ee18461d5e1477a96603fb380d1f765b45081b6ca406ce755180d980de4e9be53e0c559fea82807fd
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,8 +6,8 @@ Lago API allows your application to push customer information and metrics (event
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
|
-
- API version: 0.
|
10
|
-
- Package version: 0.
|
9
|
+
- API version: 0.49.0-beta
|
10
|
+
- Package version: 0.49.0-beta
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
[![Gem Version](https://badge.fury.io/rb/lago-ruby.svg)](https://badge.fury.io/rb/lago-ruby)
|
@@ -26,16 +26,16 @@ gem build lago_ruby.gemspec
|
|
26
26
|
Then either install the gem locally:
|
27
27
|
|
28
28
|
```shell
|
29
|
-
gem install ./lago_ruby-0.
|
29
|
+
gem install ./lago_ruby-0.49.0-beta.gem
|
30
30
|
```
|
31
31
|
|
32
|
-
(for development, run `gem install --dev ./lago_ruby-0.
|
32
|
+
(for development, run `gem install --dev ./lago_ruby-0.49.0-beta.gem` to install the development dependencies)
|
33
33
|
|
34
34
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
35
35
|
|
36
36
|
Finally add this to the Gemfile:
|
37
37
|
|
38
|
-
gem 'lago_ruby', '~> 0.
|
38
|
+
gem 'lago_ruby', '~> 0.49.0-beta'
|
39
39
|
|
40
40
|
### Install from Git
|
41
41
|
|
@@ -116,6 +116,7 @@ Class | Method | HTTP request | Description
|
|
116
116
|
*LagoAPI::CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /customers | Create a customer
|
117
117
|
*LagoAPI::CustomersApi* | [**delete_applied_coupon**](docs/CustomersApi.md#delete_applied_coupon) | **DELETE** /customers/{external_customer_id}/applied_coupons/{applied_coupon_id} | Delete an applied coupon
|
118
118
|
*LagoAPI::CustomersApi* | [**destroy_customer**](docs/CustomersApi.md#destroy_customer) | **DELETE** /customers/{external_id} | Delete a customer
|
119
|
+
*LagoAPI::CustomersApi* | [**find_all_customer_past_usage**](docs/CustomersApi.md#find_all_customer_past_usage) | **GET** /customers/{external_customer_id}/past_usage | Retrieve customer past usage
|
119
120
|
*LagoAPI::CustomersApi* | [**find_all_customers**](docs/CustomersApi.md#find_all_customers) | **GET** /customers | List all customers
|
120
121
|
*LagoAPI::CustomersApi* | [**find_customer**](docs/CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer
|
121
122
|
*LagoAPI::CustomersApi* | [**find_customer_current_usage**](docs/CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage
|
@@ -144,6 +145,7 @@ Class | Method | HTTP request | Description
|
|
144
145
|
*LagoAPI::SubscriptionsApi* | [**create_subscription**](docs/SubscriptionsApi.md#create_subscription) | **POST** /subscriptions | Assign a plan to a customer
|
145
146
|
*LagoAPI::SubscriptionsApi* | [**destroy_subscription**](docs/SubscriptionsApi.md#destroy_subscription) | **DELETE** /subscriptions/{external_id} | Terminate a subscription
|
146
147
|
*LagoAPI::SubscriptionsApi* | [**find_all_subscriptions**](docs/SubscriptionsApi.md#find_all_subscriptions) | **GET** /subscriptions | List all subscriptions
|
148
|
+
*LagoAPI::SubscriptionsApi* | [**find_subscription**](docs/SubscriptionsApi.md#find_subscription) | **GET** /subscriptions/{external_id} | Retrieve a subscription
|
147
149
|
*LagoAPI::SubscriptionsApi* | [**update_subscription**](docs/SubscriptionsApi.md#update_subscription) | **PUT** /subscriptions/{external_id} | Update a subscription
|
148
150
|
*LagoAPI::TaxesApi* | [**create_tax**](docs/TaxesApi.md#create_tax) | **POST** /taxes | Create a tax
|
149
151
|
*LagoAPI::TaxesApi* | [**destroy_tax**](docs/TaxesApi.md#destroy_tax) | **DELETE** /taxes/{code} | Delete a tax
|
@@ -212,10 +214,6 @@ Class | Method | HTTP request | Description
|
|
212
214
|
- [LagoAPI::CouponObject](docs/CouponObject.md)
|
213
215
|
- [LagoAPI::CouponUpdateInput](docs/CouponUpdateInput.md)
|
214
216
|
- [LagoAPI::CouponsPaginated](docs/CouponsPaginated.md)
|
215
|
-
- [LagoAPI::CreateWebhookEndpoint200Response](docs/CreateWebhookEndpoint200Response.md)
|
216
|
-
- [LagoAPI::CreateWebhookEndpoint200ResponseWebhookEndpoint](docs/CreateWebhookEndpoint200ResponseWebhookEndpoint.md)
|
217
|
-
- [LagoAPI::CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
|
218
|
-
- [LagoAPI::CreateWebhookEndpointRequestWebhookEndpoint](docs/CreateWebhookEndpointRequestWebhookEndpoint.md)
|
219
217
|
- [LagoAPI::CreditNote](docs/CreditNote.md)
|
220
218
|
- [LagoAPI::CreditNoteAppliedTaxObject](docs/CreditNoteAppliedTaxObject.md)
|
221
219
|
- [LagoAPI::CreditNoteCreateInput](docs/CreditNoteCreateInput.md)
|
@@ -243,6 +241,7 @@ Class | Method | HTTP request | Description
|
|
243
241
|
- [LagoAPI::CustomerMetadata](docs/CustomerMetadata.md)
|
244
242
|
- [LagoAPI::CustomerObject](docs/CustomerObject.md)
|
245
243
|
- [LagoAPI::CustomerObjectExtended](docs/CustomerObjectExtended.md)
|
244
|
+
- [LagoAPI::CustomerPastUsage](docs/CustomerPastUsage.md)
|
246
245
|
- [LagoAPI::CustomerUsage](docs/CustomerUsage.md)
|
247
246
|
- [LagoAPI::CustomerUsageObject](docs/CustomerUsageObject.md)
|
248
247
|
- [LagoAPI::CustomersPaginated](docs/CustomersPaginated.md)
|
@@ -254,6 +253,7 @@ Class | Method | HTTP request | Description
|
|
254
253
|
- [LagoAPI::EventEstimateFeesInputEvent](docs/EventEstimateFeesInputEvent.md)
|
255
254
|
- [LagoAPI::EventInput](docs/EventInput.md)
|
256
255
|
- [LagoAPI::EventInputEvent](docs/EventInputEvent.md)
|
256
|
+
- [LagoAPI::EventInputEventTimestamp](docs/EventInputEventTimestamp.md)
|
257
257
|
- [LagoAPI::EventObject](docs/EventObject.md)
|
258
258
|
- [LagoAPI::EventObjectProperties](docs/EventObjectProperties.md)
|
259
259
|
- [LagoAPI::Fee](docs/Fee.md)
|
@@ -264,7 +264,6 @@ Class | Method | HTTP request | Description
|
|
264
264
|
- [LagoAPI::FeeUpdateInputFee](docs/FeeUpdateInputFee.md)
|
265
265
|
- [LagoAPI::Fees](docs/Fees.md)
|
266
266
|
- [LagoAPI::FeesPaginated](docs/FeesPaginated.md)
|
267
|
-
- [LagoAPI::FindAllWebhookEndpoints200Response](docs/FindAllWebhookEndpoints200Response.md)
|
268
267
|
- [LagoAPI::GetCustomerPortalUrl200Response](docs/GetCustomerPortalUrl200Response.md)
|
269
268
|
- [LagoAPI::GetCustomerPortalUrl200ResponseCustomer](docs/GetCustomerPortalUrl200ResponseCustomer.md)
|
270
269
|
- [LagoAPI::GroupObject](docs/GroupObject.md)
|
@@ -327,6 +326,12 @@ Class | Method | HTTP request | Description
|
|
327
326
|
- [LagoAPI::WalletUpdateInput](docs/WalletUpdateInput.md)
|
328
327
|
- [LagoAPI::WalletUpdateInputWallet](docs/WalletUpdateInputWallet.md)
|
329
328
|
- [LagoAPI::WalletsPaginated](docs/WalletsPaginated.md)
|
329
|
+
- [LagoAPI::WebhookEndpoint](docs/WebhookEndpoint.md)
|
330
|
+
- [LagoAPI::WebhookEndpointCreateInput](docs/WebhookEndpointCreateInput.md)
|
331
|
+
- [LagoAPI::WebhookEndpointCreateInputWebhookEndpoint](docs/WebhookEndpointCreateInputWebhookEndpoint.md)
|
332
|
+
- [LagoAPI::WebhookEndpointObject](docs/WebhookEndpointObject.md)
|
333
|
+
- [LagoAPI::WebhookEndpointUpdateInput](docs/WebhookEndpointUpdateInput.md)
|
334
|
+
- [LagoAPI::WebhookEndpointsPaginated](docs/WebhookEndpointsPaginated.md)
|
330
335
|
|
331
336
|
|
332
337
|
## Documentation for Authorization
|
data/docs/AddOnBaseInput.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **name** | **String** | The name of the add-on. | [optional] |
|
8
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
8
9
|
| **code** | **String** | Unique code used to identify the add-on. | [optional] |
|
9
10
|
| **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | [optional] |
|
10
11
|
| **amount_currency** | [**Currency**](Currency.md) | | [optional] |
|
@@ -18,6 +19,7 @@ require 'lago_ruby'
|
|
18
19
|
|
19
20
|
instance = LagoAPI::AddOnBaseInput.new(
|
20
21
|
name: Setup Fee,
|
22
|
+
invoice_display_name: Setup Fee (SF1),
|
21
23
|
code: setup_fee,
|
22
24
|
amount_cents: 50000,
|
23
25
|
amount_currency: null,
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **name** | **String** | The name of the add-on. | |
|
8
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
8
9
|
| **code** | **String** | Unique code used to identify the add-on. | |
|
9
10
|
| **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | |
|
10
11
|
| **amount_currency** | [**Currency**](Currency.md) | | |
|
@@ -18,6 +19,7 @@ require 'lago_ruby'
|
|
18
19
|
|
19
20
|
instance = LagoAPI::AddOnCreateInputAddOn.new(
|
20
21
|
name: Setup Fee,
|
22
|
+
invoice_display_name: Setup Fee (SF1),
|
21
23
|
code: setup_fee,
|
22
24
|
amount_cents: 50000,
|
23
25
|
amount_currency: null,
|
data/docs/AddOnObject.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **lago_id** | **String** | Unique identifier of the add-on, created by Lago. | |
|
8
8
|
| **name** | **String** | The name of the add-on. | |
|
9
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
9
10
|
| **code** | **String** | Unique code used to identify the add-on. | |
|
10
11
|
| **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | |
|
11
12
|
| **amount_currency** | [**Currency**](Currency.md) | | |
|
@@ -21,6 +22,7 @@ require 'lago_ruby'
|
|
21
22
|
instance = LagoAPI::AddOnObject.new(
|
22
23
|
lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
23
24
|
name: Setup Fee,
|
25
|
+
invoice_display_name: Setup Fee (SF1),
|
24
26
|
code: setup_fee,
|
25
27
|
amount_cents: 50000,
|
26
28
|
amount_currency: null,
|
@@ -9,7 +9,8 @@
|
|
9
9
|
| **description** | **String** | Internal description of the billable metric. | [optional] |
|
10
10
|
| **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | [optional] |
|
11
11
|
| **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
|
12
|
-
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric.
|
12
|
+
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | [optional] |
|
13
|
+
| **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
|
13
14
|
| **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
|
14
15
|
|
15
16
|
## Example
|
@@ -24,6 +25,7 @@ instance = LagoAPI::BillableMetricBaseInput.new(
|
|
24
25
|
recurring: false,
|
25
26
|
field_name: gb,
|
26
27
|
aggregation_type: sum_agg,
|
28
|
+
weighted_interval: seconds,
|
27
29
|
group: null
|
28
30
|
)
|
29
31
|
```
|
@@ -9,7 +9,8 @@
|
|
9
9
|
| **description** | **String** | Internal description of the billable metric. | [optional] |
|
10
10
|
| **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | [optional] |
|
11
11
|
| **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
|
12
|
-
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric.
|
12
|
+
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | |
|
13
|
+
| **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
|
13
14
|
| **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
|
14
15
|
|
15
16
|
## Example
|
@@ -24,6 +25,7 @@ instance = LagoAPI::BillableMetricCreateInputBillableMetric.new(
|
|
24
25
|
recurring: false,
|
25
26
|
field_name: gb,
|
26
27
|
aggregation_type: sum_agg,
|
28
|
+
weighted_interval: seconds,
|
27
29
|
group: null
|
28
30
|
)
|
29
31
|
```
|
@@ -11,7 +11,8 @@
|
|
11
11
|
| **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | |
|
12
12
|
| **created_at** | **Time** | Creation date of the billable metric. | |
|
13
13
|
| **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
|
14
|
-
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric.
|
14
|
+
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | |
|
15
|
+
| **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
|
15
16
|
| **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
|
16
17
|
| **active_subscriptions_count** | **Integer** | Number of active subscriptions using this billable metric. | |
|
17
18
|
| **draft_invoices_count** | **Integer** | Number of draft invoices for which this billable metric is listed as an invoice item. | |
|
@@ -31,6 +32,7 @@ instance = LagoAPI::BillableMetricObject.new(
|
|
31
32
|
created_at: 2022-09-14T16:35:31Z,
|
32
33
|
field_name: gb,
|
33
34
|
aggregation_type: sum_agg,
|
35
|
+
weighted_interval: seconds,
|
34
36
|
group: null,
|
35
37
|
active_subscriptions_count: 4,
|
36
38
|
draft_invoices_count: 10,
|
data/docs/ChargeObject.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
| **lago_id** | **String** | Unique identifier of charge, created by Lago. | |
|
8
8
|
| **lago_billable_metric_id** | **String** | Unique identifier of the billable metric created by Lago. | |
|
9
9
|
| **billable_metric_code** | **String** | Unique code identifying a billable metric. | |
|
10
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
10
11
|
| **created_at** | **Time** | The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard. | |
|
11
12
|
| **charge_model** | **String** | Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage` or `volume`. | |
|
12
13
|
| **pay_in_advance** | **Boolean** | This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period. | [optional] |
|
@@ -26,6 +27,7 @@ instance = LagoAPI::ChargeObject.new(
|
|
26
27
|
lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
27
28
|
lago_billable_metric_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
28
29
|
billable_metric_code: requests,
|
30
|
+
invoice_display_name: Setup,
|
29
31
|
created_at: 2022-09-14T16:35:31Z,
|
30
32
|
charge_model: null,
|
31
33
|
pay_in_advance: true,
|
data/docs/CouponObject.md
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
| **expiration** | **String** | Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`. - If set to `time_limit`, the coupon has an expiration based on a specified time limit. - If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely. | |
|
23
23
|
| **expiration_at** | **Time** | The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid. | [optional] |
|
24
24
|
| **created_at** | **Time** | The date and time when the coupon was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the coupon was initially created. | |
|
25
|
+
| **terminated_at** | **Time** | This field indicates if the coupon has been terminated and is no longer usable. If it's not null, it won't be removed for existing customers using it, but it prevents the coupon from being applied in the future. | [optional] |
|
25
26
|
|
26
27
|
## Example
|
27
28
|
|
@@ -46,7 +47,8 @@ instance = LagoAPI::CouponObject.new(
|
|
46
47
|
frequency_duration: 6,
|
47
48
|
expiration: time_limit,
|
48
49
|
expiration_at: 2022-08-08T23:59:59Z,
|
49
|
-
created_at: 2022-04-29T08:59:51Z
|
50
|
+
created_at: 2022-04-29T08:59:51Z,
|
51
|
+
terminated_at: 2022-08-08T23:59:59Z
|
50
52
|
)
|
51
53
|
```
|
52
54
|
|
@@ -13,6 +13,7 @@
|
|
13
13
|
| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
|
14
14
|
| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
|
15
15
|
| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
|
16
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
16
17
|
| **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | |
|
17
18
|
| **amount_currency** | [**Currency**](Currency.md) | | |
|
18
19
|
| **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
|
@@ -49,6 +50,7 @@ instance = LagoAPI::CreditNoteItemObjectFee.new(
|
|
49
50
|
lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
50
51
|
external_customer_id: external_id,
|
51
52
|
external_subscription_id: external_id,
|
53
|
+
invoice_display_name: Setup Fee (SF1),
|
52
54
|
amount_cents: 100,
|
53
55
|
amount_currency: null,
|
54
56
|
taxes_amount_cents: 20,
|
data/docs/CreditObjectItem.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
7
|
+
| **lago_item_id** | **String** | Unique identifier assigned to the credit item within the Lago application. | |
|
8
8
|
| **type** | **String** | The type of credit applied. Possible values are `coupon` or `credit_note`. | |
|
9
9
|
| **code** | **String** | The code of the credit applied. It can be the code of the coupon attached to the credit or the credit note's number. | |
|
10
10
|
| **name** | **String** | The name of the credit applied. It can be the name of the coupon attached to the credit or the initial invoice's number linked to the credit note. | |
|
@@ -15,7 +15,7 @@
|
|
15
15
|
require 'lago_ruby'
|
16
16
|
|
17
17
|
instance = LagoAPI::CreditObjectItem.new(
|
18
|
-
|
18
|
+
lago_item_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
19
19
|
type: coupon,
|
20
20
|
code: startup_deal,
|
21
21
|
name: Startup Deal
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **units** | **String** | The number of units consumed by the customer for a specific charge item. | |
|
8
|
+
| **events_count** | **Integer** | The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts. | |
|
8
9
|
| **amount_cents** | **Integer** | The amount in cents, tax excluded, consumed by the customer for a specific charge item. | |
|
9
10
|
| **amount_currency** | [**Currency**](Currency.md) | | |
|
10
11
|
| **charge** | [**CustomerChargeUsageObjectCharge**](CustomerChargeUsageObjectCharge.md) | | |
|
@@ -18,6 +19,7 @@ require 'lago_ruby'
|
|
18
19
|
|
19
20
|
instance = LagoAPI::CustomerChargeUsageObject.new(
|
20
21
|
units: 1.0,
|
22
|
+
events_count: 10,
|
21
23
|
amount_cents: 123,
|
22
24
|
amount_currency: null,
|
23
25
|
charge: null,
|
@@ -8,6 +8,7 @@
|
|
8
8
|
| **key** | **String** | The group key, only returned for groups with two dimensions. | [optional] |
|
9
9
|
| **value** | **String** | The group value. | [optional] |
|
10
10
|
| **units** | **String** | The number of units consumed for a specific group related to a charge item. | [optional] |
|
11
|
+
| **events_count** | **Integer** | The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts. | [optional] |
|
11
12
|
| **amount_cents** | **Integer** | The amount in cents, tax excluded, consumed for a specific group related to a charge item. | [optional] |
|
12
13
|
|
13
14
|
## Example
|
@@ -20,6 +21,7 @@ instance = LagoAPI::CustomerChargeUsageObjectGroupsInner.new(
|
|
20
21
|
key: null,
|
21
22
|
value: europe,
|
22
23
|
units: 0.9,
|
24
|
+
events_count: 10,
|
23
25
|
amount_cents: 1000
|
24
26
|
)
|
25
27
|
```
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# LagoAPI::CustomerPastUsage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **usage_periods** | [**Array<CustomerUsage>**](CustomerUsage.md) | | |
|
8
|
+
| **meta** | [**PaginationMeta**](PaginationMeta.md) | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'lago_ruby'
|
14
|
+
|
15
|
+
instance = LagoAPI::CustomerPastUsage.new(
|
16
|
+
usage_periods: null,
|
17
|
+
meta: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/CustomerUsageObject.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
| **from_datetime** | **Time** | The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC). | |
|
8
8
|
| **to_datetime** | **Time** | The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC). | |
|
9
9
|
| **issuing_date** | **Time** | The date of creation of the invoice. | |
|
10
|
+
| **lago_invoice_id** | **String** | A unique identifier associated with the invoice related to this particular usage record. | [optional] |
|
10
11
|
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
11
12
|
| **amount_cents** | **Integer** | The amount in cents, tax excluded. | |
|
12
13
|
| **taxes_amount_cents** | **Integer** | The tax amount in cents. | |
|
@@ -22,6 +23,7 @@ instance = LagoAPI::CustomerUsageObject.new(
|
|
22
23
|
from_datetime: 2022-07-01T00:00Z,
|
23
24
|
to_datetime: 2022-07-31T23:59:59Z,
|
24
25
|
issuing_date: 2022-08-01T23:59:59Z,
|
26
|
+
lago_invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
25
27
|
currency: null,
|
26
28
|
amount_cents: 123,
|
27
29
|
taxes_amount_cents: 200,
|
data/docs/CustomersApi.md
CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.getlago.com/api/v1*
|
|
7
7
|
| [**create_customer**](CustomersApi.md#create_customer) | **POST** /customers | Create a customer |
|
8
8
|
| [**delete_applied_coupon**](CustomersApi.md#delete_applied_coupon) | **DELETE** /customers/{external_customer_id}/applied_coupons/{applied_coupon_id} | Delete an applied coupon |
|
9
9
|
| [**destroy_customer**](CustomersApi.md#destroy_customer) | **DELETE** /customers/{external_id} | Delete a customer |
|
10
|
+
| [**find_all_customer_past_usage**](CustomersApi.md#find_all_customer_past_usage) | **GET** /customers/{external_customer_id}/past_usage | Retrieve customer past usage |
|
10
11
|
| [**find_all_customers**](CustomersApi.md#find_all_customers) | **GET** /customers | List all customers |
|
11
12
|
| [**find_customer**](CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer |
|
12
13
|
| [**find_customer_current_usage**](CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage |
|
@@ -222,6 +223,87 @@ end
|
|
222
223
|
- **Accept**: application/json
|
223
224
|
|
224
225
|
|
226
|
+
## find_all_customer_past_usage
|
227
|
+
|
228
|
+
> <CustomerPastUsage> find_all_customer_past_usage(external_customer_id, external_subscription_id, opts)
|
229
|
+
|
230
|
+
Retrieve customer past usage
|
231
|
+
|
232
|
+
This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
|
233
|
+
|
234
|
+
### Examples
|
235
|
+
|
236
|
+
```ruby
|
237
|
+
require 'time'
|
238
|
+
require 'lago_ruby'
|
239
|
+
# setup authorization
|
240
|
+
LagoAPI.configure do |config|
|
241
|
+
# Configure Bearer authorization: bearerAuth
|
242
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
243
|
+
end
|
244
|
+
|
245
|
+
api_instance = LagoAPI::CustomersApi.new
|
246
|
+
external_customer_id = '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba' # String | The customer external unique identifier (provided by your own application).
|
247
|
+
external_subscription_id = 'sub_1234567890' # String | The unique identifier of the subscription within your application.
|
248
|
+
opts = {
|
249
|
+
page: 1, # Integer | Page number.
|
250
|
+
per_page: 20, # Integer | Number of records per page.
|
251
|
+
billable_metric_code: 'cpu', # String | Billable metric code filter to apply to the charge usage
|
252
|
+
periods_count: 5 # Integer | Number of past billing period to returns in the result
|
253
|
+
}
|
254
|
+
|
255
|
+
begin
|
256
|
+
# Retrieve customer past usage
|
257
|
+
result = api_instance.find_all_customer_past_usage(external_customer_id, external_subscription_id, opts)
|
258
|
+
p result
|
259
|
+
rescue LagoAPI::ApiError => e
|
260
|
+
puts "Error when calling CustomersApi->find_all_customer_past_usage: #{e}"
|
261
|
+
end
|
262
|
+
```
|
263
|
+
|
264
|
+
#### Using the find_all_customer_past_usage_with_http_info variant
|
265
|
+
|
266
|
+
This returns an Array which contains the response data, status code and headers.
|
267
|
+
|
268
|
+
> <Array(<CustomerPastUsage>, Integer, Hash)> find_all_customer_past_usage_with_http_info(external_customer_id, external_subscription_id, opts)
|
269
|
+
|
270
|
+
```ruby
|
271
|
+
begin
|
272
|
+
# Retrieve customer past usage
|
273
|
+
data, status_code, headers = api_instance.find_all_customer_past_usage_with_http_info(external_customer_id, external_subscription_id, opts)
|
274
|
+
p status_code # => 2xx
|
275
|
+
p headers # => { ... }
|
276
|
+
p data # => <CustomerPastUsage>
|
277
|
+
rescue LagoAPI::ApiError => e
|
278
|
+
puts "Error when calling CustomersApi->find_all_customer_past_usage_with_http_info: #{e}"
|
279
|
+
end
|
280
|
+
```
|
281
|
+
|
282
|
+
### Parameters
|
283
|
+
|
284
|
+
| Name | Type | Description | Notes |
|
285
|
+
| ---- | ---- | ----------- | ----- |
|
286
|
+
| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). | |
|
287
|
+
| **external_subscription_id** | **String** | The unique identifier of the subscription within your application. | |
|
288
|
+
| **page** | **Integer** | Page number. | [optional] |
|
289
|
+
| **per_page** | **Integer** | Number of records per page. | [optional] |
|
290
|
+
| **billable_metric_code** | **String** | Billable metric code filter to apply to the charge usage | [optional] |
|
291
|
+
| **periods_count** | **Integer** | Number of past billing period to returns in the result | [optional] |
|
292
|
+
|
293
|
+
### Return type
|
294
|
+
|
295
|
+
[**CustomerPastUsage**](CustomerPastUsage.md)
|
296
|
+
|
297
|
+
### Authorization
|
298
|
+
|
299
|
+
[bearerAuth](../README.md#bearerAuth)
|
300
|
+
|
301
|
+
### HTTP request headers
|
302
|
+
|
303
|
+
- **Content-Type**: Not defined
|
304
|
+
- **Accept**: application/json
|
305
|
+
|
306
|
+
|
225
307
|
## find_all_customers
|
226
308
|
|
227
309
|
> <CustomersPaginated> find_all_customers(opts)
|
data/docs/EventInputEvent.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription. | [optional] |
|
9
9
|
| **external_subscription_id** | **String** | The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided. | [optional] |
|
10
10
|
| **code** | **String** | The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process. | |
|
11
|
-
| **timestamp** | **
|
11
|
+
| **timestamp** | [**EventInputEventTimestamp**](EventInputEventTimestamp.md) | | [optional] |
|
12
12
|
| **properties** | **Hash<String, String>** | This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. | [optional] |
|
13
13
|
|
14
14
|
## Example
|
@@ -21,7 +21,7 @@ instance = LagoAPI::EventInputEvent.new(
|
|
21
21
|
external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba,
|
22
22
|
external_subscription_id: sub_1234567890,
|
23
23
|
code: storage,
|
24
|
-
timestamp:
|
24
|
+
timestamp: null,
|
25
25
|
properties: {"gb":10}
|
26
26
|
)
|
27
27
|
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# LagoAPI::EventInputEventTimestamp
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'lago_ruby'
|
12
|
+
|
13
|
+
instance = LagoAPI::EventInputEventTimestamp.new()
|
14
|
+
```
|
15
|
+
|
data/docs/EventObject.md
CHANGED
@@ -26,7 +26,7 @@ instance = LagoAPI::EventObject.new(
|
|
26
26
|
lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
27
27
|
external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba,
|
28
28
|
code: storage,
|
29
|
-
timestamp: 2022-04-29T08:59:
|
29
|
+
timestamp: 2022-04-29T08:59:51.123Z,
|
30
30
|
properties: null,
|
31
31
|
lago_subscription_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
32
32
|
external_subscription_id: sub_1234567890,
|
data/docs/FeeObject.md
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
|
14
14
|
| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
|
15
15
|
| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
|
16
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
16
17
|
| **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | |
|
17
18
|
| **amount_currency** | [**Currency**](Currency.md) | | |
|
18
19
|
| **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
|
@@ -49,6 +50,7 @@ instance = LagoAPI::FeeObject.new(
|
|
49
50
|
lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
50
51
|
external_customer_id: external_id,
|
51
52
|
external_subscription_id: external_id,
|
53
|
+
invoice_display_name: Setup Fee (SF1),
|
52
54
|
amount_cents: 100,
|
53
55
|
amount_currency: null,
|
54
56
|
taxes_amount_cents: 20,
|
data/docs/FeeObjectItem.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
| **type** | **String** | The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`. | |
|
8
8
|
| **code** | **String** | The code of the fee item. It can be the code of the `add-o`n, the code of the `charge`, the code of the `credit` or the code of the `subscription`. | |
|
9
9
|
| **name** | **String** | The name of the fee item. It can be the name of the `add-on`, the name of the `charge`, the name of the `credit` or the name of the `subscription`. | |
|
10
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
10
11
|
| **lago_item_id** | **String** | Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`. | |
|
11
12
|
| **item_type** | **String** | The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction` or `Subscription`. | |
|
12
13
|
|
@@ -19,6 +20,7 @@ instance = LagoAPI::FeeObjectItem.new(
|
|
19
20
|
type: subscription,
|
20
21
|
code: startup,
|
21
22
|
name: Startup,
|
23
|
+
invoice_display_name: Setup Fee (SF1),
|
22
24
|
lago_item_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
23
25
|
item_type: Subscription
|
24
26
|
)
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **group_id** | **String** | Unique identifier of a billable metric group, created by Lago. | |
|
8
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual group will be used as the default display name. | [optional] |
|
8
9
|
| **values** | [**GroupPropertiesObjectValues**](GroupPropertiesObjectValues.md) | | |
|
9
10
|
|
10
11
|
## Example
|
@@ -14,6 +15,7 @@ require 'lago_ruby'
|
|
14
15
|
|
15
16
|
instance = LagoAPI::GroupPropertiesObject.new(
|
16
17
|
group_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
18
|
+
invoice_display_name: AWS,
|
17
19
|
values: null
|
18
20
|
)
|
19
21
|
```
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **add_on_code** | **String** | The code of the add-on used as invoice item. | |
|
8
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
|
8
9
|
| **unit_amount_cents** | **Integer** | The amount of the fee per unit, expressed in cents. By default, the amount of the add-on is used. | [optional] |
|
9
10
|
| **units** | **String** | The quantity of units associated with the fee. By default, only 1 unit is added to the invoice. | [optional] |
|
10
11
|
| **description** | **String** | This is a description | [optional] |
|
@@ -17,6 +18,7 @@ require 'lago_ruby'
|
|
17
18
|
|
18
19
|
instance = LagoAPI::InvoiceOneOffCreateInputInvoiceFeesInner.new(
|
19
20
|
add_on_code: setup_fee,
|
21
|
+
invoice_display_name: Setup Fee (SF1),
|
20
22
|
unit_amount_cents: 12000,
|
21
23
|
units: 2.5,
|
22
24
|
description: The description of the fee line item in the invoice. By default, the description of the add-on is used.,
|
data/docs/PlanCreateInputPlan.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **name** | **String** | The name of the plan. | [optional] |
|
8
|
+
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. | [optional] |
|
8
9
|
| **code** | **String** | The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance. | [optional] |
|
9
10
|
| **interval** | **String** | The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly`, or `weekly`. | [optional] |
|
10
11
|
| **description** | **String** | The description on the plan. | [optional] |
|
@@ -23,6 +24,7 @@ require 'lago_ruby'
|
|
23
24
|
|
24
25
|
instance = LagoAPI::PlanCreateInputPlan.new(
|
25
26
|
name: Startup,
|
27
|
+
invoice_display_name: Startup plan,
|
26
28
|
code: startup,
|
27
29
|
interval: monthly,
|
28
30
|
description: Plan for early stage startups.,
|
@@ -32,7 +34,7 @@ instance = LagoAPI::PlanCreateInputPlan.new(
|
|
32
34
|
pay_in_advance: true,
|
33
35
|
bill_charges_monthly: null,
|
34
36
|
tax_codes: ["french_standard_vat"],
|
35
|
-
charges: [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[],"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
37
|
+
charges: [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[],"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","invoice_display_name":"Europe","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","invoice_display_name":"USA","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","invoice_display_name":"Africa","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
36
38
|
)
|
37
39
|
```
|
38
40
|
|