wire4_client 1.0.5 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +51 -30
  4. data/docs/Account.md +11 -11
  5. data/docs/AccountReassigned.md +14 -14
  6. data/docs/AccountRequest.md +3 -3
  7. data/docs/AccountResponse.md +13 -13
  8. data/docs/AccountSpid.md +11 -11
  9. data/docs/AmountRequest.md +5 -5
  10. data/docs/AuthorizationTransactionGroup.md +2 -2
  11. data/docs/AuthorizedBeneficiariesResponse.md +3 -3
  12. data/docs/AutorizacinDeDepsitosApi.md +113 -0
  13. data/docs/Balance.md +3 -3
  14. data/docs/BalanceListResponse.md +1 -1
  15. data/docs/BeneficiariesQueryRegisterStatus.md +2 -2
  16. data/docs/BeneficiariesResponse.md +1 -1
  17. data/docs/BillingTransaction.md +1 -1
  18. data/docs/CepResponse.md +20 -20
  19. data/docs/CepSearchBanxico.md +8 -8
  20. data/docs/CertificateRequest.md +4 -4
  21. data/docs/CodiCodeQrResponseDTO.md +10 -10
  22. data/docs/CodiOperationResponseDTO.md +7 -7
  23. data/docs/CodiOperationsFiltersRequestDTO.md +8 -8
  24. data/docs/CompanyRegistered.md +6 -6
  25. data/docs/CompanyRequested.md +4 -4
  26. data/docs/ConfigurationsLimits.md +9 -0
  27. data/docs/ContactRequest.md +5 -5
  28. data/docs/ContractsDetailsApi.md +55 -0
  29. data/docs/CuentasDeBeneficiariosSPEIApi.md +54 -54
  30. data/docs/CuentasDeBeneficiariosSPIDApi.md +24 -22
  31. data/docs/Deposit.md +22 -21
  32. data/docs/DepositAuthorizationRequest.md +10 -0
  33. data/docs/Depositant.md +5 -5
  34. data/docs/DepositantesApi.md +6 -6
  35. data/docs/DepositantsRegister.md +4 -4
  36. data/docs/DepositantsResponse.md +1 -1
  37. data/docs/DepositsAuthorizationResponse.md +10 -0
  38. data/docs/DetailedErrorResponse.md +10 -0
  39. data/docs/EmpresasCoDiApi.md +8 -8
  40. data/docs/GetDepositants.md +1 -1
  41. data/docs/InstitucionesApi.md +5 -3
  42. data/docs/Institution.md +4 -4
  43. data/docs/InstitutionsList.md +1 -1
  44. data/docs/Item.md +10 -0
  45. data/docs/LmitesDeMontosApi.md +112 -0
  46. data/docs/MessageAccountBeneficiary.md +3 -3
  47. data/docs/MessageCEP.md +19 -19
  48. data/docs/MessageCodiAction.md +12 -12
  49. data/docs/MessageConfigurationsLimits.md +8 -0
  50. data/docs/MessageDepositAuthorizationRequest.md +28 -0
  51. data/docs/MessageDepositReceived.md +22 -21
  52. data/docs/MessageInstitution.md +4 -4
  53. data/docs/MessagePayment.md +20 -20
  54. data/docs/MessagePaymentStatePending.md +16 -16
  55. data/docs/MessageRequestChanged.md +2 -2
  56. data/docs/MessageSalesPoint.md +3 -3
  57. data/docs/MessageSubscription.md +6 -6
  58. data/docs/MessageUserAuthorized.md +7 -6
  59. data/docs/MessageWebHook.md +9 -9
  60. data/docs/OperacionesCoDiApi.md +12 -12
  61. data/docs/Operations.md +8 -8
  62. data/docs/PagerResponseDto.md +6 -6
  63. data/docs/Payment.md +19 -19
  64. data/docs/PaymentCODI.md +13 -0
  65. data/docs/PaymentRequestCodiResponseDTO.md +11 -11
  66. data/docs/PeticionesDePagoPorCoDiApi.md +7 -7
  67. data/docs/PreEnrollmentData.md +2 -2
  68. data/docs/PreEnrollmentResponse.md +2 -2
  69. data/docs/PuntosDeVentaCoDiApi.md +14 -14
  70. data/docs/Relationship.md +2 -2
  71. data/docs/RelationshipsResponse.md +1 -1
  72. data/docs/SaldoApi.md +3 -3
  73. data/docs/SalesPointFound.md +7 -7
  74. data/docs/SalesPointRequest.md +4 -4
  75. data/docs/SalesPointRespose.md +4 -4
  76. data/docs/ServiceBanking.md +9 -0
  77. data/docs/SpidBeneficiariesResponse.md +1 -1
  78. data/docs/SpidBeneficiaryResponse.md +11 -11
  79. data/docs/SpidClassificationDTO.md +2 -2
  80. data/docs/SubscriptionChangeStatusRequest.md +8 -0
  81. data/docs/SuscripcionesApi.md +123 -16
  82. data/docs/TokenRequiredResponse.md +2 -2
  83. data/docs/TransactionErrorCode.md +10 -0
  84. data/docs/TransactionOutgoingSpid.md +10 -10
  85. data/docs/TransactionsOutgoingRegister.md +3 -3
  86. data/docs/TransferenciasSPEIApi.md +40 -34
  87. data/docs/TransferenciasSPIDApi.md +12 -12
  88. data/docs/UpdateConfigurationsRequestDTO.md +8 -0
  89. data/docs/UrlsRedirect.md +2 -2
  90. data/docs/UseServiceBanking.md +9 -0
  91. data/docs/WebHookDepositAuthorizationRequest.md +9 -0
  92. data/docs/WebHookDepositAuthorizationResponse.md +13 -0
  93. data/docs/Webhook.md +6 -6
  94. data/docs/WebhookRequest.md +3 -3
  95. data/docs/WebhookResponse.md +5 -5
  96. data/docs/WebhooksApi.md +10 -10
  97. data/lib/wire4_client/api/autorizacin_de_depsitos_api.rb +173 -0
  98. data/lib/wire4_client/api/contracts_details_api.rb +71 -0
  99. data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +56 -56
  100. data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +24 -22
  101. data/lib/wire4_client/api/depositantes_api.rb +79 -8
  102. data/lib/wire4_client/api/empresas_co_di_api.rb +8 -8
  103. data/lib/wire4_client/api/instituciones_api.rb +4 -2
  104. data/lib/wire4_client/api/lmites_de_montos_api.rb +160 -0
  105. data/lib/wire4_client/api/operaciones_co_di_api.rb +12 -12
  106. data/lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb +6 -6
  107. data/lib/wire4_client/api/puntos_de_venta_co_di_api.rb +14 -14
  108. data/lib/wire4_client/api/saldo_api.rb +4 -4
  109. data/lib/wire4_client/api/suscripciones_api.rb +149 -16
  110. data/lib/wire4_client/api/transferencias_spei_api.rb +72 -42
  111. data/lib/wire4_client/api/transferencias_spid_api.rb +12 -12
  112. data/lib/wire4_client/api/webhooks_api.rb +15 -15
  113. data/lib/wire4_client/models/account.rb +11 -11
  114. data/lib/wire4_client/models/account_detail.rb +1 -1
  115. data/lib/wire4_client/models/account_reassigned.rb +15 -15
  116. data/lib/wire4_client/models/account_request.rb +3 -3
  117. data/lib/wire4_client/models/account_response.rb +14 -14
  118. data/lib/wire4_client/models/account_spid.rb +59 -11
  119. data/lib/wire4_client/models/amount_request.rb +6 -6
  120. data/lib/wire4_client/models/authorization_transaction_group.rb +2 -2
  121. data/lib/wire4_client/models/authorized_beneficiaries_response.rb +3 -3
  122. data/lib/wire4_client/models/balance.rb +4 -4
  123. data/lib/wire4_client/models/balance_list_response.rb +1 -1
  124. data/lib/wire4_client/models/beneficiaries_query_register_status.rb +2 -2
  125. data/lib/wire4_client/models/beneficiaries_response.rb +1 -1
  126. data/lib/wire4_client/models/billing_transaction.rb +1 -1
  127. data/lib/wire4_client/models/cep_response.rb +20 -20
  128. data/lib/wire4_client/models/cep_search_banxico.rb +8 -8
  129. data/lib/wire4_client/models/certificate_request.rb +5 -5
  130. data/lib/wire4_client/models/codi_code_qr_response_dto.rb +10 -10
  131. data/lib/wire4_client/models/codi_operation_response_dto.rb +7 -7
  132. data/lib/wire4_client/models/codi_operations_filters_request_dto.rb +8 -8
  133. data/lib/wire4_client/models/company_registered.rb +6 -6
  134. data/lib/wire4_client/models/company_requested.rb +5 -5
  135. data/lib/wire4_client/models/configurations_limits.rb +197 -0
  136. data/lib/wire4_client/models/contact_request.rb +6 -6
  137. data/lib/wire4_client/models/deposit.rb +32 -22
  138. data/lib/wire4_client/models/deposit_authorization_request.rb +205 -0
  139. data/lib/wire4_client/models/depositant.rb +5 -5
  140. data/lib/wire4_client/models/depositant_count_response.rb +185 -0
  141. data/lib/wire4_client/models/depositants_register.rb +4 -4
  142. data/lib/wire4_client/models/depositants_response.rb +1 -1
  143. data/lib/wire4_client/models/deposits_authorization_response.rb +205 -0
  144. data/lib/wire4_client/models/detailed_error_response.rb +203 -0
  145. data/lib/wire4_client/models/get_depositants.rb +2 -2
  146. data/lib/wire4_client/models/institution.rb +5 -5
  147. data/lib/wire4_client/models/institutions_list.rb +1 -1
  148. data/lib/wire4_client/models/item.rb +205 -0
  149. data/lib/wire4_client/models/message_account_beneficiary.rb +4 -4
  150. data/lib/wire4_client/models/message_cep.rb +20 -20
  151. data/lib/wire4_client/models/message_codi_action.rb +13 -13
  152. data/lib/wire4_client/models/message_configurations_limits.rb +187 -0
  153. data/lib/wire4_client/models/message_deposit_authorization_request.rb +385 -0
  154. data/lib/wire4_client/models/message_deposit_received.rb +33 -23
  155. data/lib/wire4_client/models/message_institution.rb +5 -5
  156. data/lib/wire4_client/models/message_payment.rb +21 -21
  157. data/lib/wire4_client/models/message_payment_state_pending.rb +17 -17
  158. data/lib/wire4_client/models/message_request_changed.rb +3 -3
  159. data/lib/wire4_client/models/message_sales_point.rb +4 -4
  160. data/lib/wire4_client/models/message_subscription.rb +7 -7
  161. data/lib/wire4_client/models/message_user_authorized.rb +21 -11
  162. data/lib/wire4_client/models/message_web_hook.rb +10 -10
  163. data/lib/wire4_client/models/operations.rb +9 -9
  164. data/lib/wire4_client/models/pager_response_dto.rb +6 -6
  165. data/lib/wire4_client/models/payment.rb +19 -19
  166. data/lib/wire4_client/models/payment_codi.rb +269 -0
  167. data/lib/wire4_client/models/payment_request_codi_response_dto.rb +11 -11
  168. data/lib/wire4_client/models/pre_enrollment_data.rb +20 -2
  169. data/lib/wire4_client/models/pre_enrollment_response.rb +2 -2
  170. data/lib/wire4_client/models/relationship.rb +2 -2
  171. data/lib/wire4_client/models/relationships_response.rb +1 -1
  172. data/lib/wire4_client/models/sales_point_found.rb +10 -10
  173. data/lib/wire4_client/models/sales_point_request.rb +5 -5
  174. data/lib/wire4_client/models/sales_point_respose.rb +5 -5
  175. data/lib/wire4_client/models/service_banking.rb +193 -0
  176. data/lib/wire4_client/models/spid_beneficiaries_response.rb +1 -1
  177. data/lib/wire4_client/models/spid_beneficiary_response.rb +11 -11
  178. data/lib/wire4_client/models/spid_classification_dto.rb +2 -2
  179. data/lib/wire4_client/models/subscription_change_status_request.rb +222 -0
  180. data/lib/wire4_client/models/token_required_response.rb +3 -3
  181. data/lib/wire4_client/models/transaction_error_code.rb +201 -0
  182. data/lib/wire4_client/models/transaction_outgoing_spid.rb +11 -11
  183. data/lib/wire4_client/models/transactions_outgoing_register.rb +4 -4
  184. data/lib/wire4_client/models/update_configurations_request_dto.rb +192 -0
  185. data/lib/wire4_client/models/urls_redirect.rb +59 -3
  186. data/lib/wire4_client/models/use_service_banking.rb +251 -0
  187. data/lib/wire4_client/models/web_hook_deposit_authorization_request.rb +195 -0
  188. data/lib/wire4_client/models/{timestamp.rb → web_hook_deposit_authorization_response.rb} +47 -74
  189. data/lib/wire4_client/models/webhook.rb +7 -7
  190. data/lib/wire4_client/models/webhook_request.rb +3 -3
  191. data/lib/wire4_client/models/webhook_response.rb +5 -5
  192. data/lib/wire4_client/version.rb +1 -1
  193. data/lib/wire4_client.rb +18 -1
  194. data/spec/api/autorizacin_de_depsitos_api_spec.rb +62 -0
  195. data/spec/api/contracts_details_api_spec.rb +14 -0
  196. data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +28 -28
  197. data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +12 -11
  198. data/spec/api/depositantes_api_spec.rb +4 -4
  199. data/spec/api/empresas_co_di_api_spec.rb +4 -4
  200. data/spec/api/instituciones_api_spec.rb +2 -1
  201. data/spec/api/lmites_de_montos_api_spec.rb +62 -0
  202. data/spec/api/operaciones_co_di_api_spec.rb +6 -6
  203. data/spec/api/peticiones_de_pago_por_co_di_api_spec.rb +3 -3
  204. data/spec/api/puntos_de_venta_co_di_api_spec.rb +7 -7
  205. data/spec/api/saldo_api_spec.rb +2 -2
  206. data/spec/api/suscripciones_api_spec.rb +36 -8
  207. data/spec/api/transferencias_spei_api_spec.rb +19 -17
  208. data/spec/api/transferencias_spid_api_spec.rb +6 -6
  209. data/spec/api/webhooks_api_spec.rb +4 -4
  210. data/spec/models/configurations_limits_spec.rb +47 -0
  211. data/spec/models/deposit_authorization_request_spec.rb +53 -0
  212. data/spec/models/deposit_spec.rb +6 -0
  213. data/spec/models/deposits_authorization_response_spec.rb +53 -0
  214. data/spec/models/detailed_error_response_spec.rb +53 -0
  215. data/spec/models/item_spec.rb +53 -0
  216. data/spec/models/message_configurations_limits_spec.rb +41 -0
  217. data/spec/models/message_deposit_authorization_request_spec.rb +161 -0
  218. data/spec/models/message_deposit_received_spec.rb +6 -0
  219. data/spec/models/message_user_authorized_spec.rb +6 -0
  220. data/spec/models/{timestamp_spec.rb → payment_codi_spec.rb} +16 -36
  221. data/spec/models/service_banking_spec.rb +47 -0
  222. data/spec/models/subscription_change_status_request_spec.rb +45 -0
  223. data/spec/models/transaction_error_code_spec.rb +53 -0
  224. data/spec/models/update_configurations_request_dto_spec.rb +41 -0
  225. data/spec/models/use_service_banking_spec.rb +55 -0
  226. data/spec/models/web_hook_deposit_authorization_request_spec.rb +47 -0
  227. data/spec/models/web_hook_deposit_authorization_response_spec.rb +71 -0
  228. metadata +72 -7
  229. data/docs/Timestamp.md +0 -17
