lago_ruby 0.49.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 (230) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +16 -6
  4. data/docs/CreditNoteCreateInputCreditNote.md +1 -1
  5. data/docs/CreditNoteEstimateInput.md +18 -0
  6. data/docs/CreditNoteEstimateInputCreditNote.md +20 -0
  7. data/docs/CreditNoteEstimateInputCreditNoteItemsInner.md +20 -0
  8. data/docs/CreditNoteEstimated.md +18 -0
  9. data/docs/CreditNoteEstimatedEstimatedCreditNote.md +38 -0
  10. data/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +32 -0
  11. data/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md +20 -0
  12. data/docs/CreditNoteItemObjectFee.md +2 -0
  13. data/docs/CreditNoteObject.md +2 -2
  14. data/docs/CreditNotesApi.md +72 -0
  15. data/docs/EventsApi.md +7 -6
  16. data/docs/FeeObject.md +2 -0
  17. data/docs/FeeObjectItem.md +2 -0
  18. data/docs/PlanOverridesObject.md +32 -0
  19. data/docs/PlanOverridesObjectChargesInner.md +28 -0
  20. data/docs/Subscription.md +1 -1
  21. data/docs/SubscriptionCreateInputSubscription.md +3 -1
  22. data/docs/SubscriptionObjectExtended.md +52 -0
  23. data/docs/SubscriptionUpdateInputSubscription.md +3 -1
  24. data/lago_ruby.gemspec +1 -1
  25. data/lib/lago_ruby/api/add_ons_api.rb +1 -1
  26. data/lib/lago_ruby/api/billable_metrics_api.rb +1 -1
  27. data/lib/lago_ruby/api/coupons_api.rb +1 -1
  28. data/lib/lago_ruby/api/credit_notes_api.rb +65 -1
  29. data/lib/lago_ruby/api/customers_api.rb +1 -1
  30. data/lib/lago_ruby/api/events_api.rb +6 -6
  31. data/lib/lago_ruby/api/fees_api.rb +1 -1
  32. data/lib/lago_ruby/api/invoices_api.rb +1 -1
  33. data/lib/lago_ruby/api/organizations_api.rb +1 -1
  34. data/lib/lago_ruby/api/plans_api.rb +1 -1
  35. data/lib/lago_ruby/api/subscriptions_api.rb +1 -1
  36. data/lib/lago_ruby/api/taxes_api.rb +1 -1
  37. data/lib/lago_ruby/api/wallets_api.rb +1 -1
  38. data/lib/lago_ruby/api/webhook_endpoints_api.rb +1 -1
  39. data/lib/lago_ruby/api/webhooks_api.rb +1 -1
  40. data/lib/lago_ruby/api_client.rb +11 -12
  41. data/lib/lago_ruby/api_error.rb +1 -1
  42. data/lib/lago_ruby/configuration.rb +1 -1
  43. data/lib/lago_ruby/models/add_on.rb +2 -2
  44. data/lib/lago_ruby/models/add_on_base_input.rb +2 -2
  45. data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
  46. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +2 -2
  47. data/lib/lago_ruby/models/add_on_object.rb +2 -2
  48. data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
  49. data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
  50. data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
  51. data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
  52. data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
  53. data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
  54. data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
  55. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
  56. data/lib/lago_ruby/models/applied_coupon.rb +2 -2
  57. data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
  58. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
  59. data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
  60. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
  61. data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
  62. data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
  63. data/lib/lago_ruby/models/billable_metric.rb +2 -2
  64. data/lib/lago_ruby/models/billable_metric_base_input.rb +2 -2
  65. data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
  66. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +2 -2
  67. data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
  68. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +1 -1
  69. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
  70. data/lib/lago_ruby/models/billable_metric_object.rb +2 -2
  71. data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
  72. data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
  73. data/lib/lago_ruby/models/charge_object.rb +2 -2
  74. data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
  75. data/lib/lago_ruby/models/charge_properties.rb +2 -2
  76. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
  77. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
  78. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
  79. data/lib/lago_ruby/models/country.rb +1 -1
  80. data/lib/lago_ruby/models/coupon.rb +2 -2
  81. data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
  82. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
  83. data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
  84. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
  85. data/lib/lago_ruby/models/coupon_object.rb +2 -2
  86. data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
  87. data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
  88. data/lib/lago_ruby/models/credit_note.rb +2 -2
  89. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
  90. data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
  91. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +3 -3
  92. data/lib/lago_ruby/models/credit_note_estimate_input.rb +221 -0
  93. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +241 -0
  94. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +239 -0
  95. data/lib/lago_ruby/models/credit_note_estimated.rb +221 -0
  96. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +387 -0
  97. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +283 -0
  98. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +235 -0
  99. data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
  100. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +20 -3
  101. data/lib/lago_ruby/models/credit_note_object.rb +13 -13
  102. data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
  103. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
  104. data/lib/lago_ruby/models/credit_notes.rb +2 -2
  105. data/lib/lago_ruby/models/credit_object.rb +2 -2
  106. data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
  107. data/lib/lago_ruby/models/credit_object_item.rb +2 -2
  108. data/lib/lago_ruby/models/currency.rb +1 -1
  109. data/lib/lago_ruby/models/customer.rb +2 -2
  110. data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
  111. data/lib/lago_ruby/models/customer_charge_usage_object.rb +2 -2
  112. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
  113. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
  114. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +2 -2
  115. data/lib/lago_ruby/models/customer_create_input.rb +2 -2
  116. data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
  117. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
  118. data/lib/lago_ruby/models/customer_metadata.rb +2 -2
  119. data/lib/lago_ruby/models/customer_object.rb +2 -2
  120. data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
  121. data/lib/lago_ruby/models/customer_past_usage.rb +2 -2
  122. data/lib/lago_ruby/models/customer_usage.rb +2 -2
  123. data/lib/lago_ruby/models/customer_usage_object.rb +2 -2
  124. data/lib/lago_ruby/models/customers_paginated.rb +2 -2
  125. data/lib/lago_ruby/models/event.rb +2 -2
  126. data/lib/lago_ruby/models/event_batch_input.rb +2 -2
  127. data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
  128. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
  129. data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
  130. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
  131. data/lib/lago_ruby/models/event_input.rb +2 -2
  132. data/lib/lago_ruby/models/event_input_event.rb +2 -2
  133. data/lib/lago_ruby/models/event_input_event_timestamp.rb +1 -1
  134. data/lib/lago_ruby/models/event_object.rb +6 -22
  135. data/lib/lago_ruby/models/event_object_properties.rb +2 -2
  136. data/lib/lago_ruby/models/fee.rb +2 -2
  137. data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
  138. data/lib/lago_ruby/models/fee_object.rb +20 -3
  139. data/lib/lago_ruby/models/fee_object_item.rb +13 -3
  140. data/lib/lago_ruby/models/fee_update_input.rb +2 -2
  141. data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
  142. data/lib/lago_ruby/models/fees.rb +2 -2
  143. data/lib/lago_ruby/models/fees_paginated.rb +2 -2
  144. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
  145. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
  146. data/lib/lago_ruby/models/group_object.rb +2 -2
  147. data/lib/lago_ruby/models/group_properties_object.rb +2 -2
  148. data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
  149. data/lib/lago_ruby/models/groups_paginated.rb +2 -2
  150. data/lib/lago_ruby/models/invoice.rb +2 -2
  151. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
  152. data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
  153. data/lib/lago_ruby/models/invoice_object.rb +2 -2
  154. data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
  155. data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
  156. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
  157. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
  158. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +2 -2
  159. data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
  160. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
  161. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
  162. data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
  163. data/lib/lago_ruby/models/organization.rb +2 -2
  164. data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
  165. data/lib/lago_ruby/models/organization_object.rb +2 -2
  166. data/lib/lago_ruby/models/organization_update_input.rb +2 -2
  167. data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
  168. data/lib/lago_ruby/models/pagination_meta.rb +2 -2
  169. data/lib/lago_ruby/models/plan.rb +2 -2
  170. data/lib/lago_ruby/models/plan_create_input.rb +2 -2
  171. data/lib/lago_ruby/models/plan_create_input_plan.rb +2 -2
  172. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +2 -2
  173. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
  174. data/lib/lago_ruby/models/plan_object.rb +2 -2
  175. data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
  176. data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +268 -0
  177. data/lib/lago_ruby/models/plan_update_input.rb +2 -2
  178. data/lib/lago_ruby/models/plan_update_input_plan.rb +2 -2
  179. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +2 -2
  180. data/lib/lago_ruby/models/plans_paginated.rb +2 -2
  181. data/lib/lago_ruby/models/subscription.rb +3 -3
  182. data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
  183. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +15 -6
  184. data/lib/lago_ruby/models/subscription_object.rb +2 -2
  185. data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
  186. data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
  187. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +15 -6
  188. data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
  189. data/lib/lago_ruby/models/tax.rb +2 -2
  190. data/lib/lago_ruby/models/tax_base_input.rb +2 -2
  191. data/lib/lago_ruby/models/tax_create_input.rb +2 -2
  192. data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
  193. data/lib/lago_ruby/models/tax_object.rb +2 -2
  194. data/lib/lago_ruby/models/tax_update_input.rb +2 -2
  195. data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
  196. data/lib/lago_ruby/models/timezone.rb +1 -1
  197. data/lib/lago_ruby/models/wallet.rb +2 -2
  198. data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
  199. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
  200. data/lib/lago_ruby/models/wallet_object.rb +2 -2
  201. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
  202. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
  203. data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
  204. data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
  205. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
  206. data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
  207. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
  208. data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
  209. data/lib/lago_ruby/models/webhook_endpoint.rb +2 -2
  210. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +2 -2
  211. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +2 -2
  212. data/lib/lago_ruby/models/webhook_endpoint_object.rb +2 -2
  213. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +2 -2
  214. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +2 -2
  215. data/lib/lago_ruby/version.rb +2 -2
  216. data/lib/lago_ruby.rb +11 -2
  217. data/spec/api_client_spec.rb +1 -1
  218. data/spec/configuration_spec.rb +1 -1
  219. 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
  220. data/spec/models/credit_note_estimate_input_credit_note_spec.rb +42 -0
  221. data/spec/models/credit_note_estimate_input_spec.rb +36 -0
  222. data/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb +78 -0
  223. data/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb +42 -0
  224. data/spec/models/credit_note_estimated_estimated_credit_note_spec.rb +96 -0
  225. data/spec/models/credit_note_estimated_spec.rb +36 -0
  226. data/spec/models/plan_overrides_object_charges_inner_spec.rb +66 -0
  227. data/spec/models/plan_overrides_object_spec.rb +78 -0
  228. data/spec/models/subscription_object_extended_spec.rb +146 -0
  229. data/spec/spec_helper.rb +1 -1
  230. metadata +197 -159
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23e57e890bfe8c0b19773bcb8eb4923fc46a1aa0abb5787074fda52d7fdd344b
4
- data.tar.gz: 3ff0bd599f9260095aa49eacc114b4f2570532142033ab1273213de4fb21aabb
3
+ metadata.gz: 8ee5d8ada117e17d202e6d6387b05da9fd389b8af53af0421f884badbcd7b252
4
+ data.tar.gz: ddd36fe3358d8ebc558e6b63bc59cfe5a7f98dee008fdb2487adcc309e1cf151
5
5
  SHA512:
