bb_payments 0.1.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57c589452c1a03d146a21b8eba2c4cc5d0ac687fcb8c95c05af0ef52d6d50803
4
- data.tar.gz: bd0b32cf8949ddc11530567acb09a9417431b1960a98a8e415d15629f73968fb
3
+ metadata.gz: f82eaff39454611f2fc0285529214d7ae18e239bb5a75b8c2d236c5600783618
4
+ data.tar.gz: 11c7466a5a8c5848d3ca260e46bb448db393a5735eb596c526e62d7d352e6ca3
5
5
  SHA512:
6
- metadata.gz: 6e121218626cd00ab6d46a9056cee537c1d6a9b2ae9301ee71cf401061ccf6d28eaa7dc6dba8eaa1a684a34a716b71c2d38afa158d5554c1a537e1083ff811f9
7
- data.tar.gz: c7de2f2b3b0b5a00b81c6374b58a776c12012ac830c404a8ba31ca37f7b9107209a09378f78b0a6a90d9a0c71de6c3cf2f6890ea24e3d8567581a3f625d4a637
6
+ metadata.gz: c11c17cd66e8b273282cacdef7f3953d005fc967557c33cc9d4708f73d712b15939db162fac6b8cfd0a8e871c9291c04b41d156ee08892f0f7147a566490851f
7
+ data.tar.gz: bfec2bdd764bea7d24c8439b9ac8662936701ee56c56ef01e75a200713711f20546598e9c3d51932ac9a4e3855ca31a926a94f8b539e8f7121a9b2925e15a2bf
data/Gemfile CHANGED
@@ -6,6 +6,6 @@ gem 'bb_oauth', '~> 1.0', '>= 1.0.1'
6
6
 
7
7
  group :development, :test do
8
8
  gem 'rake', '~> 13.0.1'
9
- gem 'pry-byebug'
9
+ gem 'byebug'
10
10
  gem 'rubocop', '~> 0.66.0'
11
11
  end
data/Gemfile.lock CHANGED
@@ -1,42 +1,28 @@
1
- GIT
2
- remote: https://github.com/ruby-banco-brasil/bb-oauth
3
- revision: d209b2fcade3ecfae737d3c47fdded8ffa033d2b
4
- branch: main
5
- specs:
6
- bb_oauth (1.0.0)
7
- json (~> 2.1, >= 2.1.0)
8
- typhoeus (~> 1.0, >= 1.0.1)
9
-
10
1
  PATH
11
2
  remote: .
12
3
  specs:
13
- bb_payments (1.0.7)
4
+ bb_payments (0.2.0)
14
5
  bb_oauth (~> 1.0)
15
- json (~> 2.1, >= 2.1.0)
16
- typhoeus (~> 1.0, >= 1.0.1)
6
+ json (~> 2.6, >= 2.1.0)
7
+ typhoeus (~> 1.4, >= 1.0.1)
17
8
 
18
9
  GEM
19
10
  remote: https://rubygems.org/
20
11
  specs:
21
12
  ast (2.4.2)
13
+ bb_oauth (1.0.2)
14
+ json (~> 2.1, >= 2.1.0)
15
+ typhoeus (~> 1.0, >= 1.0.1)
22
16
  byebug (11.1.3)
23
- coderay (1.1.3)
24
17
  diff-lcs (1.4.4)
25
18
  ethon (0.16.0)
26
19
  ffi (>= 1.15.0)
27
20
  ffi (1.15.5)
28
21
  jaro_winkler (1.5.4)
29
22
  json (2.6.3)
30
- method_source (1.0.0)
31
23
  parallel (1.20.1)
32
24
  parser (3.0.0.0)
33
25
  ast (~> 2.4.1)
34
- pry (0.13.1)
35
- coderay (~> 1.1)
36
- method_source (~> 1.0)
37
- pry-byebug (3.9.0)
38
- byebug (~> 11.0)
39
- pry (~> 0.13.0)
40
26
  psych (3.3.0)
41
27
  rainbow (3.0.0)
42
28
  rake (13.0.3)
@@ -71,12 +57,12 @@ PLATFORMS
71
57
  x86_64-linux
72
58
 
73
59
  DEPENDENCIES
74
- bb_oauth!
60
+ bb_oauth (~> 1.0, >= 1.0.1)
75
61
  bb_payments!
76
- pry-byebug
62
+ byebug
77
63
  rake (~> 13.0.1)
78
64
  rspec (~> 3.6, >= 3.6.0)
79
65
  rubocop (~> 0.66.0)
80
66
 
