quickbooks-ruby 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quickbooks/model/customer.rb +2 -0
- data/lib/quickbooks/model/item.rb +4 -1
- data/lib/quickbooks/service/customer.rb +15 -0
- data/lib/quickbooks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bd985e3f514d7c7dd61251a595403b0ce08b704aa36e0e46a22c9ff413dbd88
|
4
|
+
data.tar.gz: 5dd26b9373a30bc69446fa501ece61b626c7d2370b09981a44e28966e575dafe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65956021117c97495fa06dfe2679ab7d7c6fbff875fa1a4f7beb03077aeaebad151fb9a747c96a559ba82059859d32716cea69ee9cca11c4a47bcc6e1c7486dc
|
7
|
+
data.tar.gz: 52fd82791663dcddaf5ad1671f2f7397bc2bf750696c8404d5f28e75b8b01c91674e0fcf785e5bfafcc404971dc8c74f8e3a930a9f0472b66323428115e4c745
|
@@ -10,7 +10,7 @@ module Quickbooks
|
|
10
10
|
XML_COLLECTION_NODE = "Item"
|
11
11
|
XML_NODE = "Item"
|
12
12
|
REST_RESOURCE = 'item'
|
13
|
-
MINORVERSION =
|
13
|
+
MINORVERSION = 33
|
14
14
|
|
15
15
|
INVENTORY_TYPE = 'Inventory'
|
16
16
|
NON_INVENTORY_TYPE = 'NonInventory'
|
@@ -29,6 +29,8 @@ module Quickbooks
|
|
29
29
|
xml_accessor :sub_item?, :from => 'SubItem'
|
30
30
|
xml_accessor :parent_ref, :from => 'ParentRef', :as => Integer
|
31
31
|
xml_accessor :level, :from => 'Level', :as => Integer
|
32
|
+
xml_accessor :pref_vendor_ref, :from => 'PrefVendorRef', :as => BaseReference
|
33
|
+
xml_accessor :tax_classification_ref, :from => 'TaxClassificationRef', :as => BaseReference
|
32
34
|
|
33
35
|
# read-only
|
34
36
|
xml_accessor :fully_qualified_name, :from => 'FullyQualifiedName'
|
@@ -55,6 +57,7 @@ module Quickbooks
|
|
55
57
|
|
56
58
|
reference_setters :parent_ref, :income_account_ref, :expense_account_ref
|
57
59
|
reference_setters :asset_account_ref, :sales_tax_code_ref, :purchase_tax_code_ref
|
60
|
+
reference_setters :pref_vendor_ref, :tax_classification_ref
|
58
61
|
|
59
62
|
#== Validations
|
60
63
|
validates_length_of :name, :minimum => 1
|
@@ -7,6 +7,21 @@ module Quickbooks
|
|
7
7
|
update(customer, :sparse => true)
|
8
8
|
end
|
9
9
|
|
10
|
+
def url_for_resource(resource)
|
11
|
+
url = super(resource)
|
12
|
+
"#{url}?minorversion=#{Quickbooks::Model::Customer::MINORVERSION}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def fetch_by_id(id, params = {})
|
16
|
+
url = "#{url_for_base}/customer/#{id}?minorversion=#{Quickbooks::Model::Customer::MINORVERSION}"
|
17
|
+
fetch_object(model, url, params)
|
18
|
+
end
|
19
|
+
|
20
|
+
def url_for_query(query = nil, start_position = 1, max_results = 20, options = {})
|
21
|
+
url = super(query, start_position, max_results, options)
|
22
|
+
"#{url}&minorversion=#{Quickbooks::Model::Customer::MINORVERSION}"
|
23
|
+
end
|
24
|
+
|
10
25
|
private
|
11
26
|
|
12
27
|
def model
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Caughlan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|
@@ -346,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
346
346
|
version: '0'
|
347
347
|
requirements: []
|
348
348
|
rubyforge_project:
|
349
|
-
rubygems_version: 2.7.
|
349
|
+
rubygems_version: 2.7.8
|
350
350
|
signing_key:
|
351
351
|
specification_version: 4
|
352
352
|
summary: REST API to Quickbooks Online
|