quickeebooks 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Gemfile.lock +52 -0
- data/MIT-LICENSE +9 -0
- data/README.md +306 -0
- data/Rakefile +17 -0
- data/lib/quickeebooks.rb +89 -0
- data/lib/quickeebooks/online/model/account.rb +47 -0
- data/lib/quickeebooks/online/model/account_detail_type.rb +233 -0
- data/lib/quickeebooks/online/model/account_reference.rb +17 -0
- data/lib/quickeebooks/online/model/address.rb +42 -0
- data/lib/quickeebooks/online/model/customer.rb +66 -0
- data/lib/quickeebooks/online/model/customer_custom_field.rb +51 -0
- data/lib/quickeebooks/online/model/email.rb +24 -0
- data/lib/quickeebooks/online/model/intuit_type.rb +25 -0
- data/lib/quickeebooks/online/model/invoice.rb +50 -0
- data/lib/quickeebooks/online/model/invoice_header.rb +29 -0
- data/lib/quickeebooks/online/model/invoice_line_item.rb +22 -0
- data/lib/quickeebooks/online/model/item.rb +47 -0
- data/lib/quickeebooks/online/model/meta_data.rb +27 -0
- data/lib/quickeebooks/online/model/note.rb +11 -0
- data/lib/quickeebooks/online/model/open_balance.rb +11 -0
- data/lib/quickeebooks/online/model/phone.rb +12 -0
- data/lib/quickeebooks/online/model/price.rb +18 -0
- data/lib/quickeebooks/online/model/purchase_cost.rb +11 -0
- data/lib/quickeebooks/online/model/unit_price.rb +11 -0
- data/lib/quickeebooks/online/model/web_site.rb +16 -0
- data/lib/quickeebooks/online/service/account.rb +52 -0
- data/lib/quickeebooks/online/service/customer.rb +57 -0
- data/lib/quickeebooks/online/service/entitlement.rb +15 -0
- data/lib/quickeebooks/online/service/filter.rb +96 -0
- data/lib/quickeebooks/online/service/invoice.rb +50 -0
- data/lib/quickeebooks/online/service/item.rb +52 -0
- data/lib/quickeebooks/online/service/pagination.rb +19 -0
- data/lib/quickeebooks/online/service/service_base.rb +202 -0
- data/lib/quickeebooks/online/service/sort.rb +19 -0
- data/lib/quickeebooks/version.rb +5 -0
- data/lib/quickeebooks/windows/model/account.rb +67 -0
- data/lib/quickeebooks/windows/model/account_detail_type.rb +233 -0
- data/lib/quickeebooks/windows/model/account_reference.rb +19 -0
- data/lib/quickeebooks/windows/model/address.rb +36 -0
- data/lib/quickeebooks/windows/model/custom_field.rb +13 -0
- data/lib/quickeebooks/windows/model/customer.rb +109 -0
- data/lib/quickeebooks/windows/model/email.rb +44 -0
- data/lib/quickeebooks/windows/model/intuit_type.rb +17 -0
- data/lib/quickeebooks/windows/model/invoice.rb +44 -0
- data/lib/quickeebooks/windows/model/invoice_header.rb +65 -0
- data/lib/quickeebooks/windows/model/invoice_line_item.rb +38 -0
- data/lib/quickeebooks/windows/model/item.rb +84 -0
- data/lib/quickeebooks/windows/model/meta_data.rb +31 -0
- data/lib/quickeebooks/windows/model/note.rb +19 -0
- data/lib/quickeebooks/windows/model/open_balance.rb +11 -0
- data/lib/quickeebooks/windows/model/phone.rb +20 -0
- data/lib/quickeebooks/windows/model/price.rb +18 -0
- data/lib/quickeebooks/windows/model/purchase_cost.rb +12 -0
- data/lib/quickeebooks/windows/model/tax_line.rb +18 -0
- data/lib/quickeebooks/windows/model/unit_price.rb +12 -0
- data/lib/quickeebooks/windows/model/vendor_reference.rb +13 -0
- data/lib/quickeebooks/windows/model/web_site.rb +19 -0
- data/lib/quickeebooks/windows/service/account.rb +16 -0
- data/lib/quickeebooks/windows/service/customer.rb +16 -0
- data/lib/quickeebooks/windows/service/invoice.rb +27 -0
- data/lib/quickeebooks/windows/service/item.rb +18 -0
- data/lib/quickeebooks/windows/service/service_base.rb +176 -0
- data/quickeebooks.gemspec +27 -0
- data/spec/mocks/oauth_consumer_mock.rb +2 -0
- data/spec/quickeebooks/online/account_spec.rb +41 -0
- data/spec/quickeebooks/online/customer_spec.rb +46 -0
- data/spec/quickeebooks/online/invoice_spec.rb +15 -0
- data/spec/quickeebooks/online/services/account_spec.rb +84 -0
- data/spec/quickeebooks/online/services/customer_spec.rb +107 -0
- data/spec/quickeebooks/online/services/filter_spec.rb +43 -0
- data/spec/quickeebooks/online/services/service_base_spec.rb +30 -0
- data/spec/quickeebooks/online/services/sort_spec.rb +17 -0
- data/spec/quickeebooks/windows/customer_spec.rb +49 -0
- data/spec/quickeebooks_spec.rb +11 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/xml/online/account.xml +13 -0
- data/spec/xml/online/accounts.xml +108 -0
- data/spec/xml/online/customer.xml +63 -0
- data/spec/xml/online/customer2.xml +63 -0
- data/spec/xml/online/customers.xml +125 -0
- data/spec/xml/online/invoice.xml +33 -0
- data/spec/xml/online/user.xml +11 -0
- data/spec/xml/windows/customer.xml +56 -0
- data/spec/xml/windows/customers.xml +137 -0
- data/spec/xml/windows/http_401.xml +8 -0
- metadata +229 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
require "quickeebooks"
|
2
|
+
|
3
|
+
module Quickeebooks
|
4
|
+
module Windows
|
5
|
+
module Model
|
6
|
+
class Email < Quickeebooks::Online::Model::IntuitType
|
7
|
+
include ActiveModel::Validations
|
8
|
+
xml_accessor :address, :from => 'Address'
|
9
|
+
xml_accessor :id, :from => 'Id'
|
10
|
+
xml_accessor :default, :from => 'Default'
|
11
|
+
xml_accessor :tag, :from => 'Tag'
|
12
|
+
|
13
|
+
validates_length_of :address, :minimum => 1
|
14
|
+
validate :ensure_valid_format
|
15
|
+
|
16
|
+
def to_xml(options = {})
|
17
|
+
return "" if address.to_s.empty?
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize(email_address = nil)
|
22
|
+
unless email_address.nil?
|
23
|
+
self.address = email_address
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def default?
|
28
|
+
default == "true"
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def ensure_valid_format
|
34
|
+
# address must contain both @ and .
|
35
|
+
if !address.include?('@') || !address.include?('.')
|
36
|
+
errors.add(:address, "Address must contain both @ and .")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Quickeebooks
|
2
|
+
module Windows
|
3
|
+
module Model
|
4
|
+
class IntuitType
|
5
|
+
include ROXML
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def log(msg)
|
10
|
+
Quickeebooks.logger.info(msg)
|
11
|
+
Quickeebooks.logger.flush if Quickeebooks.logger.respond_to?(:flush)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'quickeebooks/windows/model/invoice_header'
|
2
|
+
require 'quickeebooks/windows/model/invoice_line_item'
|
3
|
+
require 'quickeebooks/windows/model/address'
|
4
|
+
require 'quickeebooks/windows/model/meta_data'
|
5
|
+
require 'quickeebooks/windows/model/tax_line'
|
6
|
+
|
7
|
+
module Quickeebooks
|
8
|
+
module Windows
|
9
|
+
module Model
|
10
|
+
class Invoice < Quickeebooks::Windows::Model::IntuitType
|
11
|
+
include ActiveModel::Validations
|
12
|
+
xml_convention :camelcase
|
13
|
+
xml_accessor :id, :from => 'Id', :as => Integer
|
14
|
+
xml_accessor :sync_token, :from => 'SyncToken', :as => Integer
|
15
|
+
xml_accessor :meta_data, :from => 'MetaData', :as => Quickeebooks::Windows::Model::MetaData
|
16
|
+
xml_accessor :external_key, :from => 'ExternalKey'
|
17
|
+
xml_accessor :synchronized, :from => 'Synchronized'
|
18
|
+
xml_accessor :custom_fields, :from => 'CustomField', :as => [Quickeebooks::Windows::Model::CustomField]
|
19
|
+
xml_accessor :draft
|
20
|
+
xml_accessor :object_state, :from => 'ObjectState'
|
21
|
+
xml_accessor :header, :from => 'Header', :as => Quickeebooks::Windows::Model::InvoiceHeader
|
22
|
+
xml_accessor :line_items, :from => 'Line', :as => [Quickeebooks::Windows::Model::InvoiceLineItem]
|
23
|
+
xml_accessor :tax_line, :from => 'TaxLine', :as => Quickeebooks::Windows::Model::TaxLine
|
24
|
+
|
25
|
+
validates_length_of :line_items, :minimum => 1
|
26
|
+
|
27
|
+
def initialize
|
28
|
+
ensure_line_items_initialization
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def after_parse
|
34
|
+
end
|
35
|
+
|
36
|
+
def ensure_line_items_initialization
|
37
|
+
self.line_items ||= []
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'time'
|
2
|
+
|
3
|
+
module Quickeebooks
|
4
|
+
module Windows
|
5
|
+
module Model
|
6
|
+
class InvoiceHeader < Quickeebooks::Windows::Model::IntuitType
|
7
|
+
|
8
|
+
IS_TAXABLE = "IS_TAXABLE"
|
9
|
+
|
10
|
+
xml_name 'Header'
|
11
|
+
xml_accessor :doc_number, :from => 'DocNumber'
|
12
|
+
xml_accessor :txn_date, :from => 'TxnDate', :as => Time
|
13
|
+
xml_accessor :currency, :from => 'Currency'
|
14
|
+
xml_accessor :msg, :from => 'Msg'
|
15
|
+
xml_accessor :note, :from => 'Note'
|
16
|
+
xml_accessor :status, :from => 'Status'
|
17
|
+
xml_accessor :customer_id, :from => 'CustomerId'
|
18
|
+
xml_accessor :customer_name, :from => 'CustomerName'
|
19
|
+
xml_accessor :job_id, :from => 'JobId'
|
20
|
+
xml_accessor :job_name, :from => 'JobName'
|
21
|
+
xml_accessor :remit_to_id, :from => 'RemitToId'
|
22
|
+
xml_accessor :remit_to_name, :from => 'RemitToName'
|
23
|
+
xml_accessor :class_id, :from => 'ClassId'
|
24
|
+
xml_accessor :class_name, :from => 'ClassName'
|
25
|
+
xml_accessor :sales_rep_id, :from => 'SalesRepId'
|
26
|
+
xml_accessor :sales_rep_name, :from => 'SalesRepName'
|
27
|
+
xml_accessor :sales_rep_id, :from => 'SalesRepId'
|
28
|
+
xml_accessor :sales_rep_name, :from => 'SalesRepName'
|
29
|
+
xml_accessor :sales_tax_code_id, :from => 'SalesTaxCodeId'
|
30
|
+
xml_accessor :sales_tax_code_name, :from => 'SalesTaxCodeName'
|
31
|
+
xml_accessor :po_number, :from => 'PONumber'
|
32
|
+
xml_accessor :ship_date, :from => 'ShipDate', :as => Time
|
33
|
+
xml_accessor :sub_total_amount, :from => 'SubTotalAmt', :as => Float
|
34
|
+
xml_accessor :tax_id, :from => 'TaxId'
|
35
|
+
xml_accessor :tax_name, :from => 'TaxName'
|
36
|
+
xml_accessor :tax_group_id, :from => 'TaxGroupId'
|
37
|
+
xml_accessor :tax_group_name, :from => 'TaxGroupName'
|
38
|
+
xml_accessor :tax_rate, :from => 'TaxRate', :as => Float
|
39
|
+
xml_accessor :tax_amount, :from => 'TaxAmt', :as => Float
|
40
|
+
xml_accessor :total_amount, :from => 'TotalAmt', :as => Float
|
41
|
+
xml_accessor :to_be_printed, :from => 'ToBePrinted'
|
42
|
+
xml_accessor :to_be_emailed, :from => 'ToBeEmailed'
|
43
|
+
xml_accessor :custom, :from => 'Custom'
|
44
|
+
xml_accessor :ar_account_id, :from => 'ARAccountId'
|
45
|
+
xml_accessor :ar_account_name, :from => 'ARAccountName'
|
46
|
+
xml_accessor :sales_term_id, :from => 'SalesTermId'
|
47
|
+
xml_accessor :sales_term_name, :from => 'SalesTermName'
|
48
|
+
xml_accessor :due_date, :from => 'DueDate', :as => Time
|
49
|
+
xml_accessor :billing_address, :from => 'BillAddr', :as => Quickeebooks::Windows::Model::Address
|
50
|
+
xml_accessor :shipping_address, :from => 'ShipAddr', :as => Quickeebooks::Windows::Model::Address
|
51
|
+
xml_accessor :bill_email, :from => 'BillEmail'
|
52
|
+
xml_accessor :ship_method_id, :from => 'ShipMethodId'
|
53
|
+
xml_accessor :ship_method_name, :from => 'ShipMethodName'
|
54
|
+
xml_accessor :balance, :from => 'Balance'
|
55
|
+
xml_accessor :discount_amount, :from => 'DiscountAmt', :as => Float
|
56
|
+
xml_accessor :discount_rate, :from => 'DiscountRate', :as => Float
|
57
|
+
xml_accessor :discount_account_id, :from => 'DiscountAccountId'
|
58
|
+
xml_accessor :discount_account_name, :from => 'DiscountAccountName'
|
59
|
+
xml_accessor :discount_taxable, :from => 'DiscountTaxable'
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Quickeebooks
|
2
|
+
module Windows
|
3
|
+
module Model
|
4
|
+
class InvoiceLineItem < Quickeebooks::Windows::Model::IntuitType
|
5
|
+
xml_name 'Line'
|
6
|
+
xml_accessor :id, :from => 'Id'
|
7
|
+
xml_accessor :desc, :from => 'Desc'
|
8
|
+
xml_accessor :group_member, :from => 'GroupMember'
|
9
|
+
xml_accessor :custom_fields, :from => 'CustomField', :as => [Quickeebooks::Windows::Model::CustomField]
|
10
|
+
xml_accessor :amount, :from => 'Amount', :as => Float
|
11
|
+
xml_accessor :class_id, :from => 'ClassId'
|
12
|
+
xml_accessor :class_name, :from => 'ClassName'
|
13
|
+
xml_accessor :taxable, :from => 'Taxable'
|
14
|
+
xml_accessor :item_id, :from => 'ItemId'
|
15
|
+
xml_accessor :item_name, :from => 'ItemName'
|
16
|
+
xml_accessor :item_type, :from => 'ItemType'
|
17
|
+
xml_accessor :unit_price, :from => 'UnitPrice', :as => Float
|
18
|
+
xml_accessor :rate_percent, :from => 'RatePercent', :as => Float
|
19
|
+
xml_accessor :price_level_id, :from => 'PriceLevelId'
|
20
|
+
xml_accessor :price_level_name, :from => 'PriceLevelName'
|
21
|
+
xml_accessor :uom_id, :from => 'UOMId'
|
22
|
+
xml_accessor :uom_abbrev, :from => 'UOMAbbrv'
|
23
|
+
xml_accessor :override_item_account_id, :from => 'OverrideItemAccountId'
|
24
|
+
xml_accessor :override_item_account_name, :from => 'OverrideItemAccountName'
|
25
|
+
xml_accessor :discount_id, :from => 'DiscountId'
|
26
|
+
xml_accessor :discount_name, :from => 'DiscountName'
|
27
|
+
xml_accessor :quantity, :from => 'Qty', :as => Float
|
28
|
+
xml_accessor :sales_tax_code_id, :from => 'SalesTaxCodeId'
|
29
|
+
xml_accessor :sales_tax_code_name, :from => 'SalesTaxCodeName'
|
30
|
+
xml_accessor :service_date, :from => 'ServiceDate', :as => Time
|
31
|
+
xml_accessor :custom1, :from => 'Custom1'
|
32
|
+
xml_accessor :custom2, :from => 'Custom2'
|
33
|
+
xml_accessor :txn_id, :from => 'TxnId'
|
34
|
+
xml_accessor :txn_line_id, :from => 'TxnLineId'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'time'
|
2
|
+
require 'quickeebooks/windows/model/price'
|
3
|
+
require 'quickeebooks/windows/model/meta_data'
|
4
|
+
require 'quickeebooks/windows/model/account_reference'
|
5
|
+
require 'quickeebooks/windows/model/vendor_reference'
|
6
|
+
|
7
|
+
module Quickeebooks
|
8
|
+
module Windows
|
9
|
+
module Model
|
10
|
+
class Item < Quickeebooks::Windows::Model::IntuitType
|
11
|
+
include ActiveModel::Validations
|
12
|
+
|
13
|
+
XML_COLLECTION_NODE = 'Items'
|
14
|
+
XML_NODE = 'Item'
|
15
|
+
|
16
|
+
xml_name 'Item'
|
17
|
+
xml_accessor :id, :from => 'Id'
|
18
|
+
xml_accessor :sync_token, :from => 'SyncToken', :as => Integer
|
19
|
+
xml_accessor :external_key, :from => 'ExternalKey'
|
20
|
+
xml_accessor :synchronized, :from => 'Synchronized'
|
21
|
+
xml_accessor :meta_data, :from => 'MetaData', :as => Quickeebooks::Windows::Model::MetaData
|
22
|
+
xml_accessor :custom_fields, :from => 'CustomField', :as => [Quickeebooks::Windows::Model::CustomField]
|
23
|
+
xml_accessor :draft
|
24
|
+
xml_accessor :object_state, :from => 'ObjectState'
|
25
|
+
xml_accessor :item_parent_id, :from => 'ItemParentId'
|
26
|
+
xml_accessor :item_parent_name, :from => 'ItemParentName'
|
27
|
+
xml_accessor :name, :from => 'Name'
|
28
|
+
xml_accessor :desc, :from => 'Desc'
|
29
|
+
xml_accessor :taxable, :from => 'Taxable'
|
30
|
+
xml_accessor :unit_price, :from => 'UnitPrice', :as => Quickeebooks::Windows::Model::Price
|
31
|
+
xml_accessor :active
|
32
|
+
xml_accessor :rate_percent, :from => 'RatePercent'
|
33
|
+
xml_accessor :type, :from => 'Type'
|
34
|
+
xml_accessor :uomid, :from => 'UOMId'
|
35
|
+
xml_accessor :uomabbrv, :from => 'UOMAbbrv'
|
36
|
+
xml_accessor :account_reference, :from => 'IncomeAccountRef', :as => Quickeebooks::Windows::Model::AccountReference
|
37
|
+
xml_accessor :purchase_desc, :from => 'PurchaseDesc'
|
38
|
+
xml_accessor :purchase_cost, :from => 'PurchaseCost', :as => Quickeebooks::Windows::Model::Price
|
39
|
+
xml_accessor :expense_account_reference, :from => 'ExpenseAccountRef', :as => Quickeebooks::Windows::Model::AccountReference
|
40
|
+
xml_accessor :cogs_account_reference, :from => 'COGSAccountRef', :as => Quickeebooks::Windows::Model::AccountReference
|
41
|
+
xml_accessor :pref_vendor_ref, :from => 'VendorRef', :as => Quickeebooks::Windows::Model::VendorReference
|
42
|
+
xml_accessor :avg_cost, :from => 'AvgCost', :as => Quickeebooks::Windows::Model::Price
|
43
|
+
xml_accessor :qty_on_hand, :from => 'QtyOnHand', :as => Float
|
44
|
+
xml_accessor :qty_on_purchase_order, :from => 'QtyOnPurchaseOrder', :as => Float
|
45
|
+
xml_accessor :qty_on_sales_order, :from => 'QtyOnSalesOrder', :as => Float
|
46
|
+
xml_accessor :reorder_point, :from => 'ReorderPoint', :as => Float
|
47
|
+
xml_accessor :man_part_num, :from => 'ManPartNum'
|
48
|
+
xml_accessor :print_grouped_items, :from => 'PrintGroupedItems'
|
49
|
+
|
50
|
+
def to_xml_ns(options = {})
|
51
|
+
to_xml(options)
|
52
|
+
end
|
53
|
+
|
54
|
+
# To delete a record Intuit requires we provide Id and SyncToken fields
|
55
|
+
def valid_for_deletion?
|
56
|
+
return false if(id.nil? || sync_token.nil?)
|
57
|
+
id.to_i > 0 && !sync_token.to_s.empty? && sync_token.to_i >= 0
|
58
|
+
end
|
59
|
+
|
60
|
+
def taxable?
|
61
|
+
taxable == "true"
|
62
|
+
end
|
63
|
+
|
64
|
+
def active?
|
65
|
+
active == "true"
|
66
|
+
end
|
67
|
+
|
68
|
+
def draft?
|
69
|
+
draft == "true"
|
70
|
+
end
|
71
|
+
|
72
|
+
def print_grouped_items?
|
73
|
+
print_grouped_items == "true"
|
74
|
+
end
|
75
|
+
|
76
|
+
def synchronized?
|
77
|
+
synchronized == "true"
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'quickeebooks'
|
2
|
+
require 'time'
|
3
|
+
|
4
|
+
module Quickeebooks
|
5
|
+
module Windows
|
6
|
+
module Model
|
7
|
+
class MetaData < Quickeebooks::Windows::Model::IntuitType
|
8
|
+
xml_accessor :created_by, :from => 'CreatedBy'
|
9
|
+
xml_accessor :created_by_id, :from => 'CreatedById'
|
10
|
+
xml_accessor :create_time, :from => 'CreateTime', :as => Time
|
11
|
+
xml_accessor :last_modified_by, :from => 'LastModifiedBy'
|
12
|
+
xml_accessor :last_modified_by_id, :from => 'LastModifiedById'
|
13
|
+
xml_accessor :last_updated_time, :from => 'LastUpdatedTime', :as => Time
|
14
|
+
|
15
|
+
def to_xml(options = {})
|
16
|
+
xml = %Q{<MetaData>}
|
17
|
+
xml = "#{xml}<CreateTime>#{formatted_date(create_time)}</CreateTime>"
|
18
|
+
xml = "#{xml}<LastUpdatedTime>#{formatted_date(last_updated_time)}</LastUpdatedTime></MetaData>"
|
19
|
+
xml
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def formatted_date(datetime)
|
25
|
+
datetime.strftime('%Y-%m-%dT%H:%M:%S%z')
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'quickeebooks'
|
2
|
+
|
3
|
+
module Quickeebooks
|
4
|
+
module Windows
|
5
|
+
module Model
|
6
|
+
class Note < Quickeebooks::Windows::Model::IntuitType
|
7
|
+
xml_accessor :id, :from => 'Id'
|
8
|
+
xml_accessor :sync_token, :from => 'SyncToken', :as => Integer
|
9
|
+
xml_accessor :synchronized, :from => 'Synchronized'
|
10
|
+
xml_accessor :meta_data, :from => 'MetaData', :as => Quickeebooks::Windows::Model::MetaData
|
11
|
+
xml_accessor :custom_fields, :from => 'CustomField', :as => [Quickeebooks::Windows::Model::CustomField]
|
12
|
+
xml_accessor :external_key, :from => 'ExternalKey'
|
13
|
+
xml_accessor :draft
|
14
|
+
xml_accessor :content, :from => 'Content'
|
15
|
+
xml_accessor :object_state, :from => 'ObjectState'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "quickeebooks"
|
2
|
+
|
3
|
+
module Quickeebooks
|
4
|
+
module Windows
|
5
|
+
module Model
|
6
|
+
class Phone < Quickeebooks::Windows::Model::IntuitType
|
7
|
+
xml_accessor :id, :from => 'Id'
|
8
|
+
xml_accessor :device_type, :from => 'DeviceType'
|
9
|
+
xml_accessor :free_form_number, :from => 'FreeFormNumber'
|
10
|
+
xml_accessor :tag, :from => 'Tag'
|
11
|
+
xml_accessor :default, :from => 'Default'
|
12
|
+
|
13
|
+
def default?
|
14
|
+
default == "true"
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "quickeebooks"
|
2
|
+
|
3
|
+
module Quickeebooks
|
4
|
+
module Windows
|
5
|
+
module Model
|
6
|
+
class Price < IntuitType
|
7
|
+
xml_accessor :currency_code, :from => 'CurrencyCode'
|
8
|
+
xml_accessor :amount, :from => 'Amount', :as => Float
|
9
|
+
|
10
|
+
def initialize(amount = nil)
|
11
|
+
if amount
|
12
|
+
self.amount = amount
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "quickeebooks"
|
2
|
+
|
3
|
+
module Quickeebooks
|
4
|
+
module Windows
|
5
|
+
module Model
|
6
|
+
class TaxLine < Quickeebooks::Windows::Model::IntuitType
|
7
|
+
xml_accessor :id, :from => 'Id'
|
8
|
+
xml_accessor :desc, :from => 'Desc'
|
9
|
+
xml_accessor :group_member, :from => 'GroupMember'
|
10
|
+
xml_accessor :custom_fields, :from => 'CustomField', :as => [Quickeebooks::Windows::Model::CustomField]
|
11
|
+
xml_accessor :amount, :from => 'Amount', :as => Float
|
12
|
+
xml_accessor :tax_id, :from => 'TaxId'
|
13
|
+
xml_accessor :tax_name, :from => 'TaxName'
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|