lago_ruby 0.46.0.pre.beta → 0.48.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +17 -19
  4. data/docs/AddOnsApi.md +0 -70
  5. data/docs/BillableMetricBaseInput.md +2 -0
  6. data/docs/BillableMetricCreateInputBillableMetric.md +2 -0
  7. data/docs/BillableMetricObject.md +2 -0
  8. data/docs/CouponObject.md +3 -1
  9. data/docs/CreditObjectItem.md +2 -2
  10. data/docs/EventInputEvent.md +4 -4
  11. data/docs/EventInputEventProperties.md +18 -0
  12. data/docs/EventInputEventTimestamp.md +15 -0
  13. data/docs/EventObject.md +2 -2
  14. data/docs/EventObjectProperties.md +18 -0
  15. data/docs/SubscriptionCreateInputSubscription.md +2 -0
  16. data/docs/SubscriptionObject.md +2 -0
  17. data/docs/SubscriptionUpdateInputSubscription.md +2 -0
  18. data/docs/WebhookEndpoint.md +18 -0
  19. data/docs/WebhookEndpointCreateInput.md +18 -0
  20. data/docs/WebhookEndpointCreateInputWebhookEndpoint.md +20 -0
  21. data/docs/WebhookEndpointObject.md +26 -0
  22. data/docs/WebhookEndpointUpdateInput.md +18 -0
  23. data/docs/WebhookEndpointsApi.md +28 -28
  24. data/docs/WebhookEndpointsPaginated.md +20 -0
  25. data/lago_ruby.gemspec +2 -2
  26. data/lib/lago_ruby/api/add_ons_api.rb +2 -70
  27. data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
  28. data/lib/lago_ruby/api/coupons_api.rb +2 -2
  29. data/lib/lago_ruby/api/credit_notes_api.rb +2 -2
  30. data/lib/lago_ruby/api/customers_api.rb +2 -2
  31. data/lib/lago_ruby/api/events_api.rb +2 -2
  32. data/lib/lago_ruby/api/fees_api.rb +2 -2
  33. data/lib/lago_ruby/api/invoices_api.rb +2 -2
  34. data/lib/lago_ruby/api/organizations_api.rb +2 -2
  35. data/lib/lago_ruby/api/plans_api.rb +2 -2
  36. data/lib/lago_ruby/api/subscriptions_api.rb +2 -2
  37. data/lib/lago_ruby/api/taxes_api.rb +2 -2
  38. data/lib/lago_ruby/api/wallets_api.rb +2 -2
  39. data/lib/lago_ruby/api/webhook_endpoints_api.rb +35 -35
  40. data/lib/lago_ruby/api/webhooks_api.rb +2 -2
  41. data/lib/lago_ruby/api_client.rb +2 -2
  42. data/lib/lago_ruby/api_error.rb +2 -2
  43. data/lib/lago_ruby/configuration.rb +2 -2
  44. data/lib/lago_ruby/models/add_on.rb +2 -2
  45. data/lib/lago_ruby/models/add_on_base_input.rb +2 -2
  46. data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
  47. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +2 -2
  48. data/lib/lago_ruby/models/add_on_object.rb +2 -2
  49. data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
  50. data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
  51. data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
  52. data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
  53. data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
  54. data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
  55. data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
  56. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
  57. data/lib/lago_ruby/models/applied_add_on.rb +1 -1
  58. data/lib/lago_ruby/models/applied_add_on_input.rb +1 -1
  59. data/lib/lago_ruby/models/applied_add_on_input_applied_add_on.rb +1 -1
  60. data/lib/lago_ruby/models/applied_add_on_object.rb +1 -1
  61. data/lib/lago_ruby/models/applied_coupon.rb +2 -2
  62. data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
  63. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
  64. data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
  65. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
  66. data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
  67. data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
  68. data/lib/lago_ruby/models/billable_metric.rb +2 -2
  69. data/lib/lago_ruby/models/billable_metric_base_input.rb +28 -5
  70. data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
  71. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +28 -5
  72. data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
  73. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
  74. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
  75. data/lib/lago_ruby/models/billable_metric_object.rb +28 -5
  76. data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
  77. data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
  78. data/lib/lago_ruby/models/charge_object.rb +2 -2
  79. data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
  80. data/lib/lago_ruby/models/charge_properties.rb +2 -2
  81. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
  82. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
  83. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
  84. data/lib/lago_ruby/models/country.rb +2 -2
  85. data/lib/lago_ruby/models/coupon.rb +2 -2
  86. data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
  87. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
  88. data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
  89. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
  90. data/lib/lago_ruby/models/coupon_object.rb +16 -6
  91. data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
  92. data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
  93. data/lib/lago_ruby/models/create_webhook_endpoint200_response.rb +1 -1
  94. data/lib/lago_ruby/models/create_webhook_endpoint200_response_webhook_endpoint.rb +1 -1
  95. data/lib/lago_ruby/models/create_webhook_endpoint_request.rb +1 -1
  96. data/lib/lago_ruby/models/create_webhook_endpoint_request_webhook_endpoint.rb +1 -1
  97. data/lib/lago_ruby/models/credit_note.rb +2 -2
  98. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
  99. data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
  100. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +2 -2
  101. data/lib/lago_ruby/models/credit_note_create_input_credit_note_items_inner.rb +2 -2
  102. data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
  103. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +2 -2
  104. data/lib/lago_ruby/models/credit_note_object.rb +2 -2
  105. data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
  106. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
  107. data/lib/lago_ruby/models/credit_notes.rb +2 -2
  108. data/lib/lago_ruby/models/credit_object.rb +2 -2
  109. data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
  110. data/lib/lago_ruby/models/credit_object_item.rb +13 -13
  111. data/lib/lago_ruby/models/currency.rb +2 -2
  112. data/lib/lago_ruby/models/customer.rb +2 -2
  113. data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
  114. data/lib/lago_ruby/models/customer_charge_usage_object.rb +2 -2
  115. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
  116. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
  117. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +2 -2
  118. data/lib/lago_ruby/models/customer_create_input.rb +2 -2
  119. data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
  120. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
  121. data/lib/lago_ruby/models/customer_metadata.rb +2 -2
  122. data/lib/lago_ruby/models/customer_object.rb +2 -2
  123. data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
  124. data/lib/lago_ruby/models/customer_usage.rb +2 -2
  125. data/lib/lago_ruby/models/customer_usage_object.rb +2 -2
  126. data/lib/lago_ruby/models/customers_paginated.rb +2 -2
  127. data/lib/lago_ruby/models/event.rb +2 -2
  128. data/lib/lago_ruby/models/event_batch_input.rb +2 -2
  129. data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
  130. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
  131. data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
  132. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
  133. data/lib/lago_ruby/models/event_input.rb +2 -2
  134. data/lib/lago_ruby/models/event_input_event.rb +8 -6
  135. data/lib/lago_ruby/models/event_input_event_timestamp.rb +105 -0
  136. data/lib/lago_ruby/models/event_object.rb +3 -3
  137. data/lib/lago_ruby/models/event_object_properties.rb +250 -0
  138. data/lib/lago_ruby/models/fee.rb +2 -2
  139. data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
  140. data/lib/lago_ruby/models/fee_object.rb +2 -2
  141. data/lib/lago_ruby/models/fee_object_item.rb +2 -2
  142. data/lib/lago_ruby/models/fee_update_input.rb +2 -2
  143. data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
  144. data/lib/lago_ruby/models/fees.rb +2 -2
  145. data/lib/lago_ruby/models/fees_paginated.rb +2 -2
  146. data/lib/lago_ruby/models/find_all_webhook_endpoints200_response.rb +1 -1
  147. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
  148. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
  149. data/lib/lago_ruby/models/group_object.rb +2 -2
  150. data/lib/lago_ruby/models/group_properties_object.rb +2 -2
  151. data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
  152. data/lib/lago_ruby/models/groups_paginated.rb +2 -2
  153. data/lib/lago_ruby/models/invoice.rb +2 -2
  154. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
  155. data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
  156. data/lib/lago_ruby/models/invoice_object.rb +2 -2
  157. data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
  158. data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
  159. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
  160. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
  161. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +2 -2
  162. data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
  163. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
  164. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
  165. data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
  166. data/lib/lago_ruby/models/organization.rb +2 -2
  167. data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
  168. data/lib/lago_ruby/models/organization_object.rb +2 -2
  169. data/lib/lago_ruby/models/organization_update_input.rb +2 -2
  170. data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
  171. data/lib/lago_ruby/models/pagination_meta.rb +2 -2
  172. data/lib/lago_ruby/models/plan.rb +2 -2
  173. data/lib/lago_ruby/models/plan_create_input.rb +2 -2
  174. data/lib/lago_ruby/models/plan_create_input_plan.rb +2 -2
  175. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +2 -2
  176. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
  177. data/lib/lago_ruby/models/plan_object.rb +2 -2
  178. data/lib/lago_ruby/models/plan_update_input.rb +2 -2
  179. data/lib/lago_ruby/models/plan_update_input_plan.rb +2 -2
  180. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +2 -2
  181. data/lib/lago_ruby/models/plans_paginated.rb +2 -2
  182. data/lib/lago_ruby/models/subscription.rb +2 -2
  183. data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
  184. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +13 -3
  185. data/lib/lago_ruby/models/subscription_object.rb +13 -3
  186. data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
  187. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +13 -3
  188. data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
  189. data/lib/lago_ruby/models/tax.rb +2 -2
  190. data/lib/lago_ruby/models/tax_base_input.rb +2 -2
  191. data/lib/lago_ruby/models/tax_create_input.rb +2 -2
  192. data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
  193. data/lib/lago_ruby/models/tax_object.rb +2 -2
  194. data/lib/lago_ruby/models/tax_update_input.rb +2 -2
  195. data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
  196. data/lib/lago_ruby/models/timezone.rb +2 -2
  197. data/lib/lago_ruby/models/wallet.rb +2 -2
  198. data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
  199. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
  200. data/lib/lago_ruby/models/wallet_object.rb +2 -2
  201. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
  202. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
  203. data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
  204. data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
  205. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
  206. data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
  207. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
  208. data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
  209. data/lib/lago_ruby/models/webhook_endpoint.rb +221 -0
  210. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +214 -0
  211. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +267 -0
  212. data/lib/lago_ruby/models/webhook_endpoint_object.rb +317 -0
  213. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +214 -0
  214. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +239 -0
  215. data/lib/lago_ruby/version.rb +3 -3
  216. data/lib/lago_ruby.rb +10 -11
  217. data/spec/api_client_spec.rb +2 -2
  218. data/spec/configuration_spec.rb +2 -2
  219. data/spec/models/event_input_event_timestamp_spec.rb +21 -0
  220. data/spec/models/event_object_properties_spec.rb +38 -0
  221. data/spec/models/{create_webhook_endpoint_request_spec.rb → webhook_endpoint_create_input_spec.rb} +8 -8
  222. data/spec/models/{create_webhook_endpoint_request_webhook_endpoint_spec.rb → webhook_endpoint_create_input_webhook_endpoint_spec.rb} +8 -8
  223. data/spec/models/{create_webhook_endpoint200_response_webhook_endpoint_spec.rb → webhook_endpoint_object_spec.rb} +8 -8
  224. data/spec/models/{applied_add_on_spec.rb → webhook_endpoint_spec.rb} +9 -9
  225. data/spec/models/{create_webhook_endpoint200_response_spec.rb → webhook_endpoint_update_input_spec.rb} +8 -8
  226. data/spec/models/{find_all_webhook_endpoints200_response_spec.rb → webhook_endpoints_paginated_spec.rb} +8 -8
  227. data/spec/spec_helper.rb +2 -2
  228. metadata +176 -161
  229. data/spec/models/applied_add_on_input_applied_add_on_spec.rb +0 -52
  230. data/spec/models/applied_add_on_input_spec.rb +0 -34
  231. data/spec/models/applied_add_on_object_spec.rb +0 -76
