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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dda46c200f06a727d9afc9e6fab73b06aff231f1fdf8ad1c2b82f2a47e68725
4
- data.tar.gz: c1339cc89632c1268304df4c731bdfda624ee694a49b384d9c7c227f1547d57a
3
+ metadata.gz: 148ff447b167aedd01e7a5c6659b2f35c596b3fbc5bdcfe31848fcdb6a9b25fd
4
+ data.tar.gz: a7e0951c0bc2abf8b7af00768316811624ea9d5affe32063507d76cf178576ad
5
5
  SHA512:
6
- metadata.gz: d03e41802dea2444518e37c4f3a001461cb0ef89df68a7d66a27ca31320065b275440585d3dde3921912723b16f275d92c9a1aa8d67a6d66cfae634410767bea
7
- data.tar.gz: d59eaef4588055cd75b9ec44cdb23d4294509425f7cfd5a1ee391acd18d3ad62fa946755de85c890a411b3bb3fe6db154a4cafc6e16fbde9b3ca0271d1871f4f
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
- q = "select * from %s where %s = '%s'" % [model.resource_for_singular, field, selector]
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
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "1.0.18"
3
+ VERSION = "1.0.19"
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.18
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-09-09 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2