lago_ruby 0.49.0.pre.beta → 0.52.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 +2 -2
- data/README.md +30 -6
- data/docs/AddOnCreateInputAddOn.md +1 -1
- data/docs/AnalyticsApi.md +299 -0
- data/docs/CreditNoteCreateInputCreditNote.md +1 -1
- data/docs/CreditNoteEstimateInput.md +18 -0
- data/docs/CreditNoteEstimateInputCreditNote.md +20 -0
- data/docs/CreditNoteEstimateInputCreditNoteItemsInner.md +20 -0
- data/docs/CreditNoteEstimated.md +18 -0
- data/docs/CreditNoteEstimatedEstimatedCreditNote.md +38 -0
- data/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +32 -0
- data/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md +20 -0
- data/docs/CreditNoteItemObjectFee.md +6 -4
- data/docs/CreditNoteObject.md +2 -2
- data/docs/CreditNotesApi.md +72 -0
- data/docs/CustomerChargeUsageObjectCharge.md +3 -1
- data/docs/CustomersApi.md +70 -0
- data/docs/EventsApi.md +7 -6
- data/docs/FeeObject.md +6 -4
- data/docs/FeeObjectItem.md +2 -0
- data/docs/GenerateCustomerCheckoutURL200Response.md +24 -0
- data/docs/GrossRevenueObject.md +22 -0
- data/docs/GrossRevenues.md +18 -0
- data/docs/InvoicedUsageObject.md +24 -0
- data/docs/InvoicedUsages.md +18 -0
- data/docs/MrrObject.md +22 -0
- data/docs/Mrrs.md +18 -0
- data/docs/OrganizationObject.md +2 -0
- data/docs/OrganizationUpdateInputOrganization.md +2 -0
- data/docs/OutstandingInvoiceObject.md +26 -0
- data/docs/OutstandingInvoices.md +18 -0
- data/docs/PlanOverridesObject.md +32 -0
- data/docs/PlanOverridesObjectChargesInner.md +30 -0
- data/docs/Subscription.md +1 -1
- data/docs/SubscriptionCreateInputSubscription.md +3 -1
- data/docs/SubscriptionObjectExtended.md +52 -0
- data/docs/SubscriptionUpdateInputSubscription.md +3 -1
- data/lago_ruby.gemspec +2 -2
- data/lib/lago_ruby/api/add_ons_api.rb +2 -2
- data/lib/lago_ruby/api/analytics_api.rb +268 -0
- 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 +66 -2
- data/lib/lago_ruby/api/customers_api.rb +65 -2
- data/lib/lago_ruby/api/events_api.rb +7 -7
- 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 +2 -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 +2 -2
- data/lib/lago_ruby/api/webhooks_api.rb +2 -2
- data/lib/lago_ruby/api_client.rb +12 -13
- data/lib/lago_ruby/api_error.rb +2 -2
- data/lib/lago_ruby/configuration.rb +2 -2
- data/lib/lago_ruby/models/add_on.rb +3 -3
- data/lib/lago_ruby/models/add_on_base_input.rb +3 -3
- data/lib/lago_ruby/models/add_on_create_input.rb +3 -3
- data/lib/lago_ruby/models/add_on_create_input_add_on.rb +3 -3
- data/lib/lago_ruby/models/add_on_object.rb +3 -3
- data/lib/lago_ruby/models/add_on_update_input.rb +3 -3
- data/lib/lago_ruby/models/add_ons_paginated.rb +3 -3
- data/lib/lago_ruby/models/api_error_bad_request.rb +3 -3
- data/lib/lago_ruby/models/api_error_forbidden.rb +3 -3
- data/lib/lago_ruby/models/api_error_not_allowed.rb +3 -3
- data/lib/lago_ruby/models/api_error_not_found.rb +3 -3
- data/lib/lago_ruby/models/api_error_unauthorized.rb +3 -3
- data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_input.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_object.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_object_extended.rb +3 -3
- data/lib/lago_ruby/models/applied_coupons_paginated.rb +3 -3
- data/lib/lago_ruby/models/base_applied_tax.rb +3 -3
- data/lib/lago_ruby/models/billable_metric.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_base_input.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_create_input.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_group.rb +3 -3
- 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 +3 -3
- data/lib/lago_ruby/models/billable_metric_object.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_update_input.rb +3 -3
- data/lib/lago_ruby/models/billable_metrics_paginated.rb +3 -3
- data/lib/lago_ruby/models/charge_object.rb +3 -3
- data/lib/lago_ruby/models/charge_object_properties.rb +3 -3
- data/lib/lago_ruby/models/charge_properties.rb +3 -3
- data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +3 -3
- data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +3 -3
- data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +3 -3
- data/lib/lago_ruby/models/country.rb +2 -2
- data/lib/lago_ruby/models/coupon.rb +3 -3
- data/lib/lago_ruby/models/coupon_base_input.rb +3 -3
- data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +3 -3
- data/lib/lago_ruby/models/coupon_create_input.rb +3 -3
- data/lib/lago_ruby/models/coupon_create_input_coupon.rb +3 -3
- data/lib/lago_ruby/models/coupon_object.rb +3 -3
- data/lib/lago_ruby/models/coupon_update_input.rb +3 -3
- data/lib/lago_ruby/models/coupons_paginated.rb +3 -3
- data/lib/lago_ruby/models/credit_note.rb +3 -3
- data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +3 -3
- data/lib/lago_ruby/models/credit_note_create_input.rb +3 -3
- data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +4 -4
- data/lib/lago_ruby/models/credit_note_estimate_input.rb +221 -0
- data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +241 -0
- data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +239 -0
- data/lib/lago_ruby/models/credit_note_estimated.rb +221 -0
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +387 -0
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +283 -0
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +235 -0
- data/lib/lago_ruby/models/credit_note_item_object.rb +3 -3
- data/lib/lago_ruby/models/credit_note_item_object_fee.rb +25 -8
- data/lib/lago_ruby/models/credit_note_object.rb +14 -14
- data/lib/lago_ruby/models/credit_note_update_input.rb +3 -3
- data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +3 -3
- data/lib/lago_ruby/models/credit_notes.rb +3 -3
- data/lib/lago_ruby/models/credit_object.rb +3 -3
- data/lib/lago_ruby/models/credit_object_invoice.rb +3 -3
- data/lib/lago_ruby/models/credit_object_item.rb +3 -3
- data/lib/lago_ruby/models/currency.rb +2 -2
- data/lib/lago_ruby/models/customer.rb +3 -3
- data/lib/lago_ruby/models/customer_billing_configuration.rb +3 -3
- data/lib/lago_ruby/models/customer_charge_usage_object.rb +3 -3
- data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +3 -3
- data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +17 -7
- data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +3 -3
- data/lib/lago_ruby/models/customer_create_input.rb +3 -3
- data/lib/lago_ruby/models/customer_create_input_customer.rb +3 -3
- data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +3 -3
- data/lib/lago_ruby/models/customer_metadata.rb +3 -3
- data/lib/lago_ruby/models/customer_object.rb +3 -3
- data/lib/lago_ruby/models/customer_object_extended.rb +3 -3
- data/lib/lago_ruby/models/customer_past_usage.rb +3 -3
- data/lib/lago_ruby/models/customer_usage.rb +3 -3
- data/lib/lago_ruby/models/customer_usage_object.rb +3 -3
- data/lib/lago_ruby/models/customers_paginated.rb +3 -3
- data/lib/lago_ruby/models/event.rb +3 -3
- data/lib/lago_ruby/models/event_batch_input.rb +3 -3
- data/lib/lago_ruby/models/event_batch_input_event.rb +3 -3
- data/lib/lago_ruby/models/event_batch_input_event_properties.rb +3 -3
- data/lib/lago_ruby/models/event_estimate_fees_input.rb +3 -3
- data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +3 -3
- data/lib/lago_ruby/models/event_input.rb +3 -3
- data/lib/lago_ruby/models/event_input_event.rb +3 -3
- data/lib/lago_ruby/models/event_input_event_timestamp.rb +2 -2
- data/lib/lago_ruby/models/event_object.rb +7 -23
- data/lib/lago_ruby/models/event_object_properties.rb +3 -3
- data/lib/lago_ruby/models/fee.rb +3 -3
- data/lib/lago_ruby/models/fee_applied_tax_object.rb +3 -3
- data/lib/lago_ruby/models/fee_object.rb +25 -8
- data/lib/lago_ruby/models/fee_object_item.rb +14 -4
- data/lib/lago_ruby/models/fee_update_input.rb +3 -3
- data/lib/lago_ruby/models/fee_update_input_fee.rb +3 -3
- data/lib/lago_ruby/models/fees.rb +3 -3
- data/lib/lago_ruby/models/fees_paginated.rb +3 -3
- data/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb +246 -0
- data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +3 -3
- data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +3 -3
- data/lib/lago_ruby/models/gross_revenue_object.rb +241 -0
- data/lib/lago_ruby/models/gross_revenues.rb +223 -0
- data/lib/lago_ruby/models/group_object.rb +3 -3
- data/lib/lago_ruby/models/group_properties_object.rb +3 -3
- data/lib/lago_ruby/models/group_properties_object_values.rb +3 -3
- data/lib/lago_ruby/models/groups_paginated.rb +3 -3
- data/lib/lago_ruby/models/invoice.rb +3 -3
- data/lib/lago_ruby/models/invoice_applied_tax_object.rb +3 -3
- data/lib/lago_ruby/models/invoice_metadata_object.rb +3 -3
- data/lib/lago_ruby/models/invoice_object.rb +3 -3
- data/lib/lago_ruby/models/invoice_object_customer.rb +3 -3
- data/lib/lago_ruby/models/invoice_object_extended.rb +3 -3
- data/lib/lago_ruby/models/invoice_one_off_create_input.rb +3 -3
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +3 -3
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +3 -3
- data/lib/lago_ruby/models/invoice_update_input.rb +3 -3
- data/lib/lago_ruby/models/invoice_update_input_invoice.rb +3 -3
- data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +3 -3
- data/lib/lago_ruby/models/invoiced_usage_object.rb +265 -0
- data/lib/lago_ruby/models/invoiced_usages.rb +223 -0
- data/lib/lago_ruby/models/invoices_paginated.rb +3 -3
- data/lib/lago_ruby/models/mrr_object.rb +241 -0
- data/lib/lago_ruby/models/mrrs.rb +223 -0
- data/lib/lago_ruby/models/organization.rb +3 -3
- data/lib/lago_ruby/models/organization_billing_configuration.rb +3 -3
- data/lib/lago_ruby/models/organization_object.rb +13 -4
- data/lib/lago_ruby/models/organization_update_input.rb +3 -3
- data/lib/lago_ruby/models/organization_update_input_organization.rb +13 -4
- data/lib/lago_ruby/models/outstanding_invoice_object.rb +309 -0
- data/lib/lago_ruby/models/outstanding_invoices.rb +223 -0
- data/lib/lago_ruby/models/pagination_meta.rb +3 -3
- data/lib/lago_ruby/models/plan.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input_plan.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +3 -3
- data/lib/lago_ruby/models/plan_object.rb +3 -3
- data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
- data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +278 -0
- data/lib/lago_ruby/models/plan_update_input.rb +3 -3
- data/lib/lago_ruby/models/plan_update_input_plan.rb +3 -3
- data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +3 -3
- data/lib/lago_ruby/models/plans_paginated.rb +3 -3
- data/lib/lago_ruby/models/subscription.rb +4 -4
- data/lib/lago_ruby/models/subscription_create_input.rb +3 -3
- data/lib/lago_ruby/models/subscription_create_input_subscription.rb +16 -7
- data/lib/lago_ruby/models/subscription_object.rb +3 -3
- data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
- data/lib/lago_ruby/models/subscription_update_input.rb +3 -3
- data/lib/lago_ruby/models/subscription_update_input_subscription.rb +16 -7
- data/lib/lago_ruby/models/subscriptions_paginated.rb +3 -3
- data/lib/lago_ruby/models/tax.rb +3 -3
- data/lib/lago_ruby/models/tax_base_input.rb +3 -3
- data/lib/lago_ruby/models/tax_create_input.rb +3 -3
- data/lib/lago_ruby/models/tax_create_input_tax.rb +3 -3
- data/lib/lago_ruby/models/tax_object.rb +3 -3
- data/lib/lago_ruby/models/tax_update_input.rb +3 -3
- data/lib/lago_ruby/models/taxes_paginated.rb +3 -3
- data/lib/lago_ruby/models/timezone.rb +2 -2
- data/lib/lago_ruby/models/wallet.rb +3 -3
- data/lib/lago_ruby/models/wallet_create_input.rb +3 -3
- data/lib/lago_ruby/models/wallet_create_input_wallet.rb +3 -3
- data/lib/lago_ruby/models/wallet_object.rb +3 -3
- data/lib/lago_ruby/models/wallet_transaction_create_input.rb +3 -3
- data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +3 -3
- data/lib/lago_ruby/models/wallet_transaction_object.rb +3 -3
- data/lib/lago_ruby/models/wallet_transactions.rb +3 -3
- data/lib/lago_ruby/models/wallet_transactions_paginated.rb +3 -3
- data/lib/lago_ruby/models/wallet_update_input.rb +3 -3
- data/lib/lago_ruby/models/wallet_update_input_wallet.rb +3 -3
- data/lib/lago_ruby/models/wallets_paginated.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_object.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +3 -3
- data/lib/lago_ruby/version.rb +3 -3
- data/lib/lago_ruby.rb +22 -3
- data/spec/api/analytics_api_spec.rb +85 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/{credit_note_create_input_credit_note_items_inner_spec.rb → credit_note_estimate_input_credit_note_items_inner_spec.rb} +10 -8
- data/spec/models/credit_note_estimate_input_credit_note_spec.rb +42 -0
- data/spec/models/credit_note_estimate_input_spec.rb +36 -0
- data/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb +78 -0
- data/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb +42 -0
- data/spec/models/credit_note_estimated_estimated_credit_note_spec.rb +96 -0
- data/spec/models/credit_note_estimated_spec.rb +36 -0
- data/spec/models/generate_customer_checkout_url200_response_spec.rb +54 -0
- data/spec/models/gross_revenue_object_spec.rb +48 -0
- data/spec/models/gross_revenues_spec.rb +36 -0
- data/spec/models/invoiced_usage_object_spec.rb +54 -0
- data/spec/models/invoiced_usages_spec.rb +36 -0
- data/spec/models/mrr_object_spec.rb +48 -0
- data/spec/models/mrrs_spec.rb +36 -0
- data/spec/models/outstanding_invoice_object_spec.rb +64 -0
- data/spec/models/outstanding_invoices_spec.rb +36 -0
- data/spec/models/plan_overrides_object_charges_inner_spec.rb +66 -0
- data/spec/models/plan_overrides_object_spec.rb +78 -0
- data/spec/models/subscription_object_extended_spec.rb +146 -0
- data/spec/spec_helper.rb +2 -2
- metadata +237 -159
@@ -11,6 +11,7 @@
|
|
11
11
|
| **billing_time** | **String** | The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration). | [optional] |
|
12
12
|
| **ending_at** | **Time** | The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). | [optional] |
|
13
13
|
| **subscription_at** | **Time** | The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] |
|
14
|
+
| **plan_overrides** | [**PlanOverridesObject**](PlanOverridesObject.md) | | [optional] |
|
14
15
|
|
15
16
|
## Example
|
16
17
|
|
@@ -24,7 +25,8 @@ instance = LagoAPI::SubscriptionCreateInputSubscription.new(
|
|
24
25
|
external_id: my_sub_1234567890,
|
25
26
|
billing_time: anniversary,
|
26
27
|
ending_at: 2022-10-08T00:00Z,
|
27
|
-
subscription_at: 2022-08-08T00:00Z
|
28
|
+
subscription_at: 2022-08-08T00:00Z,
|
29
|
+
plan_overrides: null
|
28
30
|
)
|
29
31
|
```
|
30
32
|
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# LagoAPI::SubscriptionObjectExtended
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **lago_id** | **String** | Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system | |
|
8
|
+
| **external_id** | **String** | The subscription external unique identifier (provided by your own application). | |
|
9
|
+
| **lago_customer_id** | **String** | Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system | |
|
10
|
+
| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). | |
|
11
|
+
| **billing_time** | **String** | The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration). | |
|
12
|
+
| **name** | **String** | The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. | [optional] |
|
13
|
+
| **plan_code** | **String** | The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans. | |
|
14
|
+
| **status** | **String** | The status of the subscription, which can have the following values: - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period. - `active`: the subscription is currently active and applied to the customer. - `terminated`: the subscription is no longer active. - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated. | |
|
15
|
+
| **created_at** | **Time** | The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created. | |
|
16
|
+
| **canceled_at** | **Time** | The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] |
|
17
|
+
| **started_at** | **Time** | The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] |
|
18
|
+
| **ending_at** | **Time** | The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). | [optional] |
|
19
|
+
| **subscription_at** | **Time** | The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | |
|
20
|
+
| **terminated_at** | **Time** | The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC) | [optional] |
|
21
|
+
| **previous_plan_code** | **String** | The code identifying the previous plan associated with this subscription. | [optional] |
|
22
|
+
| **next_plan_code** | **String** | The code identifying the next plan in the case of a downgrade. | [optional] |
|
23
|
+
| **downgrade_plan_date** | **Time** | The date when the plan will be downgraded, represented in ISO 8601 date format. | [optional] |
|
24
|
+
| **plan** | [**PlanObject**](PlanObject.md) | | [optional] |
|
25
|
+
|
26
|
+
## Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'lago_ruby'
|
30
|
+
|
31
|
+
instance = LagoAPI::SubscriptionObjectExtended.new(
|
32
|
+
lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
33
|
+
external_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba,
|
34
|
+
lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
|
35
|
+
external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba,
|
36
|
+
billing_time: anniversary,
|
37
|
+
name: Repository A,
|
38
|
+
plan_code: premium,
|
39
|
+
status: active,
|
40
|
+
created_at: 2022-08-08T00:00Z,
|
41
|
+
canceled_at: 2022-09-14T16:35:31Z,
|
42
|
+
started_at: 2022-08-08T00:00Z,
|
43
|
+
ending_at: 2022-10-08T00:00Z,
|
44
|
+
subscription_at: 2022-08-08T00:00Z,
|
45
|
+
terminated_at: 2022-09-14T16:35:31Z,
|
46
|
+
previous_plan_code: null,
|
47
|
+
next_plan_code: null,
|
48
|
+
downgrade_plan_date: null,
|
49
|
+
plan: null
|
50
|
+
)
|
51
|
+
```
|
52
|
+
|
@@ -7,6 +7,7 @@
|
|
7
7
|
| **name** | **String** | The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. | [optional] |
|
8
8
|
| **ending_at** | **Time** | The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). | [optional] |
|
9
9
|
| **subscription_at** | **Time** | The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] |
|
10
|
+
| **plan_overrides** | [**PlanOverridesObject**](PlanOverridesObject.md) | | [optional] |
|
10
11
|
|
11
12
|
## Example
|
12
13
|
|
@@ -16,7 +17,8 @@ require 'lago_ruby'
|
|
16
17
|
instance = LagoAPI::SubscriptionUpdateInputSubscription.new(
|
17
18
|
name: Repository B,
|
18
19
|
ending_at: 2022-10-08T00:00Z,
|
19
|
-
subscription_at: 2022-08-08T00:00Z
|
20
|
+
subscription_at: 2022-08-08T00:00Z,
|
21
|
+
plan_overrides: null
|
20
22
|
)
|
21
23
|
```
|
22
24
|
|
data/lago_ruby.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.
|
8
|
+
The version of the OpenAPI document: 0.51.0-beta
|
9
9
|
Contact: tech@getlago.com
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version: 7.
|
11
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -0,0 +1,268 @@
|
|
1
|
+
=begin
|
2
|
+
#Lago API documentation
|
3
|
+
|
4
|
+
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
|
+
Contact: tech@getlago.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module LagoAPI
|
16
|
+
class AnalyticsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List gross revenue
|
23
|
+
# Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217.
|
26
|
+
# @option opts [String] :external_customer_id The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
|
27
|
+
# @return [GrossRevenues]
|
28
|
+
def find_all_gross_revenues(opts = {})
|
29
|
+
data, _status_code, _headers = find_all_gross_revenues_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# List gross revenue
|
34
|
+
# Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217.
|
37
|
+
# @option opts [String] :external_customer_id The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
|
38
|
+
# @return [Array<(GrossRevenues, Integer, Hash)>] GrossRevenues data, response status code and response headers
|
39
|
+
def find_all_gross_revenues_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_gross_revenues ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/analytics/gross_revenue'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
49
|
+
query_params[:'external_customer_id'] = opts[:'external_customer_id'] if !opts[:'external_customer_id'].nil?
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type] || 'GrossRevenues'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"AnalyticsApi.find_all_gross_revenues",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_gross_revenues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# List usage revenue
|
86
|
+
# Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217.
|
89
|
+
# @return [InvoicedUsages]
|
90
|
+
def find_all_invoiced_usages(opts = {})
|
91
|
+
data, _status_code, _headers = find_all_invoiced_usages_with_http_info(opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# List usage revenue
|
96
|
+
# Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217.
|
99
|
+
# @return [Array<(InvoicedUsages, Integer, Hash)>] InvoicedUsages data, response status code and response headers
|
100
|
+
def find_all_invoiced_usages_with_http_info(opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_invoiced_usages ...'
|
103
|
+
end
|
104
|
+
# resource path
|
105
|
+
local_var_path = '/analytics/invoiced_usage'
|
106
|
+
|
107
|
+
# query parameters
|
108
|
+
query_params = opts[:query_params] || {}
|
109
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:debug_body]
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:debug_return_type] || 'InvoicedUsages'
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:operation => :"AnalyticsApi.find_all_invoiced_usages",
|
130
|
+
:header_params => header_params,
|
131
|
+
:query_params => query_params,
|
132
|
+
:form_params => form_params,
|
133
|
+
:body => post_body,
|
134
|
+
:auth_names => auth_names,
|
135
|
+
:return_type => return_type
|
136
|
+
)
|
137
|
+
|
138
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
139
|
+
if @api_client.config.debugging
|
140
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_invoiced_usages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
end
|
142
|
+
return data, status_code, headers
|
143
|
+
end
|
144
|
+
|
145
|
+
# List MRR
|
146
|
+
# This endpoint is used to list MRR.
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @option opts [Currency] :currency Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and prior to the deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next three months) as well as to fees paid in arrears (allocated to the preceding three months). - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next twelve months) and for fees paid in arrears (spread over the previous twelve months). - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
|
149
|
+
# @option opts [Integer] :months Show data only for given number of months.
|
150
|
+
# @return [Mrrs]
|
151
|
+
def find_all_mrrs(opts = {})
|
152
|
+
data, _status_code, _headers = find_all_mrrs_with_http_info(opts)
|
153
|
+
data
|
154
|
+
end
|
155
|
+
|
156
|
+
# List MRR
|
157
|
+
# This endpoint is used to list MRR.
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @option opts [Currency] :currency Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and prior to the deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next three months) as well as to fees paid in arrears (allocated to the preceding three months). - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next twelve months) and for fees paid in arrears (spread over the previous twelve months). - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
|
160
|
+
# @option opts [Integer] :months Show data only for given number of months.
|
161
|
+
# @return [Array<(Mrrs, Integer, Hash)>] Mrrs data, response status code and response headers
|
162
|
+
def find_all_mrrs_with_http_info(opts = {})
|
163
|
+
if @api_client.config.debugging
|
164
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_mrrs ...'
|
165
|
+
end
|
166
|
+
# resource path
|
167
|
+
local_var_path = '/analytics/mrr'
|
168
|
+
|
169
|
+
# query parameters
|
170
|
+
query_params = opts[:query_params] || {}
|
171
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
172
|
+
query_params[:'months'] = opts[:'months'] if !opts[:'months'].nil?
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = opts[:header_params] || {}
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:debug_body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:debug_return_type] || 'Mrrs'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:operation => :"AnalyticsApi.find_all_mrrs",
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_mrrs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
# List outstanding invoices
|
209
|
+
# Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
|
210
|
+
# @param [Hash] opts the optional parameters
|
211
|
+
# @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217.
|
212
|
+
# @return [OutstandingInvoices]
|
213
|
+
def find_all_outstanding_invoices(opts = {})
|
214
|
+
data, _status_code, _headers = find_all_outstanding_invoices_with_http_info(opts)
|
215
|
+
data
|
216
|
+
end
|
217
|
+
|
218
|
+
# List outstanding invoices
|
219
|
+
# Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217.
|
222
|
+
# @return [Array<(OutstandingInvoices, Integer, Hash)>] OutstandingInvoices data, response status code and response headers
|
223
|
+
def find_all_outstanding_invoices_with_http_info(opts = {})
|
224
|
+
if @api_client.config.debugging
|
225
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.find_all_outstanding_invoices ...'
|
226
|
+
end
|
227
|
+
# resource path
|
228
|
+
local_var_path = '/analytics/outstanding_invoices'
|
229
|
+
|
230
|
+
# query parameters
|
231
|
+
query_params = opts[:query_params] || {}
|
232
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
233
|
+
|
234
|
+
# header parameters
|
235
|
+
header_params = opts[:header_params] || {}
|
236
|
+
# HTTP header 'Accept' (if needed)
|
237
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
238
|
+
|
239
|
+
# form parameters
|
240
|
+
form_params = opts[:form_params] || {}
|
241
|
+
|
242
|
+
# http body (model)
|
243
|
+
post_body = opts[:debug_body]
|
244
|
+
|
245
|
+
# return_type
|
246
|
+
return_type = opts[:debug_return_type] || 'OutstandingInvoices'
|
247
|
+
|
248
|
+
# auth_names
|
249
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
250
|
+
|
251
|
+
new_options = opts.merge(
|
252
|
+
:operation => :"AnalyticsApi.find_all_outstanding_invoices",
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#find_all_outstanding_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -150,6 +150,70 @@ module LagoAPI
|
|
150
150
|
return data, status_code, headers
|
151
151
|
end
|
152
152
|
|
153
|
+
# Estimate amounts for a new credit note
|
154
|
+
# This endpoint allows you to retrieve amounts for a new credit note creation.
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [CreditNoteEstimateInput] :credit_note_estimate_input Credit note estimate payload
|
157
|
+
# @return [CreditNoteEstimated]
|
158
|
+
def estimate_credit_note(opts = {})
|
159
|
+
data, _status_code, _headers = estimate_credit_note_with_http_info(opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Estimate amounts for a new credit note
|
164
|
+
# This endpoint allows you to retrieve amounts for a new credit note creation.
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @option opts [CreditNoteEstimateInput] :credit_note_estimate_input Credit note estimate payload
|
167
|
+
# @return [Array<(CreditNoteEstimated, Integer, Hash)>] CreditNoteEstimated data, response status code and response headers
|
168
|
+
def estimate_credit_note_with_http_info(opts = {})
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug 'Calling API: CreditNotesApi.estimate_credit_note ...'
|
171
|
+
end
|
172
|
+
# resource path
|
173
|
+
local_var_path = '/credit_notes/estimate'
|
174
|
+
|
175
|
+
# query parameters
|
176
|
+
query_params = opts[:query_params] || {}
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = opts[:header_params] || {}
|
180
|
+
# HTTP header 'Accept' (if needed)
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
182
|
+
# HTTP header 'Content-Type'
|
183
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
184
|
+
if !content_type.nil?
|
185
|
+
header_params['Content-Type'] = content_type
|
186
|
+
end
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = opts[:form_params] || {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'credit_note_estimate_input'])
|
193
|
+
|
194
|
+
# return_type
|
195
|
+
return_type = opts[:debug_return_type] || 'CreditNoteEstimated'
|
196
|
+
|
197
|
+
# auth_names
|
198
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
199
|
+
|
200
|
+
new_options = opts.merge(
|
201
|
+
:operation => :"CreditNotesApi.estimate_credit_note",
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: CreditNotesApi#estimate_credit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
153
217
|
# List all credit notes
|
154
218
|
# This endpoint list all existing credit notes.
|
155
219
|
# @param [Hash] opts the optional parameters
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -497,6 +497,69 @@ module LagoAPI
|
|
497
497
|
return data, status_code, headers
|
498
498
|
end
|
499
499
|
|
500
|
+
# Generate a Customer Payment Provider Checkout URL
|
501
|
+
# This endpoint regenerates the Payment Provider Checkout URL of a Customer.
|
502
|
+
# @param external_customer_id [String] The customer external unique identifier (provided by your own application).
|
503
|
+
# @param [Hash] opts the optional parameters
|
504
|
+
# @return [GenerateCustomerCheckoutURL200Response]
|
505
|
+
def generate_customer_checkout_url(external_customer_id, opts = {})
|
506
|
+
data, _status_code, _headers = generate_customer_checkout_url_with_http_info(external_customer_id, opts)
|
507
|
+
data
|
508
|
+
end
|
509
|
+
|
510
|
+
# Generate a Customer Payment Provider Checkout URL
|
511
|
+
# This endpoint regenerates the Payment Provider Checkout URL of a Customer.
|
512
|
+
# @param external_customer_id [String] The customer external unique identifier (provided by your own application).
|
513
|
+
# @param [Hash] opts the optional parameters
|
514
|
+
# @return [Array<(GenerateCustomerCheckoutURL200Response, Integer, Hash)>] GenerateCustomerCheckoutURL200Response data, response status code and response headers
|
515
|
+
def generate_customer_checkout_url_with_http_info(external_customer_id, opts = {})
|
516
|
+
if @api_client.config.debugging
|
517
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.generate_customer_checkout_url ...'
|
518
|
+
end
|
519
|
+
# verify the required parameter 'external_customer_id' is set
|
520
|
+
if @api_client.config.client_side_validation && external_customer_id.nil?
|
521
|
+
fail ArgumentError, "Missing the required parameter 'external_customer_id' when calling CustomersApi.generate_customer_checkout_url"
|
522
|
+
end
|
523
|
+
# resource path
|
524
|
+
local_var_path = '/customers/{external_customer_id}/checkout_url'.sub('{' + 'external_customer_id' + '}', CGI.escape(external_customer_id.to_s))
|
525
|
+
|
526
|
+
# query parameters
|
527
|
+
query_params = opts[:query_params] || {}
|
528
|
+
|
529
|
+
# header parameters
|
530
|
+
header_params = opts[:header_params] || {}
|
531
|
+
# HTTP header 'Accept' (if needed)
|
532
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
533
|
+
|
534
|
+
# form parameters
|
535
|
+
form_params = opts[:form_params] || {}
|
536
|
+
|
537
|
+
# http body (model)
|
538
|
+
post_body = opts[:debug_body]
|
539
|
+
|
540
|
+
# return_type
|
541
|
+
return_type = opts[:debug_return_type] || 'GenerateCustomerCheckoutURL200Response'
|
542
|
+
|
543
|
+
# auth_names
|
544
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
545
|
+
|
546
|
+
new_options = opts.merge(
|
547
|
+
:operation => :"CustomersApi.generate_customer_checkout_url",
|
548
|
+
:header_params => header_params,
|
549
|
+
:query_params => query_params,
|
550
|
+
:form_params => form_params,
|
551
|
+
:body => post_body,
|
552
|
+
:auth_names => auth_names,
|
553
|
+
:return_type => return_type
|
554
|
+
)
|
555
|
+
|
556
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
557
|
+
if @api_client.config.debugging
|
558
|
+
@api_client.config.logger.debug "API called: CustomersApi#generate_customer_checkout_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
559
|
+
end
|
560
|
+
return data, status_code, headers
|
561
|
+
end
|
562
|
+
|
500
563
|
# Get a customer portal URL
|
501
564
|
# Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
|
502
565
|
# @param external_customer_id [String] External ID of the existing customer
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -91,17 +91,17 @@ module LagoAPI
|
|
91
91
|
# This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.
|
92
92
|
# @param event_input [EventInput] Event payload
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
|
-
# @return [
|
94
|
+
# @return [Event]
|
95
95
|
def create_event(event_input, opts = {})
|
96
|
-
create_event_with_http_info(event_input, opts)
|
97
|
-
|
96
|
+
data, _status_code, _headers = create_event_with_http_info(event_input, opts)
|
97
|
+
data
|
98
98
|
end
|
99
99
|
|
100
100
|
# Send usage events
|
101
101
|
# This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.
|
102
102
|
# @param event_input [EventInput] Event payload
|
103
103
|
# @param [Hash] opts the optional parameters
|
104
|
-
# @return [Array<(
|
104
|
+
# @return [Array<(Event, Integer, Hash)>] Event data, response status code and response headers
|
105
105
|
def create_event_with_http_info(event_input, opts = {})
|
106
106
|
if @api_client.config.debugging
|
107
107
|
@api_client.config.logger.debug 'Calling API: EventsApi.create_event ...'
|
@@ -133,7 +133,7 @@ module LagoAPI
|
|
133
133
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(event_input)
|
134
134
|
|
135
135
|
# return_type
|
136
|
-
return_type = opts[:debug_return_type]
|
136
|
+
return_type = opts[:debug_return_type] || 'Event'
|
137
137
|
|
138
138
|
# auth_names
|
139
139
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|