quickeebooks 0.1.6 → 0.1.7
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.
- data/Gemfile.lock +1 -1
- data/HISTORY.md +4 -0
- data/README.md +2 -0
- data/coverage/index.html +3785 -3233
- data/lib/quickeebooks.rb +7 -0
- data/lib/quickeebooks/common/online_entity_model.rb +0 -2
- data/lib/quickeebooks/online/model/account_detail_type.rb +116 -223
- data/lib/quickeebooks/online/model/customer.rb +33 -2
- data/lib/quickeebooks/online/model/employee.rb +25 -0
- data/lib/quickeebooks/online/model/time_activity.rb +48 -0
- data/lib/quickeebooks/online/model/time_activity_employee.rb +12 -0
- data/lib/quickeebooks/online/model/time_activity_vendor.rb +12 -0
- data/lib/quickeebooks/online/model/vendor.rb +1 -0
- data/lib/quickeebooks/online/service/employee.rb +15 -0
- data/lib/quickeebooks/online/service/service_base.rb +8 -1
- data/lib/quickeebooks/online/service/time_activity.rb +15 -0
- data/lib/quickeebooks/version.rb +1 -1
- data/spec/quickeebooks/online/customer_spec.rb +1 -1
- data/spec/quickeebooks/online/employee_spec.rb +31 -0
- data/spec/quickeebooks/online/services/employee_spec.rb +83 -0
- data/spec/quickeebooks/online/services/service_base_spec.rb +12 -0
- data/spec/quickeebooks/online/services/time_activity_spec.rb +89 -0
- data/spec/quickeebooks/online/time_activity_spec.rb +18 -0
- data/spec/xml/online/employee.xml +31 -0
- data/spec/xml/online/employee2.xml +31 -0
- data/spec/xml/online/employees.xml +36 -0
- data/spec/xml/online/time_activities.xml +27 -0
- data/spec/xml/online/time_activity.xml +21 -0
- data/spec/xml/online/time_activity2.xml +21 -0
- metadata +18 -5
- data/tmp/blocks.rb +0 -14
- data/tmp/create_customer_windows.rb +0 -59
- data/tmp/online.rb +0 -23
@@ -0,0 +1,36 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<qbo:SearchResults xmlns="http://www.intuit.com/sb/cdm/qbo" xmlns:qbp="http://www.intuit.com/sb/cdm/v2" xmlns:qbo="http://www.intuit.com/sb/cdm/qbopayroll/v1"> <qbo:CdmCollections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Employees">
|
3
|
+
<Employee>
|
4
|
+
<Id>3</Id>
|
5
|
+
<SyncToken>0</SyncToken>
|
6
|
+
<MetaData>
|
7
|
+
<CreateTime>2010-09-10T00:55:25-07:00</CreateTime>
|
8
|
+
<LastUpdatedTime>2010-09-10T00:55:25-07:00</LastUpdatedTime>
|
9
|
+
</MetaData>
|
10
|
+
<Name>John Simpson</Name>
|
11
|
+
<Address>
|
12
|
+
<Line1>21215 Burbank Boulevard, Ste. 100</Line1>
|
13
|
+
<Line2></Line2>
|
14
|
+
<City>Woodland Hills</City>
|
15
|
+
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
|
16
|
+
<PostalCode>91367</PostalCode>
|
17
|
+
</Address>
|
18
|
+
<Phone>
|
19
|
+
<FreeFormNumber>(818) 936-7800</FreeFormNumber>
|
20
|
+
</Phone>
|
21
|
+
<Phone>
|
22
|
+
<DeviceType>Mobile</DeviceType>
|
23
|
+
<FreeFormNumber>(818) 436-8225</FreeFormNumber>
|
24
|
+
</Phone>
|
25
|
+
<Email>
|
26
|
+
<Address>john.simpson@mint.com</Address>
|
27
|
+
</Email>
|
28
|
+
<GivenName>John</GivenName>
|
29
|
+
<FamilyName>Simpson</FamilyName>
|
30
|
+
<BillableTime>false</BillableTime>
|
31
|
+
<HiredDate>9999-12-31-08:00</HiredDate>
|
32
|
+
</Employee>
|
33
|
+
</qbo:CdmCollections>
|
34
|
+
<qbo:Count>1</qbo:Count>
|
35
|
+
<qbo:CurrentPage>1</qbo:CurrentPage>
|
36
|
+
</qbo:SearchResults>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<qbo:SearchResults xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo" xmlns:ns3="http://www.intuit.com/sb/cdm/qbopayroll/v1">
|
3
|
+
<qbo:CdmCollections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TimeActivitys">
|
4
|
+
<TimeActivity xmlns:qbo="http://www.intuit.com/sb/cdm/qbo" xmlns="http://www.intuit.com/sb/cdm/v2">
|
5
|
+
<Id>7</Id>
|
6
|
+
<SyncToken>1</SyncToken>
|
7
|
+
<MetaData>
|
8
|
+
<CreateTime>2010-09-13T04:11:06-07:00</CreateTime>
|
9
|
+
<LastUpdatedTime>2010-09-13T04:11:06-07:00</LastUpdatedTime>
|
10
|
+
</MetaData>
|
11
|
+
<TxnDate>2011-08-03-07:00</TxnDate>
|
12
|
+
<NameOf>Vendor</NameOf>
|
13
|
+
<Vendor>
|
14
|
+
<VendorId idDomain="QBO">3793</VendorId>
|
15
|
+
</Vendor>
|
16
|
+
<CustomerId idDomain="QBO">3794</CustomerId>
|
17
|
+
<Taxable>true</Taxable>
|
18
|
+
<HourlyRate>10.5</HourlyRate>
|
19
|
+
<BillableStatus>Billable</BillableStatus>
|
20
|
+
<Hours>10</Hours>
|
21
|
+
<Minutes>5</Minutes>
|
22
|
+
<Description>This is a Description</Description>
|
23
|
+
</TimeActivity>
|
24
|
+
</qbo:CdmCollections>
|
25
|
+
<qbo:Count>1</qbo:Count>
|
26
|
+
<qbo:CurrentPage>1</qbo:CurrentPage>
|
27
|
+
</qbo:SearchResults>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<TimeActivity xmlns:ns2="http://www.intuit.com/sb/cdm/qbo" xmlns="http://www.intuit.com/sb/cdm/v2">
|
3
|
+
<Id>7</Id>
|
4
|
+
<SyncToken>0</SyncToken>
|
5
|
+
<MetaData>
|
6
|
+
<CreateTime>2010-09-13T04:11:06-07:00</CreateTime>
|
7
|
+
<LastUpdatedTime>2010-09-13T04:11:06-07:00</LastUpdatedTime>
|
8
|
+
</MetaData>
|
9
|
+
<TxnDate>2011-08-03-07:00</TxnDate>
|
10
|
+
<NameOf>Vendor</NameOf>
|
11
|
+
<Vendor>
|
12
|
+
<VendorId idDomain="QBO">3793</VendorId>
|
13
|
+
</Vendor>
|
14
|
+
<CustomerId idDomain="QBO">3794</CustomerId>
|
15
|
+
<Taxable>true</Taxable>
|
16
|
+
<HourlyRate>10.5</HourlyRate>
|
17
|
+
<BillableStatus>Billable</BillableStatus>
|
18
|
+
<Hours>10</Hours>
|
19
|
+
<Minutes>5</Minutes>
|
20
|
+
<Description>This is a Description</Description>
|
21
|
+
</TimeActivity>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<TimeActivity xmlns:ns2="http://www.intuit.com/sb/cdm/qbo" xmlns="http://www.intuit.com/sb/cdm/v2">
|
3
|
+
<Id>7</Id>
|
4
|
+
<SyncToken>0</SyncToken>
|
5
|
+
<MetaData>
|
6
|
+
<CreateTime>2010-09-13T04:11:06-07:00</CreateTime>
|
7
|
+
<LastUpdatedTime>2010-09-13T04:11:06-07:00</LastUpdatedTime>
|
8
|
+
</MetaData>
|
9
|
+
<TxnDate>2011-08-03-07:00</TxnDate>
|
10
|
+
<NameOf>Vendor</NameOf>
|
11
|
+
<Vendor>
|
12
|
+
<VendorId idDomain="QBO">3793</VendorId>
|
13
|
+
</Vendor>
|
14
|
+
<CustomerId idDomain="QBO">3794</CustomerId>
|
15
|
+
<Taxable>true</Taxable>
|
16
|
+
<HourlyRate>10.5</HourlyRate>
|
17
|
+
<BillableStatus>Billable</BillableStatus>
|
18
|
+
<Hours>12</Hours>
|
19
|
+
<Minutes>15</Minutes>
|
20
|
+
<Description>This is a Description</Description>
|
21
|
+
</TimeActivity>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quickeebooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: roxml
|
@@ -242,6 +242,7 @@ files:
|
|
242
242
|
- lib/quickeebooks/online/model/customer.rb
|
243
243
|
- lib/quickeebooks/online/model/customer_custom_field.rb
|
244
244
|
- lib/quickeebooks/online/model/email.rb
|
245
|
+
- lib/quickeebooks/online/model/employee.rb
|
245
246
|
- lib/quickeebooks/online/model/id.rb
|
246
247
|
- lib/quickeebooks/online/model/intuit_type.rb
|
247
248
|
- lib/quickeebooks/online/model/invoice.rb
|
@@ -264,6 +265,9 @@ files:
|
|
264
265
|
- lib/quickeebooks/online/model/sales_receipt.rb
|
265
266
|
- lib/quickeebooks/online/model/sales_receipt_header.rb
|
266
267
|
- lib/quickeebooks/online/model/sales_receipt_line_item.rb
|
268
|
+
- lib/quickeebooks/online/model/time_activity.rb
|
269
|
+
- lib/quickeebooks/online/model/time_activity_employee.rb
|
270
|
+
- lib/quickeebooks/online/model/time_activity_vendor.rb
|
267
271
|
- lib/quickeebooks/online/model/unit_price.rb
|
268
272
|
- lib/quickeebooks/online/model/vendor.rb
|
269
273
|
- lib/quickeebooks/online/model/web_site.rb
|
@@ -272,6 +276,7 @@ files:
|
|
272
276
|
- lib/quickeebooks/online/service/bill.rb
|
273
277
|
- lib/quickeebooks/online/service/company_meta_data.rb
|
274
278
|
- lib/quickeebooks/online/service/customer.rb
|
279
|
+
- lib/quickeebooks/online/service/employee.rb
|
275
280
|
- lib/quickeebooks/online/service/entitlement.rb
|
276
281
|
- lib/quickeebooks/online/service/filter.rb
|
277
282
|
- lib/quickeebooks/online/service/invoice.rb
|
@@ -282,6 +287,7 @@ files:
|
|
282
287
|
- lib/quickeebooks/online/service/sales_receipt.rb
|
283
288
|
- lib/quickeebooks/online/service/service_base.rb
|
284
289
|
- lib/quickeebooks/online/service/sort.rb
|
290
|
+
- lib/quickeebooks/online/service/time_activity.rb
|
285
291
|
- lib/quickeebooks/online/service/vendor.rb
|
286
292
|
- lib/quickeebooks/shared/service/access_token.rb
|
287
293
|
- lib/quickeebooks/shared/service/filter.rb
|
@@ -374,6 +380,7 @@ files:
|
|
374
380
|
- spec/quickeebooks/online/bill_spec.rb
|
375
381
|
- spec/quickeebooks/online/company_meta_data_spec.rb
|
376
382
|
- spec/quickeebooks/online/customer_spec.rb
|
383
|
+
- spec/quickeebooks/online/employee_spec.rb
|
377
384
|
- spec/quickeebooks/online/invoice_spec.rb
|
378
385
|
- spec/quickeebooks/online/journal_entry_spec.rb
|
379
386
|
- spec/quickeebooks/online/payment_spec.rb
|
@@ -382,13 +389,16 @@ files:
|
|
382
389
|
- spec/quickeebooks/online/services/bill_spec.rb
|
383
390
|
- spec/quickeebooks/online/services/company_meta_data_spec.rb
|
384
391
|
- spec/quickeebooks/online/services/customer_spec.rb
|
392
|
+
- spec/quickeebooks/online/services/employee_spec.rb
|
385
393
|
- spec/quickeebooks/online/services/filter_spec.rb
|
386
394
|
- spec/quickeebooks/online/services/invoice_spec.rb
|
387
395
|
- spec/quickeebooks/online/services/journal_entry_spec.rb
|
388
396
|
- spec/quickeebooks/online/services/payment_spec.rb
|
389
397
|
- spec/quickeebooks/online/services/sales_receipt_spec.rb
|
390
398
|
- spec/quickeebooks/online/services/service_base_spec.rb
|
399
|
+
- spec/quickeebooks/online/services/time_activity_spec.rb
|
391
400
|
- spec/quickeebooks/online/services/vendor_spec.rb
|
401
|
+
- spec/quickeebooks/online/time_activity_spec.rb
|
392
402
|
- spec/quickeebooks/online/vendor_spec.rb
|
393
403
|
- spec/quickeebooks/shared/access_token_spec.rb
|
394
404
|
- spec/quickeebooks/shared/filter_spec.rb
|
@@ -420,6 +430,9 @@ files:
|
|
420
430
|
- spec/xml/online/customer2.xml
|
421
431
|
- spec/xml/online/customers.xml
|
422
432
|
- spec/xml/online/determine_base_url.xml
|
433
|
+
- spec/xml/online/employee.xml
|
434
|
+
- spec/xml/online/employee2.xml
|
435
|
+
- spec/xml/online/employees.xml
|
423
436
|
- spec/xml/online/invalid_user.xml
|
424
437
|
- spec/xml/online/invoice.xml
|
425
438
|
- spec/xml/online/journal_entries.xml
|
@@ -431,6 +444,9 @@ files:
|
|
431
444
|
- spec/xml/online/sales_receipt.xml
|
432
445
|
- spec/xml/online/sales_receipt2.xml
|
433
446
|
- spec/xml/online/sales_receipts.xml
|
447
|
+
- spec/xml/online/time_activities.xml
|
448
|
+
- spec/xml/online/time_activity.xml
|
449
|
+
- spec/xml/online/time_activity2.xml
|
434
450
|
- spec/xml/online/user.xml
|
435
451
|
- spec/xml/online/vendor.xml
|
436
452
|
- spec/xml/online/vendor2.xml
|
@@ -458,9 +474,6 @@ files:
|
|
458
474
|
- spec/xml/windows/sales_taxes.xml
|
459
475
|
- spec/xml/windows/ship_methods.xml
|
460
476
|
- spec/xml/windows/time_activities.xml
|
461
|
-
- tmp/blocks.rb
|
462
|
-
- tmp/create_customer_windows.rb
|
463
|
-
- tmp/online.rb
|
464
477
|
homepage: http://github.com/ruckus/quickeebooks
|
465
478
|
licenses: []
|
466
479
|
post_install_message:
|
data/tmp/blocks.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'oauth'
|
3
|
-
$: << File.expand_path('./lib')
|
4
|
-
require 'quickeebooks'
|
5
|
-
|
6
|
-
# attached to "Vinosmith.qbw" in Quickbooks Simple Start 2010
|
7
|
-
consumer_key = 'qyprdL8NUDMYcCzwp8ea9KbIhaMSRk'
|
8
|
-
consumer_secret = 'FcE5kihBYMVQGvX9UNYMxsrM8mP7bfuxc36PLhJB'
|
9
|
-
qb_oauth_consumer = OAuth::Consumer.new(consumer_key, consumer_secret, {
|
10
|
-
:site => "https://oauth.intuit.com",
|
11
|
-
:request_token_path => "/oauth/v1/get_request_token",
|
12
|
-
:authorize_path => "/oauth/v1/get_access_token",
|
13
|
-
:access_token_path => "/oauth/v1/get_access_token",
|
14
|
-
:proxy => 'http://127.0.0.1:8080'
|
15
|
-
})
|
16
|
-
realm_id = "524388660"
|
17
|
-
access_token = "qyprdBzoHRYCVSZg0z5DrX970E2uebeaXSRNnoIjPQMqAXAY"
|
18
|
-
access_secret = "W2oWdboxA9XqwEZrbSv7rNsatphhBs9Vi5byKBjT"
|
19
|
-
oauth = OAuth::AccessToken.new(qb_oauth_consumer, access_token, access_secret)
|
20
|
-
|
21
|
-
service = Quickeebooks::Windows::Service::Customer.new
|
22
|
-
|
23
|
-
service.access_token = oauth
|
24
|
-
service.realm_id = realm_id
|
25
|
-
|
26
|
-
customer = service.fetch_by_id(1)
|
27
|
-
puts customer.name
|
28
|
-
if customer.notes
|
29
|
-
customer.notes.each { |note| puts note.content }
|
30
|
-
end
|
31
|
-
# UPDATE it
|
32
|
-
customer.name = "Cody 22 TEST"
|
33
|
-
|
34
|
-
customer.meta_data = nil
|
35
|
-
customer.external_key = nil
|
36
|
-
|
37
|
-
response = service.update(customer)
|
38
|
-
#puts response.inspect
|
39
|
-
|
40
|
-
#puts service.list
|
41
|
-
=begin
|
42
|
-
customer = Quickeebooks::Windows::Model::Customer.new
|
43
|
-
customer.type_of = "Person"
|
44
|
-
customer.name = "Cody Test-#{Time.now.to_i}"
|
45
|
-
email = Quickeebooks::Windows::Model::Email.new
|
46
|
-
email.address = "foo@bar.com"
|
47
|
-
email.tag = "Business"
|
48
|
-
customer.email = email
|
49
|
-
billing_address = Quickeebooks::Windows::Model::Address.new
|
50
|
-
billing_address.tag = "Billing"
|
51
|
-
billing_address.line1 = "#{Time.now.to_i} Main St."
|
52
|
-
billing_address.city = "San Francisco"
|
53
|
-
billing_address.country_sub_division_code = "CA"
|
54
|
-
billing_address.postal_code = "94117"
|
55
|
-
billing_address.country = "USA"
|
56
|
-
customer.address = billing_address
|
57
|
-
result = service.create(customer)
|
58
|
-
puts result.inspect
|
59
|
-
=end
|
data/tmp/online.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'oauth'
|
3
|
-
$: << File.expand_path('./lib')
|
4
|
-
require 'quickeebooks'
|
5
|
-
|
6
|
-
consumer_key = 'qyprdZrwArlbUcJX7SlxresbflsXKY'
|
7
|
-
consumer_secret = 'qhgNfrl9XX8JVztdu5z27idFHdNI5UOSHC5HcItt'
|
8
|
-
qb_oauth_consumer = OAuth::Consumer.new(consumer_key, consumer_secret, {
|
9
|
-
:site => "https://oauth.intuit.com",
|
10
|
-
:request_token_path => "/oauth/v1/get_request_token",
|
11
|
-
:authorize_path => "/oauth/v1/get_access_token",
|
12
|
-
:access_token_path => "/oauth/v1/get_access_token",
|
13
|
-
:proxy => 'http://127.0.0.1:8080'
|
14
|
-
})
|
15
|
-
realm_id = "214483939"
|
16
|
-
access_token = "qyprdTrgSmjG8p8yAdBYJAZYEdGDlh5JyuNhBvKS3CSQUMjE"
|
17
|
-
access_secret = "4lAHnUImKT7a69iIjA19xQuk7UNUvs8d6fLcbO6F"
|
18
|
-
oauth = OAuth::AccessToken.new(qb_oauth_consumer, access_token, access_secret)
|
19
|
-
|
20
|
-
service = Quickeebooks::Online::Service::Customer.new
|
21
|
-
service.access_token = oauth
|
22
|
-
service.realm_id = realm_id
|
23
|
-
service.list([], 1, 2)
|