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.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +14 -0
  3. data/README.md +28 -33
  4. data/VERSION +1 -1
  5. data/config-ruby.json +1 -1
  6. data/docs/ApiKeyCreateResponse.md +1 -1
  7. data/docs/ApiKeyRequest.md +2 -2
  8. data/docs/ApiKeyResponseOnDelete.md +2 -2
  9. data/docs/ApiKeysApi.md +10 -10
  10. data/docs/BalanceResponse.md +8 -8
  11. data/docs/BalancesApi.md +1 -1
  12. data/docs/ChargeOrderResponse.md +1 -1
  13. data/docs/ChargeOrderResponseChannel.md +24 -0
  14. data/docs/ChargeRequest.md +1 -1
  15. data/docs/ChargeRequestPaymentMethod.md +3 -3
  16. data/docs/ChargeResponse.md +9 -7
  17. data/docs/ChargeResponseChannel.md +3 -3
  18. data/docs/ChargeResponseRefundsData.md +5 -1
  19. data/docs/ChargesApi.md +16 -12
  20. data/docs/ChargesDataResponse.md +9 -7
  21. data/docs/Checkout.md +17 -15
  22. data/docs/CheckoutOrderTemplate.md +3 -3
  23. data/docs/CheckoutResponse.md +1 -1
  24. data/docs/CreateCustomerFiscalEntitiesResponse.md +2 -2
  25. data/docs/Customer.md +13 -19
  26. data/docs/CustomerAddress.md +2 -2
  27. data/docs/CustomerFiscalEntitiesDataResponse.md +2 -2
  28. data/docs/CustomerFiscalEntitiesRequest.md +3 -3
  29. data/docs/CustomerInfo.md +4 -4
  30. data/docs/CustomerPaymentMethodRequest.md +1 -1
  31. data/docs/CustomerResponse.md +17 -21
  32. data/docs/CustomerShippingContactsResponse.md +5 -5
  33. data/docs/CustomersApi.md +15 -15
  34. data/docs/CustomersResponse.md +1 -1
  35. data/docs/DeleteApiKeysResponse.md +1 -1
  36. data/docs/DiscountsApi.md +9 -9
  37. data/docs/EventsApi.md +2 -2
  38. data/docs/EventsResendResponse.md +1 -1
  39. data/docs/GetChargesResponse.md +4 -4
  40. data/docs/GetTransactionsResponse.md +1 -1
  41. data/docs/LogsApi.md +1 -1
  42. data/docs/OrderFiscalEntityRequest.md +4 -4
  43. data/docs/OrderRefundRequest.md +7 -5
  44. data/docs/OrderRequest.md +17 -19
  45. data/docs/OrderResponse.md +37 -35
  46. data/docs/OrderResponseChannel.md +24 -0
  47. data/docs/OrderResponseShippingContact.md +4 -4
  48. data/docs/OrderUpdateFiscalEntityRequest.md +1 -1
  49. data/docs/OrderUpdateRequest.md +19 -15
  50. data/docs/OrdersApi.md +16 -16
  51. data/docs/PaymentLinkApi.md +12 -82
  52. data/docs/PaymentMethodCash.md +4 -4
  53. data/docs/PaymentMethodCashRequest.md +2 -2
  54. data/docs/PaymentMethodsApi.md +5 -5
  55. data/docs/Product.md +10 -12
  56. data/docs/ProductDataResponse.md +9 -11
  57. data/docs/ProductOrderResponse.md +9 -11
  58. data/docs/ProductsApi.md +7 -7
  59. data/docs/ShippingContactsApi.md +9 -9
  60. data/docs/ShippingOrderResponse.md +5 -3
  61. data/docs/ShippingRequest.md +2 -0
  62. data/docs/ShippingsApi.md +7 -7
  63. data/docs/TaxesApi.md +7 -7
  64. data/docs/TransactionResponse.md +20 -14
  65. data/docs/TransactionsApi.md +6 -6
  66. data/docs/TransfersApi.md +10 -10
  67. data/docs/UpdateCustomer.md +17 -21
  68. data/docs/UpdateCustomerFiscalEntitiesResponse.md +2 -2
  69. data/docs/UpdateOrderTaxRequest.md +2 -2
  70. data/docs/UpdateProduct.md +7 -9
  71. data/docs/WebhookKeysApi.md +18 -14
  72. data/docs/WebhooksApi.md +28 -22
  73. data/lib/digital_femsa/api/api_keys_api.rb +8 -8
  74. data/lib/digital_femsa/api/balances_api.rb +2 -2
  75. data/lib/digital_femsa/api/charges_api.rb +13 -9
  76. data/lib/digital_femsa/api/customers_api.rb +12 -12
  77. data/lib/digital_femsa/api/discounts_api.rb +12 -12
  78. data/lib/digital_femsa/api/events_api.rb +4 -4
  79. data/lib/digital_femsa/api/logs_api.rb +2 -2
  80. data/lib/digital_femsa/api/orders_api.rb +20 -20
  81. data/lib/digital_femsa/api/payment_link_api.rb +10 -86
  82. data/lib/digital_femsa/api/payment_methods_api.rb +8 -8
  83. data/lib/digital_femsa/api/products_api.rb +10 -10
  84. data/lib/digital_femsa/api/shipping_contacts_api.rb +8 -8
  85. data/lib/digital_femsa/api/shippings_api.rb +10 -10
  86. data/lib/digital_femsa/api/taxes_api.rb +10 -10
  87. data/lib/digital_femsa/api/transactions_api.rb +6 -6
  88. data/lib/digital_femsa/api/transfers_api.rb +8 -8
  89. data/lib/digital_femsa/api/webhook_keys_api.rb +14 -10
  90. data/lib/digital_femsa/api/webhooks_api.rb +23 -16
  91. data/lib/digital_femsa/api_client.rb +9 -5
  92. data/lib/digital_femsa/models/api_key_create_response.rb +1 -1
  93. data/lib/digital_femsa/models/api_key_request.rb +36 -1
  94. data/lib/digital_femsa/models/balance_response.rb +9 -9
  95. data/lib/digital_femsa/models/charge_order_response.rb +1 -1
  96. data/lib/digital_femsa/models/{order_next_action_response.rb → charge_order_response_channel.rb} +34 -18
  97. data/lib/digital_femsa/models/charge_request_payment_method.rb +3 -2
  98. data/lib/digital_femsa/models/charge_response.rb +15 -4
  99. data/lib/digital_femsa/models/charge_response_refunds_data.rb +23 -4
  100. data/lib/digital_femsa/models/charge_update_request.rb +1 -1
  101. data/lib/digital_femsa/models/charges_data_response.rb +15 -4
  102. data/lib/digital_femsa/models/checkout.rb +97 -81
  103. data/lib/digital_femsa/models/checkout_order_template.rb +4 -4
  104. data/lib/digital_femsa/models/checkout_order_template_customer_info.rb +1 -1
  105. data/lib/digital_femsa/models/checkout_request.rb +1 -1
  106. data/lib/digital_femsa/models/checkout_response.rb +1 -1
  107. data/lib/digital_femsa/models/create_customer_fiscal_entities_response.rb +10 -10
  108. data/lib/digital_femsa/models/customer.rb +57 -95
  109. data/lib/digital_femsa/models/customer_address.rb +7 -0
  110. data/lib/digital_femsa/models/customer_fiscal_entities_data_response.rb +10 -10
  111. data/lib/digital_femsa/models/customer_fiscal_entities_request.rb +13 -13
  112. data/lib/digital_femsa/models/customer_info.rb +13 -20
  113. data/lib/digital_femsa/models/customer_payment_method_request.rb +2 -2
  114. data/lib/digital_femsa/models/customer_payment_sources_inner.rb +104 -0
  115. data/lib/digital_femsa/models/customer_response.rb +122 -113
  116. data/lib/digital_femsa/models/customer_shipping_contacts_response.rb +2 -0
  117. data/lib/digital_femsa/models/customers_response.rb +1 -0
  118. data/lib/digital_femsa/models/events_resend_response.rb +1 -1
  119. data/lib/digital_femsa/models/get_charges_response.rb +21 -21
  120. data/lib/digital_femsa/models/get_transactions_response.rb +1 -1
  121. data/lib/digital_femsa/models/log_response.rb +1 -1
  122. data/lib/digital_femsa/models/logs_response.rb +1 -1
  123. data/lib/digital_femsa/models/order_fiscal_entity_response.rb +1 -1
  124. data/lib/digital_femsa/models/order_refund_request.rb +59 -11
  125. data/lib/digital_femsa/models/order_request.rb +69 -79
  126. data/lib/digital_femsa/models/order_response.rb +187 -119
  127. data/lib/digital_femsa/models/{order_next_action_response_redirect_to_url.rb → order_response_channel.rb} +35 -19
  128. data/lib/digital_femsa/models/order_response_charges.rb +1 -1
  129. data/lib/digital_femsa/models/order_response_checkout.rb +1 -0
  130. data/lib/digital_femsa/models/order_response_customer_info.rb +1 -0
  131. data/lib/digital_femsa/models/order_response_shipping_contact.rb +3 -0
  132. data/lib/digital_femsa/models/order_update_fiscal_entity_request.rb +1 -1
  133. data/lib/digital_femsa/models/order_update_request.rb +106 -65
  134. data/lib/digital_femsa/models/payment_method_cash.rb +1 -1
  135. data/lib/digital_femsa/models/payment_method_cash_request.rb +2 -1
  136. data/lib/digital_femsa/models/product.rb +103 -95
  137. data/lib/digital_femsa/models/product_data_response.rb +103 -95
  138. data/lib/digital_femsa/models/product_order_response.rb +103 -95
  139. data/lib/digital_femsa/models/shipping_order_response.rb +11 -1
  140. data/lib/digital_femsa/models/shipping_request.rb +12 -1
  141. data/lib/digital_femsa/models/transaction_response.rb +172 -99
  142. data/lib/digital_femsa/models/transfers_response.rb +1 -1
  143. data/lib/digital_femsa/models/transfers_response_destination.rb +312 -0
  144. data/lib/digital_femsa/models/update_customer.rb +42 -85
  145. data/lib/digital_femsa/models/update_customer_fiscal_entities_response.rb +10 -10
  146. data/lib/digital_femsa/models/update_order_discount_lines_request.rb +34 -0
  147. data/lib/digital_femsa/models/update_order_tax_request.rb +2 -2
  148. data/lib/digital_femsa/models/update_payment_methods_amount.rb +105 -0
  149. data/lib/digital_femsa/models/update_payment_methods_expires_at.rb +105 -0
  150. data/lib/digital_femsa/models/update_product.rb +85 -58
  151. data/lib/digital_femsa/models/webhook_key_delete_response.rb +1 -1
  152. data/lib/digital_femsa/models/webhook_key_request.rb +1 -0
  153. data/lib/digital_femsa/models/webhook_key_response.rb +1 -1
  154. data/lib/digital_femsa/models/webhook_request.rb +1 -1
  155. data/lib/digital_femsa/models/webhook_response.rb +1 -1
  156. data/lib/digital_femsa/models/webhook_update_request.rb +1 -1
  157. data/lib/digital_femsa/version.rb +1 -1
  158. data/lib/digital_femsa.rb +2 -6
  159. data/templates/ruby/api_client.mustache +8 -4
  160. metadata +26 -26
  161. data/docs/CustomerAntifraudInfo.md +0 -20
  162. data/docs/CustomerAntifraudInfoResponse.md +0 -20
  163. data/docs/OrderNextActionResponse.md +0 -20
  164. data/docs/OrderNextActionResponseRedirectToUrl.md +0 -20
  165. data/docs/SmsCheckoutRequest.md +0 -18
  166. data/docs/UpdateCustomerAntifraudInfo.md +0 -20
