inter_api 2.0.0 → 2.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 916894b13dfca9706d937b33783c82abadfa0b38cd8e453c16cf38722cbf91bd
4
- data.tar.gz: cfe2a096a7ff9b744e30710f750caac01a29b32d84e8bbe9a55d2d062650967f
3
+ metadata.gz: 4cffa20a97fdb046b24f8ca8fc61d2b1f49784ce69b9fbb2d7a0a2f2dc7fb69b
4
+ data.tar.gz: 42786c125f148c254f2900352139b66a0558b6080daf34cfce5a2695998d4c43
5
5
  SHA512:
6
- metadata.gz: c7767f24ea9c94da6f4fba3e5a8e11b5314999a897fcd04c36470dcf8bf5c9da6154ebdc4fb8501cf339c3746c6f3d86e2ae9aadfbb1379b37268751de7b4151
7
- data.tar.gz: 3d2be806b3bc8c4ce6323bebc0a64d19ed2050e373ef785da9d9292b690016843cdb8c76a7a0e618a597f857751bb5a12c90500113ad615611dc7eb67d68aa1d
6
+ metadata.gz: 9c5dba5c4a6f064ba16434e4e858e1f473ff8f9a3f0d14515acf1b2f1eb25a4060b1374b86d5a1fcd36ccd8af7db601fc37a215f15c6c1cbe0feca2287f23e3e
7
+ data.tar.gz: 1a22c4b3025bc13d23b14719fedcbc4bfa25b47da6cac7eee0a2a6302fe1e26a11624f90fa42f1b555a97155c76b88a88d3fdf7504c81dc1ab7de809ea059be9
@@ -5,7 +5,6 @@ module InterApi
5
5
  SAVE_RESPONSES = true
6
6
 
7
7
  attr_reader :crt, :key, :client_id, :client_secret, :chave_pix, :conta_corrente, :scopes
8
- attr_accessor :access_token, :token_expires_at
9
8
  def initialize(crt:, key:, client_id:, client_secret:, chave_pix:, conta_corrente:, scopes: "cobv.write cobv.read cob.write cob.read pix.write pix.read webhook.read webhook.write", access_token: nil, token_expires_at: nil)
10
9
  @crt = crt
11
10
  @key = key
@@ -18,15 +17,6 @@ module InterApi
18
17
  @token_expires_at = token_expires_at
19
18
  end
20
19
 
21
- def access_token
22
- authorize if should_refresh?
23
- @access_token
24
- end
25
-
26
- def should_refresh?
27
- @access_token.blank? || @token_expires_at&.past?
28
- end
29
-
30
20
  def default_options
31
21
  {
32
22
  sslcert: crt,
@@ -38,7 +28,7 @@ module InterApi
38
28
  }
39
29
  end
40
30
 
41
- def authorize
31
+ def refresh_token
42
32
  headers = {
43
33
  "Content-Type" => "application/x-www-form-urlencoded"
44
34
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InterApi
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inter_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todas Essas Coisas