quickbooks-ruby 1.0.10 → 1.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59f6b50352335b6f8142b4b2e6ab4f3057104998119ff634f436bbf64e5009d4
|
4
|
+
data.tar.gz: c6b0639561b040957fcef550fc6e117d0f3327f522c3ec8fc87edb622ef23523
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e27ca054b8ad9281542eebcfa83fdcc6ec7a3855b7afc54fe2bb62d0981de4b1ef840b6e77ba11c164f6092263d6aa3e752b7fe0e3fc79baa747cc559a0e07cc
|
7
|
+
data.tar.gz: 0b354dd455d03cf7625f9ac0fd8cae75e928aa52bc3e5edaf2ca5a4bea5b148cef9ef0122430c360bc1e14b6130cc57e30b84caaac7c13dd2293bac8fa0ba23d
|
@@ -23,7 +23,8 @@ module Quickbooks
|
|
23
23
|
def disconnect
|
24
24
|
conn = Faraday.new
|
25
25
|
conn.basic_auth oauth.client.id, oauth.client.secret
|
26
|
-
|
26
|
+
url = "#{DISCONNECT_URL}?minorversion=#{Quickbooks.minorversion}"
|
27
|
+
response = conn.post(url, token: oauth.refresh_token || oauth.token)
|
27
28
|
|
28
29
|
if response.success?
|
29
30
|
Quickbooks::Model::AccessTokenResponse.new(error_code: "0")
|
@@ -83,7 +83,7 @@ module Quickbooks
|
|
83
83
|
query ||= default_model_query
|
84
84
|
query = "#{query} STARTPOSITION #{start_position} MAXRESULTS #{max_results}"
|
85
85
|
|
86
|
-
"#{url_for_base}/query?query=#{CGI.escape(query)}
|
86
|
+
"#{url_for_base}/query?query=#{CGI.escape(query)}"
|
87
87
|
end
|
88
88
|
|
89
89
|
private
|
@@ -229,6 +229,8 @@ module Quickbooks
|
|
229
229
|
body['file_metadata_0'] = param_part
|
230
230
|
end
|
231
231
|
|
232
|
+
url = add_query_string_to_url(url, {})
|
233
|
+
|
232
234
|
do_http(:upload, url, body, headers)
|
233
235
|
end
|
234
236
|
|
@@ -292,7 +294,9 @@ module Quickbooks
|
|
292
294
|
@oauth.post_with_multipart(url, headers: headers, body: body, raise_errors: false)
|
293
295
|
end
|
294
296
|
|
295
|
-
def add_query_string_to_url(url, params)
|
297
|
+
def add_query_string_to_url(url, params = {})
|
298
|
+
params ||= {}
|
299
|
+
params['minorversion'] = Quickbooks.minorversion
|
296
300
|
if params.is_a?(Hash) && !params.empty?
|
297
301
|
keyvalues = params.collect { |k| "#{k.first}=#{k.last}" }.join("&")
|
298
302
|
delim = url.index("?") != nil ? "&" : "?"
|
@@ -8,7 +8,7 @@ module Quickbooks
|
|
8
8
|
|
9
9
|
def create(entity, options = {})
|
10
10
|
raise Quickbooks::InvalidModelException.new(entity.errors.full_messages.join(',')) unless entity.valid?
|
11
|
-
response =
|
11
|
+
response = do_http_post(url_for_resource(model.resource_for_singular), entity.to_json, options)
|
12
12
|
if response.code.to_i == 200
|
13
13
|
JSON.parse(response.plain_body)
|
14
14
|
else
|
data/lib/quickbooks/version.rb
CHANGED
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
|
+
version: 1.0.11
|
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-06-
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|