81
67
  BUNDLED WITH
82
- 2.2.0
68
+ 2.4.17
Binary file
data/bb_payments.gemspec CHANGED
@@ -12,10 +12,10 @@ Gem::Specification.new do |s|
12
12
  s.summary = "A ruby wrapper for Banco do Brasil VPN Payments"
13
13
  s.description = "This gem maps to the BB Payments API"
14
14
  s.license = "MIT"
15
- s.required_ruby_version = ">= 1.9"
15
+ s.required_ruby_version = ">= 2.5"
16
16
 
17
- s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
18
- s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
17
+ s.add_runtime_dependency 'typhoeus', '~> 1.4', '>= 1.0.1'
18
+ s.add_runtime_dependency 'json', '~> 2.6', '>= 2.1.0'
19
19
  s.add_runtime_dependency 'bb_oauth', '~> 1.0'
20
20
 
21
21
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
@@ -52,7 +52,7 @@ module BancoBrasilPayments::TransfersPix
52
52
  # GET /pix/{id}
53
53
  # # Detalha todos os dados de um pagamento efetuado na modalidade PIX.
54
54
  def find_payment_pix(id, opts = {})
55
- validations(api_client: api_client, body: body, validate_body: true, required_params: { id: id })
55
+ validations(api_client: api_client, required_params: { id: id })
56
56
 
57
57
  client_opts = build_client_opts(api_client: api_client,
58
58
  gw_app_key: gw_app_key,
@@ -181,7 +181,8 @@ module BancoBrasilPayments
181
181
  # @param [Response] response HTTP response
182
182
  # @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
183
183
  def deserialize(response, return_type)
184
- body = response.body
184
+ # removing the null byte from string using the octal. It has to by with double quote string
185
+ body = response.body.delete("\x0")
185
186
 
186
187
  # handle file downloading - return the File instance processed in request callbacks
187
188
  # note that response body is empty when the file is written in chunks in request on_body callback
@@ -306,7 +307,7 @@ module BancoBrasilPayments
306
307
 
307
308
  def valid_token?
308
309
  access_token_requested_at &&
309
- (Time.zone.now - access_token_requested_at) > TOKEN_EXPIRE_TIME
310
+ (Time.zone.now - access_token_requested_at) < TOKEN_EXPIRE_TIME
310
311
  end
311
312
 
312
313
  def renew_token
@@ -161,7 +161,7 @@ module BancoBrasilPayments
161
161
  @logger = defined?(Jets) ? Jets.logger : Logger.new(STDOUT)
162
162
  @access_token_scopes = 'payments.transfers-info payments.transfer-batch-request '\
163
163
  'pagamentos-lote.lotes-requisicao pagamentos-lote.lotes-info pagamentos-lote.pagamentos-info '\
164
- 'pagamentos-lote.transferencias-pix-info pagamentos-lote.transferencias-pix-requisicao '\
164
+ 'pagamentos-lote.pix-info pagamentos-lote.transferencias-pix-info pagamentos-lote.transferencias-pix-requisicao '\
165
165
  'pagamentos-lote.cancelar-requisicao pagamentos-lote.transferencias-requisicao'
166
166
 
167
167
  yield(self) if block_given?
@@ -1,3 +1,3 @@
1
1
  module BancoBrasilPayments
2
- VERSION = '0.1.7'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bb_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roque
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-13 00:00:00.000000000 Z
12
+ date: 2023-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -17,7 +17,7 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.0'
20
+ version: '1.4'
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.0.1
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - "~>"
29
29
  - !ruby/object:Gem::Version
30
- version: '1.0'
30
+ version: '1.4'
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.1
@@ -37,7 +37,7 @@ dependencies:
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.1'
40
+ version: '2.6'
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: 2.1.0
@@ -47,7 +47,7 @@ dependencies:
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '2.1'
50
+ version: '2.6'
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: 2.1.0
@@ -100,6 +100,7 @@ files:
100
100
  - Rakefile
101
101
  - bb_payments-0.1.4.gem
102
102
  - bb_payments-0.1.5.gem
103
+ - bb_payments-0.1.7.gem
103
104
  - bb_payments.gemspec
104
105
  - docs/BankSlipsApi.md
105
106
  - docs/BarcodeCollectionFormsIDResponseObject.md
@@ -252,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
253
  requirements:
253
254
  - - ">="
254
255
  - !ruby/object:Gem::Version
255
- version: '1.9'
256
+ version: '2.5'
256
257
  required_rubygems_version: !ruby/object:Gem::Requirement
257
258
  requirements:
258
259
  - - ">="