lago_ruby 0.48.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 +19 -6
- data/docs/AddOnBaseInput.md +2 -0
- data/docs/AddOnCreateInputAddOn.md +2 -0
- data/docs/AddOnObject.md +2 -0
- data/docs/BillableMetricBaseInput.md +1 -1
- data/docs/BillableMetricCreateInputBillableMetric.md +1 -1
- data/docs/BillableMetricObject.md +1 -1
- data/docs/ChargeObject.md +2 -0
- 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 +4 -0
- data/docs/CreditNoteObject.md +2 -2
- data/docs/CreditNotesApi.md +72 -0
- data/docs/CustomerChargeUsageObject.md +2 -0
- data/docs/CustomerChargeUsageObjectGroupsInner.md +2 -0
- data/docs/CustomerPastUsage.md +20 -0
- data/docs/CustomerUsageObject.md +2 -0
- data/docs/CustomersApi.md +82 -0
- data/docs/EventsApi.md +7 -6
- data/docs/FeeObject.md +4 -0
- data/docs/FeeObjectItem.md +4 -0
- data/docs/GroupPropertiesObject.md +2 -0
- data/docs/InvoiceOneOffCreateInputInvoiceFeesInner.md +2 -0
- data/docs/PlanCreateInputPlan.md +3 -1
- data/docs/PlanCreateInputPlanChargesInner.md +2 -0
- data/docs/PlanObject.md +3 -1
- data/docs/PlanOverridesObject.md +32 -0
- data/docs/PlanOverridesObjectChargesInner.md +28 -0
- data/docs/PlanUpdateInputPlan.md +3 -1
- data/docs/PlanUpdateInputPlanChargesInner.md +2 -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/docs/SubscriptionsApi.md +70 -0
- 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 +83 -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 +64 -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 +13 -13
- data/lib/lago_ruby/api_error.rb +1 -1
- data/lib/lago_ruby/configuration.rb +2 -1
- data/lib/lago_ruby/models/add_on.rb +2 -2
- data/lib/lago_ruby/models/add_on_base_input.rb +13 -3
- data/lib/lago_ruby/models/add_on_create_input.rb +2 -2
- data/lib/lago_ruby/models/add_on_create_input_add_on.rb +13 -3
- data/lib/lago_ruby/models/add_on_object.rb +13 -3
- 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 +5 -5
- data/lib/lago_ruby/models/billable_metric_create_input.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +5 -5
- 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 +5 -5
- 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 +13 -3
- 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_create_input_credit_note_items_inner.rb +1 -1
- 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 +30 -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 +20 -3
- 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 +13 -3
- 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 +239 -0
- data/lib/lago_ruby/models/customer_usage.rb +2 -2
- data/lib/lago_ruby/models/customer_usage_object.rb +14 -3
- 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 +30 -3
- data/lib/lago_ruby/models/fee_object_item.rb +23 -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 +13 -3
- 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 +13 -3
- 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 +13 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +13 -3
- 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 +13 -3
- 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 +13 -3
- data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +13 -3
- 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 +12 -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/customer_past_usage_spec.rb +42 -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 +194 -152
@@ -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
|
@@ -0,0 +1,268 @@
|
|
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
|
+
class PlanOverridesObjectChargesInner
|
18
|
+
# Unique identifier of the charge created by Lago.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
|
22
|
+
attr_accessor :invoice_display_name
|
23
|
+
|
24
|
+
# The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
|
25
|
+
attr_accessor :min_amount_cents
|
26
|
+
|
27
|
+
attr_accessor :properties
|
28
|
+
|
29
|
+
# All charge information, sorted by groups.
|
30
|
+
attr_accessor :group_properties
|
31
|
+
|
32
|
+
# List of unique code used to identify the taxes.
|
33
|
+
attr_accessor :tax_codes
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'id' => :'id',
|
39
|
+
:'invoice_display_name' => :'invoice_display_name',
|
40
|
+
:'min_amount_cents' => :'min_amount_cents',
|
41
|
+
:'properties' => :'properties',
|
42
|
+
:'group_properties' => :'group_properties',
|
43
|
+
:'tax_codes' => :'tax_codes'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
def self.acceptable_attributes
|
49
|
+
attribute_map.values
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.openapi_types
|
54
|
+
{
|
55
|
+
:'id' => :'String',
|
56
|
+
:'invoice_display_name' => :'String',
|
57
|
+
:'min_amount_cents' => :'Integer',
|
58
|
+
:'properties' => :'ChargeObjectProperties',
|
59
|
+
:'group_properties' => :'Array<PlanCreateInputPlanChargesInnerGroupPropertiesInner>',
|
60
|
+
:'tax_codes' => :'Array<String>'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# List of attributes with nullable: true
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
])
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
def initialize(attributes = {})
|
73
|
+
if (!attributes.is_a?(Hash))
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::PlanOverridesObjectChargesInner` initialize method"
|
75
|
+
end
|
76
|
+
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
79
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::PlanOverridesObjectChargesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
81
|
+
end
|
82
|
+
h[k.to_sym] = v
|
83
|
+
}
|
84
|
+
|
85
|
+
if attributes.key?(:'id')
|
86
|
+
self.id = attributes[:'id']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'invoice_display_name')
|
90
|
+
self.invoice_display_name = attributes[:'invoice_display_name']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'min_amount_cents')
|
94
|
+
self.min_amount_cents = attributes[:'min_amount_cents']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'properties')
|
98
|
+
self.properties = attributes[:'properties']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'group_properties')
|
102
|
+
if (value = attributes[:'group_properties']).is_a?(Array)
|
103
|
+
self.group_properties = value
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'tax_codes')
|
108
|
+
if (value = attributes[:'tax_codes']).is_a?(Array)
|
109
|
+
self.tax_codes = value
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
115
|
+
# @return Array for valid properties with the reasons
|
116
|
+
def list_invalid_properties
|
117
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
118
|
+
invalid_properties = Array.new
|
119
|
+
invalid_properties
|
120
|
+
end
|
121
|
+
|
122
|
+
# Check to see if the all the properties in the model are valid
|
123
|
+
# @return true if the model is valid
|
124
|
+
def valid?
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
126
|
+
true
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks equality by comparing each attribute.
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def ==(o)
|
132
|
+
return true if self.equal?(o)
|
133
|
+
self.class == o.class &&
|
134
|
+
id == o.id &&
|
135
|
+
invoice_display_name == o.invoice_display_name &&
|
136
|
+
min_amount_cents == o.min_amount_cents &&
|
137
|
+
properties == o.properties &&
|
138
|
+
group_properties == o.group_properties &&
|
139
|
+
tax_codes == o.tax_codes
|
140
|
+
end
|
141
|
+
|
142
|
+
# @see the `==` method
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def eql?(o)
|
145
|
+
self == o
|
146
|
+
end
|
147
|
+
|
148
|
+
# Calculates hash code according to all attributes.
|
149
|
+
# @return [Integer] Hash code
|
150
|
+
def hash
|
151
|
+
[id, invoice_display_name, min_amount_cents, properties, group_properties, tax_codes].hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Builds the object from hash
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
156
|
+
# @return [Object] Returns the model itself
|
157
|
+
def self.build_from_hash(attributes)
|
158
|
+
return nil unless attributes.is_a?(Hash)
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
160
|
+
transformed_hash = {}
|
161
|
+
openapi_types.each_pair do |key, type|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
163
|
+
transformed_hash["#{key}"] = nil
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
|
+
end
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
|
+
end
|
173
|
+
end
|
174
|
+
new(transformed_hash)
|
175
|
+
end
|
176
|
+
|
177
|
+
# Deserializes the data based on type
|
178
|
+
# @param string type Data type
|
179
|
+
# @param string value Value to be deserialized
|
180
|
+
# @return [Object] Deserialized data
|
181
|
+
def self._deserialize(type, value)
|
182
|
+
case type.to_sym
|
183
|
+
when :Time
|
184
|
+
Time.parse(value)
|
185
|
+
when :Date
|
186
|
+
Date.parse(value)
|
187
|
+
when :String
|
188
|
+
value.to_s
|
189
|
+
when :Integer
|
190
|
+
value.to_i
|
191
|
+
when :Float
|
192
|
+
value.to_f
|
193
|
+
when :Boolean
|
194
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
195
|
+
true
|
196
|
+
else
|
197
|
+
false
|
198
|
+
end
|
199
|
+
when :Object
|
200
|
+
# generic object (usually a Hash), return directly
|
201
|
+
value
|
202
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
203
|
+
inner_type = Regexp.last_match[:inner_type]
|
204
|
+
value.map { |v| _deserialize(inner_type, v) }
|
205
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
206
|
+
k_type = Regexp.last_match[:k_type]
|
207
|
+
v_type = Regexp.last_match[:v_type]
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each do |k, v|
|
210
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
else # model
|
214
|
+
# models (e.g. Pet) or oneOf
|
215
|
+
klass = LagoAPI.const_get(type)
|
216
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the string representation of the object
|
221
|
+
# @return [String] String presentation of the object
|
222
|
+
def to_s
|
223
|
+
to_hash.to_s
|
224
|
+
end
|
225
|
+
|
226
|
+
# to_body is an alias to to_hash (backward compatibility)
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_body
|
229
|
+
to_hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Returns the object in the form of hash
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_hash
|
235
|
+
hash = {}
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
237
|
+
value = self.send(attr)
|
238
|
+
if value.nil?
|
239
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
240
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
241
|
+
end
|
242
|
+
|
243
|
+
hash[param] = _to_hash(value)
|
244
|
+
end
|
245
|
+
hash
|
246
|
+
end
|
247
|
+
|
248
|
+
# Outputs non-array value in the form of hash
|
249
|
+
# For object, use to_hash. Otherwise, just return the value
|
250
|
+
# @param [Object] value Any valid value
|
251
|
+
# @return [Hash] Returns the value in the form of hash
|
252
|
+
def _to_hash(value)
|
253
|
+
if value.is_a?(Array)
|
254
|
+
value.compact.map { |v| _to_hash(v) }
|
255
|
+
elsif value.is_a?(Hash)
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
258
|
+
end
|
259
|
+
elsif value.respond_to? :to_hash
|
260
|
+
value.to_hash
|
261
|
+
else
|
262
|
+
value
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
@@ -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
|
@@ -18,6 +18,9 @@ module LagoAPI
|
|
18
18
|
# The name of the plan.
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
|
+
# Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
|
22
|
+
attr_accessor :invoice_display_name
|
23
|
+
|
21
24
|
# The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
|
22
25
|
attr_accessor :code
|
23
26
|
|
@@ -73,6 +76,7 @@ module LagoAPI
|
|
73
76
|
def self.attribute_map
|
74
77
|
{
|
75
78
|
:'name' => :'name',
|
79
|
+
:'invoice_display_name' => :'invoice_display_name',
|
76
80
|
:'code' => :'code',
|
77
81
|
:'interval' => :'interval',
|
78
82
|
:'description' => :'description',
|
@@ -95,6 +99,7 @@ module LagoAPI
|
|
95
99
|
def self.openapi_types
|
96
100
|
{
|
97
101
|
:'name' => :'String',
|
102
|
+
:'invoice_display_name' => :'String',
|
98
103
|
:'code' => :'String',
|
99
104
|
:'interval' => :'String',
|
100
105
|
:'description' => :'String',
|
@@ -134,6 +139,10 @@ module LagoAPI
|
|
134
139
|
self.name = attributes[:'name']
|
135
140
|
end
|
136
141
|
|
142
|
+
if attributes.key?(:'invoice_display_name')
|
143
|
+
self.invoice_display_name = attributes[:'invoice_display_name']
|
144
|
+
end
|
145
|
+
|
137
146
|
if attributes.key?(:'code')
|
138
147
|
self.code = attributes[:'code']
|
139
148
|
end
|
@@ -212,6 +221,7 @@ module LagoAPI
|
|
212
221
|
return true if self.equal?(o)
|
213
222
|
self.class == o.class &&
|
214
223
|
name == o.name &&
|
224
|
+
invoice_display_name == o.invoice_display_name &&
|
215
225
|
code == o.code &&
|
216
226
|
interval == o.interval &&
|
217
227
|
description == o.description &&
|
@@ -233,7 +243,7 @@ module LagoAPI
|
|
233
243
|
# Calculates hash code according to all attributes.
|
234
244
|
# @return [Integer] Hash code
|
235
245
|
def hash
|
236
|
-
[name, code, interval, description, amount_cents, amount_currency, trial_period, pay_in_advance, bill_charges_monthly, tax_codes, charges].hash
|
246
|
+
[name, invoice_display_name, code, interval, description, amount_cents, amount_currency, trial_period, pay_in_advance, bill_charges_monthly, tax_codes, charges].hash
|
237
247
|
end
|
238
248
|
|
239
249
|
# Builds the object from hash
|
@@ -298,7 +308,7 @@ module LagoAPI
|
|
298
308
|
else # model
|
299
309
|
# models (e.g. Pet) or oneOf
|
300
310
|
klass = LagoAPI.const_get(type)
|
301
|
-
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)
|
302
312
|
end
|
303
313
|
end
|
304
314
|
|