quickbooks 0.4.0 → 0.9.9
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.tar.gz.sig +0 -0
- data/History.txt +23 -0
- data/License.txt +54 -0
- data/Manifest.txt +73 -0
- data/README.txt +79 -0
- data/Rakefile +17 -78
- data/lib/quickbooks.rb +153 -7
- data/lib/quickbooks/adaptability.rb +67 -0
- data/lib/quickbooks/adapters/http_adapter.rb +94 -0
- data/lib/quickbooks/adapters/https_adapter.rb +57 -0
- data/lib/quickbooks/adapters/ole_adapter.rb +141 -110
- data/lib/quickbooks/adapters/spew_adapter.rb +39 -0
- data/lib/quickbooks/adapters/tcp_adapter.rb +71 -0
- data/lib/quickbooks/adapters/test_adapter.rb +62 -0
- data/lib/quickbooks/element.rb +385 -0
- data/lib/quickbooks/element_collection.rb +105 -0
- data/lib/quickbooks/extlib.rb +8 -0
- data/lib/quickbooks/extlib/assertions.rb +8 -0
- data/lib/quickbooks/extlib/class.rb +98 -0
- data/lib/quickbooks/extlib/days_and_times.rb +10 -0
- data/lib/quickbooks/extlib/days_and_times/duration.rb +362 -0
- data/lib/quickbooks/extlib/days_and_times/numeric.rb +48 -0
- data/lib/quickbooks/extlib/days_and_times/object.rb +19 -0
- data/lib/quickbooks/extlib/days_and_times/time.rb +137 -0
- data/lib/quickbooks/extlib/hash.rb +327 -0
- data/lib/quickbooks/extlib/hook.rb +366 -0
- data/lib/quickbooks/extlib/inflection.rb +436 -0
- data/lib/quickbooks/extlib/logger.rb +202 -0
- data/lib/quickbooks/extlib/object.rb +162 -0
- data/lib/quickbooks/extlib/pathname.rb +15 -0
- data/lib/quickbooks/extlib/rubygems.rb +38 -0
- data/lib/quickbooks/extlib/string.rb +32 -0
- data/lib/quickbooks/extlib/time.rb +41 -0
- data/lib/quickbooks/model.rb +503 -121
- data/lib/quickbooks/option.rb +95 -0
- data/lib/quickbooks/property.rb +69 -0
- data/lib/quickbooks/ruby_ext.rb +251 -0
- data/lib/quickbooks/type.rb +75 -0
- data/lib/quickbooks/types.rb +58 -0
- data/lib/quickbooks/version.rb +10 -0
- data/lib/quickbooks/xsd.rb +243 -0
- data/lib/quickbooks/xsd/attribute.rb +57 -0
- data/lib/quickbooks/xsd/choice.rb +94 -0
- data/lib/quickbooks/xsd/complex_type.rb +77 -0
- data/lib/quickbooks/xsd/element.rb +214 -0
- data/lib/quickbooks/xsd/group.rb +94 -0
- data/lib/quickbooks/xsd/restriction.rb +51 -0
- data/lib/quickbooks/xsd/sequence.rb +85 -0
- data/lib/quickbooks/xsd/simple_type.rb +87 -0
- data/lib/quickbooks/xsd/union.rb +70 -0
- data/lib/quickbooks/xsd/validation.rb +89 -0
- data/lib/quickbooks/xsd/xml_parse.rb +80 -0
- data/quickbooks.gemspec +36 -0
- data/source/qbxml21_demo.xsd +2223 -0
- data/source/qbxmlops_demo.xsd +483 -0
- data/source/qbxmltypes.xsd +160 -0
- data/spec/association_spec.rb +5 -0
- data/spec/element_collection_spec.rb +8 -0
- data/spec/find_spec.rb +30 -0
- data/spec/lib/quickbooks/element_spec.rb +83 -0
- data/spec/lib/quickbooks/elements/sales_order_add_spec.rb +14 -0
- data/spec/lib/quickbooks/elements/vendor_add_spec.rb +78 -0
- data/spec/lib/quickbooks/model_spec.rb +89 -0
- data/spec/lib/quickbooks/models/customer_spec.rb +52 -0
- data/spec/lib/quickbooks/models/invoice_spec.rb +12 -0
- data/spec/lib/quickbooks/models/sales_order_line_spec.rb +0 -0
- data/spec/lib/quickbooks/models/sales_order_spec.rb +145 -0
- data/spec/lib/quickbooks/xsd/choice_spec.rb +18 -0
- data/spec/pending_spec.rb +11 -0
- data/spec/quickbooks_spec.rb +38 -0
- data/spec/repeatable_spec.rb +20 -0
- data/spec/requires_spec.rb +10 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/validation_spec.rb +24 -0
- metadata +133 -285
- metadata.gz.sig +0 -0
- data/LICENSE +0 -16
- data/README +0 -49
- data/doc/classes/Array.html +0 -368
- data/doc/classes/Array.src/M000026.html +0 -18
- data/doc/classes/Array.src/M000027.html +0 -21
- data/doc/classes/Array.src/M000028.html +0 -18
- data/doc/classes/Array.src/M000029.html +0 -19
- data/doc/classes/Array.src/M000030.html +0 -18
- data/doc/classes/Array.src/M000031.html +0 -23
- data/doc/classes/Array.src/M000032.html +0 -18
- data/doc/classes/Array.src/M000033.html +0 -18
- data/doc/classes/Array.src/M000034.html +0 -18
- data/doc/classes/Array.src/M000035.html +0 -19
- data/doc/classes/Array.src/M000036.html +0 -18
- data/doc/classes/Array.src/M000037.html +0 -23
- data/doc/classes/Array.src/M000038.html +0 -18
- data/doc/classes/Array.src/M000039.html +0 -21
- data/doc/classes/Array.src/M000040.html +0 -18
- data/doc/classes/Array.src/M000041.html +0 -18
- data/doc/classes/Class.html +0 -171
- data/doc/classes/Class.src/M000042.html +0 -18
- data/doc/classes/Class.src/M000043.html +0 -18
- data/doc/classes/Hash.html +0 -516
- data/doc/classes/Hash.src/M000001.html +0 -18
- data/doc/classes/Hash.src/M000002.html +0 -21
- data/doc/classes/Hash.src/M000003.html +0 -18
- data/doc/classes/Hash.src/M000004.html +0 -21
- data/doc/classes/Hash.src/M000005.html +0 -18
- data/doc/classes/Hash.src/M000006.html +0 -20
- data/doc/classes/Hash.src/M000007.html +0 -18
- data/doc/classes/Hash.src/M000008.html +0 -22
- data/doc/classes/Hash.src/M000009.html +0 -18
- data/doc/classes/Hash.src/M000010.html +0 -21
- data/doc/classes/Hash.src/M000011.html +0 -24
- data/doc/classes/Hash.src/M000012.html +0 -18
- data/doc/classes/Hash.src/M000013.html +0 -21
- data/doc/classes/Hash.src/M000014.html +0 -18
- data/doc/classes/Hash.src/M000015.html +0 -21
- data/doc/classes/Hash.src/M000016.html +0 -18
- data/doc/classes/Hash.src/M000017.html +0 -21
- data/doc/classes/Hash.src/M000018.html +0 -27
- data/doc/classes/Hash.src/M000019.html +0 -20
- data/doc/classes/Hash.src/M000020.html +0 -18
- data/doc/classes/Hash.src/M000021.html +0 -18
- data/doc/classes/Hash.src/M000022.html +0 -18
- data/doc/classes/Hash.src/M000023.html +0 -18
- data/doc/classes/Hash.src/M000024.html +0 -18
- data/doc/classes/Hash.src/M000025.html +0 -28
- data/doc/classes/Object.html +0 -278
- data/doc/classes/Object.src/M000044.html +0 -24
- data/doc/classes/Object.src/M000045.html +0 -19
- data/doc/classes/Object.src/M000046.html +0 -24
- data/doc/classes/Object.src/M000047.html +0 -18
- data/doc/classes/Object.src/M000048.html +0 -19
- data/doc/classes/Object.src/M000049.html +0 -18
- data/doc/classes/Object.src/M000050.html +0 -18
- data/doc/classes/Object.src/M000051.html +0 -18
- data/doc/classes/Qbxml.html +0 -131
- data/doc/classes/Qbxml/Request.html +0 -224
- data/doc/classes/Qbxml/Request.src/M000132.html +0 -66
- data/doc/classes/Qbxml/Request.src/M000133.html +0 -19
- data/doc/classes/Qbxml/Request.src/M000134.html +0 -83
- data/doc/classes/Qbxml/RequestSet.html +0 -199
- data/doc/classes/Qbxml/RequestSet.src/M000135.html +0 -22
- data/doc/classes/Qbxml/RequestSet.src/M000136.html +0 -26
- data/doc/classes/Qbxml/RequestSet.src/M000137.html +0 -18
- data/doc/classes/Qbxml/RequestSet.src/M000138.html +0 -22
- data/doc/classes/Qbxml/Response.html +0 -302
- data/doc/classes/Qbxml/Response.src/M000123.html +0 -24
- data/doc/classes/Qbxml/Response.src/M000124.html +0 -19
- data/doc/classes/Qbxml/Response.src/M000125.html +0 -55
- data/doc/classes/Qbxml/Response.src/M000126.html +0 -18
- data/doc/classes/Qbxml/Response.src/M000127.html +0 -18
- data/doc/classes/Qbxml/Response.src/M000128.html +0 -18
- data/doc/classes/Qbxml/Response.src/M000129.html +0 -18
- data/doc/classes/Qbxml/Response.src/M000130.html +0 -18
- data/doc/classes/Qbxml/Response.src/M000131.html +0 -63
- data/doc/classes/Qbxml/ResponseSet.html +0 -244
- data/doc/classes/Qbxml/ResponseSet.src/M000116.html +0 -22
- data/doc/classes/Qbxml/ResponseSet.src/M000117.html +0 -26
- data/doc/classes/Qbxml/ResponseSet.src/M000118.html +0 -24
- data/doc/classes/Qbxml/ResponseSet.src/M000119.html +0 -20
- data/doc/classes/Qbxml/ResponseSet.src/M000120.html +0 -27
- data/doc/classes/Qbxml/ResponseSet.src/M000121.html +0 -18
- data/doc/classes/Qbxml/ResponseSet.src/M000122.html +0 -18
- data/doc/classes/Quickbooks.html +0 -196
- data/doc/classes/Quickbooks/Address.html +0 -139
- data/doc/classes/Quickbooks/Address.src/M000115.html +0 -19
- data/doc/classes/Quickbooks/Base.html +0 -567
- data/doc/classes/Quickbooks/Base.src/M000095.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000096.html +0 -20
- data/doc/classes/Quickbooks/Base.src/M000097.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000098.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000099.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000100.html +0 -30
- data/doc/classes/Quickbooks/Base.src/M000101.html +0 -22
- data/doc/classes/Quickbooks/Base.src/M000102.html +0 -30
- data/doc/classes/Quickbooks/Base.src/M000103.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000104.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000105.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000106.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000107.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000108.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000109.html +0 -45
- data/doc/classes/Quickbooks/Base.src/M000110.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000111.html +0 -18
- data/doc/classes/Quickbooks/Base.src/M000112.html +0 -20
- data/doc/classes/Quickbooks/BillAddress.html +0 -113
- data/doc/classes/Quickbooks/CreditCardInfo.html +0 -113
- data/doc/classes/Quickbooks/Customer.html +0 -113
- data/doc/classes/Quickbooks/CustomerTypeRef.html +0 -113
- data/doc/classes/Quickbooks/Deleted.html +0 -113
- data/doc/classes/Quickbooks/ItemSalesTaxRef.html +0 -113
- data/doc/classes/Quickbooks/JobTypeRef.html +0 -113
- data/doc/classes/Quickbooks/ListDeleted.html +0 -139
- data/doc/classes/Quickbooks/ListDeleted.src/M000114.html +0 -18
- data/doc/classes/Quickbooks/ListItem.html +0 -170
- data/doc/classes/Quickbooks/ListItem.src/M000093.html +0 -20
- data/doc/classes/Quickbooks/ListItem.src/M000094.html +0 -18
- data/doc/classes/Quickbooks/Model.html +0 -462
- data/doc/classes/Quickbooks/Model.src/M000073.html +0 -24
- data/doc/classes/Quickbooks/Model.src/M000074.html +0 -19
- data/doc/classes/Quickbooks/Model.src/M000075.html +0 -18
- data/doc/classes/Quickbooks/Model.src/M000076.html +0 -18
- data/doc/classes/Quickbooks/Model.src/M000077.html +0 -18
- data/doc/classes/Quickbooks/Model.src/M000078.html +0 -22
- data/doc/classes/Quickbooks/Model.src/M000079.html +0 -32
- data/doc/classes/Quickbooks/Model.src/M000080.html +0 -32
- data/doc/classes/Quickbooks/Model.src/M000081.html +0 -18
- data/doc/classes/Quickbooks/Model.src/M000082.html +0 -18
- data/doc/classes/Quickbooks/Model.src/M000083.html +0 -22
- data/doc/classes/Quickbooks/Model.src/M000084.html +0 -23
- data/doc/classes/Quickbooks/Model.src/M000085.html +0 -18
- data/doc/classes/Quickbooks/Model.src/M000086.html +0 -21
- data/doc/classes/Quickbooks/Model.src/M000087.html +0 -26
- data/doc/classes/Quickbooks/Model.src/M000088.html +0 -26
- data/doc/classes/Quickbooks/Model.src/M000089.html +0 -26
- data/doc/classes/Quickbooks/Model.src/M000090.html +0 -21
- data/doc/classes/Quickbooks/Model.src/M000091.html +0 -23
- data/doc/classes/Quickbooks/OleAdapter.html +0 -129
- data/doc/classes/Quickbooks/OleAdapter/Connection.html +0 -343
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000058.html +0 -18
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000059.html +0 -19
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000060.html +0 -24
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000061.html +0 -18
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000062.html +0 -18
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000063.html +0 -21
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000064.html +0 -24
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000065.html +0 -20
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000066.html +0 -24
- data/doc/classes/Quickbooks/OleAdapter/Connection.src/M000067.html +0 -24
- data/doc/classes/Quickbooks/OleAdapter/Ole.html +0 -209
- data/doc/classes/Quickbooks/OleAdapter/Ole.src/M000068.html +0 -21
- data/doc/classes/Quickbooks/OleAdapter/Ole.src/M000069.html +0 -22
- data/doc/classes/Quickbooks/OleAdapter/Ole.src/M000070.html +0 -18
- data/doc/classes/Quickbooks/ParentRef.html +0 -113
- data/doc/classes/Quickbooks/PreferredPaymentMethodRef.html +0 -113
- data/doc/classes/Quickbooks/PriceLevelRef.html +0 -113
- data/doc/classes/Quickbooks/QbxmlDebugAdapter.html +0 -111
- data/doc/classes/Quickbooks/QbxmlDebugAdapter/Connection.html +0 -139
- data/doc/classes/Quickbooks/QbxmlDebugAdapter/Connection.src/M000057.html +0 -18
- data/doc/classes/Quickbooks/Ref.html +0 -146
- data/doc/classes/Quickbooks/Ref.src/M000113.html +0 -18
- data/doc/classes/Quickbooks/SalesRepRef.html +0 -113
- data/doc/classes/Quickbooks/SalesTaxCodeRef.html +0 -113
- data/doc/classes/Quickbooks/ShipAddress.html +0 -113
- data/doc/classes/Quickbooks/TermsRef.html +0 -113
- data/doc/classes/Quickbooks/Transaction.html +0 -154
- data/doc/classes/Quickbooks/Transaction.src/M000071.html +0 -19
- data/doc/classes/Quickbooks/Transaction.src/M000072.html +0 -18
- data/doc/classes/Quickbooks/TxnDeleted.html +0 -139
- data/doc/classes/Quickbooks/TxnDeleted.src/M000092.html +0 -18
- data/doc/classes/String.html +0 -203
- data/doc/classes/String.src/M000052.html +0 -18
- data/doc/classes/String.src/M000053.html +0 -18
- data/doc/classes/String.src/M000054.html +0 -18
- data/doc/classes/String.src/M000055.html +0 -18
- data/doc/classes/String.src/M000056.html +0 -18
- data/doc/created.rid +0 -1
- data/doc/files/LICENSE.html +0 -129
- data/doc/files/README.html +0 -225
- data/doc/files/lib/qbxml/request_rb.html +0 -110
- data/doc/files/lib/qbxml/response_rb.html +0 -109
- data/doc/files/lib/qbxml/support_rb.html +0 -101
- data/doc/files/lib/qbxml_rb.html +0 -122
- data/doc/files/lib/quickbooks/adapters/ole_adapter_rb.html +0 -108
- data/doc/files/lib/quickbooks/adapters/qbxml_debug_adapter_rb.html +0 -108
- data/doc/files/lib/quickbooks/base_rb.html +0 -327
- data/doc/files/lib/quickbooks/model_rb.html +0 -108
- data/doc/files/lib/quickbooks/models/common/address_rb.html +0 -101
- data/doc/files/lib/quickbooks/models/common/all_refs_rb.html +0 -101
- data/doc/files/lib/quickbooks/models/customer/credit_card_info_rb.html +0 -101
- data/doc/files/lib/quickbooks/models/customer_rb.html +0 -110
- data/doc/files/lib/quickbooks/models/deleted_rb.html +0 -101
- data/doc/files/lib/quickbooks/models/list_item_rb.html +0 -101
- data/doc/files/lib/quickbooks/models/transaction_rb.html +0 -101
- data/doc/files/lib/quickbooks/ruby_magic_rb.html +0 -120
- data/doc/files/lib/quickbooks_rb.html +0 -125
- data/doc/fr_class_index.html +0 -64
- data/doc/fr_file_index.html +0 -45
- data/doc/fr_method_index.html +0 -164
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/lib/qbxml.rb +0 -3
- data/lib/qbxml/request.rb +0 -207
- data/lib/qbxml/response.rb +0 -197
- data/lib/qbxml/support.rb +0 -130
- data/lib/quickbooks/adapters/qbxml_debug_adapter.rb +0 -10
- data/lib/quickbooks/base.rb +0 -277
- data/lib/quickbooks/models/common/address.rb +0 -14
- data/lib/quickbooks/models/common/all_refs.rb +0 -37
- data/lib/quickbooks/models/customer.rb +0 -70
- data/lib/quickbooks/models/customer/credit_card_info.rb +0 -5
- data/lib/quickbooks/models/deleted.rb +0 -22
- data/lib/quickbooks/models/list_item.rb +0 -41
- data/lib/quickbooks/models/transaction.rb +0 -49
- data/lib/quickbooks/ruby_magic.rb +0 -213
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
|
|
2
|
+
<!-- ============================================================================= -->
|
|
3
|
+
<!-- qbXML version 3.0 -->
|
|
4
|
+
<!-- -->
|
|
5
|
+
<!-- -->
|
|
6
|
+
<!-- Unpublished work. INTUIT CONFIDENTIAL. -->
|
|
7
|
+
<!-- Copyright 2001 Intuit Inc. All rights reserved. -->
|
|
8
|
+
<!-- -->
|
|
9
|
+
<!-- Use is subject to a qbXML Developer Agreement available at: -->
|
|
10
|
+
<!-- http://developer.intuit.com/legal/qbXML_021201.asp -->
|
|
11
|
+
<!-- and the terms specified at: -->
|
|
12
|
+
<!-- http://developer.intuit.com/legal/devsite_tos.html -->
|
|
13
|
+
<!-- -->
|
|
14
|
+
<!-- NOTICE: THE API IS A PRELIMINARY SPECIFICATION, AND IS SUBJECT TO CHANGE. -->
|
|
15
|
+
<!-- IT IS NOT FOR USE IN PRODUCTION. ANY USE OF THE API -->
|
|
16
|
+
<!-- IS AT YOUR OWN RISK. -->
|
|
17
|
+
<!-- -->
|
|
18
|
+
<!-- ============================================================================= -->
|
|
19
|
+
<!-- -->
|
|
20
|
+
<!-- qbxmltypes.xsd -->
|
|
21
|
+
<!-- -->
|
|
22
|
+
<!-- Unpublished work. INTUIT CONFIDENTIAL. -->
|
|
23
|
+
<!-- Copyright 2001 Intuit Inc. All rights reserved. -->
|
|
24
|
+
<!-- Use is subject to the terms specified at: -->
|
|
25
|
+
<!-- http://developer.intuit.com/legal/devsite_tos.html -->
|
|
26
|
+
<!-- -->
|
|
27
|
+
<!-- ============================================================================= -->
|
|
28
|
+
|
|
29
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
|
|
30
|
+
|
|
31
|
+
<xsd:simpleType name="IDTYPE">
|
|
32
|
+
<xsd:restriction base="xsd:string">
|
|
33
|
+
<xsd:maxLength value="36"/>
|
|
34
|
+
</xsd:restriction>
|
|
35
|
+
</xsd:simpleType>
|
|
36
|
+
|
|
37
|
+
<xsd:simpleType name="STRTYPE">
|
|
38
|
+
<xsd:restriction base="xsd:string">
|
|
39
|
+
</xsd:restriction>
|
|
40
|
+
</xsd:simpleType>
|
|
41
|
+
|
|
42
|
+
<xsd:simpleType name="BOOLTYPE">
|
|
43
|
+
<xsd:union>
|
|
44
|
+
<xsd:simpleType>
|
|
45
|
+
<xsd:restriction base="xsd:boolean">
|
|
46
|
+
</xsd:restriction>
|
|
47
|
+
</xsd:simpleType>
|
|
48
|
+
<xsd:simpleType>
|
|
49
|
+
<xsd:restriction base="xsd:token">
|
|
50
|
+
<xsd:enumeration value=""/>
|
|
51
|
+
</xsd:restriction>
|
|
52
|
+
</xsd:simpleType>
|
|
53
|
+
</xsd:union>
|
|
54
|
+
</xsd:simpleType>
|
|
55
|
+
|
|
56
|
+
<xsd:simpleType name="DATETYPE">
|
|
57
|
+
<xsd:union>
|
|
58
|
+
<xsd:simpleType>
|
|
59
|
+
<xsd:restriction base="xsd:date">
|
|
60
|
+
</xsd:restriction>
|
|
61
|
+
</xsd:simpleType>
|
|
62
|
+
<xsd:simpleType>
|
|
63
|
+
<xsd:restriction base="xsd:token">
|
|
64
|
+
<xsd:enumeration value=""/>
|
|
65
|
+
</xsd:restriction>
|
|
66
|
+
</xsd:simpleType>
|
|
67
|
+
</xsd:union>
|
|
68
|
+
</xsd:simpleType>
|
|
69
|
+
|
|
70
|
+
<xsd:simpleType name="DATETIMETYPE">
|
|
71
|
+
<xsd:union>
|
|
72
|
+
<xsd:simpleType>
|
|
73
|
+
<xsd:restriction base="xsd:string">
|
|
74
|
+
<xsd:pattern value="([0-9]{4}\-[0-9]{1,2}\-[0-9]{1,2}(T[0-9]{1,2}(:[0-9]{1,2}(:[0-9]{1,2}([+\-]{1}[0-9]{1,2}:[0-9]{1,2})?)?)?)?)?" />
|
|
75
|
+
</xsd:restriction>
|
|
76
|
+
</xsd:simpleType>
|
|
77
|
+
<xsd:simpleType>
|
|
78
|
+
<xsd:restriction base="xsd:token">
|
|
79
|
+
<xsd:enumeration value=""/>
|
|
80
|
+
</xsd:restriction>
|
|
81
|
+
</xsd:simpleType>
|
|
82
|
+
</xsd:union>
|
|
83
|
+
</xsd:simpleType>
|
|
84
|
+
|
|
85
|
+
<xsd:simpleType name="TIMEINTERVALTYPE">
|
|
86
|
+
<xsd:union>
|
|
87
|
+
<xsd:simpleType>
|
|
88
|
+
<xsd:restriction base="xsd:duration">
|
|
89
|
+
<xsd:pattern value="PT([0-9]+H)?([0-9]+M)?([0-9]+S)?" />
|
|
90
|
+
</xsd:restriction>
|
|
91
|
+
</xsd:simpleType>
|
|
92
|
+
<xsd:simpleType>
|
|
93
|
+
<xsd:restriction base="xsd:token">
|
|
94
|
+
<xsd:enumeration value=""/>
|
|
95
|
+
</xsd:restriction>
|
|
96
|
+
</xsd:simpleType>
|
|
97
|
+
</xsd:union>
|
|
98
|
+
</xsd:simpleType>
|
|
99
|
+
|
|
100
|
+
<xsd:simpleType name="AMTTYPE">
|
|
101
|
+
<xsd:restriction base="xsd:string">
|
|
102
|
+
<xsd:pattern value="([+\-]?[0-9]{1,8}\.[0-9]{2})?"/>
|
|
103
|
+
</xsd:restriction>
|
|
104
|
+
</xsd:simpleType>
|
|
105
|
+
|
|
106
|
+
<xsd:simpleType name="PRICETYPE">
|
|
107
|
+
<xsd:restriction base="xsd:string">
|
|
108
|
+
<xsd:pattern value="([+\-]?[0-9]{1,7}\.[0-9]{1,5})?|([+\-]?[0-9]{1,8}\.[0-9]{1,2})?|([+\-]?[0-9]{1,8})?" />
|
|
109
|
+
</xsd:restriction>
|
|
110
|
+
</xsd:simpleType>
|
|
111
|
+
|
|
112
|
+
<xsd:simpleType name="QUANTYPE">
|
|
113
|
+
<xsd:restriction base="xsd:string">
|
|
114
|
+
<xsd:pattern value="([+\-]?[0-9]{1,7}(\.[0-9]{1,5})?)?"/>
|
|
115
|
+
</xsd:restriction>
|
|
116
|
+
</xsd:simpleType>
|
|
117
|
+
|
|
118
|
+
<xsd:simpleType name="PERCENTTYPE">
|
|
119
|
+
<xsd:restriction base="xsd:string">
|
|
120
|
+
<xsd:pattern value="([+\-]?[0-9]{1,7}(\.[0-9]{1,5})?)?"/>
|
|
121
|
+
</xsd:restriction>
|
|
122
|
+
</xsd:simpleType>
|
|
123
|
+
|
|
124
|
+
<xsd:simpleType name="ENUMTYPE">
|
|
125
|
+
<xsd:restriction base="xsd:string">
|
|
126
|
+
</xsd:restriction>
|
|
127
|
+
</xsd:simpleType>
|
|
128
|
+
|
|
129
|
+
<xsd:simpleType name="INTTYPE">
|
|
130
|
+
<xsd:restriction base="xsd:integer">
|
|
131
|
+
</xsd:restriction>
|
|
132
|
+
</xsd:simpleType>
|
|
133
|
+
|
|
134
|
+
<xsd:simpleType name="GUIDTYPE">
|
|
135
|
+
<xsd:restriction base="xsd:string">
|
|
136
|
+
<xsd:pattern value="0|(\{[0-9a-fA-F]{8}(\-([0-9a-fA-F]{4})){3}\-[0-9a-fA-F]{12}\})"/>
|
|
137
|
+
</xsd:restriction>
|
|
138
|
+
</xsd:simpleType>
|
|
139
|
+
|
|
140
|
+
<xsd:simpleType name="MACROTYPE">
|
|
141
|
+
<xsd:restriction base="xsd:string">
|
|
142
|
+
</xsd:restriction>
|
|
143
|
+
</xsd:simpleType>
|
|
144
|
+
|
|
145
|
+
<xsd:simpleType name="FLOATTYPE">
|
|
146
|
+
<xsd:union>
|
|
147
|
+
<xsd:simpleType>
|
|
148
|
+
<xsd:restriction base="xsd:decimal">
|
|
149
|
+
</xsd:restriction>
|
|
150
|
+
</xsd:simpleType>
|
|
151
|
+
<xsd:simpleType>
|
|
152
|
+
<xsd:restriction base="xsd:token">
|
|
153
|
+
<xsd:enumeration value=""/>
|
|
154
|
+
</xsd:restriction>
|
|
155
|
+
</xsd:simpleType>
|
|
156
|
+
</xsd:union>
|
|
157
|
+
</xsd:simpleType>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</xsd:schema>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "element collections" do
|
|
4
|
+
it "should assign an element collection to all repeatable elements" do
|
|
5
|
+
q = QB::SalesOrder.new(:SalesOrderLine => [{}])
|
|
6
|
+
q[:SalesOrderLine].should be_is_a(ElementCollection)
|
|
7
|
+
end
|
|
8
|
+
end
|
data/spec/find_spec.rb
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "find elements" do
|
|
4
|
+
it "should find SalesOrderAdd/SalesOrderLineAdd" do
|
|
5
|
+
QB.xsd['SalesOrderAdd'].find('SalesOrderLineAdd').name.should eql('SalesOrderLineAdd')
|
|
6
|
+
end
|
|
7
|
+
it "should recognize DataEventSubscriptionAdd/ListEventSubscription" do
|
|
8
|
+
QB.xsd['DataEventSubscriptionAdd'].find('DeliverOwnEvents').name.should eql('DeliverOwnEvents')
|
|
9
|
+
QB.xsd['DataEventSubscriptionAdd'].find('ListEventSubscription').name.should eql('ListEventSubscription')
|
|
10
|
+
end
|
|
11
|
+
it "should recognize QBXMLMsgsRq/HostQueryRq" do
|
|
12
|
+
QB.xsd['QBXMLMsgsRq'].find('HostQueryRq').name.should eql('HostQueryRq')
|
|
13
|
+
end
|
|
14
|
+
it "should recognize TermsQueryRsType/DateDrivenTermsRet" do
|
|
15
|
+
QB.xsd.types['TermsQueryRsType'].find('DateDrivenTermsRet').name.should eql('DateDrivenTermsRet')
|
|
16
|
+
end
|
|
17
|
+
it "should still work after using gsub" do
|
|
18
|
+
QB.xsd['DataEventSubscriptionAdd'].find('DeliverOwnEvents').should_not be_nil
|
|
19
|
+
newstuff = QB.xsd['DataEventSubscriptionAdd'].gsub(/Events/,'Evans')
|
|
20
|
+
newstuff.find('DeliverOwnEvans').should_not be_nil
|
|
21
|
+
QB.xsd['DataEventSubscriptionAdd'].find('DeliverOwnEvents').should_not be_nil
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
describe "gsub test" do
|
|
26
|
+
it "should gsub all names" do
|
|
27
|
+
QB.xsd['CustomerRet'].gsub!(/Ret$/,'RRet').find('DataExtRRet').should_not be_nil
|
|
28
|
+
QB.xsd['CustomerRet'].gsub(/RRet$/,'').find('DataExt').should_not be_nil
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Quickbooks::Element do
|
|
4
|
+
it 'should enumerate the associations properly' do
|
|
5
|
+
pending "associations"
|
|
6
|
+
QB::SalesOrderMod.associations.should include('Class')
|
|
7
|
+
QB::SalesOrderMod.associations.should include('CustomerMsg')
|
|
8
|
+
QB::SalesOrderMod.associations.should include('Customer')
|
|
9
|
+
QB::SalesOrderMod.associations.should include('CustomerSalesTaxCode')
|
|
10
|
+
QB::SalesOrderMod.associations.should include('ItemSalesTax')
|
|
11
|
+
QB::SalesOrderMod.associations.should include('SalesRep')
|
|
12
|
+
QB::SalesOrderMod.associations.should include('ShipMethod')
|
|
13
|
+
QB::SalesOrderMod.associations.should include('Template')
|
|
14
|
+
QB::SalesOrderMod.associations.should include('Terms')
|
|
15
|
+
QB::SalesOrderMod.associations.length.should eql(9)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'should define working association accessor methods' do
|
|
19
|
+
pending "associations"
|
|
20
|
+
# pending 'make the methods auto-generate: read will auto-load the associated object, if one not already attached; write will simply attach associated object.'
|
|
21
|
+
so = QB::SalesOrderMod.new
|
|
22
|
+
so[:Customer].should eql(nil)
|
|
23
|
+
so[:Customer] = QB::Customer.new
|
|
24
|
+
so[:Customer].should be_is_a(QB::Customer)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'should grab the associated member when the corresponding ref has a value' do
|
|
28
|
+
pending "associations"
|
|
29
|
+
so = QB::SalesOrderMod.new
|
|
30
|
+
so[:Customer].should eql(nil)
|
|
31
|
+
so[:CustomerRef] = {:FullName => 'Tom Jones'}
|
|
32
|
+
Quickbooks.use_adapter(:spew)
|
|
33
|
+
so[:Customer].should eql("<?xml version=\"1.0\" ?>\n<?qbxml version=\"6.0\" ?>\n<QBXML>\n <QBXMLMsgsRq onError=\"stopOnError\">\n <CustomerQueryRq>\n <FullName>Tom Jones</FullName>\n </CustomerQueryRq>\n </QBXMLMsgsRq>\n</QBXML>")
|
|
34
|
+
Quickbooks.use_adapter(:test)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'should update the corresponding ref when the association attribute is updated' do
|
|
38
|
+
pending "associations"
|
|
39
|
+
so = QB::SalesOrderMod.new
|
|
40
|
+
# Should blank the ref if there is none
|
|
41
|
+
so[:Customer] = QB::Customer.new
|
|
42
|
+
so[:CustomerRef].should eql(nil)
|
|
43
|
+
# Should assign the ref if there is one
|
|
44
|
+
so[:Customer] = QB::Customer.instantiate(:ListID => '12345')
|
|
45
|
+
so[:CustomerRef].should be_is_a(QB::CustomerRef)
|
|
46
|
+
so[:CustomerRef][:ListID].to_s.should eql('12345')
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'should create dependent associated records before saving current record, if possible' do
|
|
50
|
+
pending "associations"
|
|
51
|
+
so = QB::SalesOrderMod.new
|
|
52
|
+
so[:Customer] = QB::Customer.new(:Name => 'Joe Smith')
|
|
53
|
+
so[:SalesOrderLine] = [{:Item => QB::ItemInventory.new(
|
|
54
|
+
:Name => 'Some Item',
|
|
55
|
+
:IncomeAccountRef => {:FullName => 'Sales'},
|
|
56
|
+
:AssetAccountRef => {:FullName => 'Inventory Asset'},
|
|
57
|
+
:COGSAccountRef => {:FullName => 'Cost of Goods Sold'},
|
|
58
|
+
:SalesPrice => '25.00',
|
|
59
|
+
:Inactive => true
|
|
60
|
+
)}]
|
|
61
|
+
# Save the Customer
|
|
62
|
+
Quickbooks.connection.next_response("<QBXML>
|
|
63
|
+
<QBXMLMsgsRs>
|
|
64
|
+
<CustomerAddRs>
|
|
65
|
+
<CustomerRet>
|
|
66
|
+
<ListID>12479-02920</ListID>
|
|
67
|
+
</CustomerRet>
|
|
68
|
+
</CustomerAddRs>
|
|
69
|
+
</QBXMLMsgsRs>
|
|
70
|
+
</QBXML>")
|
|
71
|
+
# Save the ItemInventory
|
|
72
|
+
Quickbooks.connection.next_response("<QBXML>
|
|
73
|
+
<QBXMLMsgsRs>
|
|
74
|
+
<ItemInventoryAddRs>
|
|
75
|
+
<ItemInventoryRet>
|
|
76
|
+
<ListID>12479-02920</ListID>
|
|
77
|
+
</ItemInventoryRet>
|
|
78
|
+
</ItemInventoryAddRs>
|
|
79
|
+
</QBXMLMsgsRs>
|
|
80
|
+
</QBXML>")
|
|
81
|
+
so.save_associations # Should save Customer and Item
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
2
|
+
|
|
3
|
+
describe QB::SalesOrderAdd do
|
|
4
|
+
it "should validate nicely" do
|
|
5
|
+
# Need to determine how to manage elements in models where something like SalesOrderLineAdd is required,
|
|
6
|
+
# but we should be using a SalesOrderLine.
|
|
7
|
+
s = QB::SalesOrderAdd.new(:CustomerRef => {:ListID => '12345'})
|
|
8
|
+
s.should_not be_valid
|
|
9
|
+
lambda { s[:SalesOrderLineAdd] = {} }.should raise_error(RuntimeError)
|
|
10
|
+
s.should_not be_valid
|
|
11
|
+
s.errors.should include("missing required element either of (SalesOrderLineAdd, SalesOrderLineGroupAdd)")
|
|
12
|
+
lambda { s[:SalesOrderLineAdd] = [{}] }.should_not raise_error
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
2
|
+
|
|
3
|
+
module QB
|
|
4
|
+
describe VendorAdd do
|
|
5
|
+
after(:each) {$DEBUG = nil}
|
|
6
|
+
|
|
7
|
+
it "should instantiate a VendorAdd object and validate it" do
|
|
8
|
+
va = VendorAdd.new
|
|
9
|
+
va.valid?.should eql(false)
|
|
10
|
+
va = VendorAdd.new(:Name => 'Herman')
|
|
11
|
+
va.should be_valid
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it "should be able to set attributes" do
|
|
15
|
+
va = VendorAdd.new
|
|
16
|
+
va[:Name] = 'Herman'
|
|
17
|
+
va[:Name].should eql('Herman')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "should render attributes in the correct order" do
|
|
21
|
+
va = VendorAdd.new(:IsActive => true, :Name => 'Herman', :Salutation => 'Mr. Sir', :Phone => '(123) 456-7890')
|
|
22
|
+
va.attributes.collect {|a| a.class.short_name}.should eql(['Name', 'IsActive', 'Salutation', 'Phone'])
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "should be able to assign an attribute twice and retain only the new value" do
|
|
26
|
+
va = VendorAdd.new(:Name => 'Herman')
|
|
27
|
+
va[:Name] = 'Herbert'
|
|
28
|
+
va[:Name].should eql('Herbert')
|
|
29
|
+
va.attributes.select {|a| a.class == va[:Name].class}.length.should eql(1)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it "should initialize attributes as arrays also" do
|
|
33
|
+
va = VendorAdd.new([Quickbooks.get_constant('Name').new('Herman'), Quickbooks.get_constant('IsActive').new(true), Quickbooks.get_constant('Salutation').new('Mr. Sir'), Quickbooks.get_constant('Phone').new('(123) 456-7890')])
|
|
34
|
+
va[:Name].should eql('Herman')
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it "should mark dirty attributes in the record attribute assignment" do
|
|
38
|
+
va = VendorAdd.send(:instantiate, :Name => 'Herman')
|
|
39
|
+
va[:Name].dirty?.should eql(false)
|
|
40
|
+
va[:Name].downcase!
|
|
41
|
+
va[:Name].should be_dirty
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it "should notice attribute values as dirty when they are modified (mutable values)" do
|
|
45
|
+
va = VendorAdd.send(:instantiate, :Name => 'Herman')
|
|
46
|
+
va[:Name].dirty?.should eql(false)
|
|
47
|
+
va[:Name] = 'Herbert'
|
|
48
|
+
va[:Name].should be_dirty
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
it ":dirty_attributes should operate correctly" do
|
|
52
|
+
va = VendorAdd.send(:instantiate, :Name => 'Herman')
|
|
53
|
+
va[:Name] = 'Herbert'
|
|
54
|
+
va.dirty_attributes.inspect.should eql([va[:Name]].inspect)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "should be able to serialize to_xml" do
|
|
58
|
+
va = VendorAdd.new(:Name => 'Herman', :IsActive => true, :Salutation => 'Mr. Sir', :Phone => '(123) 456-7890')
|
|
59
|
+
va.to_xml.should eql("<VendorAdd>\n <Name>Herman</Name>\n <IsActive>true</IsActive>\n <Salutation>Mr. Sir</Salutation>\n <Phone>(123) 456-7890</Phone>\n</VendorAdd>")
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
it "should be able to serialize to_dirty_xml" do
|
|
63
|
+
va = VendorAdd.new(:Name => 'Herman', :IsActive => true, :Salutation => 'Mr. Sir', :Phone => '(123) 456-7890')
|
|
64
|
+
va.to_dirty_xml.should eql("<VendorAdd>\n <Name>Herman</Name>\n <IsActive>true</IsActive>\n <Salutation>Mr. Sir</Salutation>\n <Phone>(123) 456-7890</Phone>\n</VendorAdd>")
|
|
65
|
+
va.send(:clean!) # inject to manually make it clean
|
|
66
|
+
va[:Name] += " Wonders"
|
|
67
|
+
va.to_dirty_xml.should eql("<VendorAdd>\n <Name>Herman Wonders</Name>\n</VendorAdd>")
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
it "should include required elements with the dirty ones" do
|
|
71
|
+
va = VendorAdd.new(:Name => 'Herman', :IsActive => true, :Salutation => 'Mr. Sir', :Phone => '(123) 456-7890')
|
|
72
|
+
va.send(:clean!) # inject to manually make it clean
|
|
73
|
+
va[:IsActive] = false
|
|
74
|
+
# Name is included because it is a required element, and we passed true into to_dirty_xml
|
|
75
|
+
va.to_dirty_xml(true).should eql("<VendorAdd>\n <Name>Herman</Name>\n <IsActive>false</IsActive>\n</VendorAdd>")
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Quickbooks::Model do
|
|
4
|
+
it 'should enumerate the associations properly' do
|
|
5
|
+
QB::SalesOrder.associations.should include(:Class)
|
|
6
|
+
QB::SalesOrder.associations.should include(:CustomerMsg)
|
|
7
|
+
QB::SalesOrder.associations.should include(:Customer)
|
|
8
|
+
QB::SalesOrder.associations.should include(:CustomerSalesTaxCode)
|
|
9
|
+
QB::SalesOrder.associations.should include(:ItemSalesTax)
|
|
10
|
+
QB::SalesOrder.associations.should include(:SalesRep)
|
|
11
|
+
QB::SalesOrder.associations.should include(:ShipMethod)
|
|
12
|
+
QB::SalesOrder.associations.should include(:Template)
|
|
13
|
+
QB::SalesOrder.associations.should include(:Terms)
|
|
14
|
+
QB::SalesOrder.associations.reject {|k,p| !p.addable?}.length.should eql(9)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'should define working association accessor methods' do
|
|
18
|
+
# pending 'make the methods auto-generate: read will auto-load the associated object, if one not already attached; write will simply attach associated object.'
|
|
19
|
+
so = QB::SalesOrder.new
|
|
20
|
+
so[:Customer].should eql(nil)
|
|
21
|
+
so[:Customer] = QB::Customer.new
|
|
22
|
+
so[:Customer].should be_is_a(QB::Customer)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'should grab the associated member when the corresponding ref has a value' do
|
|
26
|
+
pending "associations"
|
|
27
|
+
so = QB::SalesOrder.new
|
|
28
|
+
so[:Customer].should eql(nil)
|
|
29
|
+
so[:CustomerRef] = {:FullName => 'Tom Jones'}
|
|
30
|
+
Quickbooks.use_adapter(:spew)
|
|
31
|
+
so[:Customer].should eql("<?xml version=\"1.0\" ?>\n<?qbxml version=\"6.0\" ?>\n<QBXML>\n <QBXMLMsgsRq onError=\"stopOnError\">\n <CustomerQueryRq>\n <FullName>Tom Jones</FullName>\n </CustomerQueryRq>\n </QBXMLMsgsRq>\n</QBXML>")
|
|
32
|
+
Quickbooks.use_adapter(:test)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'should update the corresponding ref when the association attribute is updated' do
|
|
36
|
+
so = QB::SalesOrder.new
|
|
37
|
+
# Should blank the ref if there is none
|
|
38
|
+
so[:Customer] = QB::Customer.new
|
|
39
|
+
so[:CustomerRef].should eql(nil)
|
|
40
|
+
# Should assign the ref if there is one
|
|
41
|
+
so[:Customer] = QB::Customer.instantiate(:ListID => '12345')
|
|
42
|
+
so[:CustomerRef].should be_is_a(QB::CustomerRef)
|
|
43
|
+
so[:CustomerRef][:ListID].to_s.should eql('12345')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'should create dependent associated records before saving current record, if possible' do
|
|
47
|
+
so = QB::SalesOrder.new
|
|
48
|
+
so[:Customer] = QB::Customer.new(:Name => 'Joe Smith')
|
|
49
|
+
so[:SalesOrderLine] = [
|
|
50
|
+
{:Item => QB::ItemInventory.new(
|
|
51
|
+
:Name => 'Some Item',
|
|
52
|
+
:IncomeAccountRef => {:FullName => 'Sales'},
|
|
53
|
+
:AssetAccountRef => {:FullName => 'Inventory Asset'},
|
|
54
|
+
:COGSAccountRef => {:FullName => 'Cost of Goods Sold'},
|
|
55
|
+
:SalesPrice => '25.00',
|
|
56
|
+
:IsActive => false)}
|
|
57
|
+
]
|
|
58
|
+
# Should save Customer, then Item, then SalesOrder
|
|
59
|
+
Quickbooks.use_adapter(:test)
|
|
60
|
+
Quickbooks.connection.next_response("<QBXML>
|
|
61
|
+
<QBXMLMsgsRs>
|
|
62
|
+
<CustomerAddRs>
|
|
63
|
+
<CustomerRet>
|
|
64
|
+
<ListID>12479-02920</ListID>
|
|
65
|
+
</CustomerRet>
|
|
66
|
+
</CustomerAddRs>
|
|
67
|
+
</QBXMLMsgsRs>
|
|
68
|
+
</QBXML>")
|
|
69
|
+
Quickbooks.connection.next_response("<QBXML>
|
|
70
|
+
<QBXMLMsgsRs>
|
|
71
|
+
<ItemInventoryAddRs>
|
|
72
|
+
<ItemInventoryRet>
|
|
73
|
+
<ListID>12479-02921</ListID>
|
|
74
|
+
</ItemInventoryRet>
|
|
75
|
+
</ItemInventoryAddRs>
|
|
76
|
+
</QBXMLMsgsRs>
|
|
77
|
+
</QBXML>")
|
|
78
|
+
Quickbooks.connection.next_response("<QBXML>
|
|
79
|
+
<QBXMLMsgsRs>
|
|
80
|
+
<SalesOrderAddRs>
|
|
81
|
+
<SalesOrderRet>
|
|
82
|
+
<TxnID>12479-02922</TxnID>
|
|
83
|
+
</SalesOrderRet>
|
|
84
|
+
</SalesOrderAddRs>
|
|
85
|
+
</QBXMLMsgsRs>
|
|
86
|
+
</QBXML>")
|
|
87
|
+
so.save
|
|
88
|
+
end
|
|
89
|
+
end
|