wire4_client 0.0.1.pre.SNAPSHOT

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +69 -0
  4. data/README.md +188 -0
  5. data/Rakefile +8 -0
  6. data/docs/Account.md +18 -0
  7. data/docs/AccountRequest.md +10 -0
  8. data/docs/AccountResponse.md +18 -0
  9. data/docs/AccountSpid.md +19 -0
  10. data/docs/AmountRequest.md +10 -0
  11. data/docs/Balance.md +10 -0
  12. data/docs/BalanceListResponse.md +8 -0
  13. data/docs/BeneficiariesResponse.md +8 -0
  14. data/docs/BeneficiaryInstitution.md +8 -0
  15. data/docs/Billing.md +16 -0
  16. data/docs/BillingTransaction.md +15 -0
  17. data/docs/CepResponse.md +28 -0
  18. data/docs/CepSearchBanxico.md +15 -0
  19. data/docs/ComprobanteElectrnicoDePagoCEPApi.md +61 -0
  20. data/docs/ContactRequest.md +12 -0
  21. data/docs/ContactoApi.md +60 -0
  22. data/docs/CuentasDeBeneficiariosSPEIApi.md +342 -0
  23. data/docs/CuentasDeBeneficiariosSPIDApi.md +62 -0
  24. data/docs/Deposit.md +27 -0
  25. data/docs/Depositant.md +12 -0
  26. data/docs/DepositantesApi.md +117 -0
  27. data/docs/DepositantsRegister.md +11 -0
  28. data/docs/DepositantsResponse.md +8 -0
  29. data/docs/ErrorResponse.md +9 -0
  30. data/docs/FacturasApi.md +115 -0
  31. data/docs/GetDepositants.md +8 -0
  32. data/docs/InstitucionesApi.md +53 -0
  33. data/docs/Institution.md +11 -0
  34. data/docs/InstitutionsList.md +8 -0
  35. data/docs/MessageAccountBeneficiary.md +10 -0
  36. data/docs/MessageCEP.md +28 -0
  37. data/docs/MessageDepositReceived.md +27 -0
  38. data/docs/MessageInstitution.md +11 -0
  39. data/docs/MessagePayment.md +25 -0
  40. data/docs/MessageSubscription.md +12 -0
  41. data/docs/MessageWebHook.md +16 -0
  42. data/docs/Payment.md +24 -0
  43. data/docs/Person.md +10 -0
  44. data/docs/PreEnrollmentData.md +9 -0
  45. data/docs/PreEnrollmentResponse.md +9 -0
  46. data/docs/Relationship.md +9 -0
  47. data/docs/RelationshipsResponse.md +8 -0
  48. data/docs/SaldoApi.md +61 -0
  49. data/docs/SpidClassificationDTO.md +9 -0
  50. data/docs/SpidClassificationsResponseDTO.md +8 -0
  51. data/docs/SuscripcionesApi.md +165 -0
  52. data/docs/Timestamp.md +17 -0
  53. data/docs/TokenRequiredResponse.md +9 -0
  54. data/docs/TransactionOutgoing.md +14 -0
  55. data/docs/TransactionOutgoingSpid.md +17 -0
  56. data/docs/TransactionsOutgoingRegister.md +10 -0
  57. data/docs/TransferenciasSPEIApi.md +229 -0
  58. data/docs/TransferenciasSPIDApi.md +117 -0
  59. data/docs/WebhookRequest.md +10 -0
  60. data/docs/WebhookResponse.md +13 -0
  61. data/docs/WebhooksApi.md +161 -0
  62. data/docs/WebhooksList.md +8 -0
  63. data/git_push.sh +55 -0
  64. data/lib/wire4_client.rb +96 -0
  65. data/lib/wire4_client/api/comprobante_electrnico_de_pago_cep_api.rb +77 -0
  66. data/lib/wire4_client/api/contacto_api.rb +76 -0
  67. data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +453 -0
  68. data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +93 -0
  69. data/lib/wire4_client/api/depositantes_api.rb +159 -0
  70. data/lib/wire4_client/api/facturas_api.rb +124 -0
  71. data/lib/wire4_client/api/instituciones_api.rb +67 -0
  72. data/lib/wire4_client/api/saldo_api.rb +87 -0
  73. data/lib/wire4_client/api/suscripciones_api.rb +203 -0
  74. data/lib/wire4_client/api/transferencias_spei_api.rb +307 -0
  75. data/lib/wire4_client/api/transferencias_spid_api.rb +155 -0
  76. data/lib/wire4_client/api/webhooks_api.rb +175 -0
  77. data/lib/wire4_client/api_client.rb +389 -0
  78. data/lib/wire4_client/api_error.rb +38 -0
  79. data/lib/wire4_client/configuration.rb +223 -0
  80. data/lib/wire4_client/models/account.rb +345 -0
  81. data/lib/wire4_client/models/account_request.rb +217 -0
  82. data/lib/wire4_client/models/account_response.rb +345 -0
  83. data/lib/wire4_client/models/account_spid.rb +388 -0
  84. data/lib/wire4_client/models/amount_request.rb +258 -0
  85. data/lib/wire4_client/models/balance.rb +205 -0
  86. data/lib/wire4_client/models/balance_list_response.rb +187 -0
  87. data/lib/wire4_client/models/beneficiaries_response.rb +186 -0
  88. data/lib/wire4_client/models/beneficiary_institution.rb +185 -0
  89. data/lib/wire4_client/models/billing.rb +300 -0
  90. data/lib/wire4_client/models/billing_transaction.rb +289 -0
  91. data/lib/wire4_client/models/cep_response.rb +384 -0
  92. data/lib/wire4_client/models/cep_search_banxico.rb +373 -0
  93. data/lib/wire4_client/models/contact_request.rb +272 -0
  94. data/lib/wire4_client/models/deposit.rb +374 -0
  95. data/lib/wire4_client/models/depositant.rb +227 -0
  96. data/lib/wire4_client/models/depositants_register.rb +315 -0
  97. data/lib/wire4_client/models/depositants_response.rb +184 -0
  98. data/lib/wire4_client/models/error_response.rb +192 -0
  99. data/lib/wire4_client/models/get_depositants.rb +192 -0
  100. data/lib/wire4_client/models/institution.rb +215 -0
  101. data/lib/wire4_client/models/institutions_list.rb +186 -0
  102. data/lib/wire4_client/models/message_account_beneficiary.rb +205 -0
  103. data/lib/wire4_client/models/message_cep.rb +385 -0
  104. data/lib/wire4_client/models/message_deposit_received.rb +375 -0
  105. data/lib/wire4_client/models/message_institution.rb +215 -0
  106. data/lib/wire4_client/models/message_payment.rb +354 -0
  107. data/lib/wire4_client/models/message_subscription.rb +225 -0
  108. data/lib/wire4_client/models/message_web_hook.rb +265 -0
  109. data/lib/wire4_client/models/payment.rb +344 -0
  110. data/lib/wire4_client/models/person.rb +220 -0
  111. data/lib/wire4_client/models/pre_enrollment_data.rb +260 -0
  112. data/lib/wire4_client/models/pre_enrollment_response.rb +194 -0
  113. data/lib/wire4_client/models/relationship.rb +194 -0
  114. data/lib/wire4_client/models/relationships_response.rb +186 -0
  115. data/lib/wire4_client/models/spid_classification_dto.rb +195 -0
  116. data/lib/wire4_client/models/spid_classifications_response_dto.rb +186 -0
  117. data/lib/wire4_client/models/timestamp.rb +264 -0
  118. data/lib/wire4_client/models/token_required_response.rb +195 -0
  119. data/lib/wire4_client/models/transaction_outgoing.rb +380 -0
  120. data/lib/wire4_client/models/transaction_outgoing_spid.rb +425 -0
  121. data/lib/wire4_client/models/transactions_outgoing_register.rb +222 -0
  122. data/lib/wire4_client/models/webhook_request.rb +222 -0
  123. data/lib/wire4_client/models/webhook_response.rb +271 -0
  124. data/lib/wire4_client/models/webhooks_list.rb +186 -0
  125. data/lib/wire4_client/version.rb +15 -0
  126. data/spec/api/comprobante_electrnico_de_pago_cep_api_spec.rb +47 -0
  127. data/spec/api/contacto_api_spec.rb +47 -0
  128. data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +113 -0
  129. data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +47 -0
  130. data/spec/api/depositantes_api_spec.rb +60 -0
  131. data/spec/api/facturas_api_spec.rb +59 -0
  132. data/spec/api/instituciones_api_spec.rb +45 -0
  133. data/spec/api/saldo_api_spec.rb +47 -0
  134. data/spec/api/suscripciones_api_spec.rb +71 -0
  135. data/spec/api/transferencias_spei_api_spec.rb +86 -0
  136. data/spec/api/transferencias_spid_api_spec.rb +60 -0
  137. data/spec/api/webhooks_api_spec.rb +70 -0
  138. data/spec/api_client_spec.rb +226 -0
  139. data/spec/configuration_spec.rb +42 -0
  140. data/spec/models/account_request_spec.rb +53 -0
  141. data/spec/models/account_response_spec.rb +101 -0
  142. data/spec/models/account_spec.rb +101 -0
  143. data/spec/models/account_spid_spec.rb +107 -0
  144. data/spec/models/amount_request_spec.rb +53 -0
  145. data/spec/models/balance_list_response_spec.rb +41 -0
  146. data/spec/models/balance_spec.rb +53 -0
  147. data/spec/models/beneficiaries_response_spec.rb +41 -0
  148. data/spec/models/beneficiary_institution_spec.rb +41 -0
  149. data/spec/models/billing_spec.rb +93 -0
  150. data/spec/models/billing_transaction_spec.rb +87 -0
  151. data/spec/models/cep_response_spec.rb +161 -0
  152. data/spec/models/cep_search_banxico_spec.rb +83 -0
  153. data/spec/models/contact_request_spec.rb +65 -0
  154. data/spec/models/deposit_spec.rb +155 -0
  155. data/spec/models/depositant_spec.rb +65 -0
  156. data/spec/models/depositants_register_spec.rb +59 -0
  157. data/spec/models/depositants_response_spec.rb +41 -0
  158. data/spec/models/error_response_spec.rb +47 -0
  159. data/spec/models/get_depositants_spec.rb +41 -0
  160. data/spec/models/institution_spec.rb +59 -0
  161. data/spec/models/institutions_list_spec.rb +41 -0
  162. data/spec/models/message_account_beneficiary_spec.rb +53 -0
  163. data/spec/models/message_cep_spec.rb +161 -0
  164. data/spec/models/message_deposit_received_spec.rb +155 -0
  165. data/spec/models/message_institution_spec.rb +59 -0
  166. data/spec/models/message_payment_spec.rb +143 -0
  167. data/spec/models/message_subscription_spec.rb +65 -0
  168. data/spec/models/message_web_hook_spec.rb +89 -0
  169. data/spec/models/payment_spec.rb +137 -0
  170. data/spec/models/person_spec.rb +53 -0
  171. data/spec/models/pre_enrollment_data_spec.rb +47 -0
  172. data/spec/models/pre_enrollment_response_spec.rb +47 -0
  173. data/spec/models/relationship_spec.rb +47 -0
  174. data/spec/models/relationships_response_spec.rb +41 -0
  175. data/spec/models/spid_classification_dto_spec.rb +47 -0
  176. data/spec/models/spid_classifications_response_dto_spec.rb +41 -0
  177. data/spec/models/timestamp_spec.rb +95 -0
  178. data/spec/models/token_required_response_spec.rb +47 -0
  179. data/spec/models/transaction_outgoing_spec.rb +77 -0
  180. data/spec/models/transaction_outgoing_spid_spec.rb +95 -0
  181. data/spec/models/transactions_outgoing_register_spec.rb +53 -0
  182. data/spec/models/webhook_request_spec.rb +53 -0
  183. data/spec/models/webhook_response_spec.rb +75 -0
  184. data/spec/models/webhooks_list_spec.rb +41 -0
  185. data/spec/spec_helper.rb +111 -0
  186. data/wire4_client.gemspec +45 -0
  187. metadata +468 -0