@@ -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.0-beta
6
+ The version of the OpenAPI document: 0.48.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
 
@@ -33,6 +33,9 @@ module LagoAPI
33
33
  # Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
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"])
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"])
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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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
 
@@ -33,6 +33,9 @@ module LagoAPI
33
33
  # Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
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
 
@@ -148,6 +154,10 @@ module LagoAPI
148
154
  self.aggregation_type = nil
149
155
  end
150
156
 
157
+ if attributes.key?(:'weighted_interval')
158
+ self.weighted_interval = attributes[:'weighted_interval']
159
+ end
160
+
151
161
  if attributes.key?(:'group')
152
162
  self.group = attributes[:'group']
153
163
  end
@@ -180,21 +190,33 @@ module LagoAPI
180
190
  return false if @name.nil?
181
191
  return false if @code.nil?
182
192
  return false if @aggregation_type.nil?
183
- aggregation_type_validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg"])
193
+ aggregation_type_validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg", "weighted_sum_agg"])
184
194
  return false unless aggregation_type_validator.valid?(@aggregation_type)
195
+ weighted_interval_validator = EnumAttributeValidator.new('String', ["seconds"])
196
+ return false unless weighted_interval_validator.valid?(@weighted_interval)
185
197
  true
186
198
  end
187
199
 
