bs2_api 0.3.0 → 0.3.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac4d8162e93c876cdd61a6be56abde26d704a31797aef6b815274c98b8e5da29
4
- data.tar.gz: fc30a8fbac319e4b810dedac2582902a59ceeacc037f2e8a3f8fc2a8f3d87a1c
3
+ metadata.gz: b24281ad6b04a90d60a0a1d78a3fef7d4b2531c83bf8b5cbd0d44f76fd89695c
4
+ data.tar.gz: 1fa297c2368031535ca9b2bce0d0758027e5798cc43cd50434db853d3cfb7cd8
5
5
  SHA512:
6
- metadata.gz: 783bbec0c5ad81733d817f0958506bbfc300c75983256454d8f050e13ef7b00640ece3fb4d59858cf5aae36656435e7164893972f103a8f495661d10be5551b2
7
- data.tar.gz: c2e1e9df5dd5040ccebcf481e6e3bb649ab2dd134a3f0be4ed50014a1543cf0de67508de31809582ddf4a850bf7333970f6284394d905c94d6c0cd4168fa90c4
6
+ metadata.gz: b1d72bedad6b846d25f93732988783b3c0eb728c20c60e09a61e6b3e5016874169bc9ec97dfdd7c3d6dcc464c929e0ef779b7a8929d75853ba25c985ade8192b
7
+ data.tar.gz: c82f82b0e70840cfc502ed2420af1d099d97532684db41bdefe11f6b951c560781df5211f6542d014f27bdfbdd461ce69c25b197cf6ba394f4f487357e4c1425
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ## [Unreleased]
1
+ ## [0.3.1] - 2021-06-16
2
+
3
+ - Method Hash#to_query conflicting with Rails
4
+
5
+ ## [0.3.0] - 2021-06-16
6
+
7
+ - Confirmation, Adjust README.md
2
8
 
3
9
  ## [0.2.0] - 2021-06-15
4
10
 
data/Gemfile.lock CHANGED
@@ -76,6 +76,7 @@ GEM
76
76
  zeitwerk (2.4.2)
77
77
 
78
78
  PLATFORMS
79
+ ruby
79
80
  x86_64-linux
80
81
 
81
82
  DEPENDENCIES
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 = 'you_bs2_client_id'
47
- config.client_secret = 'you_bs2_client_secret'
48
- config.pix_environment = 'sandbox' # ou production
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:8443',
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Hash
4
- def to_query
4
+ def queryfy
5
5
  keys.map do |key|
6
6
  "#{key}=#{self[key]}"
7
7
  end.join("&")
@@ -40,7 +40,7 @@ module Bs2Api
40
40
  {
41
41
  grant_type: "client_credentials",
42
42
  scope: "pix.write%20pix.read"
43
- }.to_query
43
+ }.queryfy
44
44
  end
45
45
 
46
46
  def auth_url
@@ -49,4 +49,4 @@ module Bs2Api
49
49
  end
50
50
  end
51
51
  end
52
- end
52
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bs2Api
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
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.0
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-16 00:00:00.000000000 Z
11
+ date: 2021-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder