lago_ruby 0.46.1.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 (215) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +12 -10
  4. data/docs/BillableMetricBaseInput.md +2 -0
  5. data/docs/BillableMetricCreateInputBillableMetric.md +2 -0
  6. data/docs/BillableMetricObject.md +2 -0
  7. data/docs/CouponObject.md +3 -1
  8. data/docs/CreditObjectItem.md +2 -2
  9. data/docs/EventInputEvent.md +2 -2
  10. data/docs/EventInputEventTimestamp.md +15 -0
  11. data/docs/EventObject.md +1 -1
  12. data/docs/SubscriptionCreateInputSubscription.md +2 -0
  13. data/docs/SubscriptionObject.md +2 -0
  14. data/docs/SubscriptionUpdateInputSubscription.md +2 -0
  15. data/docs/WebhookEndpoint.md +18 -0
  16. data/docs/WebhookEndpointCreateInput.md +18 -0
  17. data/docs/WebhookEndpointCreateInputWebhookEndpoint.md +20 -0
  18. data/docs/WebhookEndpointObject.md +26 -0
  19. data/docs/WebhookEndpointUpdateInput.md +18 -0
  20. data/docs/WebhookEndpointsApi.md +28 -28
  21. data/docs/WebhookEndpointsPaginated.md +20 -0
  22. data/lago_ruby.gemspec +2 -2
  23. data/lib/lago_ruby/api/add_ons_api.rb +2 -2
  24. data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
  25. data/lib/lago_ruby/api/coupons_api.rb +2 -2
  26. data/lib/lago_ruby/api/credit_notes_api.rb +2 -2
  27. data/lib/lago_ruby/api/customers_api.rb +2 -2
  28. data/lib/lago_ruby/api/events_api.rb +2 -2
  29. data/lib/lago_ruby/api/fees_api.rb +2 -2
  30. data/lib/lago_ruby/api/invoices_api.rb +2 -2
  31. data/lib/lago_ruby/api/organizations_api.rb +2 -2
  32. data/lib/lago_ruby/api/plans_api.rb +2 -2
  33. data/lib/lago_ruby/api/subscriptions_api.rb +2 -2
  34. data/lib/lago_ruby/api/taxes_api.rb +2 -2
  35. data/lib/lago_ruby/api/wallets_api.rb +2 -2
  36. data/lib/lago_ruby/api/webhook_endpoints_api.rb +35 -35
  37. data/lib/lago_ruby/api/webhooks_api.rb +2 -2
  38. data/lib/lago_ruby/api_client.rb +2 -2
  39. data/lib/lago_ruby/api_error.rb +2 -2
  40. data/lib/lago_ruby/configuration.rb +2 -2
  41. data/lib/lago_ruby/models/add_on.rb +2 -2
  42. data/lib/lago_ruby/models/add_on_base_input.rb +2 -2
  43. data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
  44. data/lib/lago_ruby/models/add_on_create_input_add_on.rb +2 -2
  45. data/lib/lago_ruby/models/add_on_object.rb +2 -2
  46. data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
  47. data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
  48. data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
  49. data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
  50. data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
  51. data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
  52. data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
  53. data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
  54. data/lib/lago_ruby/models/applied_coupon.rb +2 -2
  55. data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
  56. data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
  57. data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
  58. data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
  59. data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
  60. data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
  61. data/lib/lago_ruby/models/billable_metric.rb +2 -2
  62. data/lib/lago_ruby/models/billable_metric_base_input.rb +28 -5
  63. data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
  64. data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +28 -5
  65. data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
  66. data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
  67. data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
  68. data/lib/lago_ruby/models/billable_metric_object.rb +28 -5
  69. data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
  70. data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
  71. data/lib/lago_ruby/models/charge_object.rb +2 -2
  72. data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
  73. data/lib/lago_ruby/models/charge_properties.rb +2 -2
  74. data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
  75. data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
  76. data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
  77. data/lib/lago_ruby/models/country.rb +2 -2
  78. data/lib/lago_ruby/models/coupon.rb +2 -2
  79. data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
  80. data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
  81. data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
  82. data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
  83. data/lib/lago_ruby/models/coupon_object.rb +16 -6
  84. data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
  85. data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
  86. data/lib/lago_ruby/models/credit_note.rb +2 -2
  87. data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
  88. data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
  89. data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +2 -2
  90. data/lib/lago_ruby/models/credit_note_create_input_credit_note_items_inner.rb +2 -2
  91. data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
  92. data/lib/lago_ruby/models/credit_note_item_object_fee.rb +2 -2
  93. data/lib/lago_ruby/models/credit_note_object.rb +2 -2
  94. data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
  95. data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
  96. data/lib/lago_ruby/models/credit_notes.rb +2 -2
  97. data/lib/lago_ruby/models/credit_object.rb +2 -2
  98. data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
  99. data/lib/lago_ruby/models/credit_object_item.rb +13 -13
  100. data/lib/lago_ruby/models/currency.rb +2 -2
  101. data/lib/lago_ruby/models/customer.rb +2 -2
  102. data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
  103. data/lib/lago_ruby/models/customer_charge_usage_object.rb +2 -2
  104. data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
  105. data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
  106. data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +2 -2
  107. data/lib/lago_ruby/models/customer_create_input.rb +2 -2
  108. data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
  109. data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
  110. data/lib/lago_ruby/models/customer_metadata.rb +2 -2
  111. data/lib/lago_ruby/models/customer_object.rb +2 -2
  112. data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
  113. data/lib/lago_ruby/models/customer_usage.rb +2 -2
  114. data/lib/lago_ruby/models/customer_usage_object.rb +2 -2
  115. data/lib/lago_ruby/models/customers_paginated.rb +2 -2
  116. data/lib/lago_ruby/models/event.rb +2 -2
  117. data/lib/lago_ruby/models/event_batch_input.rb +2 -2
  118. data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
  119. data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
  120. data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
  121. data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
  122. data/lib/lago_ruby/models/event_input.rb +2 -2
  123. data/lib/lago_ruby/models/event_input_event.rb +3 -4
  124. data/lib/lago_ruby/models/event_input_event_timestamp.rb +105 -0
  125. data/lib/lago_ruby/models/event_object.rb +2 -2
  126. data/lib/lago_ruby/models/event_object_properties.rb +2 -2
  127. data/lib/lago_ruby/models/fee.rb +2 -2
  128. data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
  129. data/lib/lago_ruby/models/fee_object.rb +2 -2
  130. data/lib/lago_ruby/models/fee_object_item.rb +2 -2
  131. data/lib/lago_ruby/models/fee_update_input.rb +2 -2
  132. data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
  133. data/lib/lago_ruby/models/fees.rb +2 -2
  134. data/lib/lago_ruby/models/fees_paginated.rb +2 -2
  135. data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
  136. data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
  137. data/lib/lago_ruby/models/group_object.rb +2 -2
  138. data/lib/lago_ruby/models/group_properties_object.rb +2 -2
  139. data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
  140. data/lib/lago_ruby/models/groups_paginated.rb +2 -2
  141. data/lib/lago_ruby/models/invoice.rb +2 -2
  142. data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
  143. data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
  144. data/lib/lago_ruby/models/invoice_object.rb +2 -2
  145. data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
  146. data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
  147. data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
  148. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
  149. data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +2 -2
  150. data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
  151. data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
  152. data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
  153. data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
  154. data/lib/lago_ruby/models/organization.rb +2 -2
  155. data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
  156. data/lib/lago_ruby/models/organization_object.rb +2 -2
  157. data/lib/lago_ruby/models/organization_update_input.rb +2 -2
  158. data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
  159. data/lib/lago_ruby/models/pagination_meta.rb +2 -2
  160. data/lib/lago_ruby/models/plan.rb +2 -2
  161. data/lib/lago_ruby/models/plan_create_input.rb +2 -2
  162. data/lib/lago_ruby/models/plan_create_input_plan.rb +2 -2
  163. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +2 -2
  164. data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
  165. data/lib/lago_ruby/models/plan_object.rb +2 -2
  166. data/lib/lago_ruby/models/plan_update_input.rb +2 -2
  167. data/lib/lago_ruby/models/plan_update_input_plan.rb +2 -2
  168. data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +2 -2
  169. data/lib/lago_ruby/models/plans_paginated.rb +2 -2
  170. data/lib/lago_ruby/models/subscription.rb +2 -2
  171. data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
  172. data/lib/lago_ruby/models/subscription_create_input_subscription.rb +13 -3
  173. data/lib/lago_ruby/models/subscription_object.rb +13 -3
  174. data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
  175. data/lib/lago_ruby/models/subscription_update_input_subscription.rb +13 -3
  176. data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
  177. data/lib/lago_ruby/models/tax.rb +2 -2
  178. data/lib/lago_ruby/models/tax_base_input.rb +2 -2
  179. data/lib/lago_ruby/models/tax_create_input.rb +2 -2
  180. data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
  181. data/lib/lago_ruby/models/tax_object.rb +2 -2
  182. data/lib/lago_ruby/models/tax_update_input.rb +2 -2
  183. data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
  184. data/lib/lago_ruby/models/timezone.rb +2 -2
  185. data/lib/lago_ruby/models/wallet.rb +2 -2
  186. data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
  187. data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
  188. data/lib/lago_ruby/models/wallet_object.rb +2 -2
  189. data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
  190. data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
  191. data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
  192. data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
  193. data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
  194. data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
  195. data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
  196. data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
  197. data/lib/lago_ruby/models/webhook_endpoint.rb +221 -0
  198. data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +214 -0
  199. data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +267 -0
  200. data/lib/lago_ruby/models/webhook_endpoint_object.rb +317 -0
  201. data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +214 -0
  202. data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +239 -0
  203. data/lib/lago_ruby/version.rb +3 -3
  204. data/lib/lago_ruby.rb +9 -7
  205. data/spec/api_client_spec.rb +2 -2
  206. data/spec/configuration_spec.rb +2 -2
  207. data/spec/models/event_input_event_timestamp_spec.rb +21 -0
  208. data/spec/models/{create_webhook_endpoint_request_spec.rb → webhook_endpoint_create_input_spec.rb} +8 -8
  209. data/spec/models/{create_webhook_endpoint_request_webhook_endpoint_spec.rb → webhook_endpoint_create_input_webhook_endpoint_spec.rb} +8 -8
  210. data/spec/models/{create_webhook_endpoint200_response_webhook_endpoint_spec.rb → webhook_endpoint_object_spec.rb} +8 -8
  211. data/spec/models/{create_webhook_endpoint200_response_spec.rb → webhook_endpoint_spec.rb} +8 -8
  212. data/spec/models/webhook_endpoint_update_input_spec.rb +34 -0
  213. data/spec/models/{find_all_webhook_endpoints200_response_spec.rb → webhook_endpoints_paginated_spec.rb} +8 -8
  214. data/spec/spec_helper.rb +2 -2
  215. metadata +172 -154
