quickbooks-ruby 1.0.17 → 1.0.20

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
2
  SHA256:
3
- metadata.gz: d00435e6aa26f37d76b42d6a00c347da7d2933711d227873b6b388edf6eb414a
4
- data.tar.gz: 11a9e8052e7d3881d721c8c1ec8fe557d56d0942f96afe6b6ec510b4cfd1517d
3
+ metadata.gz: e850d8a1075bd9f614e7b05c1747d0d7b1fc9b193ef9230975729693131a43d2
4
+ data.tar.gz: a2f7317e4bbfff9ee6c040eb1b19684981ff3dbde9cbe25f66cbbfd58dec9f1c
5
5
  SHA512:
6
- metadata.gz: 5819adb0f281036ad55ef6d259587ceddffc0d9159db04ec34d5ce66ea1cb85b0c3d82afa6309967f94b3c258c168ad113f2db71ece92d07952126896069098f
7
- data.tar.gz: fad37ada44e92bc81f437b8e9b3276bcc5dce68c92f7e85e7e4709b554b48b421ebec5fc08ba98a1935d6d8f7c9c24ae3d6f896fdceac65542e82abea56c6aed
6
+ metadata.gz: 8465d4443dd61ad7a71d4d33b34c4bfa8a0d2de787ed510363763a0a51447f6126e1c37cdef7bd70c8176ce388e5ea4bad78bb0193d197083eb072f5eac4c3da
7
+ data.tar.gz: f652a956529f77766099c5e6c69ad4aceabc58e9277740bad2d4747b3991ca6a5ab73aa1017a4c4074c4ca1ecd3016ced27bdd0b7adc64293b27056f13067207
@@ -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
 
@@ -31,6 +31,7 @@ module Quickbooks
31
31
  xml_accessor :due_date, :from => 'DueDate', :as => Date
32
32
  xml_accessor :remit_to_address, :from => 'RemitToAddr', :as => PhysicalAddress
33
33
  xml_accessor :ship_address, :from => 'ShipAddr', :as => PhysicalAddress
34
+ xml_accessor :mailing_address, :from => 'VendorAddr', :as => PhysicalAddress
34
35
  xml_accessor :exchange_rate, :from => 'ExchangeRate', :as => BigDecimal, :to_xml => to_xml_big_decimal
35
36
  xml_accessor :balance, :from => 'Balance', :as => BigDecimal, :to_xml => to_xml_big_decimal
36
37
 
@@ -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.17"
3
+ VERSION = "1.0.20"
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.17
4
+ version: 1.0.20
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-04-30 00:00:00.000000000 Z
11
+ date: 2022-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.0'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activemodel
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: faraday
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "<"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "<"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement