conekta 6.0.3 → 6.0.5

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -5
  3. data/VERSION +1 -1
  4. data/config-ruby.json +1 -1
  5. data/docs/ChargeRequest.md +1 -1
  6. data/docs/ChargeRequestPaymentMethod.md +39 -18
  7. data/docs/ChargeResponse.md +6 -6
  8. data/docs/ChargesApi.md +79 -1
  9. data/docs/ChargesDataResponse.md +6 -6
  10. data/docs/ChargesOrderResponse.md +22 -0
  11. data/docs/ChargesOrderResponseAllOfData.md +52 -0
  12. data/docs/Checkout.md +2 -0
  13. data/docs/CheckoutRequest.md +2 -0
  14. data/docs/CreateCustomerPaymentMethodsRequest.md +4 -4
  15. data/docs/Customer.md +4 -0
  16. data/docs/CustomerPaymentMethodsRequest.md +4 -4
  17. data/docs/CustomerResponse.md +4 -0
  18. data/docs/OrderRefundRequest.md +2 -2
  19. data/docs/OrderRequest.md +1 -1
  20. data/docs/OrderResponseCheckout.md +2 -0
  21. data/docs/PaymentMethodBankTransfer.md +3 -1
  22. data/docs/PaymentMethodCard.md +12 -10
  23. data/docs/PaymentMethodCardRequest.md +12 -2
  24. data/docs/PaymentMethodCash.md +7 -1
  25. data/docs/PaymentMethodGeneralRequest.md +32 -0
  26. data/docs/PaymentMethodTokenRequest.md +20 -0
  27. data/docs/PaymentMethodsApi.md +1 -1
  28. data/docs/PayoutOrdersApi.md +74 -0
  29. data/docs/SubscriptionResponse.md +2 -0
  30. data/docs/UpdateCustomer.md +4 -0
  31. data/lib/conekta/api/charges_api.rb +84 -0
  32. data/lib/conekta/api/payout_orders_api.rb +70 -0
  33. data/lib/conekta/models/charge_request.rb +1 -0
  34. data/lib/conekta/models/charge_request_payment_method.rb +74 -239
  35. data/lib/conekta/models/charge_response.rb +4 -0
  36. data/lib/conekta/models/charges_data_response.rb +4 -0
  37. data/lib/conekta/models/charges_order_response.rb +258 -0
  38. data/lib/conekta/models/charges_order_response_all_of_data.rb +382 -0
  39. data/lib/conekta/models/checkout.rb +11 -1
  40. data/lib/conekta/models/checkout_request.rb +11 -1
  41. data/lib/conekta/models/create_customer_payment_methods_request.rb +2 -2
  42. data/lib/conekta/models/customer.rb +21 -1
  43. data/lib/conekta/models/customer_payment_methods_request.rb +2 -2
  44. data/lib/conekta/models/customer_response.rb +21 -1
  45. data/lib/conekta/models/order_refund_request.rb +2 -1
  46. data/lib/conekta/models/order_request.rb +1 -1
  47. data/lib/conekta/models/order_response_checkout.rb +12 -1
  48. data/lib/conekta/models/payment_method_bank_transfer.rb +14 -5
  49. data/lib/conekta/models/payment_method_card.rb +22 -4
  50. data/lib/conekta/models/payment_method_card_request.rb +174 -12
  51. data/lib/conekta/models/payment_method_cash.rb +33 -4
  52. data/lib/conekta/models/payment_method_general_request.rb +291 -0
  53. data/lib/conekta/models/payment_method_token_request.rb +246 -0
  54. data/lib/conekta/models/subscription_response.rb +11 -1
  55. data/lib/conekta/models/update_customer.rb +21 -1
  56. data/lib/conekta/version.rb +1 -1
  57. data/lib/conekta.rb +4 -0
  58. data/spec/api/charges_api_spec.rb +18 -10
  59. data/spec/api/customers_api_spec.rb +10 -4
  60. data/spec/api/orders_api_spec.rb +6 -6
  61. metadata +32 -24