188
200
  # Custom attribute writer method checking allowed values (enum).
189
201
  # @param [Object] aggregation_type Object to be assigned
190
202
  def aggregation_type=(aggregation_type)
191
- validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg"])
203
+ validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg", "weighted_sum_agg"])
192
204
  unless validator.valid?(aggregation_type)
193
205
  fail ArgumentError, "invalid value for \"aggregation_type\", must be one of #{validator.allowable_values}."
194
206
  end
195
207
  @aggregation_type = aggregation_type
196
208
  end
197
209
 
210
+ # Custom attribute writer method checking allowed values (enum).
211
+ # @param [Object] weighted_interval Object to be assigned
212
+ def weighted_interval=(weighted_interval)
213
+ validator = EnumAttributeValidator.new('String', ["seconds"])
214
+ unless validator.valid?(weighted_interval)
215
+ fail ArgumentError, "invalid value for \"weighted_interval\", must be one of #{validator.allowable_values}."
216
+ end
217
+ @weighted_interval = weighted_interval
218
+ end
219
+
198
220
  # Checks equality by comparing each attribute.
199
221
  # @param [Object] Object to be compared
200
222
  def ==(o)
@@ -206,6 +228,7 @@ module LagoAPI
206
228
  recurring == o.recurring &&
207
229
  field_name == o.field_name &&
