lago_ruby 0.51.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 (237) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/AddOnCreateInputAddOn.md +1 -1
  4. data/docs/AnalyticsApi.md +299 -0
  5. data/docs/CreditNoteItemObjectFee.md +4 -4
  6. data/docs/CustomerChargeUsageObjectCharge.md +3 -1
  7. data/docs/CustomersApi.md +70 -0
  8. data/docs/FeeObject.md +4 -4
  9. data/docs/GenerateCustomerCheckoutURL200Response.md +24 -0
  10. data/docs/GrossRevenueObject.md +22 -0
  11. data/docs/GrossRevenues.md +18 -0
  12. data/docs/InvoicedUsageObject.md +24 -0
  13. data/docs/InvoicedUsages.md +18 -0
  14. data/docs/MrrObject.md +22 -0
  15. data/docs/Mrrs.md +18 -0
  16. data/docs/OrganizationObject.md +2 -0
  17. data/docs/OrganizationUpdateInputOrganization.md +2 -0
  18. data/docs/OutstandingInvoiceObject.md +26 -0
  19. data/docs/OutstandingInvoices.md +18 -0
  20. data/docs/PlanOverridesObjectChargesInner.md +2 -0
  21. data/lago_ruby.gemspec +1 -1
  22. data/lib/lago_ruby/api/add_ons_api.rb +1 -1
  23. data/lib/lago_ruby/api/analytics_api.rb +268 -0
  24. data/lib/lago_ruby/api/billable_metrics_api.rb +1 -1
  25. data/lib/lago_ruby/api/coupons_api.rb +1 -1
  26. data/lib/lago_ruby/api/credit_notes_api.rb +1 -1
  27. data/lib/lago_ruby/api/customers_api.rb +64 -1
  28. data/lib/lago_ruby/api/events_api.rb +1 -1
  29. data/lib/lago_ruby/api/fees_api.rb +1 -1
  30. data/lib/lago_ruby/api/invoices_api.rb +1 -1
  31. data/lib/lago_ruby/api/organizations_api.rb +1 -1
  32. data/lib/lago_ruby/api/plans_api.rb +1 -1
  33. data/lib/lago_ruby/api/subscriptions_api.rb +1 -1
  34. data/lib/lago_ruby/api/taxes_api.rb +1 -1
  35. data/lib/lago_ruby/api/wallets_api.rb +1 -1
  36. data/lib/lago_ruby/api/webhook_endpoints_api.rb +1 -1
  37. data/lib/lago_ruby/api/webhooks_api.rb +1 -1
  38. data/lib/lago_ruby/api_client.rb +1 -1
  39. data/lib/lago_ruby/api_error.rb +1 -1
  40. data/lib/lago_ruby/configuration.rb +1 -1
  41. data/lib/lago_ruby/models/add_on.rb +1 -1
  42. data/lib/lago_ruby/models/add_on_base_input.rb +1 -1
  43. data/lib/lago_ruby/models/add_on_create_input.rb +1 -1
  44. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +1 -1
  45. data/lib/lago_ruby/models/add_on_object.rb +1 -1
  46. data/lib/lago_ruby/models/add_on_update_input.rb +1 -1
  47. data/lib/lago_ruby/models/add_ons_paginated.rb +1 -1
  48. data/lib/lago_ruby/models/api_error_bad_request.rb +1 -1
  49. data/lib/lago_ruby/models/api_error_forbidden.rb +1 -1
  50. data/lib/lago_ruby/models/api_error_not_allowed.rb +1 -1
  51. data/lib/lago_ruby/models/api_error_not_found.rb +1 -1
  52. data/lib/lago_ruby/models/api_error_unauthorized.rb +1 -1
  53. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +1 -1
  54. data/lib/lago_ruby/models/applied_coupon.rb +1 -1
  55. data/lib/lago_ruby/models/applied_coupon_input.rb +1 -1
  56. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +1 -1
  57. data/lib/lago_ruby/models/applied_coupon_object.rb +1 -1
  58. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +1 -1
  59. data/lib/lago_ruby/models/applied_coupons_paginated.rb +1 -1
  60. data/lib/lago_ruby/models/base_applied_tax.rb +1 -1
  61. data/lib/lago_ruby/models/billable_metric.rb +1 -1
  62. data/lib/lago_ruby/models/billable_metric_base_input.rb +1 -1
  63. data/lib/lago_ruby/models/billable_metric_create_input.rb +1 -1
  64. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +1 -1
  65. data/lib/lago_ruby/models/billable_metric_group.rb +1 -1
  66. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +1 -1
  67. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +1 -1
  68. data/lib/lago_ruby/models/billable_metric_object.rb +1 -1
  69. data/lib/lago_ruby/models/billable_metric_update_input.rb +1 -1
  70. data/lib/lago_ruby/models/billable_metrics_paginated.rb +1 -1
  71. data/lib/lago_ruby/models/charge_object.rb +1 -1
  72. data/lib/lago_ruby/models/charge_object_properties.rb +1 -1
  73. data/lib/lago_ruby/models/charge_properties.rb +1 -1
  74. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +1 -1
  75. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +1 -1
  76. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +1 -1
  77. data/lib/lago_ruby/models/country.rb +1 -1
  78. data/lib/lago_ruby/models/coupon.rb +1 -1
  79. data/lib/lago_ruby/models/coupon_base_input.rb +1 -1
  80. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +1 -1
  81. data/lib/lago_ruby/models/coupon_create_input.rb +1 -1
  82. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +1 -1
  83. data/lib/lago_ruby/models/coupon_object.rb +1 -1
  84. data/lib/lago_ruby/models/coupon_update_input.rb +1 -1
  85. data/lib/lago_ruby/models/coupons_paginated.rb +1 -1
  86. data/lib/lago_ruby/models/credit_note.rb +1 -1
  87. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +1 -1
  88. data/lib/lago_ruby/models/credit_note_create_input.rb +1 -1
  89. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +1 -1
  90. data/lib/lago_ruby/models/credit_note_estimate_input.rb +1 -1
  91. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +1 -1
  92. data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +1 -1
  93. data/lib/lago_ruby/models/credit_note_estimated.rb +1 -1
  94. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +1 -1
  95. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +1 -1
  96. data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +1 -1
  97. data/lib/lago_ruby/models/credit_note_item_object.rb +1 -1
  98. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +5 -5
  99. data/lib/lago_ruby/models/credit_note_object.rb +1 -1
  100. data/lib/lago_ruby/models/credit_note_update_input.rb +1 -1
  101. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +1 -1
  102. data/lib/lago_ruby/models/credit_notes.rb +1 -1
  103. data/lib/lago_ruby/models/credit_object.rb +1 -1
  104. data/lib/lago_ruby/models/credit_object_invoice.rb +1 -1
  105. data/lib/lago_ruby/models/credit_object_item.rb +1 -1
  106. data/lib/lago_ruby/models/currency.rb +1 -1
  107. data/lib/lago_ruby/models/customer.rb +1 -1
  108. data/lib/lago_ruby/models/customer_billing_configuration.rb +1 -1
  109. data/lib/lago_ruby/models/customer_charge_usage_object.rb +1 -1
  110. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +1 -1
  111. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +15 -5
  112. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +1 -1
  113. data/lib/lago_ruby/models/customer_create_input.rb +1 -1
  114. data/lib/lago_ruby/models/customer_create_input_customer.rb +1 -1
  115. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +1 -1
  116. data/lib/lago_ruby/models/customer_metadata.rb +1 -1
  117. data/lib/lago_ruby/models/customer_object.rb +1 -1
  118. data/lib/lago_ruby/models/customer_object_extended.rb +1 -1
  119. data/lib/lago_ruby/models/customer_past_usage.rb +1 -1
  120. data/lib/lago_ruby/models/customer_usage.rb +1 -1
  121. data/lib/lago_ruby/models/customer_usage_object.rb +1 -1
  122. data/lib/lago_ruby/models/customers_paginated.rb +1 -1
  123. data/lib/lago_ruby/models/event.rb +1 -1
  124. data/lib/lago_ruby/models/event_batch_input.rb +1 -1
  125. data/lib/lago_ruby/models/event_batch_input_event.rb +1 -1
  126. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +1 -1
  127. data/lib/lago_ruby/models/event_estimate_fees_input.rb +1 -1
  128. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +1 -1
  129. data/lib/lago_ruby/models/event_input.rb +1 -1
  130. data/lib/lago_ruby/models/event_input_event.rb +1 -1
  131. data/lib/lago_ruby/models/event_input_event_timestamp.rb +1 -1
  132. data/lib/lago_ruby/models/event_object.rb +1 -1
  133. data/lib/lago_ruby/models/event_object_properties.rb +1 -1
  134. data/lib/lago_ruby/models/fee.rb +1 -1
  135. data/lib/lago_ruby/models/fee_applied_tax_object.rb +1 -1
  136. data/lib/lago_ruby/models/fee_object.rb +5 -5
  137. data/lib/lago_ruby/models/fee_object_item.rb +1 -1
  138. data/lib/lago_ruby/models/fee_update_input.rb +1 -1
  139. data/lib/lago_ruby/models/fee_update_input_fee.rb +1 -1
  140. data/lib/lago_ruby/models/fees.rb +1 -1
  141. data/lib/lago_ruby/models/fees_paginated.rb +1 -1
  142. data/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb +246 -0
  143. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +1 -1
  144. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +1 -1
  145. data/lib/lago_ruby/models/gross_revenue_object.rb +241 -0
  146. data/lib/lago_ruby/models/gross_revenues.rb +223 -0
  147. data/lib/lago_ruby/models/group_object.rb +1 -1
  148. data/lib/lago_ruby/models/group_properties_object.rb +1 -1
  149. data/lib/lago_ruby/models/group_properties_object_values.rb +1 -1
  150. data/lib/lago_ruby/models/groups_paginated.rb +1 -1
  151. data/lib/lago_ruby/models/invoice.rb +1 -1
  152. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +1 -1
  153. data/lib/lago_ruby/models/invoice_metadata_object.rb +1 -1
  154. data/lib/lago_ruby/models/invoice_object.rb +1 -1
  155. data/lib/lago_ruby/models/invoice_object_customer.rb +1 -1
  156. data/lib/lago_ruby/models/invoice_object_extended.rb +1 -1
  157. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +1 -1
  158. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +1 -1
  159. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +1 -1
  160. data/lib/lago_ruby/models/invoice_update_input.rb +1 -1
  161. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +1 -1
  162. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +1 -1
  163. data/lib/lago_ruby/models/invoiced_usage_object.rb +265 -0
  164. data/lib/lago_ruby/models/invoiced_usages.rb +223 -0
  165. data/lib/lago_ruby/models/invoices_paginated.rb +1 -1
  166. data/lib/lago_ruby/models/mrr_object.rb +241 -0
  167. data/lib/lago_ruby/models/mrrs.rb +223 -0
  168. data/lib/lago_ruby/models/organization.rb +1 -1
  169. data/lib/lago_ruby/models/organization_billing_configuration.rb +1 -1
  170. data/lib/lago_ruby/models/organization_object.rb +11 -2
  171. data/lib/lago_ruby/models/organization_update_input.rb +1 -1
  172. data/lib/lago_ruby/models/organization_update_input_organization.rb +11 -2
  173. data/lib/lago_ruby/models/outstanding_invoice_object.rb +309 -0
  174. data/lib/lago_ruby/models/outstanding_invoices.rb +223 -0
  175. data/lib/lago_ruby/models/pagination_meta.rb +1 -1
  176. data/lib/lago_ruby/models/plan.rb +1 -1
  177. data/lib/lago_ruby/models/plan_create_input.rb +1 -1
  178. data/lib/lago_ruby/models/plan_create_input_plan.rb +1 -1
  179. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +1 -1
  180. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +1 -1
  181. data/lib/lago_ruby/models/plan_object.rb +1 -1
  182. data/lib/lago_ruby/models/plan_overrides_object.rb +1 -1
  183. data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +12 -2
  184. data/lib/lago_ruby/models/plan_update_input.rb +1 -1
  185. data/lib/lago_ruby/models/plan_update_input_plan.rb +1 -1
  186. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +1 -1
  187. data/lib/lago_ruby/models/plans_paginated.rb +1 -1
  188. data/lib/lago_ruby/models/subscription.rb +1 -1
  189. data/lib/lago_ruby/models/subscription_create_input.rb +1 -1
  190. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +1 -1
  191. data/lib/lago_ruby/models/subscription_object.rb +1 -1
  192. data/lib/lago_ruby/models/subscription_object_extended.rb +1 -1
  193. data/lib/lago_ruby/models/subscription_update_input.rb +1 -1
  194. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +1 -1
  195. data/lib/lago_ruby/models/subscriptions_paginated.rb +1 -1
  196. data/lib/lago_ruby/models/tax.rb +1 -1
  197. data/lib/lago_ruby/models/tax_base_input.rb +1 -1
  198. data/lib/lago_ruby/models/tax_create_input.rb +1 -1
  199. data/lib/lago_ruby/models/tax_create_input_tax.rb +1 -1
  200. data/lib/lago_ruby/models/tax_object.rb +1 -1
  201. data/lib/lago_ruby/models/tax_update_input.rb +1 -1
  202. data/lib/lago_ruby/models/taxes_paginated.rb +1 -1
  203. data/lib/lago_ruby/models/timezone.rb +1 -1
  204. data/lib/lago_ruby/models/wallet.rb +1 -1
  205. data/lib/lago_ruby/models/wallet_create_input.rb +1 -1
  206. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +1 -1
  207. data/lib/lago_ruby/models/wallet_object.rb +1 -1
  208. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +1 -1
  209. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +1 -1
  210. data/lib/lago_ruby/models/wallet_transaction_object.rb +1 -1
  211. data/lib/lago_ruby/models/wallet_transactions.rb +1 -1
  212. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +1 -1
  213. data/lib/lago_ruby/models/wallet_update_input.rb +1 -1
  214. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +1 -1
  215. data/lib/lago_ruby/models/wallets_paginated.rb +1 -1
  216. data/lib/lago_ruby/models/webhook_endpoint.rb +1 -1
  217. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +1 -1
  218. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +1 -1
  219. data/lib/lago_ruby/models/webhook_endpoint_object.rb +1 -1
  220. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +1 -1
  221. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +1 -1
  222. data/lib/lago_ruby/version.rb +2 -2
  223. data/lib/lago_ruby.rb +11 -1
  224. data/spec/api/analytics_api_spec.rb +85 -0
  225. data/spec/api_client_spec.rb +1 -1
  226. data/spec/configuration_spec.rb +1 -1
  227. data/spec/models/generate_customer_checkout_url200_response_spec.rb +54 -0
  228. data/spec/models/gross_revenue_object_spec.rb +48 -0
  229. data/spec/models/gross_revenues_spec.rb +36 -0
  230. data/spec/models/invoiced_usage_object_spec.rb +54 -0
  231. data/spec/models/invoiced_usages_spec.rb +36 -0
  232. data/spec/models/mrr_object_spec.rb +48 -0
  233. data/spec/models/mrrs_spec.rb +36 -0
  234. data/spec/models/outstanding_invoice_object_spec.rb +64 -0
  235. data/spec/models/outstanding_invoices_spec.rb +36 -0
  236. data/spec/spec_helper.rb +1 -1
  237. metadata +204 -164
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -18,6 +18,9 @@ module LagoAPI
18
18
  # Unique identifier of the charge created by Lago.
