quickbooks 0.0.2 → 0.0.3
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 +18 -28
- data/Rakefile +17 -30
- data/doc/classes/{QuickBooks/Models/DataExt.html → Class.html} +151 -140
- data/doc/classes/Class.src/M000003.html +18 -0
- data/doc/classes/Hash.html +164 -0
- data/doc/classes/Hash.src/M000001.html +20 -0
- data/doc/classes/Hash.src/M000002.html +23 -0
- data/doc/classes/{QuickBooks/Models/Transaction.html → Object.html} +207 -201
- data/doc/classes/Object.src/M000004.html +24 -0
- data/doc/classes/Object.src/M000005.html +18 -0
- data/doc/classes/Object.src/M000006.html +19 -0
- data/doc/classes/Object.src/M000007.html +18 -0
- data/doc/classes/{QuickBooks.html → QBHelpers.html} +118 -119
- data/doc/classes/QBHelpers/Ole.html +209 -0
- data/doc/classes/QBHelpers/Ole.src/M000066.html +21 -0
- data/doc/classes/QBHelpers/Ole.src/M000067.html +22 -0
- data/doc/classes/QBHelpers/Ole.src/M000068.html +18 -0
- data/doc/classes/Quickbooks.html +136 -0
- data/doc/classes/Quickbooks/Base.html +618 -0
- data/doc/classes/Quickbooks/Base.src/M000034.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000035.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000036.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000037.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000038.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000039.html +25 -0
- data/doc/classes/Quickbooks/Base.src/M000040.html +27 -0
- data/doc/classes/Quickbooks/Base.src/M000041.html +22 -0
- data/doc/classes/Quickbooks/Base.src/M000042.html +30 -0
- data/doc/classes/Quickbooks/Base.src/M000043.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000044.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000045.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000046.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000047.html +22 -0
- data/doc/classes/Quickbooks/Base.src/M000048.html +23 -0
- data/doc/classes/Quickbooks/Base.src/M000049.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000050.html +21 -0
- data/doc/classes/Quickbooks/Base.src/M000051.html +25 -0
- data/doc/classes/Quickbooks/Base.src/M000052.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000053.html +36 -0
- data/doc/classes/Quickbooks/Base.src/M000054.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000055.html +18 -0
- data/doc/classes/Quickbooks/Connection.html +369 -0
- data/doc/classes/{QuickBooks/Models/Customer.src/M000002.html → Quickbooks/Connection.src/M000056.html} +17 -17
- data/doc/classes/Quickbooks/Connection.src/M000057.html +19 -0
- data/doc/classes/Quickbooks/Connection.src/M000058.html +25 -0
- data/doc/classes/{QuickBooks/Connection.src/M000018.html → Quickbooks/Connection.src/M000059.html} +17 -17
- data/doc/classes/Quickbooks/Connection.src/M000060.html +18 -0
- data/doc/classes/Quickbooks/Connection.src/M000061.html +21 -0
- data/doc/classes/Quickbooks/Connection.src/M000062.html +24 -0
- data/doc/classes/{QuickBooks/Connection.src/M000016.html → Quickbooks/Connection.src/M000063.html} +19 -20
- data/doc/classes/{QuickBooks/Connection.src/M000019.html → Quickbooks/Connection.src/M000064.html} +23 -21
- data/doc/classes/Quickbooks/Connection.src/M000065.html +24 -0
- data/doc/classes/{QuickBooks/Models.html → Quickbooks/Customer.html} +112 -120
- data/doc/classes/{QuickBooks/Models/CreditCardInfo.html → Quickbooks/ListItem.html} +176 -148
- data/doc/classes/Quickbooks/ListItem.src/M000033.html +31 -0
- data/doc/classes/Quickbooks/Qbxml.html +138 -0
- data/doc/classes/{QuickBooks/Models/ListItem.html → Quickbooks/Qbxml/Error.html} +167 -173
- data/doc/classes/{QuickBooks/Models/Base.src/M000011.html → Quickbooks/Qbxml/Error.src/M000031.html} +17 -17
- data/doc/classes/Quickbooks/Qbxml/Request.html +182 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000024.html +23 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000025.html +19 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000026.html +57 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.html +193 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/M000027.html +22 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/M000028.html +26 -0
- data/doc/classes/{QuickBooks/Models/Base.src/M000014.html → Quickbooks/Qbxml/RequestSet.src/M000029.html} +17 -16
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/M000030.html +22 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSetArrayExt.html +105 -0
- data/doc/classes/{QuickBooks/Connection.html → Quickbooks/Qbxml/Response.html} +301 -278
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000015.html +24 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000016.html +19 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000017.html +45 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000018.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000019.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000020.html +18 -0
- data/doc/classes/{QuickBooks/Models/Base.src/M000013.html → Quickbooks/Qbxml/Response.src/M000021.html} +17 -16
- data/doc/classes/{QuickBooks/Models/ListItem.src/M000009.html → Quickbooks/Qbxml/Response.src/M000022.html} +17 -16
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000023.html +52 -0
- data/doc/classes/{QuickBooks/Models/Base.html → Quickbooks/Qbxml/ResponseSet.html} +237 -213
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000008.html +22 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000009.html +26 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000010.html +24 -0
- data/doc/classes/{QuickBooks/Models/Base.src/M000012.html → Quickbooks/Qbxml/ResponseSet.src/M000011.html} +17 -17
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000012.html +27 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000013.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000014.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSetArrayExt.html +105 -0
- data/doc/classes/{QuickBooks/Models/Address.html → Quickbooks/Transaction.html} +194 -158
- data/doc/classes/Quickbooks/Transaction.src/M000032.html +26 -0
- data/doc/created.rid +1 -1
- data/doc/files/LICENSE.html +128 -128
- data/doc/files/README.html +185 -173
- data/doc/files/lib/quickbooks/base_rb.html +317 -0
- data/doc/files/lib/quickbooks/connection_rb.html +108 -108
- data/doc/files/lib/quickbooks/models/{base_rb.html → customer_rb.html} +100 -100
- data/doc/files/lib/quickbooks/models/list_item_rb.html +101 -0
- data/doc/files/lib/quickbooks/models/transaction_rb.html +101 -0
- data/doc/files/lib/quickbooks/ole_helper_rb.html +109 -0
- data/doc/files/lib/quickbooks/qbxml/error_rb.html +101 -0
- data/doc/files/lib/quickbooks/{models/models_rb.html → qbxml/request_rb.html} +108 -107
- data/doc/files/lib/quickbooks/qbxml/response_rb.html +109 -0
- data/doc/files/lib/quickbooks/ruby_magic_rb.html +111 -0
- data/doc/files/lib/quickbooks_rb.html +112 -108
- data/doc/fr_class_index.html +44 -35
- data/doc/fr_file_index.html +38 -31
- data/doc/fr_method_index.html +93 -44
- data/doc/index.html +23 -23
- data/doc/rdoc-style.css +207 -207
- data/lib/quickbooks.rb +6 -1
- data/lib/quickbooks/base.rb +282 -0
- data/lib/quickbooks/connection.rb +91 -57
- data/lib/quickbooks/models/customer.rb +71 -0
- data/lib/quickbooks/models/list_item.rb +22 -0
- data/lib/quickbooks/models/transaction.rb +40 -0
- data/lib/quickbooks/ole_helper.rb +47 -0
- data/lib/quickbooks/qbxml/error.rb +20 -0
- data/lib/quickbooks/qbxml/request.rb +120 -0
- data/lib/quickbooks/qbxml/response.rb +176 -0
- data/lib/quickbooks/ruby_magic.rb +67 -0
- metadata +173 -84
- data/doc/classes/QuickBooks/Connection.src/M000015.html +0 -25
- data/doc/classes/QuickBooks/Connection.src/M000017.html +0 -20
- data/doc/classes/QuickBooks/Models/Base.src/M000010.html +0 -19
- data/doc/classes/QuickBooks/Models/Customer.html +0 -424
- data/doc/classes/QuickBooks/Models/Customer.src/M000001.html +0 -34
- data/doc/classes/QuickBooks/Models/Customer.src/M000003.html +0 -18
- data/doc/classes/QuickBooks/Models/ListItem.src/M000008.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000004.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000005.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000006.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000007.html +0 -17
- data/lib/quickbooks/models/base.rb +0 -72
- data/lib/quickbooks/models/models.rb +0 -43
- data/test/quickbooks/quickbooks_test.rb +0 -34
- data/test/test_helper.rb +0 -4
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Quickbooks::Qbxml::Request)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 60</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">options</span>={})
|
15
|
+
<span class="ruby-ivar">@type</span> = <span class="ruby-identifier">type</span>
|
16
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Quickbooks::Qbxml::Requests can only be of one of the following types: :query, :transaction, :any_transaction, :mod, :add, :delete, or :report"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">is_one_of?</span>(<span class="ruby-identifier">:query</span>, <span class="ruby-identifier">:transaction</span>, <span class="ruby-identifier">:any_transaction</span>, <span class="ruby-identifier">:mod</span>, <span class="ruby-identifier">:report</span>, <span class="ruby-identifier">:add</span>, <span class="ruby-identifier">:delete</span>)
|
17
|
+
<span class="ruby-ivar">@object</span> = <span class="ruby-identifier">object</span>
|
18
|
+
<span class="ruby-ivar">@filters</span> = <span class="ruby-identifier">options</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">is_one_of?</span>(<span class="ruby-identifier">:query</span>, <span class="ruby-identifier">:transaction</span>, <span class="ruby-identifier">:any_transaction</span>, <span class="ruby-identifier">:report</span>)
|
19
|
+
<span class="ruby-ivar">@attributes</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">is_one_of?</span>(<span class="ruby-identifier">:mod</span>, <span class="ruby-identifier">:add</span>, <span class="ruby-identifier">:delete</span>)
|
20
|
+
<span class="ruby-comment cmt"># puts self.inspect</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>next_request_id (Quickbooks::Qbxml::Request)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 69</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">next_request_id</span>
|
15
|
+
<span class="ruby-ivar">@request_id</span> <span class="ruby-operator">||=</span> <span class="ruby-value">5000</span>
|
16
|
+
<span class="ruby-ivar">@request_id</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>to_xml (Quickbooks::Qbxml::Request)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 75</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>(<span class="ruby-identifier">as_set</span>=<span class="ruby-keyword kw">true</span>)
|
15
|
+
<span class="ruby-keyword kw">return</span> (<span class="ruby-constant">RequestSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)).<span class="ruby-identifier">to_xml</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">as_set</span> <span class="ruby-comment cmt"># Simple call yields xml as a single request in a request set. However, if the xml for the lone request is required, pass false.</span>
|
16
|
+
<span class="ruby-identifier">req</span> = <span class="ruby-constant">Builder</span><span class="ruby-operator">::</span><span class="ruby-constant">XmlMarkup</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:indent</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>)
|
17
|
+
<span class="ruby-keyword kw">case</span>
|
18
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-ivar">@type</span>.<span class="ruby-identifier">is_one_of?</span>(<span class="ruby-identifier">:query</span>)
|
19
|
+
<span class="ruby-identifier">request_root</span> = <span class="ruby-node">"#{@object}QueryRq"</span>
|
20
|
+
<span class="ruby-identifier">container</span> = <span class="ruby-keyword kw">nil</span>
|
21
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:mod</span>
|
22
|
+
<span class="ruby-identifier">request_root</span> = <span class="ruby-node">"#{@object}ModRq"</span>
|
23
|
+
<span class="ruby-identifier">container</span> = <span class="ruby-node">"#{@object}Mod"</span>
|
24
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:add</span>
|
25
|
+
<span class="ruby-identifier">request_root</span> = <span class="ruby-node">"#{@object}AddRq"</span>
|
26
|
+
<span class="ruby-identifier">container</span> = <span class="ruby-node">"#{@object}Add"</span>
|
27
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:delete</span>
|
28
|
+
<span class="ruby-comment cmt"># request_root = "#{@object}DelRq"</span>
|
29
|
+
<span class="ruby-identifier">request_root</span> = <span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">ListItem</span>.<span class="ruby-identifier">child_types</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@object</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">'ListDelRq'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'TxnDelRq'</span>
|
30
|
+
<span class="ruby-identifier">container</span> = <span class="ruby-keyword kw">nil</span>
|
31
|
+
<span class="ruby-comment cmt"># container = Quickbooks::ListItem.child_types.include?(@object) ? 'ListDelType' : 'TxnDelType'</span>
|
32
|
+
<span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">merge!</span>((<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">ListItem</span>.<span class="ruby-identifier">child_types</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@object</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">'ListDelType'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'TxnDelType'</span>) =<span class="ruby-operator">></span> <span class="ruby-ivar">@object</span>)
|
33
|
+
<span class="ruby-keyword kw">else</span>
|
34
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">"Could not convert this request to qbxml!\n#{self.inspect}"</span>
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
36
|
+
<span class="ruby-identifier">inner_stuff</span> = <span class="ruby-identifier">lambda</span> {
|
37
|
+
[<span class="ruby-value str">'ListDelType'</span>, <span class="ruby-value str">'TxnDelType'</span>, <span class="ruby-value str">'ListID'</span>, <span class="ruby-value str">'TxnID'</span>, <span class="ruby-value str">'EditSequence'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
38
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">key</span>, <span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
39
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@attributes</span>
|
40
|
+
(<span class="ruby-ivar">@filters</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@attributes</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
41
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
|
42
|
+
<span class="ruby-keyword kw">end</span>
|
43
|
+
}
|
44
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">request_root</span>, <span class="ruby-identifier">:requestID</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">next_request_id</span>) {
|
45
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">container</span>
|
46
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">container</span>) {
|
47
|
+
<span class="ruby-identifier">inner_stuff</span>.<span class="ruby-identifier">call</span>
|
48
|
+
}
|
49
|
+
<span class="ruby-keyword kw">else</span>
|
50
|
+
<span class="ruby-identifier">inner_stuff</span>.<span class="ruby-identifier">call</span>
|
51
|
+
<span class="ruby-keyword kw">end</span>
|
52
|
+
}
|
53
|
+
<span class="ruby-comment cmt"># puts req.target!</span>
|
54
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">target!</span>
|
55
|
+
<span class="ruby-keyword kw">end</span></pre>
|
56
|
+
</body>
|
57
|
+
</html>
|
@@ -0,0 +1,193 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Quickbooks::Qbxml::RequestSet</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Quickbooks::Qbxml::RequestSet</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/quickbooks/qbxml/request_rb.html">
|
59
|
+
lib/quickbooks/qbxml/request.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="../../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000028"><<</a>
|
92
|
+
<a href="#M000029">new</a>
|
93
|
+
<a href="#M000027">set</a>
|
94
|
+
<a href="#M000030">to_xml</a>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
|
98
|
+
</div>
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if includes -->
|
102
|
+
<div id="includes">
|
103
|
+
<h3 class="section-bar">Included Modules</h3>
|
104
|
+
|
105
|
+
<div id="includes-list">
|
106
|
+
<span class="include-name">Enumerable</span>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<div id="section">
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<!-- if method_list -->
|
120
|
+
<div id="methods">
|
121
|
+
<h3 class="section-bar">Public Class methods</h3>
|
122
|
+
|
123
|
+
<div id="method-M000029" class="method-detail">
|
124
|
+
<a name="M000029"></a>
|
125
|
+
|
126
|
+
<div class="method-heading">
|
127
|
+
<a href="RequestSet.src/M000029.html" target="Code" class="method-signature"
|
128
|
+
onclick="popupCode('RequestSet.src/M000029.html');return false;">
|
129
|
+
<span class="method-name">new</span><span class="method-args">(*requests)</span>
|
130
|
+
</a>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<div class="method-description">
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
138
|
+
|
139
|
+
<div id="method-M000028" class="method-detail">
|
140
|
+
<a name="M000028"></a>
|
141
|
+
|
142
|
+
<div class="method-heading">
|
143
|
+
<a href="RequestSet.src/M000028.html" target="Code" class="method-signature"
|
144
|
+
onclick="popupCode('RequestSet.src/M000028.html');return false;">
|
145
|
+
<span class="method-name"><<</span><span class="method-args">(qbxml_request)</span>
|
146
|
+
</a>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div class="method-description">
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<div id="method-M000027" class="method-detail">
|
154
|
+
<a name="M000027"></a>
|
155
|
+
|
156
|
+
<div class="method-heading">
|
157
|
+
<a href="RequestSet.src/M000027.html" target="Code" class="method-signature"
|
158
|
+
onclick="popupCode('RequestSet.src/M000027.html');return false;">
|
159
|
+
<span class="method-name">set</span><span class="method-args">()</span>
|
160
|
+
</a>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="method-description">
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<div id="method-M000030" class="method-detail">
|
168
|
+
<a name="M000030"></a>
|
169
|
+
|
170
|
+
<div class="method-heading">
|
171
|
+
<a href="RequestSet.src/M000030.html" target="Code" class="method-signature"
|
172
|
+
onclick="popupCode('RequestSet.src/M000030.html');return false;">
|
173
|
+
<span class="method-name">to_xml</span><span class="method-args">()</span>
|
174
|
+
</a>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<div class="method-description">
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
</div>
|
183
|
+
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
|
188
|
+
<div id="validator-badges">
|
189
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
</body>
|
193
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>set (Quickbooks::Qbxml::RequestSet)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 9</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>
|
15
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@set</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
16
|
+
<span class="ruby-ivar">@set</span> = []
|
17
|
+
<span class="ruby-ivar">@set</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Qbxml</span><span class="ruby-operator">::</span><span class="ruby-constant">RequestSetArrayExt</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-ivar">@set</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title><< (Quickbooks::Qbxml::RequestSet)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 17</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">qbxml_request</span>)
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">qbxml_request</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Qbxml</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>)
|
16
|
+
<span class="ruby-identifier">set</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">qbxml_request</span>
|
17
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">qbxml_request</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:each</span>)
|
18
|
+
<span class="ruby-identifier">qbxml_request</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">request</span><span class="ruby-operator">|</span>
|
19
|
+
<span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">request</span>
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
21
|
+
<span class="ruby-keyword kw">else</span>
|
22
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Cannot add object of type #{qbxml_request.class.name} to a Quickbooks::Qbxml::RequestSet"</span>
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
24
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -1,17 +1,18 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/quickbooks/
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
|
16
|
-
</
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Quickbooks::Qbxml::RequestSet)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 29</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">requests</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">requests</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
17
18
|
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>to_xml (Quickbooks::Qbxml::RequestSet)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/qbxml/request.rb, line 33</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
|
15
|
+
<span class="ruby-identifier">pre</span> = <span class="ruby-value str">"<?xml version=\"1.0\" ?>\n<?qbxml version=\"\#{Quickbooks::Qbxml::VERSION}\" ?>\n<QBXML>\n<QBXMLMsgsRq onError=\"stopOnError\">\n"</span>
|
16
|
+
<span class="ruby-identifier">requests</span> = <span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">to_xml</span>(<span class="ruby-keyword kw">false</span>)}.<span class="ruby-identifier">join</span>
|
17
|
+
<span class="ruby-identifier">post</span> = <span class="ruby-value str">"</QBXMLMsgsRq>\n</QBXML>\n"</span>
|
18
|
+
<span class="ruby-comment cmt"># puts pre + requests + post</span>
|
19
|
+
<span class="ruby-identifier">pre</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">requests</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">post</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Quickbooks::Qbxml::RequestSetArrayExt</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Quickbooks::Qbxml::RequestSetArrayExt</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/quickbooks/qbxml/request_rb.html">
|
59
|
+
lib/quickbooks/qbxml/request.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
<!-- if includes -->
|
84
|
+
|
85
|
+
<div id="section">
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<!-- if method_list -->
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
|
100
|
+
<div id="validator-badges">
|
101
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
</body>
|
105
|
+
</html>
|