wire4_client 1.1.2 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +27 -0
- data/docs/AccountReassigned.md +1 -1
- data/docs/AccountResponse.md +1 -0
- data/docs/BeneficiaryDTO.md +10 -0
- data/docs/CargosRecurrentesApi.md +110 -0
- data/docs/CepResponse.md +1 -0
- data/docs/CepSearchBanxico.md +1 -0
- data/docs/CertificateRequest.md +1 -1
- data/docs/CodiCodeQrResponseDTO.md +1 -0
- data/docs/CodiCodeRequestDTO.md +6 -3
- data/docs/ConfirmRecurringCharge.md +9 -0
- data/docs/CuentasDeBeneficiariosSPEIApi.md +4 -0
- data/docs/CuentasDeBeneficiariosSPIDApi.md +4 -0
- data/docs/Customer.md +9 -0
- data/docs/Deposit.md +1 -0
- data/docs/Depositant.md +1 -0
- data/docs/DepositantCountResponse.md +8 -0
- data/docs/DepositantesApi.md +164 -1
- data/docs/FailedChargesDataDTO.md +13 -0
- data/docs/MessageDepositReceived.md +3 -0
- data/docs/PaymentRequestReportDTO.md +17 -0
- data/docs/PaymentRequestReq.md +18 -0
- data/docs/PaymentRequestResponse.md +10 -0
- data/docs/PaymentsSpeiAndSpidOrderId.md +9 -0
- data/docs/PaymentsSpeiAndSpidRequestId.md +12 -0
- data/docs/Person.md +1 -1
- data/docs/Product.md +11 -0
- data/docs/RecurringChargeRequest.md +14 -0
- data/docs/ReporteDeSolicitudesDePagosApi.md +107 -0
- data/docs/SolicitudDePagosApi.md +59 -0
- data/docs/SpidBeneficiaryResponse.md +1 -0
- data/docs/SuccessChargesDataDTO.md +12 -0
- data/docs/SuccessDataDTO.md +9 -0
- data/docs/TransactionSpeiSpid.md +15 -0
- data/docs/TransactionsRegister.md +11 -0
- data/docs/TransferenciasSPEIApi.md +163 -0
- data/lib/wire4_client/api/cargos_recurrentes_api.rb +143 -0
- data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +6 -0
- data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +6 -0
- data/lib/wire4_client/api/depositantes_api.rb +207 -2
- data/lib/wire4_client/api/reporte_de_solicitudes_de_pagos_api.rb +134 -0
- data/lib/wire4_client/api/solicitud_de_pagos_api.rb +84 -0
- data/lib/wire4_client/api/transferencias_spei_api.rb +234 -4
- data/lib/wire4_client/models/account_reassigned.rb +11 -11
- data/lib/wire4_client/models/account_response.rb +11 -1
- data/lib/wire4_client/models/amount_request.rb +10 -10
- data/lib/wire4_client/models/beneficiary_dto.rb +201 -0
- data/lib/wire4_client/models/cep_response.rb +45 -1
- data/lib/wire4_client/models/cep_search_banxico.rb +48 -4
- data/lib/wire4_client/models/certificate_request.rb +6 -15
- data/lib/wire4_client/models/codi_code_qr_response_dto.rb +15 -5
- data/lib/wire4_client/models/codi_code_request_dto.rb +94 -20
- data/lib/wire4_client/models/codi_operations_filters_request_dto.rb +2 -2
- data/lib/wire4_client/models/confirm_recurring_charge.rb +194 -0
- data/lib/wire4_client/models/customer.rb +205 -0
- data/lib/wire4_client/models/deposit.rb +48 -4
- data/lib/wire4_client/models/depositant.rb +14 -4
- data/lib/wire4_client/models/depositant_count_response.rb +185 -0
- data/lib/wire4_client/models/failed_charges_data_dto.rb +228 -0
- data/lib/wire4_client/models/message_deposit_received.rb +31 -1
- data/lib/wire4_client/models/operations.rb +4 -4
- data/lib/wire4_client/models/payment_codi.rb +2 -2
- data/lib/wire4_client/models/payment_request_report_dto.rb +300 -0
- data/lib/wire4_client/models/payment_request_req.rb +401 -0
- data/lib/wire4_client/models/payment_request_response.rb +204 -0
- data/lib/wire4_client/models/payments_spei_and_spid_order_id.rb +199 -0
- data/lib/wire4_client/models/payments_spei_and_spid_request_id.rb +229 -0
- data/lib/wire4_client/models/person.rb +0 -5
- data/lib/wire4_client/models/product.rb +288 -0
- data/lib/wire4_client/models/recurring_charge_request.rb +278 -0
- data/lib/wire4_client/models/sales_point_request.rb +5 -5
- data/lib/wire4_client/models/spid_beneficiary_response.rb +11 -1
- data/lib/wire4_client/models/success_charges_data_dto.rb +219 -0
- data/lib/wire4_client/models/success_data_dto.rb +226 -0
- data/lib/wire4_client/models/transaction_outgoing.rb +5 -5
- data/lib/wire4_client/models/transaction_spei_spid.rb +390 -0
- data/lib/wire4_client/models/transactions_register.rb +229 -0
- data/lib/wire4_client/version.rb +1 -1
- data/lib/wire4_client.rb +19 -0
- data/spec/api/cargos_recurrentes_api_spec.rb +61 -0
- data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +2 -0
- data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +2 -0
- data/spec/api/depositantes_api_spec.rb +42 -1
- data/spec/api/reporte_de_solicitudes_de_pagos_api_spec.rb +59 -0
- data/spec/api/solicitud_de_pagos_api_spec.rb +48 -0
- data/spec/api/transferencias_spei_api_spec.rb +42 -0
- data/spec/models/account_reassigned_spec.rb +3 -3
- data/spec/models/account_response_spec.rb +6 -0
- data/spec/models/beneficiary_dto_spec.rb +53 -0
- data/spec/models/cep_response_spec.rb +10 -0
- data/spec/models/cep_search_banxico_spec.rb +10 -0
- data/spec/models/codi_code_qr_response_dto_spec.rb +8 -2
- data/spec/models/codi_code_request_dto_spec.rb +23 -1
- data/spec/models/codi_operations_filters_request_dto_spec.rb +1 -1
- data/spec/models/confirm_recurring_charge_spec.rb +47 -0
- data/spec/models/customer_spec.rb +47 -0
- data/spec/models/deposit_spec.rb +10 -0
- data/spec/models/depositant_count_response_spec.rb +41 -0
- data/spec/models/depositant_spec.rb +6 -0
- data/spec/models/failed_charges_data_dto_spec.rb +71 -0
- data/spec/models/message_deposit_received_spec.rb +18 -0
- data/spec/models/operations_spec.rb +2 -2
- data/spec/models/payment_codi_spec.rb +1 -1
- data/spec/models/payment_request_report_dto_spec.rb +99 -0
- data/spec/models/payment_request_req_spec.rb +109 -0
- data/spec/models/payment_request_response_spec.rb +53 -0
- data/spec/models/payments_spei_and_spid_order_id_spec.rb +47 -0
- data/spec/models/payments_spei_and_spid_request_id_spec.rb +65 -0
- data/spec/models/product_spec.rb +63 -0
- data/spec/models/recurring_charge_request_spec.rb +77 -0
- data/spec/models/spid_beneficiary_response_spec.rb +6 -0
- data/spec/models/success_charges_data_dto_spec.rb +65 -0
- data/spec/models/success_data_dto_spec.rb +51 -0
- data/spec/models/transaction_spei_spid_spec.rb +83 -0
- data/spec/models/transactions_register_spec.rb +59 -0
- data/wire4_client-1.1.3.gem +0 -0
- data/wire4_client.gemspec +7 -7
- metadata +108 -55
@@ -0,0 +1,194 @@
|
|
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 ConfirmRecurringCharge
|
17
|
+
# Identificador de la orden enviada por parte del cliente
|
18
|
+
attr_accessor :order_id
|
19
|
+
|
20
|
+
# Url del portal en donde se debe capturar los datos de la tarjeta para aplicar el cargo
|
21
|
+
attr_accessor :url
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'order_id' => :'order_id',
|
27
|
+
:'url' => :'url'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'order_id' => :'String',
|
35
|
+
:'url' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'order_id')
|
48
|
+
self.order_id = attributes[:'order_id']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'url')
|
52
|
+
self.url = attributes[:'url']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
order_id == o.order_id &&
|
75
|
+
url == o.url
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[order_id, url].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
97
|
+
# check to ensure the input is an array given that the the attribute
|
98
|
+
# is documented as an array but the input is not
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
DateTime.parse(value)
|
118
|
+
when :Date
|
119
|
+
Date.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
temp_model = Wire4Client.const_get(type).new
|
148
|
+
temp_model.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
next if value.nil?
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
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
|
+
# Información del cliente a quien se le aplicarán los cargos
|
17
|
+
class Customer
|
18
|
+
# Email del dueño de la tarjeta
|
19
|
+
attr_accessor :email
|
20
|
+
|
21
|
+
# Nombre del dueño de la tarjeta
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'email' => :'email',
|
28
|
+
:'name' => :'name'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'email' => :'String',
|
36
|
+
:'name' => :'String'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'email')
|
49
|
+
self.email = attributes[:'email']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'name')
|
53
|
+
self.name = attributes[:'name']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
58
|
+
# @return Array for valid properties with the reasons
|
59
|
+
def list_invalid_properties
|
60
|
+
invalid_properties = Array.new
|
61
|
+
if @email.nil?
|
62
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
63
|
+
end
|
64
|
+
|
65
|
+
if @name.nil?
|
66
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
67
|
+
end
|
68
|
+
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
return false if @email.nil?
|
76
|
+
return false if @name.nil?
|
77
|
+
true
|
78
|
+
end
|
79
|
+
|
80
|
+
# Checks equality by comparing each attribute.
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
email == o.email &&
|
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
|
+
[email, 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
|
@@ -80,6 +80,31 @@ module Wire4Client
|
|
80
80
|
# Es el Registro Federal de Contribuyentes (RFC) de la cuenta ordenante.
|
81
81
|
attr_accessor :sender_rfc
|
82
82
|
|
83
|
+
# Es el estatus del depósito (COMPLETED/RETURNED).
|
84
|
+
attr_accessor :status
|
85
|
+
|
86
|
+
class EnumAttributeValidator
|
87
|
+
attr_reader :datatype
|
88
|
+
attr_reader :allowable_values
|
89
|
+
|
90
|
+
def initialize(datatype, allowable_values)
|
91
|
+
@allowable_values = allowable_values.map do |value|
|
92
|
+
case datatype.to_s
|
93
|
+
when /Integer/i
|
94
|
+
value.to_i
|
95
|
+
when /Float/i
|
96
|
+
value.to_f
|
97
|
+
else
|
98
|
+
value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def valid?(value)
|
104
|
+
!value || allowable_values.include?(value)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
83
108
|
# Attribute mapping from ruby-style variable name to JSON key.
|
84
109
|
def self.attribute_map
|
85
110
|
{
|
@@ -104,7 +129,8 @@ module Wire4Client
|
|
104
129
|
:'sender_account' => :'sender_account',
|
105
130
|
:'sender_bank' => :'sender_bank',
|
106
131
|
:'sender_name' => :'sender_name',
|
107
|
-
:'sender_rfc' => :'sender_rfc'
|
132
|
+
:'sender_rfc' => :'sender_rfc',
|
133
|
+
:'status' => :'status'
|
108
134
|
}
|
109
135
|
end
|
110
136
|
|
@@ -132,7 +158,8 @@ module Wire4Client
|
|
132
158
|
:'sender_account' => :'String',
|
133
159
|
:'sender_bank' => :'MessageInstitution',
|
134
160
|
:'sender_name' => :'String',
|
135
|
-
:'sender_rfc' => :'String'
|
161
|
+
:'sender_rfc' => :'String',
|
162
|
+
:'status' => :'String'
|
136
163
|
}
|
137
164
|
end
|
138
165
|
|
@@ -231,6 +258,10 @@ module Wire4Client
|
|
231
258
|
if attributes.has_key?(:'sender_rfc')
|
232
259
|
self.sender_rfc = attributes[:'sender_rfc']
|
233
260
|
end
|
261
|
+
|
262
|
+
if attributes.has_key?(:'status')
|
263
|
+
self.status = attributes[:'status']
|
264
|
+
end
|
234
265
|
end
|
235
266
|
|
236
267
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -243,9 +274,21 @@ module Wire4Client
|
|
243
274
|
# Check to see if the all the properties in the model are valid
|
244
275
|
# @return true if the model is valid
|
245
276
|
def valid?
|
277
|
+
status_validator = EnumAttributeValidator.new('String', ['PENDING', 'COMPLETED', 'FAILED', 'CANCELLED', 'AUTHORIZING', 'REJECTED'])
|
278
|
+
return false unless status_validator.valid?(@status)
|
246
279
|
true
|
247
280
|
end
|
248
281
|
|
282
|
+
# Custom attribute writer method checking allowed values (enum).
|
283
|
+
# @param [Object] status Object to be assigned
|
284
|
+
def status=(status)
|
285
|
+
validator = EnumAttributeValidator.new('String', ['PENDING', 'COMPLETED', 'FAILED', 'CANCELLED', 'AUTHORIZING', 'REJECTED'])
|
286
|
+
unless validator.valid?(status)
|
287
|
+
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
288
|
+
end
|
289
|
+
@status = status
|
290
|
+
end
|
291
|
+
|
249
292
|
# Checks equality by comparing each attribute.
|
250
293
|
# @param [Object] Object to be compared
|
251
294
|
def ==(o)
|
@@ -272,7 +315,8 @@ module Wire4Client
|
|
272
315
|
sender_account == o.sender_account &&
|
273
316
|
sender_bank == o.sender_bank &&
|
274
317
|
sender_name == o.sender_name &&
|
275
|
-
sender_rfc == o.sender_rfc
|
318
|
+
sender_rfc == o.sender_rfc &&
|
319
|
+
status == o.status
|
276
320
|
end
|
277
321
|
|
278
322
|
# @see the `==` method
|
@@ -284,7 +328,7 @@ module Wire4Client
|
|
284
328
|
# Calculates hash code according to all attributes.
|
285
329
|
# @return [Fixnum] Hash code
|
286
330
|
def hash
|
287
|
-
[amount, beneficiary_account, beneficiary_name, beneficiary_rfc, cep, 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
|
331
|
+
[amount, beneficiary_account, beneficiary_name, beneficiary_rfc, cep, 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, status].hash
|
288
332
|
end
|
289
333
|
|
290
334
|
# Builds the object from hash
|
@@ -30,6 +30,9 @@ module Wire4Client
|
|
30
30
|
# Es el nombre del depositante.
|
31
31
|
attr_accessor :name
|
32
32
|
|
33
|
+
# Es el estatus del depositante.
|
34
|
+
attr_accessor :status
|
35
|
+
|
33
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
37
|
def self.attribute_map
|
35
38
|
{
|
@@ -37,7 +40,8 @@ module Wire4Client
|
|
37
40
|
:'currency_code' => :'currency_code',
|
38
41
|
:'depositant_clabe' => :'depositant_clabe',
|
39
42
|
:'email' => :'email',
|
40
|
-
:'name' => :'name'
|
43
|
+
:'name' => :'name',
|
44
|
+
:'status' => :'status'
|
41
45
|
}
|
42
46
|
end
|
43
47
|
|
@@ -48,7 +52,8 @@ module Wire4Client
|
|
48
52
|
:'currency_code' => :'String',
|
49
53
|
:'depositant_clabe' => :'String',
|
50
54
|
:'email' => :'Array<String>',
|
51
|
-
:'name' => :'String'
|
55
|
+
:'name' => :'String',
|
56
|
+
:'status' => :'String'
|
52
57
|
}
|
53
58
|
end
|
54
59
|
|
@@ -81,6 +86,10 @@ module Wire4Client
|
|
81
86
|
if attributes.has_key?(:'name')
|
82
87
|
self.name = attributes[:'name']
|
83
88
|
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'status')
|
91
|
+
self.status = attributes[:'status']
|
92
|
+
end
|
84
93
|
end
|
85
94
|
|
86
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -105,7 +114,8 @@ module Wire4Client
|
|
105
114
|
currency_code == o.currency_code &&
|
106
115
|
depositant_clabe == o.depositant_clabe &&
|
107
116
|
email == o.email &&
|
108
|
-
name == o.name
|
117
|
+
name == o.name &&
|
118
|
+
status == o.status
|
109
119
|
end
|
110
120
|
|
111
121
|
# @see the `==` method
|
@@ -117,7 +127,7 @@ module Wire4Client
|
|
117
127
|
# Calculates hash code according to all attributes.
|
118
128
|
# @return [Fixnum] Hash code
|
119
129
|
def hash
|
120
|
-
[_alias, currency_code, depositant_clabe, email, name].hash
|
130
|
+
[_alias, currency_code, depositant_clabe, email, name, status].hash
|
121
131
|
end
|
122
132
|
|
123
133
|
# Builds the object from hash
|