digital_femsa 1.0.0 → 1.1.0
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/Makefile +14 -0
- data/README.md +28 -33
- data/VERSION +1 -1
- data/config-ruby.json +1 -1
- data/docs/ApiKeyCreateResponse.md +1 -1
- data/docs/ApiKeyRequest.md +2 -2
- data/docs/ApiKeyResponseOnDelete.md +2 -2
- data/docs/ApiKeysApi.md +10 -10
- data/docs/BalanceResponse.md +8 -8
- data/docs/BalancesApi.md +1 -1
- data/docs/ChargeOrderResponse.md +1 -1
- data/docs/ChargeOrderResponseChannel.md +24 -0
- data/docs/ChargeRequest.md +1 -1
- data/docs/ChargeRequestPaymentMethod.md +3 -3
- data/docs/ChargeResponse.md +9 -7
- data/docs/ChargeResponseChannel.md +3 -3
- data/docs/ChargeResponseRefundsData.md +5 -1
- data/docs/ChargesApi.md +16 -12
- data/docs/ChargesDataResponse.md +9 -7
- data/docs/Checkout.md +17 -15
- data/docs/CheckoutOrderTemplate.md +3 -3
- data/docs/CheckoutResponse.md +1 -1
- data/docs/CreateCustomerFiscalEntitiesResponse.md +2 -2
- data/docs/Customer.md +13 -19
- data/docs/CustomerAddress.md +2 -2
- data/docs/CustomerFiscalEntitiesDataResponse.md +2 -2
- data/docs/CustomerFiscalEntitiesRequest.md +3 -3
- data/docs/CustomerInfo.md +4 -4
- data/docs/CustomerPaymentMethodRequest.md +1 -1
- data/docs/CustomerResponse.md +17 -21
- data/docs/CustomerShippingContactsResponse.md +5 -5
- data/docs/CustomersApi.md +15 -15
- data/docs/CustomersResponse.md +1 -1
- data/docs/DeleteApiKeysResponse.md +1 -1
- data/docs/DiscountsApi.md +9 -9
- data/docs/EventsApi.md +2 -2
- data/docs/EventsResendResponse.md +1 -1
- data/docs/GetChargesResponse.md +4 -4
- data/docs/GetTransactionsResponse.md +1 -1
- data/docs/LogsApi.md +1 -1
- data/docs/OrderFiscalEntityRequest.md +4 -4
- data/docs/OrderRefundRequest.md +7 -5
- data/docs/OrderRequest.md +17 -19
- data/docs/OrderResponse.md +37 -35
- data/docs/OrderResponseChannel.md +24 -0
- data/docs/OrderResponseShippingContact.md +4 -4
- data/docs/OrderUpdateFiscalEntityRequest.md +1 -1
- data/docs/OrderUpdateRequest.md +19 -15
- data/docs/OrdersApi.md +16 -16
- data/docs/PaymentLinkApi.md +12 -82
- data/docs/PaymentMethodCash.md +4 -4
- data/docs/PaymentMethodCashRequest.md +2 -2
- data/docs/PaymentMethodsApi.md +5 -5
- data/docs/Product.md +10 -12
- data/docs/ProductDataResponse.md +9 -11
- data/docs/ProductOrderResponse.md +9 -11
- data/docs/ProductsApi.md +7 -7
- data/docs/ShippingContactsApi.md +9 -9
- data/docs/ShippingOrderResponse.md +5 -3
- data/docs/ShippingRequest.md +2 -0
- data/docs/ShippingsApi.md +7 -7
- data/docs/TaxesApi.md +7 -7
- data/docs/TransactionResponse.md +20 -14
- data/docs/TransactionsApi.md +6 -6
- data/docs/TransfersApi.md +10 -10
- data/docs/UpdateCustomer.md +17 -21
- data/docs/UpdateCustomerFiscalEntitiesResponse.md +2 -2
- data/docs/UpdateOrderTaxRequest.md +2 -2
- data/docs/UpdateProduct.md +7 -9
- data/docs/WebhookKeysApi.md +18 -14
- data/docs/WebhooksApi.md +28 -22
- data/lib/digital_femsa/api/api_keys_api.rb +8 -8
- data/lib/digital_femsa/api/balances_api.rb +2 -2
- data/lib/digital_femsa/api/charges_api.rb +13 -9
- data/lib/digital_femsa/api/customers_api.rb +12 -12
- data/lib/digital_femsa/api/discounts_api.rb +12 -12
- data/lib/digital_femsa/api/events_api.rb +4 -4
- data/lib/digital_femsa/api/logs_api.rb +2 -2
- data/lib/digital_femsa/api/orders_api.rb +20 -20
- data/lib/digital_femsa/api/payment_link_api.rb +10 -86
- data/lib/digital_femsa/api/payment_methods_api.rb +8 -8
- data/lib/digital_femsa/api/products_api.rb +10 -10
- data/lib/digital_femsa/api/shipping_contacts_api.rb +8 -8
- data/lib/digital_femsa/api/shippings_api.rb +10 -10
- data/lib/digital_femsa/api/taxes_api.rb +10 -10
- data/lib/digital_femsa/api/transactions_api.rb +6 -6
- data/lib/digital_femsa/api/transfers_api.rb +8 -8
- data/lib/digital_femsa/api/webhook_keys_api.rb +14 -10
- data/lib/digital_femsa/api/webhooks_api.rb +23 -16
- data/lib/digital_femsa/api_client.rb +9 -5
- data/lib/digital_femsa/models/api_key_create_response.rb +1 -1
- data/lib/digital_femsa/models/api_key_request.rb +36 -1
- data/lib/digital_femsa/models/balance_response.rb +9 -9
- data/lib/digital_femsa/models/charge_order_response.rb +1 -1
- data/lib/digital_femsa/models/{order_next_action_response.rb → charge_order_response_channel.rb} +34 -18
- data/lib/digital_femsa/models/charge_request_payment_method.rb +3 -2
- data/lib/digital_femsa/models/charge_response.rb +15 -4
- data/lib/digital_femsa/models/charge_response_refunds_data.rb +23 -4
- data/lib/digital_femsa/models/charge_update_request.rb +1 -1
- data/lib/digital_femsa/models/charges_data_response.rb +15 -4
- data/lib/digital_femsa/models/checkout.rb +97 -81
- data/lib/digital_femsa/models/checkout_order_template.rb +4 -4
- data/lib/digital_femsa/models/checkout_order_template_customer_info.rb +1 -1
- data/lib/digital_femsa/models/checkout_request.rb +1 -1
- data/lib/digital_femsa/models/checkout_response.rb +1 -1
- data/lib/digital_femsa/models/create_customer_fiscal_entities_response.rb +10 -10
- data/lib/digital_femsa/models/customer.rb +57 -95
- data/lib/digital_femsa/models/customer_address.rb +7 -0
- data/lib/digital_femsa/models/customer_fiscal_entities_data_response.rb +10 -10
- data/lib/digital_femsa/models/customer_fiscal_entities_request.rb +13 -13
- data/lib/digital_femsa/models/customer_info.rb +13 -20
- data/lib/digital_femsa/models/customer_payment_method_request.rb +2 -2
- data/lib/digital_femsa/models/customer_payment_sources_inner.rb +104 -0
- data/lib/digital_femsa/models/customer_response.rb +122 -113
- data/lib/digital_femsa/models/customer_shipping_contacts_response.rb +2 -0
- data/lib/digital_femsa/models/customers_response.rb +1 -0
- data/lib/digital_femsa/models/events_resend_response.rb +1 -1
- data/lib/digital_femsa/models/get_charges_response.rb +21 -21
- data/lib/digital_femsa/models/get_transactions_response.rb +1 -1
- data/lib/digital_femsa/models/log_response.rb +1 -1
- data/lib/digital_femsa/models/logs_response.rb +1 -1
- data/lib/digital_femsa/models/order_fiscal_entity_response.rb +1 -1
- data/lib/digital_femsa/models/order_refund_request.rb +59 -11
- data/lib/digital_femsa/models/order_request.rb +69 -79
- data/lib/digital_femsa/models/order_response.rb +187 -119
- data/lib/digital_femsa/models/{order_next_action_response_redirect_to_url.rb → order_response_channel.rb} +35 -19
- data/lib/digital_femsa/models/order_response_charges.rb +1 -1
- data/lib/digital_femsa/models/order_response_checkout.rb +1 -0
- data/lib/digital_femsa/models/order_response_customer_info.rb +1 -0
- data/lib/digital_femsa/models/order_response_shipping_contact.rb +3 -0
- data/lib/digital_femsa/models/order_update_fiscal_entity_request.rb +1 -1
- data/lib/digital_femsa/models/order_update_request.rb +106 -65
- data/lib/digital_femsa/models/payment_method_cash.rb +1 -1
- data/lib/digital_femsa/models/payment_method_cash_request.rb +2 -1
- data/lib/digital_femsa/models/product.rb +103 -95
- data/lib/digital_femsa/models/product_data_response.rb +103 -95
- data/lib/digital_femsa/models/product_order_response.rb +103 -95
- data/lib/digital_femsa/models/shipping_order_response.rb +11 -1
- data/lib/digital_femsa/models/shipping_request.rb +12 -1
- data/lib/digital_femsa/models/transaction_response.rb +172 -99
- data/lib/digital_femsa/models/transfers_response.rb +1 -1
- data/lib/digital_femsa/models/transfers_response_destination.rb +312 -0
- data/lib/digital_femsa/models/update_customer.rb +42 -85
- data/lib/digital_femsa/models/update_customer_fiscal_entities_response.rb +10 -10
- data/lib/digital_femsa/models/update_order_discount_lines_request.rb +34 -0
- data/lib/digital_femsa/models/update_order_tax_request.rb +2 -2
- data/lib/digital_femsa/models/update_payment_methods_amount.rb +105 -0
- data/lib/digital_femsa/models/update_payment_methods_expires_at.rb +105 -0
- data/lib/digital_femsa/models/update_product.rb +85 -58
- data/lib/digital_femsa/models/webhook_key_delete_response.rb +1 -1
- data/lib/digital_femsa/models/webhook_key_request.rb +1 -0
- data/lib/digital_femsa/models/webhook_key_response.rb +1 -1
- data/lib/digital_femsa/models/webhook_request.rb +1 -1
- data/lib/digital_femsa/models/webhook_response.rb +1 -1
- data/lib/digital_femsa/models/webhook_update_request.rb +1 -1
- data/lib/digital_femsa/version.rb +1 -1
- data/lib/digital_femsa.rb +2 -6
- data/templates/ruby/api_client.mustache +8 -4
- metadata +26 -26
- data/docs/CustomerAntifraudInfo.md +0 -20
- data/docs/CustomerAntifraudInfoResponse.md +0 -20
- data/docs/OrderNextActionResponse.md +0 -20
- data/docs/OrderNextActionResponseRedirectToUrl.md +0 -20
- data/docs/SmsCheckoutRequest.md +0 -18
- data/docs/UpdateCustomerAntifraudInfo.md +0 -20
|
@@ -14,46 +14,50 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
#
|
|
17
|
+
# Creates a Payment Link. This is a sub-resource related to an Order template: each time a customer pays using the link, the API will create an Order using `order_template`.
|
|
18
18
|
class Checkout
|
|
19
|
-
#
|
|
20
|
-
attr_accessor :
|
|
19
|
+
# Payment link name.
|
|
20
|
+
attr_accessor :name
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
attr_accessor :
|
|
22
|
+
# Checkout type.
|
|
23
|
+
attr_accessor :type
|
|
24
24
|
|
|
25
|
-
#
|
|
26
|
-
attr_accessor :
|
|
25
|
+
# false: single use. true: multiple payments
|
|
26
|
+
attr_accessor :recurrent
|
|
27
|
+
|
|
28
|
+
# Required when `recurrent` is true. Maximum number of payments allowed through the link.
|
|
29
|
+
attr_accessor :payments_limit_count
|
|
30
|
+
|
|
31
|
+
# Payment methods available in the payment link.
|
|
32
|
+
attr_accessor :allowed_payment_methods
|
|
27
33
|
|
|
28
34
|
# This flag allows you to fill in the shipping information at checkout.
|
|
29
35
|
attr_accessor :needs_shipping_contact
|
|
30
36
|
|
|
31
|
-
#
|
|
32
|
-
attr_accessor :
|
|
33
|
-
|
|
34
|
-
attr_accessor :order_template
|
|
37
|
+
# Start time for the link. Unix timestamp in seconds.
|
|
38
|
+
attr_accessor :starts_at
|
|
35
39
|
|
|
36
|
-
#
|
|
37
|
-
attr_accessor :
|
|
40
|
+
# Expiration time for the link (Unix timestamp in seconds). Valid range is between 2 and 365 days (calculated from the next day of creation at 00:01).
|
|
41
|
+
attr_accessor :expires_at
|
|
38
42
|
|
|
39
|
-
#
|
|
40
|
-
attr_accessor :
|
|
43
|
+
# If true, the link does not expire.
|
|
44
|
+
attr_accessor :can_not_expire
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
attr_accessor :type
|
|
46
|
+
attr_accessor :order_template
|
|
44
47
|
|
|
45
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
49
|
def self.attribute_map
|
|
47
50
|
{
|
|
48
|
-
:'allowed_payment_methods' => :'allowed_payment_methods',
|
|
49
|
-
:'expires_at' => :'expires_at',
|
|
50
51
|
:'name' => :'name',
|
|
51
|
-
:'
|
|
52
|
-
:'on_demand_enabled' => :'on_demand_enabled',
|
|
53
|
-
:'order_template' => :'order_template',
|
|
54
|
-
:'payments_limit_count' => :'payments_limit_count',
|
|
52
|
+
:'type' => :'type',
|
|
55
53
|
:'recurrent' => :'recurrent',
|
|
56
|
-
:'
|
|
54
|
+
:'payments_limit_count' => :'payments_limit_count',
|
|
55
|
+
:'allowed_payment_methods' => :'allowed_payment_methods',
|
|
56
|
+
:'needs_shipping_contact' => :'needs_shipping_contact',
|
|
57
|
+
:'starts_at' => :'starts_at',
|
|
58
|
+
:'expires_at' => :'expires_at',
|
|
59
|
+
:'can_not_expire' => :'can_not_expire',
|
|
60
|
+
:'order_template' => :'order_template'
|
|
57
61
|
}
|
|
58
62
|
end
|
|
59
63
|
|
|
@@ -65,22 +69,22 @@ module DigitalFemsa
|
|
|
65
69
|
# Attribute type mapping.
|
|
66
70
|
def self.openapi_types
|
|
67
71
|
{
|
|
68
|
-
:'allowed_payment_methods' => :'Array<String>',
|
|
69
|
-
:'expires_at' => :'Integer',
|
|
70
72
|
:'name' => :'String',
|
|
71
|
-
:'
|
|
72
|
-
:'on_demand_enabled' => :'Boolean',
|
|
73
|
-
:'order_template' => :'CheckoutOrderTemplate',
|
|
74
|
-
:'payments_limit_count' => :'Integer',
|
|
73
|
+
:'type' => :'String',
|
|
75
74
|
:'recurrent' => :'Boolean',
|
|
76
|
-
:'
|
|
75
|
+
:'payments_limit_count' => :'Integer',
|
|
76
|
+
:'allowed_payment_methods' => :'Array<String>',
|
|
77
|
+
:'needs_shipping_contact' => :'Boolean',
|
|
78
|
+
:'starts_at' => :'Integer',
|
|
79
|
+
:'expires_at' => :'Integer',
|
|
80
|
+
:'can_not_expire' => :'Boolean',
|
|
81
|
+
:'order_template' => :'CheckoutOrderTemplate'
|
|
77
82
|
}
|
|
78
83
|
end
|
|
79
84
|
|
|
80
85
|
# List of attributes with nullable: true
|
|
81
86
|
def self.openapi_nullable
|
|
82
87
|
Set.new([
|
|
83
|
-
:'on_demand_enabled',
|
|
84
88
|
])
|
|
85
89
|
end
|
|
86
90
|
|
|
@@ -99,54 +103,60 @@ module DigitalFemsa
|
|
|
99
103
|
h[k.to_sym] = v
|
|
100
104
|
}
|
|
101
105
|
|
|
102
|
-
if attributes.key?(:'
|
|
103
|
-
|
|
104
|
-
self.allowed_payment_methods = value
|
|
105
|
-
end
|
|
106
|
+
if attributes.key?(:'name')
|
|
107
|
+
self.name = attributes[:'name']
|
|
106
108
|
else
|
|
107
|
-
self.
|
|
109
|
+
self.name = nil
|
|
108
110
|
end
|
|
109
111
|
|
|
110
|
-
if attributes.key?(:'
|
|
111
|
-
self.
|
|
112
|
+
if attributes.key?(:'type')
|
|
113
|
+
self.type = attributes[:'type']
|
|
112
114
|
else
|
|
113
|
-
self.
|
|
115
|
+
self.type = nil
|
|
114
116
|
end
|
|
115
117
|
|
|
116
|
-
if attributes.key?(:'
|
|
117
|
-
self.
|
|
118
|
+
if attributes.key?(:'recurrent')
|
|
119
|
+
self.recurrent = attributes[:'recurrent']
|
|
118
120
|
else
|
|
119
|
-
self.
|
|
121
|
+
self.recurrent = nil
|
|
120
122
|
end
|
|
121
123
|
|
|
122
|
-
if attributes.key?(:'
|
|
123
|
-
self.
|
|
124
|
+
if attributes.key?(:'payments_limit_count')
|
|
125
|
+
self.payments_limit_count = attributes[:'payments_limit_count']
|
|
124
126
|
end
|
|
125
127
|
|
|
126
|
-
if attributes.key?(:'
|
|
127
|
-
|
|
128
|
+
if attributes.key?(:'allowed_payment_methods')
|
|
129
|
+
if (value = attributes[:'allowed_payment_methods']).is_a?(Array)
|
|
130
|
+
self.allowed_payment_methods = value
|
|
131
|
+
end
|
|
132
|
+
else
|
|
133
|
+
self.allowed_payment_methods = nil
|
|
128
134
|
end
|
|
129
135
|
|
|
130
|
-
if attributes.key?(:'
|
|
131
|
-
self.
|
|
136
|
+
if attributes.key?(:'needs_shipping_contact')
|
|
137
|
+
self.needs_shipping_contact = attributes[:'needs_shipping_contact']
|
|
132
138
|
else
|
|
133
|
-
self.
|
|
139
|
+
self.needs_shipping_contact = nil
|
|
134
140
|
end
|
|
135
141
|
|
|
136
|
-
if attributes.key?(:'
|
|
137
|
-
self.
|
|
142
|
+
if attributes.key?(:'starts_at')
|
|
143
|
+
self.starts_at = attributes[:'starts_at']
|
|
138
144
|
end
|
|
139
145
|
|
|
140
|
-
if attributes.key?(:'
|
|
141
|
-
self.
|
|
146
|
+
if attributes.key?(:'expires_at')
|
|
147
|
+
self.expires_at = attributes[:'expires_at']
|
|
142
148
|
else
|
|
143
|
-
self.
|
|
149
|
+
self.expires_at = nil
|
|
144
150
|
end
|
|
145
151
|
|
|
146
|
-
if attributes.key?(:'
|
|
147
|
-
self.
|
|
152
|
+
if attributes.key?(:'can_not_expire')
|
|
153
|
+
self.can_not_expire = attributes[:'can_not_expire']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'order_template')
|
|
157
|
+
self.order_template = attributes[:'order_template']
|
|
148
158
|
else
|
|
149
|
-
self.
|
|
159
|
+
self.order_template = nil
|
|
150
160
|
end
|
|
151
161
|
end
|
|
152
162
|
|
|
@@ -155,28 +165,32 @@ module DigitalFemsa
|
|
|
155
165
|
def list_invalid_properties
|
|
156
166
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
157
167
|
invalid_properties = Array.new
|
|
158
|
-
if @allowed_payment_methods.nil?
|
|
159
|
-
invalid_properties.push('invalid value for "allowed_payment_methods", allowed_payment_methods cannot be nil.')
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
if @expires_at.nil?
|
|
163
|
-
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
164
|
-
end
|
|
165
|
-
|
|
166
168
|
if @name.nil?
|
|
167
169
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
168
170
|
end
|
|
169
171
|
|
|
170
|
-
if @
|
|
171
|
-
invalid_properties.push('invalid value for "
|
|
172
|
+
if @type.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
172
174
|
end
|
|
173
175
|
|
|
174
176
|
if @recurrent.nil?
|
|
175
177
|
invalid_properties.push('invalid value for "recurrent", recurrent cannot be nil.')
|
|
176
178
|
end
|
|
177
179
|
|
|
178
|
-
if @
|
|
179
|
-
invalid_properties.push('invalid value for "
|
|
180
|
+
if @allowed_payment_methods.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "allowed_payment_methods", allowed_payment_methods cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if @needs_shipping_contact.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "needs_shipping_contact", needs_shipping_contact cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @expires_at.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @order_template.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "order_template", order_template cannot be nil.')
|
|
180
194
|
end
|
|
181
195
|
|
|
182
196
|
invalid_properties
|
|
@@ -186,12 +200,13 @@ module DigitalFemsa
|
|
|
186
200
|
# @return true if the model is valid
|
|
187
201
|
def valid?
|
|
188
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
203
|
+
return false if @name.nil?
|
|
204
|
+
return false if @type.nil?
|
|
205
|
+
return false if @recurrent.nil?
|
|
189
206
|
return false if @allowed_payment_methods.nil?
|
|
207
|
+
return false if @needs_shipping_contact.nil?
|
|
190
208
|
return false if @expires_at.nil?
|
|
191
|
-
return false if @name.nil?
|
|
192
209
|
return false if @order_template.nil?
|
|
193
|
-
return false if @recurrent.nil?
|
|
194
|
-
return false if @type.nil?
|
|
195
210
|
true
|
|
196
211
|
end
|
|
197
212
|
|
|
@@ -200,15 +215,16 @@ module DigitalFemsa
|
|
|
200
215
|
def ==(o)
|
|
201
216
|
return true if self.equal?(o)
|
|
202
217
|
self.class == o.class &&
|
|
203
|
-
allowed_payment_methods == o.allowed_payment_methods &&
|
|
204
|
-
expires_at == o.expires_at &&
|
|
205
218
|
name == o.name &&
|
|
206
|
-
|
|
207
|
-
on_demand_enabled == o.on_demand_enabled &&
|
|
208
|
-
order_template == o.order_template &&
|
|
209
|
-
payments_limit_count == o.payments_limit_count &&
|
|
219
|
+
type == o.type &&
|
|
210
220
|
recurrent == o.recurrent &&
|
|
211
|
-
|
|
221
|
+
payments_limit_count == o.payments_limit_count &&
|
|
222
|
+
allowed_payment_methods == o.allowed_payment_methods &&
|
|
223
|
+
needs_shipping_contact == o.needs_shipping_contact &&
|
|
224
|
+
starts_at == o.starts_at &&
|
|
225
|
+
expires_at == o.expires_at &&
|
|
226
|
+
can_not_expire == o.can_not_expire &&
|
|
227
|
+
order_template == o.order_template
|
|
212
228
|
end
|
|
213
229
|
|
|
214
230
|
# @see the `==` method
|
|
@@ -220,7 +236,7 @@ module DigitalFemsa
|
|
|
220
236
|
# Calculates hash code according to all attributes.
|
|
221
237
|
# @return [Integer] Hash code
|
|
222
238
|
def hash
|
|
223
|
-
[
|
|
239
|
+
[name, type, recurrent, payments_limit_count, allowed_payment_methods, needs_shipping_contact, starts_at, expires_at, can_not_expire, order_template].hash
|
|
224
240
|
end
|
|
225
241
|
|
|
226
242
|
# Builds the object from hash
|
|
@@ -14,17 +14,17 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
#
|
|
17
|
+
# Attributes used to create the order when a new payment is received.
|
|
18
18
|
class CheckoutOrderTemplate
|
|
19
|
-
#
|
|
19
|
+
# ISO 4217 currency code for the order.
|
|
20
20
|
attr_accessor :currency
|
|
21
21
|
|
|
22
22
|
attr_accessor :customer_info
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Products to buy. Each contains unit price and quantity used to calculate the order total.
|
|
25
25
|
attr_accessor :line_items
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# Arbitrary key-value data attached to the order for internal use.
|
|
28
28
|
attr_accessor :metadata
|
|
29
29
|
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
#
|
|
17
|
+
# Customer information used when creating the order.
|
|
18
18
|
module CheckoutOrderTemplateCustomerInfo
|
|
19
19
|
class << self
|
|
20
20
|
# List of class defined in oneOf (OpenAPI v3)
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
# [Checkout](https://developers.
|
|
17
|
+
# [Checkout](https://developers.digitalfemsa.io/docs/checkout-redireccionado) details
|
|
18
18
|
class CheckoutRequest
|
|
19
19
|
# Are the payment methods available for this link
|
|
20
20
|
attr_accessor :allowed_payment_methods
|
|
@@ -19,14 +19,14 @@ module DigitalFemsa
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :tax_id
|
|
21
21
|
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
22
24
|
attr_accessor :email
|
|
23
25
|
|
|
24
26
|
attr_accessor :phone
|
|
25
27
|
|
|
26
28
|
attr_accessor :metadata
|
|
27
29
|
|
|
28
|
-
attr_accessor :company_name
|
|
29
|
-
|
|
30
30
|
attr_accessor :id
|
|
31
31
|
|
|
32
32
|
attr_accessor :object
|
|
@@ -42,10 +42,10 @@ module DigitalFemsa
|
|
|
42
42
|
{
|
|
43
43
|
:'address' => :'address',
|
|
44
44
|
:'tax_id' => :'tax_id',
|
|
45
|
+
:'name' => :'name',
|
|
45
46
|
:'email' => :'email',
|
|
46
47
|
:'phone' => :'phone',
|
|
47
48
|
:'metadata' => :'metadata',
|
|
48
|
-
:'company_name' => :'company_name',
|
|
49
49
|
:'id' => :'id',
|
|
50
50
|
:'object' => :'object',
|
|
51
51
|
:'created_at' => :'created_at',
|
|
@@ -64,10 +64,10 @@ module DigitalFemsa
|
|
|
64
64
|
{
|
|
65
65
|
:'address' => :'CustomerAddress',
|
|
66
66
|
:'tax_id' => :'String',
|
|
67
|
+
:'name' => :'String',
|
|
67
68
|
:'email' => :'String',
|
|
68
69
|
:'phone' => :'String',
|
|
69
70
|
:'metadata' => :'Hash<String, Object>',
|
|
70
|
-
:'company_name' => :'String',
|
|
71
71
|
:'id' => :'String',
|
|
72
72
|
:'object' => :'String',
|
|
73
73
|
:'created_at' => :'Integer',
|
|
@@ -114,6 +114,10 @@ module DigitalFemsa
|
|
|
114
114
|
self.tax_id = attributes[:'tax_id']
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
+
if attributes.key?(:'name')
|
|
118
|
+
self.name = attributes[:'name']
|
|
119
|
+
end
|
|
120
|
+
|
|
117
121
|
if attributes.key?(:'email')
|
|
118
122
|
self.email = attributes[:'email']
|
|
119
123
|
end
|
|
@@ -128,10 +132,6 @@ module DigitalFemsa
|
|
|
128
132
|
end
|
|
129
133
|
end
|
|
130
134
|
|
|
131
|
-
if attributes.key?(:'company_name')
|
|
132
|
-
self.company_name = attributes[:'company_name']
|
|
133
|
-
end
|
|
134
|
-
|
|
135
135
|
if attributes.key?(:'id')
|
|
136
136
|
self.id = attributes[:'id']
|
|
137
137
|
else
|
|
@@ -201,10 +201,10 @@ module DigitalFemsa
|
|
|
201
201
|
self.class == o.class &&
|
|
202
202
|
address == o.address &&
|
|
203
203
|
tax_id == o.tax_id &&
|
|
204
|
+
name == o.name &&
|
|
204
205
|
email == o.email &&
|
|
205
206
|
phone == o.phone &&
|
|
206
207
|
metadata == o.metadata &&
|
|
207
|
-
company_name == o.company_name &&
|
|
208
208
|
id == o.id &&
|
|
209
209
|
object == o.object &&
|
|
210
210
|
created_at == o.created_at &&
|
|
@@ -221,7 +221,7 @@ module DigitalFemsa
|
|
|
221
221
|
# Calculates hash code according to all attributes.
|
|
222
222
|
# @return [Integer] Hash code
|
|
223
223
|
def hash
|
|
224
|
-
[address, tax_id, email, phone, metadata,
|
|
224
|
+
[address, tax_id, name, email, phone, metadata, id, object, created_at, parent_id, default].hash
|
|
225
225
|
end
|
|
226
226
|
|
|
227
227
|
# Builds the object from hash
|