19
19
  attr_accessor :id
20
20
 
21
+ # Unique identifier of the billable metric created by Lago.
22
+ attr_accessor :billable_metric_id
23
+
21
24
  # 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.
22
25
  attr_accessor :invoice_display_name
23
26
 
@@ -36,6 +39,7 @@ module LagoAPI
36
39
  def self.attribute_map
37
40
  {
38
41
  :'id' => :'id',
42
+ :'billable_metric_id' => :'billable_metric_id',
39
43
  :'invoice_display_name' => :'invoice_display_name',
40
44
  :'min_amount_cents' => :'min_amount_cents',
41
45
  :'properties' => :'properties',
@@ -53,6 +57,7 @@ module LagoAPI
53
57
  def self.openapi_types
54
58
  {
55
59
  :'id' => :'String',
60
+ :'billable_metric_id' => :'String',
56
61
  :'invoice_display_name' => :'String',
57
62
  :'min_amount_cents' => :'Integer',
58
63
  :'properties' => :'ChargeObjectProperties',
@@ -86,6 +91,10 @@ module LagoAPI
86
91
  self.id = attributes[:'id']
87
92
  end
88
93
 
94
+ if attributes.key?(:'billable_metric_id')
95
+ self.billable_metric_id = attributes[:'billable_metric_id']
96
+ end
97
+
89
98
  if attributes.key?(:'invoice_display_name')
90
99
  self.invoice_display_name = attributes[:'invoice_display_name']
91
100
  end
@@ -132,6 +141,7 @@ module LagoAPI
132
141
  return true if self.equal?(o)
133
142
  self.class == o.class &&
134
143
  id == o.id &&
144
+ billable_metric_id == o.billable_metric_id &&
135
145
  invoice_display_name == o.invoice_display_name &&
136
146
  min_amount_cents == o.min_amount_cents &&
137
147
  properties == o.properties &&
@@ -148,7 +158,7 @@ module LagoAPI
148
158
  # Calculates hash code according to all attributes.
149
159
  # @return [Integer] Hash code
150
160
  def hash
151
- [id, invoice_display_name, min_amount_cents, properties, group_properties, tax_codes].hash
161
+ [id, billable_metric_id, invoice_display_name, min_amount_cents, properties, group_properties, tax_codes].hash
152
162
  end
153
163
 
154
164
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -6,10 +6,10 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  module LagoAPI
14
- VERSION = '0.51.0-beta'
14
+ VERSION = '0.52.0-beta'
15
15
  end
data/lib/lago_ruby.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 0.51.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -118,8 +118,11 @@ require 'lago_ruby/models/fee_update_input'
118
118
  require 'lago_ruby/models/fee_update_input_fee'
119
119
  require 'lago_ruby/models/fees'
120
120
  require 'lago_ruby/models/fees_paginated'
121
+ require 'lago_ruby/models/generate_customer_checkout_url200_response'
121
122
  require 'lago_ruby/models/get_customer_portal_url200_response'
122
123
  require 'lago_ruby/models/get_customer_portal_url200_response_customer'
124
+ require 'lago_ruby/models/gross_revenue_object'
125
+ require 'lago_ruby/models/gross_revenues'
123
126
  require 'lago_ruby/models/group_object'
124
127
  require 'lago_ruby/models/group_properties_object'
125
128
  require 'lago_ruby/models/group_properties_object_values'
@@ -136,12 +139,18 @@ require 'lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner'
136
139
  require 'lago_ruby/models/invoice_update_input'
137
140
  require 'lago_ruby/models/invoice_update_input_invoice'
138
141
  require 'lago_ruby/models/invoice_update_input_invoice_metadata_inner'
142
+ require 'lago_ruby/models/invoiced_usage_object'
143
+ require 'lago_ruby/models/invoiced_usages'
139
144
  require 'lago_ruby/models/invoices_paginated'
145
+ require 'lago_ruby/models/mrr_object'
146
+ require 'lago_ruby/models/mrrs'
140
147
  require 'lago_ruby/models/organization'
141
148
  require 'lago_ruby/models/organization_billing_configuration'
142
149
  require 'lago_ruby/models/organization_object'
143
150
  require 'lago_ruby/models/organization_update_input'
144
151
  require 'lago_ruby/models/organization_update_input_organization'
152
+ require 'lago_ruby/models/outstanding_invoice_object'
153
+ require 'lago_ruby/models/outstanding_invoices'
145
154
  require 'lago_ruby/models/pagination_meta'
146
155
  require 'lago_ruby/models/plan'
147
156
  require 'lago_ruby/models/plan_create_input'
@@ -192,6 +201,7 @@ require 'lago_ruby/models/webhook_endpoints_paginated'
192
201
 
193
202
  # APIs
194
203
  require 'lago_ruby/api/add_ons_api'
204
+ require 'lago_ruby/api/analytics_api'
195
205
  require 'lago_ruby/api/billable_metrics_api'
196
206
  require 'lago_ruby/api/coupons_api'
197
207
  require 'lago_ruby/api/credit_notes_api'
@@ -0,0 +1,85 @@
1
+ =begin
2
+ #Lago API documentation
3
+
4
+ #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
+
6
+ The version of the OpenAPI document: 0.51.0-beta
7
+ Contact: tech@getlago.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for LagoAPI::AnalyticsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'AnalyticsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = LagoAPI::AnalyticsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of AnalyticsApi' do
30
+ it 'should create an instance of AnalyticsApi' do
31
+ expect(@api_instance).to be_instance_of(LagoAPI::AnalyticsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for find_all_gross_revenues
36
+ # List gross revenue
37
+ # 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.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Currency] :currency Currency of revenue analytics. Format must be ISO 4217.
40
+ # @option opts [String] :external_customer_id The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
41
+ # @return [GrossRevenues]
42
+ describe 'find_all_gross_revenues test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ # unit tests for find_all_invoiced_usages
49
+ # List usage revenue
50
+ # 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.
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [Currency] :currency The currency of invoiced usage analytics. Format must be ISO 4217.
53
+ # @return [InvoicedUsages]
54
+ describe 'find_all_invoiced_usages test' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ # unit tests for find_all_mrrs
61
+ # List MRR
62
+ # This endpoint is used to list MRR.
63
+ # @param [Hash] opts the optional parameters
64
+ # @option opts [Currency] :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.
65
+ # @option opts [Integer] :months Show data only for given number of months.
66
+ # @return [Mrrs]
67
+ describe 'find_all_mrrs test' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
70
+ end
71
+ end
72
+
73
+ # unit tests for find_all_outstanding_invoices
74
+ # List outstanding invoices
75
+ # 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`.
76
+ # @param [Hash] opts the optional parameters
77
+ # @option opts [Currency] :currency The currency of revenue analytics. Format must be ISO 4217.
78
+ # @return [OutstandingInvoices]
79
+ describe 'find_all_outstanding_invoices test' do
80
+ it 'should work' do
81
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
82
+ end
83
+ end
84
+
85
+ end