@@ -0,0 +1,265 @@
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
+ # El objeto que se envía mediante un mensaje WebHook
17
+ class MessageWebHook
18
+ # La versión de la API
19
+ attr_accessor :api_version
20
+
21
+ # Fecha de creación del mensaje
22
+ attr_accessor :created
23
+
24
+ # Objeto que contiene la información del evento
25
+ attr_accessor :data
26
+
27
+ # El identificador del mensaje
28
+ attr_accessor :id
29
+
30
+ # Indica si proviene de un entorno productivo
31
+ attr_accessor :livemode
32
+
33
+ # Tipo de objeto que contiene el mensaje en el atributo data los posibles valores son: subscription, beneficiary, spei_outgoing, spei_incoming, spid_outgoing
34
+ attr_accessor :object
35
+
36
+ # Número de mensajes pendientes de enviar
37
+ attr_accessor :pending_webhooks
38
+
39
+ # Identificador del recurso relacionado
40
+ attr_accessor :request
41
+
42
+ # El tipo evento que se esta enviando en la notifiación
43
+ attr_accessor :type
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'api_version' => :'api_version',
49
+ :'created' => :'created',
50
+ :'data' => :'data',
51
+ :'id' => :'id',
52
+ :'livemode' => :'livemode',
53
+ :'object' => :'object',
54
+ :'pending_webhooks' => :'pending_webhooks',
55
+ :'request' => :'request',
56
+ :'type' => :'type'
57
+ }
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.swagger_types
62
+ {
63
+ :'api_version' => :'String',
64
+ :'created' => :'DateTime',
65
+ :'data' => :'Object',
66
+ :'id' => :'String',
67
+ :'livemode' => :'BOOLEAN',
68
+ :'object' => :'String',
69
+ :'pending_webhooks' => :'Integer',
70
+ :'request' => :'String',
71
+ :'type' => :'String'
72
+ }
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ return unless attributes.is_a?(Hash)
79
+
80
+ # convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
82
+
83
+ if attributes.has_key?(:'api_version')
84
+ self.api_version = attributes[:'api_version']
85
+ end
86
+
87
+ if attributes.has_key?(:'created')
88
+ self.created = attributes[:'created']
89
+ end
90
+
91
+ if attributes.has_key?(:'data')
92
+ self.data = attributes[:'data']
93
+ end
94
+
95
+ if attributes.has_key?(:'id')
96
+ self.id = attributes[:'id']
97
+ end
98
+
99
+ if attributes.has_key?(:'livemode')
100
+ self.livemode = attributes[:'livemode']
101
+ end
102
+
103
+ if attributes.has_key?(:'object')
104
+ self.object = attributes[:'object']
105
+ end
106
+
107
+ if attributes.has_key?(:'pending_webhooks')
108
+ self.pending_webhooks = attributes[:'pending_webhooks']
109
+ end
110
+
111
+ if attributes.has_key?(:'request')
112
+ self.request = attributes[:'request']
113
+ end
114
+
115
+ if attributes.has_key?(:'type')
116
+ self.type = attributes[:'type']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ api_version == o.api_version &&
139
+ created == o.created &&
140
+ data == o.data &&
141
+ id == o.id &&
142
+ livemode == o.livemode &&
143
+ object == o.object &&
144
+ pending_webhooks == o.pending_webhooks &&
145
+ request == o.request &&
146
+ type == o.type
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Fixnum] Hash code
157
+ def hash
158
+ [api_version, created, data, id, livemode, object, pending_webhooks, request, type].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ self.class.swagger_types.each_pair do |key, type|
167
+ if type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
171
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
172
+ end
173
+ elsif !attributes[self.class.attribute_map[key]].nil?
174
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
175
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
176
+ end
177
+
178
+ self
179
+ end
180
+
181
+ # Deserializes the data based on type
182
+ # @param string type Data type
183
+ # @param string value Value to be deserialized
184
+ # @return [Object] Deserialized data
185
+ def _deserialize(type, value)
186
+ case type.to_sym
187
+ when :DateTime
188
+ DateTime.parse(value)
189
+ when :Date
190
+ Date.parse(value)
191
+ when :String
192
+ value.to_s
193
+ when :Integer
194
+ value.to_i
195
+ when :Float
196
+ value.to_f
197
+ when :BOOLEAN
198
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
199
+ true
200
+ else
201
+ false
202
+ end
203
+ when :Object
204
+ # generic object (usually a Hash), return directly
205
+ value
206
+ when /\AArray<(?<inner_type>.+)>\z/
207
+ inner_type = Regexp.last_match[:inner_type]
208
+ value.map { |v| _deserialize(inner_type, v) }
209
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
210
+ k_type = Regexp.last_match[:k_type]
211
+ v_type = Regexp.last_match[:v_type]
212
+ {}.tap do |hash|
213
+ value.each do |k, v|
214
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
215
+ end
216
+ end
217
+ else # model
218
+ temp_model = Wire4Client.const_get(type).new
219
+ temp_model.build_from_hash(value)
220
+ end
221
+ end
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # to_body is an alias to to_hash (backward compatibility)
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_body
232
+ to_hash
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ self.class.attribute_map.each_pair do |attr, param|
240
+ value = self.send(attr)
241
+ next if value.nil?
242
+ hash[param] = _to_hash(value)
243
+ end
244
+ hash
245
+ end
246
+
247
+ # Outputs non-array value in the form of hash
248
+ # For object, use to_hash. Otherwise, just return the value
249
+ # @param [Object] value Any valid value
250
+ # @return [Hash] Returns the value in the form of hash
251
+ def _to_hash(value)
252
+ if value.is_a?(Array)
253
+ value.compact.map { |v| _to_hash(v) }
254
+ elsif value.is_a?(Hash)
255
+ {}.tap do |hash|
256
+ value.each { |k, v| hash[k] = _to_hash(v) }
257
+ end
258
+ elsif value.respond_to? :to_hash
259
+ value.to_hash
260
+ else
261
+ value
262
+ end
263
+ end
264
+ end
265
+ end
@@ -0,0 +1,344 @@
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
+ class Payment
17
+ # Cuenta emisora
18
+ attr_accessor :account
19
+
20
+ # Monto de la transferencia
21
+ attr_accessor :amount
22
+
23
+ # Cuenta del beneficiario
24
+ attr_accessor :beneficiary_account
25
+
26
+ # Información del banco beneficiario
27
+ attr_accessor :beneficiary_bank
28
+
29
+ # Nombre del Beneficiario
30
+ attr_accessor :beneficiary_name
31
+
32
+ # CEP emitido por Banxico de la transferencia, sólo en caso de que este disponible en banxico, posteriomente podrá usar la consulta de CEP del API
33
+ attr_accessor :cep
34
+
35
+ # Clave de rastreo de la transferencia
36
+ attr_accessor :clave_rastreo
37
+
38
+ # Concepto de pago
39
+ attr_accessor :concept
40
+
41
+ # Fecha de aplicación de la transferencia
42
+ attr_accessor :confirm_date
43
+
44
+ # Código de moneda de la transferencia
45
+ attr_accessor :currency_code
46
+
47
+ # Mensaje proporcionado por Monex para la transferencia
48
+ attr_accessor :detention_message
49
+
50
+ # Descripción
51
+ attr_accessor :monex_description
52
+
53
+ # Identificador asignado por la aplciación a la transferencia
54
+ attr_accessor :order_id
55
+
56
+ # Identificador de la orden de pago en Monex
57
+ attr_accessor :payment_order_id
58
+
59
+ # Referencia numérica
60
+ attr_accessor :reference
61
+
62
+ # Estado de la transferencia de la transferencia, los posibles valores son: PENDING, COMPLETED, FAILED, CANCELLED
63
+ attr_accessor :status_code
64
+
65
+ # Identificador de la transferencia asignado por Monex
66
+ attr_accessor :transaction_id
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'account' => :'account',
72
+ :'amount' => :'amount',
73
+ :'beneficiary_account' => :'beneficiary_account',
74
+ :'beneficiary_bank' => :'beneficiary_bank',
75
+ :'beneficiary_name' => :'beneficiary_name',
76
+ :'cep' => :'cep',
77
+ :'clave_rastreo' => :'clave_rastreo',
78
+ :'concept' => :'concept',
79
+ :'confirm_date' => :'confirm_date',
80
+ :'currency_code' => :'currency_code',
81
+ :'detention_message' => :'detention_message',
82
+ :'monex_description' => :'monex_description',
83
+ :'order_id' => :'order_id',
84
+ :'payment_order_id' => :'payment_order_id',
85
+ :'reference' => :'reference',
86
+ :'status_code' => :'status_code',
87
+ :'transaction_id' => :'transaction_id'
88
+ }
89
+ end
90
+
91
+ # Attribute type mapping.
92
+ def self.swagger_types
93
+ {
94
+ :'account' => :'String',
95
+ :'amount' => :'Float',
96
+ :'beneficiary_account' => :'String',
97
+ :'beneficiary_bank' => :'MessageInstitution',
98
+ :'beneficiary_name' => :'String',
99
+ :'cep' => :'MessageCEP',
100
+ :'clave_rastreo' => :'String',
101
+ :'concept' => :'String',
102
+ :'confirm_date' => :'DateTime',
103
+ :'currency_code' => :'String',
104
+ :'detention_message' => :'String',
105
+ :'monex_description' => :'String',
106
+ :'order_id' => :'String',
107
+ :'payment_order_id' => :'Integer',
108
+ :'reference' => :'Integer',
109
+ :'status_code' => :'String',
110
+ :'transaction_id' => :'Integer'
111
+ }
112
+ end
113
+
114
+ # Initializes the object
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ def initialize(attributes = {})
117
+ return unless attributes.is_a?(Hash)
118
+
119
+ # convert string to symbol for hash key
120
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
121
+
122
+ if attributes.has_key?(:'account')
123
+ self.account = attributes[:'account']
124
+ end
125
+
126
+ if attributes.has_key?(:'amount')
127
+ self.amount = attributes[:'amount']
128
+ end
129
+
130
+ if attributes.has_key?(:'beneficiary_account')
131
+ self.beneficiary_account = attributes[:'beneficiary_account']
132
+ end
133
+
134
+ if attributes.has_key?(:'beneficiary_bank')
135
+ self.beneficiary_bank = attributes[:'beneficiary_bank']
136
+ end
137
+
138
+ if attributes.has_key?(:'beneficiary_name')
139
+ self.beneficiary_name = attributes[:'beneficiary_name']
140
+ end
141
+
142
+ if attributes.has_key?(:'cep')
143
+ self.cep = attributes[:'cep']
144
+ end
145
+
146
+ if attributes.has_key?(:'clave_rastreo')
147
+ self.clave_rastreo = attributes[:'clave_rastreo']
148
+ end
149
+
150
+ if attributes.has_key?(:'concept')
151
+ self.concept = attributes[:'concept']
152
+ end
153
+
154
+ if attributes.has_key?(:'confirm_date')
155
+ self.confirm_date = attributes[:'confirm_date']
156
+ end
157
+
158
+ if attributes.has_key?(:'currency_code')
159
+ self.currency_code = attributes[:'currency_code']
160
+ end
161
+
162
+ if attributes.has_key?(:'detention_message')
163
+ self.detention_message = attributes[:'detention_message']
164
+ end
165
+
166
+ if attributes.has_key?(:'monex_description')
167
+ self.monex_description = attributes[:'monex_description']
168
+ end
169
+
170
+ if attributes.has_key?(:'order_id')
171
+ self.order_id = attributes[:'order_id']
172
+ end
173
+
174
+ if attributes.has_key?(:'payment_order_id')
175
+ self.payment_order_id = attributes[:'payment_order_id']
176
+ end
177
+
178
+ if attributes.has_key?(:'reference')
179
+ self.reference = attributes[:'reference']
180
+ end
181
+
182
+ if attributes.has_key?(:'status_code')
183
+ self.status_code = attributes[:'status_code']
184
+ end
185
+
186
+ if attributes.has_key?(:'transaction_id')
187
+ self.transaction_id = attributes[:'transaction_id']
188
+ end
189
+ end
190
+
191
+ # Show invalid properties with the reasons. Usually used together with valid?
192
+ # @return Array for valid properties with the reasons
193
+ def list_invalid_properties
194
+ invalid_properties = Array.new
195
+ invalid_properties
196
+ end
197
+
198
+ # Check to see if the all the properties in the model are valid
199
+ # @return true if the model is valid
200
+ def valid?
201
+ true
202
+ end
203
+
204
+ # Checks equality by comparing each attribute.
205
+ # @param [Object] Object to be compared
206
+ def ==(o)
207
+ return true if self.equal?(o)
208
+ self.class == o.class &&
209
+ account == o.account &&
210
+ amount == o.amount &&
211
+ beneficiary_account == o.beneficiary_account &&
212
+ beneficiary_bank == o.beneficiary_bank &&
213
+ beneficiary_name == o.beneficiary_name &&
214
+ cep == o.cep &&
215
+ clave_rastreo == o.clave_rastreo &&
216
+ concept == o.concept &&
217
+ confirm_date == o.confirm_date &&
218
+ currency_code == o.currency_code &&
219
+ detention_message == o.detention_message &&
220
+ monex_description == o.monex_description &&
221
+ order_id == o.order_id &&
222
+ payment_order_id == o.payment_order_id &&
223
+ reference == o.reference &&
224
+ status_code == o.status_code &&
225
+ transaction_id == o.transaction_id
226
+ end
227
+
228
+ # @see the `==` method
229
+ # @param [Object] Object to be compared
230
+ def eql?(o)
231
+ self == o
232
+ end
233
+
234
+ # Calculates hash code according to all attributes.
235
+ # @return [Fixnum] Hash code
236
+ def hash
237
+ [account, amount, beneficiary_account, beneficiary_bank, beneficiary_name, cep, clave_rastreo, concept, confirm_date, currency_code, detention_message, monex_description, order_id, payment_order_id, reference, status_code, transaction_id].hash
238
+ end
239
+
240
+ # Builds the object from hash
241
+ # @param [Hash] attributes Model attributes in the form of hash
242
+ # @return [Object] Returns the model itself
243
+ def build_from_hash(attributes)
244
+ return nil unless attributes.is_a?(Hash)
245
+ self.class.swagger_types.each_pair do |key, type|
246
+ if type =~ /\AArray<(.*)>/i
247
+ # check to ensure the input is an array given that the the attribute
248
+ # is documented as an array but the input is not
249
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
250
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
251
+ end
252
+ elsif !attributes[self.class.attribute_map[key]].nil?
253
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
254
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
255
+ end
256
+
257
+ self
258
+ end
259
+
260
+ # Deserializes the data based on type
261
+ # @param string type Data type
262
+ # @param string value Value to be deserialized
263
+ # @return [Object] Deserialized data
264
+ def _deserialize(type, value)
265
+ case type.to_sym
266
+ when :DateTime
267
+ DateTime.parse(value)
268
+ when :Date
269
+ Date.parse(value)
270
+ when :String
271
+ value.to_s
272
+ when :Integer
273
+ value.to_i
274
+ when :Float
275
+ value.to_f
276
+ when :BOOLEAN
277
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
278
+ true
279
+ else
280
+ false
281
+ end
282
+ when :Object
283
+ # generic object (usually a Hash), return directly
284
+ value
285
+ when /\AArray<(?<inner_type>.+)>\z/
286
+ inner_type = Regexp.last_match[:inner_type]
287
+ value.map { |v| _deserialize(inner_type, v) }
288
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
289
+ k_type = Regexp.last_match[:k_type]
290
+ v_type = Regexp.last_match[:v_type]
291
+ {}.tap do |hash|
292
+ value.each do |k, v|
293
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
294
+ end
295
+ end
296
+ else # model
297
+ temp_model = Wire4Client.const_get(type).new
298
+ temp_model.build_from_hash(value)
299
+ end
300
+ end
301
+
302
+ # Returns the string representation of the object
303
+ # @return [String] String presentation of the object
304
+ def to_s
305
+ to_hash.to_s
306
+ end
307
+
308
+ # to_body is an alias to to_hash (backward compatibility)
309
+ # @return [Hash] Returns the object in the form of hash
310
+ def to_body
311
+ to_hash
312
+ end
313
+
314
+ # Returns the object in the form of hash
315
+ # @return [Hash] Returns the object in the form of hash
316
+ def to_hash
317
+ hash = {}
318
+ self.class.attribute_map.each_pair do |attr, param|
319
+ value = self.send(attr)
320
+ next if value.nil?
321
+ hash[param] = _to_hash(value)
322
+ end
323
+ hash
324
+ end
325
+
326
+ # Outputs non-array value in the form of hash
327
+ # For object, use to_hash. Otherwise, just return the value
328
+ # @param [Object] value Any valid value
329
+ # @return [Hash] Returns the value in the form of hash
330
+ def _to_hash(value)
331
+ if value.is_a?(Array)
332
+ value.compact.map { |v| _to_hash(v) }
333
+ elsif value.is_a?(Hash)
334
+ {}.tap do |hash|
335
+ value.each { |k, v| hash[k] = _to_hash(v) }
336
+ end
337
+ elsif value.respond_to? :to_hash
338
+ value.to_hash
339
+ else
340
+ value
341
+ end
342
+ end
343
+ end
344
+ end