quickbooks 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +18 -28
- data/Rakefile +17 -30
- data/doc/classes/{QuickBooks/Models/DataExt.html → Class.html} +151 -140
- data/doc/classes/Class.src/M000003.html +18 -0
- data/doc/classes/Hash.html +164 -0
- data/doc/classes/Hash.src/M000001.html +20 -0
- data/doc/classes/Hash.src/M000002.html +23 -0
- data/doc/classes/{QuickBooks/Models/Transaction.html → Object.html} +207 -201
- data/doc/classes/Object.src/M000004.html +24 -0
- data/doc/classes/Object.src/M000005.html +18 -0
- data/doc/classes/Object.src/M000006.html +19 -0
- data/doc/classes/Object.src/M000007.html +18 -0
- data/doc/classes/{QuickBooks.html → QBHelpers.html} +118 -119
- data/doc/classes/QBHelpers/Ole.html +209 -0
- data/doc/classes/QBHelpers/Ole.src/M000066.html +21 -0
- data/doc/classes/QBHelpers/Ole.src/M000067.html +22 -0
- data/doc/classes/QBHelpers/Ole.src/M000068.html +18 -0
- data/doc/classes/Quickbooks.html +136 -0
- data/doc/classes/Quickbooks/Base.html +618 -0
- data/doc/classes/Quickbooks/Base.src/M000034.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000035.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000036.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000037.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000038.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000039.html +25 -0
- data/doc/classes/Quickbooks/Base.src/M000040.html +27 -0
- data/doc/classes/Quickbooks/Base.src/M000041.html +22 -0
- data/doc/classes/Quickbooks/Base.src/M000042.html +30 -0
- data/doc/classes/Quickbooks/Base.src/M000043.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000044.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000045.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000046.html +19 -0
- data/doc/classes/Quickbooks/Base.src/M000047.html +22 -0
- data/doc/classes/Quickbooks/Base.src/M000048.html +23 -0
- data/doc/classes/Quickbooks/Base.src/M000049.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000050.html +21 -0
- data/doc/classes/Quickbooks/Base.src/M000051.html +25 -0
- data/doc/classes/Quickbooks/Base.src/M000052.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000053.html +36 -0
- data/doc/classes/Quickbooks/Base.src/M000054.html +18 -0
- data/doc/classes/Quickbooks/Base.src/M000055.html +18 -0
- data/doc/classes/Quickbooks/Connection.html +369 -0
- data/doc/classes/{QuickBooks/Models/Customer.src/M000002.html → Quickbooks/Connection.src/M000056.html} +17 -17
- data/doc/classes/Quickbooks/Connection.src/M000057.html +19 -0
- data/doc/classes/Quickbooks/Connection.src/M000058.html +25 -0
- data/doc/classes/{QuickBooks/Connection.src/M000018.html → Quickbooks/Connection.src/M000059.html} +17 -17
- data/doc/classes/Quickbooks/Connection.src/M000060.html +18 -0
- data/doc/classes/Quickbooks/Connection.src/M000061.html +21 -0
- data/doc/classes/Quickbooks/Connection.src/M000062.html +24 -0
- data/doc/classes/{QuickBooks/Connection.src/M000016.html → Quickbooks/Connection.src/M000063.html} +19 -20
- data/doc/classes/{QuickBooks/Connection.src/M000019.html → Quickbooks/Connection.src/M000064.html} +23 -21
- data/doc/classes/Quickbooks/Connection.src/M000065.html +24 -0
- data/doc/classes/{QuickBooks/Models.html → Quickbooks/Customer.html} +112 -120
- data/doc/classes/{QuickBooks/Models/CreditCardInfo.html → Quickbooks/ListItem.html} +176 -148
- data/doc/classes/Quickbooks/ListItem.src/M000033.html +31 -0
- data/doc/classes/Quickbooks/Qbxml.html +138 -0
- data/doc/classes/{QuickBooks/Models/ListItem.html → Quickbooks/Qbxml/Error.html} +167 -173
- data/doc/classes/{QuickBooks/Models/Base.src/M000011.html → Quickbooks/Qbxml/Error.src/M000031.html} +17 -17
- data/doc/classes/Quickbooks/Qbxml/Request.html +182 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000024.html +23 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000025.html +19 -0
- data/doc/classes/Quickbooks/Qbxml/Request.src/M000026.html +57 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.html +193 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/M000027.html +22 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/M000028.html +26 -0
- data/doc/classes/{QuickBooks/Models/Base.src/M000014.html → Quickbooks/Qbxml/RequestSet.src/M000029.html} +17 -16
- data/doc/classes/Quickbooks/Qbxml/RequestSet.src/M000030.html +22 -0
- data/doc/classes/Quickbooks/Qbxml/RequestSetArrayExt.html +105 -0
- data/doc/classes/{QuickBooks/Connection.html → Quickbooks/Qbxml/Response.html} +301 -278
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000015.html +24 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000016.html +19 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000017.html +45 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000018.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000019.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000020.html +18 -0
- data/doc/classes/{QuickBooks/Models/Base.src/M000013.html → Quickbooks/Qbxml/Response.src/M000021.html} +17 -16
- data/doc/classes/{QuickBooks/Models/ListItem.src/M000009.html → Quickbooks/Qbxml/Response.src/M000022.html} +17 -16
- data/doc/classes/Quickbooks/Qbxml/Response.src/M000023.html +52 -0
- data/doc/classes/{QuickBooks/Models/Base.html → Quickbooks/Qbxml/ResponseSet.html} +237 -213
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000008.html +22 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000009.html +26 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000010.html +24 -0
- data/doc/classes/{QuickBooks/Models/Base.src/M000012.html → Quickbooks/Qbxml/ResponseSet.src/M000011.html} +17 -17
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000012.html +27 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000013.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSet.src/M000014.html +18 -0
- data/doc/classes/Quickbooks/Qbxml/ResponseSetArrayExt.html +105 -0
- data/doc/classes/{QuickBooks/Models/Address.html → Quickbooks/Transaction.html} +194 -158
- data/doc/classes/Quickbooks/Transaction.src/M000032.html +26 -0
- data/doc/created.rid +1 -1
- data/doc/files/LICENSE.html +128 -128
- data/doc/files/README.html +185 -173
- data/doc/files/lib/quickbooks/base_rb.html +317 -0
- data/doc/files/lib/quickbooks/connection_rb.html +108 -108
- data/doc/files/lib/quickbooks/models/{base_rb.html → customer_rb.html} +100 -100
- data/doc/files/lib/quickbooks/models/list_item_rb.html +101 -0
- data/doc/files/lib/quickbooks/models/transaction_rb.html +101 -0
- data/doc/files/lib/quickbooks/ole_helper_rb.html +109 -0
- data/doc/files/lib/quickbooks/qbxml/error_rb.html +101 -0
- data/doc/files/lib/quickbooks/{models/models_rb.html → qbxml/request_rb.html} +108 -107
- data/doc/files/lib/quickbooks/qbxml/response_rb.html +109 -0
- data/doc/files/lib/quickbooks/ruby_magic_rb.html +111 -0
- data/doc/files/lib/quickbooks_rb.html +112 -108
- data/doc/fr_class_index.html +44 -35
- data/doc/fr_file_index.html +38 -31
- data/doc/fr_method_index.html +93 -44
- data/doc/index.html +23 -23
- data/doc/rdoc-style.css +207 -207
- data/lib/quickbooks.rb +6 -1
- data/lib/quickbooks/base.rb +282 -0
- data/lib/quickbooks/connection.rb +91 -57
- data/lib/quickbooks/models/customer.rb +71 -0
- data/lib/quickbooks/models/list_item.rb +22 -0
- data/lib/quickbooks/models/transaction.rb +40 -0
- data/lib/quickbooks/ole_helper.rb +47 -0
- data/lib/quickbooks/qbxml/error.rb +20 -0
- data/lib/quickbooks/qbxml/request.rb +120 -0
- data/lib/quickbooks/qbxml/response.rb +176 -0
- data/lib/quickbooks/ruby_magic.rb +67 -0
- metadata +173 -84
- data/doc/classes/QuickBooks/Connection.src/M000015.html +0 -25
- data/doc/classes/QuickBooks/Connection.src/M000017.html +0 -20
- data/doc/classes/QuickBooks/Models/Base.src/M000010.html +0 -19
- data/doc/classes/QuickBooks/Models/Customer.html +0 -424
- data/doc/classes/QuickBooks/Models/Customer.src/M000001.html +0 -34
- data/doc/classes/QuickBooks/Models/Customer.src/M000003.html +0 -18
- data/doc/classes/QuickBooks/Models/ListItem.src/M000008.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000004.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000005.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000006.html +0 -17
- data/doc/classes/QuickBooks/Models/Transaction.src/M000007.html +0 -17
- data/lib/quickbooks/models/base.rb +0 -72
- data/lib/quickbooks/models/models.rb +0 -43
- data/test/quickbooks/quickbooks_test.rb +0 -34
- data/test/test_helper.rb +0 -4
@@ -1,34 +0,0 @@
|
|
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::Models::Customer)</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/models/models.rb, line 13</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">attributes</span>={})
|
15
|
-
<span class="ruby-ivar">@new_record</span> = <span class="ruby-keyword kw">true</span>
|
16
|
-
|
17
|
-
<span class="ruby-ivar">@parent_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
18
|
-
<span class="ruby-ivar">@bill_address</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">Address</span>
|
19
|
-
<span class="ruby-ivar">@terms_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
20
|
-
<span class="ruby-ivar">@sales_rep_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
21
|
-
<span class="ruby-ivar">@sales_tax_code_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
22
|
-
<span class="ruby-ivar">@item_sales_tax_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
23
|
-
<span class="ruby-ivar">@preferred_payment_method_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
24
|
-
<span class="ruby-ivar">@job_type_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
25
|
-
<span class="ruby-ivar">@price_live_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
26
|
-
<span class="ruby-ivar">@data_ext_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
27
|
-
|
28
|
-
<span class="ruby-ivar">@ship_address</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">Address</span>
|
29
|
-
<span class="ruby-ivar">@customer_type_ref</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">ListItem</span>
|
30
|
-
|
31
|
-
<span class="ruby-ivar">@credit_card_info</span> = <span class="ruby-identifier">new</span> <span class="ruby-constant">CreditCardInfo</span>
|
32
|
-
<span class="ruby-keyword kw">end</span></pre>
|
33
|
-
</body>
|
34
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>find (QuickBooks::Models::Customer)</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/models/models.rb, line 37</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">parameters</span>)
|
15
|
-
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
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>delete (QuickBooks::Models::ListItem)</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/models/base.rb, line 51</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">id</span>)
|
15
|
-
<span class="ruby-keyword kw">end</span></pre>
|
16
|
-
</body>
|
17
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
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>delete (QuickBooks::Models::Transaction)</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/models/base.rb, line 34</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>
|
15
|
-
<span class="ruby-keyword kw">end</span></pre>
|
16
|
-
</body>
|
17
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
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>delete (QuickBooks::Models::Transaction)</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/models/base.rb, line 37</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
|
15
|
-
<span class="ruby-keyword kw">end</span></pre>
|
16
|
-
</body>
|
17
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
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>void (QuickBooks::Models::Transaction)</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/models/base.rb, line 40</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">void</span>
|
15
|
-
<span class="ruby-keyword kw">end</span></pre>
|
16
|
-
</body>
|
17
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
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>void (QuickBooks::Models::Transaction)</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/models/base.rb, line 43</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">void</span>
|
15
|
-
<span class="ruby-keyword kw">end</span></pre>
|
16
|
-
</body>
|
17
|
-
</html>
|
@@ -1,72 +0,0 @@
|
|
1
|
-
module QuickBooks
|
2
|
-
module Models
|
3
|
-
class Base
|
4
|
-
|
5
|
-
# Establishes a connection to the QuickBooks RDS Server for all Model Classes
|
6
|
-
def self.establish_connection(user, password, application_name, host="localhost", port=3790, mode='multiUser')
|
7
|
-
@@connection = Connection.new(user, password, application_name, host, port, mode)
|
8
|
-
@@connection.open
|
9
|
-
end
|
10
|
-
|
11
|
-
# Returns the current Connection
|
12
|
-
def self.connection
|
13
|
-
@@connection
|
14
|
-
end
|
15
|
-
|
16
|
-
# Sets the current Connection
|
17
|
-
# connection = QuickBooks::Connection.new('user', 'pass', 'My Test App')
|
18
|
-
# QuickBooks::Models::Base.connection = connection
|
19
|
-
def self.connection=(connection)
|
20
|
-
@@connection = connection
|
21
|
-
end
|
22
|
-
|
23
|
-
def add_xml
|
24
|
-
end
|
25
|
-
|
26
|
-
def mod_xml
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
class Transaction
|
32
|
-
attr_accessor :id, :ref_number
|
33
|
-
|
34
|
-
def self.delete
|
35
|
-
end
|
36
|
-
|
37
|
-
def delete
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.void
|
41
|
-
end
|
42
|
-
|
43
|
-
def void
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
class ListItem < Base
|
49
|
-
attr_accessor :id, :full_name
|
50
|
-
|
51
|
-
def self.delete(id)
|
52
|
-
end
|
53
|
-
|
54
|
-
def delete
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
class DataExt < Base
|
59
|
-
attr_accessor :owner_id, :data_ext_name, :data_ext_type, :data_ext_value
|
60
|
-
end
|
61
|
-
|
62
|
-
class CreditCardInfo
|
63
|
-
attr_accessor :credit_card_number, :expiration_month, :expiration_year, :name_on_card, :credit_card_address, :credit_card_postal_code
|
64
|
-
end
|
65
|
-
|
66
|
-
class Address
|
67
|
-
attr_accessor :addr1, :addr2, :addr3, :addr4, :city, :state, :postal_code, :country
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
end
|
72
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'quickbooks/models/base'
|
2
|
-
module QuickBooks
|
3
|
-
module Models
|
4
|
-
class Customer < ListItem
|
5
|
-
attr_accessor(:time_created, :time_modified, :edit_sequence, :name, :is_active, :parent_ref, :sublevel,
|
6
|
-
:company_name, :salutation, :first_name, :middle_name, :last_name, :suffix, :bill_address, :ship_address,
|
7
|
-
:print_as, :phone, :mobile, :pager, :alt_phone, :fax, :email, :contact, :alt_contact, :customer_type_ref,
|
8
|
-
:terms_ref, :sales_rep_ref, :open_balance, :open_balance_date, :balance, :total_balance, :sales_tax_code_ref,
|
9
|
-
:item_sales_tax_ref, :resale_nmber, :account_number, :credit_limit, :preferred_payment_method_ref,
|
10
|
-
:credit_card_info, :job_status, :job_start_date, :job_projected_end_date, :job_end_date, :job_desc,
|
11
|
-
:job_type_ref, :notes, :is_statement_with_parent, :delivery_method, :price_level_ref, :data_ext_ref)
|
12
|
-
|
13
|
-
def initialize(attributes={})
|
14
|
-
@new_record = true
|
15
|
-
|
16
|
-
@parent_ref = new ListItem
|
17
|
-
@bill_address = new Address
|
18
|
-
@terms_ref = new ListItem
|
19
|
-
@sales_rep_ref = new ListItem
|
20
|
-
@sales_tax_code_ref = new ListItem
|
21
|
-
@item_sales_tax_ref = new ListItem
|
22
|
-
@preferred_payment_method_ref = new ListItem
|
23
|
-
@job_type_ref = new ListItem
|
24
|
-
@price_live_ref = new ListItem
|
25
|
-
@data_ext_ref = new ListItem
|
26
|
-
|
27
|
-
@ship_address = new Address
|
28
|
-
@customer_type_ref = new ListItem
|
29
|
-
|
30
|
-
@credit_card_info = new CreditCardInfo
|
31
|
-
end
|
32
|
-
|
33
|
-
def new_record?
|
34
|
-
@new_record
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.find(parameters)
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
-
|
3
|
-
class QuickBooksTest < Test::Unit::TestCase
|
4
|
-
def setup
|
5
|
-
end
|
6
|
-
|
7
|
-
# This test assumes you have RDS configured with the following name and password
|
8
|
-
# and that you are using the sample company that comes with QuickBooks.
|
9
|
-
def test_connection
|
10
|
-
connection = QuickBooks::Connection.new('admin', 'pass123', 'My Test App')
|
11
|
-
connection.open
|
12
|
-
xml = <<EOL
|
13
|
-
<?xml version="1.0"?>
|
14
|
-
<?qbxml version="3.0"?>
|
15
|
-
<QBXML>
|
16
|
-
<QBXMLMsgsRq onError="continueOnError">
|
17
|
-
<InvoiceQueryRq requestID="1">
|
18
|
-
<RefNumber>81</RefNumber>
|
19
|
-
<IncludeLineItems>true</IncludeLineItems>
|
20
|
-
</InvoiceQueryRq>
|
21
|
-
</QBXMLMsgsRq>
|
22
|
-
</QBXML>
|
23
|
-
EOL
|
24
|
-
res = connection.send(xml)
|
25
|
-
assert_not_nil(res)
|
26
|
-
connection.close
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_model_connection
|
30
|
-
QuickBooks::Models::Base.establish_connection('admin', 'pass123', 'My Test App')
|
31
|
-
assert_not_nil(QuickBooks::Models::Base.connection)
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
data/test/test_helper.rb
DELETED