@@ -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.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.1-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.1-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.1-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.1-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.1-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
 
@@ -27,7 +27,6 @@ module LagoAPI
27
27
  # The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
28
28
  attr_accessor :code
29
29
 
30
- # This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception.
31
30
  attr_accessor :timestamp
32
31
 
33
32
  # This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
@@ -57,7 +56,7 @@ module LagoAPI
57
56
  :'external_customer_id' => :'String',
58
57
  :'external_subscription_id' => :'String',
59
58
  :'code' => :'String',
60
- :'timestamp' => :'Integer',
59
+ :'timestamp' => :'EventInputEventTimestamp',
61
60
  :'properties' => :'Hash<String, String>'
62
61
  }
63
62
  end
@@ -0,0 +1,105 @@
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.48.0-beta
7
+ Contact: tech@getlago.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module LagoAPI
17
+ # This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception. You can also provide miliseconds precision by appending decimals to the timestamp.
18
+ module EventInputEventTimestamp
19
+ class << self
20
+ # List of class defined in anyOf (OpenAPI v3)
21
+ def openapi_any_of
22
+ [
23
+ :'Integer',
24
+ :'String'
25
+ ]
26
+ end
27
+
28
+ # Builds the object
29
+ # @param [Mixed] Data to be matched against the list of anyOf items
30
+ # @return [Object] Returns the model or the data itself
31
+ def build(data)
32
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
33
+ # Note:
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_any_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ typed_data = find_and_cast_into_type(klass, data)
42
+ return typed_data if typed_data
43
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
+ end
45
+ end
46
+
47
+ openapi_any_of.include?(:AnyType) ? data : nil
48
+ end
49
+
50
+ private
51
+
52
+ SchemaMismatchError = Class.new(StandardError)
53
+
54
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
55
+ def find_and_cast_into_type(klass, data)
56
+ return if data.nil?
57
+
58
+ case klass.to_s
59
+ when 'Boolean'
60
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
61
+ when 'Float'
62
+ return data if data.instance_of?(Float)
63
+ when 'Integer'
64
+ return data if data.instance_of?(Integer)
65
+ when 'Time'
66
+ return Time.parse(data)
67
+ when 'Date'
68
+ return Date.parse(data)
69
+ when 'String'
70
+ return data if data.instance_of?(String)
71
+ when 'Object' # "type: object"
72
+ return data if data.instance_of?(Hash)
73
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
74
+ if data.instance_of?(Array)
75
+ sub_type = Regexp.last_match[:sub_type]
76
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
77
+ end
78
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
79
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
80
+ sub_type = Regexp.last_match[:sub_type]
81
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
82
+ end
83
+ else # model
84
+ const = LagoAPI.const_get(klass)
85
+ if const
86
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
87
+ model = const.build(data)
88
+ return model if model
89
+ else
90
+ # raise if data contains keys that are not known to the model
91
+ raise unless (data.keys - const.acceptable_attributes).empty?
92
+ model = const.build_from_hash(data)
93
+ return model if model
94
+ end
95
+ end
96
+ end
97
+
98
+ raise # if no match by now, raise
99
+ rescue
100
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
101
+ end
102
+ end
103
+ end
104
+
105
+ end
@@ -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.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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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