conekta 6.0.4 → 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.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/VERSION +1 -1
- data/config-ruby.json +1 -1
- data/docs/ChargesApi.md +78 -0
- data/docs/ChargesOrderResponse.md +22 -0
- data/docs/ChargesOrderResponseAllOfData.md +52 -0
- data/docs/CheckoutRequest.md +2 -0
- data/docs/Customer.md +4 -0
- data/docs/CustomerResponse.md +4 -0
- data/docs/OrderResponseCheckout.md +2 -0
- data/docs/PaymentMethodCash.md +4 -0
- data/docs/PaymentMethodTokenRequest.md +1 -1
- data/docs/PayoutOrdersApi.md +74 -0
- data/docs/UpdateCustomer.md +4 -0
- data/lib/conekta/api/charges_api.rb +84 -0
- data/lib/conekta/api/payout_orders_api.rb +70 -0
- data/lib/conekta/models/charges_order_response.rb +258 -0
- data/lib/conekta/models/charges_order_response_all_of_data.rb +382 -0
- data/lib/conekta/models/checkout_request.rb +11 -1
- data/lib/conekta/models/customer.rb +21 -1
- data/lib/conekta/models/customer_response.rb +21 -1
- data/lib/conekta/models/order_refund_request.rb +0 -1
- data/lib/conekta/models/order_response_checkout.rb +12 -1
- data/lib/conekta/models/payment_method_cash.rb +21 -1
- data/lib/conekta/models/update_customer.rb +21 -1
- data/lib/conekta/version.rb +1 -1
- data/lib/conekta.rb +2 -0
- metadata +23 -19
@@ -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
|
@@ -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
|
@@ -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
|
@@ -27,6 +27,9 @@ module Conekta
|
|
27
27
|
# Custom reference
|
28
28
|
attr_accessor :custom_reference
|
29
29
|
|
30
|
+
# It is a parameter that allows to identify the date of birth of the client.
|
31
|
+
attr_accessor :date_of_birth
|
32
|
+
|
30
33
|
attr_accessor :default_fiscal_entity_id
|
31
34
|
|
32
35
|
attr_accessor :default_shipping_contact_id
|
@@ -46,6 +49,9 @@ module Conekta
|
|
46
49
|
# Customer's name
|
47
50
|
attr_accessor :name
|
48
51
|
|
52
|
+
# It is a parameter that allows to identify the national identification number of the client.
|
53
|
+
attr_accessor :national_id
|
54
|
+
|
49
55
|
attr_accessor :metadata
|
50
56
|
|
51
57
|
attr_accessor :object
|
@@ -66,6 +72,7 @@ module Conekta
|
|
66
72
|
:'corporate' => :'corporate',
|
67
73
|
:'created_at' => :'created_at',
|
68
74
|
:'custom_reference' => :'custom_reference',
|
75
|
+
:'date_of_birth' => :'date_of_birth',
|
69
76
|
:'default_fiscal_entity_id' => :'default_fiscal_entity_id',
|
70
77
|
:'default_shipping_contact_id' => :'default_shipping_contact_id',
|
71
78
|
:'default_payment_source_id' => :'default_payment_source_id',
|
@@ -74,6 +81,7 @@ module Conekta
|
|
74
81
|
:'id' => :'id',
|
75
82
|
:'livemode' => :'livemode',
|
76
83
|
:'name' => :'name',
|
84
|
+
:'national_id' => :'national_id',
|
77
85
|
:'metadata' => :'metadata',
|
78
86
|
:'object' => :'object',
|
79
87
|
:'payment_sources' => :'payment_sources',
|
@@ -95,6 +103,7 @@ module Conekta
|
|
95
103
|
:'corporate' => :'Boolean',
|
96
104
|
:'created_at' => :'Integer',
|
97
105
|
:'custom_reference' => :'String',
|
106
|
+
:'date_of_birth' => :'String',
|
98
107
|
:'default_fiscal_entity_id' => :'String',
|
99
108
|
:'default_shipping_contact_id' => :'String',
|
100
109
|
:'default_payment_source_id' => :'String',
|
@@ -103,6 +112,7 @@ module Conekta
|
|
103
112
|
:'id' => :'String',
|
104
113
|
:'livemode' => :'Boolean',
|
105
114
|
:'name' => :'String',
|
115
|
+
:'national_id' => :'String',
|
106
116
|
:'metadata' => :'Hash<String, Object>',
|
107
117
|
:'object' => :'String',
|
108
118
|
:'payment_sources' => :'CustomerPaymentMethodsResponse',
|
@@ -154,6 +164,10 @@ module Conekta
|
|
154
164
|
self.custom_reference = attributes[:'custom_reference']
|
155
165
|
end
|
156
166
|
|
167
|
+
if attributes.key?(:'date_of_birth')
|
168
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
169
|
+
end
|
170
|
+
|
157
171
|
if attributes.key?(:'default_fiscal_entity_id')
|
158
172
|
self.default_fiscal_entity_id = attributes[:'default_fiscal_entity_id']
|
159
173
|
end
|
@@ -192,6 +206,10 @@ module Conekta
|
|
192
206
|
self.name = nil
|
193
207
|
end
|
194
208
|
|
209
|
+
if attributes.key?(:'national_id')
|
210
|
+
self.national_id = attributes[:'national_id']
|
211
|
+
end
|
212
|
+
|
195
213
|
if attributes.key?(:'metadata')
|
196
214
|
if (value = attributes[:'metadata']).is_a?(Hash)
|
197
215
|
self.metadata = value
|
@@ -289,6 +307,7 @@ module Conekta
|
|
289
307
|
corporate == o.corporate &&
|
290
308
|
created_at == o.created_at &&
|
291
309
|
custom_reference == o.custom_reference &&
|
310
|
+
date_of_birth == o.date_of_birth &&
|
292
311
|
default_fiscal_entity_id == o.default_fiscal_entity_id &&
|
293
312
|
default_shipping_contact_id == o.default_shipping_contact_id &&
|
294
313
|
default_payment_source_id == o.default_payment_source_id &&
|
@@ -297,6 +316,7 @@ module Conekta
|
|
297
316
|
id == o.id &&
|
298
317
|
livemode == o.livemode &&
|
299
318
|
name == o.name &&
|
319
|
+
national_id == o.national_id &&
|
300
320
|
metadata == o.metadata &&
|
301
321
|
object == o.object &&
|
302
322
|
payment_sources == o.payment_sources &&
|
@@ -314,7 +334,7 @@ module Conekta
|
|
314
334
|
# Calculates hash code according to all attributes.
|
315
335
|
# @return [Integer] Hash code
|
316
336
|
def hash
|
317
|
-
[antifraud_info, corporate, created_at, custom_reference, default_fiscal_entity_id, default_shipping_contact_id, default_payment_source_id, email, fiscal_entities, id, livemode, name, metadata, object, payment_sources, phone, shipping_contacts, subscription].hash
|
337
|
+
[antifraud_info, corporate, created_at, custom_reference, date_of_birth, default_fiscal_entity_id, default_shipping_contact_id, default_payment_source_id, email, fiscal_entities, id, livemode, name, national_id, metadata, object, payment_sources, phone, shipping_contacts, subscription].hash
|
318
338
|
end
|
319
339
|
|
320
340
|
# Builds the object from hash
|
@@ -35,6 +35,9 @@ module Conekta
|
|
35
35
|
|
36
36
|
attr_accessor :livemode
|
37
37
|
|
38
|
+
# Number of retries allowed before the checkout is marked as failed
|
39
|
+
attr_accessor :max_failed_retries
|
40
|
+
|
38
41
|
attr_accessor :metadata
|
39
42
|
|
40
43
|
attr_accessor :monthly_installments_enabled
|
@@ -83,6 +86,7 @@ module Conekta
|
|
83
86
|
:'id' => :'id',
|
84
87
|
:'is_redirect_on_failure' => :'is_redirect_on_failure',
|
85
88
|
:'livemode' => :'livemode',
|
89
|
+
:'max_failed_retries' => :'max_failed_retries',
|
86
90
|
:'metadata' => :'metadata',
|
87
91
|
:'monthly_installments_enabled' => :'monthly_installments_enabled',
|
88
92
|
:'monthly_installments_options' => :'monthly_installments_options',
|
@@ -121,6 +125,7 @@ module Conekta
|
|
121
125
|
:'id' => :'String',
|
122
126
|
:'is_redirect_on_failure' => :'Boolean',
|
123
127
|
:'livemode' => :'Boolean',
|
128
|
+
:'max_failed_retries' => :'Integer',
|
124
129
|
:'metadata' => :'Hash<String, Object>',
|
125
130
|
:'monthly_installments_enabled' => :'Boolean',
|
126
131
|
:'monthly_installments_options' => :'Array<Integer>',
|
@@ -144,6 +149,7 @@ module Conekta
|
|
144
149
|
# List of attributes with nullable: true
|
145
150
|
def self.openapi_nullable
|
146
151
|
Set.new([
|
152
|
+
:'max_failed_retries',
|
147
153
|
:'on_demand_enabled',
|
148
154
|
:'redirection_time',
|
149
155
|
])
|
@@ -208,6 +214,10 @@ module Conekta
|
|
208
214
|
self.livemode = attributes[:'livemode']
|
209
215
|
end
|
210
216
|
|
217
|
+
if attributes.key?(:'max_failed_retries')
|
218
|
+
self.max_failed_retries = attributes[:'max_failed_retries']
|
219
|
+
end
|
220
|
+
|
211
221
|
if attributes.key?(:'metadata')
|
212
222
|
if (value = attributes[:'metadata']).is_a?(Hash)
|
213
223
|
self.metadata = value
|
@@ -330,6 +340,7 @@ module Conekta
|
|
330
340
|
id == o.id &&
|
331
341
|
is_redirect_on_failure == o.is_redirect_on_failure &&
|
332
342
|
livemode == o.livemode &&
|
343
|
+
max_failed_retries == o.max_failed_retries &&
|
333
344
|
metadata == o.metadata &&
|
334
345
|
monthly_installments_enabled == o.monthly_installments_enabled &&
|
335
346
|
monthly_installments_options == o.monthly_installments_options &&
|
@@ -358,7 +369,7 @@ module Conekta
|
|
358
369
|
# Calculates hash code according to all attributes.
|
359
370
|
# @return [Integer] Hash code
|
360
371
|
def hash
|
361
|
-
[allowed_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, is_redirect_on_failure, livemode, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, on_demand_enabled, paid_payments_count, recurrent, redirection_time, slug, sms_sent, success_url, starts_at, status, type, url].hash
|
372
|
+
[allowed_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, is_redirect_on_failure, livemode, max_failed_retries, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, on_demand_enabled, paid_payments_count, recurrent, redirection_time, slug, sms_sent, success_url, starts_at, status, type, url].hash
|
362
373
|
end
|
363
374
|
|
364
375
|
# Builds the object from hash
|