lago_ruby 0.48.0.pre.beta → 0.51.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +19 -6
  4. data/docs/AddOnBaseInput.md +2 -0
  5. data/docs/AddOnCreateInputAddOn.md +2 -0
  6. data/docs/AddOnObject.md +2 -0
  7. data/docs/BillableMetricBaseInput.md +1 -1
  8. data/docs/BillableMetricCreateInputBillableMetric.md +1 -1
  9. data/docs/BillableMetricObject.md +1 -1
  10. data/docs/ChargeObject.md +2 -0
  11. data/docs/CreditNoteCreateInputCreditNote.md +1 -1
  12. data/docs/CreditNoteEstimateInput.md +18 -0
  13. data/docs/CreditNoteEstimateInputCreditNote.md +20 -0
  14. data/docs/CreditNoteEstimateInputCreditNoteItemsInner.md +20 -0
  15. data/docs/CreditNoteEstimated.md +18 -0
  16. data/docs/CreditNoteEstimatedEstimatedCreditNote.md +38 -0
  17. data/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +32 -0
  18. data/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md +20 -0
  19. data/docs/CreditNoteItemObjectFee.md +4 -0
  20. data/docs/CreditNoteObject.md +2 -2
  21. data/docs/CreditNotesApi.md +72 -0
  22. data/docs/CustomerChargeUsageObject.md +2 -0
  23. data/docs/CustomerChargeUsageObjectGroupsInner.md +2 -0
  24. data/docs/CustomerPastUsage.md +20 -0
  25. data/docs/CustomerUsageObject.md +2 -0
  26. data/docs/CustomersApi.md +82 -0
  27. data/docs/EventsApi.md +7 -6
  28. data/docs/FeeObject.md +4 -0
  29. data/docs/FeeObjectItem.md +4 -0
  30. data/docs/GroupPropertiesObject.md +2 -0
  31. data/docs/InvoiceOneOffCreateInputInvoiceFeesInner.md +2 -0
  32. data/docs/PlanCreateInputPlan.md +3 -1
  33. data/docs/PlanCreateInputPlanChargesInner.md +2 -0
  34. data/docs/PlanObject.md +3 -1
  35. data/docs/PlanOverridesObject.md +32 -0
  36. data/docs/PlanOverridesObjectChargesInner.md +28 -0
  37. data/docs/PlanUpdateInputPlan.md +3 -1
  38. data/docs/PlanUpdateInputPlanChargesInner.md +2 -0
  39. data/docs/Subscription.md +1 -1
  40. data/docs/SubscriptionCreateInputSubscription.md +3 -1
  41. data/docs/SubscriptionObjectExtended.md +52 -0
  42. data/docs/SubscriptionUpdateInputSubscription.md +3 -1
  43. data/docs/SubscriptionsApi.md +70 -0
  44. data/lago_ruby.gemspec +1 -1
  45. data/lib/lago_ruby/api/add_ons_api.rb +1 -1
  46. data/lib/lago_ruby/api/billable_metrics_api.rb +1 -1
  47. data/lib/lago_ruby/api/coupons_api.rb +1 -1
  48. data/lib/lago_ruby/api/credit_notes_api.rb +65 -1
  49. data/lib/lago_ruby/api/customers_api.rb +83 -1
  50. data/lib/lago_ruby/api/events_api.rb +6 -6
  51. data/lib/lago_ruby/api/fees_api.rb +1 -1
  52. data/lib/lago_ruby/api/invoices_api.rb +1 -1
  53. data/lib/lago_ruby/api/organizations_api.rb +1 -1
  54. data/lib/lago_ruby/api/plans_api.rb +1 -1
  55. data/lib/lago_ruby/api/subscriptions_api.rb +64 -1
  56. data/lib/lago_ruby/api/taxes_api.rb +1 -1
  57. data/lib/lago_ruby/api/wallets_api.rb +1 -1
  58. data/lib/lago_ruby/api/webhook_endpoints_api.rb +1 -1
  59. data/lib/lago_ruby/api/webhooks_api.rb +1 -1
  60. data/lib/lago_ruby/api_client.rb +13 -13
  61. data/lib/lago_ruby/api_error.rb +1 -1
  62. data/lib/lago_ruby/configuration.rb +2 -1
  63. data/lib/lago_ruby/models/add_on.rb +2 -2
  64. data/lib/lago_ruby/models/add_on_base_input.rb +13 -3
  65. data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
  66. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +13 -3
  67. data/lib/lago_ruby/models/add_on_object.rb +13 -3
  68. data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
  69. data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
  70. data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
  71. data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
  72. data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
  73. data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
  74. data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
  75. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
  76. data/lib/lago_ruby/models/applied_coupon.rb +2 -2
  77. data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
  78. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
  79. data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
  80. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
  81. data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
  82. data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
  83. data/lib/lago_ruby/models/billable_metric.rb +2 -2
  84. data/lib/lago_ruby/models/billable_metric_base_input.rb +5 -5
  85. data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
  86. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +5 -5
  87. data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
  88. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +1 -1
  89. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
  90. data/lib/lago_ruby/models/billable_metric_object.rb +5 -5
  91. data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
  92. data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
  93. data/lib/lago_ruby/models/charge_object.rb +13 -3
  94. data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
  95. data/lib/lago_ruby/models/charge_properties.rb +2 -2
  96. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
  97. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
  98. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
  99. data/lib/lago_ruby/models/country.rb +1 -1
  100. data/lib/lago_ruby/models/coupon.rb +2 -2
  101. data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
  102. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
  103. data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
  104. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
  105. data/lib/lago_ruby/models/coupon_object.rb +2 -2
  106. data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
  107. data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
  108. data/lib/lago_ruby/models/credit_note.rb +2 -2
  109. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
  110. data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
  111. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +3 -3
  112. data/lib/lago_ruby/models/credit_note_create_input_credit_note_items_inner.rb +1 -1
  113. data/lib/lago_ruby/models/credit_note_estimate_input.rb +221 -0
  114. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +241 -0
  115. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +239 -0
  116. data/lib/lago_ruby/models/credit_note_estimated.rb +221 -0
  117. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +387 -0
  118. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +283 -0
  119. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +235 -0
  120. data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
  121. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +30 -3
  122. data/lib/lago_ruby/models/credit_note_object.rb +13 -13
  123. data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
  124. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
  125. data/lib/lago_ruby/models/credit_notes.rb +2 -2
  126. data/lib/lago_ruby/models/credit_object.rb +2 -2
  127. data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
  128. data/lib/lago_ruby/models/credit_object_item.rb +2 -2
  129. data/lib/lago_ruby/models/currency.rb +1 -1
  130. data/lib/lago_ruby/models/customer.rb +2 -2
  131. data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
  132. data/lib/lago_ruby/models/customer_charge_usage_object.rb +20 -3
  133. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
  134. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
  135. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +13 -3
  136. data/lib/lago_ruby/models/customer_create_input.rb +2 -2
  137. data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
  138. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
  139. data/lib/lago_ruby/models/customer_metadata.rb +2 -2
  140. data/lib/lago_ruby/models/customer_object.rb +2 -2
  141. data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
  142. data/lib/lago_ruby/models/customer_past_usage.rb +239 -0
  143. data/lib/lago_ruby/models/customer_usage.rb +2 -2
  144. data/lib/lago_ruby/models/customer_usage_object.rb +14 -3
  145. data/lib/lago_ruby/models/customers_paginated.rb +2 -2
  146. data/lib/lago_ruby/models/event.rb +2 -2
  147. data/lib/lago_ruby/models/event_batch_input.rb +2 -2
  148. data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
  149. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
  150. data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
  151. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
  152. data/lib/lago_ruby/models/event_input.rb +2 -2
  153. data/lib/lago_ruby/models/event_input_event.rb +2 -2
  154. data/lib/lago_ruby/models/event_input_event_timestamp.rb +1 -1
  155. data/lib/lago_ruby/models/event_object.rb +6 -22
  156. data/lib/lago_ruby/models/event_object_properties.rb +2 -2
  157. data/lib/lago_ruby/models/fee.rb +2 -2
  158. data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
  159. data/lib/lago_ruby/models/fee_object.rb +30 -3
  160. data/lib/lago_ruby/models/fee_object_item.rb +23 -3
  161. data/lib/lago_ruby/models/fee_update_input.rb +2 -2
  162. data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
  163. data/lib/lago_ruby/models/fees.rb +2 -2
  164. data/lib/lago_ruby/models/fees_paginated.rb +2 -2
  165. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
  166. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
  167. data/lib/lago_ruby/models/group_object.rb +2 -2
  168. data/lib/lago_ruby/models/group_properties_object.rb +13 -3
  169. data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
  170. data/lib/lago_ruby/models/groups_paginated.rb +2 -2
  171. data/lib/lago_ruby/models/invoice.rb +2 -2
  172. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
  173. data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
  174. data/lib/lago_ruby/models/invoice_object.rb +2 -2
  175. data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
  176. data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
  177. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
  178. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
  179. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +13 -3
  180. data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
  181. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
  182. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
  183. data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
  184. data/lib/lago_ruby/models/organization.rb +2 -2
  185. data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
  186. data/lib/lago_ruby/models/organization_object.rb +2 -2
  187. data/lib/lago_ruby/models/organization_update_input.rb +2 -2
  188. data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
  189. data/lib/lago_ruby/models/pagination_meta.rb +2 -2
  190. data/lib/lago_ruby/models/plan.rb +2 -2
  191. data/lib/lago_ruby/models/plan_create_input.rb +2 -2
  192. data/lib/lago_ruby/models/plan_create_input_plan.rb +13 -3
  193. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +13 -3
  194. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
  195. data/lib/lago_ruby/models/plan_object.rb +13 -3
  196. data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
  197. data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +268 -0
  198. data/lib/lago_ruby/models/plan_update_input.rb +2 -2
  199. data/lib/lago_ruby/models/plan_update_input_plan.rb +13 -3
  200. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +13 -3
  201. data/lib/lago_ruby/models/plans_paginated.rb +2 -2
  202. data/lib/lago_ruby/models/subscription.rb +3 -3
  203. data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
  204. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +15 -6
  205. data/lib/lago_ruby/models/subscription_object.rb +2 -2
  206. data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
  207. data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
  208. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +15 -6
  209. data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
  210. data/lib/lago_ruby/models/tax.rb +2 -2
  211. data/lib/lago_ruby/models/tax_base_input.rb +2 -2
  212. data/lib/lago_ruby/models/tax_create_input.rb +2 -2
  213. data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
  214. data/lib/lago_ruby/models/tax_object.rb +2 -2
  215. data/lib/lago_ruby/models/tax_update_input.rb +2 -2
  216. data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
  217. data/lib/lago_ruby/models/timezone.rb +1 -1
  218. data/lib/lago_ruby/models/wallet.rb +2 -2
  219. data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
  220. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
  221. data/lib/lago_ruby/models/wallet_object.rb +2 -2
  222. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
  223. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
  224. data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
  225. data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
  226. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
  227. data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
  228. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
  229. data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
  230. data/lib/lago_ruby/models/webhook_endpoint.rb +2 -2
  231. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +2 -2
  232. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +2 -2
  233. data/lib/lago_ruby/models/webhook_endpoint_object.rb +2 -2
  234. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +2 -2
  235. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +2 -2
  236. data/lib/lago_ruby/version.rb +2 -2
  237. data/lib/lago_ruby.rb +12 -2
  238. data/spec/api_client_spec.rb +1 -1
  239. data/spec/configuration_spec.rb +1 -1
  240. 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
  241. data/spec/models/credit_note_estimate_input_credit_note_spec.rb +42 -0
  242. data/spec/models/credit_note_estimate_input_spec.rb +36 -0
  243. data/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb +78 -0
  244. data/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb +42 -0
  245. data/spec/models/credit_note_estimated_estimated_credit_note_spec.rb +96 -0
  246. data/spec/models/credit_note_estimated_spec.rb +36 -0
  247. data/spec/models/customer_past_usage_spec.rb +42 -0
  248. data/spec/models/plan_overrides_object_charges_inner_spec.rb +66 -0
  249. data/spec/models/plan_overrides_object_spec.rb +78 -0
  250. data/spec/models/subscription_object_extended_spec.rb +146 -0
  251. data/spec/spec_helper.rb +1 -1
  252. metadata +194 -152
