wire4_client 0.0.1.pre.SNAPSHOT

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 (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,289 @@
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
+ # Contiene información de las transacciones que se facturan
17
+ class BillingTransaction
18
+ # Monto de la transacción
19
+ attr_accessor :amount
20
+
21
+ # Clave de rastreo que se asignó a la transacción
22
+ attr_accessor :clave_rastreo
23
+
24
+ # Identificador de transaccion en banco monex
25
+ attr_accessor :monex_id
26
+
27
+ # Fecha y hora de la transacción
28
+ attr_accessor :operation_date
29
+
30
+ # Identificador de la orden
31
+ attr_accessor :order_id
32
+
33
+ # Identificador de la orden de pago
34
+ attr_accessor :payment_order_id
35
+
36
+ # Identificador de la transacción
37
+ attr_accessor :transaction_id
38
+
39
+ # Tipo de transaccion IN | OUT
40
+ attr_accessor :type
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'amount' => :'amount',
68
+ :'clave_rastreo' => :'clave_rastreo',
69
+ :'monex_id' => :'monex_id',
70
+ :'operation_date' => :'operation_date',
71
+ :'order_id' => :'order_id',
72
+ :'payment_order_id' => :'payment_order_id',
73
+ :'transaction_id' => :'transaction_id',
74
+ :'type' => :'type'
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.swagger_types
80
+ {
81
+ :'amount' => :'Float',
82
+ :'clave_rastreo' => :'String',
83
+ :'monex_id' => :'Integer',
84
+ :'operation_date' => :'Timestamp',
85
+ :'order_id' => :'String',
86
+ :'payment_order_id' => :'String',
87
+ :'transaction_id' => :'Integer',
88
+ :'type' => :'String'
89
+ }
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ return unless attributes.is_a?(Hash)
96
+
97
+ # convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
99
+
100
+ if attributes.has_key?(:'amount')
101
+ self.amount = attributes[:'amount']
102
+ end
103
+
104
+ if attributes.has_key?(:'clave_rastreo')
105
+ self.clave_rastreo = attributes[:'clave_rastreo']
106
+ end
107
+
108
+ if attributes.has_key?(:'monex_id')
109
+ self.monex_id = attributes[:'monex_id']
110
+ end
111
+
112
+ if attributes.has_key?(:'operation_date')
113
+ self.operation_date = attributes[:'operation_date']
114
+ end
115
+
116
+ if attributes.has_key?(:'order_id')
117
+ self.order_id = attributes[:'order_id']
118
+ end
119
+
120
+ if attributes.has_key?(:'payment_order_id')
121
+ self.payment_order_id = attributes[:'payment_order_id']
122
+ end
123
+
124
+ if attributes.has_key?(:'transaction_id')
125
+ self.transaction_id = attributes[:'transaction_id']
126
+ end
127
+
128
+ if attributes.has_key?(:'type')
129
+ self.type = attributes[:'type']
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ invalid_properties = Array.new
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ type_validator = EnumAttributeValidator.new('String', ['IN', 'OUT'])
144
+ return false unless type_validator.valid?(@type)
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] type Object to be assigned
150
+ def type=(type)
151
+ validator = EnumAttributeValidator.new('String', ['IN', 'OUT'])
152
+ unless validator.valid?(type)
153
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
154
+ end
155
+ @type = type
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ amount == o.amount &&
164
+ clave_rastreo == o.clave_rastreo &&
165
+ monex_id == o.monex_id &&
166
+ operation_date == o.operation_date &&
167
+ order_id == o.order_id &&
168
+ payment_order_id == o.payment_order_id &&
169
+ transaction_id == o.transaction_id &&
170
+ type == o.type
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Fixnum] Hash code
181
+ def hash
182
+ [amount, clave_rastreo, monex_id, operation_date, order_id, payment_order_id, transaction_id, type].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ self.class.swagger_types.each_pair do |key, type|
191
+ if type =~ /\AArray<(.*)>/i
192
+ # check to ensure the input is an array given that the the attribute
193
+ # is documented as an array but the input is not
194
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
195
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
196
+ end
197
+ elsif !attributes[self.class.attribute_map[key]].nil?
198
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
199
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
200
+ end
201
+
202
+ self
203
+ end
204
+
205
+ # Deserializes the data based on type
206
+ # @param string type Data type
207
+ # @param string value Value to be deserialized
208
+ # @return [Object] Deserialized data
209
+ def _deserialize(type, value)
210
+ case type.to_sym
211
+ when :DateTime
212
+ DateTime.parse(value)
213
+ when :Date
214
+ Date.parse(value)
215
+ when :String
216
+ value.to_s
217
+ when :Integer
218
+ value.to_i
219
+ when :Float
220
+ value.to_f
221
+ when :BOOLEAN
222
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
223
+ true
224
+ else
225
+ false
226
+ end
227
+ when :Object
228
+ # generic object (usually a Hash), return directly
229
+ value
230
+ when /\AArray<(?<inner_type>.+)>\z/
231
+ inner_type = Regexp.last_match[:inner_type]
232
+ value.map { |v| _deserialize(inner_type, v) }
233
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
234
+ k_type = Regexp.last_match[:k_type]
235
+ v_type = Regexp.last_match[:v_type]
236
+ {}.tap do |hash|
237
+ value.each do |k, v|
238
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
239
+ end
240
+ end
241
+ else # model
242
+ temp_model = Wire4Client.const_get(type).new
243
+ temp_model.build_from_hash(value)
244
+ end
245
+ end
246
+
247
+ # Returns the string representation of the object
248
+ # @return [String] String presentation of the object
249
+ def to_s
250
+ to_hash.to_s
251
+ end
252
+
253
+ # to_body is an alias to to_hash (backward compatibility)
254
+ # @return [Hash] Returns the object in the form of hash
255
+ def to_body
256
+ to_hash
257
+ end
258
+
259
+ # Returns the object in the form of hash
260
+ # @return [Hash] Returns the object in the form of hash
261
+ def to_hash
262
+ hash = {}
263
+ self.class.attribute_map.each_pair do |attr, param|
264
+ value = self.send(attr)
265
+ next if value.nil?
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ # Outputs non-array value in the form of hash
272
+ # For object, use to_hash. Otherwise, just return the value
273
+ # @param [Object] value Any valid value
274
+ # @return [Hash] Returns the value in the form of hash
275
+ def _to_hash(value)
276
+ if value.is_a?(Array)
277
+ value.compact.map { |v| _to_hash(v) }
278
+ elsif value.is_a?(Hash)
279
+ {}.tap do |hash|
280
+ value.each { |k, v| hash[k] = _to_hash(v) }
281
+ end
282
+ elsif value.respond_to? :to_hash
283
+ value.to_hash
284
+ else
285
+ value
286
+ end
287
+ end
288
+ end
289
+ end
@@ -0,0 +1,384 @@
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 CepResponse
17
+ # Cuenta del beneficiario
18
+ attr_accessor :account_beneficiary
19
+
20
+ # Cuenta del ordenante
21
+ attr_accessor :account_sender
22
+
23
+ # Monto de la transferencia
24
+ attr_accessor :amount
25
+
26
+ # Indica si o no el CEP se encuentra disponible
27
+ attr_accessor :available
28
+
29
+ # Clave del banco beneficiario
30
+ attr_accessor :beneficiary_bank_key
31
+
32
+ # Nombre del beneficiario
33
+ attr_accessor :beneficiary_name
34
+
35
+ # RFC del beneficiario
36
+ attr_accessor :beneficiary_rfc
37
+
38
+ # Cadena original del CEP
39
+ attr_accessor :cadena_original
40
+
41
+ # Fecha de captura de la transferencia
42
+ attr_accessor :capture_date
43
+
44
+ # Número de serie del certificado
45
+ attr_accessor :certificate_serial_number
46
+
47
+ # Clave de rastreo
48
+ attr_accessor :clave_rastreo
49
+
50
+ # Descripción de la transferencia
51
+ attr_accessor :description
52
+
53
+ # IVA de la transferencia
54
+ attr_accessor :iva
55
+
56
+ # Fecha de operación de la transferencia
57
+ attr_accessor :operation_date
58
+
59
+ # Fecha de abono registrada en el CEP
60
+ attr_accessor :operation_date_cep
61
+
62
+ # Referencia numérica de la transferencia
63
+ attr_accessor :reference
64
+
65
+ # Clave del banco emisor
66
+ attr_accessor :sender_bank_key
67
+
68
+ # Nombre del emisor
69
+ attr_accessor :sender_name
70
+
71
+ # RFC del emisor
72
+ attr_accessor :sender_rfc
73
+
74
+ # Firma del CEP
75
+ attr_accessor :signature
76
+
77
+ # La url al archivo zip del CEP, el cual contiene el xml y pdf
78
+ attr_accessor :url_zip
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'account_beneficiary' => :'account_beneficiary',
84
+ :'account_sender' => :'account_sender',
85
+ :'amount' => :'amount',
86
+ :'available' => :'available',
87
+ :'beneficiary_bank_key' => :'beneficiary_bank_key',
88
+ :'beneficiary_name' => :'beneficiary_name',
89
+ :'beneficiary_rfc' => :'beneficiary_rfc',
90
+ :'cadena_original' => :'cadena_original',
91
+ :'capture_date' => :'capture_date',
92
+ :'certificate_serial_number' => :'certificate_serial_number',
93
+ :'clave_rastreo' => :'clave_rastreo',
94
+ :'description' => :'description',
95
+ :'iva' => :'iva',
96
+ :'operation_date' => :'operation_date',
97
+ :'operation_date_cep' => :'operation_date_cep',
98
+ :'reference' => :'reference',
99
+ :'sender_bank_key' => :'sender_bank_key',
100
+ :'sender_name' => :'sender_name',
101
+ :'sender_rfc' => :'sender_rfc',
102
+ :'signature' => :'signature',
103
+ :'url_zip' => :'url_zip'
104
+ }
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.swagger_types
109
+ {
110
+ :'account_beneficiary' => :'String',
111
+ :'account_sender' => :'String',
112
+ :'amount' => :'Float',
113
+ :'available' => :'BOOLEAN',
114
+ :'beneficiary_bank_key' => :'String',
115
+ :'beneficiary_name' => :'String',
116
+ :'beneficiary_rfc' => :'String',
117
+ :'cadena_original' => :'String',
118
+ :'capture_date' => :'DateTime',
119
+ :'certificate_serial_number' => :'String',
120
+ :'clave_rastreo' => :'String',
121
+ :'description' => :'String',
122
+ :'iva' => :'Float',
123
+ :'operation_date' => :'DateTime',
124
+ :'operation_date_cep' => :'DateTime',
125
+ :'reference' => :'String',
126
+ :'sender_bank_key' => :'String',
127
+ :'sender_name' => :'String',
128
+ :'sender_rfc' => :'String',
129
+ :'signature' => :'String',
130
+ :'url_zip' => :'String'
131
+ }
132
+ end
133
+
134
+ # Initializes the object
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ def initialize(attributes = {})
137
+ return unless attributes.is_a?(Hash)
138
+
139
+ # convert string to symbol for hash key
140
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
141
+
142
+ if attributes.has_key?(:'account_beneficiary')
143
+ self.account_beneficiary = attributes[:'account_beneficiary']
144
+ end
145
+
146
+ if attributes.has_key?(:'account_sender')
147
+ self.account_sender = attributes[:'account_sender']
148
+ end
149
+
150
+ if attributes.has_key?(:'amount')
151
+ self.amount = attributes[:'amount']
152
+ end
153
+
154
+ if attributes.has_key?(:'available')
155
+ self.available = attributes[:'available']
156
+ end
157
+
158
+ if attributes.has_key?(:'beneficiary_bank_key')
159
+ self.beneficiary_bank_key = attributes[:'beneficiary_bank_key']
160
+ end
161
+
162
+ if attributes.has_key?(:'beneficiary_name')
163
+ self.beneficiary_name = attributes[:'beneficiary_name']
164
+ end
165
+
166
+ if attributes.has_key?(:'beneficiary_rfc')
167
+ self.beneficiary_rfc = attributes[:'beneficiary_rfc']
168
+ end
169
+
170
+ if attributes.has_key?(:'cadena_original')
171
+ self.cadena_original = attributes[:'cadena_original']
172
+ end
173
+
174
+ if attributes.has_key?(:'capture_date')
175
+ self.capture_date = attributes[:'capture_date']
176
+ end
177
+
178
+ if attributes.has_key?(:'certificate_serial_number')
179
+ self.certificate_serial_number = attributes[:'certificate_serial_number']
180
+ end
181
+
182
+ if attributes.has_key?(:'clave_rastreo')
183
+ self.clave_rastreo = attributes[:'clave_rastreo']
184
+ end
185
+
186
+ if attributes.has_key?(:'description')
187
+ self.description = attributes[:'description']
188
+ end
189
+
190
+ if attributes.has_key?(:'iva')
191
+ self.iva = attributes[:'iva']
192
+ end
193
+
194
+ if attributes.has_key?(:'operation_date')
195
+ self.operation_date = attributes[:'operation_date']
196
+ end
197
+
198
+ if attributes.has_key?(:'operation_date_cep')
199
+ self.operation_date_cep = attributes[:'operation_date_cep']
200
+ end
201
+
202
+ if attributes.has_key?(:'reference')
203
+ self.reference = attributes[:'reference']
204
+ end
205
+
206
+ if attributes.has_key?(:'sender_bank_key')
207
+ self.sender_bank_key = attributes[:'sender_bank_key']
208
+ end
209
+
210
+ if attributes.has_key?(:'sender_name')
211
+ self.sender_name = attributes[:'sender_name']
212
+ end
213
+
214
+ if attributes.has_key?(:'sender_rfc')
215
+ self.sender_rfc = attributes[:'sender_rfc']
216
+ end
217
+
218
+ if attributes.has_key?(:'signature')
219
+ self.signature = attributes[:'signature']
220
+ end
221
+
222
+ if attributes.has_key?(:'url_zip')
223
+ self.url_zip = attributes[:'url_zip']
224
+ end
225
+ end
226
+
227
+ # Show invalid properties with the reasons. Usually used together with valid?
228
+ # @return Array for valid properties with the reasons
229
+ def list_invalid_properties
230
+ invalid_properties = Array.new
231
+ invalid_properties
232
+ end
233
+
234
+ # Check to see if the all the properties in the model are valid
235
+ # @return true if the model is valid
236
+ def valid?
237
+ true
238
+ end
239
+
240
+ # Checks equality by comparing each attribute.
241
+ # @param [Object] Object to be compared
242
+ def ==(o)
243
+ return true if self.equal?(o)
244
+ self.class == o.class &&
245
+ account_beneficiary == o.account_beneficiary &&
246
+ account_sender == o.account_sender &&
247
+ amount == o.amount &&
248
+ available == o.available &&
249
+ beneficiary_bank_key == o.beneficiary_bank_key &&
250
+ beneficiary_name == o.beneficiary_name &&
251
+ beneficiary_rfc == o.beneficiary_rfc &&
252
+ cadena_original == o.cadena_original &&
253
+ capture_date == o.capture_date &&
254
+ certificate_serial_number == o.certificate_serial_number &&
255
+ clave_rastreo == o.clave_rastreo &&
256
+ description == o.description &&
257
+ iva == o.iva &&
258
+ operation_date == o.operation_date &&
259
+ operation_date_cep == o.operation_date_cep &&
260
+ reference == o.reference &&
261
+ sender_bank_key == o.sender_bank_key &&
262
+ sender_name == o.sender_name &&
263
+ sender_rfc == o.sender_rfc &&
264
+ signature == o.signature &&
265
+ url_zip == o.url_zip
266
+ end
267
+
268
+ # @see the `==` method
269
+ # @param [Object] Object to be compared
270
+ def eql?(o)
271
+ self == o
272
+ end
273
+
274
+ # Calculates hash code according to all attributes.
275
+ # @return [Fixnum] Hash code
276
+ 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
278
+ end
279
+
280
+ # Builds the object from hash
281
+ # @param [Hash] attributes Model attributes in the form of hash
282
+ # @return [Object] Returns the model itself
283
+ def build_from_hash(attributes)
284
+ return nil unless attributes.is_a?(Hash)
285
+ self.class.swagger_types.each_pair do |key, type|
286
+ if type =~ /\AArray<(.*)>/i
287
+ # check to ensure the input is an array given that the the attribute
288
+ # is documented as an array but the input is not
289
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
290
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
291
+ end
292
+ elsif !attributes[self.class.attribute_map[key]].nil?
293
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
294
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
295
+ end
296
+
297
+ self
298
+ end
299
+
300
+ # Deserializes the data based on type
301
+ # @param string type Data type
302
+ # @param string value Value to be deserialized
303
+ # @return [Object] Deserialized data
304
+ def _deserialize(type, value)
305
+ case type.to_sym
306
+ when :DateTime
307
+ DateTime.parse(value)
308
+ when :Date
309
+ Date.parse(value)
310
+ when :String
311
+ value.to_s
312
+ when :Integer
313
+ value.to_i
314
+ when :Float
315
+ value.to_f
316
+ when :BOOLEAN
317
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
318
+ true
319
+ else
320
+ false
321
+ end
322
+ when :Object
323
+ # generic object (usually a Hash), return directly
324
+ value
325
+ when /\AArray<(?<inner_type>.+)>\z/
326
+ inner_type = Regexp.last_match[:inner_type]
327
+ value.map { |v| _deserialize(inner_type, v) }
328
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
329
+ k_type = Regexp.last_match[:k_type]
330
+ v_type = Regexp.last_match[:v_type]
331
+ {}.tap do |hash|
332
+ value.each do |k, v|
333
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
334
+ end
335
+ end
336
+ else # model
337
+ temp_model = Wire4Client.const_get(type).new
338
+ temp_model.build_from_hash(value)
339
+ end
340
+ end
341
+
342
+ # Returns the string representation of the object
343
+ # @return [String] String presentation of the object
344
+ def to_s
345
+ to_hash.to_s
346
+ end
347
+
348
+ # to_body is an alias to to_hash (backward compatibility)
349
+ # @return [Hash] Returns the object in the form of hash
350
+ def to_body
351
+ to_hash
352
+ end
353
+
354
+ # Returns the object in the form of hash
355
+ # @return [Hash] Returns the object in the form of hash
356
+ def to_hash
357
+ hash = {}
358
+ self.class.attribute_map.each_pair do |attr, param|
359
+ value = self.send(attr)
360
+ next if value.nil?
361
+ hash[param] = _to_hash(value)
362
+ end
363
+ hash
364
+ end
365
+
366
+ # Outputs non-array value in the form of hash
367
+ # For object, use to_hash. Otherwise, just return the value
368
+ # @param [Object] value Any valid value
369
+ # @return [Hash] Returns the value in the form of hash
370
+ def _to_hash(value)
371
+ if value.is_a?(Array)
372
+ value.compact.map { |v| _to_hash(v) }
373
+ elsif value.is_a?(Hash)
374
+ {}.tap do |hash|
375
+ value.each { |k, v| hash[k] = _to_hash(v) }
376
+ end
377
+ elsif value.respond_to? :to_hash
378
+ value.to_hash
379
+ else
380
+ value
381
+ end
382
+ end
383
+ end
384
+ end