wire4_client 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +50 -7
  3. data/docs/Account.md +3 -3
  4. data/docs/AccountDetail.md +13 -0
  5. data/docs/AccountReassigned.md +21 -0
  6. data/docs/AccountResponse.md +4 -3
  7. data/docs/AddressCompany.md +17 -0
  8. data/docs/AmountRequest.md +2 -0
  9. data/docs/AuthorizationTransactionGroup.md +9 -0
  10. data/docs/AuthorizedBeneficiariesResponse.md +10 -0
  11. data/docs/AuthorizedUsers.md +13 -0
  12. data/docs/CertificateRequest.md +11 -0
  13. data/docs/CodiCodeQrResponseDTO.md +17 -0
  14. data/docs/CodiCodeRequestDTO.md +14 -0
  15. data/docs/CodiOperationResponseDTO.md +14 -0
  16. data/docs/CodiOperationsFiltersRequestDTO.md +15 -0
  17. data/docs/CompanyRegistered.md +13 -0
  18. data/docs/CompanyRequested.md +11 -0
  19. data/docs/Compay.md +11 -0
  20. data/docs/ContractDetailRequest.md +11 -0
  21. data/docs/ContractDetailResponse.md +9 -0
  22. data/docs/ContractsDetailsApi.md +167 -0
  23. data/docs/CuentasDeBeneficiariosSPEIApi.md +69 -4
  24. data/docs/CuentasDeBeneficiariosSPIDApi.md +11 -1
  25. data/docs/EmpresasCoDiApi.md +107 -0
  26. data/docs/MessageAccountBeneficiary.md +2 -2
  27. data/docs/MessageCEP.md +9 -9
  28. data/docs/MessageCodiAction.md +19 -0
  29. data/docs/MessagePayment.md +3 -1
  30. data/docs/MessagePaymentStatePending.md +23 -0
  31. data/docs/MessageRequestChanged.md +2 -2
  32. data/docs/MessageSalesPoint.md +10 -0
  33. data/docs/MessageSubscription.md +6 -6
  34. data/docs/MessageUserAuthorized.md +13 -0
  35. data/docs/MessageWebHook.md +2 -2
  36. data/docs/OperacionesCoDiApi.md +68 -0
  37. data/docs/Operations.md +17 -0
  38. data/docs/PagerResponseDto.md +13 -0
  39. data/docs/Payment.md +3 -1
  40. data/docs/PaymentRequestCodiResponseDTO.md +18 -0
  41. data/docs/PeticionesDePagoPorCoDiApi.md +116 -0
  42. data/docs/PreMonexAuthorization.md +11 -0
  43. data/docs/PuntosDeVentaCoDiApi.md +113 -0
  44. data/docs/SalesPoint.md +10 -0
  45. data/docs/SalesPointFound.md +14 -0
  46. data/docs/SalesPointRequest.md +11 -0
  47. data/docs/SalesPointRespose.md +11 -0
  48. data/docs/SpidBeneficiaryResponse.md +2 -0
  49. data/docs/SuscripcionesApi.md +14 -14
  50. data/docs/TransactionOutgoing.md +2 -1
  51. data/docs/TransferenciasSPEIApi.md +60 -2
  52. data/docs/UrlsRedirect.md +9 -0
  53. data/docs/UserCompany.md +16 -0
  54. data/docs/Webhook.md +13 -0
  55. data/lib/wire4_client.rb +36 -0
  56. data/lib/wire4_client/api/contracts_details_api.rb +230 -0
  57. data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +100 -5
  58. data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +15 -0
  59. data/lib/wire4_client/api/empresas_co_di_api.rb +137 -0
  60. data/lib/wire4_client/api/operaciones_co_di_api.rb +92 -0
  61. data/lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb +178 -0
  62. data/lib/wire4_client/api/puntos_de_venta_co_di_api.rb +151 -0
  63. data/lib/wire4_client/api/suscripciones_api.rb +14 -14
  64. data/lib/wire4_client/api/transferencias_spei_api.rb +82 -0
  65. data/lib/wire4_client/models/account.rb +3 -3
  66. data/lib/wire4_client/models/account_detail.rb +239 -0
  67. data/lib/wire4_client/models/account_reassigned.rb +375 -0
  68. data/lib/wire4_client/models/account_response.rb +14 -4
  69. data/lib/wire4_client/models/address_company.rb +275 -0
  70. data/lib/wire4_client/models/amount_request.rb +90 -4
  71. data/lib/wire4_client/models/authorization_transaction_group.rb +207 -0
  72. data/lib/wire4_client/models/authorized_beneficiaries_response.rb +206 -0
  73. data/lib/wire4_client/models/authorized_users.rb +235 -0
  74. data/lib/wire4_client/models/certificate_request.rb +248 -0
  75. data/lib/wire4_client/models/codi_code_qr_response_dto.rb +320 -0
  76. data/lib/wire4_client/models/codi_code_request_dto.rb +402 -0
  77. data/lib/wire4_client/models/codi_operation_response_dto.rb +245 -0
  78. data/lib/wire4_client/models/codi_operations_filters_request_dto.rb +336 -0
  79. data/lib/wire4_client/models/company_registered.rb +235 -0
  80. data/lib/wire4_client/models/company_requested.rb +215 -0
  81. data/lib/wire4_client/models/compay.rb +215 -0
  82. data/lib/wire4_client/models/contract_detail_request.rb +247 -0
  83. data/lib/wire4_client/models/contract_detail_response.rb +194 -0
  84. data/lib/wire4_client/models/message_account_beneficiary.rb +2 -2
  85. data/lib/wire4_client/models/message_cep.rb +10 -10
  86. data/lib/wire4_client/models/message_codi_action.rb +295 -0
  87. data/lib/wire4_client/models/message_deposit_received.rb +1 -1
  88. data/lib/wire4_client/models/message_payment.rb +23 -2
  89. data/lib/wire4_client/models/message_payment_state_pending.rb +335 -0
  90. data/lib/wire4_client/models/message_request_changed.rb +3 -3
  91. data/lib/wire4_client/models/message_sales_point.rb +205 -0
  92. data/lib/wire4_client/models/message_subscription.rb +7 -7
  93. data/lib/wire4_client/models/message_user_authorized.rb +235 -0
  94. data/lib/wire4_client/models/message_web_hook.rb +2 -2
  95. data/lib/wire4_client/models/operations.rb +321 -0
  96. data/lib/wire4_client/models/pager_response_dto.rb +236 -0
  97. data/lib/wire4_client/models/payment.rb +22 -2
  98. data/lib/wire4_client/models/payment_request_codi_response_dto.rb +287 -0
  99. data/lib/wire4_client/models/pre_monex_authorization.rb +291 -0
  100. data/lib/wire4_client/models/sales_point.rb +205 -0
  101. data/lib/wire4_client/models/sales_point_found.rb +279 -0
  102. data/lib/wire4_client/models/sales_point_request.rb +254 -0
  103. data/lib/wire4_client/models/sales_point_respose.rb +215 -0
  104. data/lib/wire4_client/models/spid_beneficiary_response.rb +24 -4
  105. data/lib/wire4_client/models/transaction_outgoing.rb +12 -2
  106. data/lib/wire4_client/models/urls_redirect.rb +205 -0
  107. data/lib/wire4_client/models/user_company.rb +269 -0
  108. data/lib/wire4_client/models/webhook.rb +271 -0
  109. data/lib/wire4_client/version.rb +1 -1
  110. data/spec/api/contracts_details_api_spec.rb +76 -0
  111. data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +20 -1
  112. data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +5 -0
  113. data/spec/api/empresas_co_di_api_spec.rb +60 -0
  114. data/spec/api/operaciones_co_di_api_spec.rb +52 -0
  115. data/spec/api/peticiones_de_pago_por_co_di_api_spec.rb +63 -0
  116. data/spec/api/puntos_de_venta_co_di_api_spec.rb +62 -0
  117. data/spec/api/suscripciones_api_spec.rb +7 -7
  118. data/spec/api/transferencias_spei_api_spec.rb +15 -0
  119. data/spec/models/account_detail_spec.rb +71 -0
  120. data/spec/models/account_reassigned_spec.rb +119 -0
  121. data/spec/models/account_response_spec.rb +6 -0
  122. data/spec/models/address_company_spec.rb +95 -0
  123. data/spec/models/amount_request_spec.rb +12 -0
  124. data/spec/models/authorization_transaction_group_spec.rb +47 -0
  125. data/spec/models/authorized_beneficiaries_response_spec.rb +53 -0
  126. data/spec/models/authorized_users_spec.rb +71 -0
  127. data/spec/models/certificate_request_spec.rb +59 -0
  128. data/spec/models/codi_code_qr_response_dto_spec.rb +103 -0
  129. data/spec/models/codi_code_request_dto_spec.rb +81 -0
  130. data/spec/models/codi_operation_response_dto_spec.rb +77 -0
  131. data/spec/models/codi_operations_filters_request_dto_spec.rb +87 -0
  132. data/spec/models/company_registered_spec.rb +71 -0
  133. data/spec/models/company_requested_spec.rb +59 -0
  134. data/spec/models/compay_spec.rb +59 -0
  135. data/spec/models/contract_detail_request_spec.rb +59 -0
  136. data/spec/models/contract_detail_response_spec.rb +47 -0
  137. data/spec/models/message_codi_action_spec.rb +107 -0
  138. data/spec/models/message_payment_spec.rb +12 -0
  139. data/spec/models/message_payment_state_pending_spec.rb +131 -0
  140. data/spec/models/message_sales_point_spec.rb +53 -0
  141. data/spec/models/message_user_authorized_spec.rb +71 -0
  142. data/spec/models/operations_spec.rb +103 -0
  143. data/spec/models/pager_response_dto_spec.rb +71 -0
  144. data/spec/models/payment_request_codi_response_dto_spec.rb +101 -0
  145. data/spec/models/payment_spec.rb +12 -0
  146. data/spec/models/pre_monex_authorization_spec.rb +59 -0
  147. data/spec/models/sales_point_found_spec.rb +81 -0
  148. data/spec/models/sales_point_request_spec.rb +59 -0
  149. data/spec/models/sales_point_respose_spec.rb +59 -0
  150. data/spec/models/sales_point_spec.rb +53 -0
  151. data/spec/models/spid_beneficiary_response_spec.rb +12 -0
  152. data/spec/models/transaction_outgoing_spec.rb +6 -0
  153. data/spec/models/urls_redirect_spec.rb +47 -0
  154. data/spec/models/user_company_spec.rb +89 -0
  155. data/spec/models/webhook_spec.rb +75 -0
  156. metadata +146 -3
  157. data/Gemfile.lock +0 -69
