quickbooks-ruby 1.0.4 → 1.0.5

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: 40551acdb7045eb4d1116184111f110f4874eb9e7391881f0e28aa9ddc4678c9
4
- data.tar.gz: c8c0d88b58964da0cde75066a6bcb79fa771945dc2abf94ae1bde9564164a85d
3
+ metadata.gz: 730a52a7a389c718c9395dadf184c2bf15b095ae6690e27554c2ff7e03446bf6
4
+ data.tar.gz: 4b536bbcb3949c2541714add495391e17099e67dde701485cadfcc1723c77612
5
5
  SHA512:
6
- metadata.gz: fdf59bc8aecbadb40920a63b7a98b6fb38690ff8ce4a416fd38866d7841b3511934a2a384b12f3bbf3ed6ccb6e22af201674d0420819e4506ca358b03a921502
7
- data.tar.gz: e71a5e129f98a03016cfd43e8e180c7dc9af8e0104d39d9052c5fd438a49bc742f667b1e9ac2e23ed3acd495d2f4d3d531c03a1fc6d907466f765aa3faa877b1
6
+ metadata.gz: 78486c69d1de4ad4dcaa8d7baab2b02085be2fb33fd9d0c6f8d2ccdafba77f9f904d38812f0921315cc47c09c53a52093c1b0b89d4d0934d93a328eb12994564
7
+ data.tar.gz: f4922a3b8debbb50f48adc34e6174997d9e27042402a142beb3ab408526b25177edee086b034dcd12fa94b278e647ed5a1749679d1e22571df50eb421a59fc76
@@ -3,8 +3,7 @@ module Quickbooks
3
3
  class AccessToken < BaseService
4
4
 
5
5
  RENEW_URL = "https://appcenter.intuit.com/api/v1/connection/reconnect"
6
- DISCONNECT_URL_OAUTH1 = "https://appcenter.intuit.com/api/v1/connection/disconnect"
7
- DISCONNECT_URL_OAUTH2 = "https://developer.api.intuit.com/v2/oauth2/tokens/revoke"
6
+ DISCONNECT_URL = "https://developer.api.intuit.com/v2/oauth2/tokens/revoke"
8
7
 
9
8
  # https://developer.intuit.com/docs/0025_quickbooksapi/0053_auth_auth/oauth_management_api#Reconnect
10
9
  def renew
@@ -22,26 +21,18 @@ module Quickbooks
22
21
 
23
22
  # https://developer.intuit.com/docs/0025_quickbooksapi/0053_auth_auth/oauth_management_api#Disconnect
24
23
  def disconnect
25
- if oauth_v1?
26
- response = do_http_get(DISCONNECT_URL_OAUTH1)
27
- if response && response.code.to_i == 200
28
- Quickbooks::Model::AccessTokenResponse.from_xml(response.plain_body)
29
- end
30
- elsif oauth_v2?
31
- conn = Faraday.new
32
- conn.basic_auth oauth.client.id, oauth.client.secret
33
- response = conn.post(DISCONNECT_URL_OAUTH2, token: oauth.refresh_token || oauth.token)
24
+ conn = Faraday.new
25
+ conn.basic_auth oauth.client.id, oauth.client.secret
26
+ response = conn.post(DISCONNECT_URL, token: oauth.refresh_token || oauth.token)
34
27
 
35
- if response.success?
36
- Quickbooks::Model::AccessTokenResponse.new(error_code: "0")
37
- else
38
- Quickbooks::Model::AccessTokenResponse.new(
39
- error_code: response.status.to_s, error_message: response.reason_phrase
40
- )
41
- end
28
+ if response.success?
29
+ Quickbooks::Model::AccessTokenResponse.new(error_code: "0")
30
+ else
31
+ Quickbooks::Model::AccessTokenResponse.new(
32
+ error_code: response.status.to_s, error_message: response.reason_phrase
33
+ )
42
34
  end
43
35
  end
44
-
45
36
  end
46
37
  end
47
38
  end
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickbooks-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Caughlan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-22 00:00:00.000000000 Z
11
+ date: 2020-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2