208
230
  aggregation_type == o.aggregation_type &&
231
+ weighted_interval == o.weighted_interval &&
209
232
  group == o.group
210
233
  end
211
234
 
@@ -218,7 +241,7 @@ module LagoAPI
218
241
  # Calculates hash code according to all attributes.
219
242
  # @return [Integer] Hash code
220
243
  def hash
221
- [name, code, description, recurring, field_name, aggregation_type, group].hash
244
+ [name, code, description, recurring, field_name, aggregation_type, weighted_interval, group].hash
222
245
  end
223
246
 
224
247
  # 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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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
 
@@ -39,6 +39,9 @@ module LagoAPI
39
39
  # Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
40
40
  attr_accessor :aggregation_type
41
41
 
42
+ # 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`.
43
+ attr_accessor :weighted_interval
44
+
42
45
  attr_accessor :group
43
46
 
44
47
  # Number of active subscriptions using this billable metric.
@@ -83,6 +86,7 @@ module LagoAPI
83
86
  :'created_at' => :'created_at',
84
87
  :'field_name' => :'field_name',
85
88
  :'aggregation_type' => :'aggregation_type',
89
+ :'weighted_interval' => :'weighted_interval',
86
90
  :'group' => :'group',
87
91
  :'active_subscriptions_count' => :'active_subscriptions_count',