@@ -0,0 +1,187 @@
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
+ # Configuración de límites de montos.
17
+ class MessageConfigurationsLimits
18
+ # Lista de configuraciones pertenecientes al contrato
19
+ attr_accessor :configurations
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'configurations' => :'configurations'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'configurations' => :'Array<ConfigurationsLimits>'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
+
43
+ if attributes.has_key?(:'configurations')
44
+ if (value = attributes[:'configurations']).is_a?(Array)
45
+ self.configurations = value
46
+ end
47
+ end
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properties with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ invalid_properties
55
+ end
56
+
57
+ # Check to see if the all the properties in the model are valid
58
+ # @return true if the model is valid
59
+ def valid?
60
+ true
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ configurations == o.configurations
69
+ end
70
+
71
+ # @see the `==` method
72
+ # @param [Object] Object to be compared
73
+ def eql?(o)
74
+ self == o
75
+ end
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Fixnum] Hash code
79
+ def hash
80
+ [configurations].hash
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def build_from_hash(attributes)
87
+ return nil unless attributes.is_a?(Hash)
88
+ self.class.swagger_types.each_pair do |key, type|
89
+ if type =~ /\AArray<(.*)>/i
90
+ # check to ensure the input is an array given that the the attribute
91
+ # is documented as an array but the input is not
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
94
+ end
95
+ elsif !attributes[self.class.attribute_map[key]].nil?
96
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
97
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
98
+ end
99
+
100
+ self
101
+ end
102
+
103
+ # Deserializes the data based on type
104
+ # @param string type Data type
105
+ # @param string value Value to be deserialized
106
+ # @return [Object] Deserialized data
107
+ def _deserialize(type, value)
108
+ case type.to_sym
109
+ when :DateTime
110
+ DateTime.parse(value)
111
+ when :Date
112
+ Date.parse(value)
113
+ when :String
114
+ value.to_s
115
+ when :Integer
116
+ value.to_i
117
+ when :Float
118
+ value.to_f
119
+ when :BOOLEAN
120
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
121
+ true
122
+ else
123
+ false
124
+ end
125
+ when :Object
126
+ # generic object (usually a Hash), return directly
127
+ value
128
+ when /\AArray<(?<inner_type>.+)>\z/
129
+ inner_type = Regexp.last_match[:inner_type]
130
+ value.map { |v| _deserialize(inner_type, v) }
131
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
132
+ k_type = Regexp.last_match[:k_type]
133
+ v_type = Regexp.last_match[:v_type]
134
+ {}.tap do |hash|
135
+ value.each do |k, v|
136
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
+ end
138
+ end
139
+ else # model
140
+ temp_model = Wire4Client.const_get(type).new
141
+ temp_model.build_from_hash(value)
142
+ end
143
+ end
144
+
145
+ # Returns the string representation of the object
146
+ # @return [String] String presentation of the object
147
+ def to_s
148
+ to_hash.to_s
149
+ end
150
+
151
+ # to_body is an alias to to_hash (backward compatibility)
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_body
154
+ to_hash
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ next if value.nil?
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ # Outputs non-array value in the form of hash
170
+ # For object, use to_hash. Otherwise, just return the value
171
+ # @param [Object] value Any valid value
172
+ # @return [Hash] Returns the value in the form of hash
173
+ def _to_hash(value)
174
+ if value.is_a?(Array)
175
+ value.compact.map { |v| _to_hash(v) }
176
+ elsif value.is_a?(Hash)
177
+ {}.tap do |hash|
178
+ value.each { |k, v| hash[k] = _to_hash(v) }
179
+ end
180
+ elsif value.respond_to? :to_hash
181
+ value.to_hash
182
+ else
183
+ value
184
+ end
185
+ end
186
+ end
187
+ end
@@ -0,0 +1,385 @@
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
+ # Es el objet mensaje que se envía mediante webHook con la información de un depósito que necesita ser autorizado.
17
+ class MessageDepositAuthorizationRequest
18
+ # Es el monto de la transferencia.
19
+ attr_accessor :amount
20
+
21
+ # Es la cuenta del beneficiario.
22
+ attr_accessor :beneficiary_account
23
+
24
+ # Es el nombre del beneficiario.
25
+ attr_accessor :beneficiary_name
26
+
27
+ # Es el Registro Federal de Contribuyentes (RFC) del beneficiario.
28
+ attr_accessor :beneficiary_rfc
29
+
30
+ # Es la clave de rastreo de la transferencia.
31
+ attr_accessor :clave_rastreo
32
+
33
+ # Es la Fecha de confirmación de la transferencia.
34
+ attr_accessor :confirm_date
35
+
36
+ # Es el código de divisa de la transferencia. Es en el formato estándar ISO 4217 y es de 3 dígitos. Puede ser \"MXN\" o \"USD\".
37
+ attr_accessor :currency_code
38
+
39
+ # Es la fecha de recepción de la transferencia.
40
+ attr_accessor :deposit_date
41
+
42
+ # Es el nombre del depositante en caso de que la transferencia se reciba en una cuenta de depositante.
43
+ attr_accessor :depositant
44
+
45
+ # Es el alias de la cuenta CLABE del depositante en caso que la transferencia se reciba de una cuenta de depositante
46
+ attr_accessor :depositant_alias
47
+
48
+ # Es la cuenta CLABE del depositante en caso que la transferencia se reciba en una cuenta de depositante
49
+ attr_accessor :depositant_clabe
50
+
51
+ # Es el Correo electrónico (email) del depositante en caso que la transferencia se reciba en una cuenta de depositante
52
+ attr_accessor :depositant_email
53
+
54
+ # Es el Registro Federal de Contribuyentes (RFC) del depositante, en caso que la transferencia se reciba en una cuenta de depositante.
55
+ attr_accessor :depositant_rfc
56
+
57
+ # Es el concepto de la transferencia.
58
+ attr_accessor :description
59
+
60
+ # Es la descripción de Monex para la transferencia.
61
+ attr_accessor :monex_description
62
+
63
+ # Es el identificador asignado por Monex a la transferencia.
64
+ attr_accessor :monex_transaction_id
65
+
66
+ # Es la referecia de la transferencia.
67
+ attr_accessor :reference
68
+
69
+ # Es la cuenta del ordenante que podría ser un número celular (10 dígitos), una tarjeta de débito (TDD, de 16 dígitos) o Cuenta CLABE interbancaria (18 dígitos).
70
+ attr_accessor :sender_account
71
+
72
+ # Es el objeto con información del banco del ordenante.
73
+ attr_accessor :sender_bank
74
+
75
+ # Es el nombre del ordenante.
76
+ attr_accessor :sender_name
77
+
78
+ # Es el Registro Federal de Contribuyente (RFC) del ordenante.
79
+ attr_accessor :sender_rfc
80
+
81
+ # Attribute mapping from ruby-style variable name to JSON key.
82
+ def self.attribute_map
83
+ {
84
+ :'amount' => :'amount',
85
+ :'beneficiary_account' => :'beneficiary_account',
86
+ :'beneficiary_name' => :'beneficiary_name',
87
+ :'beneficiary_rfc' => :'beneficiary_rfc',
88
+ :'clave_rastreo' => :'clave_rastreo',
89
+ :'confirm_date' => :'confirm_date',
90
+ :'currency_code' => :'currency_code',
91
+ :'deposit_date' => :'deposit_date',
92
+ :'depositant' => :'depositant',
93
+ :'depositant_alias' => :'depositant_alias',
94
+ :'depositant_clabe' => :'depositant_clabe',
95
+ :'depositant_email' => :'depositant_email',
96
+ :'depositant_rfc' => :'depositant_rfc',
97
+ :'description' => :'description',
98
+ :'monex_description' => :'monex_description',
99
+ :'monex_transaction_id' => :'monex_transaction_id',
100
+ :'reference' => :'reference',
101
+ :'sender_account' => :'sender_account',
102
+ :'sender_bank' => :'sender_bank',
103
+ :'sender_name' => :'sender_name',
104
+ :'sender_rfc' => :'sender_rfc'
105
+ }
106
+ end
107
+
108
+ # Attribute type mapping.
109
+ def self.swagger_types
110
+ {
111
+ :'amount' => :'Float',
112
+ :'beneficiary_account' => :'String',
113
+ :'beneficiary_name' => :'String',
114
+ :'beneficiary_rfc' => :'String',
115
+ :'clave_rastreo' => :'String',
116
+ :'confirm_date' => :'DateTime',
117
+ :'currency_code' => :'String',
118
+ :'deposit_date' => :'DateTime',
119
+ :'depositant' => :'String',
120
+ :'depositant_alias' => :'String',
121
+ :'depositant_clabe' => :'String',
122
+ :'depositant_email' => :'String',
123
+ :'depositant_rfc' => :'String',
124
+ :'description' => :'String',
125
+ :'monex_description' => :'String',
126
+ :'monex_transaction_id' => :'String',
127
+ :'reference' => :'String',
128
+ :'sender_account' => :'String',
129
+ :'sender_bank' => :'MessageInstitution',
130
+ :'sender_name' => :'String',
131
+ :'sender_rfc' => :'String'
132
+ }
133
+ end
134
+
135
+ # Initializes the object
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ def initialize(attributes = {})
138
+ return unless attributes.is_a?(Hash)
139
+
140
+ # convert string to symbol for hash key
141
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
142
+
143
+ if attributes.has_key?(:'amount')
144
+ self.amount = attributes[:'amount']
145
+ end
146
+
147
+ if attributes.has_key?(:'beneficiary_account')
148
+ self.beneficiary_account = attributes[:'beneficiary_account']
149
+ end
150
+
151
+ if attributes.has_key?(:'beneficiary_name')
152
+ self.beneficiary_name = attributes[:'beneficiary_name']
153
+ end
154
+
155
+ if attributes.has_key?(:'beneficiary_rfc')
156
+ self.beneficiary_rfc = attributes[:'beneficiary_rfc']
157
+ end
158
+
159
+ if attributes.has_key?(:'clave_rastreo')
160
+ self.clave_rastreo = attributes[:'clave_rastreo']
161
+ end
162
+
163
+ if attributes.has_key?(:'confirm_date')
164
+ self.confirm_date = attributes[:'confirm_date']
165
+ end
166
+
167
+ if attributes.has_key?(:'currency_code')
168
+ self.currency_code = attributes[:'currency_code']
169
+ end
170
+
171
+ if attributes.has_key?(:'deposit_date')
172
+ self.deposit_date = attributes[:'deposit_date']
173
+ end
174
+
175
+ if attributes.has_key?(:'depositant')
176
+ self.depositant = attributes[:'depositant']
177
+ end
178
+
179
+ if attributes.has_key?(:'depositant_alias')
180
+ self.depositant_alias = attributes[:'depositant_alias']
181
+ end
182
+
183
+ if attributes.has_key?(:'depositant_clabe')
184
+ self.depositant_clabe = attributes[:'depositant_clabe']
185
+ end
186
+
187
+ if attributes.has_key?(:'depositant_email')
188
+ self.depositant_email = attributes[:'depositant_email']
189
+ end
190
+
191
+ if attributes.has_key?(:'depositant_rfc')
192
+ self.depositant_rfc = attributes[:'depositant_rfc']
193
+ end
194
+
195
+ if attributes.has_key?(:'description')
196
+ self.description = attributes[:'description']
197
+ end
198
+
199
+ if attributes.has_key?(:'monex_description')
200
+ self.monex_description = attributes[:'monex_description']
201
+ end
202
+
203
+ if attributes.has_key?(:'monex_transaction_id')
204
+ self.monex_transaction_id = attributes[:'monex_transaction_id']
205
+ end
206
+
207
+ if attributes.has_key?(:'reference')
208
+ self.reference = attributes[:'reference']
209
+ end
210
+
211
+ if attributes.has_key?(:'sender_account')
212
+ self.sender_account = attributes[:'sender_account']
213
+ end
214
+
215
+ if attributes.has_key?(:'sender_bank')
216
+ self.sender_bank = attributes[:'sender_bank']
217
+ end
218
+
219
+ if attributes.has_key?(:'sender_name')
220
+ self.sender_name = attributes[:'sender_name']
221
+ end
222
+
223
+ if attributes.has_key?(:'sender_rfc')
224
+ self.sender_rfc = attributes[:'sender_rfc']
225
+ end
226
+ end
227
+
228
+ # Show invalid properties with the reasons. Usually used together with valid?
229
+ # @return Array for valid properties with the reasons
230
+ def list_invalid_properties
231
+ invalid_properties = Array.new
232
+ invalid_properties
233
+ end
234
+
235
+ # Check to see if the all the properties in the model are valid
236
+ # @return true if the model is valid
237
+ def valid?
238
+ true
239
+ end
240
+
241
+ # Checks equality by comparing each attribute.
242
+ # @param [Object] Object to be compared
243
+ def ==(o)
244
+ return true if self.equal?(o)
245
+ self.class == o.class &&
246
+ amount == o.amount &&
247
+ beneficiary_account == o.beneficiary_account &&
248
+ beneficiary_name == o.beneficiary_name &&
249
+ beneficiary_rfc == o.beneficiary_rfc &&
250
+ clave_rastreo == o.clave_rastreo &&
251
+ confirm_date == o.confirm_date &&
252
+ currency_code == o.currency_code &&
253
+ deposit_date == o.deposit_date &&
254
+ depositant == o.depositant &&
255
+ depositant_alias == o.depositant_alias &&
256
+ depositant_clabe == o.depositant_clabe &&
257
+ depositant_email == o.depositant_email &&
258
+ depositant_rfc == o.depositant_rfc &&
259
+ description == o.description &&
260
+ monex_description == o.monex_description &&
261
+ monex_transaction_id == o.monex_transaction_id &&
262
+ reference == o.reference &&
263
+ sender_account == o.sender_account &&
264
+ sender_bank == o.sender_bank &&
265
+ sender_name == o.sender_name &&
266
+ sender_rfc == o.sender_rfc
267
+ end
268
+
269
+ # @see the `==` method
270
+ # @param [Object] Object to be compared
271
+ def eql?(o)
272
+ self == o
273
+ end
274
+
275
+ # Calculates hash code according to all attributes.
276
+ # @return [Fixnum] Hash code
277
+ def hash
278
+ [amount, beneficiary_account, beneficiary_name, beneficiary_rfc, clave_rastreo, confirm_date, currency_code, deposit_date, depositant, depositant_alias, depositant_clabe, depositant_email, depositant_rfc, description, monex_description, monex_transaction_id, reference, sender_account, sender_bank, sender_name, sender_rfc].hash
279
+ end
280
+
281
+ # Builds the object from hash
282
+ # @param [Hash] attributes Model attributes in the form of hash
283
+ # @return [Object] Returns the model itself
284
+ def build_from_hash(attributes)
285
+ return nil unless attributes.is_a?(Hash)
286
+ self.class.swagger_types.each_pair do |key, type|
287
+ if type =~ /\AArray<(.*)>/i
288
+ # check to ensure the input is an array given that the the attribute
289
+ # is documented as an array but the input is not
290
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
291
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
292
+ end
293
+ elsif !attributes[self.class.attribute_map[key]].nil?
294
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
295
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
296
+ end
297
+
298
+ self
299
+ end
300
+
301
+ # Deserializes the data based on type
302
+ # @param string type Data type
303
+ # @param string value Value to be deserialized
304
+ # @return [Object] Deserialized data
305
+ def _deserialize(type, value)
306
+ case type.to_sym
307
+ when :DateTime
308
+ DateTime.parse(value)
309
+ when :Date
310
+ Date.parse(value)
311
+ when :String
312
+ value.to_s
313
+ when :Integer
314
+ value.to_i
315
+ when :Float
316
+ value.to_f
317
+ when :BOOLEAN
318
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
319
+ true
320
+ else
321
+ false
322
+ end
323
+ when :Object
324
+ # generic object (usually a Hash), return directly
325
+ value
326
+ when /\AArray<(?<inner_type>.+)>\z/
327
+ inner_type = Regexp.last_match[:inner_type]
328
+ value.map { |v| _deserialize(inner_type, v) }
329
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
330
+ k_type = Regexp.last_match[:k_type]
331
+ v_type = Regexp.last_match[:v_type]
332
+ {}.tap do |hash|
333
+ value.each do |k, v|
334
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
335
+ end
336
+ end
337
+ else # model
338
+ temp_model = Wire4Client.const_get(type).new
339
+ temp_model.build_from_hash(value)
340
+ end
341
+ end
342
+
343
+ # Returns the string representation of the object
344
+ # @return [String] String presentation of the object
345
+ def to_s
346
+ to_hash.to_s
347
+ end
348
+
349
+ # to_body is an alias to to_hash (backward compatibility)
350
+ # @return [Hash] Returns the object in the form of hash
351
+ def to_body
352
+ to_hash
353
+ end
354
+
355
+ # Returns the object in the form of hash
356
+ # @return [Hash] Returns the object in the form of hash
357
+ def to_hash
358
+ hash = {}
359
+ self.class.attribute_map.each_pair do |attr, param|
360
+ value = self.send(attr)
361
+ next if value.nil?
362
+ hash[param] = _to_hash(value)
363
+ end
364
+ hash
365
+ end
366
+
367
+ # Outputs non-array value in the form of hash
368
+ # For object, use to_hash. Otherwise, just return the value
369
+ # @param [Object] value Any valid value
370
+ # @return [Hash] Returns the value in the form of hash
371
+ def _to_hash(value)
372
+ if value.is_a?(Array)
373
+ value.compact.map { |v| _to_hash(v) }
374
+ elsif value.is_a?(Hash)
375
+ {}.tap do |hash|
376
+ value.each { |k, v| hash[k] = _to_hash(v) }
377
+ end
378
+ elsif value.respond_to? :to_hash
379
+ value.to_hash
380
+ else
381
+ value
382
+ end
383
+ end
384
+ end
385
+ end