pier-sdk-ruby 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. data/README.md +141 -0
  2. data/docs/AuthToken.md +12 -0
  3. data/docs/BodyAccessToken.md +10 -0
  4. data/docs/CancelarCartaoResponse.md +11 -0
  5. data/docs/CartaoApi.md +252 -0
  6. data/docs/CartaoResponse.md +29 -0
  7. data/docs/ConsultarCartaoResponse.md +10 -0
  8. data/docs/ConsultarContaCartaoResponse.md +18 -0
  9. data/docs/ConsultarContaResponse.md +11 -0
  10. data/docs/ConsultarExtratoContaResponse.md +23 -0
  11. data/docs/ConsultarSaldoLimitesResponse.md +23 -0
  12. data/docs/ContaApi.md +238 -0
  13. data/docs/ContaCartaoResponse.md +21 -0
  14. data/docs/ContaResponse.md +41 -0
  15. data/docs/DesbloquearCartaoResponse.md +9 -0
  16. data/docs/ExtraInfo.md +8 -0
  17. data/docs/ExtratoResponse.md +35 -0
  18. data/docs/PessoaFisicaResponse.md +26 -0
  19. data/docs/SaldoLimiteResponse.md +39 -0
  20. data/docs/TokenApi.md +114 -0
  21. data/git_push.sh +52 -0
  22. data/lib/pier-sdk-ruby.rb +62 -0
  23. data/lib/pier-sdk-ruby/api/cartao_api.rb +355 -0
  24. data/lib/pier-sdk-ruby/api/conta_api.rb +324 -0
  25. data/lib/pier-sdk-ruby/api/token_api.rb +157 -0
  26. data/lib/pier-sdk-ruby/api_client.rb +368 -0
  27. data/lib/pier-sdk-ruby/api_error.rb +40 -0
  28. data/lib/pier-sdk-ruby/configuration.rb +177 -0
  29. data/lib/pier-sdk-ruby/models/auth_token.rb +325 -0
  30. data/lib/pier-sdk-ruby/models/body_access_token.rb +275 -0
  31. data/lib/pier-sdk-ruby/models/cancelar_cartao_response.rb +286 -0
  32. data/lib/pier-sdk-ruby/models/cartao_response.rb +736 -0
  33. data/lib/pier-sdk-ruby/models/consultar_cartao_response.rb +263 -0
  34. data/lib/pier-sdk-ruby/models/consultar_conta_cartao_response.rb +461 -0
  35. data/lib/pier-sdk-ruby/models/consultar_conta_response.rb +288 -0
  36. data/lib/pier-sdk-ruby/models/consultar_extrato_conta_response.rb +588 -0
  37. data/lib/pier-sdk-ruby/models/consultar_saldo_limites_response.rb +586 -0
  38. data/lib/pier-sdk-ruby/models/conta_cartao_response.rb +536 -0
  39. data/lib/pier-sdk-ruby/models/conta_response.rb +1036 -0
  40. data/lib/pier-sdk-ruby/models/desbloquear_cartao_response.rb +236 -0
  41. data/lib/pier-sdk-ruby/models/extra_info.rb +211 -0
  42. data/lib/pier-sdk-ruby/models/extrato_response.rb +886 -0
  43. data/lib/pier-sdk-ruby/models/pessoa_fisica_response.rb +661 -0
  44. data/lib/pier-sdk-ruby/models/saldo_limite_response.rb +986 -0
  45. data/lib/pier-sdk-ruby/version.rb +19 -0
  46. data/pier-sdk-ruby.gemspec +33 -0
  47. data/spec/api/cartao_api_spec.rb +110 -0
  48. data/spec/api/conta_api_spec.rb +107 -0
  49. data/spec/api/token_api_spec.rb +71 -0
  50. data/spec/models/auth_token_spec.rb +90 -0
  51. data/spec/models/body_access_token_spec.rb +70 -0
  52. data/spec/models/cancelar_cartao_response_spec.rb +80 -0
  53. data/spec/models/cartao_response_spec.rb +260 -0
  54. data/spec/models/consultar_cartao_response_spec.rb +70 -0
  55. data/spec/models/consultar_conta_cartao_response_spec.rb +150 -0
  56. data/spec/models/consultar_conta_response_spec.rb +80 -0
  57. data/spec/models/consultar_extrato_conta_response_spec.rb +200 -0
  58. data/spec/models/consultar_saldo_limites_response_spec.rb +200 -0
  59. data/spec/models/conta_cartao_response_spec.rb +180 -0
  60. data/spec/models/conta_response_spec.rb +380 -0
  61. data/spec/models/desbloquear_cartao_response_spec.rb +60 -0
  62. data/spec/models/extra_info_spec.rb +50 -0
  63. data/spec/models/extrato_response_spec.rb +320 -0
  64. data/spec/models/pessoa_fisica_response_spec.rb +230 -0
  65. data/spec/models/saldo_limite_response_spec.rb +360 -0
  66. metadata +310 -0
