bs2_api 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +1 -0
- data/README.md +5 -5
- data/lib/bs2_api.rb +4 -4
- data/lib/bs2_api/initializers/hash.rb +1 -1
- data/lib/bs2_api/request/auth.rb +2 -2
- data/lib/bs2_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b24281ad6b04a90d60a0a1d78a3fef7d4b2531c83bf8b5cbd0d44f76fd89695c
|
4
|
+
data.tar.gz: 1fa297c2368031535ca9b2bce0d0758027e5798cc43cd50434db853d3cfb7cd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1d72bedad6b846d25f93732988783b3c0eb728c20c60e09a61e6b3e5016874169bc9ec97dfdd7c3d6dcc464c929e0ef779b7a8929d75853ba25c985ade8192b
|
7
|
+
data.tar.gz: c82f82b0e70840cfc502ed2420af1d099d97532684db41bdefe11f6b951c560781df5211f6542d014f27bdfbdd461ce69c25b197cf6ba394f4f487357e4c1425
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -43,9 +43,9 @@ ou via initializer:
|
|
43
43
|
|
44
44
|
```ruby
|
45
45
|
Bs2Api.configure do |config|
|
46
|
-
config.client_id
|
47
|
-
config.client_secret
|
48
|
-
config.
|
46
|
+
config.client_id = 'you_bs2_client_id'
|
47
|
+
config.client_secret = 'you_bs2_client_secret'
|
48
|
+
config.env = 'sandbox' # ou production
|
49
49
|
end
|
50
50
|
```
|
51
51
|
|
@@ -107,7 +107,7 @@ pay_manual.payment.merchantId
|
|
107
107
|
|
108
108
|
# Tanto a ordem de transferência via chave ou manual tem o mesmo payment.
|
109
109
|
# Caso tenha criado via chave no passo anterior:
|
110
|
-
payment = pay_key.payment
|
110
|
+
payment = pay_key.payment
|
111
111
|
|
112
112
|
# Ou caso tenha criado a ordem via Manual no passo anterior:
|
113
113
|
payment = pay_manual.payment
|
@@ -139,4 +139,4 @@ Bs2Api::Errors::Unauthorized
|
|
139
139
|
rescue Bs2Api::Errors::Base => e
|
140
140
|
puts "Erro: #{e.message}"
|
141
141
|
end
|
142
|
-
```
|
142
|
+
```
|
data/lib/bs2_api.rb
CHANGED
@@ -37,7 +37,7 @@ require 'bs2_api/util/bank_service'
|
|
37
37
|
|
38
38
|
module Bs2Api
|
39
39
|
ENDPOINT = {
|
40
|
-
production: 'https://api.bs2.com
|
40
|
+
production: 'https://api.bs2.com',
|
41
41
|
sandbox: 'https://apihmz.bancobonsucesso.com.br'
|
42
42
|
}
|
43
43
|
|
@@ -47,7 +47,7 @@ module Bs2Api
|
|
47
47
|
def configuration
|
48
48
|
@configuration ||= Configuration.new
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
def configure
|
52
52
|
yield(configuration)
|
53
53
|
end
|
@@ -59,7 +59,7 @@ module Bs2Api
|
|
59
59
|
def production?
|
60
60
|
env == 'production'
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
def sandbox?
|
64
64
|
env == 'sandbox'
|
65
65
|
end
|
@@ -68,4 +68,4 @@ module Bs2Api
|
|
68
68
|
configuration.env
|
69
69
|
end
|
70
70
|
end
|
71
|
-
end
|
71
|
+
end
|
data/lib/bs2_api/request/auth.rb
CHANGED
data/lib/bs2_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bs2_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kim Pastro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|