@@ -14,55 +14,46 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DigitalFemsa
17
- # a customer
17
+ # Customer create request.
18
18
  class Customer
19
- attr_accessor :antifraud_info
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
- # An email address is a series of customizable characters followed by a universal Internet symbol, the at symbol (@), the name of a host server, and a web domain ending (.mx, .com, .org, . net, etc).
22
+ # Customer email address.
28
23
  attr_accessor :email
29
24
 
30
- # It is a parameter that allows to identify in the response, the Femsa ID of a payment method (payment_id)
31
- attr_accessor :default_payment_source_id
25
+ # Customer phone number.
26
+ attr_accessor :phone
32
27
 
33
- # It is a parameter that allows to identify in the response, the Femsa ID of the shipping address (shipping_contact)
34
- attr_accessor :default_shipping_contact_id
28
+ # Indicates whether the customer email is corporate.
29
+ attr_accessor :corporate
35
30
 
36
- attr_accessor :fiscal_entities
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
- # Client's name
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
- # Is the customer's phone number
47
- attr_accessor :phone
40
+ # Customer fiscal entities to be created with the customer (optional).
41
+ attr_accessor :fiscal_entities
48
42
 
49
- # Contains the detail of the shipping addresses that the client has active or has used in Femsa
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
- :'antifraud_info' => :'antifraud_info',
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
- :'phone' => :'phone',
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
- :'antifraud_info' => :'CustomerAntifraudInfo',
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
- :'phone' => :'String',
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
- :'antifraud_info',
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?(:'antifraud_info')
116
- self.antifraud_info = attributes[:'antifraud_info']
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.corporate = false
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?(:'default_payment_source_id')
136
- self.default_payment_source_id = attributes[:'default_payment_source_id']
115
+ if attributes.key?(:'phone')
116
+ self.phone = attributes[:'phone']
137
117
  end
138
118
 
139
- if attributes.key?(:'default_shipping_contact_id')
140
- self.default_shipping_contact_id = attributes[:'default_shipping_contact_id']
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?(:'fiscal_entities')
144
- if (value = attributes[:'fiscal_entities']).is_a?(Array)
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?(:'phone')
168
- self.phone = attributes[:'phone']
169
- else
170
- self.phone = nil
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 @phone.nil?
198
- invalid_properties.push('invalid value for "phone", phone cannot be nil.')
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 @phone.nil?
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] metadata Value to be assigned
217
- def metadata=(metadata)
218
- if metadata.nil?
219
- fail ArgumentError, 'metadata cannot be nil'
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
- @metadata = metadata
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
- antifraud_info == o.antifraud_info &&
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
- phone == o.phone &&
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
- [antifraud_info, corporate, custom_reference, email, default_payment_source_id, default_shipping_contact_id, fiscal_entities, metadata, name, payment_sources, phone, shipping_contacts].hash
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, company_name, id, object, created_at, parent_id, default].hash
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, company_name].hash
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, object].hash
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
- # Contains details of the payment methods that the customer has active or has used in Femsa
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.