lago_ruby 0.49.0.pre.beta → 0.52.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +30 -6
  4. data/docs/AddOnCreateInputAddOn.md +1 -1
  5. data/docs/AnalyticsApi.md +299 -0
  6. data/docs/CreditNoteCreateInputCreditNote.md +1 -1
  7. data/docs/CreditNoteEstimateInput.md +18 -0
  8. data/docs/CreditNoteEstimateInputCreditNote.md +20 -0
  9. data/docs/CreditNoteEstimateInputCreditNoteItemsInner.md +20 -0
  10. data/docs/CreditNoteEstimated.md +18 -0
  11. data/docs/CreditNoteEstimatedEstimatedCreditNote.md +38 -0
  12. data/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +32 -0
  13. data/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md +20 -0
  14. data/docs/CreditNoteItemObjectFee.md +6 -4
  15. data/docs/CreditNoteObject.md +2 -2
  16. data/docs/CreditNotesApi.md +72 -0
  17. data/docs/CustomerChargeUsageObjectCharge.md +3 -1
  18. data/docs/CustomersApi.md +70 -0
  19. data/docs/EventsApi.md +7 -6
  20. data/docs/FeeObject.md +6 -4
  21. data/docs/FeeObjectItem.md +2 -0
  22. data/docs/GenerateCustomerCheckoutURL200Response.md +24 -0
  23. data/docs/GrossRevenueObject.md +22 -0
  24. data/docs/GrossRevenues.md +18 -0
  25. data/docs/InvoicedUsageObject.md +24 -0
  26. data/docs/InvoicedUsages.md +18 -0
  27. data/docs/MrrObject.md +22 -0
  28. data/docs/Mrrs.md +18 -0
  29. data/docs/OrganizationObject.md +2 -0
  30. data/docs/OrganizationUpdateInputOrganization.md +2 -0
  31. data/docs/OutstandingInvoiceObject.md +26 -0
  32. data/docs/OutstandingInvoices.md +18 -0
  33. data/docs/PlanOverridesObject.md +32 -0
  34. data/docs/PlanOverridesObjectChargesInner.md +30 -0
  35. data/docs/Subscription.md +1 -1
  36. data/docs/SubscriptionCreateInputSubscription.md +3 -1
  37. data/docs/SubscriptionObjectExtended.md +52 -0
  38. data/docs/SubscriptionUpdateInputSubscription.md +3 -1
  39. data/lago_ruby.gemspec +2 -2
  40. data/lib/lago_ruby/api/add_ons_api.rb +2 -2
  41. data/lib/lago_ruby/api/analytics_api.rb +268 -0
  42. data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
  43. data/lib/lago_ruby/api/coupons_api.rb +2 -2
  44. data/lib/lago_ruby/api/credit_notes_api.rb +66 -2
  45. data/lib/lago_ruby/api/customers_api.rb +65 -2
  46. data/lib/lago_ruby/api/events_api.rb +7 -7
  47. data/lib/lago_ruby/api/fees_api.rb +2 -2
  48. data/lib/lago_ruby/api/invoices_api.rb +2 -2
  49. data/lib/lago_ruby/api/organizations_api.rb +2 -2
  50. data/lib/lago_ruby/api/plans_api.rb +2 -2
  51. data/lib/lago_ruby/api/subscriptions_api.rb +2 -2
  52. data/lib/lago_ruby/api/taxes_api.rb +2 -2
  53. data/lib/lago_ruby/api/wallets_api.rb +2 -2
  54. data/lib/lago_ruby/api/webhook_endpoints_api.rb +2 -2
  55. data/lib/lago_ruby/api/webhooks_api.rb +2 -2
  56. data/lib/lago_ruby/api_client.rb +12 -13
  57. data/lib/lago_ruby/api_error.rb +2 -2
  58. data/lib/lago_ruby/configuration.rb +2 -2
  59. data/lib/lago_ruby/models/add_on.rb +3 -3
  60. data/lib/lago_ruby/models/add_on_base_input.rb +3 -3
  61. data/lib/lago_ruby/models/add_on_create_input.rb +3 -3
  62. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +3 -3
  63. data/lib/lago_ruby/models/add_on_object.rb +3 -3
  64. data/lib/lago_ruby/models/add_on_update_input.rb +3 -3
  65. data/lib/lago_ruby/models/add_ons_paginated.rb +3 -3
  66. data/lib/lago_ruby/models/api_error_bad_request.rb +3 -3
  67. data/lib/lago_ruby/models/api_error_forbidden.rb +3 -3
  68. data/lib/lago_ruby/models/api_error_not_allowed.rb +3 -3
  69. data/lib/lago_ruby/models/api_error_not_found.rb +3 -3
  70. data/lib/lago_ruby/models/api_error_unauthorized.rb +3 -3
  71. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +3 -3
  72. data/lib/lago_ruby/models/applied_coupon.rb +3 -3
  73. data/lib/lago_ruby/models/applied_coupon_input.rb +3 -3
  74. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +3 -3
  75. data/lib/lago_ruby/models/applied_coupon_object.rb +3 -3
  76. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +3 -3
  77. data/lib/lago_ruby/models/applied_coupons_paginated.rb +3 -3
  78. data/lib/lago_ruby/models/base_applied_tax.rb +3 -3
  79. data/lib/lago_ruby/models/billable_metric.rb +3 -3
  80. data/lib/lago_ruby/models/billable_metric_base_input.rb +3 -3
  81. data/lib/lago_ruby/models/billable_metric_create_input.rb +3 -3
  82. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +3 -3
  83. data/lib/lago_ruby/models/billable_metric_group.rb +3 -3
  84. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
  85. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +3 -3
  86. data/lib/lago_ruby/models/billable_metric_object.rb +3 -3
  87. data/lib/lago_ruby/models/billable_metric_update_input.rb +3 -3
  88. data/lib/lago_ruby/models/billable_metrics_paginated.rb +3 -3
  89. data/lib/lago_ruby/models/charge_object.rb +3 -3
  90. data/lib/lago_ruby/models/charge_object_properties.rb +3 -3
  91. data/lib/lago_ruby/models/charge_properties.rb +3 -3
  92. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +3 -3
  93. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +3 -3
  94. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +3 -3
  95. data/lib/lago_ruby/models/country.rb +2 -2
  96. data/lib/lago_ruby/models/coupon.rb +3 -3
  97. data/lib/lago_ruby/models/coupon_base_input.rb +3 -3
  98. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +3 -3
  99. data/lib/lago_ruby/models/coupon_create_input.rb +3 -3
  100. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +3 -3
  101. data/lib/lago_ruby/models/coupon_object.rb +3 -3
  102. data/lib/lago_ruby/models/coupon_update_input.rb +3 -3
  103. data/lib/lago_ruby/models/coupons_paginated.rb +3 -3
  104. data/lib/lago_ruby/models/credit_note.rb +3 -3
  105. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +3 -3
  106. data/lib/lago_ruby/models/credit_note_create_input.rb +3 -3
  107. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +4 -4
  108. data/lib/lago_ruby/models/credit_note_estimate_input.rb +221 -0
  109. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +241 -0
  110. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +239 -0
  111. data/lib/lago_ruby/models/credit_note_estimated.rb +221 -0
  112. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +387 -0
  113. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +283 -0
  114. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +235 -0
  115. data/lib/lago_ruby/models/credit_note_item_object.rb +3 -3
  116. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +25 -8
  117. data/lib/lago_ruby/models/credit_note_object.rb +14 -14
  118. data/lib/lago_ruby/models/credit_note_update_input.rb +3 -3
  119. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +3 -3
  120. data/lib/lago_ruby/models/credit_notes.rb +3 -3
  121. data/lib/lago_ruby/models/credit_object.rb +3 -3
  122. data/lib/lago_ruby/models/credit_object_invoice.rb +3 -3
  123. data/lib/lago_ruby/models/credit_object_item.rb +3 -3
  124. data/lib/lago_ruby/models/currency.rb +2 -2
  125. data/lib/lago_ruby/models/customer.rb +3 -3
  126. data/lib/lago_ruby/models/customer_billing_configuration.rb +3 -3
  127. data/lib/lago_ruby/models/customer_charge_usage_object.rb +3 -3
  128. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +3 -3
  129. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +17 -7
  130. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +3 -3
  131. data/lib/lago_ruby/models/customer_create_input.rb +3 -3
  132. data/lib/lago_ruby/models/customer_create_input_customer.rb +3 -3
  133. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +3 -3
  134. data/lib/lago_ruby/models/customer_metadata.rb +3 -3
  135. data/lib/lago_ruby/models/customer_object.rb +3 -3
  136. data/lib/lago_ruby/models/customer_object_extended.rb +3 -3
  137. data/lib/lago_ruby/models/customer_past_usage.rb +3 -3
  138. data/lib/lago_ruby/models/customer_usage.rb +3 -3
  139. data/lib/lago_ruby/models/customer_usage_object.rb +3 -3
  140. data/lib/lago_ruby/models/customers_paginated.rb +3 -3
  141. data/lib/lago_ruby/models/event.rb +3 -3
  142. data/lib/lago_ruby/models/event_batch_input.rb +3 -3
  143. data/lib/lago_ruby/models/event_batch_input_event.rb +3 -3
  144. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +3 -3
  145. data/lib/lago_ruby/models/event_estimate_fees_input.rb +3 -3
  146. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +3 -3
  147. data/lib/lago_ruby/models/event_input.rb +3 -3
  148. data/lib/lago_ruby/models/event_input_event.rb +3 -3
  149. data/lib/lago_ruby/models/event_input_event_timestamp.rb +2 -2
  150. data/lib/lago_ruby/models/event_object.rb +7 -23
  151. data/lib/lago_ruby/models/event_object_properties.rb +3 -3
  152. data/lib/lago_ruby/models/fee.rb +3 -3
  153. data/lib/lago_ruby/models/fee_applied_tax_object.rb +3 -3
  154. data/lib/lago_ruby/models/fee_object.rb +25 -8
  155. data/lib/lago_ruby/models/fee_object_item.rb +14 -4
  156. data/lib/lago_ruby/models/fee_update_input.rb +3 -3
  157. data/lib/lago_ruby/models/fee_update_input_fee.rb +3 -3
  158. data/lib/lago_ruby/models/fees.rb +3 -3
  159. data/lib/lago_ruby/models/fees_paginated.rb +3 -3
  160. data/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb +246 -0
  161. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +3 -3
  162. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +3 -3
  163. data/lib/lago_ruby/models/gross_revenue_object.rb +241 -0
  164. data/lib/lago_ruby/models/gross_revenues.rb +223 -0
  165. data/lib/lago_ruby/models/group_object.rb +3 -3
  166. data/lib/lago_ruby/models/group_properties_object.rb +3 -3
  167. data/lib/lago_ruby/models/group_properties_object_values.rb +3 -3
  168. data/lib/lago_ruby/models/groups_paginated.rb +3 -3
  169. data/lib/lago_ruby/models/invoice.rb +3 -3
  170. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +3 -3
  171. data/lib/lago_ruby/models/invoice_metadata_object.rb +3 -3
  172. data/lib/lago_ruby/models/invoice_object.rb +3 -3
  173. data/lib/lago_ruby/models/invoice_object_customer.rb +3 -3
  174. data/lib/lago_ruby/models/invoice_object_extended.rb +3 -3
  175. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +3 -3
  176. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +3 -3
  177. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +3 -3
  178. data/lib/lago_ruby/models/invoice_update_input.rb +3 -3
  179. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +3 -3
  180. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +3 -3
  181. data/lib/lago_ruby/models/invoiced_usage_object.rb +265 -0
  182. data/lib/lago_ruby/models/invoiced_usages.rb +223 -0
  183. data/lib/lago_ruby/models/invoices_paginated.rb +3 -3
  184. data/lib/lago_ruby/models/mrr_object.rb +241 -0
  185. data/lib/lago_ruby/models/mrrs.rb +223 -0
  186. data/lib/lago_ruby/models/organization.rb +3 -3
  187. data/lib/lago_ruby/models/organization_billing_configuration.rb +3 -3
  188. data/lib/lago_ruby/models/organization_object.rb +13 -4
  189. data/lib/lago_ruby/models/organization_update_input.rb +3 -3
  190. data/lib/lago_ruby/models/organization_update_input_organization.rb +13 -4
  191. data/lib/lago_ruby/models/outstanding_invoice_object.rb +309 -0
  192. data/lib/lago_ruby/models/outstanding_invoices.rb +223 -0
  193. data/lib/lago_ruby/models/pagination_meta.rb +3 -3
  194. data/lib/lago_ruby/models/plan.rb +3 -3
  195. data/lib/lago_ruby/models/plan_create_input.rb +3 -3
  196. data/lib/lago_ruby/models/plan_create_input_plan.rb +3 -3
  197. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +3 -3
  198. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +3 -3
  199. data/lib/lago_ruby/models/plan_object.rb +3 -3
  200. data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
  201. data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +278 -0
  202. data/lib/lago_ruby/models/plan_update_input.rb +3 -3
  203. data/lib/lago_ruby/models/plan_update_input_plan.rb +3 -3
  204. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +3 -3
  205. data/lib/lago_ruby/models/plans_paginated.rb +3 -3
  206. data/lib/lago_ruby/models/subscription.rb +4 -4
  207. data/lib/lago_ruby/models/subscription_create_input.rb +3 -3
  208. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +16 -7
  209. data/lib/lago_ruby/models/subscription_object.rb +3 -3
  210. data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
  211. data/lib/lago_ruby/models/subscription_update_input.rb +3 -3
  212. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +16 -7
  213. data/lib/lago_ruby/models/subscriptions_paginated.rb +3 -3
  214. data/lib/lago_ruby/models/tax.rb +3 -3
  215. data/lib/lago_ruby/models/tax_base_input.rb +3 -3
  216. data/lib/lago_ruby/models/tax_create_input.rb +3 -3
  217. data/lib/lago_ruby/models/tax_create_input_tax.rb +3 -3
  218. data/lib/lago_ruby/models/tax_object.rb +3 -3
  219. data/lib/lago_ruby/models/tax_update_input.rb +3 -3
  220. data/lib/lago_ruby/models/taxes_paginated.rb +3 -3
  221. data/lib/lago_ruby/models/timezone.rb +2 -2
  222. data/lib/lago_ruby/models/wallet.rb +3 -3
  223. data/lib/lago_ruby/models/wallet_create_input.rb +3 -3
  224. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +3 -3
  225. data/lib/lago_ruby/models/wallet_object.rb +3 -3
  226. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +3 -3
  227. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +3 -3
  228. data/lib/lago_ruby/models/wallet_transaction_object.rb +3 -3
  229. data/lib/lago_ruby/models/wallet_transactions.rb +3 -3
  230. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +3 -3
  231. data/lib/lago_ruby/models/wallet_update_input.rb +3 -3
  232. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +3 -3
  233. data/lib/lago_ruby/models/wallets_paginated.rb +3 -3
  234. data/lib/lago_ruby/models/webhook_endpoint.rb +3 -3
  235. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +3 -3
  236. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +3 -3
  237. data/lib/lago_ruby/models/webhook_endpoint_object.rb +3 -3
  238. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +3 -3
  239. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +3 -3
  240. data/lib/lago_ruby/version.rb +3 -3
  241. data/lib/lago_ruby.rb +22 -3
  242. data/spec/api/analytics_api_spec.rb +85 -0
  243. data/spec/api_client_spec.rb +2 -2
  244. data/spec/configuration_spec.rb +2 -2
  245. data/spec/models/{credit_note_create_input_credit_note_items_inner_spec.rb → credit_note_estimate_input_credit_note_items_inner_spec.rb} +10 -8
  246. data/spec/models/credit_note_estimate_input_credit_note_spec.rb +42 -0
  247. data/spec/models/credit_note_estimate_input_spec.rb +36 -0
  248. data/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb +78 -0
  249. data/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb +42 -0
  250. data/spec/models/credit_note_estimated_estimated_credit_note_spec.rb +96 -0
  251. data/spec/models/credit_note_estimated_spec.rb +36 -0
  252. data/spec/models/generate_customer_checkout_url200_response_spec.rb +54 -0
  253. data/spec/models/gross_revenue_object_spec.rb +48 -0
  254. data/spec/models/gross_revenues_spec.rb +36 -0
  255. data/spec/models/invoiced_usage_object_spec.rb +54 -0
  256. data/spec/models/invoiced_usages_spec.rb +36 -0
  257. data/spec/models/mrr_object_spec.rb +48 -0
  258. data/spec/models/mrrs_spec.rb +36 -0
  259. data/spec/models/outstanding_invoice_object_spec.rb +64 -0
  260. data/spec/models/outstanding_invoices_spec.rb +36 -0
  261. data/spec/models/plan_overrides_object_charges_inner_spec.rb +66 -0
  262. data/spec/models/plan_overrides_object_spec.rb +78 -0
  263. data/spec/models/subscription_object_extended_spec.rb +146 -0
  264. data/spec/spec_helper.rb +2 -2
  265. metadata +237 -159
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23e57e890bfe8c0b19773bcb8eb4923fc46a1aa0abb5787074fda52d7fdd344b
4
- data.tar.gz: 3ff0bd599f9260095aa49eacc114b4f2570532142033ab1273213de4fb21aabb
3
+ metadata.gz: 22517ab6a07d771fc3b6e2c4e5826e883c85a1ddc1363dba6c51c55d847fc417
4
+ data.tar.gz: 1f31e891ed5521efec29d449e11602fd6cf54d6830f24a755df5cc38c0ca2a57
5
5
  SHA512:
