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,204 @@
|
|
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 PaymentRequestResponse
|
17
|
+
# Es la referencia de pago generada para la petición (solicitud).
|
18
|
+
attr_accessor :reference
|
19
|
+
|
20
|
+
# Es el identificador público generado para la petición (solicitud).
|
21
|
+
attr_accessor :request_id
|
22
|
+
|
23
|
+
# Url del portal en donde se debe capturar los datos de la tarjeta para aplicar el cargo
|
24
|
+
attr_accessor :url
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'reference' => :'reference',
|
30
|
+
:'request_id' => :'request_id',
|
31
|
+
:'url' => :'url'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.swagger_types
|
37
|
+
{
|
38
|
+
:'reference' => :'String',
|
39
|
+
:'request_id' => :'String',
|
40
|
+
:'url' => :'String'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Initializes the object
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
+
def initialize(attributes = {})
|
47
|
+
return unless attributes.is_a?(Hash)
|
48
|
+
|
49
|
+
# convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
51
|
+
|
52
|
+
if attributes.has_key?(:'reference')
|
53
|
+
self.reference = attributes[:'reference']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'request_id')
|
57
|
+
self.request_id = attributes[:'request_id']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'url')
|
61
|
+
self.url = attributes[:'url']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
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
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
reference == o.reference &&
|
84
|
+
request_id == o.request_id &&
|
85
|
+
url == o.url
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[reference, request_id, url].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :BOOLEAN
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
temp_model = Wire4Client.const_get(type).new
|
158
|
+
temp_model.build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
next if value.nil?
|
181
|
+
hash[param] = _to_hash(value)
|
182
|
+
end
|
183
|
+
hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Outputs non-array value in the form of hash
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
188
|
+
# @param [Object] value Any valid value
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
190
|
+
def _to_hash(value)
|
191
|
+
if value.is_a?(Array)
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
193
|
+
elsif value.is_a?(Hash)
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
+
end
|
197
|
+
elsif value.respond_to? :to_hash
|
198
|
+
value.to_hash
|
199
|
+
else
|
200
|
+
value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
@@ -0,0 +1,199 @@
|
|
1
|
+
=begin
|
2
|
+
#Wire4RestAPI
|
3
|
+
|
4
|
+
#Referencia de la API de Wire4
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.10
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Wire4Client
|
16
|
+
# Contiene el conjunto de transacciones SPEI y SPID registradas bajo una misma petición
|
17
|
+
class PaymentsSpeiAndSpidOrderId
|
18
|
+
# Lista de las transacciones spei registradas
|
19
|
+
attr_accessor :spei
|
20
|
+
|
21
|
+
# Lista de las transacciones spid registradas
|
22
|
+
attr_accessor :spid
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'spei' => :'spei',
|
28
|
+
:'spid' => :'spid'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'spei' => :'Array<Payment>',
|
36
|
+
:'spid' => :'Array<Payment>'
|
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?(:'spei')
|
49
|
+
if (value = attributes[:'spei']).is_a?(Array)
|
50
|
+
self.spei = value
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
if attributes.has_key?(:'spid')
|
55
|
+
if (value = attributes[:'spid']).is_a?(Array)
|
56
|
+
self.spid = value
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
true
|
72
|
+
end
|
73
|
+
|
74
|
+
# Checks equality by comparing each attribute.
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
spei == o.spei &&
|
80
|
+
spid == o.spid
|
81
|
+
end
|
82
|
+
|
83
|
+
# @see the `==` method
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def eql?(o)
|
86
|
+
self == o
|
87
|
+
end
|
88
|
+
|
89
|
+
# Calculates hash code according to all attributes.
|
90
|
+
# @return [Fixnum] Hash code
|
91
|
+
def hash
|
92
|
+
[spei, spid].hash
|
93
|
+
end
|
94
|
+
|
95
|
+
# Builds the object from hash
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
+
# @return [Object] Returns the model itself
|
98
|
+
def build_from_hash(attributes)
|
99
|
+
return nil unless attributes.is_a?(Hash)
|
100
|
+
self.class.swagger_types.each_pair do |key, type|
|
101
|
+
if type =~ /\AArray<(.*)>/i
|
102
|
+
# check to ensure the input is an array given that the the attribute
|
103
|
+
# is documented as an array but the input is not
|
104
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
105
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
106
|
+
end
|
107
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
108
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
109
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
110
|
+
end
|
111
|
+
|
112
|
+
self
|
113
|
+
end
|
114
|
+
|
115
|
+
# Deserializes the data based on type
|
116
|
+
# @param string type Data type
|
117
|
+
# @param string value Value to be deserialized
|
118
|
+
# @return [Object] Deserialized data
|
119
|
+
def _deserialize(type, value)
|
120
|
+
case type.to_sym
|
121
|
+
when :DateTime
|
122
|
+
DateTime.parse(value)
|
123
|
+
when :Date
|
124
|
+
Date.parse(value)
|
125
|
+
when :String
|
126
|
+
value.to_s
|
127
|
+
when :Integer
|
128
|
+
value.to_i
|
129
|
+
when :Float
|
130
|
+
value.to_f
|
131
|
+
when :BOOLEAN
|
132
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
133
|
+
true
|
134
|
+
else
|
135
|
+
false
|
136
|
+
end
|
137
|
+
when :Object
|
138
|
+
# generic object (usually a Hash), return directly
|
139
|
+
value
|
140
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
141
|
+
inner_type = Regexp.last_match[:inner_type]
|
142
|
+
value.map { |v| _deserialize(inner_type, v) }
|
143
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
144
|
+
k_type = Regexp.last_match[:k_type]
|
145
|
+
v_type = Regexp.last_match[:v_type]
|
146
|
+
{}.tap do |hash|
|
147
|
+
value.each do |k, v|
|
148
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
else # model
|
152
|
+
temp_model = Wire4Client.const_get(type).new
|
153
|
+
temp_model.build_from_hash(value)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the string representation of the object
|
158
|
+
# @return [String] String presentation of the object
|
159
|
+
def to_s
|
160
|
+
to_hash.to_s
|
161
|
+
end
|
162
|
+
|
163
|
+
# to_body is an alias to to_hash (backward compatibility)
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
165
|
+
def to_body
|
166
|
+
to_hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the object in the form of hash
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
171
|
+
def to_hash
|
172
|
+
hash = {}
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
174
|
+
value = self.send(attr)
|
175
|
+
next if value.nil?
|
176
|
+
hash[param] = _to_hash(value)
|
177
|
+
end
|
178
|
+
hash
|
179
|
+
end
|
180
|
+
|
181
|
+
# Outputs non-array value in the form of hash
|
182
|
+
# For object, use to_hash. Otherwise, just return the value
|
183
|
+
# @param [Object] value Any valid value
|
184
|
+
# @return [Hash] Returns the value in the form of hash
|
185
|
+
def _to_hash(value)
|
186
|
+
if value.is_a?(Array)
|
187
|
+
value.compact.map { |v| _to_hash(v) }
|
188
|
+
elsif value.is_a?(Hash)
|
189
|
+
{}.tap do |hash|
|
190
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
191
|
+
end
|
192
|
+
elsif value.respond_to? :to_hash
|
193
|
+
value.to_hash
|
194
|
+
else
|
195
|
+
value
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
#Wire4RestAPI
|
3
|
+
|
4
|
+
#Referencia de la API de Wire4
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.10
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Wire4Client
|
16
|
+
# Contiene el conjunto de transacciones SPEI y SPID registradas bajo una misma petición
|
17
|
+
class PaymentsSpeiAndSpidRequestId
|
18
|
+
# Fecha en que el usuario propietario del token emitió la autorización
|
19
|
+
attr_accessor :authorization_date
|
20
|
+
|
21
|
+
# Fecha en que se realizó la petición de registro de transacciones
|
22
|
+
attr_accessor :request_date
|
23
|
+
|
24
|
+
# Identificador de la petición del registro de transacciones
|
25
|
+
attr_accessor :request_id
|
26
|
+
|
27
|
+
# Lista de las transacciones spei registradas
|
28
|
+
attr_accessor :spei
|
29
|
+
|
30
|
+
# Lista de las transacciones spid registradas
|
31
|
+
attr_accessor :spid
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'authorization_date' => :'authorization_date',
|
37
|
+
:'request_date' => :'request_date',
|
38
|
+
:'request_id' => :'request_id',
|
39
|
+
:'spei' => :'spei',
|
40
|
+
:'spid' => :'spid'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.swagger_types
|
46
|
+
{
|
47
|
+
:'authorization_date' => :'DateTime',
|
48
|
+
:'request_date' => :'DateTime',
|
49
|
+
:'request_id' => :'String',
|
50
|
+
:'spei' => :'Array<Payment>',
|
51
|
+
:'spid' => :'Array<Payment>'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
62
|
+
|
63
|
+
if attributes.has_key?(:'authorization_date')
|
64
|
+
self.authorization_date = attributes[:'authorization_date']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'request_date')
|
68
|
+
self.request_date = attributes[:'request_date']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'request_id')
|
72
|
+
self.request_id = attributes[:'request_id']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'spei')
|
76
|
+
if (value = attributes[:'spei']).is_a?(Array)
|
77
|
+
self.spei = value
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'spid')
|
82
|
+
if (value = attributes[:'spid']).is_a?(Array)
|
83
|
+
self.spid = value
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
+
# @return Array for valid properties with the reasons
|
90
|
+
def list_invalid_properties
|
91
|
+
invalid_properties = Array.new
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
authorization_date == o.authorization_date &&
|
107
|
+
request_date == o.request_date &&
|
108
|
+
request_id == o.request_id &&
|
109
|
+
spei == o.spei &&
|
110
|
+
spid == o.spid
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Fixnum] Hash code
|
121
|
+
def hash
|
122
|
+
[authorization_date, request_date, request_id, spei, spid].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def build_from_hash(attributes)
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
130
|
+
self.class.swagger_types.each_pair do |key, type|
|
131
|
+
if type =~ /\AArray<(.*)>/i
|
132
|
+
# check to ensure the input is an array given that the the attribute
|
133
|
+
# is documented as an array but the input is not
|
134
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
135
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
136
|
+
end
|
137
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
138
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
139
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
140
|
+
end
|
141
|
+
|
142
|
+
self
|
143
|
+
end
|
144
|
+
|
145
|
+
# Deserializes the data based on type
|
146
|
+
# @param string type Data type
|
147
|
+
# @param string value Value to be deserialized
|
148
|
+
# @return [Object] Deserialized data
|
149
|
+
def _deserialize(type, value)
|
150
|
+
case type.to_sym
|
151
|
+
when :DateTime
|
152
|
+
DateTime.parse(value)
|
153
|
+
when :Date
|
154
|
+
Date.parse(value)
|
155
|
+
when :String
|
156
|
+
value.to_s
|
157
|
+
when :Integer
|
158
|
+
value.to_i
|
159
|
+
when :Float
|
160
|
+
value.to_f
|
161
|
+
when :BOOLEAN
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
163
|
+
true
|
164
|
+
else
|
165
|
+
false
|
166
|
+
end
|
167
|
+
when :Object
|
168
|
+
# generic object (usually a Hash), return directly
|
169
|
+
value
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each do |k, v|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
else # model
|
182
|
+
temp_model = Wire4Client.const_get(type).new
|
183
|
+
temp_model.build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
next if value.nil?
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
@@ -67,10 +67,6 @@ module Wire4Client
|
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
69
|
invalid_properties = Array.new
|
70
|
-
if @last_name.nil?
|
71
|
-
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
72
|
-
end
|
73
|
-
|
74
70
|
if @middle_name.nil?
|
75
71
|
invalid_properties.push('invalid value for "middle_name", middle_name cannot be nil.')
|
76
72
|
end
|
@@ -85,7 +81,6 @@ module Wire4Client
|
|
85
81
|
# Check to see if the all the properties in the model are valid
|
86
82
|
# @return true if the model is valid
|
87
83
|
def valid?
|
88
|
-
return false if @last_name.nil?
|
89
84
|
return false if @middle_name.nil?
|
90
85
|
return false if @name.nil?
|
91
86
|
true
|