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
|
@@ -0,0 +1,24 @@
|
|
|
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>inherited (Quickbooks::Model)</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/model.rb, line 8</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherited</span>(<span class="ruby-identifier">klass</span>)
|
|
15
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">valid_filters</span>
|
|
16
|
+
<span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">valid_filters</span> <span class="ruby-operator">+</span> (<span class="ruby-ivar">@valid_filters</span> <span class="ruby-operator">||=</span> [])
|
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
|
18
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">filter_aliases</span>
|
|
19
|
+
<span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">filter_aliases</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-ivar">@filter_aliases</span> <span class="ruby-operator">||=</span> {})
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value str">'@object_properties'</span>, {})
|
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
23
|
+
</body>
|
|
24
|
+
</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>valid_filters= (Quickbooks::Model)</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/model.rb, line 18</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_filters=</span><span class="ruby-identifier">valid_filters=</span><span class="ruby-identifier">valid_filters=</span>(<span class="ruby-identifier">v</span>)
|
|
15
|
+
<span class="ruby-ivar">@valid_filters</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">stringify_values!</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
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>valid_filters (Quickbooks::Model)</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/model.rb, line 21</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_filters</span>
|
|
15
|
+
<span class="ruby-ivar">@valid_filters</span> <span class="ruby-operator">||=</span> []
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
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>filter_aliases= (Quickbooks::Model)</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/model.rb, line 24</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filter_aliases=</span>(<span class="ruby-identifier">v</span>)
|
|
15
|
+
<span class="ruby-ivar">@filter_aliases</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">stringify_keys!</span>.<span class="ruby-identifier">stringify_values!</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
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>filter_aliases (Quickbooks::Model)</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/model.rb, line 27</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filter_aliases</span>
|
|
15
|
+
<span class="ruby-ivar">@filter_aliases</span> <span class="ruby-operator">||=</span> {}
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
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>camelized_valid_filters (Quickbooks::Model)</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/model.rb, line 30</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">camelized_valid_filters</span>
|
|
15
|
+
<span class="ruby-identifier">valid_filters</span>.<span class="ruby-identifier">camelize_values</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">CAMELIZE_EXCEPTIONS</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
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>read_write (Quickbooks::Model)</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/model.rb, line 38</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_write</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">blank?</span>
|
|
16
|
+
<span class="ruby-ivar">@read_write</span> <span class="ruby-operator">||</span> (<span class="ruby-ivar">@read_write</span> = [])
|
|
17
|
+
<span class="ruby-keyword kw">else</span>
|
|
18
|
+
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span>
|
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
|
|
20
|
+
<span class="ruby-identifier">read_write</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prop</span>
|
|
21
|
+
<span class="ruby-identifier">attr_accessor</span> <span class="ruby-identifier">prop</span>
|
|
22
|
+
<span class="ruby-keyword kw">else</span>
|
|
23
|
+
<span class="ruby-ivar">@object_properties</span>[<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">class_leaf_name</span>.<span class="ruby-identifier">underscore</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">prop</span>
|
|
24
|
+
<span class="ruby-identifier">read_write</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">class_leaf_name</span>.<span class="ruby-identifier">underscore</span>.<span class="ruby-identifier">to_sym</span>
|
|
25
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">"def #{prop.class_leaf_name.underscore}=(v); @#{prop.class_leaf_name.underscore} = #{prop.name}.new(v); end
|
|
26
|
+
def #{prop.class_leaf_name.underscore}; @#{prop.class_leaf_name.underscore}; end"</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
|
30
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
31
|
+
</body>
|
|
32
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
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>read_only (Quickbooks::Model)</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/model.rb, line 57</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_only</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">blank?</span>
|
|
16
|
+
<span class="ruby-ivar">@read_only</span> <span class="ruby-operator">||</span> (<span class="ruby-ivar">@read_only</span> = [])
|
|
17
|
+
<span class="ruby-keyword kw">else</span>
|
|
18
|
+
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span>
|
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
|
|
20
|
+
<span class="ruby-identifier">read_only</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prop</span>
|
|
21
|
+
<span class="ruby-identifier">attr_accessor</span> <span class="ruby-identifier">prop</span>
|
|
22
|
+
<span class="ruby-keyword kw">else</span>
|
|
23
|
+
<span class="ruby-ivar">@object_properties</span>[<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">class_leaf_name</span>.<span class="ruby-identifier">underscore</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">prop</span>
|
|
24
|
+
<span class="ruby-identifier">read_only</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">class_leaf_name</span>.<span class="ruby-identifier">underscore</span>.<span class="ruby-identifier">to_sym</span>
|
|
25
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">"def #{prop.class_leaf_name.underscore}=(v); @#{prop.class_leaf_name.underscore} = #{prop.name}.new(v); end
|
|
26
|
+
def #{prop.class_leaf_name.underscore}; @#{prop.class_leaf_name.underscore}; end"</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
|
30
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
31
|
+
</body>
|
|
32
|
+
</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>properties (Quickbooks::Model)</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/model.rb, line 75</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties</span>
|
|
15
|
+
<span class="ruby-identifier">read_only</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">read_write</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>new (Quickbooks::
|
|
8
|
+
<title>new (Quickbooks::Model)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
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/
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/model.rb, line 83</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>={})
|
|
15
15
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">args</span>
|
|
16
|
-
<span class="ruby-ivar">@new_record</span> = <span class="ruby-keyword kw">true</span>
|
|
17
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
18
17
|
</body>
|
|
19
18
|
</html>
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>attributes (Quickbooks::
|
|
8
|
+
<title>attributes (Quickbooks::Model)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
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/
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attributes</span>
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/model.rb, line 88</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attributes</span>(<span class="ruby-identifier">include_read_only</span>=<span class="ruby-keyword kw">false</span>)
|
|
15
15
|
<span class="ruby-identifier">attrs</span> = {}
|
|
16
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">
|
|
16
|
+
(<span class="ruby-identifier">include_read_only</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_only</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
|
|
17
17
|
<span class="ruby-identifier">attrs</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>)
|
|
18
18
|
<span class="ruby-keyword kw">end</span>
|
|
19
19
|
<span class="ruby-identifier">attrs</span>
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>attributes= (Quickbooks::
|
|
8
|
+
<title>attributes= (Quickbooks::Model)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
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/
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/model.rb, line 96</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attributes=</span>(<span class="ruby-identifier">attrs</span>)
|
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"attributes can only be set to a hash of attributes"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
|
16
16
|
<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>
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>original_values (Quickbooks::
|
|
8
|
+
<title>original_values (Quickbooks::Model)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
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/
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/model.rb, line 106</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">original_values</span>
|
|
15
15
|
<span class="ruby-ivar">@original_values</span> <span class="ruby-operator">||</span> (<span class="ruby-ivar">@original_values</span> = {})
|
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>dirty? (Quickbooks::
|
|
8
|
+
<title>dirty? (Quickbooks::Model)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
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/
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/model.rb, line 111</span>
|
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirty?</span>
|
|
15
15
|
<span class="ruby-comment cmt"># Concept: For each column that the current model includes, has the value been changed?</span>
|
|
16
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
|
|
17
17
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">!=</span> <span class="ruby-identifier">original_values</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>]
|
|
18
18
|
<span class="ruby-keyword kw">end</span>
|
|
19
19
|
<span class="ruby-keyword kw">end</span></pre>
|
|
@@ -5,17 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>dirty_attributes (Quickbooks::
|
|
8
|
+
<title>dirty_attributes (Quickbooks::Model)</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
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/
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirty_attributes</span>
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/quickbooks/model.rb, line 120</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirty_attributes</span>(<span class="ruby-identifier">compare</span>={})
|
|
15
|
+
<span class="ruby-identifier">compare</span> = <span class="ruby-identifier">original_values</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">compare</span>.<span class="ruby-identifier">blank?</span>
|
|
15
16
|
<span class="ruby-identifier">pairs</span> = {}
|
|
16
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">
|
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
|
|
17
18
|
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>)
|
|
18
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">
|
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">compare</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>]
|
|
19
20
|
<span class="ruby-identifier">pairs</span>[<span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">value</span>
|
|
20
21
|
<span class="ruby-keyword kw">end</span>
|
|
21
22
|
<span class="ruby-keyword kw">end</span>
|
|
@@ -0,0 +1,28 @@
|
|
|
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_dirty_hash (Quickbooks::Model)</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/model.rb, line 132</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_dirty_hash</span>
|
|
15
|
+
<span class="ruby-identifier">hsh</span> = {}
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dirty_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>
|
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Model</span>)
|
|
18
|
+
<span class="ruby-identifier">h</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_dirty_hash</span>
|
|
19
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">h</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">blank?</span>
|
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
|
21
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
|
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
|
24
|
+
<span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">order!</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span>.<span class="ruby-identifier">stringify_values</span>)
|
|
25
|
+
<span class="ruby-identifier">hsh</span>
|
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
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_hash (Quickbooks::Model)</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/model.rb, line 146</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hash</span>(<span class="ruby-identifier">include_read_only</span>=<span class="ruby-keyword kw">false</span>)
|
|
15
|
+
<span class="ruby-identifier">hsh</span> = {}
|
|
16
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">attributes</span>(<span class="ruby-identifier">include_read_only</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>
|
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Quickbooks</span><span class="ruby-operator">::</span><span class="ruby-constant">Model</span>)
|
|
18
|
+
<span class="ruby-identifier">h</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_hash</span>(<span class="ruby-identifier">include_read_only</span>)
|
|
19
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">h</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">blank?</span>
|
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
|
21
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
|
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
|
24
|
+
<span class="ruby-identifier">hsh</span>.<span class="ruby-identifier">order!</span>((<span class="ruby-identifier">include_read_only</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_only</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span>).<span class="ruby-identifier">stringify_values</span>)
|
|
25
|
+
<span class="ruby-identifier">hsh</span>
|
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
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::Model)</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/model.rb, line 160</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-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">read_write</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
|
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">!=</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>)
|
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|
|
@@ -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>=== (Quickbooks::Model)</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/model.rb, line 167</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">===</span>(<span class="ruby-identifier">other</span>)
|
|
15
|
+
<span class="ruby-comment cmt"># other could be a hash</span>
|
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
|
17
|
+
<span class="ruby-keyword kw">self</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">other</span>)
|
|
18
|
+
<span class="ruby-keyword kw">else</span>
|
|
19
|
+
<span class="ruby-keyword kw">self</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</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::ParentRef</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::ParentRef</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/all_refs_rb.html">
|
|
59
|
+
lib/quickbooks/models/common/all_refs.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="Ref.html">
|
|
69
|
+
Ref
|
|
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>
|