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.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +30 -6
  4. data/docs/AddOnCreateInputAddOn.md +1 -1
  5. data/docs/AnalyticsApi.md +299 -0
  6. data/docs/CreditNoteCreateInputCreditNote.md +1 -1
  7. data/docs/CreditNoteEstimateInput.md +18 -0
  8. data/docs/CreditNoteEstimateInputCreditNote.md +20 -0
  9. data/docs/CreditNoteEstimateInputCreditNoteItemsInner.md +20 -0
  10. data/docs/CreditNoteEstimated.md +18 -0
  11. data/docs/CreditNoteEstimatedEstimatedCreditNote.md +38 -0
  12. data/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +32 -0
  13. data/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md +20 -0
  14. data/docs/CreditNoteItemObjectFee.md +6 -4
  15. data/docs/CreditNoteObject.md +2 -2
  16. data/docs/CreditNotesApi.md +72 -0
  17. data/docs/CustomerChargeUsageObjectCharge.md +3 -1
  18. data/docs/CustomersApi.md +70 -0
  19. data/docs/EventsApi.md +7 -6
  20. data/docs/FeeObject.md +6 -4
  21. data/docs/FeeObjectItem.md +2 -0
  22. data/docs/GenerateCustomerCheckoutURL200Response.md +24 -0
  23. data/docs/GrossRevenueObject.md +22 -0
  24. data/docs/GrossRevenues.md +18 -0
  25. data/docs/InvoicedUsageObject.md +24 -0
  26. data/docs/InvoicedUsages.md +18 -0
  27. data/docs/MrrObject.md +22 -0
  28. data/docs/Mrrs.md +18 -0
  29. data/docs/OrganizationObject.md +2 -0
  30. data/docs/OrganizationUpdateInputOrganization.md +2 -0
  31. data/docs/OutstandingInvoiceObject.md +26 -0
  32. data/docs/OutstandingInvoices.md +18 -0
  33. data/docs/PlanOverridesObject.md +32 -0
  34. data/docs/PlanOverridesObjectChargesInner.md +30 -0
  35. data/docs/Subscription.md +1 -1
  36. data/docs/SubscriptionCreateInputSubscription.md +3 -1
  37. data/docs/SubscriptionObjectExtended.md +52 -0
  38. data/docs/SubscriptionUpdateInputSubscription.md +3 -1
  39. data/lago_ruby.gemspec +2 -2
  40. data/lib/lago_ruby/api/add_ons_api.rb +2 -2
  41. data/lib/lago_ruby/api/analytics_api.rb +268 -0
  42. data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
  43. data/lib/lago_ruby/api/coupons_api.rb +2 -2
  44. data/lib/lago_ruby/api/credit_notes_api.rb +66 -2
  45. data/lib/lago_ruby/api/customers_api.rb +65 -2
  46. data/lib/lago_ruby/api/events_api.rb +7 -7
  47. data/lib/lago_ruby/api/fees_api.rb +2 -2
  48. data/lib/lago_ruby/api/invoices_api.rb +2 -2
  49. data/lib/lago_ruby/api/organizations_api.rb +2 -2
  50. data/lib/lago_ruby/api/plans_api.rb +2 -2
  51. data/lib/lago_ruby/api/subscriptions_api.rb +2 -2
  52. data/lib/lago_ruby/api/taxes_api.rb +2 -2
  53. data/lib/lago_ruby/api/wallets_api.rb +2 -2
  54. data/lib/lago_ruby/api/webhook_endpoints_api.rb +2 -2
  55. data/lib/lago_ruby/api/webhooks_api.rb +2 -2
  56. data/lib/lago_ruby/api_client.rb +12 -13
  57. data/lib/lago_ruby/api_error.rb +2 -2
  58. data/lib/lago_ruby/configuration.rb +2 -2
  59. data/lib/lago_ruby/models/add_on.rb +3 -3
  60. data/lib/lago_ruby/models/add_on_base_input.rb +3 -3
  61. data/lib/lago_ruby/models/add_on_create_input.rb +3 -3
  62. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +3 -3
  63. data/lib/lago_ruby/models/add_on_object.rb +3 -3
  64. data/lib/lago_ruby/models/add_on_update_input.rb +3 -3
  65. data/lib/lago_ruby/models/add_ons_paginated.rb +3 -3
  66. data/lib/lago_ruby/models/api_error_bad_request.rb +3 -3
  67. data/lib/lago_ruby/models/api_error_forbidden.rb +3 -3
  68. data/lib/lago_ruby/models/api_error_not_allowed.rb +3 -3
  69. data/lib/lago_ruby/models/api_error_not_found.rb +3 -3
  70. data/lib/lago_ruby/models/api_error_unauthorized.rb +3 -3
  71. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +3 -3
  72. data/lib/lago_ruby/models/applied_coupon.rb +3 -3
  73. data/lib/lago_ruby/models/applied_coupon_input.rb +3 -3
  74. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +3 -3
  75. data/lib/lago_ruby/models/applied_coupon_object.rb +3 -3
  76. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +3 -3
  77. data/lib/lago_ruby/models/applied_coupons_paginated.rb +3 -3
  78. data/lib/lago_ruby/models/base_applied_tax.rb +3 -3
  79. data/lib/lago_ruby/models/billable_metric.rb +3 -3
  80. data/lib/lago_ruby/models/billable_metric_base_input.rb +3 -3
  81. data/lib/lago_ruby/models/billable_metric_create_input.rb +3 -3
  82. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +3 -3
  83. data/lib/lago_ruby/models/billable_metric_group.rb +3 -3
  84. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
  85. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +3 -3
  86. data/lib/lago_ruby/models/billable_metric_object.rb +3 -3
  87. data/lib/lago_ruby/models/billable_metric_update_input.rb +3 -3
  88. data/lib/lago_ruby/models/billable_metrics_paginated.rb +3 -3
  89. data/lib/lago_ruby/models/charge_object.rb +3 -3
  90. data/lib/lago_ruby/models/charge_object_properties.rb +3 -3
  91. data/lib/lago_ruby/models/charge_properties.rb +3 -3
  92. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +3 -3
  93. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +3 -3
  94. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +3 -3
  95. data/lib/lago_ruby/models/country.rb +2 -2
  96. data/lib/lago_ruby/models/coupon.rb +3 -3
  97. data/lib/lago_ruby/models/coupon_base_input.rb +3 -3
  98. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +3 -3
  99. data/lib/lago_ruby/models/coupon_create_input.rb +3 -3
  100. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +3 -3
  101. data/lib/lago_ruby/models/coupon_object.rb +3 -3
  102. data/lib/lago_ruby/models/coupon_update_input.rb +3 -3
  103. data/lib/lago_ruby/models/coupons_paginated.rb +3 -3
  104. data/lib/lago_ruby/models/credit_note.rb +3 -3
  105. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +3 -3
  106. data/lib/lago_ruby/models/credit_note_create_input.rb +3 -3
  107. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +4 -4
  108. data/lib/lago_ruby/models/credit_note_estimate_input.rb +221 -0
  109. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +241 -0
  110. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +239 -0
  111. data/lib/lago_ruby/models/credit_note_estimated.rb +221 -0
  112. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +387 -0
  113. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +283 -0
  114. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +235 -0
  115. data/lib/lago_ruby/models/credit_note_item_object.rb +3 -3
  116. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +25 -8
  117. data/lib/lago_ruby/models/credit_note_object.rb +14 -14
  118. data/lib/lago_ruby/models/credit_note_update_input.rb +3 -3
  119. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +3 -3
  120. data/lib/lago_ruby/models/credit_notes.rb +3 -3
  121. data/lib/lago_ruby/models/credit_object.rb +3 -3
  122. data/lib/lago_ruby/models/credit_object_invoice.rb +3 -3
  123. data/lib/lago_ruby/models/credit_object_item.rb +3 -3
  124. data/lib/lago_ruby/models/currency.rb +2 -2
  125. data/lib/lago_ruby/models/customer.rb +3 -3
  126. data/lib/lago_ruby/models/customer_billing_configuration.rb +3 -3
  127. data/lib/lago_ruby/models/customer_charge_usage_object.rb +3 -3
  128. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +3 -3
  129. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +17 -7
  130. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +3 -3
  131. data/lib/lago_ruby/models/customer_create_input.rb +3 -3
  132. data/lib/lago_ruby/models/customer_create_input_customer.rb +3 -3
  133. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +3 -3
  134. data/lib/lago_ruby/models/customer_metadata.rb +3 -3
  135. data/lib/lago_ruby/models/customer_object.rb +3 -3
  136. data/lib/lago_ruby/models/customer_object_extended.rb +3 -3
  137. data/lib/lago_ruby/models/customer_past_usage.rb +3 -3
  138. data/lib/lago_ruby/models/customer_usage.rb +3 -3
  139. data/lib/lago_ruby/models/customer_usage_object.rb +3 -3
  140. data/lib/lago_ruby/models/customers_paginated.rb +3 -3
  141. data/lib/lago_ruby/models/event.rb +3 -3
  142. data/lib/lago_ruby/models/event_batch_input.rb +3 -3
  143. data/lib/lago_ruby/models/event_batch_input_event.rb +3 -3
  144. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +3 -3
  145. data/lib/lago_ruby/models/event_estimate_fees_input.rb +3 -3
  146. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +3 -3
  147. data/lib/lago_ruby/models/event_input.rb +3 -3
  148. data/lib/lago_ruby/models/event_input_event.rb +3 -3
  149. data/lib/lago_ruby/models/event_input_event_timestamp.rb +2 -2
  150. data/lib/lago_ruby/models/event_object.rb +7 -23
  151. data/lib/lago_ruby/models/event_object_properties.rb +3 -3
  152. data/lib/lago_ruby/models/fee.rb +3 -3
  153. data/lib/lago_ruby/models/fee_applied_tax_object.rb +3 -3
  154. data/lib/lago_ruby/models/fee_object.rb +25 -8
  155. data/lib/lago_ruby/models/fee_object_item.rb +14 -4
  156. data/lib/lago_ruby/models/fee_update_input.rb +3 -3
  157. data/lib/lago_ruby/models/fee_update_input_fee.rb +3 -3
  158. data/lib/lago_ruby/models/fees.rb +3 -3
  159. data/lib/lago_ruby/models/fees_paginated.rb +3 -3
  160. data/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb +246 -0
  161. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +3 -3
  162. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +3 -3
  163. data/lib/lago_ruby/models/gross_revenue_object.rb +241 -0
  164. data/lib/lago_ruby/models/gross_revenues.rb +223 -0
  165. data/lib/lago_ruby/models/group_object.rb +3 -3
  166. data/lib/lago_ruby/models/group_properties_object.rb +3 -3
  167. data/lib/lago_ruby/models/group_properties_object_values.rb +3 -3
  168. data/lib/lago_ruby/models/groups_paginated.rb +3 -3
  169. data/lib/lago_ruby/models/invoice.rb +3 -3
  170. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +3 -3
  171. data/lib/lago_ruby/models/invoice_metadata_object.rb +3 -3
  172. data/lib/lago_ruby/models/invoice_object.rb +3 -3
  173. data/lib/lago_ruby/models/invoice_object_customer.rb +3 -3
  174. data/lib/lago_ruby/models/invoice_object_extended.rb +3 -3
  175. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +3 -3
  176. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +3 -3
  177. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +3 -3
  178. data/lib/lago_ruby/models/invoice_update_input.rb +3 -3
  179. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +3 -3
  180. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +3 -3
  181. data/lib/lago_ruby/models/invoiced_usage_object.rb +265 -0
  182. data/lib/lago_ruby/models/invoiced_usages.rb +223 -0
  183. data/lib/lago_ruby/models/invoices_paginated.rb +3 -3
  184. data/lib/lago_ruby/models/mrr_object.rb +241 -0
  185. data/lib/lago_ruby/models/mrrs.rb +223 -0
  186. data/lib/lago_ruby/models/organization.rb +3 -3
  187. data/lib/lago_ruby/models/organization_billing_configuration.rb +3 -3
  188. data/lib/lago_ruby/models/organization_object.rb +13 -4
  189. data/lib/lago_ruby/models/organization_update_input.rb +3 -3
  190. data/lib/lago_ruby/models/organization_update_input_organization.rb +13 -4
  191. data/lib/lago_ruby/models/outstanding_invoice_object.rb +309 -0
  192. data/lib/lago_ruby/models/outstanding_invoices.rb +223 -0
  193. data/lib/lago_ruby/models/pagination_meta.rb +3 -3
  194. data/lib/lago_ruby/models/plan.rb +3 -3
  195. data/lib/lago_ruby/models/plan_create_input.rb +3 -3
  196. data/lib/lago_ruby/models/plan_create_input_plan.rb +3 -3
  197. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +3 -3
  198. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +3 -3
  199. data/lib/lago_ruby/models/plan_object.rb +3 -3
  200. data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
  201. data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +278 -0
  202. data/lib/lago_ruby/models/plan_update_input.rb +3 -3
  203. data/lib/lago_ruby/models/plan_update_input_plan.rb +3 -3
  204. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +3 -3
  205. data/lib/lago_ruby/models/plans_paginated.rb +3 -3
  206. data/lib/lago_ruby/models/subscription.rb +4 -4
  207. data/lib/lago_ruby/models/subscription_create_input.rb +3 -3
  208. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +16 -7
  209. data/lib/lago_ruby/models/subscription_object.rb +3 -3
  210. data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
  211. data/lib/lago_ruby/models/subscription_update_input.rb +3 -3
  212. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +16 -7
  213. data/lib/lago_ruby/models/subscriptions_paginated.rb +3 -3
  214. data/lib/lago_ruby/models/tax.rb +3 -3
  215. data/lib/lago_ruby/models/tax_base_input.rb +3 -3
  216. data/lib/lago_ruby/models/tax_create_input.rb +3 -3
  217. data/lib/lago_ruby/models/tax_create_input_tax.rb +3 -3
  218. data/lib/lago_ruby/models/tax_object.rb +3 -3
  219. data/lib/lago_ruby/models/tax_update_input.rb +3 -3
  220. data/lib/lago_ruby/models/taxes_paginated.rb +3 -3
  221. data/lib/lago_ruby/models/timezone.rb +2 -2
  222. data/lib/lago_ruby/models/wallet.rb +3 -3
  223. data/lib/lago_ruby/models/wallet_create_input.rb +3 -3
  224. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +3 -3
  225. data/lib/lago_ruby/models/wallet_object.rb +3 -3
  226. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +3 -3
  227. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +3 -3
  228. data/lib/lago_ruby/models/wallet_transaction_object.rb +3 -3
  229. data/lib/lago_ruby/models/wallet_transactions.rb +3 -3
  230. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +3 -3
  231. data/lib/lago_ruby/models/wallet_update_input.rb +3 -3
  232. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +3 -3
  233. data/lib/lago_ruby/models/wallets_paginated.rb +3 -3
  234. data/lib/lago_ruby/models/webhook_endpoint.rb +3 -3
  235. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +3 -3
  236. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +3 -3
  237. data/lib/lago_ruby/models/webhook_endpoint_object.rb +3 -3
  238. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +3 -3
  239. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +3 -3
  240. data/lib/lago_ruby/version.rb +3 -3
  241. data/lib/lago_ruby.rb +22 -3
  242. data/spec/api/analytics_api_spec.rb +85 -0
  243. data/spec/api_client_spec.rb +2 -2
  244. data/spec/configuration_spec.rb +2 -2
  245. 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
  246. data/spec/models/credit_note_estimate_input_credit_note_spec.rb +42 -0
  247. data/spec/models/credit_note_estimate_input_spec.rb +36 -0
  248. data/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb +78 -0
  249. data/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb +42 -0
  250. data/spec/models/credit_note_estimated_estimated_credit_note_spec.rb +96 -0
  251. data/spec/models/credit_note_estimated_spec.rb +36 -0
  252. data/spec/models/generate_customer_checkout_url200_response_spec.rb +54 -0
  253. data/spec/models/gross_revenue_object_spec.rb +48 -0
  254. data/spec/models/gross_revenues_spec.rb +36 -0
  255. data/spec/models/invoiced_usage_object_spec.rb +54 -0
  256. data/spec/models/invoiced_usages_spec.rb +36 -0
  257. data/spec/models/mrr_object_spec.rb +48 -0
  258. data/spec/models/mrrs_spec.rb +36 -0
  259. data/spec/models/outstanding_invoice_object_spec.rb +64 -0
  260. data/spec/models/outstanding_invoices_spec.rb +36 -0
  261. data/spec/models/plan_overrides_object_charges_inner_spec.rb +66 -0
  262. data/spec/models/plan_overrides_object_spec.rb +78 -0
  263. data/spec/models/subscription_object_extended_spec.rb +146 -0
  264. data/spec/spec_helper.rb +2 -2
  265. 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.49.0-beta
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.1.0-SNAPSHOT
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.49.0-beta
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.1.0-SNAPSHOT
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 &#x60;subscription&#x60; 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 &#x60;monthly&#x60; subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from &#x60;quarterly&#x60; 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 &#x60;yearly&#x60; 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 &#x60;weekly&#x60; 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 &#x60;subscription&#x60; 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 &#x60;monthly&#x60; subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from &#x60;quarterly&#x60; 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 &#x60;yearly&#x60; 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 &#x60;weekly&#x60; 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 &#x60;finalized&#x60;. This report sorts invoices categorically based on their &#x60;payment_status&#x60;.
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.49.0-beta
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.1.0-SNAPSHOT
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.49.0-beta
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.1.0-SNAPSHOT
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.49.0-beta
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.1.0-SNAPSHOT
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.49.0-beta
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.1.0-SNAPSHOT
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.49.0-beta
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.1.0-SNAPSHOT
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 [nil]
94
+ # @return [Event]
95
95
  def create_event(event_input, opts = {})
96
- create_event_with_http_info(event_input, opts)
97
- nil
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<(nil, Integer, Hash)>] nil, response status code and response headers
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.49.0-beta
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.1.0-SNAPSHOT
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.49.0-beta
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.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12