lago_ruby 0.49.0.pre.beta → 0.51.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +16 -6
- data/docs/CreditNoteCreateInputCreditNote.md +1 -1
- data/docs/CreditNoteEstimateInput.md +18 -0
- data/docs/CreditNoteEstimateInputCreditNote.md +20 -0
- data/docs/CreditNoteEstimateInputCreditNoteItemsInner.md +20 -0
- data/docs/CreditNoteEstimated.md +18 -0
- data/docs/CreditNoteEstimatedEstimatedCreditNote.md +38 -0
- data/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +32 -0
- data/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md +20 -0
- data/docs/CreditNoteItemObjectFee.md +2 -0
- data/docs/CreditNoteObject.md +2 -2
- data/docs/CreditNotesApi.md +72 -0
- data/docs/EventsApi.md +7 -6
- data/docs/FeeObject.md +2 -0
- data/docs/FeeObjectItem.md +2 -0
- data/docs/PlanOverridesObject.md +32 -0
- data/docs/PlanOverridesObjectChargesInner.md +28 -0
- data/docs/Subscription.md +1 -1
- data/docs/SubscriptionCreateInputSubscription.md +3 -1
- data/docs/SubscriptionObjectExtended.md +52 -0
- data/docs/SubscriptionUpdateInputSubscription.md +3 -1
- data/lago_ruby.gemspec +1 -1
- data/lib/lago_ruby/api/add_ons_api.rb +1 -1
- data/lib/lago_ruby/api/billable_metrics_api.rb +1 -1
- data/lib/lago_ruby/api/coupons_api.rb +1 -1
- data/lib/lago_ruby/api/credit_notes_api.rb +65 -1
- data/lib/lago_ruby/api/customers_api.rb +1 -1
- data/lib/lago_ruby/api/events_api.rb +6 -6
- data/lib/lago_ruby/api/fees_api.rb +1 -1
- data/lib/lago_ruby/api/invoices_api.rb +1 -1
- data/lib/lago_ruby/api/organizations_api.rb +1 -1
- data/lib/lago_ruby/api/plans_api.rb +1 -1
- data/lib/lago_ruby/api/subscriptions_api.rb +1 -1
- data/lib/lago_ruby/api/taxes_api.rb +1 -1
- data/lib/lago_ruby/api/wallets_api.rb +1 -1
- data/lib/lago_ruby/api/webhook_endpoints_api.rb +1 -1
- data/lib/lago_ruby/api/webhooks_api.rb +1 -1
- data/lib/lago_ruby/api_client.rb +11 -12
- data/lib/lago_ruby/api_error.rb +1 -1
- data/lib/lago_ruby/configuration.rb +1 -1
- data/lib/lago_ruby/models/add_on.rb +2 -2
- data/lib/lago_ruby/models/add_on_base_input.rb +2 -2
- data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
- data/lib/lago_ruby/models/add_on_create_input_add_on.rb +2 -2
- data/lib/lago_ruby/models/add_on_object.rb +2 -2
- data/lib/lago_ruby/models/add_on_update_input.rb +2 -2
- data/lib/lago_ruby/models/add_ons_paginated.rb +2 -2
- data/lib/lago_ruby/models/api_error_bad_request.rb +2 -2
- data/lib/lago_ruby/models/api_error_forbidden.rb +2 -2
- data/lib/lago_ruby/models/api_error_not_allowed.rb +2 -2
- data/lib/lago_ruby/models/api_error_not_found.rb +2 -2
- data/lib/lago_ruby/models/api_error_unauthorized.rb +2 -2
- data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_input.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_object.rb +2 -2
- data/lib/lago_ruby/models/applied_coupon_object_extended.rb +2 -2
- data/lib/lago_ruby/models/applied_coupons_paginated.rb +2 -2
- data/lib/lago_ruby/models/base_applied_tax.rb +2 -2
- data/lib/lago_ruby/models/billable_metric.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_base_input.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_group.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +1 -1
- data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_object.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_update_input.rb +2 -2
- data/lib/lago_ruby/models/billable_metrics_paginated.rb +2 -2
- data/lib/lago_ruby/models/charge_object.rb +2 -2
- data/lib/lago_ruby/models/charge_object_properties.rb +2 -2
- data/lib/lago_ruby/models/charge_properties.rb +2 -2
- data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +2 -2
- data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +2 -2
- data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +2 -2
- data/lib/lago_ruby/models/country.rb +1 -1
- data/lib/lago_ruby/models/coupon.rb +2 -2
- data/lib/lago_ruby/models/coupon_base_input.rb +2 -2
- data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +2 -2
- data/lib/lago_ruby/models/coupon_create_input.rb +2 -2
- data/lib/lago_ruby/models/coupon_create_input_coupon.rb +2 -2
- data/lib/lago_ruby/models/coupon_object.rb +2 -2
- data/lib/lago_ruby/models/coupon_update_input.rb +2 -2
- data/lib/lago_ruby/models/coupons_paginated.rb +2 -2
- data/lib/lago_ruby/models/credit_note.rb +2 -2
- data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +2 -2
- data/lib/lago_ruby/models/credit_note_create_input.rb +2 -2
- data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +3 -3
- data/lib/lago_ruby/models/credit_note_estimate_input.rb +221 -0
- data/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +241 -0
- data/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +239 -0
- data/lib/lago_ruby/models/credit_note_estimated.rb +221 -0
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +387 -0
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +283 -0
- data/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb +235 -0
- data/lib/lago_ruby/models/credit_note_item_object.rb +2 -2
- data/lib/lago_ruby/models/credit_note_item_object_fee.rb +20 -3
- data/lib/lago_ruby/models/credit_note_object.rb +13 -13
- data/lib/lago_ruby/models/credit_note_update_input.rb +2 -2
- data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +2 -2
- data/lib/lago_ruby/models/credit_notes.rb +2 -2
- data/lib/lago_ruby/models/credit_object.rb +2 -2
- data/lib/lago_ruby/models/credit_object_invoice.rb +2 -2
- data/lib/lago_ruby/models/credit_object_item.rb +2 -2
- data/lib/lago_ruby/models/currency.rb +1 -1
- data/lib/lago_ruby/models/customer.rb +2 -2
- data/lib/lago_ruby/models/customer_billing_configuration.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +2 -2
- data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +2 -2
- data/lib/lago_ruby/models/customer_create_input.rb +2 -2
- data/lib/lago_ruby/models/customer_create_input_customer.rb +2 -2
- data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +2 -2
- data/lib/lago_ruby/models/customer_metadata.rb +2 -2
- data/lib/lago_ruby/models/customer_object.rb +2 -2
- data/lib/lago_ruby/models/customer_object_extended.rb +2 -2
- data/lib/lago_ruby/models/customer_past_usage.rb +2 -2
- data/lib/lago_ruby/models/customer_usage.rb +2 -2
- data/lib/lago_ruby/models/customer_usage_object.rb +2 -2
- data/lib/lago_ruby/models/customers_paginated.rb +2 -2
- data/lib/lago_ruby/models/event.rb +2 -2
- data/lib/lago_ruby/models/event_batch_input.rb +2 -2
- data/lib/lago_ruby/models/event_batch_input_event.rb +2 -2
- data/lib/lago_ruby/models/event_batch_input_event_properties.rb +2 -2
- data/lib/lago_ruby/models/event_estimate_fees_input.rb +2 -2
- data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +2 -2
- data/lib/lago_ruby/models/event_input.rb +2 -2
- data/lib/lago_ruby/models/event_input_event.rb +2 -2
- data/lib/lago_ruby/models/event_input_event_timestamp.rb +1 -1
- data/lib/lago_ruby/models/event_object.rb +6 -22
- data/lib/lago_ruby/models/event_object_properties.rb +2 -2
- data/lib/lago_ruby/models/fee.rb +2 -2
- data/lib/lago_ruby/models/fee_applied_tax_object.rb +2 -2
- data/lib/lago_ruby/models/fee_object.rb +20 -3
- data/lib/lago_ruby/models/fee_object_item.rb +13 -3
- data/lib/lago_ruby/models/fee_update_input.rb +2 -2
- data/lib/lago_ruby/models/fee_update_input_fee.rb +2 -2
- data/lib/lago_ruby/models/fees.rb +2 -2
- data/lib/lago_ruby/models/fees_paginated.rb +2 -2
- data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +2 -2
- data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +2 -2
- data/lib/lago_ruby/models/group_object.rb +2 -2
- data/lib/lago_ruby/models/group_properties_object.rb +2 -2
- data/lib/lago_ruby/models/group_properties_object_values.rb +2 -2
- data/lib/lago_ruby/models/groups_paginated.rb +2 -2
- data/lib/lago_ruby/models/invoice.rb +2 -2
- data/lib/lago_ruby/models/invoice_applied_tax_object.rb +2 -2
- data/lib/lago_ruby/models/invoice_metadata_object.rb +2 -2
- data/lib/lago_ruby/models/invoice_object.rb +2 -2
- data/lib/lago_ruby/models/invoice_object_customer.rb +2 -2
- data/lib/lago_ruby/models/invoice_object_extended.rb +2 -2
- data/lib/lago_ruby/models/invoice_one_off_create_input.rb +2 -2
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +2 -2
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +2 -2
- data/lib/lago_ruby/models/invoice_update_input.rb +2 -2
- data/lib/lago_ruby/models/invoice_update_input_invoice.rb +2 -2
- data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +2 -2
- data/lib/lago_ruby/models/invoices_paginated.rb +2 -2
- data/lib/lago_ruby/models/organization.rb +2 -2
- data/lib/lago_ruby/models/organization_billing_configuration.rb +2 -2
- data/lib/lago_ruby/models/organization_object.rb +2 -2
- data/lib/lago_ruby/models/organization_update_input.rb +2 -2
- data/lib/lago_ruby/models/organization_update_input_organization.rb +2 -2
- data/lib/lago_ruby/models/pagination_meta.rb +2 -2
- data/lib/lago_ruby/models/plan.rb +2 -2
- data/lib/lago_ruby/models/plan_create_input.rb +2 -2
- data/lib/lago_ruby/models/plan_create_input_plan.rb +2 -2
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +2 -2
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +2 -2
- data/lib/lago_ruby/models/plan_object.rb +2 -2
- data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
- data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +268 -0
- data/lib/lago_ruby/models/plan_update_input.rb +2 -2
- data/lib/lago_ruby/models/plan_update_input_plan.rb +2 -2
- data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +2 -2
- data/lib/lago_ruby/models/plans_paginated.rb +2 -2
- data/lib/lago_ruby/models/subscription.rb +3 -3
- data/lib/lago_ruby/models/subscription_create_input.rb +2 -2
- data/lib/lago_ruby/models/subscription_create_input_subscription.rb +15 -6
- data/lib/lago_ruby/models/subscription_object.rb +2 -2
- data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
- data/lib/lago_ruby/models/subscription_update_input.rb +2 -2
- data/lib/lago_ruby/models/subscription_update_input_subscription.rb +15 -6
- data/lib/lago_ruby/models/subscriptions_paginated.rb +2 -2
- data/lib/lago_ruby/models/tax.rb +2 -2
- data/lib/lago_ruby/models/tax_base_input.rb +2 -2
- data/lib/lago_ruby/models/tax_create_input.rb +2 -2
- data/lib/lago_ruby/models/tax_create_input_tax.rb +2 -2
- data/lib/lago_ruby/models/tax_object.rb +2 -2
- data/lib/lago_ruby/models/tax_update_input.rb +2 -2
- data/lib/lago_ruby/models/taxes_paginated.rb +2 -2
- data/lib/lago_ruby/models/timezone.rb +1 -1
- data/lib/lago_ruby/models/wallet.rb +2 -2
- data/lib/lago_ruby/models/wallet_create_input.rb +2 -2
- data/lib/lago_ruby/models/wallet_create_input_wallet.rb +2 -2
- data/lib/lago_ruby/models/wallet_object.rb +2 -2
- data/lib/lago_ruby/models/wallet_transaction_create_input.rb +2 -2
- data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +2 -2
- data/lib/lago_ruby/models/wallet_transaction_object.rb +2 -2
- data/lib/lago_ruby/models/wallet_transactions.rb +2 -2
- data/lib/lago_ruby/models/wallet_transactions_paginated.rb +2 -2
- data/lib/lago_ruby/models/wallet_update_input.rb +2 -2
- data/lib/lago_ruby/models/wallet_update_input_wallet.rb +2 -2
- data/lib/lago_ruby/models/wallets_paginated.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoint.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoint_object.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +2 -2
- data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +2 -2
- data/lib/lago_ruby/version.rb +2 -2
- data/lib/lago_ruby.rb +11 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/{credit_note_create_input_credit_note_items_inner_spec.rb → credit_note_estimate_input_credit_note_items_inner_spec.rb} +10 -8
- data/spec/models/credit_note_estimate_input_credit_note_spec.rb +42 -0
- data/spec/models/credit_note_estimate_input_spec.rb +36 -0
- data/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb +78 -0
- data/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb +42 -0
- data/spec/models/credit_note_estimated_estimated_credit_note_spec.rb +96 -0
- data/spec/models/credit_note_estimated_spec.rb +36 -0
- data/spec/models/plan_overrides_object_charges_inner_spec.rb +66 -0
- data/spec/models/plan_overrides_object_spec.rb +78 -0
- data/spec/models/subscription_object_extended_spec.rb +146 -0
- data/spec/spec_helper.rb +1 -1
- metadata +197 -159
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -239,7 +239,7 @@ module LagoAPI
|
|
239
239
|
else # model
|
240
240
|
# models (e.g. Pet) or oneOf
|
241
241
|
klass = LagoAPI.const_get(type)
|
242
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
242
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
243
243
|
end
|
244
244
|
end
|
245
245
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -166,7 +166,7 @@ module LagoAPI
|
|
166
166
|
else # model
|
167
167
|
# models (e.g. Pet) or oneOf
|
168
168
|
klass = LagoAPI.const_get(type)
|
169
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -205,7 +205,7 @@ module LagoAPI
|
|
205
205
|
else # model
|
206
206
|
# models (e.g. Pet) or oneOf
|
207
207
|
klass = LagoAPI.const_get(type)
|
208
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -180,7 +180,7 @@ module LagoAPI
|
|
180
180
|
else # model
|
181
181
|
# models (e.g. Pet) or oneOf
|
182
182
|
klass = LagoAPI.const_get(type)
|
183
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -184,7 +184,7 @@ module LagoAPI
|
|
184
184
|
else # model
|
185
185
|
# models (e.g. Pet) or oneOf
|
186
186
|
klass = LagoAPI.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -166,7 +166,7 @@ module LagoAPI
|
|
166
166
|
else # model
|
167
167
|
# models (e.g. Pet) or oneOf
|
168
168
|
klass = LagoAPI.const_get(type)
|
169
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -182,7 +182,7 @@ module LagoAPI
|
|
182
182
|
else # model
|
183
183
|
# models (e.g. Pet) or oneOf
|
184
184
|
klass = LagoAPI.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
185
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -376,7 +376,7 @@ module LagoAPI
|
|
376
376
|
else # model
|
377
377
|
# models (e.g. Pet) or oneOf
|
378
378
|
klass = LagoAPI.const_get(type)
|
379
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
379
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
380
380
|
end
|
381
381
|
end
|
382
382
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -166,7 +166,7 @@ module LagoAPI
|
|
166
166
|
else # model
|
167
167
|
# models (e.g. Pet) or oneOf
|
168
168
|
klass = LagoAPI.const_get(type)
|
169
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -331,7 +331,7 @@ module LagoAPI
|
|
331
331
|
else # model
|
332
332
|
# models (e.g. Pet) or oneOf
|
333
333
|
klass = LagoAPI.const_get(type)
|
334
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
334
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
335
335
|
end
|
336
336
|
end
|
337
337
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -223,7 +223,7 @@ module LagoAPI
|
|
223
223
|
else # model
|
224
224
|
# models (e.g. Pet) or oneOf
|
225
225
|
klass = LagoAPI.const_get(type)
|
226
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
227
227
|
end
|
228
228
|
end
|
229
229
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -166,7 +166,7 @@ module LagoAPI
|
|
166
166
|
else # model
|
167
167
|
# models (e.g. Pet) or oneOf
|
168
168
|
klass = LagoAPI.const_get(type)
|
169
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -166,7 +166,7 @@ module LagoAPI
|
|
166
166
|
else # model
|
167
167
|
# models (e.g. Pet) or oneOf
|
168
168
|
klass = LagoAPI.const_get(type)
|
169
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -308,7 +308,7 @@ module LagoAPI
|
|
308
308
|
else # model
|
309
309
|
# models (e.g. Pet) or oneOf
|
310
310
|
klass = LagoAPI.const_get(type)
|
311
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
311
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
312
312
|
end
|
313
313
|
end
|
314
314
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -287,7 +287,7 @@ module LagoAPI
|
|
287
287
|
else # model
|
288
288
|
# models (e.g. Pet) or oneOf
|
289
289
|
klass = LagoAPI.const_get(type)
|
290
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
290
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
291
291
|
end
|
292
292
|
end
|
293
293
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -183,7 +183,7 @@ module LagoAPI
|
|
183
183
|
else # model
|
184
184
|
# models (e.g. Pet) or oneOf
|
185
185
|
klass = LagoAPI.const_get(type)
|
186
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
7
|
Contact: tech@getlago.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
@@ -411,7 +411,7 @@ module LagoAPI
|
|
411
411
|
else # model
|
412
412
|
# models (e.g. Pet) or oneOf
|
413
413
|
klass = LagoAPI.const_get(type)
|
414
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
414
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
415
415
|
end
|
416
416
|
end
|
417
417
|
|
@@ -0,0 +1,289 @@
|
|
1
|
+
=begin
|
2
|
+
#Lago API documentation
|
3
|
+
|
4
|
+
#Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.51.0-beta
|
7
|
+
Contact: tech@getlago.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module LagoAPI
|
17
|
+
# Based plan overrides.
|
18
|
+
class PlanOverridesObject
|
19
|
+
# The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
|
20
|
+
attr_accessor :amount_cents
|
21
|
+
|
22
|
+
attr_accessor :amount_currency
|
23
|
+
|
24
|
+
# The description on the plan.
|
25
|
+
attr_accessor :description
|
26
|
+
|
27
|
+
# Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
|
28
|
+
attr_accessor :invoice_display_name
|
29
|
+
|
30
|
+
# The name of the plan.
|
31
|
+
attr_accessor :name
|
32
|
+
|
33
|
+
# List of unique code used to identify the taxes.
|
34
|
+
attr_accessor :tax_codes
|
35
|
+
|
36
|
+
# The duration in days during which the base cost of the plan is offered for free.
|
37
|
+
attr_accessor :trial_period
|
38
|
+
|
39
|
+
# Additional usage-based charges for this plan.
|
40
|
+
attr_accessor :charges
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'amount_cents' => :'amount_cents',
|
46
|
+
:'amount_currency' => :'amount_currency',
|
47
|
+
:'description' => :'description',
|
48
|
+
:'invoice_display_name' => :'invoice_display_name',
|
49
|
+
:'name' => :'name',
|
50
|
+
:'tax_codes' => :'tax_codes',
|
51
|
+
:'trial_period' => :'trial_period',
|
52
|
+
:'charges' => :'charges'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Returns all the JSON keys this model knows about
|
57
|
+
def self.acceptable_attributes
|
58
|
+
attribute_map.values
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.openapi_types
|
63
|
+
{
|
64
|
+
:'amount_cents' => :'Integer',
|
65
|
+
:'amount_currency' => :'Currency',
|
66
|
+
:'description' => :'String',
|
67
|
+
:'invoice_display_name' => :'String',
|
68
|
+
:'name' => :'String',
|
69
|
+
:'tax_codes' => :'Array<String>',
|
70
|
+
:'trial_period' => :'Float',
|
71
|
+
:'charges' => :'Array<PlanOverridesObjectChargesInner>'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# List of attributes with nullable: true
|
76
|
+
def self.openapi_nullable
|
77
|
+
Set.new([
|
78
|
+
])
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
if (!attributes.is_a?(Hash))
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::PlanOverridesObject` initialize method"
|
86
|
+
end
|
87
|
+
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::PlanOverridesObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
92
|
+
end
|
93
|
+
h[k.to_sym] = v
|
94
|
+
}
|
95
|
+
|
96
|
+
if attributes.key?(:'amount_cents')
|
97
|
+
self.amount_cents = attributes[:'amount_cents']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'amount_currency')
|
101
|
+
self.amount_currency = attributes[:'amount_currency']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'description')
|
105
|
+
self.description = attributes[:'description']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'invoice_display_name')
|
109
|
+
self.invoice_display_name = attributes[:'invoice_display_name']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'name')
|
113
|
+
self.name = attributes[:'name']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'tax_codes')
|
117
|
+
if (value = attributes[:'tax_codes']).is_a?(Array)
|
118
|
+
self.tax_codes = value
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'trial_period')
|
123
|
+
self.trial_period = attributes[:'trial_period']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'charges')
|
127
|
+
if (value = attributes[:'charges']).is_a?(Array)
|
128
|
+
self.charges = value
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
134
|
+
# @return Array for valid properties with the reasons
|
135
|
+
def list_invalid_properties
|
136
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
137
|
+
invalid_properties = Array.new
|
138
|
+
invalid_properties
|
139
|
+
end
|
140
|
+
|
141
|
+
# Check to see if the all the properties in the model are valid
|
142
|
+
# @return true if the model is valid
|
143
|
+
def valid?
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
145
|
+
true
|
146
|
+
end
|
147
|
+
|
148
|
+
# Checks equality by comparing each attribute.
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def ==(o)
|
151
|
+
return true if self.equal?(o)
|
152
|
+
self.class == o.class &&
|
153
|
+
amount_cents == o.amount_cents &&
|
154
|
+
amount_currency == o.amount_currency &&
|
155
|
+
description == o.description &&
|
156
|
+
invoice_display_name == o.invoice_display_name &&
|
157
|
+
name == o.name &&
|
158
|
+
tax_codes == o.tax_codes &&
|
159
|
+
trial_period == o.trial_period &&
|
160
|
+
charges == o.charges
|
161
|
+
end
|
162
|
+
|
163
|
+
# @see the `==` method
|
164
|
+
# @param [Object] Object to be compared
|
165
|
+
def eql?(o)
|
166
|
+
self == o
|
167
|
+
end
|
168
|
+
|
169
|
+
# Calculates hash code according to all attributes.
|
170
|
+
# @return [Integer] Hash code
|
171
|
+
def hash
|
172
|
+
[amount_cents, amount_currency, description, invoice_display_name, name, tax_codes, trial_period, charges].hash
|
173
|
+
end
|
174
|
+
|
175
|
+
# Builds the object from hash
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
177
|
+
# @return [Object] Returns the model itself
|
178
|
+
def self.build_from_hash(attributes)
|
179
|
+
return nil unless attributes.is_a?(Hash)
|
180
|
+
attributes = attributes.transform_keys(&:to_sym)
|
181
|
+
transformed_hash = {}
|
182
|
+
openapi_types.each_pair do |key, type|
|
183
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
184
|
+
transformed_hash["#{key}"] = nil
|
185
|
+
elsif type =~ /\AArray<(.*)>/i
|
186
|
+
# check to ensure the input is an array given that the attribute
|
187
|
+
# is documented as an array but the input is not
|
188
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
189
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
190
|
+
end
|
191
|
+
elsif !attributes[attribute_map[key]].nil?
|
192
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
193
|
+
end
|
194
|
+
end
|
195
|
+
new(transformed_hash)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Deserializes the data based on type
|
199
|
+
# @param string type Data type
|
200
|
+
# @param string value Value to be deserialized
|
201
|
+
# @return [Object] Deserialized data
|
202
|
+
def self._deserialize(type, value)
|
203
|
+
case type.to_sym
|
204
|
+
when :Time
|
205
|
+
Time.parse(value)
|
206
|
+
when :Date
|
207
|
+
Date.parse(value)
|
208
|
+
when :String
|
209
|
+
value.to_s
|
210
|
+
when :Integer
|
211
|
+
value.to_i
|
212
|
+
when :Float
|
213
|
+
value.to_f
|
214
|
+
when :Boolean
|
215
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
216
|
+
true
|
217
|
+
else
|
218
|
+
false
|
219
|
+
end
|
220
|
+
when :Object
|
221
|
+
# generic object (usually a Hash), return directly
|
222
|
+
value
|
223
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
224
|
+
inner_type = Regexp.last_match[:inner_type]
|
225
|
+
value.map { |v| _deserialize(inner_type, v) }
|
226
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
227
|
+
k_type = Regexp.last_match[:k_type]
|
228
|
+
v_type = Regexp.last_match[:v_type]
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each do |k, v|
|
231
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
232
|
+
end
|
233
|
+
end
|
234
|
+
else # model
|
235
|
+
# models (e.g. Pet) or oneOf
|
236
|
+
klass = LagoAPI.const_get(type)
|
237
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
# Returns the string representation of the object
|
242
|
+
# @return [String] String presentation of the object
|
243
|
+
def to_s
|
244
|
+
to_hash.to_s
|
245
|
+
end
|
246
|
+
|
247
|
+
# to_body is an alias to to_hash (backward compatibility)
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
249
|
+
def to_body
|
250
|
+
to_hash
|
251
|
+
end
|
252
|
+
|
253
|
+
# Returns the object in the form of hash
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
255
|
+
def to_hash
|
256
|
+
hash = {}
|
257
|
+
self.class.attribute_map.each_pair do |attr, param|
|
258
|
+
value = self.send(attr)
|
259
|
+
if value.nil?
|
260
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
261
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
262
|
+
end
|
263
|
+
|
264
|
+
hash[param] = _to_hash(value)
|
265
|
+
end
|
266
|
+
hash
|
267
|
+
end
|
268
|
+
|
269
|
+
# Outputs non-array value in the form of hash
|
270
|
+
# For object, use to_hash. Otherwise, just return the value
|
271
|
+
# @param [Object] value Any valid value
|
272
|
+
# @return [Hash] Returns the value in the form of hash
|
273
|
+
def _to_hash(value)
|
274
|
+
if value.is_a?(Array)
|
275
|
+
value.compact.map { |v| _to_hash(v) }
|
276
|
+
elsif value.is_a?(Hash)
|
277
|
+
{}.tap do |hash|
|
278
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
279
|
+
end
|
280
|
+
elsif value.respond_to? :to_hash
|
281
|
+
value.to_hash
|
282
|
+
else
|
283
|
+
value
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
end
|
288
|
+
|
289
|
+
end
|