data/docs/CustomersApi.md CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.getlago.com/api/v1*
7
7
  | [**create_customer**](CustomersApi.md#create_customer) | **POST** /customers | Create a customer |
8
8
  | [**delete_applied_coupon**](CustomersApi.md#delete_applied_coupon) | **DELETE** /customers/{external_customer_id}/applied_coupons/{applied_coupon_id} | Delete an applied coupon |
9
9
  | [**destroy_customer**](CustomersApi.md#destroy_customer) | **DELETE** /customers/{external_id} | Delete a customer |
10
+ | [**find_all_customer_past_usage**](CustomersApi.md#find_all_customer_past_usage) | **GET** /customers/{external_customer_id}/past_usage | Retrieve customer past usage |
10
11
  | [**find_all_customers**](CustomersApi.md#find_all_customers) | **GET** /customers | List all customers |
11
12
  | [**find_customer**](CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer |
12
13
  | [**find_customer_current_usage**](CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage |
@@ -222,6 +223,87 @@ end
222
223
  - **Accept**: application/json
223
224
 
224
225
 
226
+ ## find_all_customer_past_usage
227
+
228
+ > <CustomerPastUsage> find_all_customer_past_usage(external_customer_id, external_subscription_id, opts)
229
+
230
+ Retrieve customer past usage
231
+
232
+ This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
233
+
234
+ ### Examples
235
+
236
+ ```ruby
237
+ require 'time'
238
+ require 'lago_ruby'
239
+ # setup authorization
240
+ LagoAPI.configure do |config|
241
+ # Configure Bearer authorization: bearerAuth
242
+ config.access_token = 'YOUR_BEARER_TOKEN'
243
+ end
244
+
245
+ api_instance = LagoAPI::CustomersApi.new
246
+ external_customer_id = '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba' # String | The customer external unique identifier (provided by your own application).
247
+ external_subscription_id = 'sub_1234567890' # String | The unique identifier of the subscription within your application.
248
+ opts = {
249
+ page: 1, # Integer | Page number.
250
+ per_page: 20, # Integer | Number of records per page.
251
+ billable_metric_code: 'cpu', # String | Billable metric code filter to apply to the charge usage
252
+ periods_count: 5 # Integer | Number of past billing period to returns in the result
253
+ }
254
+
255
+ begin
256
+ # Retrieve customer past usage
257
+ result = api_instance.find_all_customer_past_usage(external_customer_id, external_subscription_id, opts)
258
+ p result
259
+ rescue LagoAPI::ApiError => e
260
+ puts "Error when calling CustomersApi->find_all_customer_past_usage: #{e}"
261
+ end
262
+ ```
263
+
264
+ #### Using the find_all_customer_past_usage_with_http_info variant
265
+
266
+ This returns an Array which contains the response data, status code and headers.
267
+
268
+ > <Array(<CustomerPastUsage>, Integer, Hash)> find_all_customer_past_usage_with_http_info(external_customer_id, external_subscription_id, opts)
269
+
270
+ ```ruby
271
+ begin
272
+ # Retrieve customer past usage
273
+ data, status_code, headers = api_instance.find_all_customer_past_usage_with_http_info(external_customer_id, external_subscription_id, opts)
274
+ p status_code # => 2xx
275
+ p headers # => { ... }
276
+ p data # => <CustomerPastUsage>
277
+ rescue LagoAPI::ApiError => e
278
+ puts "Error when calling CustomersApi->find_all_customer_past_usage_with_http_info: #{e}"
279
+ end
280
+ ```
281
+
282
+ ### Parameters
283
+
284
+ | Name | Type | Description | Notes |
285
+ | ---- | ---- | ----------- | ----- |
286
+ | **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). | |
287
+ | **external_subscription_id** | **String** | The unique identifier of the subscription within your application. | |
288
+ | **page** | **Integer** | Page number. | [optional] |
289
+ | **per_page** | **Integer** | Number of records per page. | [optional] |
290
+ | **billable_metric_code** | **String** | Billable metric code filter to apply to the charge usage | [optional] |
291
+ | **periods_count** | **Integer** | Number of past billing period to returns in the result | [optional] |
292
+
293
+ ### Return type
294
+
295
+ [**CustomerPastUsage**](CustomerPastUsage.md)
296
+
297
+ ### Authorization
298
+
299
+ [bearerAuth](../README.md#bearerAuth)
300
+
301
+ ### HTTP request headers
302
+
303
+ - **Content-Type**: Not defined
304
+ - **Accept**: application/json
305
+
306
+
225
307
  ## find_all_customers
226
308
 
227
309
  > <CustomersPaginated> find_all_customers(opts)
data/docs/EventsApi.md CHANGED
@@ -80,7 +80,7 @@ nil (empty response body)
80
80
 
81
81
  ## create_event
82
82
 
83
- > create_event(event_input)
83
+ > <Event> create_event(event_input)
84
84
 
85
85
  Send usage events
86
86
 
@@ -102,7 +102,8 @@ event_input = LagoAPI::EventInput.new({event: LagoAPI::EventInputEvent.new({tran
102
102
 
103
103
  begin
104
104
  # Send usage events
105
- api_instance.create_event(event_input)
105
+ result = api_instance.create_event(event_input)
106
+ p result
106
107
  rescue LagoAPI::ApiError => e
107
108
  puts "Error when calling EventsApi->create_event: #{e}"
108
109
  end
@@ -110,9 +111,9 @@ end
110
111
 
111
112
  #### Using the create_event_with_http_info variant
112
113
 
113
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
114
+ This returns an Array which contains the response data, status code and headers.
114
115
 
115
- > <Array(nil, Integer, Hash)> create_event_with_http_info(event_input)
116
+ > <Array(<Event>, Integer, Hash)> create_event_with_http_info(event_input)
116
117
 
117
118
  ```ruby
118
119
  begin
@@ -120,7 +121,7 @@ begin
120
121
  data, status_code, headers = api_instance.create_event_with_http_info(event_input)
121
122
  p status_code # => 2xx
122
123
  p headers # => { ... }
123
- p data # => nil
124
+ p data # => <Event>
124
125
  rescue LagoAPI::ApiError => e
125
126
  puts "Error when calling EventsApi->create_event_with_http_info: #{e}"
126
127
  end
@@ -134,7 +135,7 @@ end
134
135
 
135
136
  ### Return type
136
137
 
137
- nil (empty response body)
138
+ [**Event**](Event.md)
138
139
 
139
140
  ### Authorization
140
141
 
data/docs/FeeObject.md CHANGED
@@ -13,11 +13,13 @@
13
13
  | **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (&#x60;pay_in_advance&#x60; is set to true). | [optional] |
14
14
  | **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (&#x60;pay_in_advance&#x60; is set to true). | [optional] |
15
15
  | **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (&#x60;pay_in_advance&#x60; is set to true). | [optional] |
16
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
16
17
  | **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | |
17
18
  | **amount_currency** | [**Currency**](Currency.md) | | |
18
19
  | **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
19
20
  | **taxes_rate** | **Float** | The tax rate associated with this specific fee. | |
20
21
  | **units** | **String** | The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer. | |
22
+ | **precise_unit_amount** | **String** | The unit amount of the fee per unit, with precision. | |
21
23
  | **total_amount_cents** | **Integer** | The cost of this specific fee, including any applicable taxes. | |
22
24
  | **total_amount_currency** | [**Currency**](Currency.md) | | |
23
25
  | **events_count** | **Integer** | The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process. | [optional] |
@@ -49,11 +51,13 @@ instance = LagoAPI::FeeObject.new(
49
51
  lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
50
52
  external_customer_id: external_id,
51
53
  external_subscription_id: external_id,
54
+ invoice_display_name: Setup Fee (SF1),
52
55
  amount_cents: 100,
53
56
  amount_currency: null,
54
57
  taxes_amount_cents: 20,
55
58
  taxes_rate: 20,
56
59
  units: 0.32,
60
+ precise_unit_amount: 312.5,
57
61
  total_amount_cents: 120,
58
62
  total_amount_currency: null,
59
63
  events_count: 23,
@@ -7,6 +7,8 @@
7
7
  | **type** | **String** | The fee type. Possible values are &#x60;add-on&#x60;, &#x60;charge&#x60;, &#x60;credit&#x60; or &#x60;subscription&#x60;. | |
8
8
  | **code** | **String** | The code of the fee item. It can be the code of the &#x60;add-o&#x60;n, the code of the &#x60;charge&#x60;, the code of the &#x60;credit&#x60; or the code of the &#x60;subscription&#x60;. | |
9
9
  | **name** | **String** | The name of the fee item. It can be the name of the &#x60;add-on&#x60;, the name of the &#x60;charge&#x60;, the name of the &#x60;credit&#x60; or the name of the &#x60;subscription&#x60;. | |
10
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
11
+ | **group_invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
10
12
  | **lago_item_id** | **String** | Unique identifier of the fee item, created by Lago. It can be the identifier of the &#x60;add-on&#x60;, the identifier of the &#x60;charge&#x60;, the identifier of the &#x60;credit&#x60; or the identifier of the &#x60;subscription&#x60;. | |
11
13
  | **item_type** | **String** | The type of the fee item. Possible values are &#x60;AddOn&#x60;, &#x60;BillableMetric&#x60;, &#x60;WalletTransaction&#x60; or &#x60;Subscription&#x60;. | |
12
14
 
@@ -19,6 +21,8 @@ instance = LagoAPI::FeeObjectItem.new(
19
21
  type: subscription,
20
22
  code: startup,
21
23
  name: Startup,
24
+ invoice_display_name: Setup Fee (SF1),
25
+ group_invoice_display_name: Transactions - ACH,
22
26
  lago_item_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
23
27
  item_type: Subscription
24
28
  )
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **group_id** | **String** | Unique identifier of a billable metric group, created by Lago. | |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual group will be used as the default display name. | [optional] |
8
9
  | **values** | [**GroupPropertiesObjectValues**](GroupPropertiesObjectValues.md) | | |
9
10
 
10
11
  ## Example
@@ -14,6 +15,7 @@ require 'lago_ruby'
14
15
 
15
16
  instance = LagoAPI::GroupPropertiesObject.new(
16
17
  group_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
18
+ invoice_display_name: AWS,
17
19
  values: null
18
20
  )
19
21
  ```
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **add_on_code** | **String** | The code of the add-on used as invoice item. | |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
8
9
  | **unit_amount_cents** | **Integer** | The amount of the fee per unit, expressed in cents. By default, the amount of the add-on is used. | [optional] |
9
10
  | **units** | **String** | The quantity of units associated with the fee. By default, only 1 unit is added to the invoice. | [optional] |
10
11
  | **description** | **String** | This is a description | [optional] |
@@ -17,6 +18,7 @@ require 'lago_ruby'
17
18
 
18
19
  instance = LagoAPI::InvoiceOneOffCreateInputInvoiceFeesInner.new(
19
20
  add_on_code: setup_fee,
21
+ invoice_display_name: Setup Fee (SF1),
20
22
  unit_amount_cents: 12000,
21
23
  units: 2.5,
22
24
  description: The description of the fee line item in the invoice. By default, the description of the add-on is used.,
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name of the plan. | [optional] |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. | [optional] |
8
9
  | **code** | **String** | The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance. | [optional] |
9
10
  | **interval** | **String** | The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: &#x60;yearly&#x60;, &#x60;quarterly&#x60;, &#x60;monthly&#x60;, or &#x60;weekly&#x60;. | [optional] |
10
11
  | **description** | **String** | The description on the plan. | [optional] |
@@ -23,6 +24,7 @@ require 'lago_ruby'
23
24
 
24
25
  instance = LagoAPI::PlanCreateInputPlan.new(
25
26
  name: Startup,
27
+ invoice_display_name: Startup plan,
26
28
  code: startup,
27
29
  interval: monthly,
28
30
  description: Plan for early stage startups.,
@@ -32,7 +34,7 @@ instance = LagoAPI::PlanCreateInputPlan.new(
32
34
  pay_in_advance: true,
33
35
  bill_charges_monthly: null,
34
36
  tax_codes: [&quot;french_standard_vat&quot;],
35
- charges: [{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;charge_model&quot;:&quot;package&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:3000,&quot;properties&quot;:{&quot;amount&quot;:&quot;30&quot;,&quot;free_units&quot;:100,&quot;package_size&quot;:1000},&quot;group_properties&quot;:[],&quot;tax_codes&quot;:[&quot;french_standard_vat&quot;]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;charge_model&quot;:&quot;graduated&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;graduated_ranges&quot;:[{&quot;to_value&quot;:10,&quot;from_value&quot;:0,&quot;flat_amount&quot;:&quot;10&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;},{&quot;to_value&quot;:null,&quot;from_value&quot;:11,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.4&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;charge_model&quot;:&quot;standard&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{},&quot;group_properties&quot;:[{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a01&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;10&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a02&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;5&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a03&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;8&quot;}}]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;charge_model&quot;:&quot;volume&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;volume_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:100,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0&quot;},{&quot;from_value&quot;:101,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;charge_model&quot;:&quot;percentage&quot;,&quot;invoiceable&quot;:false,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;rate&quot;:&quot;1&quot;,&quot;fixed_amount&quot;:&quot;0.5&quot;,&quot;free_units_per_events&quot;:5,&quot;free_units_per_total_aggregation&quot;:&quot;500&quot;},&quot;group_properties&quot;:[]}]
37
+ charges: [{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;charge_model&quot;:&quot;package&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:3000,&quot;properties&quot;:{&quot;amount&quot;:&quot;30&quot;,&quot;free_units&quot;:100,&quot;package_size&quot;:1000},&quot;group_properties&quot;:[],&quot;tax_codes&quot;:[&quot;french_standard_vat&quot;]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;charge_model&quot;:&quot;graduated&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;graduated_ranges&quot;:[{&quot;to_value&quot;:10,&quot;from_value&quot;:0,&quot;flat_amount&quot;:&quot;10&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;},{&quot;to_value&quot;:null,&quot;from_value&quot;:11,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.4&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;charge_model&quot;:&quot;standard&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{},&quot;group_properties&quot;:[{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a01&quot;,&quot;invoice_display_name&quot;:&quot;Europe&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;10&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a02&quot;,&quot;invoice_display_name&quot;:&quot;USA&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;5&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a03&quot;,&quot;invoice_display_name&quot;:&quot;Africa&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;8&quot;}}]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;charge_model&quot;:&quot;volume&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;volume_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:100,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0&quot;},{&quot;from_value&quot;:101,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;charge_model&quot;:&quot;percentage&quot;,&quot;invoiceable&quot;:false,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;rate&quot;:&quot;1&quot;,&quot;fixed_amount&quot;:&quot;0.5&quot;,&quot;free_units_per_events&quot;:5,&quot;free_units_per_total_aggregation&quot;:&quot;500&quot;},&quot;group_properties&quot;:[]}]
36
38
  )
37
39
  ```
38
40
 
@@ -8,6 +8,7 @@
8
8
  | **charge_model** | **String** | Specifies the pricing model used for the calculation of the final fee. It can be &#x60;standard&#x60;, &#x60;graduated&#x60;, &#x60;graduated_percentage&#x60; &#x60;package&#x60;, &#x60;percentage&#x60; or &#x60;volume&#x60;. | [optional] |
9
9
  | **pay_in_advance** | **Boolean** | This field determines the billing timing for this specific usage-based charge. When set to &#x60;true&#x60;, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period. | [optional] |
10
10
  | **invoiceable** | **Boolean** | This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to &#x60;false&#x60; when &#x60;pay_in_advance&#x60; is &#x60;true&#x60;. | [optional] |
11
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
11
12
  | **prorated** | **Boolean** | Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully. - If set to &#x60;true&#x60;, the charge is prorated based on the remaining days in the current billing period. - If set to &#x60;false&#x60;, the charge is billed in full. - If not defined in the request, default value is &#x60;false&#x60;. | [optional] |
12
13
  | **min_amount_cents** | **Integer** | The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period. | [optional] |
13
14
  | **properties** | [**ChargeObjectProperties**](ChargeObjectProperties.md) | | [optional] |
@@ -24,6 +25,7 @@ instance = LagoAPI::PlanCreateInputPlanChargesInner.new(
24
25
  charge_model: standard,
25
26
  pay_in_advance: false,
26
27
  invoiceable: true,
28
+ invoice_display_name: Setup,
27
29
  prorated: false,
28
30
  min_amount_cents: 0,
29
31
  properties: null,
data/docs/PlanObject.md CHANGED
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **lago_id** | **String** | Unique identifier of the plan created by Lago. | |
8
8
  | **name** | **String** | The name of the plan. | |
9
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. | [optional] |
9
10
  | **created_at** | **Time** | The date and time when the plan was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the plan was initially created. | |
10
11
  | **code** | **String** | The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance. | |
11
12
  | **interval** | **String** | The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: &#x60;yearly&#x60;, &#x60;quarterly&#x60;, &#x60;monthly&#x60; or &#x60;weekly&#x60;. | |
@@ -28,6 +29,7 @@ require 'lago_ruby'
28
29
  instance = LagoAPI::PlanObject.new(
29
30
  lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
30
31
  name: Startup,
32
+ invoice_display_name: Startup plan,
31
33
  created_at: 2023-06-27T19:43:42Z,
32
34
  code: startup,
33
35
  interval: monthly,
@@ -39,7 +41,7 @@ instance = LagoAPI::PlanObject.new(
39
41
  bill_charges_monthly: null,
40
42
  active_subscriptions_count: 0,
41
43
  draft_invoices_count: 0,
42
- charges: [{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;billable_metric_code&quot;:&quot;requests&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;package&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:3000,&quot;properties&quot;:{&quot;amount&quot;:&quot;30&quot;,&quot;free_units&quot;:100,&quot;package_size&quot;:1000},&quot;group_properties&quot;:[]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;billable_metric_code&quot;:&quot;cpu&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;graduated&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;graduated_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:10,&quot;flat_amount&quot;:&quot;10&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;},{&quot;from_value&quot;:11,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.4&quot;}]},&quot;group_properties&quot;:[]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;billable_metric_code&quot;:&quot;seats&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;standard&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{},&quot;group_properties&quot;:[{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a01&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;10&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a02&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;5&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a03&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;8&quot;}}]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;billable_metric_code&quot;:&quot;storage&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;volume&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;volume_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:100,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0&quot;},{&quot;from_value&quot;:101,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;}]},&quot;group_properties&quot;:[]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;billable_metric_code&quot;:&quot;payments&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;percentage&quot;,&quot;invoiceable&quot;:false,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;rate&quot;:&quot;1&quot;,&quot;fixed_amount&quot;:&quot;0.5&quot;,&quot;free_units_per_events&quot;:5,&quot;free_units_per_total_aggregation&quot;:&quot;500&quot;},&quot;group_properties&quot;:[]}],
44
+ charges: [{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;billable_metric_code&quot;:&quot;requests&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;package&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:3000,&quot;properties&quot;:{&quot;amount&quot;:&quot;30&quot;,&quot;free_units&quot;:100,&quot;package_size&quot;:1000},&quot;group_properties&quot;:[]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;billable_metric_code&quot;:&quot;cpu&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;graduated&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;graduated_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:10,&quot;flat_amount&quot;:&quot;10&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;},{&quot;from_value&quot;:11,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.4&quot;}]},&quot;group_properties&quot;:[]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;billable_metric_code&quot;:&quot;seats&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;standard&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{},&quot;group_properties&quot;:[{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a01&quot;,&quot;invoice_display_name&quot;:&quot;Europe&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;10&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a02&quot;,&quot;invoice_display_name&quot;:&quot;USA&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;5&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a03&quot;,&quot;invoice_display_name&quot;:&quot;Africa&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;8&quot;}}]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;billable_metric_code&quot;:&quot;storage&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;volume&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;volume_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:100,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0&quot;},{&quot;from_value&quot;:101,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;}]},&quot;group_properties&quot;:[]},{&quot;lago_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;lago_billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;billable_metric_code&quot;:&quot;payments&quot;,&quot;created_at&quot;:&quot;2023-06-27T19:43:42Z&quot;,&quot;charge_model&quot;:&quot;percentage&quot;,&quot;invoiceable&quot;:false,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;rate&quot;:&quot;1&quot;,&quot;fixed_amount&quot;:&quot;0.5&quot;,&quot;free_units_per_events&quot;:5,&quot;free_units_per_total_aggregation&quot;:&quot;500&quot;},&quot;group_properties&quot;:[]}],
43
45
  taxes: null
44
46
  )
45
47
  ```
@@ -0,0 +1,32 @@
1
+ # LagoAPI::PlanOverridesObject
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount_cents** | **Integer** | The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. | [optional] |
8
+ | **amount_currency** | [**Currency**](Currency.md) | | [optional] |
9
+ | **description** | **String** | The description on the plan. | [optional] |
10
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. | [optional] |
11
+ | **name** | **String** | The name of the plan. | [optional] |
12
+ | **tax_codes** | **Array&lt;String&gt;** | List of unique code used to identify the taxes. | [optional] |
13
+ | **trial_period** | **Float** | The duration in days during which the base cost of the plan is offered for free. | [optional] |
14
+ | **charges** | [**Array&lt;PlanOverridesObjectChargesInner&gt;**](PlanOverridesObjectChargesInner.md) | Additional usage-based charges for this plan. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'lago_ruby'
20
+
21
+ instance = LagoAPI::PlanOverridesObject.new(
22
+ amount_cents: 10000,
23
+ amount_currency: null,
24
+ description: Plan for early stage startups.,
25
+ invoice_display_name: Startup plan,
26
+ name: Startup,
27
+ tax_codes: [&quot;french_standard_vat&quot;],
28
+ trial_period: 5,
29
+ charges: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,28 @@
1
+ # LagoAPI::PlanOverridesObjectChargesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Unique identifier of the charge created by Lago. | [optional] |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
9
+ | **min_amount_cents** | **Integer** | The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period. | [optional] |
10
+ | **properties** | [**ChargeObjectProperties**](ChargeObjectProperties.md) | | [optional] |
11
+ | **group_properties** | [**Array&lt;PlanCreateInputPlanChargesInnerGroupPropertiesInner&gt;**](PlanCreateInputPlanChargesInnerGroupPropertiesInner.md) | All charge information, sorted by groups. | [optional] |
12
+ | **tax_codes** | **Array&lt;String&gt;** | List of unique code used to identify the taxes. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'lago_ruby'
18
+
19
+ instance = LagoAPI::PlanOverridesObjectChargesInner.new(
20
+ id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
21
+ invoice_display_name: Setup,
22
+ min_amount_cents: 0,
23
+ properties: null,
24
+ group_properties: null,
25
+ tax_codes: [&quot;french_standard_vat&quot;]
26
+ )
27
+ ```
28
+
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name of the plan. | [optional] |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. | [optional] |
8
9
  | **code** | **String** | The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance. | [optional] |
9
10
  | **interval** | **String** | The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: &#x60;yearly&#x60;, &#x60;quarterly&#x60;, &#x60;monthly&#x60;, or &#x60;weekly&#x60;. | [optional] |
10
11
  | **description** | **String** | The description on the plan. | [optional] |
@@ -23,6 +24,7 @@ require 'lago_ruby'
23
24
 
24
25
  instance = LagoAPI::PlanUpdateInputPlan.new(
25
26
  name: Startup,
27
+ invoice_display_name: Startup plan,
26
28
  code: startup,
27
29
  interval: monthly,
28
30
  description: Plan for early stage startups.,
@@ -32,7 +34,7 @@ instance = LagoAPI::PlanUpdateInputPlan.new(
32
34
  pay_in_advance: true,
33
35
  bill_charges_monthly: null,
34
36
  tax_codes: [&quot;french_standard_vat&quot;],
35
- charges: [{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;charge_model&quot;:&quot;package&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:3000,&quot;properties&quot;:{&quot;amount&quot;:&quot;30&quot;,&quot;free_units&quot;:100,&quot;package_size&quot;:1000},&quot;group_properties&quot;:[],&quot;tax_codes&quot;:[&quot;french_standard_vat&quot;]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;charge_model&quot;:&quot;graduated&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;graduated_ranges&quot;:[{&quot;to_value&quot;:10,&quot;from_value&quot;:0,&quot;flat_amount&quot;:&quot;10&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;},{&quot;to_value&quot;:null,&quot;from_value&quot;:11,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.4&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;charge_model&quot;:&quot;standard&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{},&quot;group_properties&quot;:[{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a01&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;10&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a02&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;5&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a03&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;8&quot;}}]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;charge_model&quot;:&quot;volume&quot;,&quot;invoiceable&quot;:true,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;volume_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:100,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0&quot;},{&quot;from_value&quot;:101,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;charge_model&quot;:&quot;percentage&quot;,&quot;invoiceable&quot;:false,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;rate&quot;:&quot;1&quot;,&quot;fixed_amount&quot;:&quot;0.5&quot;,&quot;free_units_per_events&quot;:5,&quot;free_units_per_total_aggregation&quot;:&quot;500&quot;},&quot;group_properties&quot;:[]}]
37
+ charges: [{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;charge_model&quot;:&quot;package&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:3000,&quot;properties&quot;:{&quot;amount&quot;:&quot;30&quot;,&quot;free_units&quot;:100,&quot;package_size&quot;:1000},&quot;group_properties&quot;:[],&quot;tax_codes&quot;:[&quot;french_standard_vat&quot;]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a92&quot;,&quot;charge_model&quot;:&quot;graduated&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;graduated_ranges&quot;:[{&quot;to_value&quot;:10,&quot;from_value&quot;:0,&quot;flat_amount&quot;:&quot;10&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;},{&quot;to_value&quot;:null,&quot;from_value&quot;:11,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.4&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a93&quot;,&quot;charge_model&quot;:&quot;standard&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{},&quot;group_properties&quot;:[{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a01&quot;,&quot;invoice_display_name&quot;:&quot;Europe&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;10&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a02&quot;,&quot;invoice_display_name&quot;:&quot;USA&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;5&quot;}},{&quot;group_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a03&quot;,&quot;invoice_display_name&quot;:&quot;Africa&quot;,&quot;values&quot;:{&quot;amount&quot;:&quot;8&quot;}}]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a94&quot;,&quot;charge_model&quot;:&quot;volume&quot;,&quot;invoiceable&quot;:true,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:false,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;volume_ranges&quot;:[{&quot;from_value&quot;:0,&quot;to_value&quot;:100,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0&quot;},{&quot;from_value&quot;:101,&quot;to_value&quot;:null,&quot;flat_amount&quot;:&quot;0&quot;,&quot;per_unit_amount&quot;:&quot;0.5&quot;}]},&quot;group_properties&quot;:[]},{&quot;billable_metric_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a95&quot;,&quot;charge_model&quot;:&quot;percentage&quot;,&quot;invoiceable&quot;:false,&quot;invoice_display_name&quot;:&quot;Setup&quot;,&quot;pay_in_advance&quot;:true,&quot;prorated&quot;:false,&quot;min_amount_cents&quot;:0,&quot;properties&quot;:{&quot;rate&quot;:&quot;1&quot;,&quot;fixed_amount&quot;:&quot;0.5&quot;,&quot;free_units_per_events&quot;:5,&quot;free_units_per_total_aggregation&quot;:&quot;500&quot;},&quot;group_properties&quot;:[]}]
36
38
  )
37
39
  ```
38
40
 
@@ -9,6 +9,7 @@
9
9
  | **charge_model** | **String** | Specifies the pricing model used for the calculation of the final fee. It can be &#x60;standard&#x60;, &#x60;graduated&#x60;, &#x60;graduated_percentage&#x60;, &#x60;package&#x60;, &#x60;percentage&#x60; or &#x60;volume&#x60;. | [optional] |
10
10
  | **pay_in_advance** | **Boolean** | This field determines the billing timing for this specific usage-based charge. When set to &#x60;true&#x60;, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period. | [optional] |
11
11
  | **invoiceable** | **Boolean** | This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to &#x60;false&#x60; when &#x60;pay_in_advance&#x60; is &#x60;true&#x60;. | [optional] |
12
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
12
13
  | **prorated** | **Boolean** | Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully. - If set to &#x60;true&#x60;, the charge is prorated based on the remaining days in the current billing period. - If set to &#x60;false&#x60;, the charge is billed in full. - If not defined in the request, default value is &#x60;false&#x60;. | [optional] |
13
14
  | **min_amount_cents** | **Integer** | The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period. | [optional] |
14
15
  | **properties** | [**ChargeObjectProperties**](ChargeObjectProperties.md) | | [optional] |
@@ -26,6 +27,7 @@ instance = LagoAPI::PlanUpdateInputPlanChargesInner.new(
26
27
  charge_model: standard,
27
28
  pay_in_advance: false,
28
29
  invoiceable: true,
30
+ invoice_display_name: Setup,
29
31
  prorated: false,
30
32
  min_amount_cents: 0,
31
33
  properties: null,
data/docs/Subscription.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | |
7
+ | **subscription** | [**SubscriptionObjectExtended**](SubscriptionObjectExtended.md) | | |
8
8
 
9
9
  ## Example
10
10
 
@@ -11,6 +11,7 @@
11
11
  | **billing_time** | **String** | The billing time for the subscription, which can be set as either &#x60;anniversary&#x60; or &#x60;calendar&#x60;. If not explicitly provided, it will default to &#x60;calendar&#x60;. The billing time determines the timing of recurring billing cycles for the subscription. By specifying &#x60;anniversary&#x60;, the billing cycle will be based on the specific date the subscription started (billed fully), while &#x60;calendar&#x60; 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&#39;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 &#x60;anniversary&#x60; or &#x60;calendar&#x60;. If not explicitly provided, it will default to &#x60;calendar&#x60;. The billing time determines the timing of recurring billing cycles for the subscription. By specifying &#x60;anniversary&#x60;, the billing cycle will be based on the specific date the subscription started (billed fully), while &#x60;calendar&#x60; 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&#39;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 &#x60;code&#x60; property of one of the active plans. | |
14
+ | **status** | **String** | The status of the subscription, which can have the following values: - &#x60;pending&#x60;: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period. - &#x60;active&#x60;: the subscription is currently active and applied to the customer. - &#x60;terminated&#x60;: the subscription is no longer active. - &#x60;canceled&#x60;: 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 &#x60;canceled&#x60;. 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 &#x60;pending&#x60; or &#x60;canceled&#x60;. 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 &#x60;anniversary&#x60; billing time. The &#x60;anniversary_date&#x60; 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 &#x60;terminated&#x60;. 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&#39;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