lago_ruby 0.46.1.pre.beta → 0.49.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/Gemfile.lock +1 -1
  3. data/README.md +15 -10
  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 +3 -1
  8. data/docs/BillableMetricCreateInputBillableMetric.md +3 -1
  9. data/docs/BillableMetricObject.md +3 -1
  10. data/docs/ChargeObject.md +2 -0
  11. data/docs/CouponObject.md +3 -1
  12. data/docs/CreditNoteItemObjectFee.md +2 -0
  13. data/docs/CreditObjectItem.md +2 -2
  14. data/docs/CustomerChargeUsageObject.md +2 -0
  15. data/docs/CustomerChargeUsageObjectGroupsInner.md +2 -0
  16. data/docs/CustomerPastUsage.md +20 -0
  17. data/docs/CustomerUsageObject.md +2 -0
  18. data/docs/CustomersApi.md +82 -0
  19. data/docs/EventInputEvent.md +2 -2
  20. data/docs/EventInputEventTimestamp.md +15 -0
  21. data/docs/EventObject.md +1 -1
  22. data/docs/FeeObject.md +2 -0
  23. data/docs/FeeObjectItem.md +2 -0
  24. data/docs/GroupPropertiesObject.md +2 -0
  25. data/docs/InvoiceOneOffCreateInputInvoiceFeesInner.md +2 -0
  26. data/docs/PlanCreateInputPlan.md +3 -1
  27. data/docs/PlanCreateInputPlanChargesInner.md +2 -0
  28. data/docs/PlanObject.md +3 -1
  29. data/docs/PlanUpdateInputPlan.md +3 -1
  30. data/docs/PlanUpdateInputPlanChargesInner.md +2 -0
  31. data/docs/SubscriptionCreateInputSubscription.md +2 -0
  32. data/docs/SubscriptionObject.md +2 -0
  33. data/docs/SubscriptionUpdateInputSubscription.md +2 -0
  34. data/docs/SubscriptionsApi.md +70 -0
  35. data/docs/WebhookEndpoint.md +18 -0
  36. data/docs/WebhookEndpointCreateInput.md +18 -0
  37. data/docs/WebhookEndpointCreateInputWebhookEndpoint.md +20 -0
  38. data/docs/WebhookEndpointObject.md +26 -0
  39. data/docs/WebhookEndpointUpdateInput.md +18 -0
  40. data/docs/WebhookEndpointsApi.md +28 -28
  41. data/docs/WebhookEndpointsPaginated.md +20 -0
  42. data/lago_ruby.gemspec +2 -2
  43. data/lib/lago_ruby/api/add_ons_api.rb +2 -2
  44. data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
  45. data/lib/lago_ruby/api/coupons_api.rb +2 -2
  46. data/lib/lago_ruby/api/credit_notes_api.rb +2 -2
  47. data/lib/lago_ruby/api/customers_api.rb +84 -2
  48. data/lib/lago_ruby/api/events_api.rb +2 -2
  49. data/lib/lago_ruby/api/fees_api.rb +2 -2
  50. data/lib/lago_ruby/api/invoices_api.rb +2 -2
  51. data/lib/lago_ruby/api/organizations_api.rb +2 -2
  52. data/lib/lago_ruby/api/plans_api.rb +2 -2
  53. data/lib/lago_ruby/api/subscriptions_api.rb +65 -2
  54. data/lib/lago_ruby/api/taxes_api.rb +2 -2
  55. data/lib/lago_ruby/api/wallets_api.rb +2 -2
  56. data/lib/lago_ruby/api/webhook_endpoints_api.rb +35 -35
  57. data/lib/lago_ruby/api/webhooks_api.rb +2 -2
  58. data/lib/lago_ruby/api_client.rb +4 -3
  59. data/lib/lago_ruby/api_error.rb +2 -2
  60. data/lib/lago_ruby/configuration.rb +3 -2
  61. data/lib/lago_ruby/models/add_on.rb +2 -2
  62. data/lib/lago_ruby/models/add_on_base_input.rb +13 -3
  63. data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
  64. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +13 -3
  65. data/lib/lago_ruby/models/add_on_object.rb +13 -3
  66. data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
  67. data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
  68. data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
  69. data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
  70. data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
  71. data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
  72. data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
  73. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
  74. data/lib/lago_ruby/models/applied_coupon.rb +2 -2
  75. data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
  76. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
  77. data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
  78. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
  79. data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
  80. data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
  81. data/lib/lago_ruby/models/billable_metric.rb +2 -2
  82. data/lib/lago_ruby/models/billable_metric_base_input.rb +29 -6
  83. data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
  84. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +29 -6
  85. data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
  86. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
  87. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
  88. data/lib/lago_ruby/models/billable_metric_object.rb +29 -6
  89. data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
  90. data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
  91. data/lib/lago_ruby/models/charge_object.rb +13 -3
  92. data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
  93. data/lib/lago_ruby/models/charge_properties.rb +2 -2
  94. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
  95. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
  96. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
  97. data/lib/lago_ruby/models/country.rb +2 -2
  98. data/lib/lago_ruby/models/coupon.rb +2 -2
  99. data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
  100. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
  101. data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
  102. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
  103. data/lib/lago_ruby/models/coupon_object.rb +16 -6
  104. data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
  105. data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
  106. data/lib/lago_ruby/models/credit_note.rb +2 -2
  107. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
  108. data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
  109. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +2 -2
  110. data/lib/lago_ruby/models/credit_note_create_input_credit_note_items_inner.rb +2 -2
  111. data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
  112. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +13 -3
  113. data/lib/lago_ruby/models/credit_note_object.rb +2 -2
  114. data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
  115. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
  116. data/lib/lago_ruby/models/credit_notes.rb +2 -2
  117. data/lib/lago_ruby/models/credit_object.rb +2 -2
  118. data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
  119. data/lib/lago_ruby/models/credit_object_item.rb +13 -13
  120. data/lib/lago_ruby/models/currency.rb +2 -2
  121. data/lib/lago_ruby/models/customer.rb +2 -2
  122. data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
  123. data/lib/lago_ruby/models/customer_charge_usage_object.rb +20 -3
  124. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
  125. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
  126. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +13 -3
  127. data/lib/lago_ruby/models/customer_create_input.rb +2 -2
  128. data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
  129. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
  130. data/lib/lago_ruby/models/customer_metadata.rb +2 -2
  131. data/lib/lago_ruby/models/customer_object.rb +2 -2
  132. data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
  133. data/lib/lago_ruby/models/customer_past_usage.rb +239 -0
  134. data/lib/lago_ruby/models/customer_usage.rb +2 -2
  135. data/lib/lago_ruby/models/customer_usage_object.rb +14 -3
  136. data/lib/lago_ruby/models/customers_paginated.rb +2 -2
  137. data/lib/lago_ruby/models/event.rb +2 -2
  138. data/lib/lago_ruby/models/event_batch_input.rb +2 -2
  139. data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
  140. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
  141. data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
  142. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
  143. data/lib/lago_ruby/models/event_input.rb +2 -2
  144. data/lib/lago_ruby/models/event_input_event.rb +3 -4
  145. data/lib/lago_ruby/models/event_input_event_timestamp.rb +105 -0
  146. data/lib/lago_ruby/models/event_object.rb +2 -2
  147. data/lib/lago_ruby/models/event_object_properties.rb +2 -2
  148. data/lib/lago_ruby/models/fee.rb +2 -2
  149. data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
  150. data/lib/lago_ruby/models/fee_object.rb +13 -3
  151. data/lib/lago_ruby/models/fee_object_item.rb +13 -3
  152. data/lib/lago_ruby/models/fee_update_input.rb +2 -2
  153. data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
  154. data/lib/lago_ruby/models/fees.rb +2 -2
  155. data/lib/lago_ruby/models/fees_paginated.rb +2 -2
  156. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
  157. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
  158. data/lib/lago_ruby/models/group_object.rb +2 -2
  159. data/lib/lago_ruby/models/group_properties_object.rb +13 -3
  160. data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
  161. data/lib/lago_ruby/models/groups_paginated.rb +2 -2
  162. data/lib/lago_ruby/models/invoice.rb +2 -2
  163. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
  164. data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
  165. data/lib/lago_ruby/models/invoice_object.rb +2 -2
  166. data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
  167. data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
  168. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
  169. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
  170. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +13 -3
  171. data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
  172. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
  173. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
  174. data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
  175. data/lib/lago_ruby/models/organization.rb +2 -2
  176. data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
  177. data/lib/lago_ruby/models/organization_object.rb +2 -2
  178. data/lib/lago_ruby/models/organization_update_input.rb +2 -2
  179. data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
  180. data/lib/lago_ruby/models/pagination_meta.rb +2 -2
  181. data/lib/lago_ruby/models/plan.rb +2 -2
  182. data/lib/lago_ruby/models/plan_create_input.rb +2 -2
  183. data/lib/lago_ruby/models/plan_create_input_plan.rb +13 -3
  184. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +13 -3
  185. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
  186. data/lib/lago_ruby/models/plan_object.rb +13 -3
  187. data/lib/lago_ruby/models/plan_update_input.rb +2 -2
  188. data/lib/lago_ruby/models/plan_update_input_plan.rb +13 -3
  189. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +13 -3
  190. data/lib/lago_ruby/models/plans_paginated.rb +2 -2
  191. data/lib/lago_ruby/models/subscription.rb +2 -2
  192. data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
  193. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +13 -3
  194. data/lib/lago_ruby/models/subscription_object.rb +13 -3
  195. data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
  196. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +13 -3
  197. data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
  198. data/lib/lago_ruby/models/tax.rb +2 -2
  199. data/lib/lago_ruby/models/tax_base_input.rb +2 -2
  200. data/lib/lago_ruby/models/tax_create_input.rb +2 -2
  201. data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
  202. data/lib/lago_ruby/models/tax_object.rb +2 -2
  203. data/lib/lago_ruby/models/tax_update_input.rb +2 -2
  204. data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
  205. data/lib/lago_ruby/models/timezone.rb +2 -2
  206. data/lib/lago_ruby/models/wallet.rb +2 -2
  207. data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
  208. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
  209. data/lib/lago_ruby/models/wallet_object.rb +2 -2
  210. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
  211. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
  212. data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
  213. data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
  214. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
  215. data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
  216. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
  217. data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
  218. data/lib/lago_ruby/models/webhook_endpoint.rb +221 -0
  219. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +214 -0
  220. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +267 -0
  221. data/lib/lago_ruby/models/webhook_endpoint_object.rb +317 -0
  222. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +214 -0
  223. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +239 -0
  224. data/lib/lago_ruby/version.rb +3 -3
  225. data/lib/lago_ruby.rb +10 -7
  226. data/spec/api_client_spec.rb +2 -2
  227. data/spec/configuration_spec.rb +2 -2
  228. data/spec/models/customer_past_usage_spec.rb +42 -0
  229. data/spec/models/event_input_event_timestamp_spec.rb +21 -0
  230. data/spec/models/{create_webhook_endpoint_request_spec.rb → webhook_endpoint_create_input_spec.rb} +8 -8
  231. data/spec/models/{create_webhook_endpoint_request_webhook_endpoint_spec.rb → webhook_endpoint_create_input_webhook_endpoint_spec.rb} +8 -8
  232. data/spec/models/{create_webhook_endpoint200_response_webhook_endpoint_spec.rb → webhook_endpoint_object_spec.rb} +8 -8
  233. data/spec/models/{create_webhook_endpoint200_response_spec.rb → webhook_endpoint_spec.rb} +8 -8
  234. data/spec/models/webhook_endpoint_update_input_spec.rb +34 -0
  235. data/spec/models/{find_all_webhook_endpoints200_response_spec.rb → webhook_endpoints_paginated_spec.rb} +8 -8
  236. data/spec/spec_helper.rb +2 -2
  237. metadata +179 -157
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -18,6 +18,9 @@ module LagoAPI
18
18
  # The name of the add-on.
