quickbooks-ruby 2.0 → 2.0.2

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: cc115bc7b925447fecb75976b448e66406441c9fd56208e964ac34844fdcd37a
4
- data.tar.gz: fd1ca0b526c14cdadda7a1e276c3dcedb9b8c68e7c76be0aa074df30c63e0382
3
+ metadata.gz: 8168dc0e28267b4342b56bdfc689af6a7edb151694fe1fca9fd6e9a827528687
4
+ data.tar.gz: e6f4f347dff9732e61298357fc74d7ec68cde532718279cb1d785cd6b38909d7
5
5
  SHA512:
6
- metadata.gz: ce9c6d1732ab2d6ffd2a9ea57c2dad7f091867bb9af828a8bb25140f79a7d739cccd4f59d9b45665ec500d50241e2fbd65c833f4f307d71ba84543cdaec71725
7
- data.tar.gz: 9bd4d94b4270280b142d93c3ee9bff0b579d4009fc5afe9a217404d201df6e74ea6db8a7fc5b33e48f16e919ea6716bd77f5aeb4e362421db659d1d9f8ac0bf4
6
+ metadata.gz: 88b3bf54416112c1aff009c9c6e9dce8ab437ec806a855627f9abf6dda1804a2419f94bbbe07d04aaa91503bfe8a7a630c0b85fb8f174bb805a4fe901138bd20
7
+ data.tar.gz: 25421b3b29a88dcca907940274b84b1d10f819489da6a66ffbd7d8b835a3a7d84667ec69bb63d9828df0e6ed916b6183c372d5e05f1a475d01d5f2ffefb56527
@@ -7,7 +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
+ xml_accessor :tax_inclusive_amount, from: 'TaxInclusiveAmt', :as => BigDecimal, to_xml: Proc.new { |val| val.to_f }
11
11
 
12
12
  reference_setters :customer_ref, :class_ref, :account_ref, :tax_code_ref
13
13
 
@@ -13,7 +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
+ xml_accessor :tax_inclusive_amount, from: 'TaxInclusiveAmt', :as => BigDecimal, to_xml: Proc.new { |val| val.to_f }
17
17
 
18
18
  reference_setters :item_ref, :class_ref, :price_level_ref, :customer_ref, :tax_code_ref
19
19
  end
@@ -9,7 +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
+ xml_accessor :tax_inclusive_amount, from: 'TaxInclusiveAmt', :as => BigDecimal, to_xml: Proc.new { |val| val.to_f }
13
13
 
14
14
  reference_setters :item_ref, :class_ref, :price_level_ref, :tax_code_ref
15
15
  end
@@ -22,7 +22,12 @@ module Quickbooks
22
22
  def disconnect
23
23
  connection = Faraday.new(headers: { 'Content-Type' => 'application/json' }) do |f|
24
24
  f.adapter(::Quickbooks.http_adapter)
25
- f.request(:authorization, :basic, oauth.client.id, oauth.client.secret)
25
+
26
+ if Gem.loaded_specs['faraday'].version >= Gem::Version.create('2.0')
27
+ f.request(:authorization, :basic, oauth.client.id, oauth.client.secret)
28
+ else
29
+ f.basic_auth(oauth.client.id, oauth.client.secret)
30
+ end
26
31
  end
27
32
 
28
33
  url = "#{DISCONNECT_URL}?minorversion=#{Quickbooks.minorversion}"
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "2.0"
3
+ VERSION = "2.0.2"
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: '2.0'
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Caughlan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2023-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0.1'
131
+ version: '1.0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0.1'
138
+ version: '1.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rake
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -402,7 +402,7 @@ homepage: http://github.com/ruckus/quickbooks-ruby
402
402
  licenses:
403
403
  - MIT
404
404
  metadata: {}
405
- post_install_message:
405
+ post_install_message:
406
406
  rdoc_options: []
407
407
  require_paths:
408
408
  - lib
@@ -417,9 +417,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
417
  - !ruby/object:Gem::Version
418
418
  version: '0'
419
419
  requirements: []
420
- rubyforge_project:
421
- rubygems_version: 2.7.6.2
422
- signing_key:
420
+ rubygems_version: 3.0.3.1
421
+ signing_key:
423
422
  specification_version: 4
424
423
  summary: REST API to Quickbooks Online
425
424
  test_files: []