6
- metadata.gz: c542123cabbf5f5f652526fadeaae108f92c08eca199a1fed15749fcd4d83f75b28bc13ed30b4919dfe84f1376ff74e50221ef2435adef570484c42eb339657b
7
- data.tar.gz: e9c14cebd5062a44286c1b8fc94377d729392cd8d9bac89ee18461d5e1477a96603fb380d1f765b45081b6ca406ce755180d980de4e9be53e0c559fea82807fd
6
+ metadata.gz: 9e75d3ba2b0d5e02e7b2aeebd2f6c2926c0f12b03e9574f92baf700d256b684dcd79f4a0529bbf98d0969342bddba172a436a40774d528dafc7e0a7b6d566797
7
+ data.tar.gz: 9b7b2edc73da3aa2069a99204fb7d83180ad283713c8f12c59e0530d02bfda0ce8471f84cec7887b5b1cb377e535892f5c93ef280f3462acfaf42a09ec1c3741
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.52.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.52.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.52.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.52.0-beta'
39
39
 
40
40
  ### Install from Git
41
41
 
@@ -93,6 +93,10 @@ Class | Method | HTTP request | Description
93
93
  *LagoAPI::AddOnsApi* | [**find_add_on**](docs/AddOnsApi.md#find_add_on) | **GET** /add_ons/{code} | Retrieve an add-on
94
94
  *LagoAPI::AddOnsApi* | [**find_all_add_ons**](docs/AddOnsApi.md#find_all_add_ons) | **GET** /add_ons | List all add-ons
95
95
  *LagoAPI::AddOnsApi* | [**update_add_on**](docs/AddOnsApi.md#update_add_on) | **PUT** /add_ons/{code} | Update an add-on
96
+ *LagoAPI::AnalyticsApi* | [**find_all_gross_revenues**](docs/AnalyticsApi.md#find_all_gross_revenues) | **GET** /analytics/gross_revenue | List gross revenue
97
+ *LagoAPI::AnalyticsApi* | [**find_all_invoiced_usages**](docs/AnalyticsApi.md#find_all_invoiced_usages) | **GET** /analytics/invoiced_usage | List usage revenue
98
+ *LagoAPI::AnalyticsApi* | [**find_all_mrrs**](docs/AnalyticsApi.md#find_all_mrrs) | **GET** /analytics/mrr | List MRR
99
+ *LagoAPI::AnalyticsApi* | [**find_all_outstanding_invoices**](docs/AnalyticsApi.md#find_all_outstanding_invoices) | **GET** /analytics/outstanding_invoices | List outstanding invoices
96
100
  *LagoAPI::BillableMetricsApi* | [**create_billable_metric**](docs/BillableMetricsApi.md#create_billable_metric) | **POST** /billable_metrics | Create a billable metric
97
101
  *LagoAPI::BillableMetricsApi* | [**destroy_billable_metric**](docs/BillableMetricsApi.md#destroy_billable_metric) | **DELETE** /billable_metrics/{code} | Delete a billable metric
98
102
  *LagoAPI::BillableMetricsApi* | [**find_all_billable_metric_groups**](docs/BillableMetricsApi.md#find_all_billable_metric_groups) | **GET** /billable_metrics/{code}/groups | Find a billable metric's groups
@@ -109,6 +113,7 @@ Class | Method | HTTP request | Description
109
113
  *LagoAPI::CouponsApi* | [**update_coupon**](docs/CouponsApi.md#update_coupon) | **PUT** /coupons/{code} | Update a coupon
110
114
  *LagoAPI::CreditNotesApi* | [**create_credit_note**](docs/CreditNotesApi.md#create_credit_note) | **POST** /credit_notes | Create a credit note
111
115
  *LagoAPI::CreditNotesApi* | [**download_credit_note**](docs/CreditNotesApi.md#download_credit_note) | **POST** /credit_notes/{lago_id}/download | Download a credit note PDF
116
+ *LagoAPI::CreditNotesApi* | [**estimate_credit_note**](docs/CreditNotesApi.md#estimate_credit_note) | **POST** /credit_notes/estimate | Estimate amounts for a new credit note
112
117
  *LagoAPI::CreditNotesApi* | [**find_all_credit_notes**](docs/CreditNotesApi.md#find_all_credit_notes) | **GET** /credit_notes | List all credit notes
113
118
  *LagoAPI::CreditNotesApi* | [**find_credit_note**](docs/CreditNotesApi.md#find_credit_note) | **GET** /credit_notes/{lago_id} | Retrieve a credit note
114
119
  *LagoAPI::CreditNotesApi* | [**update_credit_note**](docs/CreditNotesApi.md#update_credit_note) | **PUT** /credit_notes/{lago_id} | Update a credit note
@@ -120,6 +125,7 @@ Class | Method | HTTP request | Description
120
125
  *LagoAPI::CustomersApi* | [**find_all_customers**](docs/CustomersApi.md#find_all_customers) | **GET** /customers | List all customers
121
126
  *LagoAPI::CustomersApi* | [**find_customer**](docs/CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer
122
127
  *LagoAPI::CustomersApi* | [**find_customer_current_usage**](docs/CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage
128
+ *LagoAPI::CustomersApi* | [**generate_customer_checkout_url**](docs/CustomersApi.md#generate_customer_checkout_url) | **POST** /customers/{external_customer_id}/checkout_url | Generate a Customer Payment Provider Checkout URL
123
129
  *LagoAPI::CustomersApi* | [**get_customer_portal_url**](docs/CustomersApi.md#get_customer_portal_url) | **GET** /customers/{external_customer_id}/portal_url | Get a customer portal URL
124
130
  *LagoAPI::EventsApi* | [**create_batch_events**](docs/EventsApi.md#create_batch_events) | **POST** /events/batch | Batch multiple events
125
131
  *LagoAPI::EventsApi* | [**create_event**](docs/EventsApi.md#create_event) | **POST** /events | Send usage events
@@ -218,7 +224,13 @@ Class | Method | HTTP request | Description
218
224
  - [LagoAPI::CreditNoteAppliedTaxObject](docs/CreditNoteAppliedTaxObject.md)
219
225
  - [LagoAPI::CreditNoteCreateInput](docs/CreditNoteCreateInput.md)
220
226
  - [LagoAPI::CreditNoteCreateInputCreditNote](docs/CreditNoteCreateInputCreditNote.md)
221
- - [LagoAPI::CreditNoteCreateInputCreditNoteItemsInner](docs/CreditNoteCreateInputCreditNoteItemsInner.md)
227
+ - [LagoAPI::CreditNoteEstimateInput](docs/CreditNoteEstimateInput.md)
228
+ - [LagoAPI::CreditNoteEstimateInputCreditNote](docs/CreditNoteEstimateInputCreditNote.md)
229
+ - [LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner](docs/CreditNoteEstimateInputCreditNoteItemsInner.md)
230
+ - [LagoAPI::CreditNoteEstimated](docs/CreditNoteEstimated.md)
231
+ - [LagoAPI::CreditNoteEstimatedEstimatedCreditNote](docs/CreditNoteEstimatedEstimatedCreditNote.md)
232
+ - [LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner](docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md)
233
+ - [LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner](docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md)
222
234
  - [LagoAPI::CreditNoteItemObject](docs/CreditNoteItemObject.md)
223
235
  - [LagoAPI::CreditNoteItemObjectFee](docs/CreditNoteItemObjectFee.md)
224
236
  - [LagoAPI::CreditNoteObject](docs/CreditNoteObject.md)
@@ -264,8 +276,11 @@ Class | Method | HTTP request | Description
264
276
  - [LagoAPI::FeeUpdateInputFee](docs/FeeUpdateInputFee.md)
265
277
  - [LagoAPI::Fees](docs/Fees.md)
266
278
  - [LagoAPI::FeesPaginated](docs/FeesPaginated.md)
279
+ - [LagoAPI::GenerateCustomerCheckoutURL200Response](docs/GenerateCustomerCheckoutURL200Response.md)
267
280
  - [LagoAPI::GetCustomerPortalUrl200Response](docs/GetCustomerPortalUrl200Response.md)
268
281
  - [LagoAPI::GetCustomerPortalUrl200ResponseCustomer](docs/GetCustomerPortalUrl200ResponseCustomer.md)
282
+ - [LagoAPI::GrossRevenueObject](docs/GrossRevenueObject.md)
283
+ - [LagoAPI::GrossRevenues](docs/GrossRevenues.md)
269
284
  - [LagoAPI::GroupObject](docs/GroupObject.md)
270
285
  - [LagoAPI::GroupPropertiesObject](docs/GroupPropertiesObject.md)
271
286
  - [LagoAPI::GroupPropertiesObjectValues](docs/GroupPropertiesObjectValues.md)
@@ -282,12 +297,18 @@ Class | Method | HTTP request | Description
282
297
  - [LagoAPI::InvoiceUpdateInput](docs/InvoiceUpdateInput.md)
283
298
  - [LagoAPI::InvoiceUpdateInputInvoice](docs/InvoiceUpdateInputInvoice.md)
284
299
  - [LagoAPI::InvoiceUpdateInputInvoiceMetadataInner](docs/InvoiceUpdateInputInvoiceMetadataInner.md)
300
+ - [LagoAPI::InvoicedUsageObject](docs/InvoicedUsageObject.md)
301
+ - [LagoAPI::InvoicedUsages](docs/InvoicedUsages.md)
285
302
  - [LagoAPI::InvoicesPaginated](docs/InvoicesPaginated.md)
303
+ - [LagoAPI::MrrObject](docs/MrrObject.md)
304
+ - [LagoAPI::Mrrs](docs/Mrrs.md)
286
305
  - [LagoAPI::Organization](docs/Organization.md)
287
306
  - [LagoAPI::OrganizationBillingConfiguration](docs/OrganizationBillingConfiguration.md)
288
307
  - [LagoAPI::OrganizationObject](docs/OrganizationObject.md)
289
308
  - [LagoAPI::OrganizationUpdateInput](docs/OrganizationUpdateInput.md)
290
309
  - [LagoAPI::OrganizationUpdateInputOrganization](docs/OrganizationUpdateInputOrganization.md)
310
+ - [LagoAPI::OutstandingInvoiceObject](docs/OutstandingInvoiceObject.md)
311
+ - [LagoAPI::OutstandingInvoices](docs/OutstandingInvoices.md)
291
312
  - [LagoAPI::PaginationMeta](docs/PaginationMeta.md)
292
313
  - [LagoAPI::Plan](docs/Plan.md)
293
314
  - [LagoAPI::PlanCreateInput](docs/PlanCreateInput.md)
@@ -295,6 +316,8 @@ Class | Method | HTTP request | Description
295
316
  - [LagoAPI::PlanCreateInputPlanChargesInner](docs/PlanCreateInputPlanChargesInner.md)
296
317
  - [LagoAPI::PlanCreateInputPlanChargesInnerGroupPropertiesInner](docs/PlanCreateInputPlanChargesInnerGroupPropertiesInner.md)
297
318
  - [LagoAPI::PlanObject](docs/PlanObject.md)
319
+ - [LagoAPI::PlanOverridesObject](docs/PlanOverridesObject.md)
320
+ - [LagoAPI::PlanOverridesObjectChargesInner](docs/PlanOverridesObjectChargesInner.md)
298
321
  - [LagoAPI::PlanUpdateInput](docs/PlanUpdateInput.md)
299
322
  - [LagoAPI::PlanUpdateInputPlan](docs/PlanUpdateInputPlan.md)
300
323
  - [LagoAPI::PlanUpdateInputPlanChargesInner](docs/PlanUpdateInputPlanChargesInner.md)
@@ -303,6 +326,7 @@ Class | Method | HTTP request | Description
303
326
  - [LagoAPI::SubscriptionCreateInput](docs/SubscriptionCreateInput.md)
304
327
  - [LagoAPI::SubscriptionCreateInputSubscription](docs/SubscriptionCreateInputSubscription.md)
305
328
  - [LagoAPI::SubscriptionObject](docs/SubscriptionObject.md)
329
+ - [LagoAPI::SubscriptionObjectExtended](docs/SubscriptionObjectExtended.md)
306
330
  - [LagoAPI::SubscriptionUpdateInput](docs/SubscriptionUpdateInput.md)
307
331
  - [LagoAPI::SubscriptionUpdateInputSubscription](docs/SubscriptionUpdateInputSubscription.md)
308
332
  - [LagoAPI::SubscriptionsPaginated](docs/SubscriptionsPaginated.md)
@@ -24,7 +24,7 @@ instance = LagoAPI::AddOnCreateInputAddOn.new(
24
24
  amount_cents: 50000,
25
25
  amount_currency: null,
26
26
  description: Implementation fee for new customers.,
27
- tax_codes: ["french_standard_vat"]
27
+ tax_codes: [french_standard_vat]
28
28
  )
29
29
  ```
30
30
 
@@ -0,0 +1,299 @@
1
+ # LagoAPI::AnalyticsApi
2
+
3
+ All URIs are relative to *https://api.getlago.com/api/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**find_all_gross_revenues**](AnalyticsApi.md#find_all_gross_revenues) | **GET** /analytics/gross_revenue | List gross revenue |
8
+ | [**find_all_invoiced_usages**](AnalyticsApi.md#find_all_invoiced_usages) | **GET** /analytics/invoiced_usage | List usage revenue |
9
+ | [**find_all_mrrs**](AnalyticsApi.md#find_all_mrrs) | **GET** /analytics/mrr | List MRR |
10
+ | [**find_all_outstanding_invoices**](AnalyticsApi.md#find_all_outstanding_invoices) | **GET** /analytics/outstanding_invoices | List outstanding invoices |
11
+
12
+
13
+ ## find_all_gross_revenues
14
+
15
+ > <GrossRevenues> find_all_gross_revenues(opts)
16
+
17
+ List gross revenue
18
+
19
+ Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'lago_ruby'
26
+ # setup authorization
27
+ LagoAPI.configure do |config|
28
+ # Configure Bearer authorization: bearerAuth
29
+ config.access_token = 'YOUR_BEARER_TOKEN'
30
+ end
31
+
32
+ api_instance = LagoAPI::AnalyticsApi.new
33
+ opts = {
34
+ currency: LagoAPI::Currency::AED, # Currency | Currency of revenue analytics. Format must be ISO 4217.
35
+ external_customer_id: '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba' # String | The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
36
+ }
37
+
38
+ begin
39
+ # List gross revenue
40
+ result = api_instance.find_all_gross_revenues(opts)
41
+ p result
42
+ rescue LagoAPI::ApiError => e
43
+ puts "Error when calling AnalyticsApi->find_all_gross_revenues: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the find_all_gross_revenues_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(<GrossRevenues>, Integer, Hash)> find_all_gross_revenues_with_http_info(opts)
52
+
53
+ ```ruby
54
+ begin
55
+ # List gross revenue
56
+ data, status_code, headers = api_instance.find_all_gross_revenues_with_http_info(opts)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => <GrossRevenues>
60
+ rescue LagoAPI::ApiError => e
61
+ puts "Error when calling AnalyticsApi->find_all_gross_revenues_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **currency** | [**Currency**](.md) | Currency of revenue analytics. Format must be ISO 4217. | [optional] |
70
+ | **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. | [optional] |
71
+
72
+ ### Return type
73
+
74
+ [**GrossRevenues**](GrossRevenues.md)
75
+
76
+ ### Authorization
77
+
78
+ [bearerAuth](../README.md#bearerAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## find_all_invoiced_usages
87
+
88
+ > <InvoicedUsages> find_all_invoiced_usages(opts)
89
+
90
+ List usage revenue
91
+
92
+ Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'lago_ruby'
99
+ # setup authorization
100
+ LagoAPI.configure do |config|
101
+ # Configure Bearer authorization: bearerAuth
102
+ config.access_token = 'YOUR_BEARER_TOKEN'
103
+ end
104
+
105
+ api_instance = LagoAPI::AnalyticsApi.new
106
+ opts = {
107
+ currency: LagoAPI::Currency::AED # Currency | The currency of invoiced usage analytics. Format must be ISO 4217.
108
+ }
109
+
110
+ begin
111
+ # List usage revenue
112
+ result = api_instance.find_all_invoiced_usages(opts)
113
+ p result
114
+ rescue LagoAPI::ApiError => e
115
+ puts "Error when calling AnalyticsApi->find_all_invoiced_usages: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the find_all_invoiced_usages_with_http_info variant
120
+
121
+ This returns an Array which contains the response data, status code and headers.
122
+
123
+ > <Array(<InvoicedUsages>, Integer, Hash)> find_all_invoiced_usages_with_http_info(opts)
124
+
125
+ ```ruby
126
+ begin
127
+ # List usage revenue
128
+ data, status_code, headers = api_instance.find_all_invoiced_usages_with_http_info(opts)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => <InvoicedUsages>
132
+ rescue LagoAPI::ApiError => e
133
+ puts "Error when calling AnalyticsApi->find_all_invoiced_usages_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **currency** | [**Currency**](.md) | The currency of invoiced usage analytics. Format must be ISO 4217. | [optional] |
142
+
143
+ ### Return type
144
+
145
+ [**InvoicedUsages**](InvoicedUsages.md)
146
+
147
+ ### Authorization
148
+
149
+ [bearerAuth](../README.md#bearerAuth)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: application/json
155
+
156
+
157
+ ## find_all_mrrs
158
+
159
+ > <Mrrs> find_all_mrrs(opts)
160
+
161
+ List MRR
162
+
163
+ This endpoint is used to list MRR.
164
+
165
+ ### Examples
166
+
167
+ ```ruby
168
+ require 'time'
169
+ require 'lago_ruby'
170
+ # setup authorization
171
+ LagoAPI.configure do |config|
172
+ # Configure Bearer authorization: bearerAuth
173
+ config.access_token = 'YOUR_BEARER_TOKEN'
174
+ end
175
+
176
+ api_instance = LagoAPI::AnalyticsApi.new
177
+ opts = {
178
+ currency: LagoAPI::Currency::AED, # Currency | Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and prior to the deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next three months) as well as to fees paid in arrears (allocated to the preceding three months). - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next twelve months) and for fees paid in arrears (spread over the previous twelve months). - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
179
+ months: 12 # Integer | Show data only for given number of months.
180
+ }
181
+
182
+ begin
183
+ # List MRR
184
+ result = api_instance.find_all_mrrs(opts)
185
+ p result
186
+ rescue LagoAPI::ApiError => e
187
+ puts "Error when calling AnalyticsApi->find_all_mrrs: #{e}"
188
+ end
189
+ ```
190
+
191
+ #### Using the find_all_mrrs_with_http_info variant
192
+
193
+ This returns an Array which contains the response data, status code and headers.
194
+
195
+ > <Array(<Mrrs>, Integer, Hash)> find_all_mrrs_with_http_info(opts)
196
+
197
+ ```ruby
198
+ begin
199
+ # List MRR
200
+ data, status_code, headers = api_instance.find_all_mrrs_with_http_info(opts)
201
+ p status_code # => 2xx
202
+ p headers # => { ... }
203
+ p data # => <Mrrs>
204
+ rescue LagoAPI::ApiError => e
205
+ puts "Error when calling AnalyticsApi->find_all_mrrs_with_http_info: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ | Name | Type | Description | Notes |
212
+ | ---- | ---- | ----------- | ----- |
213
+ | **currency** | [**Currency**](.md) | Quantifies the revenue generated from &#x60;subscription&#x60; fees on a monthly basis. This figure is calculated post-application of applicable taxes and prior to the deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - Revenue from &#x60;monthly&#x60; subscription invoices is included in the MRR for the month in which the invoice is issued. - Revenue from &#x60;quarterly&#x60; subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next three months) as well as to fees paid in arrears (allocated to the preceding three months). - Revenue from &#x60;yearly&#x60; subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next twelve months) and for fees paid in arrears (spread over the previous twelve months). - Revenue from &#x60;weekly&#x60; subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month. | [optional] |
214
+ | **months** | **Integer** | Show data only for given number of months. | [optional] |
215
+
216
+ ### Return type
217
+
218
+ [**Mrrs**](Mrrs.md)
219
+
220
+ ### Authorization
221
+
222
+ [bearerAuth](../README.md#bearerAuth)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: Not defined
227
+ - **Accept**: application/json
228
+
229
+
230
+ ## find_all_outstanding_invoices
231
+
232
+ > <OutstandingInvoices> find_all_outstanding_invoices(opts)
233
+
234
+ List outstanding invoices
235
+
236
+ Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
237
+
238
+ ### Examples
239
+
240
+ ```ruby
241
+ require 'time'
242
+ require 'lago_ruby'
243
+ # setup authorization
244
+ LagoAPI.configure do |config|
245
+ # Configure Bearer authorization: bearerAuth
246
+ config.access_token = 'YOUR_BEARER_TOKEN'
247
+ end
248
+
249
+ api_instance = LagoAPI::AnalyticsApi.new
250
+ opts = {
251
+ currency: LagoAPI::Currency::AED # Currency | The currency of revenue analytics. Format must be ISO 4217.
252
+ }
253
+
254
+ begin
255
+ # List outstanding invoices
256
+ result = api_instance.find_all_outstanding_invoices(opts)
257
+ p result
258
+ rescue LagoAPI::ApiError => e
259
+ puts "Error when calling AnalyticsApi->find_all_outstanding_invoices: #{e}"
260
+ end
261
+ ```
262
+
263
+ #### Using the find_all_outstanding_invoices_with_http_info variant
264
+
265
+ This returns an Array which contains the response data, status code and headers.
266
+
267
+ > <Array(<OutstandingInvoices>, Integer, Hash)> find_all_outstanding_invoices_with_http_info(opts)
268
+
269
+ ```ruby
270
+ begin
271
+ # List outstanding invoices
272
+ data, status_code, headers = api_instance.find_all_outstanding_invoices_with_http_info(opts)
273
+ p status_code # => 2xx
274
+ p headers # => { ... }
275
+ p data # => <OutstandingInvoices>
276
+ rescue LagoAPI::ApiError => e
277
+ puts "Error when calling AnalyticsApi->find_all_outstanding_invoices_with_http_info: #{e}"
278
+ end
279
+ ```
280
+
281
+ ### Parameters
282
+
283
+ | Name | Type | Description | Notes |
284
+ | ---- | ---- | ----------- | ----- |
285
+ | **currency** | [**Currency**](.md) | The currency of revenue analytics. Format must be ISO 4217. | [optional] |
286
+
287
+ ### Return type
288
+
289
+ [**OutstandingInvoices**](OutstandingInvoices.md)
290
+
291
+ ### Authorization
292
+
293
+ [bearerAuth](../README.md#bearerAuth)
294
+
295
+ ### HTTP request headers
296
+
297
+ - **Content-Type**: Not defined
298
+ - **Accept**: application/json
299
+
@@ -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&lt;CreditNoteCreateInputCreditNoteItemsInner&gt;**](CreditNoteCreateInputCreditNoteItemsInner.md) | The list of credit note’s items. | |
12
+ | **items** | [**Array&lt;CreditNoteEstimateInputCreditNoteItemsInner&gt;**](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&lt;CreditNoteEstimateInputCreditNoteItemsInner&gt;**](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: [{&quot;fee_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a90&quot;,&quot;amount_cents&quot;:10},{&quot;fee_id&quot;:&quot;1a901a90-1a90-1a90-1a90-1a901a901a91&quot;,&quot;amount_cents&quot;: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&lt;CreditNoteEstimatedEstimatedCreditNoteItemsInner&gt;**](CreditNoteEstimatedEstimatedCreditNoteItemsInner.md) | Array of credit note’s items. | |
17
+ | **applied_taxes** | [**Array&lt;CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner&gt;**](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
+