lago_ruby 0.49.0.pre.beta → 0.52.0.pre.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +30 -6
- data/docs/AddOnCreateInputAddOn.md +1 -1
- data/docs/AnalyticsApi.md +299 -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 +6 -4
- data/docs/CreditNoteObject.md +2 -2
- data/docs/CreditNotesApi.md +72 -0
- data/docs/CustomerChargeUsageObjectCharge.md +3 -1
- data/docs/CustomersApi.md +70 -0
- data/docs/EventsApi.md +7 -6
- data/docs/FeeObject.md +6 -4
- data/docs/FeeObjectItem.md +2 -0
- data/docs/GenerateCustomerCheckoutURL200Response.md +24 -0
- data/docs/GrossRevenueObject.md +22 -0
- data/docs/GrossRevenues.md +18 -0
- data/docs/InvoicedUsageObject.md +24 -0
- data/docs/InvoicedUsages.md +18 -0
- data/docs/MrrObject.md +22 -0
- data/docs/Mrrs.md +18 -0
- data/docs/OrganizationObject.md +2 -0
- data/docs/OrganizationUpdateInputOrganization.md +2 -0
- data/docs/OutstandingInvoiceObject.md +26 -0
- data/docs/OutstandingInvoices.md +18 -0
- data/docs/PlanOverridesObject.md +32 -0
- data/docs/PlanOverridesObjectChargesInner.md +30 -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 +2 -2
- data/lib/lago_ruby/api/add_ons_api.rb +2 -2
- data/lib/lago_ruby/api/analytics_api.rb +268 -0
- data/lib/lago_ruby/api/billable_metrics_api.rb +2 -2
- data/lib/lago_ruby/api/coupons_api.rb +2 -2
- data/lib/lago_ruby/api/credit_notes_api.rb +66 -2
- data/lib/lago_ruby/api/customers_api.rb +65 -2
- data/lib/lago_ruby/api/events_api.rb +7 -7
- data/lib/lago_ruby/api/fees_api.rb +2 -2
- data/lib/lago_ruby/api/invoices_api.rb +2 -2
- data/lib/lago_ruby/api/organizations_api.rb +2 -2
- data/lib/lago_ruby/api/plans_api.rb +2 -2
- data/lib/lago_ruby/api/subscriptions_api.rb +2 -2
- data/lib/lago_ruby/api/taxes_api.rb +2 -2
- data/lib/lago_ruby/api/wallets_api.rb +2 -2
- data/lib/lago_ruby/api/webhook_endpoints_api.rb +2 -2
- data/lib/lago_ruby/api/webhooks_api.rb +2 -2
- data/lib/lago_ruby/api_client.rb +12 -13
- data/lib/lago_ruby/api_error.rb +2 -2
- data/lib/lago_ruby/configuration.rb +2 -2
- data/lib/lago_ruby/models/add_on.rb +3 -3
- data/lib/lago_ruby/models/add_on_base_input.rb +3 -3
- data/lib/lago_ruby/models/add_on_create_input.rb +3 -3
- data/lib/lago_ruby/models/add_on_create_input_add_on.rb +3 -3
- data/lib/lago_ruby/models/add_on_object.rb +3 -3
- data/lib/lago_ruby/models/add_on_update_input.rb +3 -3
- data/lib/lago_ruby/models/add_ons_paginated.rb +3 -3
- data/lib/lago_ruby/models/api_error_bad_request.rb +3 -3
- data/lib/lago_ruby/models/api_error_forbidden.rb +3 -3
- data/lib/lago_ruby/models/api_error_not_allowed.rb +3 -3
- data/lib/lago_ruby/models/api_error_not_found.rb +3 -3
- data/lib/lago_ruby/models/api_error_unauthorized.rb +3 -3
- data/lib/lago_ruby/models/api_error_unprocessable_entity.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_input.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_object.rb +3 -3
- data/lib/lago_ruby/models/applied_coupon_object_extended.rb +3 -3
- data/lib/lago_ruby/models/applied_coupons_paginated.rb +3 -3
- data/lib/lago_ruby/models/base_applied_tax.rb +3 -3
- data/lib/lago_ruby/models/billable_metric.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_base_input.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_create_input.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_create_input_billable_metric.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_group.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_group_values_inner.rb +2 -2
- data/lib/lago_ruby/models/billable_metric_group_values_inner_one_of.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_object.rb +3 -3
- data/lib/lago_ruby/models/billable_metric_update_input.rb +3 -3
- data/lib/lago_ruby/models/billable_metrics_paginated.rb +3 -3
- data/lib/lago_ruby/models/charge_object.rb +3 -3
- data/lib/lago_ruby/models/charge_object_properties.rb +3 -3
- data/lib/lago_ruby/models/charge_properties.rb +3 -3
- data/lib/lago_ruby/models/charge_properties_graduated_percentage_ranges_inner.rb +3 -3
- data/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +3 -3
- data/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +3 -3
- data/lib/lago_ruby/models/country.rb +2 -2
- data/lib/lago_ruby/models/coupon.rb +3 -3
- data/lib/lago_ruby/models/coupon_base_input.rb +3 -3
- data/lib/lago_ruby/models/coupon_base_input_applies_to.rb +3 -3
- data/lib/lago_ruby/models/coupon_create_input.rb +3 -3
- data/lib/lago_ruby/models/coupon_create_input_coupon.rb +3 -3
- data/lib/lago_ruby/models/coupon_object.rb +3 -3
- data/lib/lago_ruby/models/coupon_update_input.rb +3 -3
- data/lib/lago_ruby/models/coupons_paginated.rb +3 -3
- data/lib/lago_ruby/models/credit_note.rb +3 -3
- data/lib/lago_ruby/models/credit_note_applied_tax_object.rb +3 -3
- data/lib/lago_ruby/models/credit_note_create_input.rb +3 -3
- data/lib/lago_ruby/models/credit_note_create_input_credit_note.rb +4 -4
- 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 +3 -3
- data/lib/lago_ruby/models/credit_note_item_object_fee.rb +25 -8
- data/lib/lago_ruby/models/credit_note_object.rb +14 -14
- data/lib/lago_ruby/models/credit_note_update_input.rb +3 -3
- data/lib/lago_ruby/models/credit_note_update_input_credit_note.rb +3 -3
- data/lib/lago_ruby/models/credit_notes.rb +3 -3
- data/lib/lago_ruby/models/credit_object.rb +3 -3
- data/lib/lago_ruby/models/credit_object_invoice.rb +3 -3
- data/lib/lago_ruby/models/credit_object_item.rb +3 -3
- data/lib/lago_ruby/models/currency.rb +2 -2
- data/lib/lago_ruby/models/customer.rb +3 -3
- data/lib/lago_ruby/models/customer_billing_configuration.rb +3 -3
- data/lib/lago_ruby/models/customer_charge_usage_object.rb +3 -3
- data/lib/lago_ruby/models/customer_charge_usage_object_billable_metric.rb +3 -3
- data/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +17 -7
- data/lib/lago_ruby/models/customer_charge_usage_object_groups_inner.rb +3 -3
- data/lib/lago_ruby/models/customer_create_input.rb +3 -3
- data/lib/lago_ruby/models/customer_create_input_customer.rb +3 -3
- data/lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb +3 -3
- data/lib/lago_ruby/models/customer_metadata.rb +3 -3
- data/lib/lago_ruby/models/customer_object.rb +3 -3
- data/lib/lago_ruby/models/customer_object_extended.rb +3 -3
- data/lib/lago_ruby/models/customer_past_usage.rb +3 -3
- data/lib/lago_ruby/models/customer_usage.rb +3 -3
- data/lib/lago_ruby/models/customer_usage_object.rb +3 -3
- data/lib/lago_ruby/models/customers_paginated.rb +3 -3
- data/lib/lago_ruby/models/event.rb +3 -3
- data/lib/lago_ruby/models/event_batch_input.rb +3 -3
- data/lib/lago_ruby/models/event_batch_input_event.rb +3 -3
- data/lib/lago_ruby/models/event_batch_input_event_properties.rb +3 -3
- data/lib/lago_ruby/models/event_estimate_fees_input.rb +3 -3
- data/lib/lago_ruby/models/event_estimate_fees_input_event.rb +3 -3
- data/lib/lago_ruby/models/event_input.rb +3 -3
- data/lib/lago_ruby/models/event_input_event.rb +3 -3
- data/lib/lago_ruby/models/event_input_event_timestamp.rb +2 -2
- data/lib/lago_ruby/models/event_object.rb +7 -23
- data/lib/lago_ruby/models/event_object_properties.rb +3 -3
- data/lib/lago_ruby/models/fee.rb +3 -3
- data/lib/lago_ruby/models/fee_applied_tax_object.rb +3 -3
- data/lib/lago_ruby/models/fee_object.rb +25 -8
- data/lib/lago_ruby/models/fee_object_item.rb +14 -4
- data/lib/lago_ruby/models/fee_update_input.rb +3 -3
- data/lib/lago_ruby/models/fee_update_input_fee.rb +3 -3
- data/lib/lago_ruby/models/fees.rb +3 -3
- data/lib/lago_ruby/models/fees_paginated.rb +3 -3
- data/lib/lago_ruby/models/generate_customer_checkout_url200_response.rb +246 -0
- data/lib/lago_ruby/models/get_customer_portal_url200_response.rb +3 -3
- data/lib/lago_ruby/models/get_customer_portal_url200_response_customer.rb +3 -3
- data/lib/lago_ruby/models/gross_revenue_object.rb +241 -0
- data/lib/lago_ruby/models/gross_revenues.rb +223 -0
- data/lib/lago_ruby/models/group_object.rb +3 -3
- data/lib/lago_ruby/models/group_properties_object.rb +3 -3
- data/lib/lago_ruby/models/group_properties_object_values.rb +3 -3
- data/lib/lago_ruby/models/groups_paginated.rb +3 -3
- data/lib/lago_ruby/models/invoice.rb +3 -3
- data/lib/lago_ruby/models/invoice_applied_tax_object.rb +3 -3
- data/lib/lago_ruby/models/invoice_metadata_object.rb +3 -3
- data/lib/lago_ruby/models/invoice_object.rb +3 -3
- data/lib/lago_ruby/models/invoice_object_customer.rb +3 -3
- data/lib/lago_ruby/models/invoice_object_extended.rb +3 -3
- data/lib/lago_ruby/models/invoice_one_off_create_input.rb +3 -3
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice.rb +3 -3
- data/lib/lago_ruby/models/invoice_one_off_create_input_invoice_fees_inner.rb +3 -3
- data/lib/lago_ruby/models/invoice_update_input.rb +3 -3
- data/lib/lago_ruby/models/invoice_update_input_invoice.rb +3 -3
- data/lib/lago_ruby/models/invoice_update_input_invoice_metadata_inner.rb +3 -3
- data/lib/lago_ruby/models/invoiced_usage_object.rb +265 -0
- data/lib/lago_ruby/models/invoiced_usages.rb +223 -0
- data/lib/lago_ruby/models/invoices_paginated.rb +3 -3
- data/lib/lago_ruby/models/mrr_object.rb +241 -0
- data/lib/lago_ruby/models/mrrs.rb +223 -0
- data/lib/lago_ruby/models/organization.rb +3 -3
- data/lib/lago_ruby/models/organization_billing_configuration.rb +3 -3
- data/lib/lago_ruby/models/organization_object.rb +13 -4
- data/lib/lago_ruby/models/organization_update_input.rb +3 -3
- data/lib/lago_ruby/models/organization_update_input_organization.rb +13 -4
- data/lib/lago_ruby/models/outstanding_invoice_object.rb +309 -0
- data/lib/lago_ruby/models/outstanding_invoices.rb +223 -0
- data/lib/lago_ruby/models/pagination_meta.rb +3 -3
- data/lib/lago_ruby/models/plan.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input_plan.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb +3 -3
- data/lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb +3 -3
- data/lib/lago_ruby/models/plan_object.rb +3 -3
- data/lib/lago_ruby/models/plan_overrides_object.rb +289 -0
- data/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb +278 -0
- data/lib/lago_ruby/models/plan_update_input.rb +3 -3
- data/lib/lago_ruby/models/plan_update_input_plan.rb +3 -3
- data/lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb +3 -3
- data/lib/lago_ruby/models/plans_paginated.rb +3 -3
- data/lib/lago_ruby/models/subscription.rb +4 -4
- data/lib/lago_ruby/models/subscription_create_input.rb +3 -3
- data/lib/lago_ruby/models/subscription_create_input_subscription.rb +16 -7
- data/lib/lago_ruby/models/subscription_object.rb +3 -3
- data/lib/lago_ruby/models/subscription_object_extended.rb +507 -0
- data/lib/lago_ruby/models/subscription_update_input.rb +3 -3
- data/lib/lago_ruby/models/subscription_update_input_subscription.rb +16 -7
- data/lib/lago_ruby/models/subscriptions_paginated.rb +3 -3
- data/lib/lago_ruby/models/tax.rb +3 -3
- data/lib/lago_ruby/models/tax_base_input.rb +3 -3
- data/lib/lago_ruby/models/tax_create_input.rb +3 -3
- data/lib/lago_ruby/models/tax_create_input_tax.rb +3 -3
- data/lib/lago_ruby/models/tax_object.rb +3 -3
- data/lib/lago_ruby/models/tax_update_input.rb +3 -3
- data/lib/lago_ruby/models/taxes_paginated.rb +3 -3
- data/lib/lago_ruby/models/timezone.rb +2 -2
- data/lib/lago_ruby/models/wallet.rb +3 -3
- data/lib/lago_ruby/models/wallet_create_input.rb +3 -3
- data/lib/lago_ruby/models/wallet_create_input_wallet.rb +3 -3
- data/lib/lago_ruby/models/wallet_object.rb +3 -3
- data/lib/lago_ruby/models/wallet_transaction_create_input.rb +3 -3
- data/lib/lago_ruby/models/wallet_transaction_create_input_wallet_transaction.rb +3 -3
- data/lib/lago_ruby/models/wallet_transaction_object.rb +3 -3
- data/lib/lago_ruby/models/wallet_transactions.rb +3 -3
- data/lib/lago_ruby/models/wallet_transactions_paginated.rb +3 -3
- data/lib/lago_ruby/models/wallet_update_input.rb +3 -3
- data/lib/lago_ruby/models/wallet_update_input_wallet.rb +3 -3
- data/lib/lago_ruby/models/wallets_paginated.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_create_input.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_create_input_webhook_endpoint.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_object.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoint_update_input.rb +3 -3
- data/lib/lago_ruby/models/webhook_endpoints_paginated.rb +3 -3
- data/lib/lago_ruby/version.rb +3 -3
- data/lib/lago_ruby.rb +22 -3
- data/spec/api/analytics_api_spec.rb +85 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- 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/generate_customer_checkout_url200_response_spec.rb +54 -0
- data/spec/models/gross_revenue_object_spec.rb +48 -0
- data/spec/models/gross_revenues_spec.rb +36 -0
- data/spec/models/invoiced_usage_object_spec.rb +54 -0
- data/spec/models/invoiced_usages_spec.rb +36 -0
- data/spec/models/mrr_object_spec.rb +48 -0
- data/spec/models/mrrs_spec.rb +36 -0
- data/spec/models/outstanding_invoice_object_spec.rb +64 -0
- data/spec/models/outstanding_invoices_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 +2 -2
- metadata +237 -159
|
@@ -0,0 +1,241 @@
|
|
|
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.2.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module LagoAPI
|
|
17
|
+
class MrrObject
|
|
18
|
+
# Identifies the month to analyze MRR.
|
|
19
|
+
attr_accessor :month
|
|
20
|
+
|
|
21
|
+
# The total amount of MRR, expressed in cents.
|
|
22
|
+
attr_accessor :amount_cents
|
|
23
|
+
|
|
24
|
+
attr_accessor :currency
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'month' => :'month',
|
|
30
|
+
:'amount_cents' => :'amount_cents',
|
|
31
|
+
:'currency' => :'currency'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'month' => :'String',
|
|
44
|
+
:'amount_cents' => :'Integer',
|
|
45
|
+
:'currency' => :'Currency'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::MrrObject` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::MrrObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'month')
|
|
71
|
+
self.month = attributes[:'month']
|
|
72
|
+
else
|
|
73
|
+
self.month = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'amount_cents')
|
|
77
|
+
self.amount_cents = attributes[:'amount_cents']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'currency')
|
|
81
|
+
self.currency = attributes[:'currency']
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @month.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "month", month cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
invalid_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Check to see if the all the properties in the model are valid
|
|
98
|
+
# @return true if the model is valid
|
|
99
|
+
def valid?
|
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
|
+
return false if @month.nil?
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
month == o.month &&
|
|
111
|
+
amount_cents == o.amount_cents &&
|
|
112
|
+
currency == o.currency
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[month, amount_cents, currency].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Deserializes the data based on type
|
|
151
|
+
# @param string type Data type
|
|
152
|
+
# @param string value Value to be deserialized
|
|
153
|
+
# @return [Object] Deserialized data
|
|
154
|
+
def self._deserialize(type, value)
|
|
155
|
+
case type.to_sym
|
|
156
|
+
when :Time
|
|
157
|
+
Time.parse(value)
|
|
158
|
+
when :Date
|
|
159
|
+
Date.parse(value)
|
|
160
|
+
when :String
|
|
161
|
+
value.to_s
|
|
162
|
+
when :Integer
|
|
163
|
+
value.to_i
|
|
164
|
+
when :Float
|
|
165
|
+
value.to_f
|
|
166
|
+
when :Boolean
|
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
168
|
+
true
|
|
169
|
+
else
|
|
170
|
+
false
|
|
171
|
+
end
|
|
172
|
+
when :Object
|
|
173
|
+
# generic object (usually a Hash), return directly
|
|
174
|
+
value
|
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
|
181
|
+
{}.tap do |hash|
|
|
182
|
+
value.each do |k, v|
|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
else # model
|
|
187
|
+
# models (e.g. Pet) or oneOf
|
|
188
|
+
klass = LagoAPI.const_get(type)
|
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the string representation of the object
|
|
194
|
+
# @return [String] String presentation of the object
|
|
195
|
+
def to_s
|
|
196
|
+
to_hash.to_s
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_body
|
|
202
|
+
to_hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Returns the object in the form of hash
|
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
|
207
|
+
def to_hash
|
|
208
|
+
hash = {}
|
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
210
|
+
value = self.send(attr)
|
|
211
|
+
if value.nil?
|
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
hash[param] = _to_hash(value)
|
|
217
|
+
end
|
|
218
|
+
hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Outputs non-array value in the form of hash
|
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
223
|
+
# @param [Object] value Any valid value
|
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
|
225
|
+
def _to_hash(value)
|
|
226
|
+
if value.is_a?(Array)
|
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
|
228
|
+
elsif value.is_a?(Hash)
|
|
229
|
+
{}.tap do |hash|
|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
231
|
+
end
|
|
232
|
+
elsif value.respond_to? :to_hash
|
|
233
|
+
value.to_hash
|
|
234
|
+
else
|
|
235
|
+
value
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
end
|
|
@@ -0,0 +1,223 @@
|
|
|
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.2.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module LagoAPI
|
|
17
|
+
class Mrrs
|
|
18
|
+
attr_accessor :mrrs
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'mrrs' => :'mrrs'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns all the JSON keys this model knows about
|
|
28
|
+
def self.acceptable_attributes
|
|
29
|
+
attribute_map.values
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.openapi_types
|
|
34
|
+
{
|
|
35
|
+
:'mrrs' => :'Array<MrrObject>'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Initializes the object
|
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
if (!attributes.is_a?(Hash))
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::Mrrs` initialize method"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::Mrrs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
|
+
end
|
|
57
|
+
h[k.to_sym] = v
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'mrrs')
|
|
61
|
+
if (value = attributes[:'mrrs']).is_a?(Array)
|
|
62
|
+
self.mrrs = value
|
|
63
|
+
end
|
|
64
|
+
else
|
|
65
|
+
self.mrrs = nil
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
70
|
+
# @return Array for valid properties with the reasons
|
|
71
|
+
def list_invalid_properties
|
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
73
|
+
invalid_properties = Array.new
|
|
74
|
+
if @mrrs.nil?
|
|
75
|
+
invalid_properties.push('invalid value for "mrrs", mrrs cannot be nil.')
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
return false if @mrrs.nil?
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
mrrs == o.mrrs
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[mrrs].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
115
|
+
transformed_hash = {}
|
|
116
|
+
openapi_types.each_pair do |key, type|
|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = nil
|
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
120
|
+
# check to ensure the input is an array given that the attribute
|
|
121
|
+
# is documented as an array but the input is not
|
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
124
|
+
end
|
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
new(transformed_hash)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Deserializes the data based on type
|
|
133
|
+
# @param string type Data type
|
|
134
|
+
# @param string value Value to be deserialized
|
|
135
|
+
# @return [Object] Deserialized data
|
|
136
|
+
def self._deserialize(type, value)
|
|
137
|
+
case type.to_sym
|
|
138
|
+
when :Time
|
|
139
|
+
Time.parse(value)
|
|
140
|
+
when :Date
|
|
141
|
+
Date.parse(value)
|
|
142
|
+
when :String
|
|
143
|
+
value.to_s
|
|
144
|
+
when :Integer
|
|
145
|
+
value.to_i
|
|
146
|
+
when :Float
|
|
147
|
+
value.to_f
|
|
148
|
+
when :Boolean
|
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
150
|
+
true
|
|
151
|
+
else
|
|
152
|
+
false
|
|
153
|
+
end
|
|
154
|
+
when :Object
|
|
155
|
+
# generic object (usually a Hash), return directly
|
|
156
|
+
value
|
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
|
163
|
+
{}.tap do |hash|
|
|
164
|
+
value.each do |k, v|
|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
else # model
|
|
169
|
+
# models (e.g. Pet) or oneOf
|
|
170
|
+
klass = LagoAPI.const_get(type)
|
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the string representation of the object
|
|
176
|
+
# @return [String] String presentation of the object
|
|
177
|
+
def to_s
|
|
178
|
+
to_hash.to_s
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_body
|
|
184
|
+
to_hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the object in the form of hash
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_hash
|
|
190
|
+
hash = {}
|
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
if value.nil?
|
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Outputs non-array value in the form of hash
|
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
205
|
+
# @param [Object] value Any valid value
|
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
|
207
|
+
def _to_hash(value)
|
|
208
|
+
if value.is_a?(Array)
|
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
|
210
|
+
elsif value.is_a?(Hash)
|
|
211
|
+
{}.tap do |hash|
|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
213
|
+
end
|
|
214
|
+
elsif value.respond_to? :to_hash
|
|
215
|
+
value.to_hash
|
|
216
|
+
else
|
|
217
|
+
value
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
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.
|
|
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
|
-
OpenAPI Generator version: 7.
|
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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,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.
|
|
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
|
-
OpenAPI Generator version: 7.
|
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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,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.
|
|
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
|
-
OpenAPI Generator version: 7.
|
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -32,6 +32,8 @@ module LagoAPI
|
|
|
32
32
|
|
|
33
33
|
attr_accessor :country
|
|
34
34
|
|
|
35
|
+
attr_accessor :default_currency
|
|
36
|
+
|
|
35
37
|
# The first line of your organization’s billing address.
|
|
36
38
|
attr_accessor :address_line1
|
|
37
39
|
|
|
@@ -78,6 +80,7 @@ module LagoAPI
|
|
|
78
80
|
:'webhook_url' => :'webhook_url',
|
|
79
81
|
:'webhook_urls' => :'webhook_urls',
|
|
80
82
|
:'country' => :'country',
|
|
83
|
+
:'default_currency' => :'default_currency',
|
|
81
84
|
:'address_line1' => :'address_line1',
|
|
82
85
|
:'address_line2' => :'address_line2',
|
|
83
86
|
:'state' => :'state',
|
|
@@ -108,6 +111,7 @@ module LagoAPI
|
|
|
108
111
|
:'webhook_url' => :'String',
|
|
109
112
|
:'webhook_urls' => :'Array<String>',
|
|
110
113
|
:'country' => :'Country',
|
|
114
|
+
:'default_currency' => :'Currency',
|
|
111
115
|
:'address_line1' => :'String',
|
|
112
116
|
:'address_line2' => :'String',
|
|
113
117
|
:'state' => :'String',
|
|
@@ -189,6 +193,10 @@ module LagoAPI
|
|
|
189
193
|
self.country = attributes[:'country']
|
|
190
194
|
end
|
|
191
195
|
|
|
196
|
+
if attributes.key?(:'default_currency')
|
|
197
|
+
self.default_currency = attributes[:'default_currency']
|
|
198
|
+
end
|
|
199
|
+
|
|
192
200
|
if attributes.key?(:'address_line1')
|
|
193
201
|
self.address_line1 = attributes[:'address_line1']
|
|
194
202
|
end
|
|
@@ -287,6 +295,7 @@ module LagoAPI
|
|
|
287
295
|
webhook_url == o.webhook_url &&
|
|
288
296
|
webhook_urls == o.webhook_urls &&
|
|
289
297
|
country == o.country &&
|
|
298
|
+
default_currency == o.default_currency &&
|
|
290
299
|
address_line1 == o.address_line1 &&
|
|
291
300
|
address_line2 == o.address_line2 &&
|
|
292
301
|
state == o.state &&
|
|
@@ -311,7 +320,7 @@ module LagoAPI
|
|
|
311
320
|
# Calculates hash code according to all attributes.
|
|
312
321
|
# @return [Integer] Hash code
|
|
313
322
|
def hash
|
|
314
|
-
[lago_id, name, created_at, webhook_url, webhook_urls, country, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, billing_configuration, taxes].hash
|
|
323
|
+
[lago_id, name, created_at, webhook_url, webhook_urls, country, default_currency, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, billing_configuration, taxes].hash
|
|
315
324
|
end
|
|
316
325
|
|
|
317
326
|
# Builds the object from hash
|
|
@@ -376,7 +385,7 @@ module LagoAPI
|
|
|
376
385
|
else # model
|
|
377
386
|
# models (e.g. Pet) or oneOf
|
|
378
387
|
klass = LagoAPI.const_get(type)
|
|
379
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
388
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
380
389
|
end
|
|
381
390
|
end
|
|
382
391
|
|
|
@@ -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.
|
|
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
|
-
OpenAPI Generator version: 7.
|
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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,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.
|
|
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
|
-
OpenAPI Generator version: 7.
|
|
9
|
+
OpenAPI Generator version: 7.2.0-SNAPSHOT
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -20,6 +20,8 @@ module LagoAPI
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :country
|
|
22
22
|
|
|
23
|
+
attr_accessor :default_currency
|
|
24
|
+
|
|
23
25
|
# The first line of your organization’s billing address.
|
|
24
26
|
attr_accessor :address_line1
|
|
25
27
|
|
|
@@ -84,6 +86,7 @@ module LagoAPI
|
|
|
84
86
|
{
|
|
85
87
|
:'webhook_url' => :'webhook_url',
|
|
86
88
|
:'country' => :'country',
|
|
89
|
+
:'default_currency' => :'default_currency',
|
|
87
90
|
:'address_line1' => :'address_line1',
|
|
88
91
|
:'address_line2' => :'address_line2',
|
|
89
92
|
:'state' => :'state',
|
|
@@ -110,6 +113,7 @@ module LagoAPI
|
|
|
110
113
|
{
|
|
111
114
|
:'webhook_url' => :'String',
|
|
112
115
|
:'country' => :'Country',
|
|
116
|
+
:'default_currency' => :'Currency',
|
|
113
117
|
:'address_line1' => :'String',
|
|
114
118
|
:'address_line2' => :'String',
|
|
115
119
|
:'state' => :'String',
|
|
@@ -165,6 +169,10 @@ module LagoAPI
|
|
|
165
169
|
self.country = attributes[:'country']
|
|
166
170
|
end
|
|
167
171
|
|
|
172
|
+
if attributes.key?(:'default_currency')
|
|
173
|
+
self.default_currency = attributes[:'default_currency']
|
|
174
|
+
end
|
|
175
|
+
|
|
168
176
|
if attributes.key?(:'address_line1')
|
|
169
177
|
self.address_line1 = attributes[:'address_line1']
|
|
170
178
|
end
|
|
@@ -242,6 +250,7 @@ module LagoAPI
|
|
|
242
250
|
self.class == o.class &&
|
|
243
251
|
webhook_url == o.webhook_url &&
|
|
244
252
|
country == o.country &&
|
|
253
|
+
default_currency == o.default_currency &&
|
|
245
254
|
address_line1 == o.address_line1 &&
|
|
246
255
|
address_line2 == o.address_line2 &&
|
|
247
256
|
state == o.state &&
|
|
@@ -266,7 +275,7 @@ module LagoAPI
|
|
|
266
275
|
# Calculates hash code according to all attributes.
|
|
267
276
|
# @return [Integer] Hash code
|
|
268
277
|
def hash
|
|
269
|
-
[webhook_url, country, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, email_settings, billing_configuration].hash
|
|
278
|
+
[webhook_url, country, default_currency, address_line1, address_line2, state, zipcode, email, city, legal_name, legal_number, net_payment_term, tax_identification_number, timezone, email_settings, billing_configuration].hash
|
|
270
279
|
end
|
|
271
280
|
|
|
272
281
|
# Builds the object from hash
|
|
@@ -331,7 +340,7 @@ module LagoAPI
|
|
|
331
340
|
else # model
|
|
332
341
|
# models (e.g. Pet) or oneOf
|
|
333
342
|
klass = LagoAPI.const_get(type)
|
|
334
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
343
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
335
344
|
end
|
|
336
345
|
end
|
|
337
346
|
|