quickbooks-ruby 1.0.18 → 1.0.19
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 +4 -4
- data/lib/quickbooks/model/account_based_expense_line_detail.rb +1 -0
- data/lib/quickbooks/model/bill_line_item.rb +2 -0
- data/lib/quickbooks/model/item_based_expense_line_detail.rb +1 -0
- data/lib/quickbooks/model/sales_item_line_detail.rb +1 -0
- data/lib/quickbooks/model/transaction_tax_detail.rb +1 -1
- data/lib/quickbooks/service/service_crud.rb +4 -1
- data/lib/quickbooks/util/query_builder.rb +4 -0
- data/lib/quickbooks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 148ff447b167aedd01e7a5c6659b2f35c596b3fbc5bdcfe31848fcdb6a9b25fd
|
4
|
+
data.tar.gz: a7e0951c0bc2abf8b7af00768316811624ea9d5affe32063507d76cf178576ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83f4e3f6f299c3abb17836c7121179f4e2d39b96028e3734a3a59fbc9251464223d62dcee929b0c8963d35bba0bfb53445e1142e77d979f869c74f7d271bf360
|
7
|
+
data.tar.gz: f2b3327d90e9402edb469bce97d7a4da8c84b4b4b86b07d45f363faff8684b001f60c5085c5bcc1149820b419d42205c74babd0c4149a1819adb9d3345f017de
|
@@ -7,6 +7,7 @@ module Quickbooks
|
|
7
7
|
xml_accessor :billable_status, :from => 'BillableStatus'
|
8
8
|
xml_accessor :tax_amount, :from => 'UnitPrice', :as => BigDecimal, :to_xml => to_xml_big_decimal
|
9
9
|
xml_accessor :tax_code_ref, :from => 'TaxCodeRef', :as => BaseReference
|
10
|
+
xml_accessor :tax_inclusive_amount, from: 'TaxInclusiveAmt', to_xml: Proc.new { |val| val.to_f }
|
10
11
|
|
11
12
|
reference_setters :customer_ref, :class_ref, :account_ref, :tax_code_ref
|
12
13
|
|
@@ -12,6 +12,8 @@ module Quickbooks
|
|
12
12
|
xml_accessor :amount, :from => 'Amount', :as => BigDecimal, :to_xml => to_xml_big_decimal
|
13
13
|
xml_accessor :detail_type, :from => 'DetailType'
|
14
14
|
|
15
|
+
xml_accessor :linked_transactions, :from => 'LinkedTxn', :as => [LinkedTransaction]
|
16
|
+
|
15
17
|
#== Various detail types
|
16
18
|
xml_accessor :account_based_expense_line_detail, :from => 'AccountBasedExpenseLineDetail', :as => AccountBasedExpenseLineDetail
|
17
19
|
xml_accessor :item_based_expense_line_detail, :from => 'ItemBasedExpenseLineDetail', :as => ItemBasedExpenseLineDetail
|
@@ -13,6 +13,7 @@ module Quickbooks
|
|
13
13
|
xml_accessor :tax_code_ref, :from => 'TaxCodeRef', :as => BaseReference
|
14
14
|
xml_accessor :customer_ref, :from => 'CustomerRef', :as => BaseReference
|
15
15
|
xml_accessor :billable_status, :from => 'BillableStatus'
|
16
|
+
xml_accessor :tax_inclusive_amount, from: 'TaxInclusiveAmt', to_xml: Proc.new { |val| val.to_f }
|
16
17
|
|
17
18
|
reference_setters :item_ref, :class_ref, :price_level_ref, :customer_ref, :tax_code_ref
|
18
19
|
end
|
@@ -9,6 +9,7 @@ module Quickbooks
|
|
9
9
|
xml_accessor :quantity, :from => 'Qty', :as => BigDecimal, :to_xml => Proc.new { |val| val.to_f }
|
10
10
|
xml_accessor :tax_code_ref, :from => 'TaxCodeRef', :as => BaseReference
|
11
11
|
xml_accessor :service_date, :from => 'ServiceDate', :as => Date
|
12
|
+
xml_accessor :tax_inclusive_amount, from: 'TaxInclusiveAmt', to_xml: Proc.new { |val| val.to_f }
|
12
13
|
|
13
14
|
reference_setters :item_ref, :class_ref, :price_level_ref, :tax_code_ref
|
14
15
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Quickbooks
|
2
2
|
module Model
|
3
3
|
class TransactionTaxDetail < BaseModel
|
4
|
-
|
5
4
|
xml_accessor :txn_tax_code_ref, :from => 'TxnTaxCodeRef', :as => BaseReference
|
6
5
|
xml_accessor :total_tax, :from => 'TotalTax', :as => BigDecimal, :to_xml => to_xml_big_decimal
|
6
|
+
xml_accessor :total_tax_specified, :from => 'TotalTaxSpecified'
|
7
7
|
xml_accessor :lines, :from => 'TaxLine', :as => [TaxLine]
|
8
8
|
|
9
9
|
reference_setters :txn_tax_code_ref
|
@@ -33,7 +33,10 @@ module Quickbooks
|
|
33
33
|
if field.class == Symbol
|
34
34
|
field = field.to_s.camelcase
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
|
+
clause = Quickbooks::Util::QueryBuilder.new.clause(field, '=', selector)
|
38
|
+
q = "select * from %s where %s" % [model.resource_for_singular, clause]
|
39
|
+
|
37
40
|
self.query(q, options)
|
38
41
|
end
|
39
42
|
|
@@ -20,6 +20,8 @@ module Quickbooks
|
|
20
20
|
value.strftime('%Y-%m-%d')
|
21
21
|
when Array
|
22
22
|
value = value.map(&escape_single_quotes)
|
23
|
+
when true, false
|
24
|
+
value
|
23
25
|
else
|
24
26
|
value = escape_single_quotes.call(value)
|
25
27
|
end
|
@@ -27,6 +29,8 @@ module Quickbooks
|
|
27
29
|
if operator.downcase == 'in' && value.is_a?(Array)
|
28
30
|
value = value.map { |v| "#{VALUE_QUOTE}#{v}#{VALUE_QUOTE}" }
|
29
31
|
"#{field} #{operator} (#{value.join(', ')})"
|
32
|
+
elsif value == true || value == false
|
33
|
+
"#{field} #{operator} #{value}"
|
30
34
|
else
|
31
35
|
"#{field} #{operator} #{VALUE_QUOTE}#{value}#{VALUE_QUOTE}"
|
32
36
|
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: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Caughlan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|