6
- metadata.gz: c542123cabbf5f5f652526fadeaae108f92c08eca199a1fed15749fcd4d83f75b28bc13ed30b4919dfe84f1376ff74e50221ef2435adef570484c42eb339657b
7
- data.tar.gz: e9c14cebd5062a44286c1b8fc94377d729392cd8d9bac89ee18461d5e1477a96603fb380d1f765b45081b6ca406ce755180d980de4e9be53e0c559fea82807fd
6
+ metadata.gz: ab5f789b2fde9cc7db29c750862486a78af93fe5e8d1eff22dfb4bec076daa1b29b9e73c7b8679a3c932b81c51fb799cd45641b5a8a356b8f7540aafaf260842
7
+ data.tar.gz: ad643f65be23fa1f37d4b89561cad644d3443fc9e88e07e7d114f6b339c7b03edb88c7cd78d4b3c82f2cd545a870d43bb618c6eea1afbf0f84af78aa7037fb10
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lago_ruby (0.48.0.pre.beta)
4
+ lago_ruby (0.51.0.pre.beta)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ GEM
13
13
  diff-lcs (1.5.0)
14
14
  ethon (0.16.0)
15
15
  ffi (>= 1.15.0)
16
- ffi (1.15.5)
16
+ ffi (1.16.3)
17
17
  jaro_winkler (1.5.6)
18
18
  method_source (1.0.0)
19
19
  parallel (1.23.0)
data/README.md CHANGED
@@ -6,8 +6,8 @@ Lago API allows your application to push customer information and metrics (event
6
6
 
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
- - API version: 0.49.0-beta
10
- - Package version: 0.49.0-beta
9
+ - API version: 0.51.0-beta
10
+ - Package version: 0.51.0-beta
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
 
13
13
  [![Gem Version](https://badge.fury.io/rb/lago-ruby.svg)](https://badge.fury.io/rb/lago-ruby)
@@ -26,16 +26,16 @@ gem build lago_ruby.gemspec
26
26
  Then either install the gem locally:
27
27
 
28
28
  ```shell
29
- gem install ./lago_ruby-0.49.0-beta.gem
29
+ gem install ./lago_ruby-0.51.0-beta.gem
30
30
  ```
31
31
 
32
- (for development, run `gem install --dev ./lago_ruby-0.49.0-beta.gem` to install the development dependencies)
32
+ (for development, run `gem install --dev ./lago_ruby-0.51.0-beta.gem` to install the development dependencies)
33
33
 
34
34
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
35
35
 
36
36
  Finally add this to the Gemfile:
37
37
 
38
- gem 'lago_ruby', '~> 0.49.0-beta'
38
+ gem 'lago_ruby', '~> 0.51.0-beta'
39
39
 
40
40
  ### Install from Git
41
41
 
@@ -109,6 +109,7 @@ Class | Method | HTTP request | Description
109
109
  *LagoAPI::CouponsApi* | [**update_coupon**](docs/CouponsApi.md#update_coupon) | **PUT** /coupons/{code} | Update a coupon
110
110
  *LagoAPI::CreditNotesApi* | [**create_credit_note**](docs/CreditNotesApi.md#create_credit_note) | **POST** /credit_notes | Create a credit note
111
111
  *LagoAPI::CreditNotesApi* | [**download_credit_note**](docs/CreditNotesApi.md#download_credit_note) | **POST** /credit_notes/{lago_id}/download | Download a credit note PDF
112
+ *LagoAPI::CreditNotesApi* | [**estimate_credit_note**](docs/CreditNotesApi.md#estimate_credit_note) | **POST** /credit_notes/estimate | Estimate amounts for a new credit note
112
113
  *LagoAPI::CreditNotesApi* | [**find_all_credit_notes**](docs/CreditNotesApi.md#find_all_credit_notes) | **GET** /credit_notes | List all credit notes
113
114
  *LagoAPI::CreditNotesApi* | [**find_credit_note**](docs/CreditNotesApi.md#find_credit_note) | **GET** /credit_notes/{lago_id} | Retrieve a credit note
114
115
  *LagoAPI::CreditNotesApi* | [**update_credit_note**](docs/CreditNotesApi.md#update_credit_note) | **PUT** /credit_notes/{lago_id} | Update a credit note
@@ -218,7 +219,13 @@ Class | Method | HTTP request | Description
218
219
  - [LagoAPI::CreditNoteAppliedTaxObject](docs/CreditNoteAppliedTaxObject.md)
219
220
  - [LagoAPI::CreditNoteCreateInput](docs/CreditNoteCreateInput.md)
220
221
  - [LagoAPI::CreditNoteCreateInputCreditNote](docs/CreditNoteCreateInputCreditNote.md)
221
- - [LagoAPI::CreditNoteCreateInputCreditNoteItemsInner](docs/CreditNoteCreateInputCreditNoteItemsInner.md)
222
+ - [LagoAPI::CreditNoteEstimateInput](docs/CreditNoteEstimateInput.md)
223
+ - [LagoAPI::CreditNoteEstimateInputCreditNote](docs/CreditNoteEstimateInputCreditNote.md)
224
+ - [LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner](docs/CreditNoteEstimateInputCreditNoteItemsInner.md)
225
+ - [LagoAPI::CreditNoteEstimated](docs/CreditNoteEstimated.md)
226
+ - [LagoAPI::CreditNoteEstimatedEstimatedCreditNote](docs/CreditNoteEstimatedEstimatedCreditNote.md)
227
+ - [LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner](docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md)
228
+ - [LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner](docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md)
222
229
  - [LagoAPI::CreditNoteItemObject](docs/CreditNoteItemObject.md)
223
230
  - [LagoAPI::CreditNoteItemObjectFee](docs/CreditNoteItemObjectFee.md)
224
231
  - [LagoAPI::CreditNoteObject](docs/CreditNoteObject.md)
@@ -295,6 +302,8 @@ Class | Method | HTTP request | Description
295
302
  - [LagoAPI::PlanCreateInputPlanChargesInner](docs/PlanCreateInputPlanChargesInner.md)
296
303
  - [LagoAPI::PlanCreateInputPlanChargesInnerGroupPropertiesInner](docs/PlanCreateInputPlanChargesInnerGroupPropertiesInner.md)
297
304
  - [LagoAPI::PlanObject](docs/PlanObject.md)
305
+ - [LagoAPI::PlanOverridesObject](docs/PlanOverridesObject.md)
306
+ - [LagoAPI::PlanOverridesObjectChargesInner](docs/PlanOverridesObjectChargesInner.md)
298
307
  - [LagoAPI::PlanUpdateInput](docs/PlanUpdateInput.md)
299
308
  - [LagoAPI::PlanUpdateInputPlan](docs/PlanUpdateInputPlan.md)
300
309
  - [LagoAPI::PlanUpdateInputPlanChargesInner](docs/PlanUpdateInputPlanChargesInner.md)
@@ -303,6 +312,7 @@ Class | Method | HTTP request | Description
303
312
  - [LagoAPI::SubscriptionCreateInput](docs/SubscriptionCreateInput.md)
304
313
  - [LagoAPI::SubscriptionCreateInputSubscription](docs/SubscriptionCreateInputSubscription.md)
305
314
  - [LagoAPI::SubscriptionObject](docs/SubscriptionObject.md)
315
+ - [LagoAPI::SubscriptionObjectExtended](docs/SubscriptionObjectExtended.md)
306
316
  - [LagoAPI::SubscriptionUpdateInput](docs/SubscriptionUpdateInput.md)
307
317
  - [LagoAPI::SubscriptionUpdateInputSubscription](docs/SubscriptionUpdateInputSubscription.md)
308
318
  - [LagoAPI::SubscriptionsPaginated](docs/SubscriptionsPaginated.md)
@@ -9,7 +9,7 @@
9
9
  | **description** | **String** | The description of the credit note. | [optional] |
10
10
  | **credit_amount_cents** | **Integer** | The total amount to be credited on the customer balance. | [optional] |
11
11
  | **refund_amount_cents** | **Integer** | The total amount to be refunded to the customer. | [optional] |
12
- | **items** | [**Array<CreditNoteCreateInputCreditNoteItemsInner>**](CreditNoteCreateInputCreditNoteItemsInner.md) | The list of credit note’s items. | |
12
+ | **items** | [**Array<CreditNoteEstimateInputCreditNoteItemsInner>**](CreditNoteEstimateInputCreditNoteItemsInner.md) | The list of credit note’s items. | |
13
13
 
14
14
  ## Example
15
15
 
@@ -0,0 +1,18 @@
1
+ # LagoAPI::CreditNoteEstimateInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **credit_note** | [**CreditNoteEstimateInputCreditNote**](CreditNoteEstimateInputCreditNote.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'lago_ruby'
13
+
14
+ instance = LagoAPI::CreditNoteEstimateInput.new(
15
+ credit_note: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # LagoAPI::CreditNoteEstimateInputCreditNote
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **invoice_id** | **String** | The invoice unique identifier, created by Lago. | |
8
+ | **items** | [**Array<CreditNoteEstimateInputCreditNoteItemsInner>**](CreditNoteEstimateInputCreditNoteItemsInner.md) | The list of credit note’s items. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lago_ruby'
14
+
15
+ instance = LagoAPI::CreditNoteEstimateInputCreditNote.new(
16
+ invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
17
+ items: [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **fee_id** | **String** | The fee unique identifier, created by Lago. | |
8
+ | **amount_cents** | **Integer** | The amount of the credit note item, expressed in cents. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lago_ruby'
14
+
15
+ instance = LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner.new(
16
+ fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
17
+ amount_cents: 10
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # LagoAPI::CreditNoteEstimated
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **estimated_credit_note** | [**CreditNoteEstimatedEstimatedCreditNote**](CreditNoteEstimatedEstimatedCreditNote.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'lago_ruby'
13
+
14
+ instance = LagoAPI::CreditNoteEstimated.new(
15
+ estimated_credit_note: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,38 @@
1
+ # LagoAPI::CreditNoteEstimatedEstimatedCreditNote
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **lago_invoice_id** | **String** | Unique identifier assigned to the invoice that the credit note belongs to | |
8
+ | **invoice_number** | **String** | The invoice unique number, related to the credit note. | |
9
+ | **currency** | [**Currency**](Currency.md) | | |
10
+ | **taxes_amount_cents** | **Integer** | The tax amount of the credit note, expressed in cents. | |
11
+ | **taxes_rate** | **Float** | The tax rate associated with this specific credit note. | |
12
+ | **sub_total_excluding_taxes_amount_cents** | **Integer** | The subtotal of the credit note excluding any applicable taxes, expressed in cents. | |
13
+ | **max_creditable_amount_cents** | **Integer** | The credited amount of the credit note, expressed in cents. | |
14
+ | **max_refundable_amount_cents** | **Integer** | The refunded amount of the credit note, expressed in cents. | |
15
+ | **coupons_adjustment_amount_cents** | **Integer** | The pro-rated amount of the coupons applied to the source invoice. | |
16
+ | **items** | [**Array<CreditNoteEstimatedEstimatedCreditNoteItemsInner>**](CreditNoteEstimatedEstimatedCreditNoteItemsInner.md) | Array of credit note’s items. | |
17
+ | **applied_taxes** | [**Array<CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner>**](CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md) | | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'lago_ruby'
23
+
24
+ instance = LagoAPI::CreditNoteEstimatedEstimatedCreditNote.new(
25
+ lago_invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
26
+ invoice_number: LAG-1234,
27
+ currency: null,
28
+ taxes_amount_cents: 20,
29
+ taxes_rate: 20,
30
+ sub_total_excluding_taxes_amount_cents: 100,
31
+ max_creditable_amount_cents: 100,
32
+ max_refundable_amount_cents: 0,
33
+ coupons_adjustment_amount_cents: 20,
34
+ items: null,
35
+ applied_taxes: null
36
+ )
37
+ ```
38
+
@@ -0,0 +1,32 @@
1
+ # LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **lago_tax_id** | **String** | Unique identifier of the tax, created by Lago. | [optional] |
8
+ | **tax_name** | **String** | Name of the tax. | [optional] |
9
+ | **tax_code** | **String** | Unique code used to identify the tax associated with the API request. | [optional] |
10
+ | **tax_rate** | **Float** | The percentage rate of the tax | [optional] |
11
+ | **tax_description** | **String** | Internal description of the taxe | [optional] |
12
+ | **base_amount_cents** | **Integer** | | [optional] |
13
+ | **amount_cents** | **Integer** | Amount of the tax | [optional] |
14
+ | **amount_currency** | [**Currency**](Currency.md) | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'lago_ruby'
20
+
21
+ instance = LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.new(
22
+ lago_tax_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
23
+ tax_name: TVA,
24
+ tax_code: french_standard_vat,
25
+ tax_rate: 20,
26
+ tax_description: French standard VAT,
27
+ base_amount_cents: 100,
28
+ amount_cents: 2000,
29
+ amount_currency: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,20 @@
1
+ # LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount_cents** | **Integer** | The credit note’s item amount, expressed in cents. | |
8
+ | **lago_fee_id** | **String** | Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lago_ruby'
14
+
15
+ instance = LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner.new(
16
+ amount_cents: 100,
17
+ lago_fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a90
18
+ )
19
+ ```
20
+
@@ -19,6 +19,7 @@
19
19
  | **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
20
20
  | **taxes_rate** | **Float** | The tax rate associated with this specific fee. | |
21
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. | |
22
23
  | **total_amount_cents** | **Integer** | The cost of this specific fee, including any applicable taxes. | |
23
24
  | **total_amount_currency** | [**Currency**](Currency.md) | | |
24
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] |
@@ -56,6 +57,7 @@ instance = LagoAPI::CreditNoteItemObjectFee.new(
56
57
  taxes_amount_cents: 20,
57
58
  taxes_rate: 20,
58
59
  units: 0.32,
60
+ precise_unit_amount: 312.5,
59
61
  total_amount_cents: 120,
60
62
  total_amount_currency: null,
61
63
  events_count: 23,
@@ -22,7 +22,7 @@
22
22
  | **balance_amount_cents** | **Integer** | The remaining credit note amount, expressed in cents. | |
23
23
  | **credit_amount_cents** | **Integer** | The credited amount of the credit note, expressed in cents. | |
24
24
  | **refund_amount_cents** | **Integer** | The refunded amount of the credit note, expressed in cents. | |
25
- | **coupons_adjustement_amount_cents** | **Integer** | The pro-rated amount of the coupons applied to the source invoice. | |
25
+ | **coupons_adjustment_amount_cents** | **Integer** | The pro-rated amount of the coupons applied to the source invoice. | |
26
26
  | **created_at** | **Time** | The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC). | |
27
27
  | **updated_at** | **Time** | The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC). | |
28
28
  | **file_url** | **String** | The PDF file of the credit note. | [optional] |
@@ -53,7 +53,7 @@ instance = LagoAPI::CreditNoteObject.new(
53
53
  balance_amount_cents: 100,
54
54
  credit_amount_cents: 100,
55
55
  refund_amount_cents: 0,
56
- coupons_adjustement_amount_cents: 20,
56
+ coupons_adjustment_amount_cents: 20,
57
57
  created_at: 2022-09-14T16:35:31Z,
58
58
  updated_at: 2022-09-14T16:35:31Z,
59
59
  file_url: https://getlago.com/credit_note/file,
@@ -6,6 +6,7 @@ All URIs are relative to *https://api.getlago.com/api/v1*
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**create_credit_note**](CreditNotesApi.md#create_credit_note) | **POST** /credit_notes | Create a credit note |
8
8
  | [**download_credit_note**](CreditNotesApi.md#download_credit_note) | **POST** /credit_notes/{lago_id}/download | Download a credit note PDF |
9
+ | [**estimate_credit_note**](CreditNotesApi.md#estimate_credit_note) | **POST** /credit_notes/estimate | Estimate amounts for a new credit note |
9
10
  | [**find_all_credit_notes**](CreditNotesApi.md#find_all_credit_notes) | **GET** /credit_notes | List all credit notes |
10
11
  | [**find_credit_note**](CreditNotesApi.md#find_credit_note) | **GET** /credit_notes/{lago_id} | Retrieve a credit note |
11
12
  | [**update_credit_note**](CreditNotesApi.md#update_credit_note) | **PUT** /credit_notes/{lago_id} | Update a credit note |
@@ -150,6 +151,77 @@ end
150
151
  - **Accept**: application/json
151
152
 
152
153
 
154
+ ## estimate_credit_note
155
+
156
+ > <CreditNoteEstimated> estimate_credit_note(opts)
157
+
158
+ Estimate amounts for a new credit note
159
+
160
+ This endpoint allows you to retrieve amounts for a new credit note creation.
161
+
162
+ ### Examples
163
+
164
+ ```ruby
165
+ require 'time'
166
+ require 'lago_ruby'
167
+ # setup authorization
168
+ LagoAPI.configure do |config|
169
+ # Configure Bearer authorization: bearerAuth
170
+ config.access_token = 'YOUR_BEARER_TOKEN'
171
+ end
172
+
173
+ api_instance = LagoAPI::CreditNotesApi.new
174
+ opts = {
175
+ credit_note_estimate_input: LagoAPI::CreditNoteEstimateInput.new({credit_note: LagoAPI::CreditNoteEstimateInputCreditNote.new({invoice_id: '1a901a90-1a90-1a90-1a90-1a901a901a90', items: [{"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "amount_cents": 10}, {"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a91", "amount_cents": 5}]})}) # CreditNoteEstimateInput | Credit note estimate payload
176
+ }
177
+
178
+ begin
179
+ # Estimate amounts for a new credit note
180
+ result = api_instance.estimate_credit_note(opts)
181
+ p result
182
+ rescue LagoAPI::ApiError => e
183
+ puts "Error when calling CreditNotesApi->estimate_credit_note: #{e}"
184
+ end
185
+ ```
186
+
187
+ #### Using the estimate_credit_note_with_http_info variant
188
+
189
+ This returns an Array which contains the response data, status code and headers.
190
+
191
+ > <Array(<CreditNoteEstimated>, Integer, Hash)> estimate_credit_note_with_http_info(opts)
192
+
193
+ ```ruby
194
+ begin
195
+ # Estimate amounts for a new credit note
196
+ data, status_code, headers = api_instance.estimate_credit_note_with_http_info(opts)
197
+ p status_code # => 2xx
198
+ p headers # => { ... }
199
+ p data # => <CreditNoteEstimated>
200
+ rescue LagoAPI::ApiError => e
201
+ puts "Error when calling CreditNotesApi->estimate_credit_note_with_http_info: #{e}"
202
+ end
203
+ ```
204
+
205
+ ### Parameters
206
+
207
+ | Name | Type | Description | Notes |
208
+ | ---- | ---- | ----------- | ----- |
209
+ | **credit_note_estimate_input** | [**CreditNoteEstimateInput**](CreditNoteEstimateInput.md) | Credit note estimate payload | [optional] |
210
+
211
+ ### Return type
212
+
213
+ [**CreditNoteEstimated**](CreditNoteEstimated.md)
214
+
215
+ ### Authorization
216
+
217
+ [bearerAuth](../README.md#bearerAuth)
218
+
219
+ ### HTTP request headers
220
+
221
+ - **Content-Type**: application/json
222
+ - **Accept**: application/json
223
+
224
+
153
225
  ## find_all_credit_notes
154
226
 
155
227
  > <CreditNotes> find_all_credit_notes(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
@@ -19,6 +19,7 @@
19
19
  | **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
20
20
  | **taxes_rate** | **Float** | The tax rate associated with this specific fee. | |
21
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. | |
22
23
  | **total_amount_cents** | **Integer** | The cost of this specific fee, including any applicable taxes. | |
23
24
  | **total_amount_currency** | [**Currency**](Currency.md) | | |
24
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] |
@@ -56,6 +57,7 @@ instance = LagoAPI::FeeObject.new(
56
57
  taxes_amount_cents: 20,
57
58
  taxes_rate: 20,
58
59
  units: 0.32,
60
+ precise_unit_amount: 312.5,
59
61
  total_amount_cents: 120,
60
62
  total_amount_currency: null,
61
63
  events_count: 23,
@@ -8,6 +8,7 @@
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
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] |
11
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;. | |
12
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;. | |
13
14
 
@@ -21,6 +22,7 @@ instance = LagoAPI::FeeObjectItem.new(
21
22
  code: startup,
22
23
  name: Startup,
23
24
  invoice_display_name: Setup Fee (SF1),
25
+ group_invoice_display_name: Transactions - ACH,
24
26
  lago_item_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
25
27
  item_type: Subscription
26
28
  )
@@ -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
+
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
+