bcash-ruby 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bcash/api/accounts.rb +1 -1
- data/lib/bcash/api/create_account_response.rb +7 -0
- data/lib/bcash/api/response.rb +5 -5
- data/lib/bcash/api.rb +1 -0
- data/lib/bcash/version.rb +1 -1
- data/spec/cases/api_account_spec.rb +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 915e0b10ef28819b90385c2e80df9c28567c7174
|
4
|
+
data.tar.gz: eea7f8c64cfbb44fc5edf0f641aeade4105ef3b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b716fa7361b1a139e514aaf504dc54046c982727996936cb049802f3d08e7a2738443e7c620b41b0a9f141b66b8d334f8924f7e767a91fc6072790e763c22ca3
|
7
|
+
data.tar.gz: 27234cdb4f7cb4710f81f2293419f1fa64cf23696200e8abfc81ec622d49d57e321a17bced039740558c0cc1671d9f12dfa7a6ca7913532dba349dd206c0602d
|
data/lib/bcash/api/accounts.rb
CHANGED
data/lib/bcash/api/response.rb
CHANGED
@@ -24,6 +24,10 @@ module Bcash::Api
|
|
24
24
|
success
|
25
25
|
end
|
26
26
|
|
27
|
+
def messages
|
28
|
+
message
|
29
|
+
end
|
30
|
+
|
27
31
|
private
|
28
32
|
|
29
33
|
def parse_body(response)
|
@@ -33,11 +37,7 @@ module Bcash::Api
|
|
33
37
|
end
|
34
38
|
|
35
39
|
def value_from_errors(value)
|
36
|
-
|
37
|
-
errors.collect {|e| e[value] }
|
38
|
-
else
|
39
|
-
errors[0][value]
|
40
|
-
end
|
40
|
+
errors.collect {|e| e[value] }
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
data/lib/bcash/api.rb
CHANGED
@@ -2,6 +2,7 @@ module Bcash::Api
|
|
2
2
|
autoload :Accounts, 'bcash/api/accounts'
|
3
3
|
autoload :Response, 'bcash/api/response'
|
4
4
|
autoload :AccountResponse, 'bcash/api/account_response'
|
5
|
+
autoload :CreateAccountResponse, 'bcash/api/create_account_response'
|
5
6
|
autoload :AccountNotValidResponse, 'bcash/api/account_not_valid_response'
|
6
7
|
|
7
8
|
autoload :BaseRequest, 'bcash/api/request/base_request'
|
data/lib/bcash/version.rb
CHANGED
@@ -57,8 +57,8 @@ describe Bcash::Api::Accounts do
|
|
57
57
|
response = client.search_account_by_cpf '07800000000'
|
58
58
|
end
|
59
59
|
|
60
|
-
expect(response.code).to eq('202019')
|
61
|
-
expect(response.message).to eq('Falha na autenticação')
|
60
|
+
expect(response.code).to eq(['202019'])
|
61
|
+
expect(response.message).to eq(['Falha na autenticação'])
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcash-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raphael Costa
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/bcash/api/account_not_valid_response.rb
|
188
188
|
- lib/bcash/api/account_response.rb
|
189
189
|
- lib/bcash/api/accounts.rb
|
190
|
+
- lib/bcash/api/create_account_response.rb
|
190
191
|
- lib/bcash/api/request/account_creation_request.rb
|
191
192
|
- lib/bcash/api/request/address_request.rb
|
192
193
|
- lib/bcash/api/request/base_request.rb
|