wire4_client 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +28 -1
- 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 +138 -4
- 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/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 +18 -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 +107 -55
@@ -0,0 +1,390 @@
|
|
1
|
+
=begin
|
2
|
+
#Wire4RestAPI
|
3
|
+
|
4
|
+
#Referencia de la API de Wire4
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.10
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Wire4Client
|
16
|
+
# Objeto que contiene la información de una transferencia SPID® de salida.
|
17
|
+
class TransactionSpeiSpid
|
18
|
+
# Es el monto de la transferencia. Se valida que sean máximo 20 dígitos y 2 decimales. Ejemplo 1000.00
|
19
|
+
attr_accessor :amount
|
20
|
+
|
21
|
+
# Cuenta del beneficiario, podría ser un número celular (10dígitos), tarjeta de débito (TDD) o Cuenta CLABE interbancaria (18 dígitos).
|
22
|
+
attr_accessor :beneficiary_account
|
23
|
+
|
24
|
+
# Es el identificador de la clasificación de la transferencia SPID.
|
25
|
+
attr_accessor :classification_id
|
26
|
+
|
27
|
+
# Es el concepto de la transferencia.
|
28
|
+
attr_accessor :concept
|
29
|
+
|
30
|
+
# Código de moneda en la que opera la cuenta.
|
31
|
+
attr_accessor :currency_code
|
32
|
+
|
33
|
+
# Lista de correo electrónico (email) del beneficiario. Este campo es opcional.
|
34
|
+
attr_accessor :email
|
35
|
+
|
36
|
+
# Es la referencia de la transferencia asignada por el cliente. Ejemplo: dae9c6ae-8c7a-42e8-99f4-ebe90566efae
|
37
|
+
attr_accessor :order_id
|
38
|
+
|
39
|
+
# Es la referencia numérica de la transferencia.
|
40
|
+
attr_accessor :reference
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'amount' => :'amount',
|
46
|
+
:'beneficiary_account' => :'beneficiary_account',
|
47
|
+
:'classification_id' => :'classification_id',
|
48
|
+
:'concept' => :'concept',
|
49
|
+
:'currency_code' => :'currency_code',
|
50
|
+
:'email' => :'email',
|
51
|
+
:'order_id' => :'order_id',
|
52
|
+
:'reference' => :'reference'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
:'amount' => :'Float',
|
60
|
+
:'beneficiary_account' => :'String',
|
61
|
+
:'classification_id' => :'String',
|
62
|
+
:'concept' => :'String',
|
63
|
+
:'currency_code' => :'String',
|
64
|
+
:'email' => :'Array<String>',
|
65
|
+
:'order_id' => :'String',
|
66
|
+
:'reference' => :'Integer'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
def initialize(attributes = {})
|
73
|
+
return unless attributes.is_a?(Hash)
|
74
|
+
|
75
|
+
# convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
77
|
+
|
78
|
+
if attributes.has_key?(:'amount')
|
79
|
+
self.amount = attributes[:'amount']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'beneficiary_account')
|
83
|
+
self.beneficiary_account = attributes[:'beneficiary_account']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'classification_id')
|
87
|
+
self.classification_id = attributes[:'classification_id']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'concept')
|
91
|
+
self.concept = attributes[:'concept']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'currency_code')
|
95
|
+
self.currency_code = attributes[:'currency_code']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'email')
|
99
|
+
if (value = attributes[:'email']).is_a?(Array)
|
100
|
+
self.email = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'order_id')
|
105
|
+
self.order_id = attributes[:'order_id']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'reference')
|
109
|
+
self.reference = attributes[:'reference']
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
114
|
+
# @return Array for valid properties with the reasons
|
115
|
+
def list_invalid_properties
|
116
|
+
invalid_properties = Array.new
|
117
|
+
if @amount.nil?
|
118
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if @amount < 0.01
|
122
|
+
invalid_properties.push('invalid value for "amount", must be greater than or equal to 0.01.')
|
123
|
+
end
|
124
|
+
|
125
|
+
if @beneficiary_account.nil?
|
126
|
+
invalid_properties.push('invalid value for "beneficiary_account", beneficiary_account cannot be nil.')
|
127
|
+
end
|
128
|
+
|
129
|
+
if @classification_id.nil?
|
130
|
+
invalid_properties.push('invalid value for "classification_id", classification_id cannot be nil.')
|
131
|
+
end
|
132
|
+
|
133
|
+
if @concept.nil?
|
134
|
+
invalid_properties.push('invalid value for "concept", concept cannot be nil.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if @concept.to_s.length > 250
|
138
|
+
invalid_properties.push('invalid value for "concept", the character length must be smaller than or equal to 250.')
|
139
|
+
end
|
140
|
+
|
141
|
+
if @concept.to_s.length < 1
|
142
|
+
invalid_properties.push('invalid value for "concept", the character length must be great than or equal to 1.')
|
143
|
+
end
|
144
|
+
|
145
|
+
if @order_id.nil?
|
146
|
+
invalid_properties.push('invalid value for "order_id", order_id cannot be nil.')
|
147
|
+
end
|
148
|
+
|
149
|
+
if @order_id.to_s.length > 256
|
150
|
+
invalid_properties.push('invalid value for "order_id", the character length must be smaller than or equal to 256.')
|
151
|
+
end
|
152
|
+
|
153
|
+
if @order_id.to_s.length < 1
|
154
|
+
invalid_properties.push('invalid value for "order_id", the character length must be great than or equal to 1.')
|
155
|
+
end
|
156
|
+
|
157
|
+
if @reference.nil?
|
158
|
+
invalid_properties.push('invalid value for "reference", reference cannot be nil.')
|
159
|
+
end
|
160
|
+
|
161
|
+
if @reference > 9999999
|
162
|
+
invalid_properties.push('invalid value for "reference", must be smaller than or equal to 9999999.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @reference < 0
|
166
|
+
invalid_properties.push('invalid value for "reference", must be greater than or equal to 0.')
|
167
|
+
end
|
168
|
+
|
169
|
+
invalid_properties
|
170
|
+
end
|
171
|
+
|
172
|
+
# Check to see if the all the properties in the model are valid
|
173
|
+
# @return true if the model is valid
|
174
|
+
def valid?
|
175
|
+
return false if @amount.nil?
|
176
|
+
return false if @amount < 0.01
|
177
|
+
return false if @beneficiary_account.nil?
|
178
|
+
return false if @classification_id.nil?
|
179
|
+
return false if @concept.nil?
|
180
|
+
return false if @concept.to_s.length > 250
|
181
|
+
return false if @concept.to_s.length < 1
|
182
|
+
return false if @order_id.nil?
|
183
|
+
return false if @order_id.to_s.length > 256
|
184
|
+
return false if @order_id.to_s.length < 1
|
185
|
+
return false if @reference.nil?
|
186
|
+
return false if @reference > 9999999
|
187
|
+
return false if @reference < 0
|
188
|
+
true
|
189
|
+
end
|
190
|
+
|
191
|
+
# Custom attribute writer method with validation
|
192
|
+
# @param [Object] amount Value to be assigned
|
193
|
+
def amount=(amount)
|
194
|
+
if amount.nil?
|
195
|
+
fail ArgumentError, 'amount cannot be nil'
|
196
|
+
end
|
197
|
+
|
198
|
+
if amount < 0.01
|
199
|
+
fail ArgumentError, 'invalid value for "amount", must be greater than or equal to 0.01.'
|
200
|
+
end
|
201
|
+
|
202
|
+
@amount = amount
|
203
|
+
end
|
204
|
+
|
205
|
+
# Custom attribute writer method with validation
|
206
|
+
# @param [Object] concept Value to be assigned
|
207
|
+
def concept=(concept)
|
208
|
+
if concept.nil?
|
209
|
+
fail ArgumentError, 'concept cannot be nil'
|
210
|
+
end
|
211
|
+
|
212
|
+
if concept.to_s.length > 250
|
213
|
+
fail ArgumentError, 'invalid value for "concept", the character length must be smaller than or equal to 250.'
|
214
|
+
end
|
215
|
+
|
216
|
+
if concept.to_s.length < 1
|
217
|
+
fail ArgumentError, 'invalid value for "concept", the character length must be great than or equal to 1.'
|
218
|
+
end
|
219
|
+
|
220
|
+
@concept = concept
|
221
|
+
end
|
222
|
+
|
223
|
+
# Custom attribute writer method with validation
|
224
|
+
# @param [Object] order_id Value to be assigned
|
225
|
+
def order_id=(order_id)
|
226
|
+
if order_id.nil?
|
227
|
+
fail ArgumentError, 'order_id cannot be nil'
|
228
|
+
end
|
229
|
+
|
230
|
+
if order_id.to_s.length > 256
|
231
|
+
fail ArgumentError, 'invalid value for "order_id", the character length must be smaller than or equal to 256.'
|
232
|
+
end
|
233
|
+
|
234
|
+
if order_id.to_s.length < 1
|
235
|
+
fail ArgumentError, 'invalid value for "order_id", the character length must be great than or equal to 1.'
|
236
|
+
end
|
237
|
+
|
238
|
+
@order_id = order_id
|
239
|
+
end
|
240
|
+
|
241
|
+
# Custom attribute writer method with validation
|
242
|
+
# @param [Object] reference Value to be assigned
|
243
|
+
def reference=(reference)
|
244
|
+
if reference.nil?
|
245
|
+
fail ArgumentError, 'reference cannot be nil'
|
246
|
+
end
|
247
|
+
|
248
|
+
if reference > 9999999
|
249
|
+
fail ArgumentError, 'invalid value for "reference", must be smaller than or equal to 9999999.'
|
250
|
+
end
|
251
|
+
|
252
|
+
if reference < 0
|
253
|
+
fail ArgumentError, 'invalid value for "reference", must be greater than or equal to 0.'
|
254
|
+
end
|
255
|
+
|
256
|
+
@reference = reference
|
257
|
+
end
|
258
|
+
|
259
|
+
# Checks equality by comparing each attribute.
|
260
|
+
# @param [Object] Object to be compared
|
261
|
+
def ==(o)
|
262
|
+
return true if self.equal?(o)
|
263
|
+
self.class == o.class &&
|
264
|
+
amount == o.amount &&
|
265
|
+
beneficiary_account == o.beneficiary_account &&
|
266
|
+
classification_id == o.classification_id &&
|
267
|
+
concept == o.concept &&
|
268
|
+
currency_code == o.currency_code &&
|
269
|
+
email == o.email &&
|
270
|
+
order_id == o.order_id &&
|
271
|
+
reference == o.reference
|
272
|
+
end
|
273
|
+
|
274
|
+
# @see the `==` method
|
275
|
+
# @param [Object] Object to be compared
|
276
|
+
def eql?(o)
|
277
|
+
self == o
|
278
|
+
end
|
279
|
+
|
280
|
+
# Calculates hash code according to all attributes.
|
281
|
+
# @return [Fixnum] Hash code
|
282
|
+
def hash
|
283
|
+
[amount, beneficiary_account, classification_id, concept, currency_code, email, order_id, reference].hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Builds the object from hash
|
287
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
288
|
+
# @return [Object] Returns the model itself
|
289
|
+
def build_from_hash(attributes)
|
290
|
+
return nil unless attributes.is_a?(Hash)
|
291
|
+
self.class.swagger_types.each_pair do |key, type|
|
292
|
+
if type =~ /\AArray<(.*)>/i
|
293
|
+
# check to ensure the input is an array given that the the attribute
|
294
|
+
# is documented as an array but the input is not
|
295
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
296
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
297
|
+
end
|
298
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
299
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
300
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
301
|
+
end
|
302
|
+
|
303
|
+
self
|
304
|
+
end
|
305
|
+
|
306
|
+
# Deserializes the data based on type
|
307
|
+
# @param string type Data type
|
308
|
+
# @param string value Value to be deserialized
|
309
|
+
# @return [Object] Deserialized data
|
310
|
+
def _deserialize(type, value)
|
311
|
+
case type.to_sym
|
312
|
+
when :DateTime
|
313
|
+
DateTime.parse(value)
|
314
|
+
when :Date
|
315
|
+
Date.parse(value)
|
316
|
+
when :String
|
317
|
+
value.to_s
|
318
|
+
when :Integer
|
319
|
+
value.to_i
|
320
|
+
when :Float
|
321
|
+
value.to_f
|
322
|
+
when :BOOLEAN
|
323
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
324
|
+
true
|
325
|
+
else
|
326
|
+
false
|
327
|
+
end
|
328
|
+
when :Object
|
329
|
+
# generic object (usually a Hash), return directly
|
330
|
+
value
|
331
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
332
|
+
inner_type = Regexp.last_match[:inner_type]
|
333
|
+
value.map { |v| _deserialize(inner_type, v) }
|
334
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
335
|
+
k_type = Regexp.last_match[:k_type]
|
336
|
+
v_type = Regexp.last_match[:v_type]
|
337
|
+
{}.tap do |hash|
|
338
|
+
value.each do |k, v|
|
339
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
340
|
+
end
|
341
|
+
end
|
342
|
+
else # model
|
343
|
+
temp_model = Wire4Client.const_get(type).new
|
344
|
+
temp_model.build_from_hash(value)
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
# Returns the string representation of the object
|
349
|
+
# @return [String] String presentation of the object
|
350
|
+
def to_s
|
351
|
+
to_hash.to_s
|
352
|
+
end
|
353
|
+
|
354
|
+
# to_body is an alias to to_hash (backward compatibility)
|
355
|
+
# @return [Hash] Returns the object in the form of hash
|
356
|
+
def to_body
|
357
|
+
to_hash
|
358
|
+
end
|
359
|
+
|
360
|
+
# Returns the object in the form of hash
|
361
|
+
# @return [Hash] Returns the object in the form of hash
|
362
|
+
def to_hash
|
363
|
+
hash = {}
|
364
|
+
self.class.attribute_map.each_pair do |attr, param|
|
365
|
+
value = self.send(attr)
|
366
|
+
next if value.nil?
|
367
|
+
hash[param] = _to_hash(value)
|
368
|
+
end
|
369
|
+
hash
|
370
|
+
end
|
371
|
+
|
372
|
+
# Outputs non-array value in the form of hash
|
373
|
+
# For object, use to_hash. Otherwise, just return the value
|
374
|
+
# @param [Object] value Any valid value
|
375
|
+
# @return [Hash] Returns the value in the form of hash
|
376
|
+
def _to_hash(value)
|
377
|
+
if value.is_a?(Array)
|
378
|
+
value.compact.map { |v| _to_hash(v) }
|
379
|
+
elsif value.is_a?(Hash)
|
380
|
+
{}.tap do |hash|
|
381
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
382
|
+
end
|
383
|
+
elsif value.respond_to? :to_hash
|
384
|
+
value.to_hash
|
385
|
+
else
|
386
|
+
value
|
387
|
+
end
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
#Wire4RestAPI
|
3
|
+
|
4
|
+
#Referencia de la API de Wire4
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.10
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Wire4Client
|
16
|
+
# Objeto que contiene la información de las transferencias SPEI y SPID de salida.
|
17
|
+
class TransactionsRegister
|
18
|
+
# Es la dirección URL a la que se redirigirá en caso de que el usario cancele el registro.
|
19
|
+
attr_accessor :cancel_return_url
|
20
|
+
|
21
|
+
# Es la dirección URL a la que se redirigirá en caso de éxito.
|
22
|
+
attr_accessor :return_url
|
23
|
+
|
24
|
+
# Lista de transacciones SPEI
|
25
|
+
attr_accessor :spei
|
26
|
+
|
27
|
+
# Lista de transacciones SPID
|
28
|
+
attr_accessor :spid
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'cancel_return_url' => :'cancel_return_url',
|
34
|
+
:'return_url' => :'return_url',
|
35
|
+
:'spei' => :'spei',
|
36
|
+
:'spid' => :'spid'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'cancel_return_url' => :'String',
|
44
|
+
:'return_url' => :'String',
|
45
|
+
:'spei' => :'Array<TransactionSpeiSpid>',
|
46
|
+
:'spid' => :'Array<TransactionSpeiSpid>'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'cancel_return_url')
|
59
|
+
self.cancel_return_url = attributes[:'cancel_return_url']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'return_url')
|
63
|
+
self.return_url = attributes[:'return_url']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'spei')
|
67
|
+
if (value = attributes[:'spei']).is_a?(Array)
|
68
|
+
self.spei = value
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'spid')
|
73
|
+
if (value = attributes[:'spid']).is_a?(Array)
|
74
|
+
self.spid = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
if @cancel_return_url.nil?
|
84
|
+
invalid_properties.push('invalid value for "cancel_return_url", cancel_return_url cannot be nil.')
|
85
|
+
end
|
86
|
+
|
87
|
+
if @return_url.nil?
|
88
|
+
invalid_properties.push('invalid value for "return_url", return_url cannot be nil.')
|
89
|
+
end
|
90
|
+
|
91
|
+
invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
return false if @cancel_return_url.nil?
|
98
|
+
return false if @return_url.nil?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
cancel_return_url == o.cancel_return_url &&
|
108
|
+
return_url == o.return_url &&
|
109
|
+
spei == o.spei &&
|
110
|
+
spid == o.spid
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Fixnum] Hash code
|
121
|
+
def hash
|
122
|
+
[cancel_return_url, return_url, spei, spid].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def build_from_hash(attributes)
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
130
|
+
self.class.swagger_types.each_pair do |key, type|
|
131
|
+
if type =~ /\AArray<(.*)>/i
|
132
|
+
# check to ensure the input is an array given that the the attribute
|
133
|
+
# is documented as an array but the input is not
|
134
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
135
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
136
|
+
end
|
137
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
138
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
139
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
140
|
+
end
|
141
|
+
|
142
|
+
self
|
143
|
+
end
|
144
|
+
|
145
|
+
# Deserializes the data based on type
|
146
|
+
# @param string type Data type
|
147
|
+
# @param string value Value to be deserialized
|
148
|
+
# @return [Object] Deserialized data
|
149
|
+
def _deserialize(type, value)
|
150
|
+
case type.to_sym
|
151
|
+
when :DateTime
|
152
|
+
DateTime.parse(value)
|
153
|
+
when :Date
|
154
|
+
Date.parse(value)
|
155
|
+
when :String
|
156
|
+
value.to_s
|
157
|
+
when :Integer
|
158
|
+
value.to_i
|
159
|
+
when :Float
|
160
|
+
value.to_f
|
161
|
+
when :BOOLEAN
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
163
|
+
true
|
164
|
+
else
|
165
|
+
false
|
166
|
+
end
|
167
|
+
when :Object
|
168
|
+
# generic object (usually a Hash), return directly
|
169
|
+
value
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each do |k, v|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
else # model
|
182
|
+
temp_model = Wire4Client.const_get(type).new
|
183
|
+
temp_model.build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
next if value.nil?
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
data/lib/wire4_client/version.rb
CHANGED
data/lib/wire4_client.rb
CHANGED
@@ -32,6 +32,7 @@ require 'wire4_client/models/balance'
|
|
32
32
|
require 'wire4_client/models/balance_list_response'
|
33
33
|
require 'wire4_client/models/beneficiaries_query_register_status'
|
34
34
|
require 'wire4_client/models/beneficiaries_response'
|
35
|
+
require 'wire4_client/models/beneficiary_dto'
|
35
36
|
require 'wire4_client/models/beneficiary_institution'
|
36
37
|
require 'wire4_client/models/billing'
|
37
38
|
require 'wire4_client/models/billing_transaction'
|
@@ -46,9 +47,11 @@ require 'wire4_client/models/company_registered'
|
|
46
47
|
require 'wire4_client/models/company_requested'
|
47
48
|
require 'wire4_client/models/compay'
|
48
49
|
require 'wire4_client/models/configurations_limits'
|
50
|
+
require 'wire4_client/models/confirm_recurring_charge'
|
49
51
|
require 'wire4_client/models/contact_request'
|
50
52
|
require 'wire4_client/models/contract_detail_request'
|
51
53
|
require 'wire4_client/models/contract_detail_response'
|
54
|
+
require 'wire4_client/models/customer'
|
52
55
|
require 'wire4_client/models/deposit'
|
53
56
|
require 'wire4_client/models/deposit_authorization_request'
|
54
57
|
require 'wire4_client/models/depositant'
|
@@ -58,6 +61,7 @@ require 'wire4_client/models/depositants_response'
|
|
58
61
|
require 'wire4_client/models/deposits_authorization_response'
|
59
62
|
require 'wire4_client/models/detailed_error_response'
|
60
63
|
require 'wire4_client/models/error_response'
|
64
|
+
require 'wire4_client/models/failed_charges_data_dto'
|
61
65
|
require 'wire4_client/models/get_depositants'
|
62
66
|
require 'wire4_client/models/institution'
|
63
67
|
require 'wire4_client/models/institutions_list'
|
@@ -81,11 +85,18 @@ require 'wire4_client/models/pager_response_dto'
|
|
81
85
|
require 'wire4_client/models/payment'
|
82
86
|
require 'wire4_client/models/payment_codi'
|
83
87
|
require 'wire4_client/models/payment_request_codi_response_dto'
|
88
|
+
require 'wire4_client/models/payment_request_report_dto'
|
89
|
+
require 'wire4_client/models/payment_request_req'
|
90
|
+
require 'wire4_client/models/payment_request_response'
|
84
91
|
require 'wire4_client/models/payments_request_id'
|
92
|
+
require 'wire4_client/models/payments_spei_and_spid_order_id'
|
93
|
+
require 'wire4_client/models/payments_spei_and_spid_request_id'
|
85
94
|
require 'wire4_client/models/person'
|
86
95
|
require 'wire4_client/models/pre_enrollment_data'
|
87
96
|
require 'wire4_client/models/pre_enrollment_response'
|
88
97
|
require 'wire4_client/models/pre_monex_authorization'
|
98
|
+
require 'wire4_client/models/product'
|
99
|
+
require 'wire4_client/models/recurring_charge_request'
|
89
100
|
require 'wire4_client/models/relationship'
|
90
101
|
require 'wire4_client/models/relationships_response'
|
91
102
|
require 'wire4_client/models/sales_point'
|
@@ -98,11 +109,15 @@ require 'wire4_client/models/spid_beneficiary_response'
|
|
98
109
|
require 'wire4_client/models/spid_classification_dto'
|
99
110
|
require 'wire4_client/models/spid_classifications_response_dto'
|
100
111
|
require 'wire4_client/models/subscription_change_status_request'
|
112
|
+
require 'wire4_client/models/success_charges_data_dto'
|
113
|
+
require 'wire4_client/models/success_data_dto'
|
101
114
|
require 'wire4_client/models/token_required_response'
|
102
115
|
require 'wire4_client/models/transaction_error_code'
|
103
116
|
require 'wire4_client/models/transaction_outgoing'
|
104
117
|
require 'wire4_client/models/transaction_outgoing_spid'
|
118
|
+
require 'wire4_client/models/transaction_spei_spid'
|
105
119
|
require 'wire4_client/models/transactions_outgoing_register'
|
120
|
+
require 'wire4_client/models/transactions_register'
|
106
121
|
require 'wire4_client/models/update_configurations_request_dto'
|
107
122
|
require 'wire4_client/models/urls_redirect'
|
108
123
|
require 'wire4_client/models/use_service_banking'
|
@@ -116,6 +131,7 @@ require 'wire4_client/models/webhooks_list'
|
|
116
131
|
|
117
132
|
# APIs
|
118
133
|
require 'wire4_client/api/autorizacin_de_depsitos_api'
|
134
|
+
require 'wire4_client/api/cargos_recurrentes_api'
|
119
135
|
require 'wire4_client/api/comprobante_electrnico_de_pago_cep_api'
|
120
136
|
require 'wire4_client/api/contacto_api'
|
121
137
|
require 'wire4_client/api/contracts_details_api'
|
@@ -129,7 +145,9 @@ require 'wire4_client/api/lmites_de_montos_api'
|
|
129
145
|
require 'wire4_client/api/operaciones_co_di_api'
|
130
146
|
require 'wire4_client/api/peticiones_de_pago_por_co_di_api'
|
131
147
|
require 'wire4_client/api/puntos_de_venta_co_di_api'
|
148
|
+
require 'wire4_client/api/reporte_de_solicitudes_de_pagos_api'
|
132
149
|
require 'wire4_client/api/saldo_api'
|
150
|
+
require 'wire4_client/api/solicitud_de_pagos_api'
|
133
151
|
require 'wire4_client/api/suscripciones_api'
|
134
152
|
require 'wire4_client/api/transferencias_spei_api'
|
135
153
|
require 'wire4_client/api/transferencias_spid_api'
|