quickeebooks 0.1.6 → 0.1.7
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/Gemfile.lock +1 -1
- data/HISTORY.md +4 -0
- data/README.md +2 -0
- data/coverage/index.html +3785 -3233
- data/lib/quickeebooks.rb +7 -0
- data/lib/quickeebooks/common/online_entity_model.rb +0 -2
- data/lib/quickeebooks/online/model/account_detail_type.rb +116 -223
- data/lib/quickeebooks/online/model/customer.rb +33 -2
- data/lib/quickeebooks/online/model/employee.rb +25 -0
- data/lib/quickeebooks/online/model/time_activity.rb +48 -0
- data/lib/quickeebooks/online/model/time_activity_employee.rb +12 -0
- data/lib/quickeebooks/online/model/time_activity_vendor.rb +12 -0
- data/lib/quickeebooks/online/model/vendor.rb +1 -0
- data/lib/quickeebooks/online/service/employee.rb +15 -0
- data/lib/quickeebooks/online/service/service_base.rb +8 -1
- data/lib/quickeebooks/online/service/time_activity.rb +15 -0
- data/lib/quickeebooks/version.rb +1 -1
- data/spec/quickeebooks/online/customer_spec.rb +1 -1
- data/spec/quickeebooks/online/employee_spec.rb +31 -0
- data/spec/quickeebooks/online/services/employee_spec.rb +83 -0
- data/spec/quickeebooks/online/services/service_base_spec.rb +12 -0
- data/spec/quickeebooks/online/services/time_activity_spec.rb +89 -0
- data/spec/quickeebooks/online/time_activity_spec.rb +18 -0
- data/spec/xml/online/employee.xml +31 -0
- data/spec/xml/online/employee2.xml +31 -0
- data/spec/xml/online/employees.xml +36 -0
- data/spec/xml/online/time_activities.xml +27 -0
- data/spec/xml/online/time_activity.xml +21 -0
- data/spec/xml/online/time_activity2.xml +21 -0
- metadata +18 -5
- data/tmp/blocks.rb +0 -14
- data/tmp/create_customer_windows.rb +0 -59
- data/tmp/online.rb +0 -23
data/lib/quickeebooks.rb
CHANGED
@@ -111,6 +111,10 @@ require 'quickeebooks/online/model/sales_receipt_header'
|
|
111
111
|
require 'quickeebooks/online/model/journal_entry'
|
112
112
|
require 'quickeebooks/online/model/journal_entry_line_item'
|
113
113
|
require 'quickeebooks/online/model/journal_entry_header'
|
114
|
+
require 'quickeebooks/online/model/employee'
|
115
|
+
require 'quickeebooks/online/model/time_activity'
|
116
|
+
require 'quickeebooks/online/model/time_activity_employee'
|
117
|
+
require 'quickeebooks/online/model/time_activity_vendor'
|
114
118
|
|
115
119
|
# Services
|
116
120
|
require 'quickeebooks/online/service/filter'
|
@@ -128,6 +132,9 @@ require 'quickeebooks/online/service/access_token'
|
|
128
132
|
require 'quickeebooks/online/service/vendor'
|
129
133
|
require 'quickeebooks/online/service/sales_receipt'
|
130
134
|
require 'quickeebooks/online/service/journal_entry'
|
135
|
+
require 'quickeebooks/online/service/employee'
|
136
|
+
require 'quickeebooks/online/service/time_activity'
|
137
|
+
|
131
138
|
|
132
139
|
#== Windows
|
133
140
|
|
@@ -4,8 +4,6 @@ module OnlineEntityModel
|
|
4
4
|
base.send :include, InstanceMethods
|
5
5
|
base.extend ClassMethods
|
6
6
|
base.class_eval do
|
7
|
-
validates_length_of :name, :minimum => 1
|
8
|
-
|
9
7
|
xml_convention :camelcase
|
10
8
|
xml_accessor :id, :from => 'Id', :as => Quickeebooks::Online::Model::Id
|
11
9
|
xml_accessor :sync_token, :from => 'SyncToken', :as => Integer
|
@@ -2,230 +2,123 @@ module Quickeebooks
|
|
2
2
|
module Online
|
3
3
|
module Model
|
4
4
|
module AccountDetailType
|
5
|
-
TYPES = ["ARRefundCreditCard", "Accepted", "AccountsPayable", "AccountsReceivable", "AccumulatedAdjustment", "AccumulatedAmortization", "AccumulatedAmortizationOfOtherAssets", "AccumulatedDepletion", "AccumulatedDepreciation", "Active", "AdvertisingPromotional", "AllowanceForBadDebts", "AmEx", "AmEx", "Amortization", "Annually", "Area", "Assembly", "Asset", "Authorization", "Auto", "Awarded", "BadDebts", "Bank", "BankCharges", "Bill", "BillPayment", "Billable", "Billable", "BillableHasBeenBilled", "BuildAssembly", "Buildings", "Capture", "CardNotPresent", "CardPresent", "CarryOver", "Cash", "CashOnHand", "CashPurchase", "Charge", "Charge", "CharitableContributions", "Check", "Check", "Checking", "Closed", "Closed", "CommonStock", "Cost of Goods Sold", "CostOfLabor", "CostOfLaborCos", "Count", "Credit", "Credit Card", "CreditCard", "CreditCardCharge", "CreditCardCredit", "CreditMemo", "Customer", "DateDriven", "Debit", "DebitCard", "DebitCard", "DepletableAssets", "Deposit", "Depreciation", "DevelopmentCosts", "DirectDepositPayable", "DiscountsRefundsGiven", "Discover", "Discover", "DividendIncome", "Draft", "DuesSubscriptions", "ECheck", "EFPLiabilityCheck", "EFTBillPayment", "EFTRefund", "Employee", "Employee", "Employee", "EmployeeCashAdvances", "Entertainment", "EntertainmentMeals", "EquipmentRental", "EquipmentRentalCos", "Equity", "Equity", "Estimate", "Expense", "Expense", "Fail", "FederalIncomeTaxPayable", "Fixed Asset", "Fixed Asset", "FurnitureAndFixtures", "GiftCard", "GiftCard", "Goodwill", "Group", "HasBeenBilled", "InProgress", "Income", "Insurance", "InsurancePayable", "IntangibleAssets", "InterestEarned", "InterestPaid", "Inventory", "Inventory", "InventoryAdjustment", "Investment_MortgageRealEstateLoans", "Investment_Other", "Investment_TaxExemptSecurities", "Investment_USGovernmentObligations", "Invoice", "ItemReceipt", "JournalEntry", "Land", "LeaseBuyout", "LeaseholdImprovements", "LegalProfessionalFees", "Length", "Liability", "LiabilityAdjustment", "Licenses", "LineOfCredit", "LoanPayable", "LoansToOfficers", "LoansToOthers", "LoansToStockholders", "Long Term Liability", "MachineryAndEquipment", "MasterCard", "MasterCard", "MoneyMarket", "Monthly", "Non-Posting", "NonProfitIncome", "None", "NotActive", "NotAvailable", "NotAwarded", "NotBillable", "NotBillable", "NotesPayable", "OfficeGeneralAdministrativeExpenses", "OpeningBalanceEquity", "OrganizationalCosts", "Other", "Other", "Other", "Other Asset", "Other Charge", "Other Current Asset", "Other Current Liability", "Other Expense", "Other Income", "OtherCostsOfServiceCos", "OtherCreditCard", "OtherCreditCard", "OtherCurrentAssets", "OtherCurrentLiabilities", "OtherFixedAssets", "OtherInvestmentIncome", "OtherLongTermAssets", "OtherLongTermLiabilities", "OtherMiscellaneousExpense", "OtherMiscellaneousIncome", "OtherMiscellaneousServiceCost", "OtherPrimaryIncome", "Overdue", "OwnersEquity", "Paid", "PaidInCapitalOrSurplus", "PartnerContributions", "PartnerDistributions", "PartnersEquity", "Pass", "Payable", "Paycheck", "Payment", "PayrollClearing", "PayrollExpenses", "PayrollLiabilityCheck", "PayrollTaxPayable", "PenaltiesSettlements", "Pending", "Pending", "Pending", "PreferredStock", "PrepaidExpenses", "PrepaidExpensesPayable", "PriorPayment", "Product", "PromotionalMeals", "PurchaseOrder", "Quarterly", "ReceivePayment", "Refund", "RefundCheck", "Rejected", "RentOrLeaseOfBuildings", "RentsHeldInTrust", "RentsInTrustLiability", "RepairMaintenance", "Retainage", "RetainedEarnings", "Revenue", "SalesOfProductIncome", "SalesOrder", "SalesReceipt", "SalesTaxPayable", "SalesTaxPaymentCheck", "Savings", "SecurityDeposits", "Service", "ServiceFeeIncome", "ShareholderNotesPayable", "ShippingFreightDelivery", "ShippingFreightDeliveryCos", "Standard", "StateLocalIncomeTaxPayable", "Subtotal", "SuppliesMaterials", "SuppliesMaterialsCogs", "TaxExemptInterest", "TaxesPaid", "Time", "TimeActivity", "Transfer", "Trash", "Travel", "TravelMeals", "TreasuryStock", "TrustAccounts", "TrustAccountsLiabilities", "UnPaid", "UndepositedFunds", "Utilities", "Vehicles", "Vendor", "Vendor", "Vendor", "VendorCredit", "Visa", "Visa", "VoiceAuthorization", "Volume", "Weight", "YTDAdjustment"]
|
6
|
-
|
7
|
-
AR_REFUND_CREDIT_CARD = 'ARRefundCreditCard'
|
8
|
-
ACCEPTED = 'Accepted'
|
9
|
-
ACCOUNTS_PAYABLE = 'AccountsPayable'
|
10
|
-
ACCOUNTS_RECEIVABLE = 'AccountsReceivable'
|
11
|
-
ACCUMULATED_ADJUSTMENT = 'AccumulatedAdjustment'
|
12
|
-
ACCUMULATED_AMORTIZATION = 'AccumulatedAmortization'
|
13
|
-
ACCUMULATED_AMORTIZATION_OF_OTHER_ASSETS = 'AccumulatedAmortizationOfOtherAssets'
|
14
|
-
ACCUMULATED_DEPLETION = 'AccumulatedDepletion'
|
15
|
-
ACCUMULATED_DEPRECIATION = 'AccumulatedDepreciation'
|
16
|
-
ACTIVE = 'Active'
|
17
|
-
ADVERTISING_PROMOTIONAL = 'AdvertisingPromotional'
|
18
|
-
ALLOWANCE_FOR_BAD_DEBTS = 'AllowanceForBadDebts'
|
19
|
-
AM_EX = 'AmEx'
|
20
|
-
AMORTIZATION = 'Amortization'
|
21
|
-
ANNUALLY = 'Annually'
|
22
|
-
AREA = 'Area'
|
23
|
-
ASSEMBLY = 'Assembly'
|
24
|
-
ASSET = 'Asset'
|
25
|
-
AUTHORIZATION = 'Authorization'
|
26
|
-
AUTO = 'Auto'
|
27
|
-
AWARDED = 'Awarded'
|
28
|
-
BAD_DEBTS = 'BadDebts'
|
29
|
-
BANK = 'Bank'
|
30
|
-
BANK_CHARGES = 'BankCharges'
|
31
|
-
BILL = 'Bill'
|
32
|
-
BILL_PAYMENT = 'BillPayment'
|
33
|
-
BILLABLE = 'Billable'
|
34
|
-
BILLABLE_HAS_BEEN_BILLED = 'BillableHasBeenBilled'
|
35
|
-
BUILD_ASSEMBLY = 'BuildAssembly'
|
36
|
-
BUILDINGS = 'Buildings'
|
37
|
-
CAPTURE = 'Capture'
|
38
|
-
CARD_NOT_PRESENT = 'CardNotPresent'
|
39
|
-
CARD_PRESENT = 'CardPresent'
|
40
|
-
CARRY_OVER = 'CarryOver'
|
41
|
-
CASH = 'Cash'
|
42
|
-
CASH_ON_HAND = 'CashOnHand'
|
43
|
-
CASH_PURCHASE = 'CashPurchase'
|
44
|
-
CHARGE = 'Charge'
|
45
|
-
CHARITABLE_CONTRIBUTIONS = 'CharitableContributions'
|
46
|
-
CHECK = 'Check'
|
47
|
-
CHECKING = 'Checking'
|
48
|
-
CLOSED = 'Closed'
|
49
|
-
COMMON_STOCK = 'CommonStock'
|
50
|
-
COST_OF_GOODS_SOLD = 'CostOfGoodsSold'
|
51
|
-
COST_OF_LABOR = 'CostOfLabor'
|
52
|
-
COST_OF_LABOR_COS = 'CostOfLaborCos'
|
53
|
-
COUNT = 'Count'
|
54
|
-
CREDIT = 'Credit'
|
55
|
-
CREDIT_CARD = 'CreditCard'
|
56
|
-
CREDIT_CARD_CHARGE = 'CreditCardCharge'
|
57
|
-
CREDIT_CARD_CREDIT = 'CreditCardCredit'
|
58
|
-
CREDIT_MEMO = 'CreditMemo'
|
59
|
-
CUSTOMER = 'Customer'
|
60
|
-
DATE_DRIVEN = 'DateDriven'
|
61
|
-
DEBIT = 'Debit'
|
62
|
-
DEBIT_CARD = 'DebitCard'
|
63
|
-
DEPLETABLE_ASSETS = 'DepletableAssets'
|
64
|
-
DEPOSIT = 'Deposit'
|
65
|
-
DEPRECIATION = 'Depreciation'
|
66
|
-
DEVELOPMENT_COSTS = 'DevelopmentCosts'
|
67
|
-
DIRECT_DEPOSIT_PAYABLE = 'DirectDepositPayable'
|
68
|
-
DISCOUNTS_REFUNDS_GIVEN = 'DiscountsRefundsGiven'
|
69
|
-
DISCOVER = 'Discover'
|
70
|
-
DIVIDEND_INCOME = 'DividendIncome'
|
71
|
-
DRAFT = 'Draft'
|
72
|
-
DUES_SUBSCRIPTIONS = 'DuesSubscriptions'
|
73
|
-
E_CHECK = 'ECheck'
|
74
|
-
EFP_LIABILITY_CHECK = 'EFPLiabilityCheck'
|
75
|
-
EFT_BILL_PAYMENT = 'EFTBillPayment'
|
76
|
-
EFT_REFUND = 'EFTRefund'
|
77
|
-
EMPLOYEE = 'Employee'
|
78
|
-
EMPLOYEE_CASH_ADVANCES = 'EmployeeCashAdvances'
|
79
|
-
ENTERTAINMENT = 'Entertainment'
|
80
|
-
ENTERTAINMENT_MEALS = 'EntertainmentMeals'
|
81
|
-
EQUIPMENT_RENTAL = 'EquipmentRental'
|
82
|
-
EQUIPMENT_RENTAL_COS = 'EquipmentRentalCos'
|
83
|
-
EQUITY = 'Equity'
|
84
|
-
ESTIMATE = 'Estimate'
|
85
|
-
EXPENSE = 'Expense'
|
86
|
-
FAIL = 'Fail'
|
87
|
-
FEDERAL_INCOME_TAX_PAYABLE = 'FederalIncomeTaxPayable'
|
88
|
-
FIXED_ASSET = 'FixedAsset'
|
89
|
-
FURNITURE_AND_FIXTURES = 'FurnitureAndFixtures'
|
90
|
-
GIFT_CARD = 'GiftCard'
|
91
|
-
GOODWILL = 'Goodwill'
|
92
|
-
GROUP = 'Group'
|
93
|
-
HAS_BEEN_BILLED = 'HasBeenBilled'
|
94
|
-
IN_PROGRESS = 'InProgress'
|
95
|
-
INCOME = 'Income'
|
96
|
-
INSURANCE = 'Insurance'
|
97
|
-
INSURANCE_PAYABLE = 'InsurancePayable'
|
98
|
-
INTANGIBLE_ASSETS = 'IntangibleAssets'
|
99
|
-
INTEREST_EARNED = 'InterestEarned'
|
100
|
-
INTEREST_PAID = 'InterestPaid'
|
101
|
-
INVENTORY = 'Inventory'
|
102
|
-
INVENTORY_ADJUSTMENT = 'InventoryAdjustment'
|
103
|
-
INVESTMENT_MORTGAGE_REAL_ESTATE_LOANS = 'Investment_MortgageRealEstateLoans'
|
104
|
-
INVESTMENT_OTHER = 'Investment_Other'
|
105
|
-
INVESTMENT_TAX_EXEMPT_SECURITIES = 'Investment_TaxExemptSecurities'
|
106
|
-
INVESTMENT_US_GOVERNMENT_OBLIGATIONS = 'Investment_USGovernmentObligations'
|
107
|
-
INVOICE = 'Invoice'
|
108
|
-
ITEM_RECEIPT = 'ItemReceipt'
|
109
|
-
JOURNAL_ENTRY = 'JournalEntry'
|
110
|
-
LAND = 'Land'
|
111
|
-
LEASE_BUYOUT = 'LeaseBuyout'
|
112
|
-
LEASEHOLD_IMPROVEMENTS = 'LeaseholdImprovements'
|
113
|
-
LEGAL_PROFESSIONAL_FEES = 'LegalProfessionalFees'
|
114
|
-
LENGTH = 'Length'
|
115
|
-
LIABILITY = 'Liability'
|
116
|
-
LIABILITY_ADJUSTMENT = 'LiabilityAdjustment'
|
117
|
-
LICENSES = 'Licenses'
|
118
|
-
LINE_OF_CREDIT = 'LineOfCredit'
|
119
|
-
LOAN_PAYABLE = 'LoanPayable'
|
120
|
-
LOANS_TO_OFFICERS = 'LoansToOfficers'
|
121
|
-
LOANS_TO_OTHERS = 'LoansToOthers'
|
122
|
-
LOANS_TO_STOCKHOLDERS = 'LoansToStockholders'
|
123
|
-
LONG_TERM_LIABILITY = 'LongTermLiability'
|
124
|
-
MACHINERY_AND_EQUIPMENT = 'MachineryAndEquipment'
|
125
|
-
MASTER_CARD = 'MasterCard'
|
126
|
-
MONEY_MARKET = 'MoneyMarket'
|
127
|
-
MONTHLY = 'Monthly'
|
128
|
-
NON_POSTING = 'Non-Posting'
|
129
|
-
NON_PROFIT_INCOME = 'NonProfitIncome'
|
130
|
-
NONE = 'None'
|
131
|
-
NOT_ACTIVE = 'NotActive'
|
132
|
-
NOT_AVAILABLE = 'NotAvailable'
|
133
|
-
NOT_AWARDED = 'NotAwarded'
|
134
|
-
NOT_BILLABLE = 'NotBillable'
|
135
|
-
NOTES_PAYABLE = 'NotesPayable'
|
136
|
-
OFFICE_GENERAL_ADMINISTRATIVE_EXPENSES = 'OfficeGeneralAdministrativeExpenses'
|
137
|
-
OPENING_BALANCE_EQUITY = 'OpeningBalanceEquity'
|
138
|
-
ORGANIZATIONAL_COSTS = 'OrganizationalCosts'
|
139
|
-
OTHER_EXPENSE = 'OtherExpense'
|
140
|
-
OTHER_INCOME = 'OtherIncome'
|
141
|
-
OTHER_COSTS_OF_SERVICE_COS = 'OtherCostsOfServiceCos'
|
142
|
-
OTHER_CREDIT_CARD = 'OtherCreditCard'
|
143
|
-
OTHER_CURRENT_ASSETS = 'OtherCurrentAssets'
|
144
|
-
OTHER_CURRENT_LIABILITIES = 'OtherCurrentLiabilities'
|
145
|
-
OTHER_FIXED_ASSETS = 'OtherFixedAssets'
|
146
|
-
OTHER_INVESTMENT_INCOME = 'OtherInvestmentIncome'
|
147
|
-
OTHER_LONG_TERM_ASSETS = 'OtherLongTermAssets'
|
148
|
-
OTHER_LONG_TERM_LIABILITIES = 'OtherLongTermLiabilities'
|
149
|
-
OTHER_MISCELLANEOUS_EXPENSE = 'OtherMiscellaneousExpense'
|
150
|
-
OTHER_MISCELLANEOUS_INCOME = 'OtherMiscellaneousIncome'
|
151
|
-
OTHER_MISCELLANEOUS_SERVICE_COST = 'OtherMiscellaneousServiceCost'
|
152
|
-
OTHER_PRIMARY_INCOME = 'OtherPrimaryIncome'
|
153
|
-
OVERDUE = 'Overdue'
|
154
|
-
OWNERS_EQUITY = 'OwnersEquity'
|
155
|
-
PAID = 'Paid'
|
156
|
-
PAID_IN_CAPITAL_OR_SURPLUS = 'PaidInCapitalOrSurplus'
|
157
|
-
PARTNER_CONTRIBUTIONS = 'PartnerContributions'
|
158
|
-
PARTNER_DISTRIBUTIONS = 'PartnerDistributions'
|
159
|
-
PARTNERS_EQUITY = 'PartnersEquity'
|
160
|
-
PASS = 'Pass'
|
161
|
-
PAYABLE = 'Payable'
|
162
|
-
PAYCHECK = 'Paycheck'
|
163
|
-
PAYMENT = 'Payment'
|
164
|
-
PAYROLL_CLEARING = 'PayrollClearing'
|
165
|
-
PAYROLL_EXPENSES = 'PayrollExpenses'
|
166
|
-
PAYROLL_LIABILITY_CHECK = 'PayrollLiabilityCheck'
|
167
|
-
PAYROLL_TAX_PAYABLE = 'PayrollTaxPayable'
|
168
|
-
PENALTIES_SETTLEMENTS = 'PenaltiesSettlements'
|
169
|
-
PENDING = 'Pending'
|
170
|
-
PREFERRED_STOCK = 'PreferredStock'
|
171
|
-
PREPAID_EXPENSES = 'PrepaidExpenses'
|
172
|
-
PREPAID_EXPENSES_PAYABLE = 'PrepaidExpensesPayable'
|
173
|
-
PRIOR_PAYMENT = 'PriorPayment'
|
174
|
-
PRODUCT = 'Product'
|
175
|
-
PROMOTIONAL_MEALS = 'PromotionalMeals'
|
176
|
-
PURCHASE_ORDER = 'PurchaseOrder'
|
177
|
-
QUARTERLY = 'Quarterly'
|
178
|
-
RECEIVE_PAYMENT = 'ReceivePayment'
|
179
|
-
REFUND = 'Refund'
|
180
|
-
REFUND_CHECK = 'RefundCheck'
|
181
|
-
REJECTED = 'Rejected'
|
182
|
-
RENT_OR_LEASE_OF_BUILDINGS = 'RentOrLeaseOfBuildings'
|
183
|
-
RENTS_HELD_IN_TRUST = 'RentsHeldInTrust'
|
184
|
-
RENTS_IN_TRUST_LIABILITY = 'RentsInTrustLiability'
|
185
|
-
REPAIR_MAINTENANCE = 'RepairMaintenance'
|
186
|
-
RETAINAGE = 'Retainage'
|
187
|
-
RETAINED_EARNINGS = 'RetainedEarnings'
|
188
|
-
REVENUE = 'Revenue'
|
189
|
-
SALES_OF_PRODUCT_INCOME = 'SalesOfProductIncome'
|
190
|
-
SALES_ORDER = 'SalesOrder'
|
191
|
-
SALES_RECEIPT = 'SalesReceipt'
|
192
|
-
SALES_TAX_PAYABLE = 'SalesTaxPayable'
|
193
|
-
SALES_TAX_PAYMENT_CHECK = 'SalesTaxPaymentCheck'
|
194
|
-
SAVINGS = 'Savings'
|
195
|
-
SECURITY_DEPOSITS = 'SecurityDeposits'
|
196
|
-
SERVICE = 'Service'
|
197
|
-
SERVICE_FEE_INCOME = 'ServiceFeeIncome'
|
198
|
-
SHAREHOLDER_NOTES_PAYABLE = 'ShareholderNotesPayable'
|
199
|
-
SHIPPING_FREIGHT_DELIVERY = 'ShippingFreightDelivery'
|
200
|
-
SHIPPING_FREIGHT_DELIVERY_COS = 'ShippingFreightDeliveryCos'
|
201
|
-
STANDARD = 'Standard'
|
202
|
-
STATE_LOCAL_INCOME_TAX_PAYABLE = 'StateLocalIncomeTaxPayable'
|
203
|
-
SUBTOTAL = 'Subtotal'
|
204
|
-
SUPPLIES_MATERIALS = 'SuppliesMaterials'
|
205
|
-
SUPPLIES_MATERIALS_COGS = 'SuppliesMaterialsCogs'
|
206
|
-
TAX_EXEMPT_INTEREST = 'TaxExemptInterest'
|
207
|
-
TAXES_PAID = 'TaxesPaid'
|
208
|
-
TIME = 'Time'
|
209
|
-
TIME_ACTIVITY = 'TimeActivity'
|
210
|
-
TRANSFER = 'Transfer'
|
211
|
-
TRASH = 'Trash'
|
212
|
-
TRAVEL = 'Travel'
|
213
|
-
TRAVEL_MEALS = 'TravelMeals'
|
214
|
-
TREASURY_STOCK = 'TreasuryStock'
|
215
|
-
TRUST_ACCOUNTS = 'TrustAccounts'
|
216
|
-
TRUST_ACCOUNTS_LIABILITIES = 'TrustAccountsLiabilities'
|
217
|
-
UN_PAID = 'UnPaid'
|
218
|
-
UNDEPOSITED_FUNDS = 'UndepositedFunds'
|
219
|
-
UTILITIES = 'Utilities'
|
220
|
-
VEHICLES = 'Vehicles'
|
221
|
-
VENDOR = 'Vendor'
|
222
|
-
VENDOR_CREDIT = 'VendorCredit'
|
223
|
-
VISA = 'Visa'
|
224
|
-
VOICE_AUTHORIZATION = 'VoiceAuthorization'
|
225
|
-
VOLUME = 'Volume'
|
226
|
-
WEIGHT = 'Weight'
|
227
|
-
YTD_ADJUSTMENT = 'YTDAdjustment'
|
228
5
|
|
6
|
+
TYPES = %w(
|
7
|
+
AccountsPayable
|
8
|
+
AccountsReceivable
|
9
|
+
AccumulatedAdjustment
|
10
|
+
AccumulatedAmortization
|
11
|
+
AccumulatedAmortizationOfOtherAssets
|
12
|
+
AccumulatedDepletion
|
13
|
+
AccumulatedDepreciation
|
14
|
+
AdvertisingPromotional
|
15
|
+
AllowanceForBadDebts
|
16
|
+
Amortization
|
17
|
+
Auto
|
18
|
+
BadDebts
|
19
|
+
BankCharges
|
20
|
+
Buildings
|
21
|
+
CashOnHand
|
22
|
+
CharitableContributions
|
23
|
+
Checking
|
24
|
+
CommonStock
|
25
|
+
CostOfLabor
|
26
|
+
CostOfLaborCos
|
27
|
+
CreditCard
|
28
|
+
DepletableAssets
|
29
|
+
Depreciation
|
30
|
+
DevelopmentCosts
|
31
|
+
DirectDepositPayable
|
32
|
+
DiscountsRefundsGiven
|
33
|
+
DividendIncome
|
34
|
+
DuesSubscriptions
|
35
|
+
EmployeeCashAdvances
|
36
|
+
Entertainment
|
37
|
+
EntertainmentMeals
|
38
|
+
EquipmentRental
|
39
|
+
EquipmentRentalCos
|
40
|
+
FederalIncomeTaxPayable
|
41
|
+
FurnitureAndFixtures
|
42
|
+
Goodwill
|
43
|
+
Insurance
|
44
|
+
InsurancePayable
|
45
|
+
IntangibleAssets
|
46
|
+
InterestEarned
|
47
|
+
InterestPaid
|
48
|
+
Inventory
|
49
|
+
Investment_MortgageRealEstateLoans
|
50
|
+
Investment_Other
|
51
|
+
Investment_TaxExemptSecurities
|
52
|
+
Investment_USGovernmentObligations
|
53
|
+
Land
|
54
|
+
LeaseBuyout
|
55
|
+
LeaseholdImprovements
|
56
|
+
LegalProfessionalFees
|
57
|
+
Licenses
|
58
|
+
LineOfCredit
|
59
|
+
LoanPayable
|
60
|
+
LoansToOfficers
|
61
|
+
LoansToOthers
|
62
|
+
LoansToStockholders
|
63
|
+
MachineryAndEquipment
|
64
|
+
MoneyMarket
|
65
|
+
NonProfitIncome
|
66
|
+
NotesPayable
|
67
|
+
OfficeGeneralAdministrativeExpenses
|
68
|
+
OpeningBalanceEquity
|
69
|
+
OrganizationalCosts
|
70
|
+
OtherCostsOfServiceCos
|
71
|
+
OtherCurrentAssets
|
72
|
+
OtherCurrentLiabilities
|
73
|
+
OtherFixedAssets
|
74
|
+
OtherInvestmentIncome
|
75
|
+
OtherLongTermAssets
|
76
|
+
OtherLongTermLiabilities
|
77
|
+
OtherMiscellaneousExpense
|
78
|
+
OtherMiscellaneousIncome
|
79
|
+
OtherMiscellaneousServiceCost
|
80
|
+
OtherPrimaryIncome
|
81
|
+
OwnersEquity
|
82
|
+
PaidInCapitalOrSurplus
|
83
|
+
PartnerContributions
|
84
|
+
PartnerDistributions
|
85
|
+
PartnersEquity
|
86
|
+
PayrollClearing
|
87
|
+
PayrollExpenses
|
88
|
+
PayrollTaxPayable
|
89
|
+
PenaltiesSettlements
|
90
|
+
PreferredStock
|
91
|
+
PrepaidExpenses
|
92
|
+
PrepaidExpensesPayable
|
93
|
+
PromotionalMeals
|
94
|
+
RentOrLeaseOfBuildings
|
95
|
+
RentsHeldInTrust
|
96
|
+
RentsInTrustLiability
|
97
|
+
RepairMaintenance
|
98
|
+
Retainage
|
99
|
+
RetainedEarnings
|
100
|
+
SalesOfProductIncome
|
101
|
+
SalesTaxPayable
|
102
|
+
Savings
|
103
|
+
SecurityDeposits
|
104
|
+
ServiceFeeIncome
|
105
|
+
ShareholderNotesPayable
|
106
|
+
ShippingFreightDelivery
|
107
|
+
ShippingFreightDeliveryCos
|
108
|
+
StateLocalIncomeTaxPayable
|
109
|
+
SuppliesMaterials
|
110
|
+
SuppliesMaterialsCogs
|
111
|
+
TaxesPaid
|
112
|
+
TaxExemptInterest
|
113
|
+
Travel
|
114
|
+
TravelMeals
|
115
|
+
TreasuryStock
|
116
|
+
TrustAccounts
|
117
|
+
TrustAccountsLiabilities
|
118
|
+
UndepositedFunds
|
119
|
+
Utilities
|
120
|
+
Vehicles
|
121
|
+
)
|
229
122
|
|
230
123
|
end
|
231
124
|
end
|
@@ -25,17 +25,48 @@ module Quickeebooks
|
|
25
25
|
xml_accessor :custom_fields, :from => 'CustomField', :as => [Quickeebooks::Online::Model::CustomerCustomField]
|
26
26
|
xml_accessor :paymethod_method_id, :from => 'PaymentMethodId', :as => Quickeebooks::Online::Model::Id
|
27
27
|
|
28
|
+
validates_length_of :name, :minimum => 1
|
29
|
+
|
28
30
|
def address=(address)
|
29
31
|
self.addresses ||= []
|
30
32
|
self.addresses << address
|
31
33
|
end
|
32
34
|
|
33
35
|
def billing_address
|
34
|
-
|
36
|
+
select_address("Billing")
|
35
37
|
end
|
36
38
|
|
37
39
|
def shipping_address
|
38
|
-
|
40
|
+
select_address("Shipping")
|
41
|
+
end
|
42
|
+
|
43
|
+
def primary_phone
|
44
|
+
select_phone("Primary")
|
45
|
+
end
|
46
|
+
|
47
|
+
def secondary_phone
|
48
|
+
select_phone("Secondary")
|
49
|
+
end
|
50
|
+
|
51
|
+
def mobile_phone
|
52
|
+
select_phone("Mobile")
|
53
|
+
end
|
54
|
+
|
55
|
+
def fax
|
56
|
+
select_phone("Fax")
|
57
|
+
end
|
58
|
+
|
59
|
+
def pager
|
60
|
+
select_phone("Pager")
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
def select_phone(type)
|
65
|
+
phones.detect { |phone| phone.device_type == type }
|
66
|
+
end
|
67
|
+
|
68
|
+
def select_address(tag)
|
69
|
+
addresses.detect { |address| address.tag == tag }
|
39
70
|
end
|
40
71
|
|
41
72
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "quickeebooks"
|
2
|
+
require "quickeebooks/online/model/id"
|
3
|
+
require "quickeebooks/online/model/meta_data"
|
4
|
+
require "quickeebooks/online/model/address"
|
5
|
+
require "quickeebooks/online/model/phone"
|
6
|
+
require "quickeebooks/online/model/web_site"
|
7
|
+
require "quickeebooks/online/model/email"
|
8
|
+
require "quickeebooks/common/online_entity_model"
|
9
|
+
|
10
|
+
module Quickeebooks
|
11
|
+
module Online
|
12
|
+
module Model
|
13
|
+
class Employee < Quickeebooks::Online::Model::IntuitType
|
14
|
+
include ActiveModel::Validations
|
15
|
+
include OnlineEntityModel
|
16
|
+
include Quickeebooks::Model::Addressable
|
17
|
+
|
18
|
+
XML_NODE = "Employee"
|
19
|
+
REST_RESOURCE = "employee"
|
20
|
+
validates_length_of :name, :minimum => 1
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|