19
19
  attr_accessor :name
20
20
 
21
+ # 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
+ attr_accessor :invoice_display_name
23
+
21
24
  # Unique code used to identify the add-on.
22
25
  attr_accessor :code
23
26
 
@@ -36,6 +39,7 @@ module LagoAPI
36
39
  def self.attribute_map
37
40
  {
38
41
  :'name' => :'name',
42
+ :'invoice_display_name' => :'invoice_display_name',
39
43
  :'code' => :'code',
40
44
  :'amount_cents' => :'amount_cents',
41
45
  :'amount_currency' => :'amount_currency',
@@ -53,6 +57,7 @@ module LagoAPI
53
57
  def self.openapi_types
54
58
  {
55
59
  :'name' => :'String',
60
+ :'invoice_display_name' => :'String',
56
61
  :'code' => :'String',
57
62
  :'amount_cents' => :'Integer',
58
63
  :'amount_currency' => :'Currency',
@@ -87,6 +92,10 @@ module LagoAPI
87
92
  self.name = attributes[:'name']
88
93
  end
89
94
 
95
+ if attributes.key?(:'invoice_display_name')
96
+ self.invoice_display_name = attributes[:'invoice_display_name']
97
+ end
98
+
90
99
  if attributes.key?(:'code')
91
100
  self.code = attributes[:'code']
92
101
  end
@@ -131,6 +140,7 @@ module LagoAPI
131
140
  return true if self.equal?(o)
132
141
  self.class == o.class &&
133
142
  name == o.name &&
143
+ invoice_display_name == o.invoice_display_name &&
134
144
  code == o.code &&
135
145
  amount_cents == o.amount_cents &&
136
146
  amount_currency == o.amount_currency &&
@@ -147,7 +157,7 @@ module LagoAPI
147
157
  # Calculates hash code according to all attributes.
148
158
  # @return [Integer] Hash code
149
159
  def hash
150
- [name, code, amount_cents, amount_currency, description, tax_codes].hash
160
+ [name, invoice_display_name, code, amount_cents, amount_currency, description, tax_codes].hash
151
161
  end
152
162
 
153
163
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -18,6 +18,9 @@ module LagoAPI
18
18
  # The name of the add-on.
19
19
  attr_accessor :name
20
20
 
21
+ # 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
+ attr_accessor :invoice_display_name
23
+
21
24
  # Unique code used to identify the add-on.
22
25
  attr_accessor :code
23
26
 
@@ -36,6 +39,7 @@ module LagoAPI
36
39
  def self.attribute_map
37
40
  {
38
41
  :'name' => :'name',
42
+ :'invoice_display_name' => :'invoice_display_name',
39
43
  :'code' => :'code',
40
44
  :'amount_cents' => :'amount_cents',
41
45
  :'amount_currency' => :'amount_currency',
@@ -53,6 +57,7 @@ module LagoAPI
53
57
  def self.openapi_types
54
58
  {
55
59
  :'name' => :'String',
60
+ :'invoice_display_name' => :'String',
56
61
  :'code' => :'String',
57
62
  :'amount_cents' => :'Integer',
58
63
  :'amount_currency' => :'Currency',
@@ -96,6 +101,10 @@ module LagoAPI
96
101
  self.name = nil
97
102
  end
98
103
 
104
+ if attributes.key?(:'invoice_display_name')
105
+ self.invoice_display_name = attributes[:'invoice_display_name']
106
+ end
107
+
99
108
  if attributes.key?(:'code')
100
109
  self.code = attributes[:'code']
101
110
  else
@@ -166,6 +175,7 @@ module LagoAPI
166
175
  return true if self.equal?(o)
167
176
  self.class == o.class &&
168
177
  name == o.name &&
178
+ invoice_display_name == o.invoice_display_name &&
169
179
  code == o.code &&
170
180
  amount_cents == o.amount_cents &&
171
181
  amount_currency == o.amount_currency &&
@@ -182,7 +192,7 @@ module LagoAPI
182
192
  # Calculates hash code according to all attributes.
183
193
  # @return [Integer] Hash code
184
194
  def hash
185
- [name, code, amount_cents, amount_currency, description, tax_codes].hash
195
+ [name, invoice_display_name, code, amount_cents, amount_currency, description, tax_codes].hash
186
196
  end
187
197
 
188
198
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -21,6 +21,9 @@ module LagoAPI
21
21
  # The name of the add-on.
22
22
  attr_accessor :name
23
23
 
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.
25
+ attr_accessor :invoice_display_name
26
+
24
27
  # Unique code used to identify the add-on.
25
28
  attr_accessor :code
26
29
 
@@ -43,6 +46,7 @@ module LagoAPI
43
46
  {
44
47
  :'lago_id' => :'lago_id',
45
48
  :'name' => :'name',
49
+ :'invoice_display_name' => :'invoice_display_name',
46
50
  :'code' => :'code',
47
51
  :'amount_cents' => :'amount_cents',
48
52
  :'amount_currency' => :'amount_currency',
@@ -62,6 +66,7 @@ module LagoAPI
62
66
  {
63
67
  :'lago_id' => :'String',
64
68
  :'name' => :'String',
69
+ :'invoice_display_name' => :'String',
65
70
  :'code' => :'String',
66
71
  :'amount_cents' => :'Integer',
67
72
  :'amount_currency' => :'Currency',
@@ -105,6 +110,10 @@ module LagoAPI
105
110
  self.name = nil
106
111
  end
107
112
 
113
+ if attributes.key?(:'invoice_display_name')
114
+ self.invoice_display_name = attributes[:'invoice_display_name']
115
+ end
116
+
108
117
  if attributes.key?(:'code')
109
118
  self.code = attributes[:'code']
110
119
  else
@@ -192,6 +201,7 @@ module LagoAPI
192
201
  self.class == o.class &&
193
202
  lago_id == o.lago_id &&
194
203
  name == o.name &&
204
+ invoice_display_name == o.invoice_display_name &&
195
205
  code == o.code &&
196
206
  amount_cents == o.amount_cents &&
197
207
  amount_currency == o.amount_currency &&
@@ -209,7 +219,7 @@ module LagoAPI
209
219
  # Calculates hash code according to all attributes.
210
220
  # @return [Integer] Hash code
211
221
  def hash
212
- [lago_id, name, code, amount_cents, amount_currency, description, created_at, taxes].hash
222
+ [lago_id, name, invoice_display_name, code, amount_cents, amount_currency, description, created_at, taxes].hash
213
223
  end
214
224
 
215
225
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -30,9 +30,12 @@ module LagoAPI
30
30
  # Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
31
31
  attr_accessor :field_name
32
32
 
33
- # Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
33
+ # Aggregation method used to compute usage for this billable metric.
34
34
  attr_accessor :aggregation_type
35
35
 
36
+ # 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`.
37
+ attr_accessor :weighted_interval
38
+
36
39
  attr_accessor :group
37
40
 
38
41
  class EnumAttributeValidator
@@ -66,6 +69,7 @@ module LagoAPI
66
69
  :'recurring' => :'recurring',
67
70
  :'field_name' => :'field_name',
68
71
  :'aggregation_type' => :'aggregation_type',
72
+ :'weighted_interval' => :'weighted_interval',
69
73
  :'group' => :'group'
70
74
  }
71
75
  end
@@ -84,6 +88,7 @@ module LagoAPI
84
88
  :'recurring' => :'Boolean',
85
89
  :'field_name' => :'String',
86
90
  :'aggregation_type' => :'String',
91
+ :'weighted_interval' => :'String',
87
92
  :'group' => :'BillableMetricGroup'
88
93
  }
89
94
  end
@@ -93,6 +98,7 @@ module LagoAPI
93
98
  Set.new([
94
99
  :'description',
95
100
  :'field_name',
101
+ :'weighted_interval',
96
102
  ])
97
103
  end
98
104
 
@@ -135,6 +141,10 @@ module LagoAPI
135
141
  self.aggregation_type = attributes[:'aggregation_type']
136
142
  end
137
143
 
144
+ if attributes.key?(:'weighted_interval')
145
+ self.weighted_interval = attributes[:'weighted_interval']
146
+ end
147
+
138
148
  if attributes.key?(:'group')
139
149
  self.group = attributes[:'group']
140
150
  end
@@ -152,21 +162,33 @@ module LagoAPI
152
162
  # @return true if the model is valid
153
163
  def valid?
154
164
  warn '[DEPRECATED] the `valid?` method is obsolete'
155
- aggregation_type_validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg"])
165
+ aggregation_type_validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg", "weighted_sum_agg", "latest_agg"])
156
166
  return false unless aggregation_type_validator.valid?(@aggregation_type)
167
+ weighted_interval_validator = EnumAttributeValidator.new('String', ["seconds"])
168
+ return false unless weighted_interval_validator.valid?(@weighted_interval)
157
169
  true
158
170
  end
159
171
 
160
172
  # Custom attribute writer method checking allowed values (enum).
161
173
  # @param [Object] aggregation_type Object to be assigned
162
174
  def aggregation_type=(aggregation_type)
163
- validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg"])
175
+ validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg", "weighted_sum_agg", "latest_agg"])
164
176
  unless validator.valid?(aggregation_type)
165
177
  fail ArgumentError, "invalid value for \"aggregation_type\", must be one of #{validator.allowable_values}."
166
178
  end
167
179
  @aggregation_type = aggregation_type
168
180
  end
169
181
 
182
+ # Custom attribute writer method checking allowed values (enum).
183
+ # @param [Object] weighted_interval Object to be assigned
184
+ def weighted_interval=(weighted_interval)
185
+ validator = EnumAttributeValidator.new('String', ["seconds"])
186
+ unless validator.valid?(weighted_interval)
187
+ fail ArgumentError, "invalid value for \"weighted_interval\", must be one of #{validator.allowable_values}."
188
+ end
189
+ @weighted_interval = weighted_interval
190
+ end
191
+
170
192
  # Checks equality by comparing each attribute.
171
193
  # @param [Object] Object to be compared
172
194
  def ==(o)
@@ -178,6 +200,7 @@ module LagoAPI
178
200
  recurring == o.recurring &&
179
201
  field_name == o.field_name &&
180
202
  aggregation_type == o.aggregation_type &&
203
+ weighted_interval == o.weighted_interval &&
181
204
  group == o.group
182
205
  end
183
206
 
@@ -190,7 +213,7 @@ module LagoAPI
190
213
  # Calculates hash code according to all attributes.
191
214
  # @return [Integer] Hash code
192
215
  def hash
193
- [name, code, description, recurring, field_name, aggregation_type, group].hash
216
+ [name, code, description, recurring, field_name, aggregation_type, weighted_interval, group].hash
194
217
  end
195
218
 
196
219
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
5
5
 
6
- The version of the OpenAPI document: 0.46.1-beta
6
+ The version of the OpenAPI document: 0.49.0-beta
7
7
  Contact: tech@getlago.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.1-SNAPSHOT
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
10
 
11
11
  =end
12
12