quickbooks 0.0.3 → 0.0.5
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/README +9 -5
- data/Rakefile +2 -2
- data/doc/classes/Array.html +244 -0
- data/doc/classes/Array.src/M000001.html +18 -0
- data/doc/classes/Array.src/M000002.html +19 -0
- data/doc/classes/Array.src/M000003.html +18 -0
- data/doc/classes/Array.src/M000004.html +23 -0
- data/doc/classes/Array.src/M000005.html +18 -0
- data/doc/classes/Array.src/M000006.html +21 -0
- data/doc/classes/Array.src/M000007.html +18 -0
- data/doc/classes/Array.src/M000008.html +18 -0
- data/doc/classes/Class.html +5 -5
- data/doc/classes/Class.src/{M000003.html → M000027.html} +1 -1
- data/doc/classes/Hash.html +264 -14
- data/doc/classes/Hash.src/M000009.html +18 -0
- data/doc/classes/Hash.src/M000010.html +21 -0
- data/doc/classes/Hash.src/M000011.html +18 -0
- data/doc/classes/Hash.src/M000012.html +21 -0
- data/doc/classes/Hash.src/M000013.html +18 -0
- data/doc/classes/Hash.src/{M000001.html → M000014.html} +6 -5
- data/doc/classes/Hash.src/{M000002.html → M000015.html} +6 -2
- data/doc/classes/Hash.src/M000016.html +20 -0
- data/doc/classes/Hash.src/M000017.html +18 -0
- data/doc/classes/Hash.src/M000018.html +20 -0
- data/doc/classes/Hash.src/M000019.html +38 -0
- data/doc/classes/{Quickbooks/Qbxml/Error.src/M000031.html → Hash.src/M000020.html} +5 -5
- data/doc/classes/Hash.src/M000021.html +18 -0
- data/doc/classes/Hash.src/M000022.html +20 -0
- data/doc/classes/Hash.src/M000023.html +18 -0
- data/doc/classes/Hash.src/M000024.html +18 -0
- data/doc/classes/Hash.src/M000025.html +18 -0
- data/doc/classes/Hash.src/M000026.html +22 -0
- data/doc/classes/Object.html +56 -22
- data/doc/classes/Object.src/{M000004.html → M000028.html} +0 -0
- data/doc/classes/Object.src/{M000005.html → M000029.html} +0 -0
- data/doc/classes/Object.src/{M000006.html → M000030.html} +1 -1
- data/doc/classes/Object.src/{M000007.html → M000031.html} +0 -0
- data/doc/classes/Object.src/M000032.html +18 -0
- data/doc/classes/Object.src/M000033.html +18 -0
- data/doc/classes/QBHelpers/Ole.html +17 -17
- data/doc/classes/QBHelpers/Ole.src/{M000066.html → M000108.html} +0 -0
- data/doc/classes/QBHelpers/Ole.src/{M000067.html → M000109.html} +0 -0
- data/doc/classes/QBHelpers/Ole.src/{M000068.html → M000110.html} +0 -0
- data/doc/classes/Quickbooks.html +44 -4
- data/doc/classes/Quickbooks/{Qbxml/Error.html → Address.html} +14 -43
- data/doc/classes/Quickbooks/Address.src/M000107.html +19 -0
- data/doc/classes/Quickbooks/Base.html +118 -243
- data/doc/classes/Quickbooks/Base.src/{M000034.html → M000080.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000035.html → M000081.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000036.html → M000082.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000037.html → M000083.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/M000084.html +23 -0
- data/doc/classes/Quickbooks/Base.src/{M000041.html → M000085.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/{M000042.html → M000086.html} +2 -2
- data/doc/classes/Quickbooks/Base.src/{M000043.html → M000087.html} +3 -2
- data/doc/classes/Quickbooks/Base.src/M000088.html +19 -0
- data/doc/classes/Quickbooks/Base.src/{M000045.html → M000089.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/M000090.html +19 -0
- data/doc/classes/Quickbooks/Base.src/{M000052.html → M000091.html} +1 -1
- data/doc/classes/Quickbooks/Base.src/M000092.html +45 -0
- data/doc/classes/Quickbooks/Base.src/{M000054.html → M000093.html} +2 -2
- data/doc/classes/Quickbooks/Base.src/M000094.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000095.html +20 -0
- data/doc/classes/Quickbooks/BillAddress.html +113 -0
- data/doc/classes/Quickbooks/Connection.html +68 -68
- data/doc/classes/Quickbooks/Connection.src/{M000056.html → M000097.html} +0 -0
- data/doc/classes/Quickbooks/Connection.src/{M000057.html → M000098.html} +0 -0
- data/doc/classes/Quickbooks/Connection.src/{M000058.html → M000099.html} +0 -1
- data/doc/classes/Quickbooks/Connection.src/{M000059.html → M000100.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000060.html → M000101.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000061.html → M000102.html} +2 -2
- data/doc/classes/Quickbooks/Connection.src/{M000062.html → M000103.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000063.html → M000104.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000064.html → M000105.html} +1 -1
- data/doc/classes/Quickbooks/Connection.src/{M000065.html → M000106.html} +2 -2
- data/doc/classes/Quickbooks/CreditCardInfo.html +113 -0
- data/doc/classes/Quickbooks/CustomerTypeRef.html +113 -0
- data/doc/classes/Quickbooks/ItemSalesTaxRef.html +113 -0
- data/doc/classes/Quickbooks/JobTypeRef.html +113 -0
- data/doc/classes/Quickbooks/ListItem.html +21 -44
- data/doc/classes/Quickbooks/ListItem.src/M000078.html +19 -0
- data/doc/classes/Quickbooks/ListItem.src/M000079.html +18 -0
- data/doc/classes/Quickbooks/Model.html +469 -0
- data/doc/classes/Quickbooks/Model.src/M000059.html +24 -0
- data/doc/classes/Quickbooks/Model.src/M000060.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000061.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000062.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000063.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000064.html +18 -0
- data/doc/classes/Quickbooks/Model.src/M000065.html +32 -0
- data/doc/classes/Quickbooks/Model.src/M000066.html +32 -0
- data/doc/classes/Quickbooks/Model.src/M000067.html +18 -0
- data/doc/classes/Quickbooks/{Base.src/M000046.html → Model.src/M000068.html} +2 -3
- data/doc/classes/Quickbooks/{Base.src/M000047.html → Model.src/M000069.html} +4 -4
- data/doc/classes/Quickbooks/{Base.src/M000048.html → Model.src/M000070.html} +2 -2
- data/doc/classes/Quickbooks/{Base.src/M000049.html → Model.src/M000071.html} +2 -2
- data/doc/classes/Quickbooks/{Base.src/M000050.html → Model.src/M000072.html} +3 -3
- data/doc/classes/Quickbooks/{Base.src/M000051.html → Model.src/M000073.html} +6 -5
- data/doc/classes/Quickbooks/Model.src/M000074.html +28 -0
- data/doc/classes/Quickbooks/Model.src/M000075.html +28 -0
- data/doc/classes/Quickbooks/Model.src/M000076.html +21 -0
- data/doc/classes/Quickbooks/Model.src/M000077.html +23 -0
- data/doc/classes/Quickbooks/ParentRef.html +113 -0
- data/doc/classes/Quickbooks/PreferredPaymentMethodRef.html +113 -0
- data/doc/classes/Quickbooks/PriceLevelRef.html +113 -0
- data/doc/classes/Quickbooks/Qbxml.html +0 -5
- data/doc/classes/Quickbooks/Qbxml/Request.html +55 -23
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000050.html +34 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/{M000025.html → M000051.html} +2 -2
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000052.html +81 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.html +20 -20
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000027.html → M000053.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000028.html → M000054.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000029.html → M000055.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/{M000030.html → M000056.html} +0 -0
- data/doc/classes/Quickbooks/Qbxml/Response.html +46 -46
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000015.html → M000041.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000016.html → M000042.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000017.html → M000043.html} +1 -2
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000018.html → M000044.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000019.html → M000045.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000020.html → M000046.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000021.html → M000047.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000022.html → M000048.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/Response.src/{M000023.html → M000049.html} +22 -11
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.html +35 -35
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000008.html → M000034.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000009.html → M000035.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000010.html → M000036.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000011.html → M000037.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000012.html → M000038.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000013.html → M000039.html} +1 -1
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/{M000014.html → M000040.html} +1 -1
- data/doc/classes/Quickbooks/Ref.html +139 -0
- data/doc/classes/Quickbooks/Ref.src/M000096.html +18 -0
- data/doc/classes/Quickbooks/SalesRepRef.html +113 -0
- data/doc/classes/Quickbooks/SalesTaxCodeRef.html +113 -0
- data/doc/classes/Quickbooks/ShipAddress.html +113 -0
- data/doc/classes/Quickbooks/TermsRef.html +113 -0
- data/doc/classes/Quickbooks/Transaction.html +21 -62
- data/doc/classes/Quickbooks/Transaction.src/M000057.html +19 -0
- data/doc/classes/Quickbooks/Transaction.src/M000058.html +18 -0
- data/doc/created.rid +1 -1
- data/doc/files/README.html +15 -4
- data/doc/files/lib/quickbooks/base_rb.html +15 -8
- data/doc/files/lib/quickbooks/connection_rb.html +1 -1
- data/doc/files/lib/quickbooks/model_rb.html +108 -0
- data/doc/files/lib/quickbooks/{qbxml/error_rb.html → models/common/address_rb.html} +5 -5
- data/doc/files/lib/quickbooks/models/common/all_refs_rb.html +101 -0
- data/doc/files/lib/quickbooks/models/customer/credit_card_info_rb.html +101 -0
- data/doc/files/lib/quickbooks/models/customer_rb.html +10 -1
- data/doc/files/lib/quickbooks/models/list_item_rb.html +1 -1
- data/doc/files/lib/quickbooks/models/transaction_rb.html +1 -1
- data/doc/files/lib/quickbooks/ole_helper_rb.html +1 -1
- data/doc/files/lib/quickbooks/qbxml/request_rb.html +1 -1
- data/doc/files/lib/quickbooks/qbxml/response_rb.html +1 -2
- data/doc/files/lib/quickbooks/qbxml_rb.html +109 -0
- data/doc/files/lib/quickbooks/ruby_magic_rb.html +1 -1
- data/doc/fr_class_index.html +16 -1
- data/doc/fr_file_index.html +5 -1
- data/doc/fr_method_index.html +110 -68
- data/lib/quickbooks/base.rb +54 -95
- data/lib/quickbooks/connection.rb +2 -3
- data/lib/quickbooks/model.rb +176 -0
- data/lib/quickbooks/models/common/address.rb +14 -0
- data/lib/quickbooks/models/common/all_refs.rb +36 -0
- data/lib/quickbooks/models/customer.rb +30 -31
- data/lib/quickbooks/models/customer/credit_card_info.rb +5 -0
- data/lib/quickbooks/models/list_item.rb +27 -16
- data/lib/quickbooks/models/transaction.rb +21 -12
- data/lib/quickbooks/qbxml.rb +2 -0
- data/lib/quickbooks/qbxml/request.rb +80 -31
- data/lib/quickbooks/qbxml/response.rb +21 -12
- data/lib/quickbooks/ruby_magic.rb +130 -4
- metadata +146 -74
- data/doc/classes/Quickbooks/Base.src/M000038.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000039.html +0 -25
- data/doc/classes/Quickbooks/Base.src/M000040.html +0 -27
- data/doc/classes/Quickbooks/Base.src/M000044.html +0 -19
- data/doc/classes/Quickbooks/Base.src/M000053.html +0 -36
- data/doc/classes/Quickbooks/Base.src/M000055.html +0 -18
- data/doc/classes/Quickbooks/ListItem.src/M000033.html +0 -31
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000024.html +0 -23
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000026.html +0 -57
- data/doc/classes/Quickbooks/Transaction.src/M000032.html +0 -26
- data/lib/quickbooks/qbxml/error.rb +0 -20
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
91
|
+
<a href="#M000054"><<</a>
|
|
92
|
+
<a href="#M000055">new</a>
|
|
93
|
+
<a href="#M000053">set</a>
|
|
94
|
+
<a href="#M000056">to_xml</a>
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
97
97
|
|
|
@@ -120,12 +120,12 @@
|
|
|
120
120
|
<div id="methods">
|
|
121
121
|
<h3 class="section-bar">Public Class methods</h3>
|
|
122
122
|
|
|
123
|
-
<div id="method-
|
|
124
|
-
<a name="
|
|
123
|
+
<div id="method-M000055" class="method-detail">
|
|
124
|
+
<a name="M000055"></a>
|
|
125
125
|
|
|
126
126
|
<div class="method-heading">
|
|
127
|
-
<a href="RequestSet.src/
|
|
128
|
-
onclick="popupCode('RequestSet.src/
|
|
127
|
+
<a href="RequestSet.src/M000055.html" target="Code" class="method-signature"
|
|
128
|
+
onclick="popupCode('RequestSet.src/M000055.html');return false;">
|
|
129
129
|
<span class="method-name">new</span><span class="method-args">(*requests)</span>
|
|
130
130
|
</a>
|
|
131
131
|
</div>
|
|
@@ -136,12 +136,12 @@
|
|
|
136
136
|
|
|
137
137
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
138
138
|
|
|
139
|
-
<div id="method-
|
|
140
|
-
<a name="
|
|
139
|
+
<div id="method-M000054" class="method-detail">
|
|
140
|
+
<a name="M000054"></a>
|
|
141
141
|
|
|
142
142
|
<div class="method-heading">
|
|
143
|
-
<a href="RequestSet.src/
|
|
144
|
-
onclick="popupCode('RequestSet.src/
|
|
143
|
+
<a href="RequestSet.src/M000054.html" target="Code" class="method-signature"
|
|
144
|
+
onclick="popupCode('RequestSet.src/M000054.html');return false;">
|
|
145
145
|
<span class="method-name"><<</span><span class="method-args">(qbxml_request)</span>
|
|
146
146
|
</a>
|
|
147
147
|
</div>
|
|
@@ -150,12 +150,12 @@
|
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
152
152
|
|
|
153
|
-
<div id="method-
|
|
154
|
-
<a name="
|
|
153
|
+
<div id="method-M000053" class="method-detail">
|
|
154
|
+
<a name="M000053"></a>
|
|
155
155
|
|
|
156
156
|
<div class="method-heading">
|
|
157
|
-
<a href="RequestSet.src/
|
|
158
|
-
onclick="popupCode('RequestSet.src/
|
|
157
|
+
<a href="RequestSet.src/M000053.html" target="Code" class="method-signature"
|
|
158
|
+
onclick="popupCode('RequestSet.src/M000053.html');return false;">
|
|
159
159
|
<span class="method-name">set</span><span class="method-args">()</span>
|
|
160
160
|
</a>
|
|
161
161
|
</div>
|
|
@@ -164,12 +164,12 @@
|
|
|
164
164
|
</div>
|
|
165
165
|
</div>
|
|
166
166
|
|
|
167
|
-
<div id="method-
|
|
168
|
-
<a name="
|
|
167
|
+
<div id="method-M000056" class="method-detail">
|
|
168
|
+
<a name="M000056"></a>
|
|
169
169
|
|
|
170
170
|
<div class="method-heading">
|
|
171
|
-
<a href="RequestSet.src/
|
|
172
|
-
onclick="popupCode('RequestSet.src/
|
|
171
|
+
<a href="RequestSet.src/M000056.html" target="Code" class="method-signature"
|
|
172
|
+
onclick="popupCode('RequestSet.src/M000056.html');return false;">
|
|
173
173
|
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
|
174
174
|
</a>
|
|
175
175
|
</div>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -88,15 +88,15 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
91
|
+
<a href="#M000048">error?</a>
|
|
92
|
+
<a href="#M000045">from_hash</a>
|
|
93
|
+
<a href="#M000044">from_xml</a>
|
|
94
|
+
<a href="#M000043">import_from_hash</a>
|
|
95
|
+
<a href="#M000042">import_from_xml</a>
|
|
96
|
+
<a href="#M000046">instantiatable?</a>
|
|
97
|
+
<a href="#M000049">instantiate</a>
|
|
98
|
+
<a href="#M000041">new</a>
|
|
99
|
+
<a href="#M000047">success?</a>
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
@@ -159,12 +159,12 @@ For Development purposes:
|
|
|
159
159
|
<div id="methods">
|
|
160
160
|
<h3 class="section-bar">Public Class methods</h3>
|
|
161
161
|
|
|
162
|
-
<div id="method-
|
|
163
|
-
<a name="
|
|
162
|
+
<div id="method-M000045" class="method-detail">
|
|
163
|
+
<a name="M000045"></a>
|
|
164
164
|
|
|
165
165
|
<div class="method-heading">
|
|
166
|
-
<a href="Response.src/
|
|
167
|
-
onclick="popupCode('Response.src/
|
|
166
|
+
<a href="Response.src/M000045.html" target="Code" class="method-signature"
|
|
167
|
+
onclick="popupCode('Response.src/M000045.html');return false;">
|
|
168
168
|
<span class="method-name">from_hash</span><span class="method-args">(hsh)</span>
|
|
169
169
|
</a>
|
|
170
170
|
</div>
|
|
@@ -173,12 +173,12 @@ For Development purposes:
|
|
|
173
173
|
</div>
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
|
-
<div id="method-
|
|
177
|
-
<a name="
|
|
176
|
+
<div id="method-M000044" class="method-detail">
|
|
177
|
+
<a name="M000044"></a>
|
|
178
178
|
|
|
179
179
|
<div class="method-heading">
|
|
180
|
-
<a href="Response.src/
|
|
181
|
-
onclick="popupCode('Response.src/
|
|
180
|
+
<a href="Response.src/M000044.html" target="Code" class="method-signature"
|
|
181
|
+
onclick="popupCode('Response.src/M000044.html');return false;">
|
|
182
182
|
<span class="method-name">from_xml</span><span class="method-args">(xml)</span>
|
|
183
183
|
</a>
|
|
184
184
|
</div>
|
|
@@ -187,12 +187,12 @@ For Development purposes:
|
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
|
|
190
|
-
<div id="method-
|
|
191
|
-
<a name="
|
|
190
|
+
<div id="method-M000041" class="method-detail">
|
|
191
|
+
<a name="M000041"></a>
|
|
192
192
|
|
|
193
193
|
<div class="method-heading">
|
|
194
|
-
<a href="Response.src/
|
|
195
|
-
onclick="popupCode('Response.src/
|
|
194
|
+
<a href="Response.src/M000041.html" target="Code" class="method-signature"
|
|
195
|
+
onclick="popupCode('Response.src/M000041.html');return false;">
|
|
196
196
|
<span class="method-name">new</span><span class="method-args">(xml_or_hash)</span>
|
|
197
197
|
</a>
|
|
198
198
|
</div>
|
|
@@ -203,12 +203,12 @@ For Development purposes:
|
|
|
203
203
|
|
|
204
204
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
205
205
|
|
|
206
|
-
<div id="method-
|
|
207
|
-
<a name="
|
|
206
|
+
<div id="method-M000048" class="method-detail">
|
|
207
|
+
<a name="M000048"></a>
|
|
208
208
|
|
|
209
209
|
<div class="method-heading">
|
|
210
|
-
<a href="Response.src/
|
|
211
|
-
onclick="popupCode('Response.src/
|
|
210
|
+
<a href="Response.src/M000048.html" target="Code" class="method-signature"
|
|
211
|
+
onclick="popupCode('Response.src/M000048.html');return false;">
|
|
212
212
|
<span class="method-name">error?</span><span class="method-args">()</span>
|
|
213
213
|
</a>
|
|
214
214
|
</div>
|
|
@@ -217,12 +217,12 @@ For Development purposes:
|
|
|
217
217
|
</div>
|
|
218
218
|
</div>
|
|
219
219
|
|
|
220
|
-
<div id="method-
|
|
221
|
-
<a name="
|
|
220
|
+
<div id="method-M000043" class="method-detail">
|
|
221
|
+
<a name="M000043"></a>
|
|
222
222
|
|
|
223
223
|
<div class="method-heading">
|
|
224
|
-
<a href="Response.src/
|
|
225
|
-
onclick="popupCode('Response.src/
|
|
224
|
+
<a href="Response.src/M000043.html" target="Code" class="method-signature"
|
|
225
|
+
onclick="popupCode('Response.src/M000043.html');return false;">
|
|
226
226
|
<span class="method-name">import_from_hash</span><span class="method-args">(hsh)</span>
|
|
227
227
|
</a>
|
|
228
228
|
</div>
|
|
@@ -231,12 +231,12 @@ For Development purposes:
|
|
|
231
231
|
</div>
|
|
232
232
|
</div>
|
|
233
233
|
|
|
234
|
-
<div id="method-
|
|
235
|
-
<a name="
|
|
234
|
+
<div id="method-M000042" class="method-detail">
|
|
235
|
+
<a name="M000042"></a>
|
|
236
236
|
|
|
237
237
|
<div class="method-heading">
|
|
238
|
-
<a href="Response.src/
|
|
239
|
-
onclick="popupCode('Response.src/
|
|
238
|
+
<a href="Response.src/M000042.html" target="Code" class="method-signature"
|
|
239
|
+
onclick="popupCode('Response.src/M000042.html');return false;">
|
|
240
240
|
<span class="method-name">import_from_xml</span><span class="method-args">(xml)</span>
|
|
241
241
|
</a>
|
|
242
242
|
</div>
|
|
@@ -245,12 +245,12 @@ For Development purposes:
|
|
|
245
245
|
</div>
|
|
246
246
|
</div>
|
|
247
247
|
|
|
248
|
-
<div id="method-
|
|
249
|
-
<a name="
|
|
248
|
+
<div id="method-M000046" class="method-detail">
|
|
249
|
+
<a name="M000046"></a>
|
|
250
250
|
|
|
251
251
|
<div class="method-heading">
|
|
252
|
-
<a href="Response.src/
|
|
253
|
-
onclick="popupCode('Response.src/
|
|
252
|
+
<a href="Response.src/M000046.html" target="Code" class="method-signature"
|
|
253
|
+
onclick="popupCode('Response.src/M000046.html');return false;">
|
|
254
254
|
<span class="method-name">instantiatable?</span><span class="method-args">(</span>
|
|
255
255
|
</a>
|
|
256
256
|
</div>
|
|
@@ -259,13 +259,13 @@ For Development purposes:
|
|
|
259
259
|
</div>
|
|
260
260
|
</div>
|
|
261
261
|
|
|
262
|
-
<div id="method-
|
|
263
|
-
<a name="
|
|
262
|
+
<div id="method-M000049" class="method-detail">
|
|
263
|
+
<a name="M000049"></a>
|
|
264
264
|
|
|
265
265
|
<div class="method-heading">
|
|
266
|
-
<a href="Response.src/
|
|
267
|
-
onclick="popupCode('Response.src/
|
|
268
|
-
<span class="method-name">instantiate</span><span class="method-args">(
|
|
266
|
+
<a href="Response.src/M000049.html" target="Code" class="method-signature"
|
|
267
|
+
onclick="popupCode('Response.src/M000049.html');return false;">
|
|
268
|
+
<span class="method-name">instantiate</span><span class="method-args">(reinstantiate=nil)</span>
|
|
269
269
|
</a>
|
|
270
270
|
</div>
|
|
271
271
|
|
|
@@ -273,12 +273,12 @@ For Development purposes:
|
|
|
273
273
|
</div>
|
|
274
274
|
</div>
|
|
275
275
|
|
|
276
|
-
<div id="method-
|
|
277
|
-
<a name="
|
|
276
|
+
<div id="method-M000047" class="method-detail">
|
|
277
|
+
<a name="M000047"></a>
|
|
278
278
|
|
|
279
279
|
<div class="method-heading">
|
|
280
|
-
<a href="Response.src/
|
|
281
|
-
onclick="popupCode('Response.src/
|
|
280
|
+
<a href="Response.src/M000047.html" target="Code" class="method-signature"
|
|
281
|
+
onclick="popupCode('Response.src/M000047.html');return false;">
|
|
282
282
|
<span class="method-name">success?</span><span class="method-args">()</span>
|
|
283
283
|
</a>
|
|
284
284
|
</div>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 68</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">xml_or_hash</span>)
|
|
15
15
|
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">xml_or_hash</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>))
|
|
16
16
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">import_from_hash</span>(<span class="ruby-identifier">xml_or_hash</span>)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 78</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">import_from_xml</span>(<span class="ruby-identifier">xml</span>)
|
|
15
15
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">import_from_hash</span>(<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">xml</span>))
|
|
16
16
|
<span class="ruby-keyword kw">self</span>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 82</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">import_from_hash</span>(<span class="ruby-identifier">hsh</span>)
|
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Hash passed to Quickbooks::Qbxml::Response.from_hash must contain only one top-level key"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
|
16
16
|
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">first</span>
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span> = <span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">dup</span>
|
|
31
31
|
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">m</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^([A-Za-z][a-z]+)(Query|Mod|Add)Rs$/</span>)
|
|
32
32
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">response_type</span> = <span class="ruby-identifier">m</span>[<span class="ruby-value">1</span>]
|
|
33
|
-
<span class="ruby-comment cmt"># self.ret_items = ResponseObject.new(self.response_type, hsh[self.response_type+'Ret'])</span>
|
|
34
33
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span> = <span class="ruby-identifier">hsh</span>[<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">response_type</span><span class="ruby-operator">+</span><span class="ruby-value str">'Ret'</span>]
|
|
35
34
|
<span class="ruby-keyword kw">else</span>
|
|
36
35
|
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Could not read this response:\n#{self.raw_response.inspect}"</span>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 114</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">xml</span>)
|
|
15
15
|
<span class="ruby-identifier">new</span>.<span class="ruby-identifier">import_from_xml</span>(<span class="ruby-identifier">xml</span>)
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 117</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from_hash</span>(<span class="ruby-identifier">hsh</span>)
|
|
15
15
|
<span class="ruby-identifier">new</span>.<span class="ruby-identifier">import_from_hash</span>(<span class="ruby-identifier">hsh</span>)
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 122</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instantiatable?</span> <span class="ruby-comment cmt"># Just checks to see if it can create an object of this type, and if there is actually data to instantiate</span>
|
|
15
15
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">response_type</span> <span class="ruby-value">? </span>(<span class="ruby-constant">Quickbooks</span>.<span class="ruby-identifier">const_defined?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">response_type</span>) <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">||</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>))) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 125</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">success?</span>
|
|
15
15
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 128</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error?</span>
|
|
15
15
|
<span class="ruby-operator">!</span><span class="ruby-identifier">success?</span>
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -10,40 +10,51 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
11
|
</head>
|
|
12
12
|
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/response.rb, line 132</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">reinstantiate</span>=<span class="ruby-keyword kw">nil</span>)
|
|
15
15
|
<span class="ruby-identifier">objs</span> = []
|
|
16
16
|
(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span> <span class="ruby-operator">:</span> [<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ret_items</span>]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ret_item</span><span class="ruby-operator">|</span>
|
|
17
|
+
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">reinstantiate</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reinstantiate</span>
|
|
17
18
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">instantiatable?</span>
|
|
18
19
|
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
|
19
20
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">nil?</span>
|
|
20
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-node">"Quickbooks::#{self.response_type}"</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">instantiate</span>(<span class="ruby-
|
|
21
|
+
<span class="ruby-identifier">obj</span> = <span class="ruby-node">"Quickbooks::#{self.response_type}"</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">ret_item</span>)
|
|
21
22
|
<span class="ruby-keyword kw">else</span>
|
|
22
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-
|
|
23
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">ret_item</span>)
|
|
23
24
|
<span class="ruby-keyword kw">end</span>
|
|
24
25
|
<span class="ruby-keyword kw">else</span>
|
|
25
26
|
<span class="ruby-comment cmt"># Instantiatable, but some error status. For any error status</span>
|
|
26
27
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment cmt"># Must be a new object. Just as well, create a new object WITHOUT any original_attributes.</span>
|
|
27
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-node">"Quickbooks::#{self.response_type}"</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>(<span class="ruby-
|
|
28
|
+
<span class="ruby-identifier">obj</span> = <span class="ruby-node">"Quickbooks::#{self.response_type}"</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ret_item</span>)
|
|
28
29
|
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># An existing object. Must be an update or delete request. Update object's original_attributes.</span>
|
|
29
30
|
<span class="ruby-identifier">updated</span> = []
|
|
30
|
-
<span class="ruby-
|
|
31
|
+
<span class="ruby-identifier">ret_item</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
|
31
32
|
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">underscore</span>
|
|
32
33
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">!=</span> <span class="ruby-identifier">v</span>
|
|
33
34
|
<span class="ruby-identifier">updated</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">k</span>
|
|
34
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">
|
|
35
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@object_properties'</span>).<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>)
|
|
36
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@object_properties'</span>)[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>].<span class="ruby-identifier">new</span>(<span class="ruby-identifier">v</span>)
|
|
37
|
+
<span class="ruby-keyword kw">else</span>
|
|
38
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
|
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
|
35
40
|
<span class="ruby-keyword kw">end</span>
|
|
36
41
|
<span class="ruby-keyword kw">end</span>
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
<span class="ruby-comment cmt"># Update object's 'read-only' attributes (as well as in the original_values):</span>
|
|
43
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_only</span>.<span class="ruby-identifier">stringify_values</span>.<span class="ruby-identifier">camelize_values</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
|
44
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">k</span>.<span class="ruby-identifier">underscore</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>, <span class="ruby-identifier">ret_item</span>[<span class="ruby-identifier">k</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret_item</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">k</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">k</span>.<span class="ruby-identifier">underscore</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>)
|
|
39
45
|
<span class="ruby-keyword kw">end</span>
|
|
40
46
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">message</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" Other properties were out of date: ["</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">updated</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'].'</span>
|
|
41
47
|
<span class="ruby-keyword kw">end</span>
|
|
48
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">errors</span> <span class="ruby-operator"><<</span> {<span class="ruby-identifier">:code</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span>, <span class="ruby-identifier">:message</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">message</span>, <span class="ruby-identifier">:response</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>}
|
|
42
49
|
<span class="ruby-keyword kw">end</span>
|
|
43
50
|
<span class="ruby-keyword kw">else</span>
|
|
44
|
-
<span class="ruby-
|
|
51
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
|
52
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">errors</span> <span class="ruby-operator"><<</span> {<span class="ruby-identifier">:code</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">:message</span> =<span class="ruby-operator">></span> <span class="ruby-node">"Cannot instantiate object of type #{self.response_type}!"</span>, <span class="ruby-identifier">:response</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>}
|
|
53
|
+
<span class="ruby-keyword kw">else</span>
|
|
54
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">errors</span> <span class="ruby-operator"><<</span> {<span class="ruby-identifier">:code</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span>, <span class="ruby-identifier">:message</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">message</span>, <span class="ruby-identifier">:response</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>}
|
|
55
|
+
<span class="ruby-keyword kw">end</span>
|
|
45
56
|
<span class="ruby-keyword kw">end</span>
|
|
46
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">response_log</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>
|
|
57
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">response_log</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">nil?</span>
|
|
47
58
|
<span class="ruby-identifier">objs</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj</span>
|
|
48
59
|
<span class="ruby-keyword kw">end</span>
|
|
49
60
|
<span class="ruby-identifier">objs</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">objs</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">objs</span>[<span class="ruby-value">0</span>] <span class="ruby-comment cmt"># Single or nil if not more than one.</span>
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
91
|
+
<a href="#M000035"><<</a>
|
|
92
|
+
<a href="#M000038">append_from_hash</a>
|
|
93
|
+
<a href="#M000037">append_from_xml</a>
|
|
94
|
+
<a href="#M000040">from_hash</a>
|
|
95
|
+
<a href="#M000039">from_xml</a>
|
|
96
|
+
<a href="#M000036">new</a>
|
|
97
|
+
<a href="#M000034">set</a>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
|
|
@@ -123,12 +123,12 @@
|
|
|
123
123
|
<div id="methods">
|
|
124
124
|
<h3 class="section-bar">Public Class methods</h3>
|
|
125
125
|
|
|
126
|
-
<div id="method-
|
|
127
|
-
<a name="
|
|
126
|
+
<div id="method-M000040" class="method-detail">
|
|
127
|
+
<a name="M000040"></a>
|
|
128
128
|
|
|
129
129
|
<div class="method-heading">
|
|
130
|
-
<a href="ResponseSet.src/
|
|
131
|
-
onclick="popupCode('ResponseSet.src/
|
|
130
|
+
<a href="ResponseSet.src/M000040.html" target="Code" class="method-signature"
|
|
131
|
+
onclick="popupCode('ResponseSet.src/M000040.html');return false;">
|
|
132
132
|
<span class="method-name">from_hash</span><span class="method-args">(hsh)</span>
|
|
133
133
|
</a>
|
|
134
134
|
</div>
|
|
@@ -137,12 +137,12 @@
|
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
139
139
|
|
|
140
|
-
<div id="method-
|
|
141
|
-
<a name="
|
|
140
|
+
<div id="method-M000039" class="method-detail">
|
|
141
|
+
<a name="M000039"></a>
|
|
142
142
|
|
|
143
143
|
<div class="method-heading">
|
|
144
|
-
<a href="ResponseSet.src/
|
|
145
|
-
onclick="popupCode('ResponseSet.src/
|
|
144
|
+
<a href="ResponseSet.src/M000039.html" target="Code" class="method-signature"
|
|
145
|
+
onclick="popupCode('ResponseSet.src/M000039.html');return false;">
|
|
146
146
|
<span class="method-name">from_xml</span><span class="method-args">(xml)</span>
|
|
147
147
|
</a>
|
|
148
148
|
</div>
|
|
@@ -151,12 +151,12 @@
|
|
|
151
151
|
</div>
|
|
152
152
|
</div>
|
|
153
153
|
|
|
154
|
-
<div id="method-
|
|
155
|
-
<a name="
|
|
154
|
+
<div id="method-M000036" class="method-detail">
|
|
155
|
+
<a name="M000036"></a>
|
|
156
156
|
|
|
157
157
|
<div class="method-heading">
|
|
158
|
-
<a href="ResponseSet.src/
|
|
159
|
-
onclick="popupCode('ResponseSet.src/
|
|
158
|
+
<a href="ResponseSet.src/M000036.html" target="Code" class="method-signature"
|
|
159
|
+
onclick="popupCode('ResponseSet.src/M000036.html');return false;">
|
|
160
160
|
<span class="method-name">new</span><span class="method-args">(xml_or_hash)</span>
|
|
161
161
|
</a>
|
|
162
162
|
</div>
|
|
@@ -167,12 +167,12 @@
|
|
|
167
167
|
|
|
168
168
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
169
169
|
|
|
170
|
-
<div id="method-
|
|
171
|
-
<a name="
|
|
170
|
+
<div id="method-M000035" class="method-detail">
|
|
171
|
+
<a name="M000035"></a>
|
|
172
172
|
|
|
173
173
|
<div class="method-heading">
|
|
174
|
-
<a href="ResponseSet.src/
|
|
175
|
-
onclick="popupCode('ResponseSet.src/
|
|
174
|
+
<a href="ResponseSet.src/M000035.html" target="Code" class="method-signature"
|
|
175
|
+
onclick="popupCode('ResponseSet.src/M000035.html');return false;">
|
|
176
176
|
<span class="method-name"><<</span><span class="method-args">(qbxml_response)</span>
|
|
177
177
|
</a>
|
|
178
178
|
</div>
|
|
@@ -181,12 +181,12 @@
|
|
|
181
181
|
</div>
|
|
182
182
|
</div>
|
|
183
183
|
|
|
184
|
-
<div id="method-
|
|
185
|
-
<a name="
|
|
184
|
+
<div id="method-M000038" class="method-detail">
|
|
185
|
+
<a name="M000038"></a>
|
|
186
186
|
|
|
187
187
|
<div class="method-heading">
|
|
188
|
-
<a href="ResponseSet.src/
|
|
189
|
-
onclick="popupCode('ResponseSet.src/
|
|
188
|
+
<a href="ResponseSet.src/M000038.html" target="Code" class="method-signature"
|
|
189
|
+
onclick="popupCode('ResponseSet.src/M000038.html');return false;">
|
|
190
190
|
<span class="method-name">append_from_hash</span><span class="method-args">(hsh)</span>
|
|
191
191
|
</a>
|
|
192
192
|
</div>
|
|
@@ -195,12 +195,12 @@
|
|
|
195
195
|
</div>
|
|
196
196
|
</div>
|
|
197
197
|
|
|
198
|
-
<div id="method-
|
|
199
|
-
<a name="
|
|
198
|
+
<div id="method-M000037" class="method-detail">
|
|
199
|
+
<a name="M000037"></a>
|
|
200
200
|
|
|
201
201
|
<div class="method-heading">
|
|
202
|
-
<a href="ResponseSet.src/
|
|
203
|
-
onclick="popupCode('ResponseSet.src/
|
|
202
|
+
<a href="ResponseSet.src/M000037.html" target="Code" class="method-signature"
|
|
203
|
+
onclick="popupCode('ResponseSet.src/M000037.html');return false;">
|
|
204
204
|
<span class="method-name">append_from_xml</span><span class="method-args">(xml)</span>
|
|
205
205
|
</a>
|
|
206
206
|
</div>
|
|
@@ -209,12 +209,12 @@
|
|
|
209
209
|
</div>
|
|
210
210
|
</div>
|
|
211
211
|
|
|
212
|
-
<div id="method-
|
|
213
|
-
<a name="
|
|
212
|
+
<div id="method-M000034" class="method-detail">
|
|
213
|
+
<a name="M000034"></a>
|
|
214
214
|
|
|
215
215
|
<div class="method-heading">
|
|
216
|
-
<a href="ResponseSet.src/
|
|
217
|
-
onclick="popupCode('ResponseSet.src/
|
|
216
|
+
<a href="ResponseSet.src/M000034.html" target="Code" class="method-signature"
|
|
217
|
+
onclick="popupCode('ResponseSet.src/M000034.html');return false;">
|
|
218
218
|
<span class="method-name">set</span><span class="method-args">()</span>
|
|
219
219
|
</a>
|
|
220
220
|
</div>
|