88
92
  :'draft_invoices_count' => :'draft_invoices_count',
@@ -106,6 +110,7 @@ module LagoAPI
106
110
  :'created_at' => :'Time',
107
111
  :'field_name' => :'String',
108
112
  :'aggregation_type' => :'String',
113
+ :'weighted_interval' => :'String',
109
114
  :'group' => :'BillableMetricGroup',
110
115
  :'active_subscriptions_count' => :'Integer',
111
116
  :'draft_invoices_count' => :'Integer',
@@ -118,6 +123,7 @@ module LagoAPI
118
123
  Set.new([
119
124
  :'description',
120
125
  :'field_name',
126
+ :'weighted_interval',
121
127
  ])
122
128
  end
123
129
 
@@ -180,6 +186,10 @@ module LagoAPI
180
186
  self.aggregation_type = nil
181
187
  end
182
188
 
189
+ if attributes.key?(:'weighted_interval')
190
+ self.weighted_interval = attributes[:'weighted_interval']
191
+ end
192
+
183
193
  if attributes.key?(:'group')
184
194
  self.group = attributes[:'group']
185
195
  end
@@ -257,8 +267,10 @@ module LagoAPI
257
267
  return false if @recurring.nil?
258
268
  return false if @created_at.nil?
259
269
  return false if @aggregation_type.nil?
260
- aggregation_type_validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg"])
270
+ aggregation_type_validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg", "weighted_sum_agg"])
261
271
  return false unless aggregation_type_validator.valid?(@aggregation_type)
272
+ weighted_interval_validator = EnumAttributeValidator.new('String', ["seconds"])
273
+ return false unless weighted_interval_validator.valid?(@weighted_interval)
262
274
  return false if @active_subscriptions_count.nil?
263
275
  return false if @draft_invoices_count.nil?
264
276
  return false if @plans_count.nil?
@@ -268,13 +280,23 @@ module LagoAPI
268
280
  # Custom attribute writer method checking allowed values (enum).
269
281
  # @param [Object] aggregation_type Object to be assigned
270
282
  def aggregation_type=(aggregation_type)
271
- validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg"])
283
+ validator = EnumAttributeValidator.new('String', ["count_agg", "sum_agg", "max_agg", "unique_count_agg", "weighted_sum_agg"])
272
284
  unless validator.valid?(aggregation_type)
273
285
  fail ArgumentError, "invalid value for \"aggregation_type\", must be one of #{validator.allowable_values}."
274
286
  end
275
287
  @aggregation_type = aggregation_type
276
288
  end
277
289
 
290
+ # Custom attribute writer method checking allowed values (enum).
291
+ # @param [Object] weighted_interval Object to be assigned
292
+ def weighted_interval=(weighted_interval)
293
+ validator = EnumAttributeValidator.new('String', ["seconds"])
294
+ unless validator.valid?(weighted_interval)
295
+ fail ArgumentError, "invalid value for \"weighted_interval\", must be one of #{validator.allowable_values}."
296
+ end
297
+ @weighted_interval = weighted_interval
298
+ end
299
+
278
300
  # Checks equality by comparing each attribute.
279
301
  # @param [Object] Object to be compared
280
302
  def ==(o)