@@ -0,0 +1,335 @@
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 mensaje que se envía mediante (webHook) con la información de una transferencia que esta pendiente de ser completada
17
+ class MessagePaymentStatePending
18
+ # Cuenta del ordenante
19
+ attr_accessor :account
20
+
21
+ # Monto de la transferencia
22
+ attr_accessor :amount
23
+
24
+ # Cuenta del beneficiario
25
+ attr_accessor :beneficiary_account
26
+
27
+ # Banco del beneficiario
28
+ attr_accessor :beneficiary_bank
29
+
30
+ # Nombre del beneficiario
31
+ attr_accessor :beneficiary_name
32
+
33
+ # Concepto de la transferencia de salida
34
+ attr_accessor :concept
35
+
36
+ # Código de la moneda de la transferencia de salida
37
+ attr_accessor :currency_code
38
+
39
+ # Mensaje de detención de Monex, indica la causa por la cuál esta detenida la operación en Monex
40
+ attr_accessor :detention_message
41
+
42
+ # Mensaje de error
43
+ attr_accessor :error_message
44
+
45
+ # El identificador de la transferencia de salida
46
+ attr_accessor :order_id
47
+
48
+ # El identificador de la orden de pago de Monex de la transferencia de salida
49
+ attr_accessor :payment_order_id
50
+
51
+ # Estatus que identifica la causa por la que la transferencia esta en pendiente, los posibles estatus son: FI=Fondos Insuficientes | FM=Firma mancomunada, en espera de ingreso de segundo token de autorización | DP=Se detecto una transferencia duplicada que esta en espera de confirmación o de eliminación
52
+ attr_accessor :pending_reason
53
+
54
+ # Referecia de la transferencia
55
+ attr_accessor :reference
56
+
57
+ # El identificador, en esta API, de la petición de envío de la transferencia de salida
58
+ attr_accessor :request_id
59
+
60
+ # El estado de la transferencia de salida, deberá ser PENDING
61
+ attr_accessor :status_code
62
+
63
+ # El identificador de Monex de la transferencia de salida, podría no estar presente por lo que Usted debería hacer referencias mediate el paymentOrderID
64
+ attr_accessor :transaction_id
65
+
66
+ # Attribute mapping from ruby-style variable name to JSON key.
67
+ def self.attribute_map
68
+ {
69
+ :'account' => :'account',
70
+ :'amount' => :'amount',
71
+ :'beneficiary_account' => :'beneficiary_account',
72
+ :'beneficiary_bank' => :'beneficiary_bank',
73
+ :'beneficiary_name' => :'beneficiary_name',
74
+ :'concept' => :'concept',
75
+ :'currency_code' => :'currency_code',
76
+ :'detention_message' => :'detention_message',
77
+ :'error_message' => :'error_message',
78
+ :'order_id' => :'order_id',
79
+ :'payment_order_id' => :'payment_order_id',
80
+ :'pending_reason' => :'pending_reason',
81
+ :'reference' => :'reference',
82
+ :'request_id' => :'request_id',
83
+ :'status_code' => :'status_code',
84
+ :'transaction_id' => :'transaction_id'
85
+ }
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.swagger_types
90
+ {
91
+ :'account' => :'String',
92
+ :'amount' => :'Float',
93
+ :'beneficiary_account' => :'String',
94
+ :'beneficiary_bank' => :'MessageInstitution',
95
+ :'beneficiary_name' => :'String',
96
+ :'concept' => :'String',
97
+ :'currency_code' => :'String',
98
+ :'detention_message' => :'String',
99
+ :'error_message' => :'String',
100
+ :'order_id' => :'String',
101
+ :'payment_order_id' => :'Integer',
102
+ :'pending_reason' => :'String',
103
+ :'reference' => :'Integer',
104
+ :'request_id' => :'String',
105
+ :'status_code' => :'String',
106
+ :'transaction_id' => :'Integer'
107
+ }
108
+ end
109
+
110
+ # Initializes the object
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ def initialize(attributes = {})
113
+ return unless attributes.is_a?(Hash)
114
+
115
+ # convert string to symbol for hash key
116
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
117
+
118
+ if attributes.has_key?(:'account')
119
+ self.account = attributes[:'account']
120
+ end
121
+
122
+ if attributes.has_key?(:'amount')
123
+ self.amount = attributes[:'amount']
124
+ end
125
+
126
+ if attributes.has_key?(:'beneficiary_account')
127
+ self.beneficiary_account = attributes[:'beneficiary_account']
128
+ end
129
+
130
+ if attributes.has_key?(:'beneficiary_bank')
131
+ self.beneficiary_bank = attributes[:'beneficiary_bank']
132
+ end
133
+
134
+ if attributes.has_key?(:'beneficiary_name')
135
+ self.beneficiary_name = attributes[:'beneficiary_name']
136
+ end
137
+
138
+ if attributes.has_key?(:'concept')
139
+ self.concept = attributes[:'concept']
140
+ end
141
+
142
+ if attributes.has_key?(:'currency_code')
143
+ self.currency_code = attributes[:'currency_code']
144
+ end
145
+
146
+ if attributes.has_key?(:'detention_message')
147
+ self.detention_message = attributes[:'detention_message']
148
+ end
149
+
150
+ if attributes.has_key?(:'error_message')
151
+ self.error_message = attributes[:'error_message']
152
+ end
153
+
154
+ if attributes.has_key?(:'order_id')
155
+ self.order_id = attributes[:'order_id']
156
+ end
157
+
158
+ if attributes.has_key?(:'payment_order_id')
159
+ self.payment_order_id = attributes[:'payment_order_id']
160
+ end
161
+
162
+ if attributes.has_key?(:'pending_reason')
163
+ self.pending_reason = attributes[:'pending_reason']
164
+ end
165
+
166
+ if attributes.has_key?(:'reference')
167
+ self.reference = attributes[:'reference']
168
+ end
169
+
170
+ if attributes.has_key?(:'request_id')
171
+ self.request_id = attributes[:'request_id']
172
+ end
173
+
174
+ if attributes.has_key?(:'status_code')
175
+ self.status_code = attributes[:'status_code']
176
+ end
177
+
178
+ if attributes.has_key?(:'transaction_id')
179
+ self.transaction_id = attributes[:'transaction_id']
180
+ end
181
+ end
182
+
183
+ # Show invalid properties with the reasons. Usually used together with valid?
184
+ # @return Array for valid properties with the reasons
185
+ def list_invalid_properties
186
+ invalid_properties = Array.new
187
+ invalid_properties
188
+ end
189
+
190
+ # Check to see if the all the properties in the model are valid
191
+ # @return true if the model is valid
192
+ def valid?
193
+ true
194
+ end
195
+
196
+ # Checks equality by comparing each attribute.
197
+ # @param [Object] Object to be compared
198
+ def ==(o)
199
+ return true if self.equal?(o)
200
+ self.class == o.class &&
201
+ account == o.account &&
202
+ amount == o.amount &&
203
+ beneficiary_account == o.beneficiary_account &&
204
+ beneficiary_bank == o.beneficiary_bank &&
205
+ beneficiary_name == o.beneficiary_name &&
206
+ concept == o.concept &&
207
+ currency_code == o.currency_code &&
208
+ detention_message == o.detention_message &&
209
+ error_message == o.error_message &&
210
+ order_id == o.order_id &&
211
+ payment_order_id == o.payment_order_id &&
212
+ pending_reason == o.pending_reason &&
213
+ reference == o.reference &&
214
+ request_id == o.request_id &&
215
+ status_code == o.status_code &&
216
+ transaction_id == o.transaction_id
217
+ end
218
+
219
+ # @see the `==` method
220
+ # @param [Object] Object to be compared
221
+ def eql?(o)
222
+ self == o
223
+ end
224
+
225
+ # Calculates hash code according to all attributes.
226
+ # @return [Fixnum] Hash code
227
+ def hash
228
+ [account, amount, beneficiary_account, beneficiary_bank, beneficiary_name, concept, currency_code, detention_message, error_message, order_id, payment_order_id, pending_reason, reference, request_id, status_code, transaction_id].hash
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ self.class.swagger_types.each_pair do |key, type|
237
+ if type =~ /\AArray<(.*)>/i
238
+ # check to ensure the input is an array given that the the attribute
239
+ # is documented as an array but the input is not
240
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
241
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
242
+ end
243
+ elsif !attributes[self.class.attribute_map[key]].nil?
244
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
245
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
246
+ end
247
+
248
+ self
249
+ end
250
+
251
+ # Deserializes the data based on type
252
+ # @param string type Data type
253
+ # @param string value Value to be deserialized
254
+ # @return [Object] Deserialized data
255
+ def _deserialize(type, value)
256
+ case type.to_sym
257
+ when :DateTime
258
+ DateTime.parse(value)
259
+ when :Date
260
+ Date.parse(value)
261
+ when :String
262
+ value.to_s
263
+ when :Integer
264
+ value.to_i
265
+ when :Float
266
+ value.to_f
267
+ when :BOOLEAN
268
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
269
+ true
270
+ else
271
+ false
272
+ end
273
+ when :Object
274
+ # generic object (usually a Hash), return directly
275
+ value
276
+ when /\AArray<(?<inner_type>.+)>\z/
277
+ inner_type = Regexp.last_match[:inner_type]
278
+ value.map { |v| _deserialize(inner_type, v) }
279
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
280
+ k_type = Regexp.last_match[:k_type]
281
+ v_type = Regexp.last_match[:v_type]
282
+ {}.tap do |hash|
283
+ value.each do |k, v|
284
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
285
+ end
286
+ end
287
+ else # model
288
+ temp_model = Wire4Client.const_get(type).new
289
+ temp_model.build_from_hash(value)
290
+ end
291
+ end
292
+
293
+ # Returns the string representation of the object
294
+ # @return [String] String presentation of the object
295
+ def to_s
296
+ to_hash.to_s
297
+ end
298
+
299
+ # to_body is an alias to to_hash (backward compatibility)
300
+ # @return [Hash] Returns the object in the form of hash
301
+ def to_body
302
+ to_hash
303
+ end
304
+
305
+ # Returns the object in the form of hash
306
+ # @return [Hash] Returns the object in the form of hash
307
+ def to_hash
308
+ hash = {}
309
+ self.class.attribute_map.each_pair do |attr, param|
310
+ value = self.send(attr)
311
+ next if value.nil?
312
+ hash[param] = _to_hash(value)
313
+ end
314
+ hash
315
+ end
316
+
317
+ # Outputs non-array value in the form of hash
318
+ # For object, use to_hash. Otherwise, just return the value
319
+ # @param [Object] value Any valid value
320
+ # @return [Hash] Returns the value in the form of hash
321
+ def _to_hash(value)
322
+ if value.is_a?(Array)
323
+ value.compact.map { |v| _to_hash(v) }
324
+ elsif value.is_a?(Hash)
325
+ {}.tap do |hash|
326
+ value.each { |k, v| hash[k] = _to_hash(v) }
327
+ end
328
+ elsif value.respond_to? :to_hash
329
+ value.to_hash
330
+ else
331
+ value
332
+ end
333
+ end
334
+ end
335
+ end
@@ -13,12 +13,12 @@ Swagger Codegen version: 2.4.10
13
13
  require 'date'
