wire4_client 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,6 +26,9 @@ module Wire4Client
26
26
  # El RFC del beneficiario
27
27
  attr_accessor :beneficiary_rfc
28
28
 
29
+ # CEP emitido por Banxico de la transferencia, sólo en caso de que este disponible en banxico, posteriomente podrá usar la consulta de CEP del API
30
+ attr_accessor :cep
31
+
29
32
  # La clave de rastreo de la transferencia
30
33
  attr_accessor :clave_rastreo
31
34
 
@@ -81,6 +84,7 @@ module Wire4Client
81
84
  :'beneficiary_account' => :'beneficiary_account',
82
85
  :'beneficiary_name' => :'beneficiary_name',
83
86
  :'beneficiary_rfc' => :'beneficiary_rfc',
87
+ :'cep' => :'cep',
84
88
  :'clave_rastreo' => :'clave_rastreo',
85
89
  :'confirm_date' => :'confirm_date',
86
90
  :'currency_code' => :'currency_code',
@@ -107,6 +111,7 @@ module Wire4Client
107
111
  :'beneficiary_account' => :'String',
108
112
  :'beneficiary_name' => :'String',
109
113
  :'beneficiary_rfc' => :'String',
114
+ :'cep' => :'MessageCEP',
110
115
  :'clave_rastreo' => :'String',
111
116
  :'confirm_date' => :'DateTime',
112
117
  :'currency_code' => :'String',
@@ -150,6 +155,10 @@ module Wire4Client
150
155
  self.beneficiary_rfc = attributes[:'beneficiary_rfc']
151
156
  end
152
157
 
158
+ if attributes.has_key?(:'cep')
159
+ self.cep = attributes[:'cep']
160
+ end
161
+
153
162
  if attributes.has_key?(:'clave_rastreo')
154
163
  self.clave_rastreo = attributes[:'clave_rastreo']
155
164
  end
@@ -237,6 +246,7 @@ module Wire4Client
237
246
  beneficiary_account == o.beneficiary_account &&
238
247
  beneficiary_name == o.beneficiary_name &&
239
248
  beneficiary_rfc == o.beneficiary_rfc &&
249
+ cep == o.cep &&
240
250
  clave_rastreo == o.clave_rastreo &&
241
251
  confirm_date == o.confirm_date &&
242
252
  currency_code == o.currency_code &&
@@ -264,7 +274,7 @@ module Wire4Client
264
274
  # Calculates hash code according to all attributes.
265
275
  # @return [Fixnum] Hash code
266
276
  def hash
267
- [amount, beneficiary_account, beneficiary_name, beneficiary_rfc, clave_rastreo, confirm_date, currency_code, deposit_date, depositant, depositant_clabe, depositant_email, depositant_rfc, description, monex_description, monex_transaction_id, reference, sender_account, sender_bank, sender_name, sender_rfc].hash
277
+ [amount, beneficiary_account, beneficiary_name, beneficiary_rfc, cep, clave_rastreo, confirm_date, currency_code, deposit_date, depositant, depositant_clabe, depositant_email, depositant_rfc, description, monex_description, monex_transaction_id, reference, sender_account, sender_bank, sender_name, sender_rfc].hash
268
278
  end
269
279
 
270
280
  # Builds the object from hash
@@ -27,6 +27,9 @@ module Wire4Client
27
27
  # RFC del beneficiario
28
28
  attr_accessor :beneficiary_rfc
29
29
 
30
+ # Informacion del CEP
31
+ attr_accessor :cep
32
+
30
33
  # Clave de rastreo de la transferencia
31
34
  attr_accessor :clave_rastreo
32
35
 
@@ -82,6 +85,7 @@ module Wire4Client
82
85
  :'beneficiary_account' => :'beneficiary_account',
83
86
  :'beneficiary_name' => :'beneficiary_name',
84
87
  :'beneficiary_rfc' => :'beneficiary_rfc',
88
+ :'cep' => :'cep',
85
89
  :'clave_rastreo' => :'clave_rastreo',
86
90
  :'confirm_date' => :'confirm_date',
87
91
  :'currency_code' => :'currency_code',
@@ -108,6 +112,7 @@ module Wire4Client
108
112
  :'beneficiary_account' => :'String',
109
113
  :'beneficiary_name' => :'String',
110
114
  :'beneficiary_rfc' => :'String',
115
+ :'cep' => :'MessageCEP',
111
116
  :'clave_rastreo' => :'String',
112
117
  :'confirm_date' => :'DateTime',
113
118
  :'currency_code' => :'String',
@@ -151,6 +156,10 @@ module Wire4Client
151
156
  self.beneficiary_rfc = attributes[:'beneficiary_rfc']
152
157
  end
153
158
 
159
+ if attributes.has_key?(:'cep')
160
+ self.cep = attributes[:'cep']
161
+ end
162
+
154
163
  if attributes.has_key?(:'clave_rastreo')
155
164
  self.clave_rastreo = attributes[:'clave_rastreo']
156
165
  end
@@ -238,6 +247,7 @@ module Wire4Client
238
247
  beneficiary_account == o.beneficiary_account &&
239
248
  beneficiary_name == o.beneficiary_name &&
240
249
  beneficiary_rfc == o.beneficiary_rfc &&
250
+ cep == o.cep &&
241
251
  clave_rastreo == o.clave_rastreo &&
242
252
  confirm_date == o.confirm_date &&
243
253
  currency_code == o.currency_code &&
@@ -265,7 +275,7 @@ module Wire4Client
265
275
  # Calculates hash code according to all attributes.
