wire4_client 0.0.1.pre.SNAPSHOT
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/README.md +188 -0
- data/Rakefile +8 -0
- data/docs/Account.md +18 -0
- data/docs/AccountRequest.md +10 -0
- data/docs/AccountResponse.md +18 -0
- data/docs/AccountSpid.md +19 -0
- data/docs/AmountRequest.md +10 -0
- data/docs/Balance.md +10 -0
- data/docs/BalanceListResponse.md +8 -0
- data/docs/BeneficiariesResponse.md +8 -0
- data/docs/BeneficiaryInstitution.md +8 -0
- data/docs/Billing.md +16 -0
- data/docs/BillingTransaction.md +15 -0
- data/docs/CepResponse.md +28 -0
- data/docs/CepSearchBanxico.md +15 -0
- data/docs/ComprobanteElectrnicoDePagoCEPApi.md +61 -0
- data/docs/ContactRequest.md +12 -0
- data/docs/ContactoApi.md +60 -0
- data/docs/CuentasDeBeneficiariosSPEIApi.md +342 -0
- data/docs/CuentasDeBeneficiariosSPIDApi.md +62 -0
- data/docs/Deposit.md +27 -0
- data/docs/Depositant.md +12 -0
- data/docs/DepositantesApi.md +117 -0
- data/docs/DepositantsRegister.md +11 -0
- data/docs/DepositantsResponse.md +8 -0
- data/docs/ErrorResponse.md +9 -0
- data/docs/FacturasApi.md +115 -0
- data/docs/GetDepositants.md +8 -0
- data/docs/InstitucionesApi.md +53 -0
- data/docs/Institution.md +11 -0
- data/docs/InstitutionsList.md +8 -0
- data/docs/MessageAccountBeneficiary.md +10 -0
- data/docs/MessageCEP.md +28 -0
- data/docs/MessageDepositReceived.md +27 -0
- data/docs/MessageInstitution.md +11 -0
- data/docs/MessagePayment.md +25 -0
- data/docs/MessageSubscription.md +12 -0
- data/docs/MessageWebHook.md +16 -0
- data/docs/Payment.md +24 -0
- data/docs/Person.md +10 -0
- data/docs/PreEnrollmentData.md +9 -0
- data/docs/PreEnrollmentResponse.md +9 -0
- data/docs/Relationship.md +9 -0
- data/docs/RelationshipsResponse.md +8 -0
- data/docs/SaldoApi.md +61 -0
- data/docs/SpidClassificationDTO.md +9 -0
- data/docs/SpidClassificationsResponseDTO.md +8 -0
- data/docs/SuscripcionesApi.md +165 -0
- data/docs/Timestamp.md +17 -0
- data/docs/TokenRequiredResponse.md +9 -0
- data/docs/TransactionOutgoing.md +14 -0
- data/docs/TransactionOutgoingSpid.md +17 -0
- data/docs/TransactionsOutgoingRegister.md +10 -0
- data/docs/TransferenciasSPEIApi.md +229 -0
- data/docs/TransferenciasSPIDApi.md +117 -0
- data/docs/WebhookRequest.md +10 -0
- data/docs/WebhookResponse.md +13 -0
- data/docs/WebhooksApi.md +161 -0
- data/docs/WebhooksList.md +8 -0
- data/git_push.sh +55 -0
- data/lib/wire4_client.rb +96 -0
- data/lib/wire4_client/api/comprobante_electrnico_de_pago_cep_api.rb +77 -0
- data/lib/wire4_client/api/contacto_api.rb +76 -0
- data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +453 -0
- data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +93 -0
- data/lib/wire4_client/api/depositantes_api.rb +159 -0
- data/lib/wire4_client/api/facturas_api.rb +124 -0
- data/lib/wire4_client/api/instituciones_api.rb +67 -0
- data/lib/wire4_client/api/saldo_api.rb +87 -0
- data/lib/wire4_client/api/suscripciones_api.rb +203 -0
- data/lib/wire4_client/api/transferencias_spei_api.rb +307 -0
- data/lib/wire4_client/api/transferencias_spid_api.rb +155 -0
- data/lib/wire4_client/api/webhooks_api.rb +175 -0
- data/lib/wire4_client/api_client.rb +389 -0
- data/lib/wire4_client/api_error.rb +38 -0
- data/lib/wire4_client/configuration.rb +223 -0
- data/lib/wire4_client/models/account.rb +345 -0
- data/lib/wire4_client/models/account_request.rb +217 -0
- data/lib/wire4_client/models/account_response.rb +345 -0
- data/lib/wire4_client/models/account_spid.rb +388 -0
- data/lib/wire4_client/models/amount_request.rb +258 -0
- data/lib/wire4_client/models/balance.rb +205 -0
- data/lib/wire4_client/models/balance_list_response.rb +187 -0
- data/lib/wire4_client/models/beneficiaries_response.rb +186 -0
- data/lib/wire4_client/models/beneficiary_institution.rb +185 -0
- data/lib/wire4_client/models/billing.rb +300 -0
- data/lib/wire4_client/models/billing_transaction.rb +289 -0
- data/lib/wire4_client/models/cep_response.rb +384 -0
- data/lib/wire4_client/models/cep_search_banxico.rb +373 -0
- data/lib/wire4_client/models/contact_request.rb +272 -0
- data/lib/wire4_client/models/deposit.rb +374 -0
- data/lib/wire4_client/models/depositant.rb +227 -0
- data/lib/wire4_client/models/depositants_register.rb +315 -0
- data/lib/wire4_client/models/depositants_response.rb +184 -0
- data/lib/wire4_client/models/error_response.rb +192 -0
- data/lib/wire4_client/models/get_depositants.rb +192 -0
- data/lib/wire4_client/models/institution.rb +215 -0
- data/lib/wire4_client/models/institutions_list.rb +186 -0
- data/lib/wire4_client/models/message_account_beneficiary.rb +205 -0
- data/lib/wire4_client/models/message_cep.rb +385 -0
- data/lib/wire4_client/models/message_deposit_received.rb +375 -0
- data/lib/wire4_client/models/message_institution.rb +215 -0
- data/lib/wire4_client/models/message_payment.rb +354 -0
- data/lib/wire4_client/models/message_subscription.rb +225 -0
- data/lib/wire4_client/models/message_web_hook.rb +265 -0
- data/lib/wire4_client/models/payment.rb +344 -0
- data/lib/wire4_client/models/person.rb +220 -0
- data/lib/wire4_client/models/pre_enrollment_data.rb +260 -0
- data/lib/wire4_client/models/pre_enrollment_response.rb +194 -0
- data/lib/wire4_client/models/relationship.rb +194 -0
- data/lib/wire4_client/models/relationships_response.rb +186 -0
- data/lib/wire4_client/models/spid_classification_dto.rb +195 -0
- data/lib/wire4_client/models/spid_classifications_response_dto.rb +186 -0
- data/lib/wire4_client/models/timestamp.rb +264 -0
- data/lib/wire4_client/models/token_required_response.rb +195 -0
- data/lib/wire4_client/models/transaction_outgoing.rb +380 -0
- data/lib/wire4_client/models/transaction_outgoing_spid.rb +425 -0
- data/lib/wire4_client/models/transactions_outgoing_register.rb +222 -0
- data/lib/wire4_client/models/webhook_request.rb +222 -0
- data/lib/wire4_client/models/webhook_response.rb +271 -0
- data/lib/wire4_client/models/webhooks_list.rb +186 -0
- data/lib/wire4_client/version.rb +15 -0
- data/spec/api/comprobante_electrnico_de_pago_cep_api_spec.rb +47 -0
- data/spec/api/contacto_api_spec.rb +47 -0
- data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +113 -0
- data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +47 -0
- data/spec/api/depositantes_api_spec.rb +60 -0
- data/spec/api/facturas_api_spec.rb +59 -0
- data/spec/api/instituciones_api_spec.rb +45 -0
- data/spec/api/saldo_api_spec.rb +47 -0
- data/spec/api/suscripciones_api_spec.rb +71 -0
- data/spec/api/transferencias_spei_api_spec.rb +86 -0
- data/spec/api/transferencias_spid_api_spec.rb +60 -0
- data/spec/api/webhooks_api_spec.rb +70 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_request_spec.rb +53 -0
- data/spec/models/account_response_spec.rb +101 -0
- data/spec/models/account_spec.rb +101 -0
- data/spec/models/account_spid_spec.rb +107 -0
- data/spec/models/amount_request_spec.rb +53 -0
- data/spec/models/balance_list_response_spec.rb +41 -0
- data/spec/models/balance_spec.rb +53 -0
- data/spec/models/beneficiaries_response_spec.rb +41 -0
- data/spec/models/beneficiary_institution_spec.rb +41 -0
- data/spec/models/billing_spec.rb +93 -0
- data/spec/models/billing_transaction_spec.rb +87 -0
- data/spec/models/cep_response_spec.rb +161 -0
- data/spec/models/cep_search_banxico_spec.rb +83 -0
- data/spec/models/contact_request_spec.rb +65 -0
- data/spec/models/deposit_spec.rb +155 -0
- data/spec/models/depositant_spec.rb +65 -0
- data/spec/models/depositants_register_spec.rb +59 -0
- data/spec/models/depositants_response_spec.rb +41 -0
- data/spec/models/error_response_spec.rb +47 -0
- data/spec/models/get_depositants_spec.rb +41 -0
- data/spec/models/institution_spec.rb +59 -0
- data/spec/models/institutions_list_spec.rb +41 -0
- data/spec/models/message_account_beneficiary_spec.rb +53 -0
- data/spec/models/message_cep_spec.rb +161 -0
- data/spec/models/message_deposit_received_spec.rb +155 -0
- data/spec/models/message_institution_spec.rb +59 -0
- data/spec/models/message_payment_spec.rb +143 -0
- data/spec/models/message_subscription_spec.rb +65 -0
- data/spec/models/message_web_hook_spec.rb +89 -0
- data/spec/models/payment_spec.rb +137 -0
- data/spec/models/person_spec.rb +53 -0
- data/spec/models/pre_enrollment_data_spec.rb +47 -0
- data/spec/models/pre_enrollment_response_spec.rb +47 -0
- data/spec/models/relationship_spec.rb +47 -0
- data/spec/models/relationships_response_spec.rb +41 -0
- data/spec/models/spid_classification_dto_spec.rb +47 -0
- data/spec/models/spid_classifications_response_dto_spec.rb +41 -0
- data/spec/models/timestamp_spec.rb +95 -0
- data/spec/models/token_required_response_spec.rb +47 -0
- data/spec/models/transaction_outgoing_spec.rb +77 -0
- data/spec/models/transaction_outgoing_spid_spec.rb +95 -0
- data/spec/models/transactions_outgoing_register_spec.rb +53 -0
- data/spec/models/webhook_request_spec.rb +53 -0
- data/spec/models/webhook_response_spec.rb +75 -0
- data/spec/models/webhooks_list_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- data/wire4_client.gemspec +45 -0
- metadata +468 -0
@@ -0,0 +1,186 @@
|
|
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 InstitutionsList
|
17
|
+
# Lista de instituciones
|
18
|
+
attr_accessor :institutions
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'institutions' => :'institutions'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.swagger_types
|
29
|
+
{
|
30
|
+
:'institutions' => :'Array<Institution>'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
|
+
|
42
|
+
if attributes.has_key?(:'institutions')
|
43
|
+
if (value = attributes[:'institutions']).is_a?(Array)
|
44
|
+
self.institutions = value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properties with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class &&
|
67
|
+
institutions == o.institutions
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Fixnum] Hash code
|
78
|
+
def hash
|
79
|
+
[institutions].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def build_from_hash(attributes)
|
86
|
+
return nil unless attributes.is_a?(Hash)
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
88
|
+
if type =~ /\AArray<(.*)>/i
|
89
|
+
# check to ensure the input is an array given that the the attribute
|
90
|
+
# is documented as an array but the input is not
|
91
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
93
|
+
end
|
94
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
95
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
96
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
97
|
+
end
|
98
|
+
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
# Deserializes the data based on type
|
103
|
+
# @param string type Data type
|
104
|
+
# @param string value Value to be deserialized
|
105
|
+
# @return [Object] Deserialized data
|
106
|
+
def _deserialize(type, value)
|
107
|
+
case type.to_sym
|
108
|
+
when :DateTime
|
109
|
+
DateTime.parse(value)
|
110
|
+
when :Date
|
111
|
+
Date.parse(value)
|
112
|
+
when :String
|
113
|
+
value.to_s
|
114
|
+
when :Integer
|
115
|
+
value.to_i
|
116
|
+
when :Float
|
117
|
+
value.to_f
|
118
|
+
when :BOOLEAN
|
119
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
120
|
+
true
|
121
|
+
else
|
122
|
+
false
|
123
|
+
end
|
124
|
+
when :Object
|
125
|
+
# generic object (usually a Hash), return directly
|
126
|
+
value
|
127
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
128
|
+
inner_type = Regexp.last_match[:inner_type]
|
129
|
+
value.map { |v| _deserialize(inner_type, v) }
|
130
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
131
|
+
k_type = Regexp.last_match[:k_type]
|
132
|
+
v_type = Regexp.last_match[:v_type]
|
133
|
+
{}.tap do |hash|
|
134
|
+
value.each do |k, v|
|
135
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
else # model
|
139
|
+
temp_model = Wire4Client.const_get(type).new
|
140
|
+
temp_model.build_from_hash(value)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the string representation of the object
|
145
|
+
# @return [String] String presentation of the object
|
146
|
+
def to_s
|
147
|
+
to_hash.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
# to_body is an alias to to_hash (backward compatibility)
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
152
|
+
def to_body
|
153
|
+
to_hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the object in the form of hash
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = self.send(attr)
|
162
|
+
next if value.nil?
|
163
|
+
hash[param] = _to_hash(value)
|
164
|
+
end
|
165
|
+
hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Outputs non-array value in the form of hash
|
169
|
+
# For object, use to_hash. Otherwise, just return the value
|
170
|
+
# @param [Object] value Any valid value
|
171
|
+
# @return [Hash] Returns the value in the form of hash
|
172
|
+
def _to_hash(value)
|
173
|
+
if value.is_a?(Array)
|
174
|
+
value.compact.map { |v| _to_hash(v) }
|
175
|
+
elsif value.is_a?(Hash)
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
+
end
|
179
|
+
elsif value.respond_to? :to_hash
|
180
|
+
value.to_hash
|
181
|
+
else
|
182
|
+
value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
@@ -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 mediante (webHook) con la información del registro de la cuenta del beneficiario
|
17
|
+
class MessageAccountBeneficiary
|
18
|
+
# Cuenta del beneficiario
|
19
|
+
attr_accessor :account
|
20
|
+
|
21
|
+
# Mensaje de error en caso de existir, el valor de este atributo contiene el mensaje
|
22
|
+
attr_accessor :error_message
|
23
|
+
|
24
|
+
# El identificador, en esta API, de la petición de registro de la cuenta del beneficiario
|
25
|
+
attr_accessor :request_id
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'account' => :'account',
|
31
|
+
:'error_message' => :'error_message',
|
32
|
+
:'request_id' => :'request_id'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'account' => :'String',
|
40
|
+
:'error_message' => :'String',
|
41
|
+
:'request_id' => :'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?(:'error_message')
|
58
|
+
self.error_message = attributes[:'error_message']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'request_id')
|
62
|
+
self.request_id = attributes[:'request_id']
|
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
|
+
error_message == o.error_message &&
|
86
|
+
request_id == o.request_id
|
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, error_message, request_id].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
|
@@ -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
|
+
# El CEP emitido por Banxico de la transferencia. Solo cuando este disponible, en otro caso se podrá usar la Consulta de CEP que esta misma API ofrece
|
17
|
+
class MessageCEP
|
18
|
+
# Cuenta del beneficiario
|
19
|
+
attr_accessor :account_beneficiary
|
20
|
+
|
21
|
+
# Cuenta que envia la operación
|
22
|
+
attr_accessor :account_sender
|
23
|
+
|
24
|
+
# Monto de la operación
|
25
|
+
attr_accessor :amount
|
26
|
+
|
27
|
+
# Bander para saber si el cep esta disponible
|
28
|
+
attr_accessor :available
|
29
|
+
|
30
|
+
# Clave del banco beneficiario
|
31
|
+
attr_accessor :bank_beneficiary
|
32
|
+
|
33
|
+
# Clave del banco que envia la operación
|
34
|
+
attr_accessor :bank_sender
|
35
|
+
|
36
|
+
# Nombre del beneficiario
|
37
|
+
attr_accessor :beneficiary_name
|
38
|
+
|
39
|
+
# RFC del beneficiario
|
40
|
+
attr_accessor :beneficiary_rfc
|
41
|
+
|
42
|
+
# Cadena original emita por el SAT
|
43
|
+
attr_accessor :cadena_original
|
44
|
+
|
45
|
+
# Fecha de captura
|
46
|
+
attr_accessor :capture_date
|
47
|
+
|
48
|
+
# Numero de serie emitido por el SAT
|
49
|
+
attr_accessor :certificate_serial_number
|
50
|
+
|
51
|
+
# Clave de rastreo de la operación
|
52
|
+
attr_accessor :clave_rastreo
|
53
|
+
|
54
|
+
# Descripción de la operación
|
55
|
+
attr_accessor :description
|
56
|
+
|
57
|
+
# Iva de la operación
|
58
|
+
attr_accessor :iva
|
59
|
+
|
60
|
+
# Fecha en la que se realizó la operación
|
61
|
+
attr_accessor :operation_date
|
62
|
+
|
63
|
+
# Fecha en la que genera el cep
|
64
|
+
attr_accessor :operation_date_cep
|
65
|
+
|
66
|
+
# Referencia de la operación
|
67
|
+
attr_accessor :reference
|
68
|
+
|
69
|
+
# Nombre de quien envia la operación
|
70
|
+
attr_accessor :sender_name
|
71
|
+
|
72
|
+
# RFC de quien envia la operación
|
73
|
+
attr_accessor :sender_rfc
|
74
|
+
|
75
|
+
# Firma del Cep
|
76
|
+
attr_accessor :signature
|
77
|
+
|
78
|
+
# Url que contiene el PDF y XML del CEP proporcionado por banxico
|
79
|
+
attr_accessor :url_zip
|
80
|
+
|
81
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
82
|
+
def self.attribute_map
|
83
|
+
{
|
84
|
+
:'account_beneficiary' => :'account_beneficiary',
|
85
|
+
:'account_sender' => :'account_sender',
|
86
|
+
:'amount' => :'amount',
|
87
|
+
:'available' => :'available',
|
88
|
+
:'bank_beneficiary' => :'bank_beneficiary',
|
89
|
+
:'bank_sender' => :'bank_sender',
|
90
|
+
:'beneficiary_name' => :'beneficiary_name',
|
91
|
+
:'beneficiary_rfc' => :'beneficiary_rfc',
|
92
|
+
:'cadena_original' => :'cadena_original',
|
93
|
+
:'capture_date' => :'capture_date',
|
94
|
+
:'certificate_serial_number' => :'certificate_serial_number',
|
95
|
+
:'clave_rastreo' => :'clave_rastreo',
|
96
|
+
:'description' => :'description',
|
97
|
+
:'iva' => :'iva',
|
98
|
+
:'operation_date' => :'operation_date',
|
99
|
+
:'operation_date_cep' => :'operation_date_cep',
|
100
|
+
:'reference' => :'reference',
|
101
|
+
:'sender_name' => :'sender_name',
|
102
|
+
:'sender_rfc' => :'sender_rfc',
|
103
|
+
:'signature' => :'signature',
|
104
|
+
:'url_zip' => :'url_zip'
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
# Attribute type mapping.
|
109
|
+
def self.swagger_types
|
110
|
+
{
|
111
|
+
:'account_beneficiary' => :'String',
|
112
|
+
:'account_sender' => :'String',
|
113
|
+
:'amount' => :'Float',
|
114
|
+
:'available' => :'BOOLEAN',
|
115
|
+
:'bank_beneficiary' => :'String',
|
116
|
+
:'bank_sender' => :'String',
|
117
|
+
:'beneficiary_name' => :'String',
|
118
|
+
:'beneficiary_rfc' => :'String',
|
119
|
+
:'cadena_original' => :'String',
|
120
|
+
:'capture_date' => :'DateTime',
|
121
|
+
:'certificate_serial_number' => :'String',
|
122
|
+
:'clave_rastreo' => :'String',
|
123
|
+
:'description' => :'String',
|
124
|
+
:'iva' => :'Float',
|
125
|
+
:'operation_date' => :'DateTime',
|
126
|
+
:'operation_date_cep' => :'DateTime',
|
127
|
+
:'reference' => :'String',
|
128
|
+
:'sender_name' => :'String',
|
129
|
+
:'sender_rfc' => :'String',
|
130
|
+
:'signature' => :'String',
|
131
|
+
:'url_zip' => :'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?(:'account_beneficiary')
|
144
|
+
self.account_beneficiary = attributes[:'account_beneficiary']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'account_sender')
|
148
|
+
self.account_sender = attributes[:'account_sender']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'amount')
|
152
|
+
self.amount = attributes[:'amount']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'available')
|
156
|
+
self.available = attributes[:'available']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'bank_beneficiary')
|
160
|
+
self.bank_beneficiary = attributes[:'bank_beneficiary']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'bank_sender')
|
164
|
+
self.bank_sender = attributes[:'bank_sender']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'beneficiary_name')
|
168
|
+
self.beneficiary_name = attributes[:'beneficiary_name']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'beneficiary_rfc')
|
172
|
+
self.beneficiary_rfc = attributes[:'beneficiary_rfc']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'cadena_original')
|
176
|
+
self.cadena_original = attributes[:'cadena_original']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'capture_date')
|
180
|
+
self.capture_date = attributes[:'capture_date']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'certificate_serial_number')
|
184
|
+
self.certificate_serial_number = attributes[:'certificate_serial_number']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'clave_rastreo')
|
188
|
+
self.clave_rastreo = attributes[:'clave_rastreo']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'description')
|
192
|
+
self.description = attributes[:'description']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'iva')
|
196
|
+
self.iva = attributes[:'iva']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'operation_date')
|
200
|
+
self.operation_date = attributes[:'operation_date']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.has_key?(:'operation_date_cep')
|
204
|
+
self.operation_date_cep = attributes[:'operation_date_cep']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.has_key?(:'reference')
|
208
|
+
self.reference = attributes[:'reference']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.has_key?(:'sender_name')
|
212
|
+
self.sender_name = attributes[:'sender_name']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.has_key?(:'sender_rfc')
|
216
|
+
self.sender_rfc = attributes[:'sender_rfc']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.has_key?(:'signature')
|
220
|
+
self.signature = attributes[:'signature']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.has_key?(:'url_zip')
|
224
|
+
self.url_zip = attributes[:'url_zip']
|
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
|
+
account_beneficiary == o.account_beneficiary &&
|
247
|
+
account_sender == o.account_sender &&
|
248
|
+
amount == o.amount &&
|
249
|
+
available == o.available &&
|
250
|
+
bank_beneficiary == o.bank_beneficiary &&
|
251
|
+
bank_sender == o.bank_sender &&
|
252
|
+
beneficiary_name == o.beneficiary_name &&
|
253
|
+
beneficiary_rfc == o.beneficiary_rfc &&
|
254
|
+
cadena_original == o.cadena_original &&
|
255
|
+
capture_date == o.capture_date &&
|
256
|
+
certificate_serial_number == o.certificate_serial_number &&
|
257
|
+
clave_rastreo == o.clave_rastreo &&
|
258
|
+
description == o.description &&
|
259
|
+
iva == o.iva &&
|
260
|
+
operation_date == o.operation_date &&
|
261
|
+
operation_date_cep == o.operation_date_cep &&
|
262
|
+
reference == o.reference &&
|
263
|
+
sender_name == o.sender_name &&
|
264
|
+
sender_rfc == o.sender_rfc &&
|
265
|
+
signature == o.signature &&
|
266
|
+
url_zip == o.url_zip
|
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
|
+
[account_beneficiary, account_sender, amount, available, bank_beneficiary, bank_sender, beneficiary_name, beneficiary_rfc, cadena_original, capture_date, certificate_serial_number, clave_rastreo, description, iva, operation_date, operation_date_cep, reference, sender_name, sender_rfc, signature, url_zip].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
|