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
|
@@ -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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 88</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">success?</span>
|
|
15
15
|
<span class="ruby-ivar">@response_log</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">success?</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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 101</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">application_name</span>=<span class="ruby-value str">'RubyApplication'</span>, <span class="ruby-identifier">file</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">user</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">password</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">connection_type</span>=<span class="ruby-value str">'localQBD'</span>, <span class="ruby-identifier">connection_mode</span>=<span class="ruby-value str">'DoNotCare'</span>)
|
|
15
15
|
<span class="ruby-ivar">@@connection</span> = <span class="ruby-constant">Connection</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">application_name</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">connection_type</span>, <span class="ruby-identifier">connection_mode</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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 106</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection</span>
|
|
15
15
|
<span class="ruby-ivar">@connection</span> <span class="ruby-operator">||</span> (<span class="ruby-ivar">@@connection</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">establish_connection</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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 115</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection=</span>(<span class="ruby-identifier">conn</span>)
|
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Cannot set connection to anything but a Quickbooks::Connection object"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Connection</span>)
|
|
16
16
|
<span class="ruby-ivar">@connection</span> = <span class="ruby-identifier">conn</span>
|
|
@@ -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>request_and_instantiate (Quickbooks::Base)</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/base.rb, line 125</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-identifier">obj_or_args</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-comment cmt"># If an object is sent, we need to reinstantiate the response into that object</span>
|
|
16
|
+
<span class="ruby-identifier">reinstantiate</span> = <span class="ruby-identifier">obj_or_args</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">obj_or_args</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
|
17
|
+
<span class="ruby-identifier">objects</span> = [] <span class="ruby-comment cmt"># This will hold and return the instantiated objects from the quickbooks response</span>
|
|
18
|
+
<span class="ruby-comment cmt"># The following is subject to bugginess, IF the response contains more than one object: it will instantiate only the last one.</span>
|
|
19
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">obj_or_args</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">response</span><span class="ruby-operator">|</span> <span class="ruby-identifier">objects</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">reinstantiate</span>) } <span class="ruby-comment cmt"># Does not instantiate if it's an error, but simply records response into response_log</span>
|
|
20
|
+
<span class="ruby-identifier">objects</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">objects</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">objects</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 135</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
15
|
<span class="ruby-constant">Qbxml</span><span class="ruby-operator">::</span><span class="ruby-constant">ResponseSet</span>.<span class="ruby-identifier">new</span>(
|
|
16
16
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">send_xml</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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 144</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">obj_or_attrs</span>={},<span class="ruby-identifier">attrs</span>={})
|
|
15
15
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj_or_attrs</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>)
|
|
16
16
|
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">obj_or_attrs</span>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<span class="ruby-identifier">attrs</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>
|
|
22
22
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span><span class="ruby-operator">+</span><span class="ruby-value str">'='</span>)
|
|
23
23
|
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span><span class="ruby-operator">+</span><span class="ruby-value str">'='</span>, <span class="ruby-identifier">value</span>)
|
|
24
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span>] = <span class="ruby-identifier">value</span>
|
|
24
|
+
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span>] = <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span>).<span class="ruby-identifier">dup</span>
|
|
25
25
|
<span class="ruby-keyword kw">end</span>
|
|
26
26
|
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attrs</span>
|
|
27
27
|
<span class="ruby-identifier">obj</span> <span class="ruby-comment cmt"># Will be either a nice object, or a Quickbooks::Qbxml::Error object.</span>
|
|
@@ -10,9 +10,10 @@
|
|
|
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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 161</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all</span>(<span class="ruby-identifier">filters</span>={})
|
|
15
|
-
|
|
15
|
+
<span class="ruby-identifier">filters</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-identifier">:active_status</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'All'</span>)
|
|
16
|
+
[<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:query</span>, <span class="ruby-identifier">filters</span>)].<span class="ruby-identifier">flatten</span>
|
|
16
17
|
<span class="ruby-keyword kw">end</span></pre>
|
|
17
18
|
</body>
|
|
18
19
|
</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>first (Quickbooks::Base)</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/base.rb, line 167</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first</span>(<span class="ruby-identifier">filters</span>={})
|
|
15
|
+
(<span class="ruby-identifier">filters</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">:max_returned</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">filters</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:list_id</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">filters</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:txn_id</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">filters</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:full_name</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filters</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
|
16
|
+
<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:query</span>, <span class="ruby-identifier">filters</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 173</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
15
|
<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>).<span class="ruby-identifier">save</span>
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -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>new (Quickbooks::Base)</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/base.rb, line 178</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-keyword kw">super</span> <span class="ruby-comment cmt"># from Quickbooks::Model - sets the *args into attributes</span>
|
|
16
|
+
<span class="ruby-ivar">@new_record</span> = <span class="ruby-keyword kw">true</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 184</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_record?</span>
|
|
15
15
|
<span class="ruby-ivar">@new_record</span>
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -0,0 +1,45 @@
|
|
|
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>save (Quickbooks::Base)</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/base.rb, line 193</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dirty?</span>
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">clear</span> <span class="ruby-comment cmt"># Clear out any errors: start with a clean slate!</span>
|
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_record?</span>
|
|
18
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:add</span>)
|
|
19
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">dirty?</span>
|
|
20
|
+
<span class="ruby-ivar">@new_record</span> = <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span>
|
|
21
|
+
<span class="ruby-keyword kw">else</span>
|
|
22
|
+
<span class="ruby-comment cmt"># Smart system that respects EditSequences and other people's changes.</span>
|
|
23
|
+
<span class="ruby-comment cmt"># 1) Try to save</span>
|
|
24
|
+
<span class="ruby-comment cmt"># 2) When we get a status of 3200, that means our EditSequence is not up to date</span>
|
|
25
|
+
<span class="ruby-comment cmt"># 3) Replace self's original_attributes with those just retrieved, and update the automatic attributes, like EditSequence and TimeModified</span>
|
|
26
|
+
<span class="ruby-comment cmt"># 4) Return false, return the object dirty but ready to save</span>
|
|
27
|
+
<span class="ruby-identifier">old_originals</span> = <span class="ruby-identifier">original_values</span>.<span class="ruby-identifier">dup</span> <span class="ruby-comment cmt"># Save the old_originals so we can detect any attributes that changed since we last loaded the object</span>
|
|
28
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:mod</span>).<span class="ruby-identifier">error?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">false</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">true</span> <span class="ruby-comment cmt"># Saves if possible, if EditSequence is out of date, it will read the up-to-date object into original_values</span>
|
|
29
|
+
<span class="ruby-comment cmt"># If save failed (dirty?) because of old record (status 3200), but none of the fields conflict (attributes I've modified and are still different aren't the same attributes as any of the attributes someone else updated), then re-save!</span>
|
|
30
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dirty?</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">response_log</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value">3200</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">dirty_attributes</span>.<span class="ruby-identifier">only</span>(<span class="ruby-identifier">dirty_attributes</span>(<span class="ruby-identifier">old_originals</span>).<span class="ruby-identifier">keys</span>).<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-keyword kw">self</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">length</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">dirty_attributes</span>(<span class="ruby-identifier">old_originals</span>).<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">old_originals</span>.<span class="ruby-identifier">diff</span>(<span class="ruby-identifier">original_values</span>).<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-keyword kw">self</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">length</span>
|
|
31
|
+
<span class="ruby-comment cmt"># 'Revert' fields I didn't modify to equal the values of the more up-to-date record just loaded.</span>
|
|
32
|
+
<span class="ruby-comment cmt"># Fields I didn't modify: dirty_attributes - dirty_attributes(old_originals).keys</span>
|
|
33
|
+
(<span class="ruby-identifier">dirty_attributes</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">dirty_attributes</span>(<span class="ruby-identifier">old_originals</span>).<span class="ruby-identifier">keys</span>).<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">at</span><span class="ruby-operator">|</span>
|
|
34
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">at</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>, <span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">at</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">at</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'='</span>)
|
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
|
36
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">save</span>
|
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
|
39
|
+
<span class="ruby-comment cmt"># ret should be a false value if self has errors. Either way, ret gets the errors too.</span>
|
|
40
|
+
<span class="ruby-identifier">ret</span>.<span class="ruby-identifier">errors</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">errors</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">error?</span>
|
|
41
|
+
<span class="ruby-comment cmt"># Should be true or false with an error attached.</span>
|
|
42
|
+
<span class="ruby-identifier">ret</span>
|
|
43
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
|
@@ -10,9 +10,9 @@
|
|
|
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/base.rb, line
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/base.rb, line 225</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload</span>
|
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:query</span>)
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -0,0 +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>destroy (Quickbooks::Base)</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/base.rb, line 230</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>
|
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">request_and_instantiate</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:delete</span>).<span class="ruby-identifier">success?</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
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::Base)</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/base.rb, line 235</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>)
|
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new_record?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">new_record?</span>
|
|
17
|
+
<span class="ruby-keyword kw">super</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,113 @@
|
|
|
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::BillAddress</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::BillAddress</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/quickbooks/models/common/address_rb.html">
|
|
59
|
+
lib/quickbooks/models/common/address.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="Address.html">
|
|
69
|
+
Address
|
|
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
|
+
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
<!-- if includes -->
|
|
92
|
+
|
|
93
|
+
<div id="section">
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<!-- if method_list -->
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<div id="validator-badges">
|
|
109
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
</body>
|
|
113
|
+
</html>
|
|
@@ -85,16 +85,16 @@
|
|
|
85
85
|
<a href="Connection.html">Connection</a> is used internally by <a
|
|
86
86
|
href="Base.html">Quickbooks::Base</a> to automatically manage a the
|
|
87
87
|
communication with quickbooks. Currently the only <a
|
|
88
|
-
href="Connection.html#
|
|
88
|
+
href="Connection.html#M000103">connection</a> mode supported is WIN32OlE,
|
|
89
89
|
which means your application must be running on the same computer as <a
|
|
90
90
|
href="../Quickbooks.html">Quickbooks</a>.
|
|
91
91
|
</p>
|
|
92
92
|
<p>
|
|
93
93
|
<a href="../Quickbooks.html">Quickbooks</a> does not allow the user to <a
|
|
94
|
-
href="Connection.html#
|
|
94
|
+
href="Connection.html#M000106">close</a> the company or exit the program
|
|
95
95
|
until all outside applications are disconnected from its API. Therefore,
|
|
96
96
|
this class includes an at_exit hook that automatically closes all open <a
|
|
97
|
-
href="Connection.html#
|
|
97
|
+
href="Connection.html#M000097">connections</a> for you when your program
|
|
98
98
|
exits.
|
|
99
99
|
</p>
|
|
100
100
|
|
|
@@ -107,16 +107,16 @@ exits.
|
|
|
107
107
|
<h3 class="section-bar">Methods</h3>
|
|
108
108
|
|
|
109
109
|
<div class="name-list">
|
|
110
|
-
<a href="#
|
|
111
|
-
<a href="#
|
|
112
|
-
<a href="#
|
|
113
|
-
<a href="#
|
|
114
|
-
<a href="#
|
|
115
|
-
<a href="#
|
|
116
|
-
<a href="#
|
|
117
|
-
<a href="#
|
|
118
|
-
<a href="#
|
|
119
|
-
<a href="#
|
|
110
|
+
<a href="#M000106">close</a>
|
|
111
|
+
<a href="#M000100">connected?</a>
|
|
112
|
+
<a href="#M000103">connection</a>
|
|
113
|
+
<a href="#M000097">connections</a>
|
|
114
|
+
<a href="#M000098">connections=</a>
|
|
115
|
+
<a href="#M000105">end_session</a>
|
|
116
|
+
<a href="#M000099">new</a>
|
|
117
|
+
<a href="#M000102">send_xml</a>
|
|
118
|
+
<a href="#M000104">session</a>
|
|
119
|
+
<a href="#M000101">session?</a>
|
|
120
120
|
</div>
|
|
121
121
|
</div>
|
|
122
122
|
|
|
@@ -145,12 +145,12 @@ exits.
|
|
|
145
145
|
<div id="methods">
|
|
146
146
|
<h3 class="section-bar">Public Class methods</h3>
|
|
147
147
|
|
|
148
|
-
<div id="method-
|
|
149
|
-
<a name="
|
|
148
|
+
<div id="method-M000097" class="method-detail">
|
|
149
|
+
<a name="M000097"></a>
|
|
150
150
|
|
|
151
151
|
<div class="method-heading">
|
|
152
|
-
<a href="Connection.src/
|
|
153
|
-
onclick="popupCode('Connection.src/
|
|
152
|
+
<a href="Connection.src/M000097.html" target="Code" class="method-signature"
|
|
153
|
+
onclick="popupCode('Connection.src/M000097.html');return false;">
|
|
154
154
|
<span class="method-name">connections</span><span class="method-args">()</span>
|
|
155
155
|
</a>
|
|
156
156
|
</div>
|
|
@@ -159,12 +159,12 @@ exits.
|
|
|
159
159
|
</div>
|
|
160
160
|
</div>
|
|
161
161
|
|
|
162
|
-
<div id="method-
|
|
163
|
-
<a name="
|
|
162
|
+
<div id="method-M000098" class="method-detail">
|
|
163
|
+
<a name="M000098"></a>
|
|
164
164
|
|
|
165
165
|
<div class="method-heading">
|
|
166
|
-
<a href="Connection.src/
|
|
167
|
-
onclick="popupCode('Connection.src/
|
|
166
|
+
<a href="Connection.src/M000098.html" target="Code" class="method-signature"
|
|
167
|
+
onclick="popupCode('Connection.src/M000098.html');return false;">
|
|
168
168
|
<span class="method-name">connections=</span><span class="method-args">(v)</span>
|
|
169
169
|
</a>
|
|
170
170
|
</div>
|
|
@@ -173,12 +173,12 @@ exits.
|
|
|
173
173
|
</div>
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
|
-
<div id="method-
|
|
177
|
-
<a name="
|
|
176
|
+
<div id="method-M000099" class="method-detail">
|
|
177
|
+
<a name="M000099"></a>
|
|
178
178
|
|
|
179
179
|
<div class="method-heading">
|
|
180
|
-
<a href="Connection.src/
|
|
181
|
-
onclick="popupCode('Connection.src/
|
|
180
|
+
<a href="Connection.src/M000099.html" target="Code" class="method-signature"
|
|
181
|
+
onclick="popupCode('Connection.src/M000099.html');return false;">
|
|
182
182
|
<span class="method-name">new</span><span class="method-args">(application_name='RubyApplication', file='', user='', password='', connection_type='localQBD', connection_mode='DoNotCare')</span>
|
|
183
183
|
</a>
|
|
184
184
|
</div>
|
|
@@ -192,7 +192,7 @@ Initializes an instance of Quickbooks::Session.
|
|
|
192
192
|
|
|
193
193
|
</li>
|
|
194
194
|
<li><em>file</em> is optional, in which case the <a
|
|
195
|
-
href="Connection.html#
|
|
195
|
+
href="Connection.html#M000103">connection</a> will be made to the currently
|
|
196
196
|
open company file in the <a href="../Quickbooks.html">Quickbooks</a>
|
|
197
197
|
application.
|
|
198
198
|
|
|
@@ -216,31 +216,31 @@ specific file to open.
|
|
|
216
216
|
|
|
217
217
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
218
218
|
|
|
219
|
-
<div id="method-
|
|
220
|
-
<a name="
|
|
219
|
+
<div id="method-M000106" class="method-detail">
|
|
220
|
+
<a name="M000106"></a>
|
|
221
221
|
|
|
222
222
|
<div class="method-heading">
|
|
223
|
-
<a href="Connection.src/
|
|
224
|
-
onclick="popupCode('Connection.src/
|
|
223
|
+
<a href="Connection.src/M000106.html" target="Code" class="method-signature"
|
|
224
|
+
onclick="popupCode('Connection.src/M000106.html');return false;">
|
|
225
225
|
<span class="method-name">close</span><span class="method-args">()</span>
|
|
226
226
|
</a>
|
|
227
227
|
</div>
|
|
228
228
|
|
|
229
229
|
<div class="method-description">
|
|
230
230
|
<p>
|
|
231
|
-
Close the <a href="Connection.html#
|
|
231
|
+
Close the <a href="Connection.html#M000103">connection</a> to <a
|
|
232
232
|
href="../Quickbooks.html">Quickbooks</a>. Automatically ends the <a
|
|
233
|
-
href="Connection.html#
|
|
233
|
+
href="Connection.html#M000104">session</a>, if there is one.
|
|
234
234
|
</p>
|
|
235
235
|
</div>
|
|
236
236
|
</div>
|
|
237
237
|
|
|
238
|
-
<div id="method-
|
|
239
|
-
<a name="
|
|
238
|
+
<div id="method-M000100" class="method-detail">
|
|
239
|
+
<a name="M000100"></a>
|
|
240
240
|
|
|
241
241
|
<div class="method-heading">
|
|
242
|
-
<a href="Connection.src/
|
|
243
|
-
onclick="popupCode('Connection.src/
|
|
242
|
+
<a href="Connection.src/M000100.html" target="Code" class="method-signature"
|
|
243
|
+
onclick="popupCode('Connection.src/M000100.html');return false;">
|
|
244
244
|
<span class="method-name">connected?</span><span class="method-args">()</span>
|
|
245
245
|
</a>
|
|
246
246
|
</div>
|
|
@@ -248,39 +248,39 @@ href="Connection.html#M000063">session</a>, if there is one.
|
|
|
248
248
|
<div class="method-description">
|
|
249
249
|
<p>
|
|
250
250
|
Returns true if there is an open <a
|
|
251
|
-
href="Connection.html#
|
|
251
|
+
href="Connection.html#M000103">connection</a> to <a
|
|
252
252
|
href="../Quickbooks.html">Quickbooks</a>, false if not. Use <a
|
|
253
|
-
href="Connection.html#
|
|
254
|
-
href="Connection.html#
|
|
253
|
+
href="Connection.html#M000101">session?</a> to determine an open <a
|
|
254
|
+
href="Connection.html#M000104">session</a>.
|
|
255
255
|
</p>
|
|
256
256
|
</div>
|
|
257
257
|
</div>
|
|
258
258
|
|
|
259
|
-
<div id="method-
|
|
260
|
-
<a name="
|
|
259
|
+
<div id="method-M000103" class="method-detail">
|
|
260
|
+
<a name="M000103"></a>
|
|
261
261
|
|
|
262
262
|
<div class="method-heading">
|
|
263
|
-
<a href="Connection.src/
|
|
264
|
-
onclick="popupCode('Connection.src/
|
|
263
|
+
<a href="Connection.src/M000103.html" target="Code" class="method-signature"
|
|
264
|
+
onclick="popupCode('Connection.src/M000103.html');return false;">
|
|
265
265
|
<span class="method-name">connection</span><span class="method-args">()</span>
|
|
266
266
|
</a>
|
|
267
267
|
</div>
|
|
268
268
|
|
|
269
269
|
<div class="method-description">
|
|
270
270
|
<p>
|
|
271
|
-
Returns the active <a href="Connection.html#
|
|
271
|
+
Returns the active <a href="Connection.html#M000103">connection</a> to <a
|
|
272
272
|
href="../Quickbooks.html">Quickbooks</a>, or creates a <a
|
|
273
|
-
href="Connection.html#
|
|
273
|
+
href="Connection.html#M000099">new</a> one if none exists.
|
|
274
274
|
</p>
|
|
275
275
|
</div>
|
|
276
276
|
</div>
|
|
277
277
|
|
|
278
|
-
<div id="method-
|
|
279
|
-
<a name="
|
|
278
|
+
<div id="method-M000105" class="method-detail">
|
|
279
|
+
<a name="M000105"></a>
|
|
280
280
|
|
|
281
281
|
<div class="method-heading">
|
|
282
|
-
<a href="Connection.src/
|
|
283
|
-
onclick="popupCode('Connection.src/
|
|
282
|
+
<a href="Connection.src/M000105.html" target="Code" class="method-signature"
|
|
283
|
+
onclick="popupCode('Connection.src/M000105.html');return false;">
|
|
284
284
|
<span class="method-name">end_session</span><span class="method-args">()</span>
|
|
285
285
|
</a>
|
|
286
286
|
</div>
|
|
@@ -288,20 +288,20 @@ href="Connection.html#M000058">new</a> one if none exists.
|
|
|
288
288
|
<div class="method-description">
|
|
289
289
|
<p>
|
|
290
290
|
End the current <a href="../Quickbooks.html">Quickbooks</a> <a
|
|
291
|
-
href="Connection.html#
|
|
292
|
-
href="Connection.html#
|
|
293
|
-
href="Connection.html#
|
|
294
|
-
href="Connection.html#
|
|
291
|
+
href="Connection.html#M000104">session</a>. After ending a <a
|
|
292
|
+
href="Connection.html#M000104">session</a>, a <a
|
|
293
|
+
href="Connection.html#M000099">new</a> <a
|
|
294
|
+
href="Connection.html#M000104">session</a> may be reopened if desired.
|
|
295
295
|
</p>
|
|
296
296
|
</div>
|
|
297
297
|
</div>
|
|
298
298
|
|
|
299
|
-
<div id="method-
|
|
300
|
-
<a name="
|
|
299
|
+
<div id="method-M000102" class="method-detail">
|
|
300
|
+
<a name="M000102"></a>
|
|
301
301
|
|
|
302
302
|
<div class="method-heading">
|
|
303
|
-
<a href="Connection.src/
|
|
304
|
-
onclick="popupCode('Connection.src/
|
|
303
|
+
<a href="Connection.src/M000102.html" target="Code" class="method-signature"
|
|
304
|
+
onclick="popupCode('Connection.src/M000102.html');return false;">
|
|
305
305
|
<span class="method-name">send_xml</span><span class="method-args">(xml)</span>
|
|
306
306
|
</a>
|
|
307
307
|
</div>
|
|
@@ -316,30 +316,30 @@ requests.
|
|
|
316
316
|
</div>
|
|
317
317
|
</div>
|
|
318
318
|
|
|
319
|
-
<div id="method-
|
|
320
|
-
<a name="
|
|
319
|
+
<div id="method-M000104" class="method-detail">
|
|
320
|
+
<a name="M000104"></a>
|
|
321
321
|
|
|
322
322
|
<div class="method-heading">
|
|
323
|
-
<a href="Connection.src/
|
|
324
|
-
onclick="popupCode('Connection.src/
|
|
323
|
+
<a href="Connection.src/M000104.html" target="Code" class="method-signature"
|
|
324
|
+
onclick="popupCode('Connection.src/M000104.html');return false;">
|
|
325
325
|
<span class="method-name">session</span><span class="method-args">()</span>
|
|
326
326
|
</a>
|
|
327
327
|
</div>
|
|
328
328
|
|
|
329
329
|
<div class="method-description">
|
|
330
330
|
<p>
|
|
331
|
-
Begin a <a href="Connection.html#
|
|
331
|
+
Begin a <a href="Connection.html#M000104">session</a> to <a
|
|
332
332
|
href="../Quickbooks.html">Quickbooks</a>.
|
|
333
333
|
</p>
|
|
334
334
|
</div>
|
|
335
335
|
</div>
|
|
336
336
|
|
|
337
|
-
<div id="method-
|
|
338
|
-
<a name="
|
|
337
|
+
<div id="method-M000101" class="method-detail">
|
|
338
|
+
<a name="M000101"></a>
|
|
339
339
|
|
|
340
340
|
<div class="method-heading">
|
|
341
|
-
<a href="Connection.src/
|
|
342
|
-
onclick="popupCode('Connection.src/
|
|
341
|
+
<a href="Connection.src/M000101.html" target="Code" class="method-signature"
|
|
342
|
+
onclick="popupCode('Connection.src/M000101.html');return false;">
|
|
343
343
|
<span class="method-name">session?</span><span class="method-args">()</span>
|
|
344
344
|
</a>
|
|
345
345
|
</div>
|
|
@@ -347,8 +347,8 @@ href="../Quickbooks.html">Quickbooks</a>.
|
|
|
347
347
|
<div class="method-description">
|
|
348
348
|
<p>
|
|
349
349
|
Returns true if there is an active <a
|
|
350
|
-
href="Connection.html#
|
|
351
|
-
href="Connection.html#
|
|
350
|
+
href="Connection.html#M000104">session</a>. Use <a
|
|
351
|
+
href="Connection.html#M000100">connected?</a> to determine whether you are
|
|
352
352
|
connected or not.
|
|
353
353
|
</p>
|
|
354
354
|
</div>
|