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,55 +14,46 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
#
|
|
17
|
+
# Customer create request.
|
|
18
18
|
class Customer
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# It is a value that allows identifying if the email is corporate or not.
|
|
22
|
-
attr_accessor :corporate
|
|
23
|
-
|
|
24
|
-
# It is an undefined value.
|
|
25
|
-
attr_accessor :custom_reference
|
|
19
|
+
# Customer's name.
|
|
20
|
+
attr_accessor :name
|
|
26
21
|
|
|
27
|
-
#
|
|
22
|
+
# Customer email address.
|
|
28
23
|
attr_accessor :email
|
|
29
24
|
|
|
30
|
-
#
|
|
31
|
-
attr_accessor :
|
|
25
|
+
# Customer phone number.
|
|
26
|
+
attr_accessor :phone
|
|
32
27
|
|
|
33
|
-
#
|
|
34
|
-
attr_accessor :
|
|
28
|
+
# Indicates whether the customer email is corporate.
|
|
29
|
+
attr_accessor :corporate
|
|
35
30
|
|
|
36
|
-
|
|
31
|
+
# Merchant-defined reference used to identify the customer in your system.
|
|
32
|
+
attr_accessor :custom_reference
|
|
37
33
|
|
|
34
|
+
# Arbitrary metadata associated with the customer.
|
|
38
35
|
attr_accessor :metadata
|
|
39
36
|
|
|
40
|
-
#
|
|
41
|
-
attr_accessor :name
|
|
42
|
-
|
|
43
|
-
# Contains details of the payment methods that the customer has active or has used in Femsa
|
|
37
|
+
# Customer payment sources to be created with the customer (optional).
|
|
44
38
|
attr_accessor :payment_sources
|
|
45
39
|
|
|
46
|
-
#
|
|
47
|
-
attr_accessor :
|
|
40
|
+
# Customer fiscal entities to be created with the customer (optional).
|
|
41
|
+
attr_accessor :fiscal_entities
|
|
48
42
|
|
|
49
|
-
#
|
|
43
|
+
# Customer shipping contacts to be created with the customer (optional).
|
|
50
44
|
attr_accessor :shipping_contacts
|
|
51
45
|
|
|
52
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
47
|
def self.attribute_map
|
|
54
48
|
{
|
|
55
|
-
:'
|
|
49
|
+
:'name' => :'name',
|
|
50
|
+
:'email' => :'email',
|
|
51
|
+
:'phone' => :'phone',
|
|
56
52
|
:'corporate' => :'corporate',
|
|
57
53
|
:'custom_reference' => :'custom_reference',
|
|
58
|
-
:'email' => :'email',
|
|
59
|
-
:'default_payment_source_id' => :'default_payment_source_id',
|
|
60
|
-
:'default_shipping_contact_id' => :'default_shipping_contact_id',
|
|
61
|
-
:'fiscal_entities' => :'fiscal_entities',
|
|
62
54
|
:'metadata' => :'metadata',
|
|
63
|
-
:'name' => :'name',
|
|
64
55
|
:'payment_sources' => :'payment_sources',
|
|
65
|
-
:'
|
|
56
|
+
:'fiscal_entities' => :'fiscal_entities',
|
|
66
57
|
:'shipping_contacts' => :'shipping_contacts'
|
|
67
58
|
}
|
|
68
59
|
end
|
|
@@ -75,17 +66,14 @@ module DigitalFemsa
|
|
|
75
66
|
# Attribute type mapping.
|
|
76
67
|
def self.openapi_types
|
|
77
68
|
{
|
|
78
|
-
:'
|
|
69
|
+
:'name' => :'String',
|
|
70
|
+
:'email' => :'String',
|
|
71
|
+
:'phone' => :'String',
|
|
79
72
|
:'corporate' => :'Boolean',
|
|
80
73
|
:'custom_reference' => :'String',
|
|
81
|
-
:'email' => :'String',
|
|
82
|
-
:'default_payment_source_id' => :'String',
|
|
83
|
-
:'default_shipping_contact_id' => :'String',
|
|
84
|
-
:'fiscal_entities' => :'Array<CustomerFiscalEntitiesRequest>',
|
|
85
74
|
:'metadata' => :'Hash<String, Object>',
|
|
86
|
-
:'name' => :'String',
|
|
87
75
|
:'payment_sources' => :'Array<CustomerPaymentMethodsRequest>',
|
|
88
|
-
:'
|
|
76
|
+
:'fiscal_entities' => :'Array<CustomerFiscalEntitiesRequest>',
|
|
89
77
|
:'shipping_contacts' => :'Array<CustomerShippingContacts>'
|
|
90
78
|
}
|
|
91
79
|
end
|
|
@@ -93,7 +81,7 @@ module DigitalFemsa
|
|
|
93
81
|
# List of attributes with nullable: true
|
|
94
82
|
def self.openapi_nullable
|
|
95
83
|
Set.new([
|
|
96
|
-
:'
|
|
84
|
+
:'phone',
|
|
97
85
|
])
|
|
98
86
|
end
|
|
99
87
|
|
|
@@ -112,18 +100,10 @@ module DigitalFemsa
|
|
|
112
100
|
h[k.to_sym] = v
|
|
113
101
|
}
|
|
114
102
|
|
|
115
|
-
if attributes.key?(:'
|
|
116
|
-
self.
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
if attributes.key?(:'corporate')
|
|
120
|
-
self.corporate = attributes[:'corporate']
|
|
103
|
+
if attributes.key?(:'name')
|
|
104
|
+
self.name = attributes[:'name']
|
|
121
105
|
else
|
|
122
|
-
self.
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'custom_reference')
|
|
126
|
-
self.custom_reference = attributes[:'custom_reference']
|
|
106
|
+
self.name = nil
|
|
127
107
|
end
|
|
128
108
|
|
|
129
109
|
if attributes.key?(:'email')
|
|
@@ -132,18 +112,18 @@ module DigitalFemsa
|
|
|
132
112
|
self.email = nil
|
|
133
113
|
end
|
|
134
114
|
|
|
135
|
-
if attributes.key?(:'
|
|
136
|
-
self.
|
|
115
|
+
if attributes.key?(:'phone')
|
|
116
|
+
self.phone = attributes[:'phone']
|
|
137
117
|
end
|
|
138
118
|
|
|
139
|
-
if attributes.key?(:'
|
|
140
|
-
self.
|
|
119
|
+
if attributes.key?(:'corporate')
|
|
120
|
+
self.corporate = attributes[:'corporate']
|
|
121
|
+
else
|
|
122
|
+
self.corporate = false
|
|
141
123
|
end
|
|
142
124
|
|
|
143
|
-
if attributes.key?(:'
|
|
144
|
-
|
|
145
|
-
self.fiscal_entities = value
|
|
146
|
-
end
|
|
125
|
+
if attributes.key?(:'custom_reference')
|
|
126
|
+
self.custom_reference = attributes[:'custom_reference']
|
|
147
127
|
end
|
|
148
128
|
|
|
149
129
|
if attributes.key?(:'metadata')
|
|
@@ -152,22 +132,16 @@ module DigitalFemsa
|
|
|
152
132
|
end
|
|
153
133
|
end
|
|
154
134
|
|
|
155
|
-
if attributes.key?(:'name')
|
|
156
|
-
self.name = attributes[:'name']
|
|
157
|
-
else
|
|
158
|
-
self.name = nil
|
|
159
|
-
end
|
|
160
|
-
|
|
161
135
|
if attributes.key?(:'payment_sources')
|
|
162
136
|
if (value = attributes[:'payment_sources']).is_a?(Array)
|
|
163
137
|
self.payment_sources = value
|
|
164
138
|
end
|
|
165
139
|
end
|
|
166
140
|
|
|
167
|
-
if attributes.key?(:'
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
141
|
+
if attributes.key?(:'fiscal_entities')
|
|
142
|
+
if (value = attributes[:'fiscal_entities']).is_a?(Array)
|
|
143
|
+
self.fiscal_entities = value
|
|
144
|
+
end
|
|
171
145
|
end
|
|
172
146
|
|
|
173
147
|
if attributes.key?(:'shipping_contacts')
|
|
@@ -182,20 +156,16 @@ module DigitalFemsa
|
|
|
182
156
|
def list_invalid_properties
|
|
183
157
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
184
158
|
invalid_properties = Array.new
|
|
185
|
-
if @email.nil?
|
|
186
|
-
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
if !@metadata.nil? && @metadata.length > 100
|
|
190
|
-
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 100.')
|
|
191
|
-
end
|
|
192
|
-
|
|
193
159
|
if @name.nil?
|
|
194
160
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
195
161
|
end
|
|
196
162
|
|
|
197
|
-
if @
|
|
198
|
-
invalid_properties.push('invalid value for "
|
|
163
|
+
if @email.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if !@phone.nil? && @phone.to_s.length > 19
|
|
168
|
+
invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 19.')
|
|
199
169
|
end
|
|
200
170
|
|
|
201
171
|
invalid_properties
|
|
@@ -205,25 +175,20 @@ module DigitalFemsa
|
|
|
205
175
|
# @return true if the model is valid
|
|
206
176
|
def valid?
|
|
207
177
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
208
|
-
return false if @email.nil?
|
|
209
|
-
return false if !@metadata.nil? && @metadata.length > 100
|
|
210
178
|
return false if @name.nil?
|
|
211
|
-
return false if @
|
|
179
|
+
return false if @email.nil?
|
|
180
|
+
return false if !@phone.nil? && @phone.to_s.length > 19
|
|
212
181
|
true
|
|
213
182
|
end
|
|
214
183
|
|
|
215
184
|
# Custom attribute writer method with validation
|
|
216
|
-
# @param [Object]
|
|
217
|
-
def
|
|
218
|
-
if
|
|
219
|
-
fail ArgumentError, '
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
if metadata.length > 100
|
|
223
|
-
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 100.'
|
|
185
|
+
# @param [Object] phone Value to be assigned
|
|
186
|
+
def phone=(phone)
|
|
187
|
+
if !phone.nil? && phone.to_s.length > 19
|
|
188
|
+
fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 19.'
|
|
224
189
|
end
|
|
225
190
|
|
|
226
|
-
@
|
|
191
|
+
@phone = phone
|
|
227
192
|
end
|
|
228
193
|
|
|
229
194
|
# Checks equality by comparing each attribute.
|
|
@@ -231,17 +196,14 @@ module DigitalFemsa
|
|
|
231
196
|
def ==(o)
|
|
232
197
|
return true if self.equal?(o)
|
|
233
198
|
self.class == o.class &&
|
|
234
|
-
|
|
199
|
+
name == o.name &&
|
|
200
|
+
email == o.email &&
|
|
201
|
+
phone == o.phone &&
|
|
235
202
|
corporate == o.corporate &&
|
|
236
203
|
custom_reference == o.custom_reference &&
|
|
237
|
-
email == o.email &&
|
|
238
|
-
default_payment_source_id == o.default_payment_source_id &&
|
|
239
|
-
default_shipping_contact_id == o.default_shipping_contact_id &&
|
|
240
|
-
fiscal_entities == o.fiscal_entities &&
|
|
241
204
|
metadata == o.metadata &&
|
|
242
|
-
name == o.name &&
|
|
243
205
|
payment_sources == o.payment_sources &&
|
|
244
|
-
|
|
206
|
+
fiscal_entities == o.fiscal_entities &&
|
|
245
207
|
shipping_contacts == o.shipping_contacts
|
|
246
208
|
end
|
|
247
209
|
|
|
@@ -254,7 +216,7 @@ module DigitalFemsa
|
|
|
254
216
|
# Calculates hash code according to all attributes.
|
|
255
217
|
# @return [Integer] Hash code
|
|
256
218
|
def hash
|
|
257
|
-
[
|
|
219
|
+
[name, email, phone, corporate, custom_reference, metadata, payment_sources, fiscal_entities, shipping_contacts].hash
|
|
258
220
|
end
|
|
259
221
|
|
|
260
222
|
# Builds the object from hash
|
|
@@ -114,6 +114,8 @@ module DigitalFemsa
|
|
|
114
114
|
|
|
115
115
|
if attributes.key?(:'country')
|
|
116
116
|
self.country = attributes[:'country']
|
|
117
|
+
else
|
|
118
|
+
self.country = nil
|
|
117
119
|
end
|
|
118
120
|
|
|
119
121
|
if attributes.key?(:'residential')
|
|
@@ -144,6 +146,10 @@ module DigitalFemsa
|
|
|
144
146
|
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
|
145
147
|
end
|
|
146
148
|
|
|
149
|
+
if @country.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
147
153
|
invalid_properties
|
|
148
154
|
end
|
|
149
155
|
|
|
@@ -154,6 +160,7 @@ module DigitalFemsa
|
|
|
154
160
|
return false if @street1.nil?
|
|
155
161
|
return false if @postal_code.nil?
|
|
156
162
|
return false if @city.nil?
|
|
163
|
+
return false if @country.nil?
|
|
157
164
|
true
|
|
158
165
|
end
|
|
159
166
|
|
|
@@ -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
|
|
@@ -19,23 +19,23 @@ 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
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
31
|
def self.attribute_map
|
|
32
32
|
{
|
|
33
33
|
:'address' => :'address',
|
|
34
34
|
:'tax_id' => :'tax_id',
|
|
35
|
+
:'name' => :'name',
|
|
35
36
|
:'email' => :'email',
|
|
36
37
|
:'phone' => :'phone',
|
|
37
|
-
:'metadata' => :'metadata'
|
|
38
|
-
:'company_name' => :'company_name'
|
|
38
|
+
:'metadata' => :'metadata'
|
|
39
39
|
}
|
|
40
40
|
end
|
|
41
41
|
|
|
@@ -49,10 +49,10 @@ module DigitalFemsa
|
|
|
49
49
|
{
|
|
50
50
|
:'address' => :'CustomerAddress',
|
|
51
51
|
:'tax_id' => :'String',
|
|
52
|
+
:'name' => :'String',
|
|
52
53
|
:'email' => :'String',
|
|
53
54
|
:'phone' => :'String',
|
|
54
|
-
:'metadata' => :'Hash<String, Object>'
|
|
55
|
-
:'company_name' => :'String'
|
|
55
|
+
:'metadata' => :'Hash<String, Object>'
|
|
56
56
|
}
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -87,6 +87,10 @@ module DigitalFemsa
|
|
|
87
87
|
self.tax_id = attributes[:'tax_id']
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
+
if attributes.key?(:'name')
|
|
91
|
+
self.name = attributes[:'name']
|
|
92
|
+
end
|
|
93
|
+
|
|
90
94
|
if attributes.key?(:'email')
|
|
91
95
|
self.email = attributes[:'email']
|
|
92
96
|
end
|
|
@@ -100,10 +104,6 @@ module DigitalFemsa
|
|
|
100
104
|
self.metadata = value
|
|
101
105
|
end
|
|
102
106
|
end
|
|
103
|
-
|
|
104
|
-
if attributes.key?(:'company_name')
|
|
105
|
-
self.company_name = attributes[:'company_name']
|
|
106
|
-
end
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -133,10 +133,10 @@ module DigitalFemsa
|
|
|
133
133
|
self.class == o.class &&
|
|
134
134
|
address == o.address &&
|
|
135
135
|
tax_id == o.tax_id &&
|
|
136
|
+
name == o.name &&
|
|
136
137
|
email == o.email &&
|
|
137
138
|
phone == o.phone &&
|
|
138
|
-
metadata == o.metadata
|
|
139
|
-
company_name == o.company_name
|
|
139
|
+
metadata == o.metadata
|
|
140
140
|
end
|
|
141
141
|
|
|
142
142
|
# @see the `==` method
|
|
@@ -148,7 +148,7 @@ module DigitalFemsa
|
|
|
148
148
|
# Calculates hash code according to all attributes.
|
|
149
149
|
# @return [Integer] Hash code
|
|
150
150
|
def hash
|
|
151
|
-
[address, tax_id, email, phone, metadata
|
|
151
|
+
[address, tax_id, name, email, phone, metadata].hash
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
# Builds the object from hash
|
|
@@ -15,6 +15,8 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
17
|
class CustomerInfo
|
|
18
|
+
attr_accessor :customer_id
|
|
19
|
+
|
|
18
20
|
attr_accessor :name
|
|
19
21
|
|
|
20
22
|
attr_accessor :email
|
|
@@ -23,16 +25,14 @@ module DigitalFemsa
|
|
|
23
25
|
|
|
24
26
|
attr_accessor :corporate
|
|
25
27
|
|
|
26
|
-
attr_accessor :object
|
|
27
|
-
|
|
28
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
29
|
def self.attribute_map
|
|
30
30
|
{
|
|
31
|
+
:'customer_id' => :'customer_id',
|
|
31
32
|
:'name' => :'name',
|
|
32
33
|
:'email' => :'email',
|
|
33
34
|
:'phone' => :'phone',
|
|
34
|
-
:'corporate' => :'corporate'
|
|
35
|
-
:'object' => :'object'
|
|
35
|
+
:'corporate' => :'corporate'
|
|
36
36
|
}
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -44,11 +44,11 @@ module DigitalFemsa
|
|
|
44
44
|
# Attribute type mapping.
|
|
45
45
|
def self.openapi_types
|
|
46
46
|
{
|
|
47
|
+
:'customer_id' => :'String',
|
|
47
48
|
:'name' => :'String',
|
|
48
49
|
:'email' => :'String',
|
|
49
50
|
:'phone' => :'String',
|
|
50
|
-
:'corporate' => :'Boolean'
|
|
51
|
-
:'object' => :'String'
|
|
51
|
+
:'corporate' => :'Boolean'
|
|
52
52
|
}
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -73,6 +73,10 @@ module DigitalFemsa
|
|
|
73
73
|
h[k.to_sym] = v
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
if attributes.key?(:'customer_id')
|
|
77
|
+
self.customer_id = attributes[:'customer_id']
|
|
78
|
+
end
|
|
79
|
+
|
|
76
80
|
if attributes.key?(:'name')
|
|
77
81
|
self.name = attributes[:'name']
|
|
78
82
|
else
|
|
@@ -87,17 +91,11 @@ module DigitalFemsa
|
|
|
87
91
|
|
|
88
92
|
if attributes.key?(:'phone')
|
|
89
93
|
self.phone = attributes[:'phone']
|
|
90
|
-
else
|
|
91
|
-
self.phone = nil
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
if attributes.key?(:'corporate')
|
|
95
97
|
self.corporate = attributes[:'corporate']
|
|
96
98
|
end
|
|
97
|
-
|
|
98
|
-
if attributes.key?(:'object')
|
|
99
|
-
self.object = attributes[:'object']
|
|
100
|
-
end
|
|
101
99
|
end
|
|
102
100
|
|
|
103
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -113,10 +111,6 @@ module DigitalFemsa
|
|
|
113
111
|
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
114
112
|
end
|
|
115
113
|
|
|
116
|
-
if @phone.nil?
|
|
117
|
-
invalid_properties.push('invalid value for "phone", phone cannot be nil.')
|
|
118
|
-
end
|
|
119
|
-
|
|
120
114
|
invalid_properties
|
|
121
115
|
end
|
|
122
116
|
|
|
@@ -126,7 +120,6 @@ module DigitalFemsa
|
|
|
126
120
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
121
|
return false if @name.nil?
|
|
128
122
|
return false if @email.nil?
|
|
129
|
-
return false if @phone.nil?
|
|
130
123
|
true
|
|
131
124
|
end
|
|
132
125
|
|
|
@@ -135,11 +128,11 @@ module DigitalFemsa
|
|
|
135
128
|
def ==(o)
|
|
136
129
|
return true if self.equal?(o)
|
|
137
130
|
self.class == o.class &&
|
|
131
|
+
customer_id == o.customer_id &&
|
|
138
132
|
name == o.name &&
|
|
139
133
|
email == o.email &&
|
|
140
134
|
phone == o.phone &&
|
|
141
|
-
corporate == o.corporate
|
|
142
|
-
object == o.object
|
|
135
|
+
corporate == o.corporate
|
|
143
136
|
end
|
|
144
137
|
|
|
145
138
|
# @see the `==` method
|
|
@@ -151,7 +144,7 @@ module DigitalFemsa
|
|
|
151
144
|
# Calculates hash code according to all attributes.
|
|
152
145
|
# @return [Integer] Hash code
|
|
153
146
|
def hash
|
|
154
|
-
[name, email, phone, corporate
|
|
147
|
+
[customer_id, name, email, phone, corporate].hash
|
|
155
148
|
end
|
|
156
149
|
|
|
157
150
|
# Builds the object from hash
|
|
@@ -14,9 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
#
|
|
17
|
+
# Payment method data to attach to a customer.
|
|
18
18
|
class CustomerPaymentMethodRequest
|
|
19
|
-
# Type of payment method
|
|
19
|
+
# Type of payment method.
|
|
20
20
|
attr_accessor :type
|
|
21
21
|
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|