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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +27 -0
  4. data/docs/AccountReassigned.md +1 -1
  5. data/docs/AccountResponse.md +1 -0
  6. data/docs/BeneficiaryDTO.md +10 -0
  7. data/docs/CargosRecurrentesApi.md +110 -0
  8. data/docs/CepResponse.md +1 -0
  9. data/docs/CepSearchBanxico.md +1 -0
  10. data/docs/CertificateRequest.md +1 -1
  11. data/docs/CodiCodeQrResponseDTO.md +1 -0
  12. data/docs/CodiCodeRequestDTO.md +6 -3
  13. data/docs/ConfirmRecurringCharge.md +9 -0
  14. data/docs/CuentasDeBeneficiariosSPEIApi.md +4 -0
  15. data/docs/CuentasDeBeneficiariosSPIDApi.md +4 -0
  16. data/docs/Customer.md +9 -0
  17. data/docs/Deposit.md +1 -0
  18. data/docs/Depositant.md +1 -0
  19. data/docs/DepositantCountResponse.md +8 -0
  20. data/docs/DepositantesApi.md +164 -1
  21. data/docs/FailedChargesDataDTO.md +13 -0
  22. data/docs/MessageDepositReceived.md +3 -0
  23. data/docs/PaymentRequestReportDTO.md +17 -0
  24. data/docs/PaymentRequestReq.md +18 -0
  25. data/docs/PaymentRequestResponse.md +10 -0
  26. data/docs/PaymentsSpeiAndSpidOrderId.md +9 -0
  27. data/docs/PaymentsSpeiAndSpidRequestId.md +12 -0
  28. data/docs/Person.md +1 -1
  29. data/docs/Product.md +11 -0
  30. data/docs/RecurringChargeRequest.md +14 -0
  31. data/docs/ReporteDeSolicitudesDePagosApi.md +107 -0
  32. data/docs/SolicitudDePagosApi.md +59 -0
  33. data/docs/SpidBeneficiaryResponse.md +1 -0
  34. data/docs/SuccessChargesDataDTO.md +12 -0
  35. data/docs/SuccessDataDTO.md +9 -0
  36. data/docs/TransactionSpeiSpid.md +15 -0
  37. data/docs/TransactionsRegister.md +11 -0
  38. data/docs/TransferenciasSPEIApi.md +163 -0
  39. data/lib/wire4_client/api/cargos_recurrentes_api.rb +143 -0
  40. data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +6 -0
  41. data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +6 -0
  42. data/lib/wire4_client/api/depositantes_api.rb +207 -2
  43. data/lib/wire4_client/api/reporte_de_solicitudes_de_pagos_api.rb +134 -0
  44. data/lib/wire4_client/api/solicitud_de_pagos_api.rb +84 -0
  45. data/lib/wire4_client/api/transferencias_spei_api.rb +234 -4
  46. data/lib/wire4_client/models/account_reassigned.rb +11 -11
  47. data/lib/wire4_client/models/account_response.rb +11 -1
  48. data/lib/wire4_client/models/amount_request.rb +10 -10
  49. data/lib/wire4_client/models/beneficiary_dto.rb +201 -0
  50. data/lib/wire4_client/models/cep_response.rb +45 -1
  51. data/lib/wire4_client/models/cep_search_banxico.rb +48 -4
  52. data/lib/wire4_client/models/certificate_request.rb +6 -15
  53. data/lib/wire4_client/models/codi_code_qr_response_dto.rb +15 -5
  54. data/lib/wire4_client/models/codi_code_request_dto.rb +94 -20
  55. data/lib/wire4_client/models/codi_operations_filters_request_dto.rb +2 -2
  56. data/lib/wire4_client/models/confirm_recurring_charge.rb +194 -0
  57. data/lib/wire4_client/models/customer.rb +205 -0
  58. data/lib/wire4_client/models/deposit.rb +48 -4
  59. data/lib/wire4_client/models/depositant.rb +14 -4
  60. data/lib/wire4_client/models/depositant_count_response.rb +185 -0
  61. data/lib/wire4_client/models/failed_charges_data_dto.rb +228 -0
  62. data/lib/wire4_client/models/message_deposit_received.rb +31 -1
  63. data/lib/wire4_client/models/operations.rb +4 -4
  64. data/lib/wire4_client/models/payment_codi.rb +2 -2
  65. data/lib/wire4_client/models/payment_request_report_dto.rb +300 -0
  66. data/lib/wire4_client/models/payment_request_req.rb +401 -0
  67. data/lib/wire4_client/models/payment_request_response.rb +204 -0
  68. data/lib/wire4_client/models/payments_spei_and_spid_order_id.rb +199 -0
  69. data/lib/wire4_client/models/payments_spei_and_spid_request_id.rb +229 -0
  70. data/lib/wire4_client/models/person.rb +0 -5
  71. data/lib/wire4_client/models/product.rb +288 -0
  72. data/lib/wire4_client/models/recurring_charge_request.rb +278 -0
  73. data/lib/wire4_client/models/sales_point_request.rb +5 -5
  74. data/lib/wire4_client/models/spid_beneficiary_response.rb +11 -1
  75. data/lib/wire4_client/models/success_charges_data_dto.rb +219 -0
  76. data/lib/wire4_client/models/success_data_dto.rb +226 -0
  77. data/lib/wire4_client/models/transaction_outgoing.rb +5 -5
  78. data/lib/wire4_client/models/transaction_spei_spid.rb +390 -0
  79. data/lib/wire4_client/models/transactions_register.rb +229 -0
  80. data/lib/wire4_client/version.rb +1 -1
  81. data/lib/wire4_client.rb +19 -0
  82. data/spec/api/cargos_recurrentes_api_spec.rb +61 -0
  83. data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +2 -0
  84. data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +2 -0
  85. data/spec/api/depositantes_api_spec.rb +42 -1
  86. data/spec/api/reporte_de_solicitudes_de_pagos_api_spec.rb +59 -0
  87. data/spec/api/solicitud_de_pagos_api_spec.rb +48 -0
  88. data/spec/api/transferencias_spei_api_spec.rb +42 -0
  89. data/spec/models/account_reassigned_spec.rb +3 -3
  90. data/spec/models/account_response_spec.rb +6 -0
  91. data/spec/models/beneficiary_dto_spec.rb +53 -0
  92. data/spec/models/cep_response_spec.rb +10 -0
  93. data/spec/models/cep_search_banxico_spec.rb +10 -0
  94. data/spec/models/codi_code_qr_response_dto_spec.rb +8 -2
  95. data/spec/models/codi_code_request_dto_spec.rb +23 -1
  96. data/spec/models/codi_operations_filters_request_dto_spec.rb +1 -1
  97. data/spec/models/confirm_recurring_charge_spec.rb +47 -0
  98. data/spec/models/customer_spec.rb +47 -0
  99. data/spec/models/deposit_spec.rb +10 -0
  100. data/spec/models/depositant_count_response_spec.rb +41 -0
  101. data/spec/models/depositant_spec.rb +6 -0
  102. data/spec/models/failed_charges_data_dto_spec.rb +71 -0
  103. data/spec/models/message_deposit_received_spec.rb +18 -0
  104. data/spec/models/operations_spec.rb +2 -2
  105. data/spec/models/payment_codi_spec.rb +1 -1
  106. data/spec/models/payment_request_report_dto_spec.rb +99 -0
  107. data/spec/models/payment_request_req_spec.rb +109 -0
  108. data/spec/models/payment_request_response_spec.rb +53 -0
  109. data/spec/models/payments_spei_and_spid_order_id_spec.rb +47 -0
  110. data/spec/models/payments_spei_and_spid_request_id_spec.rb +65 -0
  111. data/spec/models/product_spec.rb +63 -0
  112. data/spec/models/recurring_charge_request_spec.rb +77 -0
  113. data/spec/models/spid_beneficiary_response_spec.rb +6 -0
  114. data/spec/models/success_charges_data_dto_spec.rb +65 -0
  115. data/spec/models/success_data_dto_spec.rb +51 -0
  116. data/spec/models/transaction_spei_spid_spec.rb +83 -0
  117. data/spec/models/transactions_register_spec.rb +59 -0
  118. data/wire4_client-1.1.3.gem +0 -0
  119. data/wire4_client.gemspec +7 -7
  120. metadata +108 -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
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.10
11
11
  =end
12
12
 
13
13
  module Wire4Client
14
- VERSION = '1.1.2'
14
+ VERSION = '1.1.4'
15
15
  end