@@ -0,0 +1,19 @@
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
+ module Pier
18
+ VERSION = "1.0.0"
19
+ end
@@ -0,0 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "pier-sdk-ruby/version"
4
+
5
+ Gem::Specification.new do |s|
6
+
7
+ s.name = "pier-sdk-ruby"
8
+ s.version = Pier::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Thiago Sampaio"]
11
+ s.email = ["thiago.sampaio@conductor.com.br"]
12
+ s.homepage = "https://github.com/devconductor/pier-sdk-ruby"
13
+ s.summary = "SDK Ruby para consumo das APIs do PIER Labs"
14
+ s.description = "https://github.com/devconductor/pier-sdk-ruby"
15
+ s.license = "Apache 2.0"
16
+
17
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
18
+ s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
19
+
20
+ s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
21
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
22
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
23
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
24
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
25
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
26
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
27
+
28
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
29
+ #s.test_files = `find spec/*`.split("\n")
30
+ s.executables = []
31
+ s.require_paths = ["lib"]
32
+
33
+ end
@@ -0,0 +1,110 @@
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
+
20
+ # Unit tests for Pier::CartaoApi
21
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
22
+ # Please update as you see appropriate
23
+ describe 'CartaoApi' do
24
+ before do
25
+ # run before each test
26
+ @instance = Pier::CartaoApi.new
27
+ end
28
+
29
+ after do
30
+ # run after each test
31
+ end
32
+
33
+ describe 'test an instance of CartaoApi' do
34
+ it 'should create an instact of CartaoApi' do
35
+ @instance.should be_a(Pier::CartaoApi)
36
+ end
37
+ end
38
+
39
+ # unit tests for bloquear_cartao_using_post
40
+ # /contas/{idConta}/cartoes/{idCartao}/bloquear
41
+ # Bloquear um determinado cart\u00C3\u00A3o
42
+ # @param id_conta ID da Conta
43
+ # @param id_cartao ID do Cart\u00C3\u00A3o que deseja cancelar
44
+ # @param motivo Motivo do bloqueio
45
+ # @param [Hash] opts the optional parameters
46
+ # @option opts [String] :observacao Alguma observa\u00C3\u00A7\u00C3\u00A3o para o bloqueio
47
+ # @return [CancelarCartaoResponse]
48
+ describe 'bloquear_cartao_using_post test' do
49
+ it "should work" do
50
+ # assertion here
51
+ # should be_a()
52
+ # should be_nil
53
+ # should ==
54
+ # should_not ==
55
+ end
56
+ end
57
+
58
+ # unit tests for consultar_cartao_using_get
59
+ # /contas/{idConta}/cartoes/{idCartao}
60
+ # Consultar as informa\u00C3\u00A7\u00C3\u00B5es de um determinado cart\u00C3\u00A3o de uma conta
61
+ # @param id_conta ID da Conta que pertence o cart\u00C3\u00A3o
62
+ # @param id_cartao ID do Cart\u00C3\u00A3o que deseja consultar
63
+ # @param [Hash] opts the optional parameters
64
+ # @option opts [String] :numero_cartao N\u00C3\u00BAmero do Cart\u00C3\u00A3o que deseja consultar (opcional)
65
+ # @return [ConsultarCartaoResponse]
66
+ describe 'consultar_cartao_using_get test' do
67
+ it "should work" do
68
+ # assertion here
69
+ # should be_a()
70
+ # should be_nil
71
+ # should ==
72
+ # should_not ==
73
+ end
74
+ end
75
+
76
+ # unit tests for consultar_cartoes_using_get
77
+ # /contas/{idConta}/cartoes
78
+ # Consultar todos os cart\u00C3\u00B5es de uma determinada conta
79
+ # @param id_conta ID da Conta
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [ConsultarCartaoResponse]
82
+ describe 'consultar_cartoes_using_get test' do
83
+ it "should work" do
84
+ # assertion here
85
+ # should be_a()
86
+ # should be_nil
87
+ # should ==
88
+ # should_not ==
89
+ end
90
+ end
91
+
92
+ # unit tests for desbloquear_cartao_using_post
93
+ # /contas/{idConta}/cartoes/{idCartao}/desbloquear
94
+ # Desbloquear cart\u00C3\u00A3o de uma determinada conta
95
+ # @param id_conta ID da Conta
96
+ # @param id_cartao ID do Cart\u00C3\u00A3o que deseja consultar o saldo/limite
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [String] :codigo_segurancao C\u00C3\u00B3digo seguran\u00C3\u00A7a do cart\u00C3\u00A3o
99
+ # @return [DesbloquearCartaoResponse]
100
+ describe 'desbloquear_cartao_using_post test' do
101
+ it "should work" do
102
+ # assertion here
103
+ # should be_a()
104
+ # should be_nil
105
+ # should ==
106
+ # should_not ==
107
+ end
108
+ end
109
+
110
+ end
@@ -0,0 +1,107 @@
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
+
20
+ # Unit tests for Pier::ContaApi
21
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
22
+ # Please update as you see appropriate
23
+ describe 'ContaApi' do
24
+ before do
25
+ # run before each test
26
+ @instance = Pier::ContaApi.new
27
+ end
28
+
29
+ after do
30
+ # run after each test
31
+ end
32
+
33
+ describe 'test an instance of ContaApi' do
34
+ it 'should create an instact of ContaApi' do
35
+ @instance.should be_a(Pier::ContaApi)
36
+ end
37
+ end
38
+
39
+ # unit tests for buscar_conta_using_get
40
+ # /contas/buscar
41
+ # Consulte contas filtrando pelos campos id do emissor, n\u00C3\u00BAmero do cart\u00C3\u00A3o, nome ou CPF/CNPJ
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [String] :nome Nome
44
+ # @option opts [String] :cpf CPF (opcional caso nao informe o n\u00C3\u00BAmero do cart\u00C3\u00A3o ou id da conta)
45
+ # @option opts [String] :numero_cartao N\u00C3\u00BAmero do cart\u00C3\u00A3o (opcional caso n\u00C3\u00A3o informa o cpf ou id da conta)
46
+ # @option opts [Integer] :id_conta ID da Conta (opcional caso n\u00C3\u00A3o informe o n\u00C3\u00BAmero do cart\u00C3\u00A3o ou cpf)
47
+ # @return [ConsultarContaResponse]
48
+ describe 'buscar_conta_using_get test' do
49
+ it "should work" do
50
+ # assertion here
51
+ # should be_a()
52
+ # should be_nil
53
+ # should ==
54
+ # should_not ==
55
+ end
56
+ end
57
+
58
+ # unit tests for consultar_conta_using_get
59
+ # /contas/{idConta}
60
+ # Consulte informa\u00C3\u00A7\u00C3\u00B5es de uma determinada conta
61
+ # @param id_conta ID da Conta
62
+ # @param [Hash] opts the optional parameters
63
+ # @return [ContaResponse]
64
+ describe 'consultar_conta_using_get test' do
65
+ it "should work" do
66
+ # assertion here
67
+ # should be_a()
68
+ # should be_nil
69
+ # should ==
70
+ # should_not ==
71
+ end
72
+ end
73
+
74
+ # unit tests for consultar_extrato_faturas_using_get
75
+ # /contas/{idConta}/faturas
76
+ # Consulte os extratos/faturas de uma determinada conta
77
+ # @param id_conta ID da Conta
78
+ # @param data_vencimento Data limite para o vencimento das transa\u00C3\u00A7\u00C3\u00B5es
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [ConsultarExtratoContaResponse]
81
+ describe 'consultar_extrato_faturas_using_get test' do
82
+ it "should work" do
83
+ # assertion here
84
+ # should be_a()
85
+ # should be_nil
86
+ # should ==
87
+ # should_not ==
88
+ end
89
+ end
90
+
91
+ # unit tests for consultar_saldos_limites_using_get
92
+ # /contas/{idConta}/limites
93
+ # Consulte os limites de uma determinada conta
94
+ # @param id_conta ID da Conta
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [ConsultarSaldoLimitesResponse]
97
+ describe 'consultar_saldos_limites_using_get test' do
98
+ it "should work" do
99
+ # assertion here
100
+ # should be_a()
101
+ # should be_nil
102
+ # should ==
103
+ # should_not ==
104
+ end
105
+ end
106
+
107
+ end
@@ -0,0 +1,71 @@
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
+
20
+ # Unit tests for Pier::TokenApi
21
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
22
+ # Please update as you see appropriate
23
+ describe 'TokenApi' do
24
+ before do
25
+ # run before each test
26
+ @instance = Pier::TokenApi.new
27
+ end
28
+
29
+ after do
30
+ # run after each test
31
+ end
32
+
33
+ describe 'test an instance of TokenApi' do
34
+ it 'should create an instact of TokenApi' do
35
+ @instance.should be_a(Pier::TokenApi)
36
+ end
37
+ end
38
+
39
+ # unit tests for callback_using_post
40
+ # /tokens/callback
41
+ #
42
+ # @param body_access_token bodyAccessToken
43
+ # @param [Hash] opts the optional parameters
44
+ # @return [BodyAccessToken]
45
+ describe 'callback_using_post test' do
46
+ it "should work" do
47
+ # assertion here
48
+ # should be_a()
49
+ # should be_nil
50
+ # should ==
51
+ # should_not ==
52
+ end
53
+ end
54
+
55
+ # unit tests for validar_using_post
56
+ # /tokens/validar
57
+ #
58
+ # @param body_access_token bodyAccessToken
59
+ # @param [Hash] opts the optional parameters
60
+ # @return [Object]
61
+ describe 'validar_using_post test' do
62
+ it "should work" do
63
+ # assertion here
64
+ # should be_a()
65
+ # should be_nil
66
+ # should ==
67
+ # should_not ==
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,90 @@
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::AuthToken
22
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
23
+ # Please update as you see appropriate
24
+ describe 'AuthToken' do
25
+ before do
26
+ # run before each test
27
+ @instance = Pier::AuthToken.new
28
+ end
29
+
30
+ after do
31
+ # run after each test
32
+ end
33
+
34
+ describe 'test an instance of AuthToken' do
35
+ it 'should create an instact of AuthToken' do
36
+ @instance.should be_a(Pier::AuthToken)
37
+ end
38
+ end
39
+ describe 'test attribute "code"' 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 "extra_info"' 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 "id"' 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 "owner"' 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 "status"' 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
+ end
90
+
@@ -0,0 +1,70 @@
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::BodyAccessToken
22
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
23
+ # Please update as you see appropriate
24
+ describe 'BodyAccessToken' do
25
+ before do
26
+ # run before each test
27
+ @instance = Pier::BodyAccessToken.new
28
+ end
29
+
30
+ after do
31
+ # run after each test
32
+ end
33
+
34
+ describe 'test an instance of BodyAccessToken' do
35
+ it 'should create an instact of BodyAccessToken' do
36
+ @instance.should be_a(Pier::BodyAccessToken)
37
+ end
38
+ end
39
+ describe 'test attribute "auth_token"' 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 "action"' 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 "user"' 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
+ end
70
+