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,283 @@
|
|
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 CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner
|
18
|
+
# Unique identifier of the tax, created by Lago.
|
19
|
+
attr_accessor :lago_tax_id
|
20
|
+
|
21
|
+
# Name of the tax.
|
22
|
+
attr_accessor :tax_name
|
23
|
+
|
24
|
+
# Unique code used to identify the tax associated with the API request.
|
25
|
+
attr_accessor :tax_code
|
26
|
+
|
27
|
+
# The percentage rate of the tax
|
28
|
+
attr_accessor :tax_rate
|
29
|
+
|
30
|
+
# Internal description of the taxe
|
31
|
+
attr_accessor :tax_description
|
32
|
+
|
33
|
+
attr_accessor :base_amount_cents
|
34
|
+
|
35
|
+
# Amount of the tax
|
36
|
+
attr_accessor :amount_cents
|
37
|
+
|
38
|
+
attr_accessor :amount_currency
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'lago_tax_id' => :'lago_tax_id',
|
44
|
+
:'tax_name' => :'tax_name',
|
45
|
+
:'tax_code' => :'tax_code',
|
46
|
+
:'tax_rate' => :'tax_rate',
|
47
|
+
:'tax_description' => :'tax_description',
|
48
|
+
:'base_amount_cents' => :'base_amount_cents',
|
49
|
+
:'amount_cents' => :'amount_cents',
|
50
|
+
:'amount_currency' => :'amount_currency'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.openapi_types
|
61
|
+
{
|
62
|
+
:'lago_tax_id' => :'String',
|
63
|
+
:'tax_name' => :'String',
|
64
|
+
:'tax_code' => :'String',
|
65
|
+
:'tax_rate' => :'Float',
|
66
|
+
:'tax_description' => :'String',
|
67
|
+
:'base_amount_cents' => :'Integer',
|
68
|
+
:'amount_cents' => :'Integer',
|
69
|
+
:'amount_currency' => :'Currency'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
def self.openapi_nullable
|
75
|
+
Set.new([
|
76
|
+
])
|
77
|
+
end
|
78
|
+
|
79
|
+
# Initializes the object
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
def initialize(attributes = {})
|
82
|
+
if (!attributes.is_a?(Hash))
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner` initialize method"
|
84
|
+
end
|
85
|
+
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
88
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
90
|
+
end
|
91
|
+
h[k.to_sym] = v
|
92
|
+
}
|
93
|
+
|
94
|
+
if attributes.key?(:'lago_tax_id')
|
95
|
+
self.lago_tax_id = attributes[:'lago_tax_id']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'tax_name')
|
99
|
+
self.tax_name = attributes[:'tax_name']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'tax_code')
|
103
|
+
self.tax_code = attributes[:'tax_code']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'tax_rate')
|
107
|
+
self.tax_rate = attributes[:'tax_rate']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'tax_description')
|
111
|
+
self.tax_description = attributes[:'tax_description']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'base_amount_cents')
|
115
|
+
self.base_amount_cents = attributes[:'base_amount_cents']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'amount_cents')
|
119
|
+
self.amount_cents = attributes[:'amount_cents']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'amount_currency')
|
123
|
+
self.amount_currency = attributes[:'amount_currency']
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
128
|
+
# @return Array for valid properties with the reasons
|
129
|
+
def list_invalid_properties
|
130
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
131
|
+
invalid_properties = Array.new
|
132
|
+
invalid_properties
|
133
|
+
end
|
134
|
+
|
135
|
+
# Check to see if the all the properties in the model are valid
|
136
|
+
# @return true if the model is valid
|
137
|
+
def valid?
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
139
|
+
true
|
140
|
+
end
|
141
|
+
|
142
|
+
# Checks equality by comparing each attribute.
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def ==(o)
|
145
|
+
return true if self.equal?(o)
|
146
|
+
self.class == o.class &&
|
147
|
+
lago_tax_id == o.lago_tax_id &&
|
148
|
+
tax_name == o.tax_name &&
|
149
|
+
tax_code == o.tax_code &&
|
150
|
+
tax_rate == o.tax_rate &&
|
151
|
+
tax_description == o.tax_description &&
|
152
|
+
base_amount_cents == o.base_amount_cents &&
|
153
|
+
amount_cents == o.amount_cents &&
|
154
|
+
amount_currency == o.amount_currency
|
155
|
+
end
|
156
|
+
|
157
|
+
# @see the `==` method
|
158
|
+
# @param [Object] Object to be compared
|
159
|
+
def eql?(o)
|
160
|
+
self == o
|
161
|
+
end
|
162
|
+
|
163
|
+
# Calculates hash code according to all attributes.
|
164
|
+
# @return [Integer] Hash code
|
165
|
+
def hash
|
166
|
+
[lago_tax_id, tax_name, tax_code, tax_rate, tax_description, base_amount_cents, amount_cents, amount_currency].hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Builds the object from hash
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
# @return [Object] Returns the model itself
|
172
|
+
def self.build_from_hash(attributes)
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
175
|
+
transformed_hash = {}
|
176
|
+
openapi_types.each_pair do |key, type|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
178
|
+
transformed_hash["#{key}"] = nil
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
180
|
+
# check to ensure the input is an array given that the attribute
|
181
|
+
# is documented as an array but the input is not
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
184
|
+
end
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
187
|
+
end
|
188
|
+
end
|
189
|
+
new(transformed_hash)
|
190
|
+
end
|
191
|
+
|
192
|
+
# Deserializes the data based on type
|
193
|
+
# @param string type Data type
|
194
|
+
# @param string value Value to be deserialized
|
195
|
+
# @return [Object] Deserialized data
|
196
|
+
def self._deserialize(type, value)
|
197
|
+
case type.to_sym
|
198
|
+
when :Time
|
199
|
+
Time.parse(value)
|
200
|
+
when :Date
|
201
|
+
Date.parse(value)
|
202
|
+
when :String
|
203
|
+
value.to_s
|
204
|
+
when :Integer
|
205
|
+
value.to_i
|
206
|
+
when :Float
|
207
|
+
value.to_f
|
208
|
+
when :Boolean
|
209
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
210
|
+
true
|
211
|
+
else
|
212
|
+
false
|
213
|
+
end
|
214
|
+
when :Object
|
215
|
+
# generic object (usually a Hash), return directly
|
216
|
+
value
|
217
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
218
|
+
inner_type = Regexp.last_match[:inner_type]
|
219
|
+
value.map { |v| _deserialize(inner_type, v) }
|
220
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
221
|
+
k_type = Regexp.last_match[:k_type]
|
222
|
+
v_type = Regexp.last_match[:v_type]
|
223
|
+
{}.tap do |hash|
|
224
|
+
value.each do |k, v|
|
225
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
else # model
|
229
|
+
# models (e.g. Pet) or oneOf
|
230
|
+
klass = LagoAPI.const_get(type)
|
231
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Returns the string representation of the object
|
236
|
+
# @return [String] String presentation of the object
|
237
|
+
def to_s
|
238
|
+
to_hash.to_s
|
239
|
+
end
|
240
|
+
|
241
|
+
# to_body is an alias to to_hash (backward compatibility)
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_body
|
244
|
+
to_hash
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns the object in the form of hash
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
249
|
+
def to_hash
|
250
|
+
hash = {}
|
251
|
+
self.class.attribute_map.each_pair do |attr, param|
|
252
|
+
value = self.send(attr)
|
253
|
+
if value.nil?
|
254
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
255
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
256
|
+
end
|
257
|
+
|
258
|
+
hash[param] = _to_hash(value)
|
259
|
+
end
|
260
|
+
hash
|
261
|
+
end
|
262
|
+
|
263
|
+
# Outputs non-array value in the form of hash
|
264
|
+
# For object, use to_hash. Otherwise, just return the value
|
265
|
+
# @param [Object] value Any valid value
|
266
|
+
# @return [Hash] Returns the value in the form of hash
|
267
|
+
def _to_hash(value)
|
268
|
+
if value.is_a?(Array)
|
269
|
+
value.compact.map { |v| _to_hash(v) }
|
270
|
+
elsif value.is_a?(Hash)
|
271
|
+
{}.tap do |hash|
|
272
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
273
|
+
end
|
274
|
+
elsif value.respond_to? :to_hash
|
275
|
+
value.to_hash
|
276
|
+
else
|
277
|
+
value
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
end
|
282
|
+
|
283
|
+
end
|
@@ -0,0 +1,235 @@
|
|
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 CreditNoteEstimatedEstimatedCreditNoteItemsInner
|
18
|
+
# The credit note’s item amount, expressed in cents.
|
19
|
+
attr_accessor :amount_cents
|
20
|
+
|
21
|
+
# Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
|
22
|
+
attr_accessor :lago_fee_id
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'amount_cents' => :'amount_cents',
|
28
|
+
:'lago_fee_id' => :'lago_fee_id'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'amount_cents' => :'Integer',
|
41
|
+
:'lago_fee_id' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
:'lago_fee_id'
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'amount_cents')
|
68
|
+
self.amount_cents = attributes[:'amount_cents']
|
69
|
+
else
|
70
|
+
self.amount_cents = nil
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'lago_fee_id')
|
74
|
+
self.lago_fee_id = attributes[:'lago_fee_id']
|
75
|
+
else
|
76
|
+
self.lago_fee_id = nil
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
|
+
invalid_properties = Array.new
|
85
|
+
if @amount_cents.nil?
|
86
|
+
invalid_properties.push('invalid value for "amount_cents", amount_cents cannot be nil.')
|
87
|
+
end
|
88
|
+
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
96
|
+
return false if @amount_cents.nil?
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Checks equality by comparing each attribute.
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
amount_cents == o.amount_cents &&
|
106
|
+
lago_fee_id == o.lago_fee_id
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def eql?(o)
|
112
|
+
self == o
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Integer] Hash code
|
117
|
+
def hash
|
118
|
+
[amount_cents, lago_fee_id].hash
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def self.build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
attributes = attributes.transform_keys(&:to_sym)
|
127
|
+
transformed_hash = {}
|
128
|
+
openapi_types.each_pair do |key, type|
|
129
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
130
|
+
transformed_hash["#{key}"] = nil
|
131
|
+
elsif type =~ /\AArray<(.*)>/i
|
132
|
+
# check to ensure the input is an array given that the attribute
|
133
|
+
# is documented as an array but the input is not
|
134
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
135
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
136
|
+
end
|
137
|
+
elsif !attributes[attribute_map[key]].nil?
|
138
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
139
|
+
end
|
140
|
+
end
|
141
|
+
new(transformed_hash)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def self._deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :Time
|
151
|
+
Time.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :Boolean
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
# models (e.g. Pet) or oneOf
|
182
|
+
klass = LagoAPI.const_get(type)
|
183
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
if value.nil?
|
206
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
207
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
208
|
+
end
|
209
|
+
|
210
|
+
hash[param] = _to_hash(value)
|
211
|
+
end
|
212
|
+
hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Outputs non-array value in the form of hash
|
216
|
+
# For object, use to_hash. Otherwise, just return the value
|
217
|
+
# @param [Object] value Any valid value
|
218
|
+
# @return [Hash] Returns the value in the form of hash
|
219
|
+
def _to_hash(value)
|
220
|
+
if value.is_a?(Array)
|
221
|
+
value.compact.map { |v| _to_hash(v) }
|
222
|
+
elsif value.is_a?(Hash)
|
223
|
+
{}.tap do |hash|
|
224
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
225
|
+
end
|
226
|
+
elsif value.respond_to? :to_hash
|
227
|
+
value.to_hash
|
228
|
+
else
|
229
|
+
value
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
end
|
234
|
+
|
235
|
+
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
|
@@ -216,7 +216,7 @@ module LagoAPI
|
|
216
216
|
else # model
|
217
217
|
# models (e.g. Pet) or oneOf
|
218
218
|
klass = LagoAPI.const_get(type)
|
219
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
219
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
@@ -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
|
@@ -42,6 +42,9 @@ module LagoAPI
|
|
42
42
|
# Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true).
|
43
43
|
attr_accessor :external_subscription_id
|
44
44
|
|
45
|
+
# 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.
|
46
|
+
attr_accessor :invoice_display_name
|
47
|
+
|
45
48
|
# The cost of this specific fee, excluding any applicable taxes.
|
46
49
|
attr_accessor :amount_cents
|
47
50
|
|
@@ -56,6 +59,9 @@ module LagoAPI
|
|
56
59
|
# The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
|
57
60
|
attr_accessor :units
|
58
61
|
|
62
|
+
# The unit amount of the fee per unit, with precision.
|
63
|
+
attr_accessor :precise_unit_amount
|
64
|
+
|
59
65
|
# The cost of this specific fee, including any applicable taxes.
|
60
66
|
attr_accessor :total_amount_cents
|
61
67
|
|
@@ -133,11 +139,13 @@ module LagoAPI
|
|
133
139
|
:'lago_customer_id' => :'lago_customer_id',
|
134
140
|
:'external_customer_id' => :'external_customer_id',
|
135
141
|
:'external_subscription_id' => :'external_subscription_id',
|
142
|
+
:'invoice_display_name' => :'invoice_display_name',
|
136
143
|
:'amount_cents' => :'amount_cents',
|
137
144
|
:'amount_currency' => :'amount_currency',
|
138
145
|
:'taxes_amount_cents' => :'taxes_amount_cents',
|
139
146
|
:'taxes_rate' => :'taxes_rate',
|
140
147
|
:'units' => :'units',
|
148
|
+
:'precise_unit_amount' => :'precise_unit_amount',
|
141
149
|
:'total_amount_cents' => :'total_amount_cents',
|
142
150
|
:'total_amount_currency' => :'total_amount_currency',
|
143
151
|
:'events_count' => :'events_count',
|
@@ -173,11 +181,13 @@ module LagoAPI
|
|
173
181
|
:'lago_customer_id' => :'String',
|
174
182
|
:'external_customer_id' => :'String',
|
175
183
|
:'external_subscription_id' => :'String',
|
184
|
+
:'invoice_display_name' => :'String',
|
176
185
|
:'amount_cents' => :'Integer',
|
177
186
|
:'amount_currency' => :'Currency',
|
178
187
|
:'taxes_amount_cents' => :'Integer',
|
179
188
|
:'taxes_rate' => :'Float',
|
180
189
|
:'units' => :'String',
|
190
|
+
:'precise_unit_amount' => :'String',
|
181
191
|
:'total_amount_cents' => :'Integer',
|
182
192
|
:'total_amount_currency' => :'Currency',
|
183
193
|
:'events_count' => :'Integer',
|
@@ -276,6 +286,10 @@ module LagoAPI
|
|
276
286
|
self.external_subscription_id = attributes[:'external_subscription_id']
|
277
287
|
end
|
278
288
|
|
289
|
+
if attributes.key?(:'invoice_display_name')
|
290
|
+
self.invoice_display_name = attributes[:'invoice_display_name']
|
291
|
+
end
|
292
|
+
|
279
293
|
if attributes.key?(:'amount_cents')
|
280
294
|
self.amount_cents = attributes[:'amount_cents']
|
281
295
|
else
|
@@ -306,6 +320,12 @@ module LagoAPI
|
|
306
320
|
self.units = nil
|
307
321
|
end
|
308
322
|
|
323
|
+
if attributes.key?(:'precise_unit_amount')
|
324
|
+
self.precise_unit_amount = attributes[:'precise_unit_amount']
|
325
|
+
else
|
326
|
+
self.precise_unit_amount = nil
|
327
|
+
end
|
328
|
+
|
309
329
|
if attributes.key?(:'total_amount_cents')
|
310
330
|
self.total_amount_cents = attributes[:'total_amount_cents']
|
311
331
|
else
|
@@ -406,6 +426,10 @@ module LagoAPI
|
|
406
426
|
invalid_properties.push('invalid value for "units", units cannot be nil.')
|
407
427
|
end
|
408
428
|
|
429
|
+
if @precise_unit_amount.nil?
|
430
|
+
invalid_properties.push('invalid value for "precise_unit_amount", precise_unit_amount cannot be nil.')
|
431
|
+
end
|
432
|
+
|
409
433
|
if @total_amount_cents.nil?
|
410
434
|
invalid_properties.push('invalid value for "total_amount_cents", total_amount_cents cannot be nil.')
|
411
435
|
end
|
@@ -442,6 +466,7 @@ module LagoAPI
|
|
442
466
|
return false if @taxes_amount_cents.nil?
|
443
467
|
return false if @taxes_rate.nil?
|
444
468
|
return false if @units.nil?
|
469
|
+
return false if @precise_unit_amount.nil?
|
445
470
|
return false if @total_amount_cents.nil?
|
446
471
|
return false if @total_amount_currency.nil?
|
447
472
|
return false if @pay_in_advance.nil?
|
@@ -477,11 +502,13 @@ module LagoAPI
|
|
477
502
|
lago_customer_id == o.lago_customer_id &&
|
478
503
|
external_customer_id == o.external_customer_id &&
|
479
504
|
external_subscription_id == o.external_subscription_id &&
|
505
|
+
invoice_display_name == o.invoice_display_name &&
|
480
506
|
amount_cents == o.amount_cents &&
|
481
507
|
amount_currency == o.amount_currency &&
|
482
508
|
taxes_amount_cents == o.taxes_amount_cents &&
|
483
509
|
taxes_rate == o.taxes_rate &&
|
484
510
|
units == o.units &&
|
511
|
+
precise_unit_amount == o.precise_unit_amount &&
|
485
512
|
total_amount_cents == o.total_amount_cents &&
|
486
513
|
total_amount_currency == o.total_amount_currency &&
|
487
514
|
events_count == o.events_count &&
|
@@ -508,7 +535,7 @@ module LagoAPI
|
|
508
535
|
# Calculates hash code according to all attributes.
|
509
536
|
# @return [Integer] Hash code
|
510
537
|
def hash
|
511
|
-
[lago_id, lago_group_id, lago_invoice_id, lago_true_up_fee_id, lago_true_up_parent_fee_id, lago_subscription_id, lago_customer_id, external_customer_id, external_subscription_id, amount_cents, amount_currency, taxes_amount_cents, taxes_rate, units, total_amount_cents, total_amount_currency, events_count, pay_in_advance, invoiceable, from_date, to_date, payment_status, created_at, succeeded_at, failed_at, refunded_at, event_transaction_id, item, applied_taxes].hash
|
538
|
+
[lago_id, lago_group_id, lago_invoice_id, lago_true_up_fee_id, lago_true_up_parent_fee_id, lago_subscription_id, lago_customer_id, external_customer_id, external_subscription_id, invoice_display_name, amount_cents, amount_currency, taxes_amount_cents, taxes_rate, units, precise_unit_amount, total_amount_cents, total_amount_currency, events_count, pay_in_advance, invoiceable, from_date, to_date, payment_status, created_at, succeeded_at, failed_at, refunded_at, event_transaction_id, item, applied_taxes].hash
|
512
539
|
end
|
513
540
|
|
514
541
|
# Builds the object from hash
|
@@ -573,7 +600,7 @@ module LagoAPI
|
|
573
600
|
else # model
|
574
601
|
# models (e.g. Pet) or oneOf
|
575
602
|
klass = LagoAPI.const_get(type)
|
576
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
603
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
577
604
|
end
|
578
605
|
end
|
579
606
|
|