ruckus/quickbooks-ruby — pull request #194 by benzittlau (2014-11-09 22:27:49+00:00)
Title: Add missing fields to models

This brings the models in quickbooks-ruby up to date with all the fields currently listed in Intuits API Reference.

This also adds a small tweak to the `reference_setters` method, so it will auto-determine the necessary references by looking for `xml_accessor`'s with a `Quickbooks::Model::BaseReference` class if an explicit listing is not provided.

``` yaml
---
Account:
- Id
- SyncToken
- MetaData
- Name
- SubAccount
- ParentRef
- Description
- FullyQualifiedName
- Active
- Classification
- AccountType
- AccountSubType
- AcctNum
- CurrentBalance
- CurrentBalanceWithSubAccounts
- CurrencyRef
Class:
- Id
- SyncToken
- MetaData
- Name
- SubClass
- ParentRef
- FullyQualifiedName
- Active
Customer:
- Id
- SyncToken
- MetaData
- Title
- GivenName
- MiddleName
- FamilyName
- Suffix
- FullyQualifiedName
- CompanyName
- DisplayName
- PrintOnCheckName
- Active
- PrimaryPhone
- AlternatePhone
- Mobile
- Fax
- PrimaryEmailAddr
- WebAddr
- DefaultTaxCodeRef
- Taxable
- BillAddr
- ShipAddr
- Notes
- Job
- BillWithParent
- ParentRef
- Level
- SalesTermRef
- PaymentMethodRef
- Balance
- OpenBalanceDate
- BalanceWithJobs
- CurrencyRef
- PreferredDeliveryMethod
- ResaleNum
Department:
- Id
- SyncToken
- MetaData
- Name
- SubDepartment
- ParentRef
- FullyQualifiedName
- Active
Employee:
- Id
- SyncToken
- MetaData
- Organization
- Title
- GivenName
- MiddleName
- FamilyName
- Suffix
- DisplayName
- PrintOnCheckName
- Active
- PrimaryPhone
- Mobile
- PrimaryEmailAddr
- EmployeeNumber
- SSN
- PrimaryAddr
- BillableTime
- BillRate
- BirthDate
- Gender
- HiredDate
- ReleasedDate
Item:
- Id
- SyncToken
- MetaData
- Name
- Description
- Active
- SubItem
- ParentRef
- Level
- FullyQualifiedName
- Taxable
- SalesTaxIncluded
- UnitPrice
- RatePercent
- Type
- IncomeAccountRef
- PurchaseDesc
- PurchaseTaxIncluded
- PurchaseCost
- ExpenseAccountRef
- AssetAccountRef
- TrackQtyOnHand
- QtyOnHand
- SalesTaxCodeRef
- PurchaseTaxCodeRef
- InvStartDate
PaymentMethod:
- Id
- SyncToken
- MetaData
- Name
- Active
- Type
Term:
- Id
- SyncToken
- MetaData
- AttachableRef
- Name
- Active
- Type
- DiscountPercent
- DueDays
- DiscountDays
- DayOfMonthDue
- DueNextMonthDays
- DiscountDayOfMonth
Vendor:
- Id
- SyncToken
- MetaData
- Title
- GivenName
- MiddleName
- FamilyName
- Suffix
- CompanyName
- DisplayName
- PrintOnCheckName
- Active
- PrimaryPhone
- AlternatePhone
- Mobile
- Fax
- PrimaryEmailAddr
- WebAddr
- BillAddr
- OtherContactInfo
- TaxIndentifier
- TermRef
- Balance
- AcctNum
- Vendor1099
- CurrencyRef
Bill:
- Id
- SyncToken
- MetaData
- AttachableRef
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- Line [0..n]
- VendorRef
- APAccountRef
- TotalAmt
- GlobalTaxCalculation
- SalesTermRef
- DueDate
- Balance
BillPayment:
- Id
- SyncToken
- MetaData
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- Line [0..n]
- VendorRef
- APAccountRef
- PayType
- CheckPayment
- TotalAmt
- ProcessBillPayment
CreditMemo:
- Id
- SyncToken
- MetaData
- CustomField [0..3]
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- Line [0..n]
- TxnTaxDetail
- CustomerRef
- CustomerMemo
- BillAddr
- ShipAddr
- ClassRef
- SalesTermRef
- GlobalTaxCalculation
- TotalAmt
- HomeTotalAmt
- ApplyTaxAfterDiscount
- PrintStatus
- EmailStatus
- BillEmail
- Balance
- PaymentMetnodRef
- DepositToAccountRef
- RemainingCredit
Estimate:
- Id
- SyncToken
- MetaData
- CustomField [0..3]
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- TxnStatus
- LinkedTxn[0..n]
- Line [0..n]
- TxnTaxDetail
- CustomerRef
- CustomerMemo
- BillAddr
- ShipAddr
- ClassRef
- SalesTermRef
- ShipMethodRef
- DueDate
- ShipDate
- GlobalTaxCalculation
- TotalAmt
- ApplyTaxAfterDiscount
- PrintStatus
- EmailStatus
- BillEmail
- ExpirationDate
- AcceptedBy
- AcceptedDate
Invoice:
- Id
- SyncToken
- MetaData
- CustomField [0..3]
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- LinkedTxn[0..n]
- Line [0..n]
- TxnTaxDetail
- CustomerRef
- CustomerMemo
- BillAddr
- ShipAddr
- SalesTermRef
- DueDate
- GlobalTaxCalculation
- ShipMethodRef
- ShipDate
- TrackingNum
- TotalAmt
- HomeTotalAmt
- ApplyTaxAfterDiscount
- PrintStatus
- EmailStatus
- BillEmail
- Balance
- DepositToAccountRef
- Deposit
JournalEntry:
- Id
- SyncToken
- MetaData
- DocNumber
- TxnDate
- CurrencyRef
- ExchangeRate
- PrivateNote
- Line [0..n]
- TxnTaxDetail
- TotalAmt
- HomeTotalAmt
- Adjustment
Payment:
- Id
- SyncToken
- MetaData
- TxnDate
- CurrencyRef
- ExchangeRate
- PrivateNote
- TxnStatus
- Line [0..n]
- CustomerRef
- ARAccountRef
- DepositToAccountRef
- PaymentMethodRef
- PaymentRefNum
- TotalAmt
- UnappliedAmt
Purchase:
- Id
- SyncToken
- MetaData
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- |-
LinkedTxn[0..
n]
- Line [0..n]
- TxnTaxDetail
- AccountRef
- PaymentType
- EntityRef
- Credit
- GlobalTaxCalculation
- RemitToAddr
- TotalAmt
- PrintStatus
PurchaseOrder:
- Id
- SyncToken
- MetaData
- CustomField [0..3]
- AttachableRef
- DocNumber
- TxnDate
- PrivateNote
- LinkedTxn[0..n]
- Line [0..n]
- VendorRef
- APAccountRef
- TotalAmt
- ClassRef
- SalesTermRef
- DueDate
- VendorAddr
- ShipAddr
- ShipMethodRef
- POStatus
- TxnTaxDetail
- TaxCodeRef
- CurrencyRef
- ExchangeRate
- GlobalTaxCalculation
RefundReceipt:
- Id
- SyncToken
- MetaData
- CustomField [0..3]
- DocNumber
- TxnDate
- DepartmentRef
- CurrencyRef
- ExchangeRate
- PrivateNote
- LinkedTxn[0..n]
- Line [0..n]
- TxnTaxDetail
- CustomerRef
- CustomerMemo
- BillAddr
- ShipAddr
- ClassRef
- TotalAmt
- HomeTotalAmt
- ApplyTaxAfterDiscount
- PrintStatus
- BillEmail
- Balance
- PaymentMethodRef
- PaymentRefNum
- DepositToAccountRef
- GlobalTaxCalculation
SalesReceipt:
- Id
- SyncToken
- MetaData
- CustomField [0..3]
- DocNumber
- TxnDate
- DepartmentRef
- PrivateNote
- LinkedTxn[0..n]
- Line [0..n]
- TxnTaxDetail
- CustomerRef
- CustomerMemo
- BillAddr
- ShipAddr
- ClassRef
- ShipMethodRef
- ShipDate
- TrackingNum
- TotalAmt
- PrintStatus
- EmailStatus
- BillEmail
- Balance
- PaymentMethodRef
- PaymentRefNum
- ApplyTaxAfterDiscount
- DepositToAccountRef
- CurrencyRef
- ExchangeRate
- GlobalTaxCalculation
- HomeTotalAmt
TimeActivity:
- Id
- SyncToken
- MetaData
- AttachableRef
- TimeZone
- TxnDate
- NameOf
- EmployeeRef
- VendorRef
- CustomerRef
- DepartmentRef
- ItemRef
- ClassRef
- BillableStatus
- Taxable
- HourlyRate
- Hours
- Minutes
- BreakHours
- BreakMinutes
- StartTime
- EndTime
- Description
VendorCredit:
- Id
- SyncToken
- MetaData
- DocNumber
- TxnDate
- PrivateNote
- DepartmentRef
- Line [0..n]
- VendorRef
- APAccountRef
- TotalAmt
- CurrencyRef
- ExchangeRate
- GlobalTaxCalculation
```