quickbooks-ruby 1.0.23 → 1.0.24
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: 4d1813766ca37fe161babf9afc01d1ee20eabb6e52a65dbc5f9d5d535a1ab0e6
|
4
|
+
data.tar.gz: 75e3fa238c73483049a1f5ea0e87b51d71d9a800d5199c7c27fd3f07069a6092
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 526fb65758bd681ff76f3b63fe078af62479e1568b185131fd08b0a5ddd72e6ce635cf7bf705ee466a41b4f60060c1fe171ccece7e6148ba33d59b785a4b5493
|
7
|
+
data.tar.gz: 390e88df2ac26d751fb85b6d888cf28227b6d2a706984ea70a5a9aaec0fa2fa003eff9ae11fe53d79a423a03a952a6d6b5d7bf211126a48fc22a52632822716a
|
@@ -19,7 +19,7 @@ module Quickbooks
|
|
19
19
|
PREFERENCE_SECTIONS = {
|
20
20
|
:accounting_info => %w(TrackDepartments DepartmentTerminology ClassTrackingPerTxnLine? ClassTrackingPerTxn? CustomerTerminology),
|
21
21
|
:product_and_services => %w(ForSales? ForPurchase? QuantityWithPriceAndRate? QuantityOnHand?),
|
22
|
-
:
|
22
|
+
:vendor_and_purchases => %w(TrackingByCustomer? BillableExpenseTracking? DefaultTerms? DefaultMarkup? POCustomField),
|
23
23
|
:time_tracking => %w(UseServices? BillCustomers? ShowBillRateToAll WorkWeekStartDate MarkTimeEntiresBillable?),
|
24
24
|
:tax => %w(UsingSalesTax? PartnerTaxEnabled?),
|
25
25
|
:currency => %w(MultiCurrencyEnabled? HomeCurrency),
|
@@ -83,7 +83,11 @@ 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
|
86
|
+
URI("#{url_for_base}/query").tap do |uri|
|
87
|
+
params = Faraday::Utils::ParamsHash.new
|
88
|
+
params.update(options.merge(query: query))
|
89
|
+
uri.query = params.to_query
|
90
|
+
end.to_s
|
87
91
|
end
|
88
92
|
|
89
93
|
private
|
@@ -116,7 +120,7 @@ module Quickbooks
|
|
116
120
|
start_position = ((page - 1) * per_page) + 1 # page=2, per_page=10 then we want to start at 11
|
117
121
|
max_results = per_page
|
118
122
|
|
119
|
-
response = do_http_get(url_for_query(query, start_position, max_results))
|
123
|
+
response = do_http_get(url_for_query(query, start_position, max_results, options.except(:page, :per_page)))
|
120
124
|
|
121
125
|
parse_collection(response, model)
|
122
126
|
end
|
@@ -2,7 +2,7 @@ module Quickbooks
|
|
2
2
|
module Service
|
3
3
|
class ChangeService < BaseService
|
4
4
|
|
5
|
-
def url_for_query(query = nil, start_position = 1, max_results = 20)
|
5
|
+
def url_for_query(query = nil, start_position = 1, max_results = 20, options = {})
|
6
6
|
q = entity
|
7
7
|
q = "#{q}&#{query}" if query.present?
|
8
8
|
|
@@ -6,6 +6,12 @@ module Quickbooks
|
|
6
6
|
delete_by_query_string(refund_receipt)
|
7
7
|
end
|
8
8
|
|
9
|
+
def pdf(refund_receipt)
|
10
|
+
url = "#{url_for_resource(model::REST_RESOURCE)}/#{refund_receipt.id}/pdf"
|
11
|
+
response = do_http_raw_get(url, {}, {'Accept' => 'application/pdf'})
|
12
|
+
response.plain_body
|
13
|
+
end
|
14
|
+
|
9
15
|
private
|
10
16
|
|
11
17
|
def model
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Caughlan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -390,8 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
390
390
|
- !ruby/object:Gem::Version
|
391
391
|
version: '0'
|
392
392
|
requirements: []
|
393
|
-
|
394
|
-
rubygems_version: 2.7.6.2
|
393
|
+
rubygems_version: 3.1.6
|
395
394
|
signing_key:
|
396
395
|
specification_version: 4
|
397
396
|
summary: REST API to Quickbooks Online
|