266
276
  # @return [Fixnum] Hash code
267
277
  def hash
268
- [amount, beneficiary_account, beneficiary_name, beneficiary_rfc, clave_rastreo, confirm_date, currency_code, deposit_date, depositant, depositant_clabe, depositant_email, depositant_rfc, description, monex_description, monex_transaction_id, reference, sender_account, sender_bank, sender_name, sender_rfc].hash
278
+ [amount, beneficiary_account, beneficiary_name, beneficiary_rfc, cep, clave_rastreo, confirm_date, currency_code, deposit_date, depositant, depositant_clabe, depositant_email, depositant_rfc, description, monex_description, monex_transaction_id, reference, sender_account, sender_bank, sender_name, sender_rfc].hash
269
279
  end
270
280
 
271
281
  # Builds the object from hash
@@ -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
+ # El mensaje que se envía mediante (webHook) con la información acerca de algún cambio en el procesamiento de la petición a esta a esta API
17
+ class MessageRequestChanged
18
+ # Identificador de la petición realizada a está API
19
+ attr_accessor :request_id
20
+
21
+ # El cambio a informar en la procesamiento de la petición
22
+ attr_accessor :status
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'request_id' => :'request_id',
50
+ :'status' => :'status'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'request_id' => :'String',
58
+ :'status' => :'String'
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
69
+
70
+ if attributes.has_key?(:'request_id')
71
+ self.request_id = attributes[:'request_id']
72
+ end
73
+
74
+ if attributes.has_key?(:'status')
75
+ self.status = attributes[:'status']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ status_validator = EnumAttributeValidator.new('String', ['AUTHORIZED'])
90
+ return false unless status_validator.valid?(@status)
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method checking allowed values (enum).
95
+ # @param [Object] status Object to be assigned
96
+ def status=(status)
97
+ validator = EnumAttributeValidator.new('String', ['AUTHORIZED'])
98
+ unless validator.valid?(status)
99
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
100
+ end
101
+ @status = status
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ request_id == o.request_id &&
110
+ status == o.status
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
+ [request_id, status].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
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.10
11
11
  =end
12
12
 
13
13
  module Wire4Client
14
- VERSION = '1.0.0'
14
+ VERSION = '1.0.3'
15
15
  end
@@ -59,6 +59,20 @@ describe 'CuentasDeBeneficiariosSPEIApi' do
59
59
  end
60
60
  end
61
61
 
62
+ # unit tests for get_beneficiaries_by_request_id
63
+ # Consulta los beneficiarios por el identificador de la petición de registro
64
+ # Obtiene los beneficiarios enviados para registro en una petición al contrato relacionado con la suscripción, Los beneficiarios son los que actualmente se encuentran registrados en banca Monex, que pertenezcan a la petición que se solicita.
65
+ # @param authorization Header para token
66
+ # @param request_id El identificador de la petición del registro de beneficiarios a esta API
67
+ # @param subscription El identificador de la suscripción a esta API
68
+ # @param [Hash] opts the optional parameters
69
+ # @return [BeneficiariesResponse]
70
+ describe 'get_beneficiaries_by_request_id test' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
+ end
74
+ end
75
+
62
76
  # unit tests for get_beneficiaries_for_account_using_get
63
77
  # Consulta los beneficiarios registrados
64
78
  # Obtiene los beneficiarios registrados al contrato relacionado con la suscripción, Los beneficiarios son los que actualmente se encuentran registrados en banca Monex.
@@ -61,7 +61,7 @@ describe 'TransferenciasSPEIApi' do
61
61
 
62
62
  # unit tests for out_comming_spei_request_id_transactions_report_using_get
63
63
  # Consulta de transferencias de salida por identificador de petición
64
- # Consulta las transferencias de salida registradas en una petición, las transferencias que regresa este recuso son únicamente las transferencias de salida agrupadas al identificador de la petición que se generó al hacer el registro de las transacciones el cual se debe especificar como parte del path de este endpoint.
64
+ # Consulta las transferencias de salida registradas en una petición, las transferencias que regresa este recuso son únicamente las transferencias de salida agrupadas al identificador de la petición que se generó al hacer el registro de las transacciones el cual se debe especificar como parte del path de este endpoint.
65
65
  # @param authorization Header para token
66
66
  # @param request_id Identificador de la petición a buscar
67
67
  # @param subscription El identificador de la suscripción a esta API
@@ -98,4 +98,10 @@ describe 'AccountResponse' do
98
98
  end
99
99
  end
100
100
 
101
+ describe 'test attribute "status"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
101
107
  end
@@ -0,0 +1,75 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Wire4Client::BeneficiariesQueryRegisterStatus
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'BeneficiariesQueryRegisterStatus' do
21
+ before do
22
+ # run before each test
23
+ @instance = Wire4Client::BeneficiariesQueryRegisterStatus.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of BeneficiariesQueryRegisterStatus' do
31
+ it 'should create an instance of BeneficiariesQueryRegisterStatus' do
32
+ expect(@instance).to be_instance_of(Wire4Client::BeneficiariesQueryRegisterStatus)
33
+ end
34
+ end
35
+ describe 'test attribute "authorization_date"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "beneficiaries"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "request_date"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "request_id"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "status_request"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PENDING", "AUTHORIZED"])
63
+ # validator.allowable_values.each do |value|
64
+ # expect { @instance.status_request = value }.not_to raise_error
65
+ # end
66
+ end
67
+ end
68
+
69
+ describe 'test attribute "total_beneficiaries"' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ end