quickeebooks 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Gemfile.lock +52 -0
- data/MIT-LICENSE +9 -0
- data/README.md +306 -0
- data/Rakefile +17 -0
- data/lib/quickeebooks.rb +89 -0
- data/lib/quickeebooks/online/model/account.rb +47 -0
- data/lib/quickeebooks/online/model/account_detail_type.rb +233 -0
- data/lib/quickeebooks/online/model/account_reference.rb +17 -0
- data/lib/quickeebooks/online/model/address.rb +42 -0
- data/lib/quickeebooks/online/model/customer.rb +66 -0
- data/lib/quickeebooks/online/model/customer_custom_field.rb +51 -0
- data/lib/quickeebooks/online/model/email.rb +24 -0
- data/lib/quickeebooks/online/model/intuit_type.rb +25 -0
- data/lib/quickeebooks/online/model/invoice.rb +50 -0
- data/lib/quickeebooks/online/model/invoice_header.rb +29 -0
- data/lib/quickeebooks/online/model/invoice_line_item.rb +22 -0
- data/lib/quickeebooks/online/model/item.rb +47 -0
- data/lib/quickeebooks/online/model/meta_data.rb +27 -0
- data/lib/quickeebooks/online/model/note.rb +11 -0
- data/lib/quickeebooks/online/model/open_balance.rb +11 -0
- data/lib/quickeebooks/online/model/phone.rb +12 -0
- data/lib/quickeebooks/online/model/price.rb +18 -0
- data/lib/quickeebooks/online/model/purchase_cost.rb +11 -0
- data/lib/quickeebooks/online/model/unit_price.rb +11 -0
- data/lib/quickeebooks/online/model/web_site.rb +16 -0
- data/lib/quickeebooks/online/service/account.rb +52 -0
- data/lib/quickeebooks/online/service/customer.rb +57 -0
- data/lib/quickeebooks/online/service/entitlement.rb +15 -0
- data/lib/quickeebooks/online/service/filter.rb +96 -0
- data/lib/quickeebooks/online/service/invoice.rb +50 -0
- data/lib/quickeebooks/online/service/item.rb +52 -0
- data/lib/quickeebooks/online/service/pagination.rb +19 -0
- data/lib/quickeebooks/online/service/service_base.rb +202 -0
- data/lib/quickeebooks/online/service/sort.rb +19 -0
- data/lib/quickeebooks/version.rb +5 -0
- data/lib/quickeebooks/windows/model/account.rb +67 -0
- data/lib/quickeebooks/windows/model/account_detail_type.rb +233 -0
- data/lib/quickeebooks/windows/model/account_reference.rb +19 -0
- data/lib/quickeebooks/windows/model/address.rb +36 -0
- data/lib/quickeebooks/windows/model/custom_field.rb +13 -0
- data/lib/quickeebooks/windows/model/customer.rb +109 -0
- data/lib/quickeebooks/windows/model/email.rb +44 -0
- data/lib/quickeebooks/windows/model/intuit_type.rb +17 -0
- data/lib/quickeebooks/windows/model/invoice.rb +44 -0
- data/lib/quickeebooks/windows/model/invoice_header.rb +65 -0
- data/lib/quickeebooks/windows/model/invoice_line_item.rb +38 -0
- data/lib/quickeebooks/windows/model/item.rb +84 -0
- data/lib/quickeebooks/windows/model/meta_data.rb +31 -0
- data/lib/quickeebooks/windows/model/note.rb +19 -0
- data/lib/quickeebooks/windows/model/open_balance.rb +11 -0
- data/lib/quickeebooks/windows/model/phone.rb +20 -0
- data/lib/quickeebooks/windows/model/price.rb +18 -0
- data/lib/quickeebooks/windows/model/purchase_cost.rb +12 -0
- data/lib/quickeebooks/windows/model/tax_line.rb +18 -0
- data/lib/quickeebooks/windows/model/unit_price.rb +12 -0
- data/lib/quickeebooks/windows/model/vendor_reference.rb +13 -0
- data/lib/quickeebooks/windows/model/web_site.rb +19 -0
- data/lib/quickeebooks/windows/service/account.rb +16 -0
- data/lib/quickeebooks/windows/service/customer.rb +16 -0
- data/lib/quickeebooks/windows/service/invoice.rb +27 -0
- data/lib/quickeebooks/windows/service/item.rb +18 -0
- data/lib/quickeebooks/windows/service/service_base.rb +176 -0
- data/quickeebooks.gemspec +27 -0
- data/spec/mocks/oauth_consumer_mock.rb +2 -0
- data/spec/quickeebooks/online/account_spec.rb +41 -0
- data/spec/quickeebooks/online/customer_spec.rb +46 -0
- data/spec/quickeebooks/online/invoice_spec.rb +15 -0
- data/spec/quickeebooks/online/services/account_spec.rb +84 -0
- data/spec/quickeebooks/online/services/customer_spec.rb +107 -0
- data/spec/quickeebooks/online/services/filter_spec.rb +43 -0
- data/spec/quickeebooks/online/services/service_base_spec.rb +30 -0
- data/spec/quickeebooks/online/services/sort_spec.rb +17 -0
- data/spec/quickeebooks/windows/customer_spec.rb +49 -0
- data/spec/quickeebooks_spec.rb +11 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/xml/online/account.xml +13 -0
- data/spec/xml/online/accounts.xml +108 -0
- data/spec/xml/online/customer.xml +63 -0
- data/spec/xml/online/customer2.xml +63 -0
- data/spec/xml/online/customers.xml +125 -0
- data/spec/xml/online/invoice.xml +33 -0
- data/spec/xml/online/user.xml +11 -0
- data/spec/xml/windows/customer.xml +56 -0
- data/spec/xml/windows/customers.xml +137 -0
- data/spec/xml/windows/http_401.xml +8 -0
- metadata +229 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "fakeweb"
|
3
|
+
require "oauth"
|
4
|
+
require "quickeebooks"
|
5
|
+
|
6
|
+
describe "Quickeebooks::Online::Service::Customer" do
|
7
|
+
before(:all) do
|
8
|
+
FakeWeb.allow_net_connect = false
|
9
|
+
qb_key = "key"
|
10
|
+
qb_secret = "secreet"
|
11
|
+
|
12
|
+
@realm_id = "9991111222"
|
13
|
+
@base_uri = "https://qbo.intuit.com/qbo36"
|
14
|
+
@oauth_consumer = OAuth::Consumer.new(qb_key, qb_key, {
|
15
|
+
:site => "https://oauth.intuit.com",
|
16
|
+
:request_token_path => "/oauth/v1/get_request_token",
|
17
|
+
:authorize_path => "/oauth/v1/get_access_token",
|
18
|
+
:access_token_path => "/oauth/v1/get_access_token"
|
19
|
+
})
|
20
|
+
@oauth = OAuth::AccessToken.new(@oauth_consumer, "blah", "blah")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "can fetch a list of customers" do
|
24
|
+
xml = File.read(File.dirname(__FILE__) + "/../../../xml/online/customers.xml")
|
25
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
26
|
+
FakeWeb.register_uri(:post, service.url_for_resource("customers"), :status => ["200", "OK"], :body => xml)
|
27
|
+
accounts = service.list
|
28
|
+
accounts.current_page.should == 1
|
29
|
+
accounts.entries.count.should == 3
|
30
|
+
accounts.entries.first.name.should == "John Doe"
|
31
|
+
end
|
32
|
+
|
33
|
+
it "can fetch a list of customers with filters" do
|
34
|
+
xml = File.read(File.dirname(__FILE__) + "/../../../xml/online/customers.xml")
|
35
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
36
|
+
FakeWeb.register_uri(:post, service.url_for_resource("customers"), :status => ["200", "OK"], :body => xml)
|
37
|
+
accounts = service.list
|
38
|
+
accounts.current_page.should == 1
|
39
|
+
accounts.entries.count.should == 3
|
40
|
+
accounts.entries.first.name.should == "John Doe"
|
41
|
+
end
|
42
|
+
|
43
|
+
it "can create a customer" do
|
44
|
+
xml = File.read(File.dirname(__FILE__) + "/../../../xml/online/customer.xml")
|
45
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
46
|
+
FakeWeb.register_uri(:post, service.url_for_resource("customer"), :status => ["200", "OK"], :body => xml)
|
47
|
+
customer = Quickeebooks::Online::Model::Customer.new
|
48
|
+
customer.name = "Billy Bob"
|
49
|
+
result = service.create(customer)
|
50
|
+
result.id.to_i.should > 0
|
51
|
+
end
|
52
|
+
|
53
|
+
it "can delete a customer" do
|
54
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
55
|
+
url = "#{service.url_for_resource("customer")}/99?methodx=delete"
|
56
|
+
FakeWeb.register_uri(:post, url, :status => ["200", "OK"])
|
57
|
+
customer = Quickeebooks::Online::Model::Customer.new
|
58
|
+
customer.id = 99
|
59
|
+
customer.sync_token = 0
|
60
|
+
result = service.delete(customer)
|
61
|
+
result.should == true
|
62
|
+
end
|
63
|
+
|
64
|
+
it "cannot delete a customer with missing required fields for deletion" do
|
65
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
66
|
+
customer = Quickeebooks::Online::Model::Customer.new
|
67
|
+
lambda { service.delete(customer) }.should raise_error(InvalidModelException, "Missing required parameters for delete")
|
68
|
+
end
|
69
|
+
|
70
|
+
it "exception is raised when we try to create an invalid account" do
|
71
|
+
customer = Quickeebooks::Online::Model::Customer.new
|
72
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
73
|
+
lambda { service.create(customer) }.should raise_error(InvalidModelException)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "cannot update an invalid customer" do
|
77
|
+
customer = Quickeebooks::Online::Model::Customer.new
|
78
|
+
customer.name = "John Doe"
|
79
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
80
|
+
lambda { service.update(customer) }.should raise_error(InvalidModelException)
|
81
|
+
end
|
82
|
+
|
83
|
+
it "can fetch an customer by id" do
|
84
|
+
xml = File.read(File.dirname(__FILE__) + "/../../../xml/online/customer.xml")
|
85
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
86
|
+
url = "#{service.url_for_resource("customer")}/99"
|
87
|
+
FakeWeb.register_uri(:get, url, :status => ["200", "OK"], :body => xml)
|
88
|
+
customer = service.fetch_by_id(99)
|
89
|
+
customer.name.should == "John Doe"
|
90
|
+
end
|
91
|
+
|
92
|
+
it "can update a customer" do
|
93
|
+
xml2 = File.read(File.dirname(__FILE__) + "/../../../xml/online/customer2.xml")
|
94
|
+
customer = Quickeebooks::Online::Model::Customer.new
|
95
|
+
customer.name = "John Doe"
|
96
|
+
customer.id = 1
|
97
|
+
customer.sync_token = 2
|
98
|
+
|
99
|
+
service = Quickeebooks::Online::Service::Customer.new(@oauth, @realm_id, @base_uri)
|
100
|
+
url = "#{service.url_for_resource("customer")}/#{customer.id}"
|
101
|
+
FakeWeb.register_uri(:post, url, :status => ["200", "OK"], :body => xml2)
|
102
|
+
updated = service.update(customer)
|
103
|
+
updated.name.should == "Billy Bob"
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "fakeweb"
|
3
|
+
require "oauth"
|
4
|
+
require "quickeebooks"
|
5
|
+
|
6
|
+
describe "Quickeebooks::Online::Service::Filter" do
|
7
|
+
before(:all) do
|
8
|
+
end
|
9
|
+
|
10
|
+
it "can generate a text filter" do
|
11
|
+
filter = Quickeebooks::Online::Service::Filter.new(:text, :field => "Name", :value => "Smith")
|
12
|
+
filter.to_s.should == "Name :EQUALS: Smith"
|
13
|
+
end
|
14
|
+
|
15
|
+
it "can generate a boolean filter" do
|
16
|
+
filter = Quickeebooks::Online::Service::Filter.new(:boolean, :field => "IncludeJobs", :value => false)
|
17
|
+
filter.to_s.should == "IncludeJobs :EQUALS: false"
|
18
|
+
end
|
19
|
+
|
20
|
+
it "can generate a date filter" do
|
21
|
+
date = Date.civil(2012, 2, 16)
|
22
|
+
filter = Quickeebooks::Online::Service::Filter.new(:datetime, :field => "CreateTime", :value => date)
|
23
|
+
filter.to_s.should == "CreateTime :EQUALS: #{date.strftime(Quickeebooks::Online::Service::Filter::DATE_FORMAT)}"
|
24
|
+
end
|
25
|
+
|
26
|
+
it "can generate a datetime filter" do
|
27
|
+
time = Time.mktime(2012, 1, 2, 8, 31, 44)
|
28
|
+
filter = Quickeebooks::Online::Service::Filter.new(:datetime, :field => "CreateTime", :after => time)
|
29
|
+
filter.to_s.should == "CreateTime :AFTER: #{time.strftime(Quickeebooks::Online::Service::Filter::DATE_TIME_FORMAT)}"
|
30
|
+
end
|
31
|
+
|
32
|
+
it "can generate a datetime filter with bounded dates" do
|
33
|
+
time1 = Time.mktime(2012, 1, 2, 1)
|
34
|
+
time2 = Time.mktime(2012, 1, 5, 8)
|
35
|
+
filter = Quickeebooks::Online::Service::Filter.new(:datetime, :field => "CreateTime", :after => time1, :before => time2)
|
36
|
+
# 'before' is checked before 'after' :)
|
37
|
+
text = "CreateTime :BEFORE: #{time2.strftime(Quickeebooks::Online::Service::Filter::DATE_TIME_FORMAT)}"
|
38
|
+
text = "#{text} :AND: CreateTime :AFTER: #{time1.strftime(Quickeebooks::Online::Service::Filter::DATE_TIME_FORMAT)}"
|
39
|
+
filter.to_s.should == text
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "fakeweb"
|
3
|
+
require "oauth"
|
4
|
+
require "quickeebooks/online/service/service_base"
|
5
|
+
|
6
|
+
describe "Quickeebooks::Online::Service::ServiceBase" do
|
7
|
+
before(:all) do
|
8
|
+
FakeWeb.allow_net_connect = false
|
9
|
+
qb_key = "key"
|
10
|
+
qb_secret = "secreet"
|
11
|
+
|
12
|
+
@realm_id = "9991111222"
|
13
|
+
@oauth_consumer = OAuth::Consumer.new(qb_key, qb_key, {
|
14
|
+
:site => "https://oauth.intuit.com",
|
15
|
+
:request_token_path => "/oauth/v1/get_request_token",
|
16
|
+
:authorize_path => "/oauth/v1/get_access_token",
|
17
|
+
:access_token_path => "/oauth/v1/get_access_token"
|
18
|
+
})
|
19
|
+
end
|
20
|
+
|
21
|
+
it "can determine base url" do
|
22
|
+
xml = File.read(File.dirname(__FILE__) + "/../../../xml/online/user.xml")
|
23
|
+
user_url = Quickeebooks::Online::Service::ServiceBase::QB_BASE_URI + "/" + @realm_id
|
24
|
+
FakeWeb.register_uri(:get, user_url, :status => ["200", "OK"], :body => xml)
|
25
|
+
service = Quickeebooks::Online::Service::ServiceBase.new(@oauth_consumer, @realm_id)
|
26
|
+
service.base_uri.should_not == nil
|
27
|
+
service.url_for_resource("customers").should == "https://qbo.intuit.com/qbo36/resource/customers/v2/#{@realm_id}"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "fakeweb"
|
3
|
+
require "oauth"
|
4
|
+
require "quickeebooks"
|
5
|
+
|
6
|
+
describe "Quickeebooks::Online::Service::Sort" do
|
7
|
+
before(:all) do
|
8
|
+
end
|
9
|
+
|
10
|
+
it "can generate a sorting parameter" do
|
11
|
+
filter = Quickeebooks::Online::Service::Sort.new("FirstName", "NewestToOldest")
|
12
|
+
filter.to_s.should == "FirstName NewestToOldest"
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
require "quickeebooks/windows/model/customer"
|
4
|
+
|
5
|
+
describe "Quickeebooks::Windows::Model::Customer" do
|
6
|
+
|
7
|
+
it "parse customer from XML" do
|
8
|
+
xml = File.read(File.dirname(__FILE__) + "/../../xml/windows/customer.xml")
|
9
|
+
customer = Quickeebooks::Windows::Model::Customer.from_xml(xml)
|
10
|
+
customer.sync_token.should == 1
|
11
|
+
customer.name.should == "Wine House"
|
12
|
+
|
13
|
+
customer.dba_name.should == "Wine House"
|
14
|
+
|
15
|
+
create_time = Date.civil(2012, 3, 24)
|
16
|
+
customer.meta_data.create_time.year.should == create_time.year
|
17
|
+
customer.addresses.count.should == 1
|
18
|
+
|
19
|
+
customer.addresses.first.line1.should == "Wine House"
|
20
|
+
customer.addresses.first.line2.should == "2311 Maple Ave"
|
21
|
+
|
22
|
+
customer.phones.size.should == 1
|
23
|
+
customer.phones.first.free_form_number.should == "415-555-1212"
|
24
|
+
|
25
|
+
customer.email.address.should == "no-reply@winehouse.com"
|
26
|
+
|
27
|
+
customer.notes.count.should == 1
|
28
|
+
customer.notes.first.content.should == "Likes chocolate and horses"
|
29
|
+
|
30
|
+
customer.custom_fields.count.should == 0
|
31
|
+
|
32
|
+
customer.open_balance.amount.should == 6200.0
|
33
|
+
end
|
34
|
+
|
35
|
+
it "can assign an email address" do
|
36
|
+
customer = Quickeebooks::Windows::Model::Customer.new
|
37
|
+
the_email = "foo@example.org"
|
38
|
+
customer.email_address = the_email
|
39
|
+
customer.email.is_a?(Quickeebooks::Windows::Model::Email).should == true
|
40
|
+
customer.email.address.should == the_email
|
41
|
+
end
|
42
|
+
|
43
|
+
it "cannot update an invalid model" do
|
44
|
+
customer = Quickeebooks::Windows::Model::Customer.new
|
45
|
+
customer.valid_for_update?.should == false
|
46
|
+
customer.errors.keys.include?(:sync_token).should == true
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "rspec"
|
3
|
+
|
4
|
+
$:.unshift "lib"
|
5
|
+
|
6
|
+
def mock_error(subject, message)
|
7
|
+
mock_exit do
|
8
|
+
mock(subject).puts("ERROR: #{message}")
|
9
|
+
yield
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def mock_exit(&block)
|
14
|
+
block.should raise_error(SystemExit)
|
15
|
+
end
|
16
|
+
|
17
|
+
Rspec.configure do |config|
|
18
|
+
config.color_enabled = true
|
19
|
+
config.mock_with :rr
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<Account xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
|
3
|
+
<Id idDomain="QBO">37</Id>
|
4
|
+
<SyncToken>0</SyncToken>
|
5
|
+
<MetaData>
|
6
|
+
<CreateTime>2012-02-18T15:50:17-08:00</CreateTime>
|
7
|
+
<LastUpdatedTime>2012-02-18T15:50:17-08:00</LastUpdatedTime>
|
8
|
+
</MetaData>
|
9
|
+
<Name>Billy Bob</Name>
|
10
|
+
<AccountParentId idDomain="QBO">36</AccountParentId>
|
11
|
+
<Subtype>AccountsPayable</Subtype>
|
12
|
+
<CurrentBalance>0.00</CurrentBalance>
|
13
|
+
</Account>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<qbo:SearchResults xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
|
3
|
+
<qbo:CdmCollections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Accounts">
|
4
|
+
<Account>
|
5
|
+
<Id idDomain="QBO">30</Id>
|
6
|
+
<SyncToken>0</SyncToken>
|
7
|
+
<MetaData>
|
8
|
+
<CreateTime>2012-01-22T20:28:58-08:00</CreateTime>
|
9
|
+
<LastUpdatedTime>2012-01-22T20:28:58-08:00</LastUpdatedTime>
|
10
|
+
</MetaData>
|
11
|
+
<Name>Accounts Receivable (A/R)</Name>
|
12
|
+
<Subtype>AccountsReceivable</Subtype>
|
13
|
+
<CurrentBalance>6200.00</CurrentBalance>
|
14
|
+
</Account>
|
15
|
+
<Account>
|
16
|
+
<Id idDomain="QBO">7</Id>
|
17
|
+
<SyncToken>0</SyncToken>
|
18
|
+
<MetaData>
|
19
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
20
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
21
|
+
</MetaData>
|
22
|
+
<Name>Advertising</Name>
|
23
|
+
<Subtype>AdvertisingPromotional</Subtype>
|
24
|
+
</Account>
|
25
|
+
<Account>
|
26
|
+
<Id idDomain="QBO">8</Id>
|
27
|
+
<SyncToken>0</SyncToken>
|
28
|
+
<MetaData>
|
29
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
30
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
31
|
+
</MetaData>
|
32
|
+
<Name>Bank Charges</Name>
|
33
|
+
<Subtype>BankCharges</Subtype>
|
34
|
+
</Account>
|
35
|
+
<Account>
|
36
|
+
<Id idDomain="QBO">9</Id>
|
37
|
+
<SyncToken>0</SyncToken>
|
38
|
+
<MetaData>
|
39
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
40
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
41
|
+
</MetaData>
|
42
|
+
<Name>Commissions & Fees</Name>
|
43
|
+
<Subtype>OtherMiscellaneousServiceCost</Subtype>
|
44
|
+
</Account>
|
45
|
+
<Account>
|
46
|
+
<Id idDomain="QBO">32</Id>
|
47
|
+
<SyncToken>0</SyncToken>
|
48
|
+
<MetaData>
|
49
|
+
<CreateTime>2012-01-22T20:34:01-08:00</CreateTime>
|
50
|
+
<LastUpdatedTime>2012-01-22T20:34:01-08:00</LastUpdatedTime>
|
51
|
+
</MetaData>
|
52
|
+
<Name>Cost of Goods Sold</Name>
|
53
|
+
<Subtype>SuppliesMaterialsCogs</Subtype>
|
54
|
+
</Account>
|
55
|
+
<Account>
|
56
|
+
<Id idDomain="QBO">28</Id>
|
57
|
+
<SyncToken>0</SyncToken>
|
58
|
+
<MetaData>
|
59
|
+
<CreateTime>2011-09-29T15:45:43-07:00</CreateTime>
|
60
|
+
<LastUpdatedTime>2011-09-29T15:45:43-07:00</LastUpdatedTime>
|
61
|
+
</MetaData>
|
62
|
+
<Name>Discounts given</Name>
|
63
|
+
<Subtype>DiscountsRefundsGiven</Subtype>
|
64
|
+
</Account>
|
65
|
+
<Account>
|
66
|
+
<Id idDomain="QBO">10</Id>
|
67
|
+
<SyncToken>0</SyncToken>
|
68
|
+
<MetaData>
|
69
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
70
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
71
|
+
</MetaData>
|
72
|
+
<Name>Dues & Subscriptions</Name>
|
73
|
+
<Subtype>DuesSubscriptions</Subtype>
|
74
|
+
</Account>
|
75
|
+
<Account>
|
76
|
+
<Id idDomain="QBO">5</Id>
|
77
|
+
<SyncToken>0</SyncToken>
|
78
|
+
<MetaData>
|
79
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
80
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
81
|
+
</MetaData>
|
82
|
+
<Name>Fees Billed</Name>
|
83
|
+
<Subtype>ServiceFeeIncome</Subtype>
|
84
|
+
</Account>
|
85
|
+
<Account>
|
86
|
+
<Id idDomain="QBO">11</Id>
|
87
|
+
<SyncToken>0</SyncToken>
|
88
|
+
<MetaData>
|
89
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
90
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
91
|
+
</MetaData>
|
92
|
+
<Name>Insurance</Name>
|
93
|
+
<Subtype>Insurance</Subtype>
|
94
|
+
</Account>
|
95
|
+
<Account>
|
96
|
+
<Id idDomain="QBO">25</Id>
|
97
|
+
<SyncToken>0</SyncToken>
|
98
|
+
<MetaData>
|
99
|
+
<CreateTime>2011-09-29T15:42:38-07:00</CreateTime>
|
100
|
+
<LastUpdatedTime>2011-09-29T15:42:38-07:00</LastUpdatedTime>
|
101
|
+
</MetaData>
|
102
|
+
<Name>Interest Earned</Name>
|
103
|
+
<Subtype>InterestEarned</Subtype>
|
104
|
+
</Account>
|
105
|
+
</qbo:CdmCollections>
|
106
|
+
<qbo:Count>10</qbo:Count>
|
107
|
+
<qbo:CurrentPage>1</qbo:CurrentPage>
|
108
|
+
</qbo:SearchResults>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<Customer>
|
3
|
+
<Id idDomain="QBO">1</Id>
|
4
|
+
<SyncToken>1</SyncToken>
|
5
|
+
<MetaData>
|
6
|
+
<CreateTime>2011-09-29T15:45:12-07:00</CreateTime>
|
7
|
+
<LastUpdatedTime>2012-01-22T20:35:57-08:00</LastUpdatedTime>
|
8
|
+
</MetaData>
|
9
|
+
<Name>John Doe</Name>
|
10
|
+
<Address>
|
11
|
+
<Line1>123 Main St.</Line1>
|
12
|
+
<Line2>Suite 400</Line2>
|
13
|
+
<City>San Diego</City>
|
14
|
+
<Country>USA</Country>
|
15
|
+
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
|
16
|
+
<PostalCode>96009</PostalCode>
|
17
|
+
<Tag>Billing</Tag>
|
18
|
+
</Address>
|
19
|
+
<Address>
|
20
|
+
<Line1>123 Main St.</Line1>
|
21
|
+
<Line2>Suite 400</Line2>
|
22
|
+
<City>San Diego</City>
|
23
|
+
<Country>USA</Country>
|
24
|
+
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
|
25
|
+
<PostalCode>96009</PostalCode>
|
26
|
+
<Tag>Shipping</Tag>
|
27
|
+
</Address>
|
28
|
+
<Phone>
|
29
|
+
<DeviceType>Primary</DeviceType>
|
30
|
+
<FreeFormNumber>(408) 555-1212</FreeFormNumber>
|
31
|
+
</Phone>
|
32
|
+
<Phone>
|
33
|
+
<DeviceType>Mobile</DeviceType>
|
34
|
+
<FreeFormNumber>(831) 334-0987</FreeFormNumber>
|
35
|
+
</Phone>
|
36
|
+
<WebSite/>
|
37
|
+
<Email>
|
38
|
+
<Address>johndoe@gmail.com</Address>
|
39
|
+
</Email>
|
40
|
+
<GivenName>John</GivenName>
|
41
|
+
<FamilyName>Doe</FamilyName>
|
42
|
+
<DBAName>John's Wine Shop</DBAName>
|
43
|
+
<Notes>
|
44
|
+
<Content>Likes chocolate and horses</Content>
|
45
|
+
</Notes>
|
46
|
+
<CustomField xsi:type="BooleanTypeCustomField">
|
47
|
+
<DefinitionId>Bill With Parent</DefinitionId>
|
48
|
+
<Value>false</Value>
|
49
|
+
</CustomField>
|
50
|
+
<CustomField xsi:type="StringTypeCustomField">
|
51
|
+
<DefinitionId>Resale Number</DefinitionId>
|
52
|
+
<Value>ABC-123</Value>
|
53
|
+
</CustomField>
|
54
|
+
<CustomField xsi:type="StringTypeCustomField">
|
55
|
+
<DefinitionId>Preferred Delivery Method</DefinitionId>
|
56
|
+
<Value>PRINT</Value>
|
57
|
+
</CustomField>
|
58
|
+
<SalesTermId idDomain="QBO">3</SalesTermId>
|
59
|
+
<PaymentMethodId idDomain="QBO">5</PaymentMethodId>
|
60
|
+
<OpenBalance>
|
61
|
+
<Amount>6200</Amount>
|
62
|
+
</OpenBalance>
|
63
|
+
</Customer>
|