wire4_client 1.1.2 → 1.1.4
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/Gemfile +1 -1
- data/README.md +27 -0
- data/docs/AccountReassigned.md +1 -1
- data/docs/AccountResponse.md +1 -0
- data/docs/BeneficiaryDTO.md +10 -0
- data/docs/CargosRecurrentesApi.md +110 -0
- data/docs/CepResponse.md +1 -0
- data/docs/CepSearchBanxico.md +1 -0
- data/docs/CertificateRequest.md +1 -1
- data/docs/CodiCodeQrResponseDTO.md +1 -0
- data/docs/CodiCodeRequestDTO.md +6 -3
- data/docs/ConfirmRecurringCharge.md +9 -0
- data/docs/CuentasDeBeneficiariosSPEIApi.md +4 -0
- data/docs/CuentasDeBeneficiariosSPIDApi.md +4 -0
- data/docs/Customer.md +9 -0
- data/docs/Deposit.md +1 -0
- data/docs/Depositant.md +1 -0
- data/docs/DepositantCountResponse.md +8 -0
- data/docs/DepositantesApi.md +164 -1
- data/docs/FailedChargesDataDTO.md +13 -0
- data/docs/MessageDepositReceived.md +3 -0
- data/docs/PaymentRequestReportDTO.md +17 -0
- data/docs/PaymentRequestReq.md +18 -0
- data/docs/PaymentRequestResponse.md +10 -0
- data/docs/PaymentsSpeiAndSpidOrderId.md +9 -0
- data/docs/PaymentsSpeiAndSpidRequestId.md +12 -0
- data/docs/Person.md +1 -1
- data/docs/Product.md +11 -0
- data/docs/RecurringChargeRequest.md +14 -0
- data/docs/ReporteDeSolicitudesDePagosApi.md +107 -0
- data/docs/SolicitudDePagosApi.md +59 -0
- data/docs/SpidBeneficiaryResponse.md +1 -0
- data/docs/SuccessChargesDataDTO.md +12 -0
- data/docs/SuccessDataDTO.md +9 -0
- data/docs/TransactionSpeiSpid.md +15 -0
- data/docs/TransactionsRegister.md +11 -0
- data/docs/TransferenciasSPEIApi.md +163 -0
- data/lib/wire4_client/api/cargos_recurrentes_api.rb +143 -0
- data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +6 -0
- data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +6 -0
- data/lib/wire4_client/api/depositantes_api.rb +207 -2
- data/lib/wire4_client/api/reporte_de_solicitudes_de_pagos_api.rb +134 -0
- data/lib/wire4_client/api/solicitud_de_pagos_api.rb +84 -0
- data/lib/wire4_client/api/transferencias_spei_api.rb +234 -4
- data/lib/wire4_client/models/account_reassigned.rb +11 -11
- data/lib/wire4_client/models/account_response.rb +11 -1
- data/lib/wire4_client/models/amount_request.rb +10 -10
- data/lib/wire4_client/models/beneficiary_dto.rb +201 -0
- data/lib/wire4_client/models/cep_response.rb +45 -1
- data/lib/wire4_client/models/cep_search_banxico.rb +48 -4
- data/lib/wire4_client/models/certificate_request.rb +6 -15
- data/lib/wire4_client/models/codi_code_qr_response_dto.rb +15 -5
- data/lib/wire4_client/models/codi_code_request_dto.rb +94 -20
- data/lib/wire4_client/models/codi_operations_filters_request_dto.rb +2 -2
- data/lib/wire4_client/models/confirm_recurring_charge.rb +194 -0
- data/lib/wire4_client/models/customer.rb +205 -0
- data/lib/wire4_client/models/deposit.rb +48 -4
- data/lib/wire4_client/models/depositant.rb +14 -4
- data/lib/wire4_client/models/depositant_count_response.rb +185 -0
- data/lib/wire4_client/models/failed_charges_data_dto.rb +228 -0
- data/lib/wire4_client/models/message_deposit_received.rb +31 -1
- data/lib/wire4_client/models/operations.rb +4 -4
- data/lib/wire4_client/models/payment_codi.rb +2 -2
- data/lib/wire4_client/models/payment_request_report_dto.rb +300 -0
- data/lib/wire4_client/models/payment_request_req.rb +401 -0
- data/lib/wire4_client/models/payment_request_response.rb +204 -0
- data/lib/wire4_client/models/payments_spei_and_spid_order_id.rb +199 -0
- data/lib/wire4_client/models/payments_spei_and_spid_request_id.rb +229 -0
- data/lib/wire4_client/models/person.rb +0 -5
- data/lib/wire4_client/models/product.rb +288 -0
- data/lib/wire4_client/models/recurring_charge_request.rb +278 -0
- data/lib/wire4_client/models/sales_point_request.rb +5 -5
- data/lib/wire4_client/models/spid_beneficiary_response.rb +11 -1
- data/lib/wire4_client/models/success_charges_data_dto.rb +219 -0
- data/lib/wire4_client/models/success_data_dto.rb +226 -0
- data/lib/wire4_client/models/transaction_outgoing.rb +5 -5
- data/lib/wire4_client/models/transaction_spei_spid.rb +390 -0
- data/lib/wire4_client/models/transactions_register.rb +229 -0
- data/lib/wire4_client/version.rb +1 -1
- data/lib/wire4_client.rb +19 -0
- data/spec/api/cargos_recurrentes_api_spec.rb +61 -0
- data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +2 -0
- data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +2 -0
- data/spec/api/depositantes_api_spec.rb +42 -1
- data/spec/api/reporte_de_solicitudes_de_pagos_api_spec.rb +59 -0
- data/spec/api/solicitud_de_pagos_api_spec.rb +48 -0
- data/spec/api/transferencias_spei_api_spec.rb +42 -0
- data/spec/models/account_reassigned_spec.rb +3 -3
- data/spec/models/account_response_spec.rb +6 -0
- data/spec/models/beneficiary_dto_spec.rb +53 -0
- data/spec/models/cep_response_spec.rb +10 -0
- data/spec/models/cep_search_banxico_spec.rb +10 -0
- data/spec/models/codi_code_qr_response_dto_spec.rb +8 -2
- data/spec/models/codi_code_request_dto_spec.rb +23 -1
- data/spec/models/codi_operations_filters_request_dto_spec.rb +1 -1
- data/spec/models/confirm_recurring_charge_spec.rb +47 -0
- data/spec/models/customer_spec.rb +47 -0
- data/spec/models/deposit_spec.rb +10 -0
- data/spec/models/depositant_count_response_spec.rb +41 -0
- data/spec/models/depositant_spec.rb +6 -0
- data/spec/models/failed_charges_data_dto_spec.rb +71 -0
- data/spec/models/message_deposit_received_spec.rb +18 -0
- data/spec/models/operations_spec.rb +2 -2
- data/spec/models/payment_codi_spec.rb +1 -1
- data/spec/models/payment_request_report_dto_spec.rb +99 -0
- data/spec/models/payment_request_req_spec.rb +109 -0
- data/spec/models/payment_request_response_spec.rb +53 -0
- data/spec/models/payments_spei_and_spid_order_id_spec.rb +47 -0
- data/spec/models/payments_spei_and_spid_request_id_spec.rb +65 -0
- data/spec/models/product_spec.rb +63 -0
- data/spec/models/recurring_charge_request_spec.rb +77 -0
- data/spec/models/spid_beneficiary_response_spec.rb +6 -0
- data/spec/models/success_charges_data_dto_spec.rb +65 -0
- data/spec/models/success_data_dto_spec.rb +51 -0
- data/spec/models/transaction_spei_spid_spec.rb +83 -0
- data/spec/models/transactions_register_spec.rb +59 -0
- data/wire4_client-1.1.3.gem +0 -0
- data/wire4_client.gemspec +7 -7
- metadata +108 -55
|
@@ -74,9 +74,34 @@ module Wire4Client
|
|
|
74
74
|
# Firma del CEP..
|
|
75
75
|
attr_accessor :signature
|
|
76
76
|
|
|
77
|
+
# Es el tiop de CEP, puede ser: <strong>SPEI</strong> o <strong>SPID</strong>.
|
|
78
|
+
attr_accessor :type
|
|
79
|
+
|
|
77
80
|
# La url al archivo zip del CEP, el cual contiene el xml y pdf
|
|
78
81
|
attr_accessor :url_zip
|
|
79
82
|
|
|
83
|
+
class EnumAttributeValidator
|
|
84
|
+
attr_reader :datatype
|
|
85
|
+
attr_reader :allowable_values
|
|
86
|
+
|
|
87
|
+
def initialize(datatype, allowable_values)
|
|
88
|
+
@allowable_values = allowable_values.map do |value|
|
|
89
|
+
case datatype.to_s
|
|
90
|
+
when /Integer/i
|
|
91
|
+
value.to_i
|
|
92
|
+
when /Float/i
|
|
93
|
+
value.to_f
|
|
94
|
+
else
|
|
95
|
+
value
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def valid?(value)
|
|
101
|
+
!value || allowable_values.include?(value)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
80
105
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
81
106
|
def self.attribute_map
|
|
82
107
|
{
|
|
@@ -100,6 +125,7 @@ module Wire4Client
|
|
|
100
125
|
:'sender_name' => :'sender_name',
|
|
101
126
|
:'sender_rfc' => :'sender_rfc',
|
|
102
127
|
:'signature' => :'signature',
|
|
128
|
+
:'type' => :'type',
|
|
103
129
|
:'url_zip' => :'url_zip'
|
|
104
130
|
}
|
|
105
131
|
end
|
|
@@ -127,6 +153,7 @@ module Wire4Client
|
|
|
127
153
|
:'sender_name' => :'String',
|
|
128
154
|
:'sender_rfc' => :'String',
|
|
129
155
|
:'signature' => :'String',
|
|
156
|
+
:'type' => :'String',
|
|
130
157
|
:'url_zip' => :'String'
|
|
131
158
|
}
|
|
132
159
|
end
|
|
@@ -219,6 +246,10 @@ module Wire4Client
|
|
|
219
246
|
self.signature = attributes[:'signature']
|
|
220
247
|
end
|
|
221
248
|
|
|
249
|
+
if attributes.has_key?(:'type')
|
|
250
|
+
self.type = attributes[:'type']
|
|
251
|
+
end
|
|
252
|
+
|
|
222
253
|
if attributes.has_key?(:'url_zip')
|
|
223
254
|
self.url_zip = attributes[:'url_zip']
|
|
224
255
|
end
|
|
@@ -234,9 +265,21 @@ module Wire4Client
|
|
|
234
265
|
# Check to see if the all the properties in the model are valid
|
|
235
266
|
# @return true if the model is valid
|
|
236
267
|
def valid?
|
|
268
|
+
type_validator = EnumAttributeValidator.new('String', ['SPEI', 'SPID'])
|
|
269
|
+
return false unless type_validator.valid?(@type)
|
|
237
270
|
true
|
|
238
271
|
end
|
|
239
272
|
|
|
273
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
274
|
+
# @param [Object] type Object to be assigned
|
|
275
|
+
def type=(type)
|
|
276
|
+
validator = EnumAttributeValidator.new('String', ['SPEI', 'SPID'])
|
|
277
|
+
unless validator.valid?(type)
|
|
278
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
|
279
|
+
end
|
|
280
|
+
@type = type
|
|
281
|
+
end
|
|
282
|
+
|
|
240
283
|
# Checks equality by comparing each attribute.
|
|
241
284
|
# @param [Object] Object to be compared
|
|
242
285
|
def ==(o)
|
|
@@ -262,6 +305,7 @@ module Wire4Client
|
|
|
262
305
|
sender_name == o.sender_name &&
|
|
263
306
|
sender_rfc == o.sender_rfc &&
|
|
264
307
|
signature == o.signature &&
|
|
308
|
+
type == o.type &&
|
|
265
309
|
url_zip == o.url_zip
|
|
266
310
|
end
|
|
267
311
|
|
|
@@ -274,7 +318,7 @@ module Wire4Client
|
|
|
274
318
|
# Calculates hash code according to all attributes.
|
|
275
319
|
# @return [Fixnum] Hash code
|
|
276
320
|
def hash
|
|
277
|
-
[account_beneficiary, account_sender, amount, available, beneficiary_bank_key, beneficiary_name, beneficiary_rfc, cadena_original, capture_date, certificate_serial_number, clave_rastreo, description, iva, operation_date, operation_date_cep, reference, sender_bank_key, sender_name, sender_rfc, signature, url_zip].hash
|
|
321
|
+
[account_beneficiary, account_sender, amount, available, beneficiary_bank_key, beneficiary_name, beneficiary_rfc, cadena_original, capture_date, certificate_serial_number, clave_rastreo, description, iva, operation_date, operation_date_cep, reference, sender_bank_key, sender_name, sender_rfc, signature, type, url_zip].hash
|
|
278
322
|
end
|
|
279
323
|
|
|
280
324
|
# Builds the object from hash
|
|
@@ -38,6 +38,31 @@ module Wire4Client
|
|
|
38
38
|
# Es la clave del banco ordenante, es requerida cuando no se envía la cuenta ordenante. Se puede obtener del recurso de las <a href=\"#operation/getAllInstitutionsUsingGET\">instituciones.</a>
|
|
39
39
|
attr_accessor :sender_bank_key
|
|
40
40
|
|
|
41
|
+
# Es el tipo de cep a consultar, puede ser SPEI o SPID.
|
|
42
|
+
attr_accessor :type
|
|
43
|
+
|
|
44
|
+
class EnumAttributeValidator
|
|
45
|
+
attr_reader :datatype
|
|
46
|
+
attr_reader :allowable_values
|
|
47
|
+
|
|
48
|
+
def initialize(datatype, allowable_values)
|
|
49
|
+
@allowable_values = allowable_values.map do |value|
|
|
50
|
+
case datatype.to_s
|
|
51
|
+
when /Integer/i
|
|
52
|
+
value.to_i
|
|
53
|
+
when /Float/i
|
|
54
|
+
value.to_f
|
|
55
|
+
else
|
|
56
|
+
value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def valid?(value)
|
|
62
|
+
!value || allowable_values.include?(value)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
41
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
67
|
def self.attribute_map
|
|
43
68
|
{
|
|
@@ -48,7 +73,8 @@ module Wire4Client
|
|
|
48
73
|
:'operation_date' => :'operation_date',
|
|
49
74
|
:'reference' => :'reference',
|
|
50
75
|
:'sender_account' => :'sender_account',
|
|
51
|
-
:'sender_bank_key' => :'sender_bank_key'
|
|
76
|
+
:'sender_bank_key' => :'sender_bank_key',
|
|
77
|
+
:'type' => :'type'
|
|
52
78
|
}
|
|
53
79
|
end
|
|
54
80
|
|
|
@@ -62,7 +88,8 @@ module Wire4Client
|
|
|
62
88
|
:'operation_date' => :'String',
|
|
63
89
|
:'reference' => :'String',
|
|
64
90
|
:'sender_account' => :'String',
|
|
65
|
-
:'sender_bank_key' => :'String'
|
|
91
|
+
:'sender_bank_key' => :'String',
|
|
92
|
+
:'type' => :'String'
|
|
66
93
|
}
|
|
67
94
|
end
|
|
68
95
|
|
|
@@ -105,6 +132,10 @@ module Wire4Client
|
|
|
105
132
|
if attributes.has_key?(:'sender_bank_key')
|
|
106
133
|
self.sender_bank_key = attributes[:'sender_bank_key']
|
|
107
134
|
end
|
|
135
|
+
|
|
136
|
+
if attributes.has_key?(:'type')
|
|
137
|
+
self.type = attributes[:'type']
|
|
138
|
+
end
|
|
108
139
|
end
|
|
109
140
|
|
|
110
141
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -182,6 +213,8 @@ module Wire4Client
|
|
|
182
213
|
return false if !@sender_bank_key.nil? && @sender_bank_key.to_s.length > 5
|
|
183
214
|
return false if !@sender_bank_key.nil? && @sender_bank_key.to_s.length < 1
|
|
184
215
|
return false if !@sender_bank_key.nil? && @sender_bank_key !~ Regexp.new(/[0-9][0-9]*/)
|
|
216
|
+
type_validator = EnumAttributeValidator.new('String', ['SPEI', 'SPID'])
|
|
217
|
+
return false unless type_validator.valid?(@type)
|
|
185
218
|
true
|
|
186
219
|
end
|
|
187
220
|
|
|
@@ -239,6 +272,16 @@ module Wire4Client
|
|
|
239
272
|
@sender_bank_key = sender_bank_key
|
|
240
273
|
end
|
|
241
274
|
|
|
275
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
276
|
+
# @param [Object] type Object to be assigned
|
|
277
|
+
def type=(type)
|
|
278
|
+
validator = EnumAttributeValidator.new('String', ['SPEI', 'SPID'])
|
|
279
|
+
unless validator.valid?(type)
|
|
280
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
|
281
|
+
end
|
|
282
|
+
@type = type
|
|
283
|
+
end
|
|
284
|
+
|
|
242
285
|
# Checks equality by comparing each attribute.
|
|
243
286
|
# @param [Object] Object to be compared
|
|
244
287
|
def ==(o)
|
|
@@ -251,7 +294,8 @@ module Wire4Client
|
|
|
251
294
|
operation_date == o.operation_date &&
|
|
252
295
|
reference == o.reference &&
|
|
253
296
|
sender_account == o.sender_account &&
|
|
254
|
-
sender_bank_key == o.sender_bank_key
|
|
297
|
+
sender_bank_key == o.sender_bank_key &&
|
|
298
|
+
type == o.type
|
|
255
299
|
end
|
|
256
300
|
|
|
257
301
|
# @see the `==` method
|
|
@@ -263,7 +307,7 @@ module Wire4Client
|
|
|
263
307
|
# Calculates hash code according to all attributes.
|
|
264
308
|
# @return [Fixnum] Hash code
|
|
265
309
|
def hash
|
|
266
|
-
[amount, beneficiary_account, beneficiary_bank_key, clave_rastreo, operation_date, reference, sender_account, sender_bank_key].hash
|
|
310
|
+
[amount, beneficiary_account, beneficiary_bank_key, clave_rastreo, operation_date, reference, sender_account, sender_bank_key, type].hash
|
|
267
311
|
end
|
|
268
312
|
|
|
269
313
|
# Builds the object from hash
|
|
@@ -21,7 +21,7 @@ module Wire4Client
|
|
|
21
21
|
# Es el número de certificado.
|
|
22
22
|
attr_accessor :certificate_number
|
|
23
23
|
|
|
24
|
-
# Es el dígito verificador.
|
|
24
|
+
# Es el dígito verificador. Máximo 3 dígitos.
|
|
25
25
|
attr_accessor :check_digit
|
|
26
26
|
|
|
27
27
|
# Es la información de cifrado.
|
|
@@ -76,45 +76,36 @@ module Wire4Client
|
|
|
76
76
|
# @return Array for valid properties with the reasons
|
|
77
77
|
def list_invalid_properties
|
|
78
78
|
invalid_properties = Array.new
|
|
79
|
-
if !@check_digit.nil? && @check_digit.to_s.length >
|
|
80
|
-
invalid_properties.push('invalid value for "check_digit", the character length must be smaller than or equal to
|
|
79
|
+
if !@check_digit.nil? && @check_digit.to_s.length > 3
|
|
80
|
+
invalid_properties.push('invalid value for "check_digit", the character length must be smaller than or equal to 3.')
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
if !@check_digit.nil? && @check_digit.to_s.length < 1
|
|
84
84
|
invalid_properties.push('invalid value for "check_digit", the character length must be great than or equal to 1.')
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
if !@check_digit.nil? && @check_digit !~ Regexp.new(/\d/)
|
|
88
|
-
invalid_properties.push('invalid value for "check_digit", must conform to the pattern /\d/.')
|
|
89
|
-
end
|
|
90
|
-
|
|
91
87
|
invalid_properties
|
|
92
88
|
end
|
|
93
89
|
|
|
94
90
|
# Check to see if the all the properties in the model are valid
|
|
95
91
|
# @return true if the model is valid
|
|
96
92
|
def valid?
|
|
97
|
-
return false if !@check_digit.nil? && @check_digit.to_s.length >
|
|
93
|
+
return false if !@check_digit.nil? && @check_digit.to_s.length > 3
|
|
98
94
|
return false if !@check_digit.nil? && @check_digit.to_s.length < 1
|
|
99
|
-
return false if !@check_digit.nil? && @check_digit !~ Regexp.new(/\d/)
|
|
100
95
|
true
|
|
101
96
|
end
|
|
102
97
|
|
|
103
98
|
# Custom attribute writer method with validation
|
|
104
99
|
# @param [Object] check_digit Value to be assigned
|
|
105
100
|
def check_digit=(check_digit)
|
|
106
|
-
if !check_digit.nil? && check_digit.to_s.length >
|
|
107
|
-
fail ArgumentError, 'invalid value for "check_digit", the character length must be smaller than or equal to
|
|
101
|
+
if !check_digit.nil? && check_digit.to_s.length > 3
|
|
102
|
+
fail ArgumentError, 'invalid value for "check_digit", the character length must be smaller than or equal to 3.'
|
|
108
103
|
end
|
|
109
104
|
|
|
110
105
|
if !check_digit.nil? && check_digit.to_s.length < 1
|
|
111
106
|
fail ArgumentError, 'invalid value for "check_digit", the character length must be great than or equal to 1.'
|
|
112
107
|
end
|
|
113
108
|
|
|
114
|
-
if !check_digit.nil? && check_digit !~ Regexp.new(/\d/)
|
|
115
|
-
fail ArgumentError, 'invalid value for "check_digit", must conform to the pattern /\d/.'
|
|
116
|
-
end
|
|
117
|
-
|
|
118
109
|
@check_digit = check_digit
|
|
119
110
|
end
|
|
120
111
|
|
|
@@ -38,6 +38,9 @@ module Wire4Client
|
|
|
38
38
|
# Es el Número de teléfono móvil en caso de ser un pago CODI® usando \"PUSH_NOTIFICATION\".
|
|
39
39
|
attr_accessor :phone_number
|
|
40
40
|
|
|
41
|
+
# Referencia numérica del pago CODI®.
|
|
42
|
+
attr_accessor :reference
|
|
43
|
+
|
|
41
44
|
# El estado del código QR para pago CODI®.
|
|
42
45
|
attr_accessor :status
|
|
43
46
|
|
|
@@ -77,6 +80,7 @@ module Wire4Client
|
|
|
77
80
|
:'due_date' => :'due_date',
|
|
78
81
|
:'order_id' => :'order_id',
|
|
79
82
|
:'phone_number' => :'phone_number',
|
|
83
|
+
:'reference' => :'reference',
|
|
80
84
|
:'status' => :'status',
|
|
81
85
|
:'type' => :'type'
|
|
82
86
|
}
|
|
@@ -93,6 +97,7 @@ module Wire4Client
|
|
|
93
97
|
:'due_date' => :'DateTime',
|
|
94
98
|
:'order_id' => :'String',
|
|
95
99
|
:'phone_number' => :'String',
|
|
100
|
+
:'reference' => :'Integer',
|
|
96
101
|
:'status' => :'String',
|
|
97
102
|
:'type' => :'String'
|
|
98
103
|
}
|
|
@@ -138,6 +143,10 @@ module Wire4Client
|
|
|
138
143
|
self.phone_number = attributes[:'phone_number']
|
|
139
144
|
end
|
|
140
145
|
|
|
146
|
+
if attributes.has_key?(:'reference')
|
|
147
|
+
self.reference = attributes[:'reference']
|
|
148
|
+
end
|
|
149
|
+
|
|
141
150
|
if attributes.has_key?(:'status')
|
|
142
151
|
self.status = attributes[:'status']
|
|
143
152
|
end
|
|
@@ -157,9 +166,9 @@ module Wire4Client
|
|
|
157
166
|
# Check to see if the all the properties in the model are valid
|
|
158
167
|
# @return true if the model is valid
|
|
159
168
|
def valid?
|
|
160
|
-
status_validator = EnumAttributeValidator.new('String', ['RECEIVED', 'COMPLETED', 'CANCELLED'])
|
|
169
|
+
status_validator = EnumAttributeValidator.new('String', ['ACCEPTED', 'RECEIVED', 'COMPLETED', 'CANCELLED', 'POSTPONED', 'REJECTED', 'REVERSED', 'PENDING'])
|
|
161
170
|
return false unless status_validator.valid?(@status)
|
|
162
|
-
type_validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE'])
|
|
171
|
+
type_validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE', 'UNKNOWN'])
|
|
163
172
|
return false unless type_validator.valid?(@type)
|
|
164
173
|
true
|
|
165
174
|
end
|
|
@@ -167,7 +176,7 @@ module Wire4Client
|
|
|
167
176
|
# Custom attribute writer method checking allowed values (enum).
|
|
168
177
|
# @param [Object] status Object to be assigned
|
|
169
178
|
def status=(status)
|
|
170
|
-
validator = EnumAttributeValidator.new('String', ['RECEIVED', 'COMPLETED', 'CANCELLED'])
|
|
179
|
+
validator = EnumAttributeValidator.new('String', ['ACCEPTED', 'RECEIVED', 'COMPLETED', 'CANCELLED', 'POSTPONED', 'REJECTED', 'REVERSED', 'PENDING'])
|
|
171
180
|
unless validator.valid?(status)
|
|
172
181
|
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
|
173
182
|
end
|
|
@@ -177,7 +186,7 @@ module Wire4Client
|
|
|
177
186
|
# Custom attribute writer method checking allowed values (enum).
|
|
178
187
|
# @param [Object] type Object to be assigned
|
|
179
188
|
def type=(type)
|
|
180
|
-
validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE'])
|
|
189
|
+
validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE', 'UNKNOWN'])
|
|
181
190
|
unless validator.valid?(type)
|
|
182
191
|
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
|
183
192
|
end
|
|
@@ -197,6 +206,7 @@ module Wire4Client
|
|
|
197
206
|
due_date == o.due_date &&
|
|
198
207
|
order_id == o.order_id &&
|
|
199
208
|
phone_number == o.phone_number &&
|
|
209
|
+
reference == o.reference &&
|
|
200
210
|
status == o.status &&
|
|
201
211
|
type == o.type
|
|
202
212
|
end
|
|
@@ -210,7 +220,7 @@ module Wire4Client
|
|
|
210
220
|
# Calculates hash code according to all attributes.
|
|
211
221
|
# @return [Fixnum] Hash code
|
|
212
222
|
def hash
|
|
213
|
-
[amount, barcode_base64, barcode_url, concept, creation_date, due_date, order_id, phone_number, status, type].hash
|
|
223
|
+
[amount, barcode_base64, barcode_url, concept, creation_date, due_date, order_id, phone_number, reference, status, type].hash
|
|
214
224
|
end
|
|
215
225
|
|
|
216
226
|
# Builds the object from hash
|
|
@@ -17,7 +17,9 @@ module Wire4Client
|
|
|
17
17
|
# Monto del pago CODI®
|
|
18
18
|
attr_accessor :amount
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
attr_accessor :beneficiary2
|
|
21
|
+
|
|
22
|
+
# Descripción del pago CODI®, no debe contener letras con acentos ni caracteres especiales
|
|
21
23
|
attr_accessor :concept
|
|
22
24
|
|
|
23
25
|
# Fecha de operación pago CODI®, formato: yyyy-MM-dd'T'HH:mm:ss
|
|
@@ -29,10 +31,16 @@ module Wire4Client
|
|
|
29
31
|
# Referencia de la transferencia asignada por el cliente
|
|
30
32
|
attr_accessor :order_id
|
|
31
33
|
|
|
34
|
+
# El tipo de pago ya sea en una ocasión (ONE_OCCASION) o recurrente (RECURRENT)
|
|
35
|
+
attr_accessor :payment_type
|
|
36
|
+
|
|
32
37
|
# Número de teléfono móvil en caso de ser un pago CODI® usando 'PUSH_NOTIFICATION' estecampo sería obligatorio
|
|
33
38
|
attr_accessor :phone_number
|
|
34
39
|
|
|
35
|
-
#
|
|
40
|
+
# Referencia numérica del pago CODI®. Debe ser de 7 dígitos
|
|
41
|
+
attr_accessor :reference
|
|
42
|
+
|
|
43
|
+
# El tipo de solicitud QR o PUSH para pago con CODI®
|
|
36
44
|
attr_accessor :type
|
|
37
45
|
|
|
38
46
|
class EnumAttributeValidator
|
|
@@ -61,11 +69,14 @@ module Wire4Client
|
|
|
61
69
|
def self.attribute_map
|
|
62
70
|
{
|
|
63
71
|
:'amount' => :'amount',
|
|
72
|
+
:'beneficiary2' => :'beneficiary2',
|
|
64
73
|
:'concept' => :'concept',
|
|
65
74
|
:'due_date' => :'due_date',
|
|
66
75
|
:'metadata' => :'metadata',
|
|
67
76
|
:'order_id' => :'order_id',
|
|
77
|
+
:'payment_type' => :'payment_type',
|
|
68
78
|
:'phone_number' => :'phone_number',
|
|
79
|
+
:'reference' => :'reference',
|
|
69
80
|
:'type' => :'type'
|
|
70
81
|
}
|
|
71
82
|
end
|
|
@@ -74,11 +85,14 @@ module Wire4Client
|
|
|
74
85
|
def self.swagger_types
|
|
75
86
|
{
|
|
76
87
|
:'amount' => :'Float',
|
|
88
|
+
:'beneficiary2' => :'BeneficiaryDTO',
|
|
77
89
|
:'concept' => :'String',
|
|
78
90
|
:'due_date' => :'DateTime',
|
|
79
91
|
:'metadata' => :'String',
|
|
80
92
|
:'order_id' => :'String',
|
|
93
|
+
:'payment_type' => :'String',
|
|
81
94
|
:'phone_number' => :'String',
|
|
95
|
+
:'reference' => :'Integer',
|
|
82
96
|
:'type' => :'String'
|
|
83
97
|
}
|
|
84
98
|
end
|
|
@@ -95,6 +109,10 @@ module Wire4Client
|
|
|
95
109
|
self.amount = attributes[:'amount']
|
|
96
110
|
end
|
|
97
111
|
|
|
112
|
+
if attributes.has_key?(:'beneficiary2')
|
|
113
|
+
self.beneficiary2 = attributes[:'beneficiary2']
|
|
114
|
+
end
|
|
115
|
+
|
|
98
116
|
if attributes.has_key?(:'concept')
|
|
99
117
|
self.concept = attributes[:'concept']
|
|
100
118
|
end
|
|
@@ -111,10 +129,18 @@ module Wire4Client
|
|
|
111
129
|
self.order_id = attributes[:'order_id']
|
|
112
130
|
end
|
|
113
131
|
|
|
132
|
+
if attributes.has_key?(:'payment_type')
|
|
133
|
+
self.payment_type = attributes[:'payment_type']
|
|
134
|
+
end
|
|
135
|
+
|
|
114
136
|
if attributes.has_key?(:'phone_number')
|
|
115
137
|
self.phone_number = attributes[:'phone_number']
|
|
116
138
|
end
|
|
117
139
|
|
|
140
|
+
if attributes.has_key?(:'reference')
|
|
141
|
+
self.reference = attributes[:'reference']
|
|
142
|
+
end
|
|
143
|
+
|
|
118
144
|
if attributes.has_key?(:'type')
|
|
119
145
|
self.type = attributes[:'type']
|
|
120
146
|
end
|
|
@@ -124,8 +150,8 @@ module Wire4Client
|
|
|
124
150
|
# @return Array for valid properties with the reasons
|
|
125
151
|
def list_invalid_properties
|
|
126
152
|
invalid_properties = Array.new
|
|
127
|
-
if !@amount.nil? && @amount > 8000
|
|
128
|
-
invalid_properties.push('invalid value for "amount", must be smaller than or equal to 8000.
|
|
153
|
+
if !@amount.nil? && @amount > 8000
|
|
154
|
+
invalid_properties.push('invalid value for "amount", must be smaller than or equal to 8000.')
|
|
129
155
|
end
|
|
130
156
|
|
|
131
157
|
if !@amount.nil? && @amount < 0.01
|
|
@@ -136,18 +162,14 @@ module Wire4Client
|
|
|
136
162
|
invalid_properties.push('invalid value for "concept", concept cannot be nil.')
|
|
137
163
|
end
|
|
138
164
|
|
|
139
|
-
if @concept.to_s.length >
|
|
140
|
-
invalid_properties.push('invalid value for "concept", the character length must be smaller than or equal to
|
|
165
|
+
if @concept.to_s.length > 40
|
|
166
|
+
invalid_properties.push('invalid value for "concept", the character length must be smaller than or equal to 40.')
|
|
141
167
|
end
|
|
142
168
|
|
|
143
169
|
if @concept.to_s.length < 0
|
|
144
170
|
invalid_properties.push('invalid value for "concept", the character length must be great than or equal to 0.')
|
|
145
171
|
end
|
|
146
172
|
|
|
147
|
-
if @due_date.nil?
|
|
148
|
-
invalid_properties.push('invalid value for "due_date", due_date cannot be nil.')
|
|
149
|
-
end
|
|
150
|
-
|
|
151
173
|
if @order_id.nil?
|
|
152
174
|
invalid_properties.push('invalid value for "order_id", order_id cannot be nil.')
|
|
153
175
|
end
|
|
@@ -160,6 +182,10 @@ module Wire4Client
|
|
|
160
182
|
invalid_properties.push('invalid value for "order_id", the character length must be great than or equal to 5.')
|
|
161
183
|
end
|
|
162
184
|
|
|
185
|
+
if @payment_type.nil?
|
|
186
|
+
invalid_properties.push('invalid value for "payment_type", payment_type cannot be nil.')
|
|
187
|
+
end
|
|
188
|
+
|
|
163
189
|
if !@phone_number.nil? && @phone_number.to_s.length > 10
|
|
164
190
|
invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 10.')
|
|
165
191
|
end
|
|
@@ -168,6 +194,18 @@ module Wire4Client
|
|
|
168
194
|
invalid_properties.push('invalid value for "phone_number", the character length must be great than or equal to 10.')
|
|
169
195
|
end
|
|
170
196
|
|
|
197
|
+
if @reference.nil?
|
|
198
|
+
invalid_properties.push('invalid value for "reference", reference cannot be nil.')
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if @reference > 9999999
|
|
202
|
+
invalid_properties.push('invalid value for "reference", must be smaller than or equal to 9999999.')
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if @reference < 0
|
|
206
|
+
invalid_properties.push('invalid value for "reference", must be greater than or equal to 0.')
|
|
207
|
+
end
|
|
208
|
+
|
|
171
209
|
if @type.nil?
|
|
172
210
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
173
211
|
end
|
|
@@ -178,19 +216,24 @@ module Wire4Client
|
|
|
178
216
|
# Check to see if the all the properties in the model are valid
|
|
179
217
|
# @return true if the model is valid
|
|
180
218
|
def valid?
|
|
181
|
-
return false if !@amount.nil? && @amount > 8000
|
|
219
|
+
return false if !@amount.nil? && @amount > 8000
|
|
182
220
|
return false if !@amount.nil? && @amount < 0.01
|
|
183
221
|
return false if @concept.nil?
|
|
184
|
-
return false if @concept.to_s.length >
|
|
222
|
+
return false if @concept.to_s.length > 40
|
|
185
223
|
return false if @concept.to_s.length < 0
|
|
186
|
-
return false if @due_date.nil?
|
|
187
224
|
return false if @order_id.nil?
|
|
188
225
|
return false if @order_id.to_s.length > 36
|
|
189
226
|
return false if @order_id.to_s.length < 5
|
|
227
|
+
return false if @payment_type.nil?
|
|
228
|
+
payment_type_validator = EnumAttributeValidator.new('String', ['ONE_OCCASION', 'RECURRENT', 'RECURRENT_NO_RECURRENT', 'UNKNOWN'])
|
|
229
|
+
return false unless payment_type_validator.valid?(@payment_type)
|
|
190
230
|
return false if !@phone_number.nil? && @phone_number.to_s.length > 10
|
|
191
231
|
return false if !@phone_number.nil? && @phone_number.to_s.length < 10
|
|
232
|
+
return false if @reference.nil?
|
|
233
|
+
return false if @reference > 9999999
|
|
234
|
+
return false if @reference < 0
|
|
192
235
|
return false if @type.nil?
|
|
193
|
-
type_validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE'])
|
|
236
|
+
type_validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE', 'UNKNOWN'])
|
|
194
237
|
return false unless type_validator.valid?(@type)
|
|
195
238
|
true
|
|
196
239
|
end
|
|
@@ -198,8 +241,8 @@ module Wire4Client
|
|
|
198
241
|
# Custom attribute writer method with validation
|
|
199
242
|
# @param [Object] amount Value to be assigned
|
|
200
243
|
def amount=(amount)
|
|
201
|
-
if !amount.nil? && amount > 8000
|
|
202
|
-
fail ArgumentError, 'invalid value for "amount", must be smaller than or equal to 8000.
|
|
244
|
+
if !amount.nil? && amount > 8000
|
|
245
|
+
fail ArgumentError, 'invalid value for "amount", must be smaller than or equal to 8000.'
|
|
203
246
|
end
|
|
204
247
|
|
|
205
248
|
if !amount.nil? && amount < 0.01
|
|
@@ -216,8 +259,8 @@ module Wire4Client
|
|
|
216
259
|
fail ArgumentError, 'concept cannot be nil'
|
|
217
260
|
end
|
|
218
261
|
|
|
219
|
-
if concept.to_s.length >
|
|
220
|
-
fail ArgumentError, 'invalid value for "concept", the character length must be smaller than or equal to
|
|
262
|
+
if concept.to_s.length > 40
|
|
263
|
+
fail ArgumentError, 'invalid value for "concept", the character length must be smaller than or equal to 40.'
|
|
221
264
|
end
|
|
222
265
|
|
|
223
266
|
if concept.to_s.length < 0
|
|
@@ -245,6 +288,16 @@ module Wire4Client
|
|
|
245
288
|
@order_id = order_id
|
|
246
289
|
end
|
|
247
290
|
|
|
291
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
292
|
+
# @param [Object] payment_type Object to be assigned
|
|
293
|
+
def payment_type=(payment_type)
|
|
294
|
+
validator = EnumAttributeValidator.new('String', ['ONE_OCCASION', 'RECURRENT', 'RECURRENT_NO_RECURRENT', 'UNKNOWN'])
|
|
295
|
+
unless validator.valid?(payment_type)
|
|
296
|
+
fail ArgumentError, 'invalid value for "payment_type", must be one of #{validator.allowable_values}.'
|
|
297
|
+
end
|
|
298
|
+
@payment_type = payment_type
|
|
299
|
+
end
|
|
300
|
+
|
|
248
301
|
# Custom attribute writer method with validation
|
|
249
302
|
# @param [Object] phone_number Value to be assigned
|
|
250
303
|
def phone_number=(phone_number)
|
|
@@ -259,10 +312,28 @@ module Wire4Client
|
|
|
259
312
|
@phone_number = phone_number
|
|
260
313
|
end
|
|
261
314
|
|
|
315
|
+
# Custom attribute writer method with validation
|
|
316
|
+
# @param [Object] reference Value to be assigned
|
|
317
|
+
def reference=(reference)
|
|
318
|
+
if reference.nil?
|
|
319
|
+
fail ArgumentError, 'reference cannot be nil'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if reference > 9999999
|
|
323
|
+
fail ArgumentError, 'invalid value for "reference", must be smaller than or equal to 9999999.'
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if reference < 0
|
|
327
|
+
fail ArgumentError, 'invalid value for "reference", must be greater than or equal to 0.'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
@reference = reference
|
|
331
|
+
end
|
|
332
|
+
|
|
262
333
|
# Custom attribute writer method checking allowed values (enum).
|
|
263
334
|
# @param [Object] type Object to be assigned
|
|
264
335
|
def type=(type)
|
|
265
|
-
validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE'])
|
|
336
|
+
validator = EnumAttributeValidator.new('String', ['PUSH_NOTIFICATION', 'QR_CODE', 'UNKNOWN'])
|
|
266
337
|
unless validator.valid?(type)
|
|
267
338
|
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
|
268
339
|
end
|
|
@@ -275,11 +346,14 @@ module Wire4Client
|
|
|
275
346
|
return true if self.equal?(o)
|
|
276
347
|
self.class == o.class &&
|
|
277
348
|
amount == o.amount &&
|
|
349
|
+
beneficiary2 == o.beneficiary2 &&
|
|
278
350
|
concept == o.concept &&
|
|
279
351
|
due_date == o.due_date &&
|
|
280
352
|
metadata == o.metadata &&
|
|
281
353
|
order_id == o.order_id &&
|
|
354
|
+
payment_type == o.payment_type &&
|
|
282
355
|
phone_number == o.phone_number &&
|
|
356
|
+
reference == o.reference &&
|
|
283
357
|
type == o.type
|
|
284
358
|
end
|
|
285
359
|
|
|
@@ -292,7 +366,7 @@ module Wire4Client
|
|
|
292
366
|
# Calculates hash code according to all attributes.
|
|
293
367
|
# @return [Fixnum] Hash code
|
|
294
368
|
def hash
|
|
295
|
-
[amount, concept, due_date, metadata, order_id, phone_number, type].hash
|
|
369
|
+
[amount, beneficiary2, concept, due_date, metadata, order_id, payment_type, phone_number, reference, type].hash
|
|
296
370
|
end
|
|
297
371
|
|
|
298
372
|
# Builds the object from hash
|
|
@@ -159,7 +159,7 @@ module Wire4Client
|
|
|
159
159
|
return false if !@amount_from.nil? && @amount_from < 0.01
|
|
160
160
|
return false if !@amount_to.nil? && @amount_to > 9999999.99
|
|
161
161
|
return false if !@amount_to.nil? && @amount_to < 0.01
|
|
162
|
-
status_validator = EnumAttributeValidator.new('String', ['RECEIVED', 'COMPLETED', 'CANCELLED'])
|
|
162
|
+
status_validator = EnumAttributeValidator.new('String', ['ACCEPTED', 'RECEIVED', 'COMPLETED', 'CANCELLED', 'POSTPONED', 'REJECTED', 'REVERSED', 'PENDING'])
|
|
163
163
|
return false unless status_validator.valid?(@status)
|
|
164
164
|
true
|
|
165
165
|
end
|
|
@@ -195,7 +195,7 @@ module Wire4Client
|
|
|
195
195
|
# Custom attribute writer method checking allowed values (enum).
|
|
196
196
|
# @param [Object] status Object to be assigned
|
|
197
197
|
def status=(status)
|
|
198
|
-
validator = EnumAttributeValidator.new('String', ['RECEIVED', 'COMPLETED', 'CANCELLED'])
|
|
198
|
+
validator = EnumAttributeValidator.new('String', ['ACCEPTED', 'RECEIVED', 'COMPLETED', 'CANCELLED', 'POSTPONED', 'REJECTED', 'REVERSED', 'PENDING'])
|
|
199
199
|
unless validator.valid?(status)
|
|
200
200
|
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
|
201
201
|
end
|