14
14
 
15
15
  module Wire4Client
16
- # El mensaje que se envía mediante (webHook) con la información acerca de algún cambio en el procesamiento de la petición a esta a esta API
16
+ # El mensaje que se envía mediante (WebHook) con la información acerca de algún cambio en el procesamiento o estado de la petición a esta a esta API
17
17
  class MessageRequestChanged
18
- # Identificador de la petición realizada a está API
18
+ # Identificador de la petición realizada a esta API
19
19
  attr_accessor :request_id
20
20
 
21
- # El cambio a informar en la procesamiento de la petición
21
+ # El cambio a informar en la procesamiento/estado de la petición
22
22
  attr_accessor :status
23
23
 
24
24
  class EnumAttributeValidator
@@ -0,0 +1,205 @@
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 mensaje que se envía con la informacion del punto de venta registrado
17
+ class MessageSalesPoint
18
+ # Cuenta donde se realziaran los pagos
19
+ attr_accessor :account
20
+
21
+ # Ip desde la cual se accedera al API
22
+ attr_accessor :ip
23
+
24
+ # Nombre del punto de venta
25
+ attr_accessor :name
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'account' => :'account',
31
+ :'ip' => :'ip',
32
+ :'name' => :'name'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+ :'account' => :'String',
40
+ :'ip' => :'String',
41
+ :'name' => :'String'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'account')
54
+ self.account = attributes[:'account']
55
+ end
56
+
57
+ if attributes.has_key?(:'ip')
58
+ self.ip = attributes[:'ip']
59
+ end
60
+
61
+ if attributes.has_key?(:'name')
62
+ self.name = attributes[:'name']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ account == o.account &&
85
+ ip == o.ip &&
86
+ name == o.name
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Fixnum] Hash code
97
+ def hash
98
+ [account, ip, name].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.swagger_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :BOOLEAN
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ temp_model = Wire4Client.const_get(type).new
159
+ temp_model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map { |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+ end
205
+ end