pier-sdk-ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +141 -0
- data/docs/AuthToken.md +12 -0
- data/docs/BodyAccessToken.md +10 -0
- data/docs/CancelarCartaoResponse.md +11 -0
- data/docs/CartaoApi.md +252 -0
- data/docs/CartaoResponse.md +29 -0
- data/docs/ConsultarCartaoResponse.md +10 -0
- data/docs/ConsultarContaCartaoResponse.md +18 -0
- data/docs/ConsultarContaResponse.md +11 -0
- data/docs/ConsultarExtratoContaResponse.md +23 -0
- data/docs/ConsultarSaldoLimitesResponse.md +23 -0
- data/docs/ContaApi.md +238 -0
- data/docs/ContaCartaoResponse.md +21 -0
- data/docs/ContaResponse.md +41 -0
- data/docs/DesbloquearCartaoResponse.md +9 -0
- data/docs/ExtraInfo.md +8 -0
- data/docs/ExtratoResponse.md +35 -0
- data/docs/PessoaFisicaResponse.md +26 -0
- data/docs/SaldoLimiteResponse.md +39 -0
- data/docs/TokenApi.md +114 -0
- data/git_push.sh +52 -0
- data/lib/pier-sdk-ruby.rb +62 -0
- data/lib/pier-sdk-ruby/api/cartao_api.rb +355 -0
- data/lib/pier-sdk-ruby/api/conta_api.rb +324 -0
- data/lib/pier-sdk-ruby/api/token_api.rb +157 -0
- data/lib/pier-sdk-ruby/api_client.rb +368 -0
- data/lib/pier-sdk-ruby/api_error.rb +40 -0
- data/lib/pier-sdk-ruby/configuration.rb +177 -0
- data/lib/pier-sdk-ruby/models/auth_token.rb +325 -0
- data/lib/pier-sdk-ruby/models/body_access_token.rb +275 -0
- data/lib/pier-sdk-ruby/models/cancelar_cartao_response.rb +286 -0
- data/lib/pier-sdk-ruby/models/cartao_response.rb +736 -0
- data/lib/pier-sdk-ruby/models/consultar_cartao_response.rb +263 -0
- data/lib/pier-sdk-ruby/models/consultar_conta_cartao_response.rb +461 -0
- data/lib/pier-sdk-ruby/models/consultar_conta_response.rb +288 -0
- data/lib/pier-sdk-ruby/models/consultar_extrato_conta_response.rb +588 -0
- data/lib/pier-sdk-ruby/models/consultar_saldo_limites_response.rb +586 -0
- data/lib/pier-sdk-ruby/models/conta_cartao_response.rb +536 -0
- data/lib/pier-sdk-ruby/models/conta_response.rb +1036 -0
- data/lib/pier-sdk-ruby/models/desbloquear_cartao_response.rb +236 -0
- data/lib/pier-sdk-ruby/models/extra_info.rb +211 -0
- data/lib/pier-sdk-ruby/models/extrato_response.rb +886 -0
- data/lib/pier-sdk-ruby/models/pessoa_fisica_response.rb +661 -0
- data/lib/pier-sdk-ruby/models/saldo_limite_response.rb +986 -0
- data/lib/pier-sdk-ruby/version.rb +19 -0
- data/pier-sdk-ruby.gemspec +33 -0
- data/spec/api/cartao_api_spec.rb +110 -0
- data/spec/api/conta_api_spec.rb +107 -0
- data/spec/api/token_api_spec.rb +71 -0
- data/spec/models/auth_token_spec.rb +90 -0
- data/spec/models/body_access_token_spec.rb +70 -0
- data/spec/models/cancelar_cartao_response_spec.rb +80 -0
- data/spec/models/cartao_response_spec.rb +260 -0
- data/spec/models/consultar_cartao_response_spec.rb +70 -0
- data/spec/models/consultar_conta_cartao_response_spec.rb +150 -0
- data/spec/models/consultar_conta_response_spec.rb +80 -0
- data/spec/models/consultar_extrato_conta_response_spec.rb +200 -0
- data/spec/models/consultar_saldo_limites_response_spec.rb +200 -0
- data/spec/models/conta_cartao_response_spec.rb +180 -0
- data/spec/models/conta_response_spec.rb +380 -0
- data/spec/models/desbloquear_cartao_response_spec.rb +60 -0
- data/spec/models/extra_info_spec.rb +50 -0
- data/spec/models/extrato_response_spec.rb +320 -0
- data/spec/models/pessoa_fisica_response_spec.rb +230 -0
- data/spec/models/saldo_limite_response_spec.rb +360 -0
- metadata +310 -0
@@ -0,0 +1,180 @@
|
|
1
|
+
=begin
|
2
|
+
CaaS - Conductor as a Service
|
3
|
+
|
4
|
+
Gest\u00C3\u00A3o de pagamento eletr\u00C3\u00B4nicos como servi\u00C3\u00A7o
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
Contact: contato@conductor.com.br
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: Apache 2.0
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0.html
|
12
|
+
|
13
|
+
Terms of Service: http://dev.conductor.com.br/terms/
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'spec_helper'
|
18
|
+
require 'json'
|
19
|
+
require 'date'
|
20
|
+
|
21
|
+
# Unit tests for Pier::ContaCartaoResponse
|
22
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
23
|
+
# Please update as you see appropriate
|
24
|
+
describe 'ContaCartaoResponse' do
|
25
|
+
before do
|
26
|
+
# run before each test
|
27
|
+
@instance = Pier::ContaCartaoResponse.new
|
28
|
+
end
|
29
|
+
|
30
|
+
after do
|
31
|
+
# run after each test
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test an instance of ContaCartaoResponse' do
|
35
|
+
it 'should create an instact of ContaCartaoResponse' do
|
36
|
+
@instance.should be_a(Pier::ContaCartaoResponse)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
describe 'test attribute "cnpj_loja"' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here
|
42
|
+
# should be_a()
|
43
|
+
# should be_nil
|
44
|
+
# should ==
|
45
|
+
# should_not ==
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'test attribute "cpf"' do
|
50
|
+
it 'should work' do
|
51
|
+
# assertion here
|
52
|
+
# should be_a()
|
53
|
+
# should be_nil
|
54
|
+
# should ==
|
55
|
+
# should_not ==
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "data_cadastro_conta"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here
|
62
|
+
# should be_a()
|
63
|
+
# should be_nil
|
64
|
+
# should ==
|
65
|
+
# should_not ==
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe 'test attribute "data_emissao_identidade"' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here
|
72
|
+
# should be_a()
|
73
|
+
# should be_nil
|
74
|
+
# should ==
|
75
|
+
# should_not ==
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe 'test attribute "data_nascimento"' do
|
80
|
+
it 'should work' do
|
81
|
+
# assertion here
|
82
|
+
# should be_a()
|
83
|
+
# should be_nil
|
84
|
+
# should ==
|
85
|
+
# should_not ==
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'test attribute "ddd_celular"' do
|
90
|
+
it 'should work' do
|
91
|
+
# assertion here
|
92
|
+
# should be_a()
|
93
|
+
# should be_nil
|
94
|
+
# should ==
|
95
|
+
# should_not ==
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe 'test attribute "id_conta"' do
|
100
|
+
it 'should work' do
|
101
|
+
# assertion here
|
102
|
+
# should be_a()
|
103
|
+
# should be_nil
|
104
|
+
# should ==
|
105
|
+
# should_not ==
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe 'test attribute "nome"' do
|
110
|
+
it 'should work' do
|
111
|
+
# assertion here
|
112
|
+
# should be_a()
|
113
|
+
# should be_nil
|
114
|
+
# should ==
|
115
|
+
# should_not ==
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
describe 'test attribute "numero_celular"' do
|
120
|
+
it 'should work' do
|
121
|
+
# assertion here
|
122
|
+
# should be_a()
|
123
|
+
# should be_nil
|
124
|
+
# should ==
|
125
|
+
# should_not ==
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
describe 'test attribute "numero_identidade"' do
|
130
|
+
it 'should work' do
|
131
|
+
# assertion here
|
132
|
+
# should be_a()
|
133
|
+
# should be_nil
|
134
|
+
# should ==
|
135
|
+
# should_not ==
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
describe 'test attribute "orgao_identidade"' do
|
140
|
+
it 'should work' do
|
141
|
+
# assertion here
|
142
|
+
# should be_a()
|
143
|
+
# should be_nil
|
144
|
+
# should ==
|
145
|
+
# should_not ==
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
describe 'test attribute "possui_compra_aprovada"' do
|
150
|
+
it 'should work' do
|
151
|
+
# assertion here
|
152
|
+
# should be_a()
|
153
|
+
# should be_nil
|
154
|
+
# should ==
|
155
|
+
# should_not ==
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
describe 'test attribute "status_conta"' do
|
160
|
+
it 'should work' do
|
161
|
+
# assertion here
|
162
|
+
# should be_a()
|
163
|
+
# should be_nil
|
164
|
+
# should ==
|
165
|
+
# should_not ==
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
describe 'test attribute "uf_identidade"' do
|
170
|
+
it 'should work' do
|
171
|
+
# assertion here
|
172
|
+
# should be_a()
|
173
|
+
# should be_nil
|
174
|
+
# should ==
|
175
|
+
# should_not ==
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
end
|
180
|
+
|
@@ -0,0 +1,380 @@
|
|
1
|
+
=begin
|
2
|
+
CaaS - Conductor as a Service
|
3
|
+
|
4
|
+
Gest\u00C3\u00A3o de pagamento eletr\u00C3\u00B4nicos como servi\u00C3\u00A7o
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
Contact: contato@conductor.com.br
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: Apache 2.0
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0.html
|
12
|
+
|
13
|
+
Terms of Service: http://dev.conductor.com.br/terms/
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'spec_helper'
|
18
|
+
require 'json'
|
19
|
+
require 'date'
|
20
|
+
|
21
|
+
# Unit tests for Pier::ContaResponse
|
22
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
23
|
+
# Please update as you see appropriate
|
24
|
+
describe 'ContaResponse' do
|
25
|
+
before do
|
26
|
+
# run before each test
|
27
|
+
@instance = Pier::ContaResponse.new
|
28
|
+
end
|
29
|
+
|
30
|
+
after do
|
31
|
+
# run after each test
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test an instance of ContaResponse' do
|
35
|
+
it 'should create an instact of ContaResponse' do
|
36
|
+
@instance.should be_a(Pier::ContaResponse)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
describe 'test attribute "bin"' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here
|
42
|
+
# should be_a()
|
43
|
+
# should be_nil
|
44
|
+
# should ==
|
45
|
+
# should_not ==
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'test attribute "cartao"' do
|
50
|
+
it 'should work' do
|
51
|
+
# assertion here
|
52
|
+
# should be_a()
|
53
|
+
# should be_nil
|
54
|
+
# should ==
|
55
|
+
# should_not ==
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "data_cadastramento"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here
|
62
|
+
# should be_a()
|
63
|
+
# should be_nil
|
64
|
+
# should ==
|
65
|
+
# should_not ==
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe 'test attribute "data_ultimo_pagamento"' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here
|
72
|
+
# should be_a()
|
73
|
+
# should be_nil
|
74
|
+
# should ==
|
75
|
+
# should_not ==
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe 'test attribute "data_venc_cobranca"' do
|
80
|
+
it 'should work' do
|
81
|
+
# assertion here
|
82
|
+
# should be_a()
|
83
|
+
# should be_nil
|
84
|
+
# should ==
|
85
|
+
# should_not ==
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'test attribute "dddcelular_sms"' do
|
90
|
+
it 'should work' do
|
91
|
+
# assertion here
|
92
|
+
# should be_a()
|
93
|
+
# should be_nil
|
94
|
+
# should ==
|
95
|
+
# should_not ==
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe 'test attribute "descricao_status"' do
|
100
|
+
it 'should work' do
|
101
|
+
# assertion here
|
102
|
+
# should be_a()
|
103
|
+
# should be_nil
|
104
|
+
# should ==
|
105
|
+
# should_not ==
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe 'test attribute "dias_em_atraso"' do
|
110
|
+
it 'should work' do
|
111
|
+
# assertion here
|
112
|
+
# should be_a()
|
113
|
+
# should be_nil
|
114
|
+
# should ==
|
115
|
+
# should_not ==
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
describe 'test attribute "emissor"' do
|
120
|
+
it 'should work' do
|
121
|
+
# assertion here
|
122
|
+
# should be_a()
|
123
|
+
# should be_nil
|
124
|
+
# should ==
|
125
|
+
# should_not ==
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
describe 'test attribute "flag_cancelamento"' do
|
130
|
+
it 'should work' do
|
131
|
+
# assertion here
|
132
|
+
# should be_a()
|
133
|
+
# should be_nil
|
134
|
+
# should ==
|
135
|
+
# should_not ==
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
describe 'test attribute "forma_envio_fatura"' do
|
140
|
+
it 'should work' do
|
141
|
+
# assertion here
|
142
|
+
# should be_a()
|
143
|
+
# should be_nil
|
144
|
+
# should ==
|
145
|
+
# should_not ==
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
describe 'test attribute "id_bandeira"' do
|
150
|
+
it 'should work' do
|
151
|
+
# assertion here
|
152
|
+
# should be_a()
|
153
|
+
# should be_nil
|
154
|
+
# should ==
|
155
|
+
# should_not ==
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
describe 'test attribute "id_conta"' do
|
160
|
+
it 'should work' do
|
161
|
+
# assertion here
|
162
|
+
# should be_a()
|
163
|
+
# should be_nil
|
164
|
+
# should ==
|
165
|
+
# should_not ==
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
describe 'test attribute "id_emissor"' do
|
170
|
+
it 'should work' do
|
171
|
+
# assertion here
|
172
|
+
# should be_a()
|
173
|
+
# should be_nil
|
174
|
+
# should ==
|
175
|
+
# should_not ==
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
describe 'test attribute "id_endereco"' do
|
180
|
+
it 'should work' do
|
181
|
+
# assertion here
|
182
|
+
# should be_a()
|
183
|
+
# should be_nil
|
184
|
+
# should ==
|
185
|
+
# should_not ==
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
describe 'test attribute "id_fantasia_basica"' do
|
190
|
+
it 'should work' do
|
191
|
+
# assertion here
|
192
|
+
# should be_a()
|
193
|
+
# should be_nil
|
194
|
+
# should ==
|
195
|
+
# should_not ==
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
describe 'test attribute "id_origem_comercial"' do
|
200
|
+
it 'should work' do
|
201
|
+
# assertion here
|
202
|
+
# should be_a()
|
203
|
+
# should be_nil
|
204
|
+
# should ==
|
205
|
+
# should_not ==
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
describe 'test attribute "id_produto"' do
|
210
|
+
it 'should work' do
|
211
|
+
# assertion here
|
212
|
+
# should be_a()
|
213
|
+
# should be_nil
|
214
|
+
# should ==
|
215
|
+
# should_not ==
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
describe 'test attribute "id_proposta"' do
|
220
|
+
it 'should work' do
|
221
|
+
# assertion here
|
222
|
+
# should be_a()
|
223
|
+
# should be_nil
|
224
|
+
# should ==
|
225
|
+
# should_not ==
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
describe 'test attribute "melhor_dia"' do
|
230
|
+
it 'should work' do
|
231
|
+
# assertion here
|
232
|
+
# should be_a()
|
233
|
+
# should be_nil
|
234
|
+
# should ==
|
235
|
+
# should_not ==
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
describe 'test attribute "nome_credor"' do
|
240
|
+
it 'should work' do
|
241
|
+
# assertion here
|
242
|
+
# should be_a()
|
243
|
+
# should be_nil
|
244
|
+
# should ==
|
245
|
+
# should_not ==
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
describe 'test attribute "nome_produto"' do
|
250
|
+
it 'should work' do
|
251
|
+
# assertion here
|
252
|
+
# should be_a()
|
253
|
+
# should be_nil
|
254
|
+
# should ==
|
255
|
+
# should_not ==
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
describe 'test attribute "num_celular_sms"' do
|
260
|
+
it 'should work' do
|
261
|
+
# assertion here
|
262
|
+
# should be_a()
|
263
|
+
# should be_nil
|
264
|
+
# should ==
|
265
|
+
# should_not ==
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
describe 'test attribute "pagamentos"' do
|
270
|
+
it 'should work' do
|
271
|
+
# assertion here
|
272
|
+
# should be_a()
|
273
|
+
# should be_nil
|
274
|
+
# should ==
|
275
|
+
# should_not ==
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
describe 'test attribute "permite_refinanciamento"' do
|
280
|
+
it 'should work' do
|
281
|
+
# assertion here
|
282
|
+
# should be_a()
|
283
|
+
# should be_nil
|
284
|
+
# should ==
|
285
|
+
# should_not ==
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
describe 'test attribute "pessoa_fisica"' do
|
290
|
+
it 'should work' do
|
291
|
+
# assertion here
|
292
|
+
# should be_a()
|
293
|
+
# should be_nil
|
294
|
+
# should ==
|
295
|
+
# should_not ==
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
describe 'test attribute "quantidade_pagamentos"' do
|
300
|
+
it 'should work' do
|
301
|
+
# assertion here
|
302
|
+
# should be_a()
|
303
|
+
# should be_nil
|
304
|
+
# should ==
|
305
|
+
# should_not ==
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
describe 'test attribute "saldo_limite"' do
|
310
|
+
it 'should work' do
|
311
|
+
# assertion here
|
312
|
+
# should be_a()
|
313
|
+
# should be_nil
|
314
|
+
# should ==
|
315
|
+
# should_not ==
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
describe 'test attribute "status"' do
|
320
|
+
it 'should work' do
|
321
|
+
# assertion here
|
322
|
+
# should be_a()
|
323
|
+
# should be_nil
|
324
|
+
# should ==
|
325
|
+
# should_not ==
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
describe 'test attribute "status_data"' do
|
330
|
+
it 'should work' do
|
331
|
+
# assertion here
|
332
|
+
# should be_a()
|
333
|
+
# should be_nil
|
334
|
+
# should ==
|
335
|
+
# should_not ==
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
describe 'test attribute "taxa_refinanciamento"' do
|
340
|
+
it 'should work' do
|
341
|
+
# assertion here
|
342
|
+
# should be_a()
|
343
|
+
# should be_nil
|
344
|
+
# should ==
|
345
|
+
# should_not ==
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
describe 'test attribute "vcto"' do
|
350
|
+
it 'should work' do
|
351
|
+
# assertion here
|
352
|
+
# should be_a()
|
353
|
+
# should be_nil
|
354
|
+
# should ==
|
355
|
+
# should_not ==
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
describe 'test attribute "vencimento1"' do
|
360
|
+
it 'should work' do
|
361
|
+
# assertion here
|
362
|
+
# should be_a()
|
363
|
+
# should be_nil
|
364
|
+
# should ==
|
365
|
+
# should_not ==
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
describe 'test attribute "vinculo_origem_usuario"' do
|
370
|
+
it 'should work' do
|
371
|
+
# assertion here
|
372
|
+
# should be_a()
|
373
|
+
# should be_nil
|
374
|
+
# should ==
|
375
|
+
# should_not ==
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
end
|
380
|
+
|