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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5738b2715145b3c82ebcd9bb48424256348c7758b1c2f814472bfa977e4aac1
4
- data.tar.gz: 2a40ead695be008af06dbb38628ba5581995845b4ce9990924363e2ae4dc7d3e
3
+ metadata.gz: 8ee5d8ada117e17d202e6d6387b05da9fd389b8af53af0421f884badbcd7b252
4
+ data.tar.gz: ddd36fe3358d8ebc558e6b63bc59cfe5a7f98dee008fdb2487adcc309e1cf151
5
5
  SHA512:
6
- metadata.gz: aca1397ab9360755c7caca7cf53d7f694944708efebfc67a1bff17a1a3efca70ef2a10b22f85e41a27d14b4e7379732961569e432b1e68da0e99fbfa998d765b
7
- data.tar.gz: 735d0d793eb29856d91e763758dda5316a0d337aacb0df78f98b2563b57f096314f4790cf0045c569b762f517722b16d3df966c8abc08a63631c6b6d5c05d140
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.48.0-beta
10
- - Package version: 0.48.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.48.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.48.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.48.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
@@ -116,6 +117,7 @@ Class | Method | HTTP request | Description
116
117
  *LagoAPI::CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /customers | Create a customer
117
118
  *LagoAPI::CustomersApi* | [**delete_applied_coupon**](docs/CustomersApi.md#delete_applied_coupon) | **DELETE** /customers/{external_customer_id}/applied_coupons/{applied_coupon_id} | Delete an applied coupon
118
119
  *LagoAPI::CustomersApi* | [**destroy_customer**](docs/CustomersApi.md#destroy_customer) | **DELETE** /customers/{external_id} | Delete a customer
120
+ *LagoAPI::CustomersApi* | [**find_all_customer_past_usage**](docs/CustomersApi.md#find_all_customer_past_usage) | **GET** /customers/{external_customer_id}/past_usage | Retrieve customer past usage
119
121
  *LagoAPI::CustomersApi* | [**find_all_customers**](docs/CustomersApi.md#find_all_customers) | **GET** /customers | List all customers
120
122
  *LagoAPI::CustomersApi* | [**find_customer**](docs/CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer
121
123
  *LagoAPI::CustomersApi* | [**find_customer_current_usage**](docs/CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage
@@ -144,6 +146,7 @@ Class | Method | HTTP request | Description
144
146
  *LagoAPI::SubscriptionsApi* | [**create_subscription**](docs/SubscriptionsApi.md#create_subscription) | **POST** /subscriptions | Assign a plan to a customer
145
147
  *LagoAPI::SubscriptionsApi* | [**destroy_subscription**](docs/SubscriptionsApi.md#destroy_subscription) | **DELETE** /subscriptions/{external_id} | Terminate a subscription
146
148
  *LagoAPI::SubscriptionsApi* | [**find_all_subscriptions**](docs/SubscriptionsApi.md#find_all_subscriptions) | **GET** /subscriptions | List all subscriptions
149
+ *LagoAPI::SubscriptionsApi* | [**find_subscription**](docs/SubscriptionsApi.md#find_subscription) | **GET** /subscriptions/{external_id} | Retrieve a subscription
147
150
  *LagoAPI::SubscriptionsApi* | [**update_subscription**](docs/SubscriptionsApi.md#update_subscription) | **PUT** /subscriptions/{external_id} | Update a subscription
148
151
  *LagoAPI::TaxesApi* | [**create_tax**](docs/TaxesApi.md#create_tax) | **POST** /taxes | Create a tax
149
152
  *LagoAPI::TaxesApi* | [**destroy_tax**](docs/TaxesApi.md#destroy_tax) | **DELETE** /taxes/{code} | Delete a tax
@@ -216,7 +219,13 @@ Class | Method | HTTP request | Description
216
219
  - [LagoAPI::CreditNoteAppliedTaxObject](docs/CreditNoteAppliedTaxObject.md)
217
220
  - [LagoAPI::CreditNoteCreateInput](docs/CreditNoteCreateInput.md)
218
221
  - [LagoAPI::CreditNoteCreateInputCreditNote](docs/CreditNoteCreateInputCreditNote.md)
219
- - [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)
220
229
  - [LagoAPI::CreditNoteItemObject](docs/CreditNoteItemObject.md)
221
230
  - [LagoAPI::CreditNoteItemObjectFee](docs/CreditNoteItemObjectFee.md)
222
231
  - [LagoAPI::CreditNoteObject](docs/CreditNoteObject.md)
@@ -239,6 +248,7 @@ Class | Method | HTTP request | Description
239
248
  - [LagoAPI::CustomerMetadata](docs/CustomerMetadata.md)
240
249
  - [LagoAPI::CustomerObject](docs/CustomerObject.md)
241
250
  - [LagoAPI::CustomerObjectExtended](docs/CustomerObjectExtended.md)
251
+ - [LagoAPI::CustomerPastUsage](docs/CustomerPastUsage.md)
242
252
  - [LagoAPI::CustomerUsage](docs/CustomerUsage.md)
243
253
  - [LagoAPI::CustomerUsageObject](docs/CustomerUsageObject.md)
244
254
  - [LagoAPI::CustomersPaginated](docs/CustomersPaginated.md)
@@ -292,6 +302,8 @@ Class | Method | HTTP request | Description
292
302
  - [LagoAPI::PlanCreateInputPlanChargesInner](docs/PlanCreateInputPlanChargesInner.md)
293
303
  - [LagoAPI::PlanCreateInputPlanChargesInnerGroupPropertiesInner](docs/PlanCreateInputPlanChargesInnerGroupPropertiesInner.md)
294
304
  - [LagoAPI::PlanObject](docs/PlanObject.md)
305
+ - [LagoAPI::PlanOverridesObject](docs/PlanOverridesObject.md)
306
+ - [LagoAPI::PlanOverridesObjectChargesInner](docs/PlanOverridesObjectChargesInner.md)
295
307
  - [LagoAPI::PlanUpdateInput](docs/PlanUpdateInput.md)
296
308
  - [LagoAPI::PlanUpdateInputPlan](docs/PlanUpdateInputPlan.md)
297
309
  - [LagoAPI::PlanUpdateInputPlanChargesInner](docs/PlanUpdateInputPlanChargesInner.md)
@@ -300,6 +312,7 @@ Class | Method | HTTP request | Description
300
312
  - [LagoAPI::SubscriptionCreateInput](docs/SubscriptionCreateInput.md)
301
313
  - [LagoAPI::SubscriptionCreateInputSubscription](docs/SubscriptionCreateInputSubscription.md)
302
314
  - [LagoAPI::SubscriptionObject](docs/SubscriptionObject.md)
315
+ - [LagoAPI::SubscriptionObjectExtended](docs/SubscriptionObjectExtended.md)
303
316
  - [LagoAPI::SubscriptionUpdateInput](docs/SubscriptionUpdateInput.md)
304
317
  - [LagoAPI::SubscriptionUpdateInputSubscription](docs/SubscriptionUpdateInputSubscription.md)
305
318
  - [LagoAPI::SubscriptionsPaginated](docs/SubscriptionsPaginated.md)
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name of the add-on. | [optional] |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
8
9
  | **code** | **String** | Unique code used to identify the add-on. | [optional] |
9
10
  | **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | [optional] |
10
11
  | **amount_currency** | [**Currency**](Currency.md) | | [optional] |
@@ -18,6 +19,7 @@ require 'lago_ruby'
18
19
 
19
20
  instance = LagoAPI::AddOnBaseInput.new(
20
21
  name: Setup Fee,
22
+ invoice_display_name: Setup Fee (SF1),
21
23
  code: setup_fee,
22
24
  amount_cents: 50000,
23
25
  amount_currency: null,
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | The name of the add-on. | |
8
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
8
9
  | **code** | **String** | Unique code used to identify the add-on. | |
9
10
  | **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | |
10
11
  | **amount_currency** | [**Currency**](Currency.md) | | |
@@ -18,6 +19,7 @@ require 'lago_ruby'
18
19
 
19
20
  instance = LagoAPI::AddOnCreateInputAddOn.new(
20
21
  name: Setup Fee,
22
+ invoice_display_name: Setup Fee (SF1),
21
23
  code: setup_fee,
22
24
  amount_cents: 50000,
23
25
  amount_currency: null,
data/docs/AddOnObject.md CHANGED
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **lago_id** | **String** | Unique identifier of the add-on, created by Lago. | |
8
8
  | **name** | **String** | The name of the add-on. | |
9
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
9
10
  | **code** | **String** | Unique code used to identify the add-on. | |
10
11
  | **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | |
11
12
  | **amount_currency** | [**Currency**](Currency.md) | | |
@@ -21,6 +22,7 @@ require 'lago_ruby'
21
22
  instance = LagoAPI::AddOnObject.new(
22
23
  lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
23
24
  name: Setup Fee,
25
+ invoice_display_name: Setup Fee (SF1),
24
26
  code: setup_fee,
25
27
  amount_cents: 50000,
26
28
  amount_currency: null,
@@ -9,7 +9,7 @@
9
9
  | **description** | **String** | Internal description of the billable metric. | [optional] |
10
10
  | **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | [optional] |
11
11
  | **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
12
- | **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. | [optional] |
12
+ | **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | [optional] |
13
13
  | **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
14
14
  | **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
15
15
 
@@ -9,7 +9,7 @@
9
9
  | **description** | **String** | Internal description of the billable metric. | [optional] |
10
10
  | **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | [optional] |
11
11
  | **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
12
- | **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. | |
12
+ | **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | |
13
13
  | **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
14
14
  | **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
15
15
 
@@ -11,7 +11,7 @@
11
11
  | **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | |
12
12
  | **created_at** | **Time** | Creation date of the billable metric. | |
13
13
  | **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
14
- | **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. | |
14
+ | **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | |
15
15
  | **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
16
16
  | **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
17
17
  | **active_subscriptions_count** | **Integer** | Number of active subscriptions using this billable metric. | |
data/docs/ChargeObject.md CHANGED
@@ -7,6 +7,7 @@
7
7
  | **lago_id** | **String** | Unique identifier of charge, created by Lago. | |
8
8
  | **lago_billable_metric_id** | **String** | Unique identifier of the billable metric created by Lago. | |
9
9
  | **billable_metric_code** | **String** | Unique code identifying a billable metric. | |
10
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
10
11
  | **created_at** | **Time** | The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard. | |
11
12
  | **charge_model** | **String** | Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage` or `volume`. | |
12
13
  | **pay_in_advance** | **Boolean** | This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period. | [optional] |
@@ -26,6 +27,7 @@ instance = LagoAPI::ChargeObject.new(
26
27
  lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
27
28
  lago_billable_metric_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
28
29
  billable_metric_code: requests,
30
+ invoice_display_name: Setup,
29
31
  created_at: 2022-09-14T16:35:31Z,
30
32
  charge_model: null,
31
33
  pay_in_advance: true,
@@ -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
+
@@ -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 (`pay_in_advance` is set to true). | [optional] |
14
14
  | **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
15
15
  | **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
16
+ | **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
16
17
  | **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | |
17
18
  | **amount_currency** | [**Currency**](Currency.md) | | |
18
19
  | **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
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::CreditNoteItemObjectFee.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,
@@ -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)
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **units** | **String** | The number of units consumed by the customer for a specific charge item. | |
8
+ | **events_count** | **Integer** | The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts. | |
8
9
  | **amount_cents** | **Integer** | The amount in cents, tax excluded, consumed by the customer for a specific charge item. | |
9
10
  | **amount_currency** | [**Currency**](Currency.md) | | |
10
11
  | **charge** | [**CustomerChargeUsageObjectCharge**](CustomerChargeUsageObjectCharge.md) | | |
@@ -18,6 +19,7 @@ require 'lago_ruby'
18
19
 
19
20
  instance = LagoAPI::CustomerChargeUsageObject.new(
20
21
  units: 1.0,
22
+ events_count: 10,
21
23
  amount_cents: 123,
22
24
  amount_currency: null,
23
25
  charge: null,
@@ -8,6 +8,7 @@
8
8
  | **key** | **String** | The group key, only returned for groups with two dimensions. | [optional] |
9
9
  | **value** | **String** | The group value. | [optional] |
10
10
  | **units** | **String** | The number of units consumed for a specific group related to a charge item. | [optional] |
11
+ | **events_count** | **Integer** | The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts. | [optional] |
11
12
  | **amount_cents** | **Integer** | The amount in cents, tax excluded, consumed for a specific group related to a charge item. | [optional] |
12
13
 
13
14
  ## Example
@@ -20,6 +21,7 @@ instance = LagoAPI::CustomerChargeUsageObjectGroupsInner.new(
20
21
  key: null,
21
22
  value: europe,
22
23
  units: 0.9,
24
+ events_count: 10,
23
25
  amount_cents: 1000
24
26
  )
25
27
  ```
@@ -0,0 +1,20 @@
1
+ # LagoAPI::CustomerPastUsage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **usage_periods** | [**Array&lt;CustomerUsage&gt;**](CustomerUsage.md) | | |
8
+ | **meta** | [**PaginationMeta**](PaginationMeta.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lago_ruby'
14
+
15
+ instance = LagoAPI::CustomerPastUsage.new(
16
+ usage_periods: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -7,6 +7,7 @@
7
7
  | **from_datetime** | **Time** | The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC). | |
8
8
  | **to_datetime** | **Time** | The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC). | |
9
9
  | **issuing_date** | **Time** | The date of creation of the invoice. | |
10
+ | **lago_invoice_id** | **String** | A unique identifier associated with the invoice related to this particular usage record. | [optional] |
10
11
  | **currency** | [**Currency**](Currency.md) | | [optional] |
11
12
  | **amount_cents** | **Integer** | The amount in cents, tax excluded. | |
12
13
  | **taxes_amount_cents** | **Integer** | The tax amount in cents. | |
@@ -22,6 +23,7 @@ instance = LagoAPI::CustomerUsageObject.new(
22
23
  from_datetime: 2022-07-01T00:00Z,
23
24
  to_datetime: 2022-07-31T23:59:59Z,
24
25
  issuing_date: 2022-08-01T23:59:59Z,
26
+ lago_invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
25
27
  currency: null,
26
28
  amount_cents: 123,
27
29
  taxes_amount_cents: 200,