@@ -0,0 +1,382 @@
1
+ =begin
2
+ #Conekta API
3
+
4
+ #Conekta sdk
5
+
6
+ The version of the OpenAPI document: 2.1.0
7
+ Contact: engineering@conekta.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Conekta
17
+ class ChargesOrderResponseAllOfData
18
+ attr_accessor :amount
19
+
20
+ attr_accessor :channel
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :currency
25
+
26
+ attr_accessor :customer_id
27
+
28
+ attr_accessor :description
29
+
30
+ attr_accessor :device_fingerprint
31
+
32
+ attr_accessor :failure_code
33
+
34
+ attr_accessor :failure_message
35
+
36
+ # Charge ID
37
+ attr_accessor :id
38
+
39
+ # Whether the charge was made in live mode or not
40
+ attr_accessor :livemode
41
+
42
+ attr_accessor :object
43
+
44
+ # Order ID
45
+ attr_accessor :order_id
46
+
47
+ # Payment date
48
+ attr_accessor :paid_at
49
+
50
+ attr_accessor :payment_method
51
+
52
+ # Reference ID of the charge
53
+ attr_accessor :reference_id
54
+
55
+ attr_accessor :refunds
56
+
57
+ attr_accessor :status
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'amount' => :'amount',
63
+ :'channel' => :'channel',
64
+ :'created_at' => :'created_at',
65
+ :'currency' => :'currency',
66
+ :'customer_id' => :'customer_id',
67
+ :'description' => :'description',
68
+ :'device_fingerprint' => :'device_fingerprint',
69
+ :'failure_code' => :'failure_code',
70
+ :'failure_message' => :'failure_message',
71
+ :'id' => :'id',
72
+ :'livemode' => :'livemode',
73
+ :'object' => :'object',
74
+ :'order_id' => :'order_id',
75
+ :'paid_at' => :'paid_at',
76
+ :'payment_method' => :'payment_method',
77
+ :'reference_id' => :'reference_id',
78
+ :'refunds' => :'refunds',
79
+ :'status' => :'status'
80
+ }
81
+ end
82
+
83
+ # Returns all the JSON keys this model knows about
84
+ def self.acceptable_attributes
85
+ attribute_map.values
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.openapi_types
90
+ {
91
+ :'amount' => :'Integer',
92
+ :'channel' => :'ChargeResponseChannel',
93
+ :'created_at' => :'Integer',
94
+ :'currency' => :'String',
95
+ :'customer_id' => :'String',
96
+ :'description' => :'String',
97
+ :'device_fingerprint' => :'String',
98
+ :'failure_code' => :'String',
99
+ :'failure_message' => :'String',
100
+ :'id' => :'String',
101
+ :'livemode' => :'Boolean',
102
+ :'object' => :'String',
103
+ :'order_id' => :'String',
104
+ :'paid_at' => :'Integer',
105
+ :'payment_method' => :'ChargeResponsePaymentMethod',
106
+ :'reference_id' => :'String',
107
+ :'refunds' => :'ChargeResponseRefunds',
108
+ :'status' => :'String'
109
+ }
110
+ end
111
+
112
+ # List of attributes with nullable: true
113
+ def self.openapi_nullable
114
+ Set.new([
115
+ :'paid_at',
116
+ :'reference_id',
117
+ :'refunds',
118
+ ])
119
+ end
120
+
121
+ # List of class defined in allOf (OpenAPI v3)
122
+ def self.openapi_all_of
123
+ [
124
+ :'ChargeResponse'
125
+ ]
126
+ end
127
+
128
+ # Initializes the object
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ def initialize(attributes = {})
131
+ if (!attributes.is_a?(Hash))
132
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Conekta::ChargesOrderResponseAllOfData` initialize method"
133
+ end
134
+
135
+ # check to see if the attribute exists and convert string to symbol for hash key
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!self.class.attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Conekta::ChargesOrderResponseAllOfData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'amount')
144
+ self.amount = attributes[:'amount']
145
+ end
146
+
147
+ if attributes.key?(:'channel')
148
+ self.channel = attributes[:'channel']
149
+ end
150
+
151
+ if attributes.key?(:'created_at')
152
+ self.created_at = attributes[:'created_at']
153
+ end
154
+
155
+ if attributes.key?(:'currency')
156
+ self.currency = attributes[:'currency']
157
+ end
158
+
159
+ if attributes.key?(:'customer_id')
160
+ self.customer_id = attributes[:'customer_id']
161
+ end
162
+
163
+ if attributes.key?(:'description')
164
+ self.description = attributes[:'description']
165
+ end
166
+
167
+ if attributes.key?(:'device_fingerprint')
168
+ self.device_fingerprint = attributes[:'device_fingerprint']
169
+ end
170
+
171
+ if attributes.key?(:'failure_code')
172
+ self.failure_code = attributes[:'failure_code']
173
+ end
174
+
175
+ if attributes.key?(:'failure_message')
176
+ self.failure_message = attributes[:'failure_message']
177
+ end
178
+
179
+ if attributes.key?(:'id')
180
+ self.id = attributes[:'id']
181
+ end
182
+
183
+ if attributes.key?(:'livemode')
184
+ self.livemode = attributes[:'livemode']
185
+ end
186
+
187
+ if attributes.key?(:'object')
188
+ self.object = attributes[:'object']
189
+ end
190
+
191
+ if attributes.key?(:'order_id')
192
+ self.order_id = attributes[:'order_id']
193
+ end
194
+
195
+ if attributes.key?(:'paid_at')
196
+ self.paid_at = attributes[:'paid_at']
197
+ end
198
+
199
+ if attributes.key?(:'payment_method')
200
+ self.payment_method = attributes[:'payment_method']
201
+ end
202
+
203
+ if attributes.key?(:'reference_id')
204
+ self.reference_id = attributes[:'reference_id']
205
+ end
206
+
207
+ if attributes.key?(:'refunds')
208
+ self.refunds = attributes[:'refunds']
209
+ end
210
+
211
+ if attributes.key?(:'status')
212
+ self.status = attributes[:'status']
213
+ end
214
+ end
215
+
216
+ # Show invalid properties with the reasons. Usually used together with valid?
217
+ # @return Array for valid properties with the reasons
218
+ def list_invalid_properties
219
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
220
+ invalid_properties = Array.new
221
+ invalid_properties
222
+ end
223
+
224
+ # Check to see if the all the properties in the model are valid
225
+ # @return true if the model is valid
226
+ def valid?
227
+ warn '[DEPRECATED] the `valid?` method is obsolete'
228
+ true
229
+ end
230
+
231
+ # Checks equality by comparing each attribute.
232
+ # @param [Object] Object to be compared
233
+ def ==(o)
234
+ return true if self.equal?(o)
235
+ self.class == o.class &&
236
+ amount == o.amount &&
237
+ channel == o.channel &&
238
+ created_at == o.created_at &&
239
+ currency == o.currency &&
240
+ customer_id == o.customer_id &&
241
+ description == o.description &&
242
+ device_fingerprint == o.device_fingerprint &&
243
+ failure_code == o.failure_code &&
244
+ failure_message == o.failure_message &&
245
+ id == o.id &&
246
+ livemode == o.livemode &&
247
+ object == o.object &&
248
+ order_id == o.order_id &&
249
+ paid_at == o.paid_at &&
250
+ payment_method == o.payment_method &&
251
+ reference_id == o.reference_id &&
252
+ refunds == o.refunds &&
253
+ status == o.status
254
+ end
255
+
256
+ # @see the `==` method
257
+ # @param [Object] Object to be compared
258
+ def eql?(o)
259
+ self == o
260
+ end
261
+
262
+ # Calculates hash code according to all attributes.
263
+ # @return [Integer] Hash code
264
+ def hash
265
+ [amount, channel, created_at, currency, customer_id, description, device_fingerprint, failure_code, failure_message, id, livemode, object, order_id, paid_at, payment_method, reference_id, refunds, status].hash
266
+ end
267
+
268
+ # Builds the object from hash
269
+ # @param [Hash] attributes Model attributes in the form of hash
270
+ # @return [Object] Returns the model itself
271
+ def self.build_from_hash(attributes)
272
+ return nil unless attributes.is_a?(Hash)
273
+ attributes = attributes.transform_keys(&:to_sym)
274
+ transformed_hash = {}
275
+ openapi_types.each_pair do |key, type|
276
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
277
+ transformed_hash["#{key}"] = nil
278
+ elsif type =~ /\AArray<(.*)>/i
279
+ # check to ensure the input is an array given that the attribute
280
+ # is documented as an array but the input is not
281
+ if attributes[attribute_map[key]].is_a?(Array)
282
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
283
+ end
284
+ elsif !attributes[attribute_map[key]].nil?
285
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
286
+ end
287
+ end
288
+ new(transformed_hash)
289
+ end
290
+
291
+ # Deserializes the data based on type
292
+ # @param string type Data type
293
+ # @param string value Value to be deserialized
294
+ # @return [Object] Deserialized data
295
+ def self._deserialize(type, value)
296
+ case type.to_sym
297
+ when :Time
298
+ Time.parse(value)
299
+ when :Date
300
+ Date.parse(value)
301
+ when :String
302
+ value.to_s
303
+ when :Integer
304
+ value.to_i
305
+ when :Float
306
+ value.to_f
307
+ when :Boolean
308
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
309
+ true
310
+ else
311
+ false
312
+ end
313
+ when :Object
314
+ # generic object (usually a Hash), return directly
315
+ value
316
+ when /\AArray<(?<inner_type>.+)>\z/
317
+ inner_type = Regexp.last_match[:inner_type]
318
+ value.map { |v| _deserialize(inner_type, v) }
319
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
320
+ k_type = Regexp.last_match[:k_type]
321
+ v_type = Regexp.last_match[:v_type]
322
+ {}.tap do |hash|
323
+ value.each do |k, v|
324
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
325
+ end
326
+ end
327
+ else # model
328
+ # models (e.g. Pet) or oneOf
329
+ klass = Conekta.const_get(type)
330
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
331
+ end
332
+ end
333
+
334
+ # Returns the string representation of the object
335
+ # @return [String] String presentation of the object
336
+ def to_s
337
+ to_hash.to_s
338
+ end
339
+
340
+ # to_body is an alias to to_hash (backward compatibility)
341
+ # @return [Hash] Returns the object in the form of hash
342
+ def to_body
343
+ to_hash
344
+ end
345
+
346
+ # Returns the object in the form of hash
347
+ # @return [Hash] Returns the object in the form of hash
348
+ def to_hash
349
+ hash = {}
350
+ self.class.attribute_map.each_pair do |attr, param|
351
+ value = self.send(attr)
352
+ if value.nil?
353
+ is_nullable = self.class.openapi_nullable.include?(attr)
354
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
355
+ end
356
+
357
+ hash[param] = _to_hash(value)
358
+ end
359
+ hash
360
+ end
361
+
362
+ # Outputs non-array value in the form of hash
363
+ # For object, use to_hash. Otherwise, just return the value
364
+ # @param [Object] value Any valid value
365
+ # @return [Hash] Returns the value in the form of hash
366
+ def _to_hash(value)
367
+ if value.is_a?(Array)
368
+ value.compact.map { |v| _to_hash(v) }
369
+ elsif value.is_a?(Hash)
370
+ {}.tap do |hash|
371
+ value.each { |k, v| hash[k] = _to_hash(v) }
372
+ end
373
+ elsif value.respond_to? :to_hash
374
+ value.to_hash
375
+ else
376
+ value
377
+ end
378
+ end
379
+
380
+ end
381
+
382
+ end
@@ -28,6 +28,9 @@ module Conekta
28
28
  # This field allows you to specify the number of months without interest.
29
29
  attr_accessor :monthly_installments_options
30
30
 
31
+ # Indicates the 3DS2 mode for the order, either smart or strict.
32
+ attr_accessor :three_ds_mode
33
+
31
34
  # Reason for charge
32
35
  attr_accessor :name
33
36
 
@@ -55,6 +58,7 @@ module Conekta
55
58
  :'expires_at' => :'expires_at',
56
59
  :'monthly_installments_enabled' => :'monthly_installments_enabled',
57
60
  :'monthly_installments_options' => :'monthly_installments_options',
61
+ :'three_ds_mode' => :'three_ds_mode',
58
62
  :'name' => :'name',
59
63
  :'needs_shipping_contact' => :'needs_shipping_contact',
60
64
  :'on_demand_enabled' => :'on_demand_enabled',
@@ -77,6 +81,7 @@ module Conekta
77
81
  :'expires_at' => :'Integer',
78
82
  :'monthly_installments_enabled' => :'Boolean',
79
83
  :'monthly_installments_options' => :'Array<Integer>',
84
+ :'three_ds_mode' => :'String',
80
85
  :'name' => :'String',
81
86
  :'needs_shipping_contact' => :'Boolean',
82
87
  :'on_demand_enabled' => :'Boolean',
@@ -133,6 +138,10 @@ module Conekta
133
138
  end
134
139
  end
135
140
 
141
+ if attributes.key?(:'three_ds_mode')
142
+ self.three_ds_mode = attributes[:'three_ds_mode']
143
+ end
144
+
136
145
  if attributes.key?(:'name')
137
146
  self.name = attributes[:'name']
138
147
  else
@@ -224,6 +233,7 @@ module Conekta
224
233
  expires_at == o.expires_at &&
225
234
  monthly_installments_enabled == o.monthly_installments_enabled &&
226
235
  monthly_installments_options == o.monthly_installments_options &&
236
+ three_ds_mode == o.three_ds_mode &&
227
237
  name == o.name &&
228
238
  needs_shipping_contact == o.needs_shipping_contact &&
229
239
  on_demand_enabled == o.on_demand_enabled &&
@@ -242,7 +252,7 @@ module Conekta
242
252
  # Calculates hash code according to all attributes.
243
253
  # @return [Integer] Hash code
244
254
  def hash
245
- [allowed_payment_methods, expires_at, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, on_demand_enabled, order_template, payments_limit_count, recurrent, type].hash
255
+ [allowed_payment_methods, expires_at, monthly_installments_enabled, monthly_installments_options, three_ds_mode, name, needs_shipping_contact, on_demand_enabled, order_template, payments_limit_count, recurrent, type].hash
246
256
  end
247
257
 
248
258
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Conekta
29
29
 
30
30
  attr_accessor :monthly_installments_options
31
31
 
32
+ # Number of retries allowed before the checkout is marked as failed
33
+ attr_accessor :max_failed_retries
34
+
32
35
  # Reason for payment
33
36
  attr_accessor :name
34
37
 
@@ -51,6 +54,7 @@ module Conekta
51
54
  :'failure_url' => :'failure_url',
52
55
  :'monthly_installments_enabled' => :'monthly_installments_enabled',
53
56
  :'monthly_installments_options' => :'monthly_installments_options',
57
+ :'max_failed_retries' => :'max_failed_retries',
54
58
  :'name' => :'name',
55
59
  :'on_demand_enabled' => :'on_demand_enabled',
56
60
  :'redirection_time' => :'redirection_time',
@@ -72,6 +76,7 @@ module Conekta
72
76
  :'failure_url' => :'String',
73
77
  :'monthly_installments_enabled' => :'Boolean',
74
78
  :'monthly_installments_options' => :'Array<Integer>',
79
+ :'max_failed_retries' => :'Integer',
75
80
  :'name' => :'String',
76
81
  :'on_demand_enabled' => :'Boolean',
77
82
  :'redirection_time' => :'Integer',
@@ -127,6 +132,10 @@ module Conekta
127
132
  end
128
133
  end
129
134
 
135
+ if attributes.key?(:'max_failed_retries')
136
+ self.max_failed_retries = attributes[:'max_failed_retries']
137
+ end
138
+
130
139
  if attributes.key?(:'name')
131
140
  self.name = attributes[:'name']
132
141
  end
@@ -178,6 +187,7 @@ module Conekta
178
187
  failure_url == o.failure_url &&
179
188
  monthly_installments_enabled == o.monthly_installments_enabled &&
180
189
  monthly_installments_options == o.monthly_installments_options &&
190
+ max_failed_retries == o.max_failed_retries &&
181
191
  name == o.name &&
182
192
  on_demand_enabled == o.on_demand_enabled &&
183
193
  redirection_time == o.redirection_time &&
@@ -194,7 +204,7 @@ module Conekta
194
204
  # Calculates hash code according to all attributes.
195
205
  # @return [Integer] Hash code
196
206
  def hash
197
- [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, name, on_demand_enabled, redirection_time, success_url, type].hash
207
+ [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
198
208
  end
199
209
 
200
210
  # Builds the object from hash
@@ -20,9 +20,9 @@ module Conekta
20
20
  # List of class defined in oneOf (OpenAPI v3)
21
21
  def openapi_one_of
22
22
  [
23
- :'PaymentMethodCardRequest',
24
23
  :'PaymentMethodCashRequest',
25
- :'PaymentMethodSpeiRequest'
24
+ :'PaymentMethodSpeiRequest',
25
+ :'PaymentMethodTokenRequest'
26
26
  ]
27
27
  end
28
28
 
@@ -24,6 +24,9 @@ module Conekta
24
24
  # It is an undefined value.
25
25
  attr_accessor :custom_reference
26
26
 
27
+ # It is a parameter that allows to identify the date of birth of the client.
28
+ attr_accessor :date_of_birth
29
+
27
30
  # 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).
28
31
  attr_accessor :email
29
32
 
@@ -40,6 +43,9 @@ module Conekta
40
43
  # Client's name
41
44
  attr_accessor :name
42
45
 
46
+ # It is a parameter that allows to identify the national identification number of the client.
47
+ attr_accessor :national_id
48
+
43
49
  # Contains details of the payment methods that the customer has active or has used in Conekta
44
50
  attr_accessor :payment_sources
45
51
 
@@ -60,12 +66,14 @@ module Conekta
60
66
  :'antifraud_info' => :'antifraud_info',
61
67
  :'corporate' => :'corporate',
62
68
  :'custom_reference' => :'custom_reference',
69
+ :'date_of_birth' => :'date_of_birth',
63
70
  :'email' => :'email',
64
71
  :'default_payment_source_id' => :'default_payment_source_id',
65
72
  :'default_shipping_contact_id' => :'default_shipping_contact_id',
66
73
  :'fiscal_entities' => :'fiscal_entities',
67
74
  :'metadata' => :'metadata',
68
75
  :'name' => :'name',
76
+ :'national_id' => :'national_id',
69
77
  :'payment_sources' => :'payment_sources',
70
78
  :'phone' => :'phone',
71
79
  :'plan_id' => :'plan_id',
@@ -85,12 +93,14 @@ module Conekta
85
93
  :'antifraud_info' => :'CustomerAntifraudInfo',
86
94
  :'corporate' => :'Boolean',
87
95
  :'custom_reference' => :'String',
96
+ :'date_of_birth' => :'String',
88
97
  :'email' => :'String',
89
98
  :'default_payment_source_id' => :'String',
90
99
  :'default_shipping_contact_id' => :'String',
91
100
  :'fiscal_entities' => :'Array<CustomerFiscalEntitiesRequest>',
92
101
  :'metadata' => :'Hash<String, Object>',
93
102
  :'name' => :'String',
103
+ :'national_id' => :'String',
94
104
  :'payment_sources' => :'Array<CustomerPaymentMethodsRequest>',
95
105
  :'phone' => :'String',
96
106
  :'plan_id' => :'String',
@@ -135,6 +145,10 @@ module Conekta
135
145
  self.custom_reference = attributes[:'custom_reference']
136
146
  end
137
147
 
148
+ if attributes.key?(:'date_of_birth')
149
+ self.date_of_birth = attributes[:'date_of_birth']
150
+ end
151
+
138
152
  if attributes.key?(:'email')
139
153
  self.email = attributes[:'email']
140
154
  else
@@ -167,6 +181,10 @@ module Conekta
167
181
  self.name = nil
168
182
  end
169
183
 
184
+ if attributes.key?(:'national_id')
185
+ self.national_id = attributes[:'national_id']
186
+ end
187
+
170
188
  if attributes.key?(:'payment_sources')
171
189
  if (value = attributes[:'payment_sources']).is_a?(Array)
172
190
  self.payment_sources = value
@@ -251,12 +269,14 @@ module Conekta
251
269
  antifraud_info == o.antifraud_info &&
252
270
  corporate == o.corporate &&
253
271
  custom_reference == o.custom_reference &&
272
+ date_of_birth == o.date_of_birth &&
254
273
  email == o.email &&
255
274
  default_payment_source_id == o.default_payment_source_id &&
256
275
  default_shipping_contact_id == o.default_shipping_contact_id &&
257
276
  fiscal_entities == o.fiscal_entities &&
258
277
  metadata == o.metadata &&
259
278
  name == o.name &&
279
+ national_id == o.national_id &&
260
280
  payment_sources == o.payment_sources &&
261
281
  phone == o.phone &&
262
282
  plan_id == o.plan_id &&
@@ -273,7 +293,7 @@ module Conekta
273
293
  # Calculates hash code according to all attributes.
274
294
  # @return [Integer] Hash code
275
295
  def hash
276
- [antifraud_info, corporate, custom_reference, email, default_payment_source_id, default_shipping_contact_id, fiscal_entities, metadata, name, payment_sources, phone, plan_id, shipping_contacts, subscription].hash
296
+ [antifraud_info, corporate, custom_reference, date_of_birth, email, default_payment_source_id, default_shipping_contact_id, fiscal_entities, metadata, name, national_id, payment_sources, phone, plan_id, shipping_contacts, subscription].hash
277
297
  end
278
298
 
279
299
  # Builds the object from hash
@@ -19,9 +19,9 @@ module Conekta
19
19
  # List of class defined in oneOf (OpenAPI v3)
20
20
  def openapi_one_of
21
21
  [
22
- :'PaymentMethodCardRequest',
23
22
  :'PaymentMethodCashRequest',
24
- :'PaymentMethodSpeiRequest'
23
+ :'PaymentMethodSpeiRequest',
24
+ :'PaymentMethodTokenRequest'
25
25
  ]
26
26
  end
27
27