quickbooks-ruby 0.6.2 → 0.6.4
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 88b40c47687177bb10bb4148dc36503c73176c7265d63a8b0604f4d06a7cf4fc
|
4
|
+
data.tar.gz: 412f008b74b644e850a7abbb29c7a211264b70b7e290269b5da50f1f969ef7b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa44b7592c12158ad4c83379cb818f286dbeca0b2edbd2e1d6a98686b80626ba8a261afd0aacf460e3eac053e85548605639bffe83d4fbb6ed21b8b7d12e497
|
7
|
+
data.tar.gz: 200665898b462a47ba1a20daa7d39d1d3b2b84c5955fb8cf4d9f6256a6def670e6a607f002d34233493f8eb767b3d73b37c7295e8c13c6c5008d34a31b6e7a25
|
@@ -4,6 +4,7 @@ module Quickbooks
|
|
4
4
|
XML_COLLECTION_NODE = "Preferences"
|
5
5
|
XML_NODE = "Preferences"
|
6
6
|
REST_RESOURCE = 'preferences'
|
7
|
+
MINORVERSION = 21
|
7
8
|
|
8
9
|
xml_name XML_NODE
|
9
10
|
|
@@ -19,8 +20,8 @@ module Quickbooks
|
|
19
20
|
PREFERENCE_SECTIONS = {
|
20
21
|
:accounting_info => %w(TrackDepartments DepartmentTerminology ClassTrackingPerTxnLine? ClassTrackingPerTxn? CustomerTerminology),
|
21
22
|
:product_and_services => %w(ForSales? ForPurchase? QuantityWithPriceAndRate? QuantityOnHand?),
|
22
|
-
:sales_forms => %w(CustomTxnNumbers? AllowDeposit? AllowDiscount? DefaultDiscountAccount? AllowEstimates? EstimateMessage?
|
23
|
-
ETransactionEnabledStatus? ETransactionAttachPDF? ETransactionPaymentEnabled? IPNSupportEnabled?
|
23
|
+
:sales_forms => %w(CustomTxnNumbers? AllowDeposit? AllowDiscount? DefaultDiscountAccount? AllowEstimates? EstimateMessage?
|
24
|
+
ETransactionEnabledStatus? ETransactionAttachPDF? ETransactionPaymentEnabled? IPNSupportEnabled?
|
24
25
|
AllowServiceDate? AllowShipping? DefaultShippingAccount? DefaultTerms DefaultCustomerMessage),
|
25
26
|
:vendor_and_purchase => %w(TrackingByCustomer? BillableExpenseTracking? DefaultTerms? DefaultMarkup? POCustomField),
|
26
27
|
:time_tracking => %w(UseServices? BillCustomers? ShowBillRateToAll WorkWeekStartDate MarkTimeEntiresBillable?),
|
@@ -37,13 +37,9 @@ module Quickbooks
|
|
37
37
|
row_node.elements.map.with_index do |el, i|
|
38
38
|
value = el.attr('value')
|
39
39
|
|
40
|
-
if
|
41
|
-
|
42
|
-
|
43
|
-
nil
|
44
|
-
else
|
45
|
-
BigDecimal(value)
|
46
|
-
end
|
40
|
+
next nil if value.blank?
|
41
|
+
next value if value.to_s.match(/^\d+$|^\d+.\d+$|^-\d+|^-\d+.\d+$|^.\d+$/).nil?
|
42
|
+
BigDecimal(value)
|
47
43
|
end
|
48
44
|
end
|
49
45
|
|
@@ -289,7 +289,7 @@ module Quickbooks
|
|
289
289
|
when 429
|
290
290
|
message = parse_intuit_error[:message]
|
291
291
|
raise Quickbooks::TooManyRequests, message
|
292
|
-
when 503, 504
|
292
|
+
when 502, 503, 504
|
293
293
|
raise Quickbooks::ServiceUnavailable
|
294
294
|
else
|
295
295
|
raise "HTTP Error Code: #{status}, Msg: #{response.plain_body}"
|
@@ -2,8 +2,13 @@ module Quickbooks
|
|
2
2
|
module Service
|
3
3
|
class Preferences < BaseService
|
4
4
|
|
5
|
+
def url_for_query(query = nil, start_position = 1, max_results = 20, options = {})
|
6
|
+
url = super(query, start_position, max_results, options)
|
7
|
+
"#{url}&minorversion=#{Quickbooks::Model::Preferences::MINORVERSION}"
|
8
|
+
end
|
9
|
+
|
5
10
|
private
|
6
|
-
|
11
|
+
|
7
12
|
def model
|
8
13
|
Quickbooks::Model::Preferences
|
9
14
|
end
|
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: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Caughlan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
requirements: []
|
346
346
|
rubyforge_project:
|
347
|
-
rubygems_version: 2.
|
347
|
+
rubygems_version: 2.7.7
|
348
348
|
signing_key:
|
349
349
|
specification_version: 4
|
350
350
|
summary: REST API to Quickbooks Online
|