@@ -288,6 +310,7 @@ module LagoAPI
288
310
  created_at == o.created_at &&
289
311
  field_name == o.field_name &&
290
312
  aggregation_type == o.aggregation_type &&
313
+ weighted_interval == o.weighted_interval &&
291
314
  group == o.group &&
292
315
  active_subscriptions_count == o.active_subscriptions_count &&
293
316
  draft_invoices_count == o.draft_invoices_count &&
@@ -303,7 +326,7 @@ module LagoAPI
303
326
  # Calculates hash code according to all attributes.
304
327
  # @return [Integer] Hash code
305
328
  def hash
306
- [lago_id, name, code, description, recurring, created_at, field_name, aggregation_type, group, active_subscriptions_count, draft_invoices_count, plans_count].hash
329
+ [lago_id, name, code, description, recurring, created_at, field_name, aggregation_type, weighted_interval, group, active_subscriptions_count, draft_invoices_count, plans_count].hash
307
330
  end
308
331
 
309
332
  # 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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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.0-beta
6
+ The version of the OpenAPI document: 0.48.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
 
@@ -68,6 +68,9 @@ module LagoAPI
68
68
  # The date and time when the coupon was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the coupon was initially created.
69
69
  attr_accessor :created_at
70
70
 
71
+ # This field indicates if the coupon has been terminated and is no longer usable. If it's not null, it won't be removed for existing customers using it, but it prevents the coupon from being applied in the future.
72
+ attr_accessor :terminated_at
73
+
71
74
  class EnumAttributeValidator
72
75
  attr_reader :datatype
73
76
  attr_reader :allowable_values
@@ -110,7 +113,8 @@ module LagoAPI
110
113
  :'frequency_duration' => :'frequency_duration',
111
114
  :'expiration' => :'expiration',
112
115
  :'expiration_at' => :'expiration_at',
113
- :'created_at' => :'created_at'
116
+ :'created_at' => :'created_at',
117
+ :'terminated_at' => :'terminated_at'
114
118
  }
115
119
  end
116
120
 
@@ -139,7 +143,8 @@ module LagoAPI
139
143
  :'frequency_duration' => :'Integer',
140
144
  :'expiration' => :'String',
141
145
  :'expiration_at' => :'Time',
142
- :'created_at' => :'Time'
146
+ :'created_at' => :'Time',
147
+ :'terminated_at' => :'Time'
143
148
  }
144
149
  end
145
150
 
@@ -264,6 +269,10 @@ module LagoAPI
264
269
  else
265
270
  self.created_at = nil
266
271
  end
272
+
273
+ if attributes.key?(:'terminated_at')
274
+ self.terminated_at = attributes[:'terminated_at']
275
+ end
267
276
  end
268
277
 
269
278
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -406,7 +415,8 @@ module LagoAPI
406
415
  frequency_duration == o.frequency_duration &&
407
416
  expiration == o.expiration &&
408
417
  expiration_at == o.expiration_at &&
409
- created_at == o.created_at
418
+ created_at == o.created_at &&
419
+ terminated_at == o.terminated_at
410
420
  end
411
421
 
412
422
  # @see the `==` method
@@ -418,7 +428,7 @@ module LagoAPI
418
428
  # Calculates hash code according to all attributes.
419
429
  # @return [Integer] Hash code
420
430
  def hash
421
- [lago_id, name, code, description, coupon_type, amount_cents, amount_currency, reusable, limited_plans, plan_codes, limited_billable_metrics, billable_metric_codes, percentage_rate, frequency, frequency_duration, expiration, expiration_at, created_at].hash
431
+ [lago_id, name, code, description, coupon_type, amount_cents, amount_currency, reusable, limited_plans, plan_codes, limited_billable_metrics, billable_metric_codes, percentage_rate, frequency, frequency_duration, expiration, expiration_at, created_at, terminated_at].hash
422
432
  end
423
433
 
424
434
  # Builds the object from hash