Documentation
¶
Overview ¶
Copyright (c) 2018, Randy Westlund. All rights reserved. This code is under the BSD-2-Clause license.
Index ¶
- Constants
- func BatchEntityExtractor[T any](response *BatchItemResponse) (T, bool)
- func BatchQueryExtractor[T any](response *BatchItemResponse) []T
- func CDCQueryExtractor[T any](response *ChangeDataCapture) []T
- type Account
- type AccountBasedExpenseLineDetail
- type AccountTypeEnum
- type Attachable
- type AttachableRef
- type BatchFault
- type BatchFaultResponse
- type BatchItemRequest
- type BatchItemResponse
- type BatchOperations
- type BatchOptions
- type BearerToken
- type Bill
- type BillPayment
- type BillPaymentCheck
- type BillPaymentCreditCard
- type BillPaymentTypeEnum
- type BillableStatusEnum
- type ChangeDataCapture
- type Class
- type Client
- func (c *Client) BatchRequest(params RequestParameters, batchRequests []BatchItemRequest) ([]BatchItemResponse, error)
- func (c *Client) ChangeDataCapture(params RequestParameters, entities []string, changedSince time.Time) (ChangeDataCapture, error)
- func (c *Client) CreateAccount(params RequestParameters, account *Account) (*Account, error)
- func (c *Client) CreateAttachable(params RequestParameters, attachable *Attachable) (*Attachable, error)
- func (c *Client) CreateBill(params RequestParameters, bill *Bill) (*Bill, error)
- func (c *Client) CreateBillPayment(params RequestParameters, billPayment *BillPayment) (*BillPayment, error)
- func (c *Client) CreateClass(params RequestParameters, class *Class) (*Class, error)
- func (c *Client) CreateCreditMemo(params RequestParameters, creditMemo *CreditMemo) (*CreditMemo, error)
- func (c *Client) CreateCustomer(params RequestParameters, customer *Customer) (*Customer, error)
- func (c *Client) CreateDeposit(params RequestParameters, deposit *Deposit) (*Deposit, error)
- func (c *Client) CreateEmployee(params RequestParameters, employee *Employee) (*Employee, error)
- func (c *Client) CreateEstimate(params RequestParameters, estimate *Estimate) (*Estimate, error)
- func (c *Client) CreateInvoice(params RequestParameters, invoice *Invoice) (*Invoice, error)
- func (c *Client) CreateItem(params RequestParameters, item *Item) (*Item, error)
- func (c *Client) CreatePayment(params RequestParameters, payment *Payment) (*Payment, error)
- func (c *Client) CreatePaymentMethod(params RequestParameters, paymentMethod *PaymentMethod) (*PaymentMethod, error)
- func (c *Client) CreatePurchase(params RequestParameters, purchase *Purchase) (*Purchase, error)
- func (c *Client) CreateTerm(params RequestParameters, term *Term) (*Term, error)
- func (c *Client) CreateTimeActivity(params RequestParameters, timeActivity *TimeActivity) (*TimeActivity, error)
- func (c *Client) CreateVendor(params RequestParameters, vendor *Vendor) (*Vendor, error)
- func (c *Client) CreateVendorCredit(params RequestParameters, vendorCredit *VendorCredit) (*VendorCredit, error)
- func (c *Client) DeleteAttachable(params RequestParameters, attachable *Attachable) error
- func (c *Client) DeleteBill(params RequestParameters, bill *Bill) error
- func (c *Client) DeleteBillPayment(params RequestParameters, billPayment *BillPayment) error
- func (c *Client) DeleteCreditMemo(params RequestParameters, creditMemo *CreditMemo) error
- func (c *Client) DeleteDeposit(params RequestParameters, deposit *Deposit) error
- func (c *Client) DeleteEstimate(params RequestParameters, estimate *Estimate) error
- func (c *Client) DeleteInvoice(params RequestParameters, invoice *Invoice) error
- func (c *Client) DeletePayment(params RequestParameters, payment *Payment) error
- func (c *Client) DeletePurchase(params RequestParameters, purchase *Purchase) error
- func (c *Client) DeleteTimeActivity(params RequestParameters, timeActivity *TimeActivity) error
- func (c *Client) DeleteVendorCredit(params RequestParameters, vendorCredit *VendorCredit) error
- func (c *Client) DownloadAttachable(realmId, id string) (string, error)
- func (c *Client) FindAccountById(params RequestParameters, id string) (*Account, error)
- func (c *Client) FindAccounts(params RequestParameters) ([]Account, error)
- func (c *Client) FindAccountsByPage(params RequestParameters, startPosition, pageSize int) ([]Account, error)
- func (c *Client) FindAttachableById(params RequestParameters, id string) (*Attachable, error)
- func (c *Client) FindAttachables(params RequestParameters) ([]Attachable, error)
- func (c *Client) FindAuthorizationUrl(scope string, state string, redirectUri string) (string, error)
- func (c *Client) FindBillById(params RequestParameters, id string) (*Bill, error)
- func (c *Client) FindBillPaymentById(params RequestParameters, id string) (*BillPayment, error)
- func (c *Client) FindBillPayments(params RequestParameters) ([]BillPayment, error)
- func (c *Client) FindBillPaymentsByPage(params RequestParameters, startPosition, pageSize int) ([]BillPayment, error)
- func (c *Client) FindBills(params RequestParameters) ([]Bill, error)
- func (c *Client) FindBillsByPage(params RequestParameters, startPosition, pageSize int) ([]Bill, error)
- func (c *Client) FindClassById(params RequestParameters, id string) (*Class, error)
- func (c *Client) FindClasses(params RequestParameters) ([]Class, error)
- func (c *Client) FindClassesByPage(params RequestParameters, startPosition, pageSize int) ([]Class, error)
- func (c *Client) FindCompanyInfo(params RequestParameters) (*CompanyInfo, error)
- func (c *Client) FindCreditMemoById(params RequestParameters, id string) (*CreditMemo, error)
- func (c *Client) FindCreditMemos(params RequestParameters) ([]CreditMemo, error)
- func (c *Client) FindCustomerById(params RequestParameters, id string) (*Customer, error)
- func (c *Client) FindCustomerByName(params RequestParameters, name string) (*Customer, error)
- func (c *Client) FindCustomerTypeById(params RequestParameters, id string) (*CustomerType, error)
- func (c *Client) FindCustomerTypesByPage(params RequestParameters, startPosition, pageSize int) ([]CustomerType, error)
- func (c *Client) FindCustomers(params RequestParameters) ([]Customer, error)
- func (c *Client) FindCustomersByPage(params RequestParameters, startPosition, pageSize int) ([]Customer, error)
- func (c *Client) FindDepositById(params RequestParameters, id string) (*Deposit, error)
- func (c *Client) FindDeposits(params RequestParameters) ([]Deposit, error)
- func (c *Client) FindDepositsByPage(params RequestParameters, startPosition, pageSize int) ([]Deposit, error)
- func (c *Client) FindEmployeeById(params RequestParameters, id string) (*Employee, error)
- func (c *Client) FindEmployees(params RequestParameters) ([]Employee, error)
- func (c *Client) FindEmployeesByPage(params RequestParameters, startPosition, pageSize int) ([]Employee, error)
- func (c *Client) FindEstimateById(params RequestParameters, id string) (*Estimate, error)
- func (c *Client) FindEstimates(params RequestParameters) ([]Estimate, error)
- func (c *Client) FindEstimatesByPage(params RequestParameters, startPosition, pageSize int) ([]Estimate, error)
- func (c *Client) FindInvoiceById(params RequestParameters, id string) (*Invoice, error)
- func (c *Client) FindInvoices(params RequestParameters) ([]Invoice, error)
- func (c *Client) FindInvoicesByPage(params RequestParameters, startPosition, pageSize int) ([]Invoice, error)
- func (c *Client) FindItemById(params RequestParameters, id string) (*Item, error)
- func (c *Client) FindItems(params RequestParameters) ([]Item, error)
- func (c *Client) FindItemsByPage(params RequestParameters, startPosition, pageSize int) ([]Item, error)
- func (c *Client) FindPaymentById(params RequestParameters, id string) (*Payment, error)
- func (c *Client) FindPaymentMethodById(params RequestParameters, id string) (*PaymentMethod, error)
- func (c *Client) FindPaymentMethods(params RequestParameters) ([]PaymentMethod, error)
- func (c *Client) FindPaymentMethodsByPage(params RequestParameters, startPosition, pageSize int) ([]PaymentMethod, error)
- func (c *Client) FindPayments(params RequestParameters) ([]Payment, error)
- func (c *Client) FindPaymentsByPage(params RequestParameters, startPosition, pageSize int) ([]Payment, error)
- func (c *Client) FindPurchaseById(params RequestParameters, id string) (*Purchase, error)
- func (c *Client) FindPurchases(params RequestParameters) ([]Purchase, error)
- func (c *Client) FindPurchasesByPage(params RequestParameters, startPosition, pageSize int) ([]Purchase, error)
- func (c *Client) FindReimburseChargeById(params RequestParameters, id string) (*ReimburseCharge, error)
- func (c *Client) FindReimburseCharges(params RequestParameters) ([]ReimburseCharge, error)
- func (c *Client) FindReimburseChargesByPage(params RequestParameters, startPosition, pageSize int) ([]ReimburseCharge, error)
- func (c *Client) FindTaxCodeById(params RequestParameters, id string) (*TaxCode, error)
- func (c *Client) FindTaxCodes(params RequestParameters) ([]TaxCode, error)
- func (c *Client) FindTaxCodesByPage(params RequestParameters, startPosition, pageSize int) ([]TaxCode, error)
- func (c *Client) FindTaxRateById(params RequestParameters, id string) (*TaxRate, error)
- func (c *Client) FindTaxRates(params RequestParameters) ([]TaxRate, error)
- func (c *Client) FindTaxRatesByPage(params RequestParameters, startPosition, pageSize int) ([]TaxRate, error)
- func (c *Client) FindTermById(params RequestParameters, id string) (*Term, error)
- func (c *Client) FindTerms(params RequestParameters) ([]Term, error)
- func (c *Client) FindTermsByPage(params RequestParameters, startPosition, pageSize int) ([]Term, error)
- func (c *Client) FindTimeActivities(params RequestParameters) ([]TimeActivity, error)
- func (c *Client) FindTimeActivitiesByPage(params RequestParameters, startPosition, pageSize int) ([]TimeActivity, error)
- func (c *Client) FindTimeActivityById(params RequestParameters, id string) (*TimeActivity, error)
- func (c *Client) FindVendorById(params RequestParameters, id string) (*Vendor, error)
- func (c *Client) FindVendorCreditById(params RequestParameters, id string) (*VendorCredit, error)
- func (c *Client) FindVendorCredits(params RequestParameters) ([]VendorCredit, error)
- func (c *Client) FindVendorCreditsByPage(params RequestParameters, startPosition, pageSize int) ([]VendorCredit, error)
- func (c *Client) FindVendors(params RequestParameters) ([]Vendor, error)
- func (c *Client) FindVendorsByPage(params RequestParameters, startPosition, pageSize int) ([]Vendor, error)
- func (c *Client) QueryAccounts(params RequestParameters, query string) ([]Account, error)
- func (c *Client) QueryAttachables(params RequestParameters, query string) ([]Attachable, error)
- func (c *Client) QueryBillPayments(params RequestParameters, query string) ([]BillPayment, error)
- func (c *Client) QueryBills(params RequestParameters, query string) ([]Bill, error)
- func (c *Client) QueryClasses(params RequestParameters, query string) ([]Class, error)
- func (c *Client) QueryCreditMemos(params RequestParameters, query string) ([]CreditMemo, error)
- func (c *Client) QueryCustomerTypes(params RequestParameters, query string) ([]CustomerType, error)
- func (c *Client) QueryCustomers(params RequestParameters, query string) ([]Customer, error)
- func (c *Client) QueryDeposits(params RequestParameters, query string) ([]Deposit, error)
- func (c *Client) QueryEmployees(params RequestParameters, query string) ([]Employee, error)
- func (c *Client) QueryEstimates(params RequestParameters, query string) ([]Estimate, error)
- func (c *Client) QueryInvoices(params RequestParameters, query string) ([]Invoice, error)
- func (c *Client) QueryItems(params RequestParameters, query string) ([]Item, error)
- func (c *Client) QueryPaymentMethods(params RequestParameters, query string) ([]PaymentMethod, error)
- func (c *Client) QueryPayments(params RequestParameters, query string) ([]Payment, error)
- func (c *Client) QueryPurchases(params RequestParameters, query string) ([]Purchase, error)
- func (c *Client) QueryReimburseCharges(params RequestParameters, query string) ([]ReimburseCharge, error)
- func (c *Client) QueryTaxCodes(params RequestParameters, query string) ([]TaxCode, error)
- func (c *Client) QueryTaxRates(params RequestParameters, query string) ([]TaxRate, error)
- func (c *Client) QueryTerms(params RequestParameters, query string) ([]Term, error)
- func (c *Client) QueryTimeActivities(params RequestParameters, query string) ([]TimeActivity, error)
- func (c *Client) QueryVendorCredits(params RequestParameters, query string) ([]VendorCredit, error)
- func (c *Client) QueryVendors(params RequestParameters, query string) ([]Vendor, error)
- func (c *Client) RefreshToken(refreshToken string) (*BearerToken, error)
- func (c *Client) RetrieveBearerToken(authorizationCode, redirectURI string) (*BearerToken, error)
- func (c *Client) RevokeToken(refreshToken string) error
- func (c *Client) SendEstimate(params RequestParameters, estimateId, emailAddress string) error
- func (c *Client) SendInvoice(params RequestParameters, invoiceId, emailAddress string) error
- func (c *Client) SparseUpdateCustomer(params RequestParameters, customer *Customer) (*Customer, error)
- func (c *Client) SparseUpdateDeposit(params RequestParameters, deposit *Deposit) (*Deposit, error)
- func (c *Client) SparseUpdateEstimate(params RequestParameters, estimate *Estimate) (*Estimate, error)
- func (c *Client) SparseUpdateInvoice(params RequestParameters, invoice *Invoice) (*Invoice, error)
- func (c *Client) UpdateAccount(params RequestParameters, account *Account) (*Account, error)
- func (c *Client) UpdateAttachable(params RequestParameters, attachable *Attachable) (*Attachable, error)
- func (c *Client) UpdateBill(params RequestParameters, bill *Bill) (*Bill, error)
- func (c *Client) UpdateBillPayment(params RequestParameters, billPayment *BillPayment) (*BillPayment, error)
- func (c *Client) UpdateClass(params RequestParameters, class *Class) (*Class, error)
- func (c *Client) UpdateCompanyInfo(params RequestParameters, companyInfo *CompanyInfo) (*CompanyInfo, error)
- func (c *Client) UpdateCreditMemo(params RequestParameters, creditMemo *CreditMemo) (*CreditMemo, error)
- func (c *Client) UpdateCustomer(params RequestParameters, customer *Customer) (*Customer, error)
- func (c *Client) UpdateDeposit(params RequestParameters, deposit *Deposit) (*Deposit, error)
- func (c *Client) UpdateEmployee(params RequestParameters, employee *Employee) (*Employee, error)
- func (c *Client) UpdateEstimate(params RequestParameters, estimate *Estimate) (*Estimate, error)
- func (c *Client) UpdateInvoice(params RequestParameters, invoice *Invoice) (*Invoice, error)
- func (c *Client) UpdateItem(params RequestParameters, item *Item) (*Item, error)
- func (c *Client) UpdatePayment(params RequestParameters, payment *Payment) (*Payment, error)
- func (c *Client) UpdatePaymentMethod(params RequestParameters, paymentMethod *PaymentMethod) (*PaymentMethod, error)
- func (c *Client) UpdatePurchase(params RequestParameters, purchase *Purchase) (*Purchase, error)
- func (c *Client) UpdateTerm(params RequestParameters, term *Term) (*Term, error)
- func (c *Client) UpdateTimeActivity(params RequestParameters, timeActivity *TimeActivity) (*TimeActivity, error)
- func (c *Client) UpdateVendor(params RequestParameters, vendor *Vendor) (*Vendor, error)
- func (c *Client) UpdateVendorCredit(params RequestParameters, vendorCredit *VendorCredit) (*VendorCredit, error)
- func (c *Client) UploadAttachable(realmId string, attachable *Attachable, data io.Reader) (*Attachable, error)
- func (c *Client) VoidBillPayment(params RequestParameters, billPayment BillPayment) error
- func (c *Client) VoidEstimate(params RequestParameters, estimate Estimate) error
- func (c *Client) VoidInvoice(params RequestParameters, invoice Invoice) error
- func (c *Client) VoidPayment(params RequestParameters, payment Payment) error
- type ClientRequest
- type CompanyInfo
- type ContactInfo
- type ContentType
- type CreditMemo
- type CustomField
- type Customer
- type CustomerType
- type Date
- type DateTime
- type DeliveryInfo
- type Deposit
- type DepositLineDetail
- type DescriptionLineDetail
- type DiscountLineDetail
- type DiscoveryAPI
- type EmailAddress
- type Employee
- type Estimate
- type Failure
- type GroupLineDetail
- type Invoice
- type Item
- type ItemBasedExpenseLineDetail
- type Line
- type LineDetailTypeEnum
- type LinkedTxn
- type MarkupInfo
- type MemoRef
- type ModificationMetaData
- type Payment
- type PaymentMethod
- type PhysicalAddress
- type PrintStatusEnum
- type Purchase
- type RateLimitError
- type RateLimiterManager
- type RealmRateLimiters
- type ReferenceType
- type ReimburseCharge
- type ReimburseLineDetail
- type RequestParameters
- type SalesItemLineDetail
- type SubTotalLineDetail
- type TaxCode
- type TaxLineDetail
- type TaxRate
- type TaxRateDetail
- type TaxRateList
- type TaxTypeEnum
- type TelephoneNumber
- type Term
- type TimeActivity
- type TxnTaxDetail
- type Vendor
- type VendorCredit
- type WebSiteAddress
Constants ¶
const (
QueryPageSize = 1000
)
Variables ¶
This section is empty.
Functions ¶
func BatchEntityExtractor ¶
func BatchEntityExtractor[T any](response *BatchItemResponse) (T, bool)
func BatchQueryExtractor ¶
func BatchQueryExtractor[T any](response *BatchItemResponse) []T
func CDCQueryExtractor ¶
func CDCQueryExtractor[T any](response *ChangeDataCapture) []T
Types ¶
type Account ¶
type Account struct {
CurrencyRef *ReferenceType `json:",omitempty"`
ParentRef *ReferenceType `json:",omitempty"`
TaxCodeRef *ReferenceType `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
CurrentBalanceWithSubAccounts json.Number `json:",omitempty"`
CurrentBalance json.Number `json:",omitempty"`
AccountType AccountTypeEnum `json:",omitempty"`
Id string `json:",omitempty"`
Name string
SyncToken string `json:",omitempty"`
AcctNum string `json:",omitempty"`
Description string `json:",omitempty"`
Classification string `json:",omitempty"`
FullyQualifiedName string `json:",omitempty"`
TxnLocationType string `json:",omitempty"`
AccountSubType string `json:",omitempty"`
Active bool `json:",omitempty"`
SubAccount bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type AccountBasedExpenseLineDetail ¶
type AccountBasedExpenseLineDetail struct {
AccountRef ReferenceType
TaxAmount json.Number `json:",omitempty"`
// TaxInclusiveAmt json.Number `json:",omitempty"`
ClassRef ReferenceType `json:",omitempty"`
TaxCodeRef ReferenceType `json:",omitempty"`
MarkupInfo MarkupInfo `json:",omitempty"`
BillableStatus BillableStatusEnum `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
}
AccountBasedExpenseLineDetail ...
type AccountTypeEnum ¶
type AccountTypeEnum string
const ( BankAccountType AccountTypeEnum = "Bank" OtherCurrentAssetAccountType AccountTypeEnum = "Other Current Asset" FixedAssetAccountType AccountTypeEnum = "Fixed Asset" OtherAssetAccountType AccountTypeEnum = "Other Asset" AccountsReceivableAccountType AccountTypeEnum = "Accounts Receivable" EquityAccountType AccountTypeEnum = "Equity" ExpenseAccountType AccountTypeEnum = "Expense" OtherExpenseAccountType AccountTypeEnum = "Other Expense" CostOfGoodsSoldAccountType AccountTypeEnum = "Cost of Goods Sold" AccountsPayableAccountType AccountTypeEnum = "Accounts Payable" CreditCardAccountType AccountTypeEnum = "Credit Card" LongTermLiabilityAccountType AccountTypeEnum = "Long Term Liability" OtherCurrentLiabilityAccountType AccountTypeEnum = "Other Current Liability" IncomeAccountType AccountTypeEnum = "Income" OtherIncomeAccountType AccountTypeEnum = "Other Income" )
type Attachable ¶
type Attachable struct {
Id string `json:"Id,omitempty"`
SyncToken string `json:",omitempty"`
FileName string `json:",omitempty"`
Note string `json:",omitempty"`
Category string `json:",omitempty"`
ContentType ContentType `json:",omitempty"`
PlaceName string `json:",omitempty"`
AttachableRef []AttachableRef `json:",omitempty"`
Long string `json:",omitempty"`
Tag string `json:",omitempty"`
Lat string `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
FileAccessUri string `json:",omitempty"`
Size json.Number `json:",omitempty"`
ThumbnailFileAccessUri string `json:",omitempty"`
TempDownloadUri string `json:",omitempty"`
ThumbnailTempDownloadUri string `json:",omitempty"`
}
type AttachableRef ¶
type AttachableRef struct {
IncludeOnSend bool `json:",omitempty"`
LineInfo string `json:",omitempty"`
NoRefOnly bool `json:",omitempty"`
// CustomField[0..n]
Inactive bool `json:",omitempty"`
EntityRef ReferenceType `json:",omitempty"`
}
type BatchFault ¶
type BatchFaultResponse ¶
type BatchFaultResponse struct {
FaultType string `json:"type"`
Faults []BatchFault `json:"Error"`
}
type BatchItemRequest ¶
type BatchItemRequest struct {
BID string `json:"bId"`
OptionsData BatchOptions `json:"optionsData,omitempty"`
Operation BatchOperations `json:"operation,omitempty"`
Query string `json:",omitempty"`
}
type BatchItemResponse ¶
type BatchItemResponse struct {
BID string `json:"bId"`
Account Account `json:",omitempty"`
Bill Bill `json:",omitempty"`
BillPayment BillPayment `json:",omitempty"`
Class Class `json:",omitempty"`
CreditMemo CreditMemo `json:",omitempty"`
Customer Customer `json:",omitempty"`
CustomerType CustomerType `json:",omitempty"`
Deposit Deposit `json:",omitempty"`
Employee Employee `json:",omitempty"`
Estimate Estimate `json:",omitempty"`
Invoice Invoice `json:",omitempty"`
Item Item `json:",omitempty"`
Payment Payment `json:",omitempty"`
PaymentMethod PaymentMethod `json:",omitempty"`
Purchase Purchase `json:",omitempty"`
ReimburseCharge ReimburseCharge `json:",omitempty"`
TaxCode TaxCode `json:",omitempty"`
TaxRate TaxRate `json:",omitempty"`
Term Term `json:",omitempty"`
TimeActivity TimeActivity `json:",omitempty"`
Vendor Vendor `json:",omitempty"`
VendorCredit VendorCredit `json:",omitempty"`
Fault BatchFaultResponse `json:",omitempty"`
QueryResponse struct {
Account []Account `json:",omitempty"`
Bill []Bill `json:",omitempty"`
BillPayment []BillPayment `json:",omitempty"`
Class []Class `json:",omitempty"`
CreditMemo []CreditMemo `json:",omitempty"`
Customer []Customer `json:",omitempty"`
CustomerType []CustomerType `json:",omitempty"`
Deposit []Deposit `json:",omitempty"`
Employee []Employee `json:",omitempty"`
Estimate []Estimate `json:",omitempty"`
Invoice []Invoice `json:",omitempty"`
Item []Item `json:",omitempty"`
Payment []Payment `json:",omitempty"`
PaymentMethod []PaymentMethod `json:",omitempty"`
Purchase []Purchase `json:",omitempty"`
ReimburseCharge []ReimburseCharge `json:",omitempty"`
TaxCode []TaxCode `json:",omitempty"`
TaxRate []TaxRate `json:",omitempty"`
Term []Term `json:",omitempty"`
TimeActivity []TimeActivity `json:",omitempty"`
Vendor []Vendor `json:",omitempty"`
VendorCredit []VendorCredit `json:",omitempty"`
StartPosition int `json:"startPosition"`
MaxResults int `json:"maxResults"`
TotalCount int `json:"totalCount,omitempty"`
} `json:"QueryResponse,omitempty"`
}
type BatchOperations ¶
type BatchOperations string
const ( Create BatchOperations = "create" Update BatchOperations = "update" Delete BatchOperations = "delete" )
type BearerToken ¶
type BearerToken struct {
RefreshToken string `json:"refresh_token"`
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
IdToken string `json:"id_token"`
ExpiresIn json.Number `json:"expires_in"`
ExpiresOn time.Time `json:"expires_on,omitempty"`
XRefreshTokenExpiresIn json.Number `json:"x_refresh_token_expires_in"`
}
func (*BearerToken) CheckExpiration ¶
func (b *BearerToken) CheckExpiration(s int) bool
CheckExpiration Check if the tokens ExpiresOn value is within the next s seconds
type Bill ¶
type Bill struct {
Line []Line
LinkedTxn []LinkedTxn `json:",omitempty"`
VendorRef ReferenceType
CurrencyRef ReferenceType `json:",omitempty"`
APAccountRef *ReferenceType `json:",omitempty"`
SalesTermRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
RecurDataRef *ReferenceType `json:",omitempty"`
TxnTaxDetail *TxnTaxDetail `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
TxnDate Date `json:",omitempty"`
DueDate Date `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
HomeBalance json.Number `json:",omitempty"`
Balance json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
TransactionLocationType string `json:",omitempty"`
DocNumber string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type BillPayment ¶
type BillPayment struct {
Line []Line
LinkedTxn []LinkedTxn `json:",omitempty"`
VendorRef ReferenceType
CurrencyRef ReferenceType `json:",omitempty"`
APAccountRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
CheckPayment BillPaymentCheck `json:",omitempty"`
CreditCardPayment BillPaymentCreditCard `json:",omitempty"`
TxnDate Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
TotalAmt json.Number
ExchangeRate json.Number `json:",omitempty"`
PayType BillPaymentTypeEnum
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
DocNumber string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
ProcessBillPayment bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type BillPaymentCheck ¶
type BillPaymentCheck struct {
BankAccountRef ReferenceType `json:",omitempty"`
PrintStatus PrintStatusEnum `json:",omitempty"`
}
type BillPaymentCreditCard ¶
type BillPaymentCreditCard struct {
CCAccountRef ReferenceType `json:",omitempty"`
}
type BillPaymentTypeEnum ¶
type BillPaymentTypeEnum string
const ( CheckPaymentType BillPaymentTypeEnum = "Check" CreditCardPaymentType BillPaymentTypeEnum = "CreditCard" )
type BillableStatusEnum ¶
type BillableStatusEnum string
const ( BillableStatusType BillableStatusEnum = "Billable" NotBillableStatusType BillableStatusEnum = "NotBillable" HasBeenBilledStatusType BillableStatusEnum = "HasBeenBilled" )
type ChangeDataCapture ¶
type ChangeDataCapture struct {
CDCResponse []struct {
QueryResponse []struct {
Account []Account `json:",omitempty"`
Bill []Bill `json:",omitempty"`
BillPayment []BillPayment `json:",omitempty"`
Class []Class `json:",omitempty"`
Customer []Customer `json:",omitempty"`
CustomerType []CustomerType `json:",omitempty"`
Deposit []Deposit `json:",omitempty"`
Employee []Employee `json:",omitempty"`
Estimate []Estimate `json:",omitempty"`
Invoice []Invoice `json:",omitempty"`
Item []Item `json:",omitempty"`
Payment []Payment `json:",omitempty"`
PaymentMethod []PaymentMethod `json:",omitempty"`
Purchase []Purchase `json:",omitempty"`
ReimburseCharge []ReimburseCharge `json:",omitempty"`
Term []Term `json:",omitempty"`
Vendor []Vendor `json:",omitempty"`
VendorCredit []VendorCredit `json:",omitempty"`
StartPosition int `json:"startPosition"`
MaxResults int `json:"maxResults"`
TotalCount int `json:"totalCount,omitempty"`
} `json:"QueryResponse"`
} `json:"CDCResponse"`
Time string `json:"time"`
}
type Class ¶
type Class struct {
ParentRef ReferenceType `json:",omitempty"`
MetaDate ModificationMetaData `json:",omitempty"`
Id string `json:",omitempty"`
Name string `json:",omitempty"`
FullyQualifiedName string `json:",omitempty"`
SyncToken string `json:",omitempty"`
SubClass bool `json:",omitempty"`
Active bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type Client ¶
Client is your handle to the QuickBooks API.
func NewClient ¶
func NewClient(req ClientRequest) (c *Client, err error)
NewClient initializes a new QuickBooks client for interacting with their Online API
func (*Client) BatchRequest ¶
func (c *Client) BatchRequest(params RequestParameters, batchRequests []BatchItemRequest) ([]BatchItemResponse, error)
func (*Client) ChangeDataCapture ¶
func (c *Client) ChangeDataCapture(params RequestParameters, entities []string, changedSince time.Time) (ChangeDataCapture, error)
func (*Client) CreateAccount ¶
func (c *Client) CreateAccount(params RequestParameters, account *Account) (*Account, error)
CreateAccount creates the given account within QuickBooks
func (*Client) CreateAttachable ¶
func (c *Client) CreateAttachable(params RequestParameters, attachable *Attachable) (*Attachable, error)
CreateAttachable creates the given Attachable on the QuickBooks server, returning the resulting Attachable object.
func (*Client) CreateBill ¶
func (c *Client) CreateBill(params RequestParameters, bill *Bill) (*Bill, error)
CreateBill creates the given Bill on the QuickBooks server, returning the resulting Bill object.
func (*Client) CreateBillPayment ¶
func (c *Client) CreateBillPayment(params RequestParameters, billPayment *BillPayment) (*BillPayment, error)
CreateBillPayment creates the given Bill on the QuickBooks server, returning the resulting Bill object.
func (*Client) CreateClass ¶
func (c *Client) CreateClass(params RequestParameters, class *Class) (*Class, error)
CreateClass creates the given Class on the QuickBooks server, returning the resulting Class object.
func (*Client) CreateCreditMemo ¶
func (c *Client) CreateCreditMemo(params RequestParameters, creditMemo *CreditMemo) (*CreditMemo, error)
CreateCreditMemo creates the given CreditMemo witin QuickBooks.
func (*Client) CreateCustomer ¶
func (c *Client) CreateCustomer(params RequestParameters, customer *Customer) (*Customer, error)
CreateCustomer creates the given Customer on the QuickBooks server, returning the resulting Customer object.
func (*Client) CreateDeposit ¶
func (c *Client) CreateDeposit(params RequestParameters, deposit *Deposit) (*Deposit, error)
CreateDeposit creates the given deposit within QuickBooks
func (*Client) CreateEmployee ¶
func (c *Client) CreateEmployee(params RequestParameters, employee *Employee) (*Employee, error)
CreateEmployee creates the given employee within QuickBooks
func (*Client) CreateEstimate ¶
func (c *Client) CreateEstimate(params RequestParameters, estimate *Estimate) (*Estimate, error)
CreateEstimate creates the given Estimate on the QuickBooks server, returning the resulting Estimate object.
func (*Client) CreateInvoice ¶
func (c *Client) CreateInvoice(params RequestParameters, invoice *Invoice) (*Invoice, error)
CreateInvoice creates the given Invoice on the QuickBooks server, returning the resulting Invoice object.
func (*Client) CreateItem ¶
func (c *Client) CreateItem(params RequestParameters, item *Item) (*Item, error)
func (*Client) CreatePayment ¶
func (c *Client) CreatePayment(params RequestParameters, payment *Payment) (*Payment, error)
CreatePayment creates the given payment within QuickBooks.
func (*Client) CreatePaymentMethod ¶
func (c *Client) CreatePaymentMethod(params RequestParameters, paymentMethod *PaymentMethod) (*PaymentMethod, error)
CreatePaymentMethod creates the given PaymentMethod on the QuickBooks server, returning the resulting PaymentMethod object.
func (*Client) CreatePurchase ¶
func (c *Client) CreatePurchase(params RequestParameters, purchase *Purchase) (*Purchase, error)
CreatePurchase creates the given Purchase on the QuickBooks server, returning the resulting Purchase object.
func (*Client) CreateTerm ¶
func (c *Client) CreateTerm(params RequestParameters, term *Term) (*Term, error)
CreateTerm creates the given Term on the QuickBooks server, returning the resulting Term object.
func (*Client) CreateTimeActivity ¶
func (c *Client) CreateTimeActivity(params RequestParameters, timeActivity *TimeActivity) (*TimeActivity, error)
CreateTimeActivity creates the given TimeActivity on the QuickBooks server, returning the resulting TimeActivity object.
func (*Client) CreateVendor ¶
func (c *Client) CreateVendor(params RequestParameters, vendor *Vendor) (*Vendor, error)
CreateVendor creates the given Vendor on the QuickBooks server, returning the resulting Vendor object.
func (*Client) CreateVendorCredit ¶
func (c *Client) CreateVendorCredit(params RequestParameters, vendorCredit *VendorCredit) (*VendorCredit, error)
CreateVendorCredit creates the given VendorCredit on the QuickBooks server, returning the resulting VendorCredit object.
func (*Client) DeleteAttachable ¶
func (c *Client) DeleteAttachable(params RequestParameters, attachable *Attachable) error
DeleteAttachable deletes the attachable
func (*Client) DeleteBill ¶
func (c *Client) DeleteBill(params RequestParameters, bill *Bill) error
DeleteBill deletes the bill
func (*Client) DeleteBillPayment ¶
func (c *Client) DeleteBillPayment(params RequestParameters, billPayment *BillPayment) error
DeleteBill deletes the bill
func (*Client) DeleteCreditMemo ¶
func (c *Client) DeleteCreditMemo(params RequestParameters, creditMemo *CreditMemo) error
DeleteCreditMemo deletes the given credit memo.
func (*Client) DeleteDeposit ¶
func (c *Client) DeleteDeposit(params RequestParameters, deposit *Deposit) error
func (*Client) DeleteEstimate ¶
func (c *Client) DeleteEstimate(params RequestParameters, estimate *Estimate) error
DeleteEstimate deletes the estimate
func (*Client) DeleteInvoice ¶
func (c *Client) DeleteInvoice(params RequestParameters, invoice *Invoice) error
DeleteInvoice deletes the invoice
If the invoice was already deleted, QuickBooks returns 400 :( The response looks like this: {"Fault":{"Error":[{"Message":"Object Not Found","Detail":"Object Not Found : Something you're trying to use has been made inactive. Check the fields with accounts, invoices, items, vendors or employees.","code":"610","element":""}],"type":"ValidationFault"},"time":"2018-03-20T20:15:59.571-07:00"}
This is slightly horrifying and not documented in their API. When this happens we just return success; the goal of deleting it has been accomplished, just not by us.
func (*Client) DeletePayment ¶
func (c *Client) DeletePayment(params RequestParameters, payment *Payment) error
DeletePayment deletes the given payment from QuickBooks.
func (*Client) DeletePurchase ¶
func (c *Client) DeletePurchase(params RequestParameters, purchase *Purchase) error
DeletePurchase deletes the purchase
func (*Client) DeleteTimeActivity ¶
func (c *Client) DeleteTimeActivity(params RequestParameters, timeActivity *TimeActivity) error
DeleteTimeActivity deletes the timeActivity
func (*Client) DeleteVendorCredit ¶
func (c *Client) DeleteVendorCredit(params RequestParameters, vendorCredit *VendorCredit) error
DeleteVendorCredit deletes the vendorCredit
func (*Client) DownloadAttachable ¶
DownloadAttachable downloads the attachable
func (*Client) FindAccountById ¶
func (c *Client) FindAccountById(params RequestParameters, id string) (*Account, error)
FindAccountById returns an account with a given Id.
func (*Client) FindAccounts ¶
func (c *Client) FindAccounts(params RequestParameters) ([]Account, error)
FindAccounts gets the full list of Accounts in the QuickBooks account.
func (*Client) FindAccountsByPage ¶
func (c *Client) FindAccountsByPage(params RequestParameters, startPosition, pageSize int) ([]Account, error)
func (*Client) FindAttachableById ¶
func (c *Client) FindAttachableById(params RequestParameters, id string) (*Attachable, error)
FindAttachableById finds the attachable by the given id
func (*Client) FindAttachables ¶
func (c *Client) FindAttachables(params RequestParameters) ([]Attachable, error)
FindAttachables gets the full list of Attachables in the QuickBooks attachable.
func (*Client) FindAuthorizationUrl ¶
func (c *Client) FindAuthorizationUrl(scope string, state string, redirectUri string) (string, error)
FindAuthorizationUrl compiles the authorization url from the discovery api's auth endpoint.
Example: qbClient.FindAuthorizationUrl("com.intuit.quickbooks.accounting", "security_token", "https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl")
You can find live examples from https://developer.intuit.com/app/developer/playground
func (*Client) FindBillById ¶
func (c *Client) FindBillById(params RequestParameters, id string) (*Bill, error)
FindBillById finds the bill by the given id
func (*Client) FindBillPaymentById ¶
func (c *Client) FindBillPaymentById(params RequestParameters, id string) (*BillPayment, error)
FindBillById finds the bill by the given id
func (*Client) FindBillPayments ¶
func (c *Client) FindBillPayments(params RequestParameters) ([]BillPayment, error)
FindBills gets the full list of Bills in the QuickBooks account.
func (*Client) FindBillPaymentsByPage ¶
func (c *Client) FindBillPaymentsByPage(params RequestParameters, startPosition, pageSize int) ([]BillPayment, error)
func (*Client) FindBills ¶
func (c *Client) FindBills(params RequestParameters) ([]Bill, error)
FindBills gets the full list of Bills in the QuickBooks account.
func (*Client) FindBillsByPage ¶
func (c *Client) FindBillsByPage(params RequestParameters, startPosition, pageSize int) ([]Bill, error)
func (*Client) FindClassById ¶
func (c *Client) FindClassById(params RequestParameters, id string) (*Class, error)
FindClassById finds the class by the given id
func (*Client) FindClasses ¶
func (c *Client) FindClasses(params RequestParameters) ([]Class, error)
FindClasss gets the full list of Classs in the QuickBooks account.
func (*Client) FindClassesByPage ¶
func (c *Client) FindClassesByPage(params RequestParameters, startPosition, pageSize int) ([]Class, error)
func (*Client) FindCompanyInfo ¶
func (c *Client) FindCompanyInfo(params RequestParameters) (*CompanyInfo, error)
FindCompanyInfo returns the QuickBooks CompanyInfo object. This is a good test to check whether you're connected.
func (*Client) FindCreditMemoById ¶
func (c *Client) FindCreditMemoById(params RequestParameters, id string) (*CreditMemo, error)
FindCreditMemoById retrieves the given credit memo from QuickBooks.
func (*Client) FindCreditMemos ¶
func (c *Client) FindCreditMemos(params RequestParameters) ([]CreditMemo, error)
FindCreditMemos retrieves the full list of credit memos from QuickBooks.
func (*Client) FindCustomerById ¶
func (c *Client) FindCustomerById(params RequestParameters, id string) (*Customer, error)
FindCustomerById returns a customer with a given Id.
func (*Client) FindCustomerByName ¶
func (c *Client) FindCustomerByName(params RequestParameters, name string) (*Customer, error)
FindCustomerByName gets a customer with a given name.
func (*Client) FindCustomerTypeById ¶
func (c *Client) FindCustomerTypeById(params RequestParameters, id string) (*CustomerType, error)
FindCustomerTypeById returns a customerType with a given Id.
func (*Client) FindCustomerTypesByPage ¶
func (c *Client) FindCustomerTypesByPage(params RequestParameters, startPosition, pageSize int) ([]CustomerType, error)
func (*Client) FindCustomers ¶
func (c *Client) FindCustomers(params RequestParameters) ([]Customer, error)
FindCustomers gets the full list of Customers in the QuickBooks account.
func (*Client) FindCustomersByPage ¶
func (c *Client) FindCustomersByPage(params RequestParameters, startPosition, pageSize int) ([]Customer, error)
func (*Client) FindDepositById ¶
func (c *Client) FindDepositById(params RequestParameters, id string) (*Deposit, error)
FindDepositById returns an deposit with a given Id.
func (*Client) FindDeposits ¶
func (c *Client) FindDeposits(params RequestParameters) ([]Deposit, error)
FindDeposits gets the full list of Deposits in the QuickBooks account.
func (*Client) FindDepositsByPage ¶
func (c *Client) FindDepositsByPage(params RequestParameters, startPosition, pageSize int) ([]Deposit, error)
func (*Client) FindEmployeeById ¶
func (c *Client) FindEmployeeById(params RequestParameters, id string) (*Employee, error)
FindEmployeeById returns an employee with a given Id.
func (*Client) FindEmployees ¶
func (c *Client) FindEmployees(params RequestParameters) ([]Employee, error)
FindEmployees gets the full list of Employees in the QuickBooks account.
func (*Client) FindEmployeesByPage ¶
func (c *Client) FindEmployeesByPage(params RequestParameters, startPosition, pageSize int) ([]Employee, error)
func (*Client) FindEstimateById ¶
func (c *Client) FindEstimateById(params RequestParameters, id string) (*Estimate, error)
FindEstimateById finds the estimate by the given id
func (*Client) FindEstimates ¶
func (c *Client) FindEstimates(params RequestParameters) ([]Estimate, error)
FindEstimates gets the full list of Estimates in the QuickBooks account.
func (*Client) FindEstimatesByPage ¶
func (c *Client) FindEstimatesByPage(params RequestParameters, startPosition, pageSize int) ([]Estimate, error)
func (*Client) FindInvoiceById ¶
func (c *Client) FindInvoiceById(params RequestParameters, id string) (*Invoice, error)
FindInvoiceById finds the invoice by the given id
func (*Client) FindInvoices ¶
func (c *Client) FindInvoices(params RequestParameters) ([]Invoice, error)
FindInvoices gets the full list of Invoices in the QuickBooks account.
func (*Client) FindInvoicesByPage ¶
func (c *Client) FindInvoicesByPage(params RequestParameters, startPosition, pageSize int) ([]Invoice, error)
func (*Client) FindItemById ¶
func (c *Client) FindItemById(params RequestParameters, id string) (*Item, error)
FindItemById returns an item with a given Id.
func (*Client) FindItems ¶
func (c *Client) FindItems(params RequestParameters) ([]Item, error)
FindItems gets the full list of Items in the QuickBooks account.
func (*Client) FindItemsByPage ¶
func (c *Client) FindItemsByPage(params RequestParameters, startPosition, pageSize int) ([]Item, error)
func (*Client) FindPaymentById ¶
func (c *Client) FindPaymentById(params RequestParameters, id string) (*Payment, error)
FindPaymentById returns an payment with a given Id.
func (*Client) FindPaymentMethodById ¶
func (c *Client) FindPaymentMethodById(params RequestParameters, id string) (*PaymentMethod, error)
FindPaymentMethodById finds the estimate by the given id
func (*Client) FindPaymentMethods ¶
func (c *Client) FindPaymentMethods(params RequestParameters) ([]PaymentMethod, error)
FindPaymentMethods gets the full list of PaymentMethods in the QuickBooks account.
func (*Client) FindPaymentMethodsByPage ¶
func (c *Client) FindPaymentMethodsByPage(params RequestParameters, startPosition, pageSize int) ([]PaymentMethod, error)
func (*Client) FindPayments ¶
func (c *Client) FindPayments(params RequestParameters) ([]Payment, error)
FindPayments gets the full list of Payments in the QuickBooks account.
func (*Client) FindPaymentsByPage ¶
func (c *Client) FindPaymentsByPage(params RequestParameters, startPosition, pageSize int) ([]Payment, error)
func (*Client) FindPurchaseById ¶
func (c *Client) FindPurchaseById(params RequestParameters, id string) (*Purchase, error)
FindPurchaseById finds the purchase by the given id
func (*Client) FindPurchases ¶
func (c *Client) FindPurchases(params RequestParameters) ([]Purchase, error)
FindPurchases gets the full list of Purchases in the QuickBooks account.
func (*Client) FindPurchasesByPage ¶
func (c *Client) FindPurchasesByPage(params RequestParameters, startPosition, pageSize int) ([]Purchase, error)
func (*Client) FindReimburseChargeById ¶
func (c *Client) FindReimburseChargeById(params RequestParameters, id string) (*ReimburseCharge, error)
FindReimburseChargeById finds the reimburseCharge by the given id
func (*Client) FindReimburseCharges ¶
func (c *Client) FindReimburseCharges(params RequestParameters) ([]ReimburseCharge, error)
FindReimburseCharges gets the full list of ReimburseCharges in the QuickBooks account.
func (*Client) FindReimburseChargesByPage ¶
func (c *Client) FindReimburseChargesByPage(params RequestParameters, startPosition, pageSize int) ([]ReimburseCharge, error)
func (*Client) FindTaxCodeById ¶
func (c *Client) FindTaxCodeById(params RequestParameters, id string) (*TaxCode, error)
FindTaxCodeById finds the taxCode by the given id
func (*Client) FindTaxCodes ¶
func (c *Client) FindTaxCodes(params RequestParameters) ([]TaxCode, error)
FindTaxCodes gets the full list of TaxCodes in the QuickBooks account.
func (*Client) FindTaxCodesByPage ¶
func (c *Client) FindTaxCodesByPage(params RequestParameters, startPosition, pageSize int) ([]TaxCode, error)
func (*Client) FindTaxRateById ¶
func (c *Client) FindTaxRateById(params RequestParameters, id string) (*TaxRate, error)
FindTaxRateById finds the taxRate by the given id
func (*Client) FindTaxRates ¶
func (c *Client) FindTaxRates(params RequestParameters) ([]TaxRate, error)
FindTaxRates gets the full list of TaxRates in the QuickBooks account.
func (*Client) FindTaxRatesByPage ¶
func (c *Client) FindTaxRatesByPage(params RequestParameters, startPosition, pageSize int) ([]TaxRate, error)
func (*Client) FindTermById ¶
func (c *Client) FindTermById(params RequestParameters, id string) (*Term, error)
FindTermById finds the term by the given id
func (*Client) FindTerms ¶
func (c *Client) FindTerms(params RequestParameters) ([]Term, error)
FindTerms gets the full list of Terms in the QuickBooks account.
func (*Client) FindTermsByPage ¶
func (c *Client) FindTermsByPage(params RequestParameters, startPosition, pageSize int) ([]Term, error)
func (*Client) FindTimeActivities ¶
func (c *Client) FindTimeActivities(params RequestParameters) ([]TimeActivity, error)
FindTimeActivitys gets the full list of TimeActivitys in the QuickBooks account.
func (*Client) FindTimeActivitiesByPage ¶
func (c *Client) FindTimeActivitiesByPage(params RequestParameters, startPosition, pageSize int) ([]TimeActivity, error)
func (*Client) FindTimeActivityById ¶
func (c *Client) FindTimeActivityById(params RequestParameters, id string) (*TimeActivity, error)
FindTimeActivityById finds the timeActivity by the given id
func (*Client) FindVendorById ¶
func (c *Client) FindVendorById(params RequestParameters, id string) (*Vendor, error)
FindVendorById finds the vendor by the given id
func (*Client) FindVendorCreditById ¶
func (c *Client) FindVendorCreditById(params RequestParameters, id string) (*VendorCredit, error)
FindVendorCreditById finds the vendorCredit by the given id
func (*Client) FindVendorCredits ¶
func (c *Client) FindVendorCredits(params RequestParameters) ([]VendorCredit, error)
FindVendorCredits gets the full list of VendorCredits in the QuickBooks account.
func (*Client) FindVendorCreditsByPage ¶
func (c *Client) FindVendorCreditsByPage(params RequestParameters, startPosition, pageSize int) ([]VendorCredit, error)
func (*Client) FindVendors ¶
func (c *Client) FindVendors(params RequestParameters) ([]Vendor, error)
FindVendors gets the full list of Vendors in the QuickBooks account.
func (*Client) FindVendorsByPage ¶
func (c *Client) FindVendorsByPage(params RequestParameters, startPosition, pageSize int) ([]Vendor, error)
func (*Client) QueryAccounts ¶
func (c *Client) QueryAccounts(params RequestParameters, query string) ([]Account, error)
QueryAccounts accepts an SQL query and returns all accounts found using it
func (*Client) QueryAttachables ¶
func (c *Client) QueryAttachables(params RequestParameters, query string) ([]Attachable, error)
QueryAttachables accepts an SQL query and returns all attachables found using it
func (*Client) QueryBillPayments ¶
func (c *Client) QueryBillPayments(params RequestParameters, query string) ([]BillPayment, error)
QueryBills accepts an SQL query and returns all bills found using it
func (*Client) QueryBills ¶
func (c *Client) QueryBills(params RequestParameters, query string) ([]Bill, error)
QueryBills accepts an SQL query and returns all bills found using it
func (*Client) QueryClasses ¶
func (c *Client) QueryClasses(params RequestParameters, query string) ([]Class, error)
QueryClasss accepts an SQL query and returns all classs found using it
func (*Client) QueryCreditMemos ¶
func (c *Client) QueryCreditMemos(params RequestParameters, query string) ([]CreditMemo, error)
QueryCreditMemos accepts n SQL query and returns all credit memos found using it.
func (*Client) QueryCustomerTypes ¶
func (c *Client) QueryCustomerTypes(params RequestParameters, query string) ([]CustomerType, error)
QueryCustomerTypes accepts an SQL query and returns all customerTypes found using it
func (*Client) QueryCustomers ¶
func (c *Client) QueryCustomers(params RequestParameters, query string) ([]Customer, error)
QueryCustomers accepts an SQL query and returns all customers found using it
func (*Client) QueryDeposits ¶
func (c *Client) QueryDeposits(params RequestParameters, query string) ([]Deposit, error)
QueryDeposits accepts an SQL query and returns all deposits found using it
func (*Client) QueryEmployees ¶
func (c *Client) QueryEmployees(params RequestParameters, query string) ([]Employee, error)
QueryEmployees accepts an SQL query and returns all employees found using it
func (*Client) QueryEstimates ¶
func (c *Client) QueryEstimates(params RequestParameters, query string) ([]Estimate, error)
QueryEstimates accepts an SQL query and returns all estimates found using it
func (*Client) QueryInvoices ¶
func (c *Client) QueryInvoices(params RequestParameters, query string) ([]Invoice, error)
QueryInvoices accepts an SQL query and returns all invoices found using it
func (*Client) QueryItems ¶
func (c *Client) QueryItems(params RequestParameters, query string) ([]Item, error)
QueryItems accepts an SQL query and returns all items found using it
func (*Client) QueryPaymentMethods ¶
func (c *Client) QueryPaymentMethods(params RequestParameters, query string) ([]PaymentMethod, error)
QueryPaymentMethods accepts an SQL query and returns all estimates found using it
func (*Client) QueryPayments ¶
func (c *Client) QueryPayments(params RequestParameters, query string) ([]Payment, error)
QueryPayments accepts a SQL query and returns all payments found using it.
func (*Client) QueryPurchases ¶
func (c *Client) QueryPurchases(params RequestParameters, query string) ([]Purchase, error)
QueryPurchases accepts an SQL query and returns all purchases found using it
func (*Client) QueryReimburseCharges ¶
func (c *Client) QueryReimburseCharges(params RequestParameters, query string) ([]ReimburseCharge, error)
QueryReimburseCharges accepts an SQL query and returns all reimburseCharges found using it
func (*Client) QueryTaxCodes ¶
func (c *Client) QueryTaxCodes(params RequestParameters, query string) ([]TaxCode, error)
QueryTaxCodes accepts an SQL query and returns all taxCodes found using it
func (*Client) QueryTaxRates ¶
func (c *Client) QueryTaxRates(params RequestParameters, query string) ([]TaxRate, error)
QueryTaxRates accepts an SQL query and returns all taxRates found using it
func (*Client) QueryTerms ¶
func (c *Client) QueryTerms(params RequestParameters, query string) ([]Term, error)
QueryTerms accepts an SQL query and returns all terms found using it
func (*Client) QueryTimeActivities ¶
func (c *Client) QueryTimeActivities(params RequestParameters, query string) ([]TimeActivity, error)
QueryTimeActivitys accepts an SQL query and returns all timeActivitys found using it
func (*Client) QueryVendorCredits ¶
func (c *Client) QueryVendorCredits(params RequestParameters, query string) ([]VendorCredit, error)
QueryVendorCredits accepts an SQL query and returns all vendorCredits found using it
func (*Client) QueryVendors ¶
func (c *Client) QueryVendors(params RequestParameters, query string) ([]Vendor, error)
QueryVendors accepts an SQL query and returns all vendors found using it
func (*Client) RefreshToken ¶
func (c *Client) RefreshToken(refreshToken string) (*BearerToken, error)
RefreshToken Call the refresh endpoint to generate new tokens
func (*Client) RetrieveBearerToken ¶
func (c *Client) RetrieveBearerToken(authorizationCode, redirectURI string) (*BearerToken, error)
RetrieveBearerToken Method to retrieve access token (bearer token). This method can only be called once
func (*Client) RevokeToken ¶
RevokeToken Call the revoke endpoint to revoke tokens
func (*Client) SendEstimate ¶
func (c *Client) SendEstimate(params RequestParameters, estimateId, emailAddress string) error
SendEstimate sends the estimate to the Estimate.BillEmail if emailAddress is left empty
func (*Client) SendInvoice ¶
func (c *Client) SendInvoice(params RequestParameters, invoiceId, emailAddress string) error
SendInvoice sends the invoice to the Invoice.BillEmail if emailAddress is left empty
func (*Client) SparseUpdateCustomer ¶
func (c *Client) SparseUpdateCustomer(params RequestParameters, customer *Customer) (*Customer, error)
SparseUpdateCustomer updates only fields included in the customer struct, other fields are left unmodified
func (*Client) SparseUpdateDeposit ¶
func (c *Client) SparseUpdateDeposit(params RequestParameters, deposit *Deposit) (*Deposit, error)
SparseUpdateDeposit updates only fields included in the deposit struct, other fields are left unmodified
func (*Client) SparseUpdateEstimate ¶
func (c *Client) SparseUpdateEstimate(params RequestParameters, estimate *Estimate) (*Estimate, error)
SparseUpdateEstimate updates only fields included in the estimate struct, other fields are left unmodified
func (*Client) SparseUpdateInvoice ¶
func (c *Client) SparseUpdateInvoice(params RequestParameters, invoice *Invoice) (*Invoice, error)
SparseUpdateInvoice updates only fields included in the invoice struct, other fields are left unmodified
func (*Client) UpdateAccount ¶
func (c *Client) UpdateAccount(params RequestParameters, account *Account) (*Account, error)
UpdateAccount full updates the account, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateAttachable ¶
func (c *Client) UpdateAttachable(params RequestParameters, attachable *Attachable) (*Attachable, error)
UpdateAttachable updates the attachable
func (*Client) UpdateBill ¶
func (c *Client) UpdateBill(params RequestParameters, bill *Bill) (*Bill, error)
UpdateBill full updates the bill, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateBillPayment ¶
func (c *Client) UpdateBillPayment(params RequestParameters, billPayment *BillPayment) (*BillPayment, error)
UpdateBill full updates the bill, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateClass ¶
func (c *Client) UpdateClass(params RequestParameters, class *Class) (*Class, error)
UpdateClass full updates the class, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateCompanyInfo ¶
func (c *Client) UpdateCompanyInfo(params RequestParameters, companyInfo *CompanyInfo) (*CompanyInfo, error)
UpdateCompanyInfo updates the company info
func (*Client) UpdateCreditMemo ¶
func (c *Client) UpdateCreditMemo(params RequestParameters, creditMemo *CreditMemo) (*CreditMemo, error)
UpdateCreditMemo updates the given credit memo.
func (*Client) UpdateCustomer ¶
func (c *Client) UpdateCustomer(params RequestParameters, customer *Customer) (*Customer, error)
UpdateCustomer full updates the customer, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateDeposit ¶
func (c *Client) UpdateDeposit(params RequestParameters, deposit *Deposit) (*Deposit, error)
UpdateDeposit full updates the deposit, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateEmployee ¶
func (c *Client) UpdateEmployee(params RequestParameters, employee *Employee) (*Employee, error)
UpdateEmployee updates the employee
func (*Client) UpdateEstimate ¶
func (c *Client) UpdateEstimate(params RequestParameters, estimate *Estimate) (*Estimate, error)
UpdateEstimate full updates the estimate, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateInvoice ¶
func (c *Client) UpdateInvoice(params RequestParameters, invoice *Invoice) (*Invoice, error)
UpdateInvoice full updates the invoice, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateItem ¶
func (c *Client) UpdateItem(params RequestParameters, item *Item) (*Item, error)
UpdateItem full updates the item, meaning that missing writable fields will be set to nil/null
func (*Client) UpdatePayment ¶
func (c *Client) UpdatePayment(params RequestParameters, payment *Payment) (*Payment, error)
UpdatePayment full updates the payment, meaning that missing writable fields will be set to nil/null
func (*Client) UpdatePaymentMethod ¶
func (c *Client) UpdatePaymentMethod(params RequestParameters, paymentMethod *PaymentMethod) (*PaymentMethod, error)
UpdatePaymentMethod full updates the payment method, meaning that missing writable fields will be set to nil/null
func (*Client) UpdatePurchase ¶
func (c *Client) UpdatePurchase(params RequestParameters, purchase *Purchase) (*Purchase, error)
UpdatePurchase full updates the purchase, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateTerm ¶
func (c *Client) UpdateTerm(params RequestParameters, term *Term) (*Term, error)
UpdateTerm full updates the term, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateTimeActivity ¶
func (c *Client) UpdateTimeActivity(params RequestParameters, timeActivity *TimeActivity) (*TimeActivity, error)
UpdateTimeActivity full updates the time activity, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateVendor ¶
func (c *Client) UpdateVendor(params RequestParameters, vendor *Vendor) (*Vendor, error)
UpdateVendor full updates the vendor, meaning that missing writable fields will be set to nil/null
func (*Client) UpdateVendorCredit ¶
func (c *Client) UpdateVendorCredit(params RequestParameters, vendorCredit *VendorCredit) (*VendorCredit, error)
UpdateVendorCredit full updates the vendor credit, meaning that missing writable fields will be set to nil/null
func (*Client) UploadAttachable ¶
func (c *Client) UploadAttachable(realmId string, attachable *Attachable, data io.Reader) (*Attachable, error)
UploadAttachable uploads the attachable
func (*Client) VoidBillPayment ¶
func (c *Client) VoidBillPayment(params RequestParameters, billPayment BillPayment) error
func (*Client) VoidEstimate ¶
func (c *Client) VoidEstimate(params RequestParameters, estimate Estimate) error
func (*Client) VoidInvoice ¶
func (c *Client) VoidInvoice(params RequestParameters, invoice Invoice) error
func (*Client) VoidPayment ¶
func (c *Client) VoidPayment(params RequestParameters, payment Payment) error
VoidPayment voids the given payment in QuickBooks.
type ClientRequest ¶
type CompanyInfo ¶
type CompanyInfo struct {
CompanyName string
LegalName string
// CompanyAddr
// CustomerCommunicationAddr
// LegalAddr
// PrimaryPhone
// CompanyStartDate Date
CompanyStartDate string
FiscalYearStartMonth string
Country string
// Email
// WebAddr
SupportedLanguages string
// NameValue
Domain string
Id string
SyncToken string
Metadata ModificationMetaData `json:",omitempty"`
}
CompanyInfo describes a company account.
type ContactInfo ¶
type ContactInfo struct {
Type string `json:",omitempty"`
Telephone TelephoneNumber `json:",omitempty"`
}
type ContentType ¶
type ContentType string
const ( AI ContentType = "application/postscript" CSV ContentType = "text/csv" DOC ContentType = "application/msword" DOCX ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" EPS ContentType = "application/postscript" GIF ContentType = "image/gif" JPEG ContentType = "image/jpeg" JPG ContentType = "image/jpg" ODS ContentType = "application/vnd.oasis.opendocument.spreadsheet" PDF ContentType = "application/pdf" PNG ContentType = "image/png" RTF ContentType = "text/rtf" TIF ContentType = "image/tif" TXT ContentType = "text/plain" XLS ContentType = "application/vnd/ms-excel" XLSX ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" XML ContentType = "text/xml" )
type CreditMemo ¶
type CreditMemo struct {
TotalAmt float64 `json:",omitempty"`
RemainingCredit json.Number `json:",omitempty"`
Line []Line `json:",omitempty"`
ApplyTaxAfterDiscount bool `json:",omitempty"`
DocNumber string `json:",omitempty"`
TxnDate Date `json:",omitempty"`
Sparse bool `json:"sparse,omitempty"`
CustomerMemo MemoRef `json:",omitempty"`
ProjectRef ReferenceType `json:",omitempty"`
Balance json.Number `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
TxnTaxDetail *TxnTaxDetail `json:",omitempty"`
SyncToken string `json:",omitempty"`
CustomField []CustomField `json:",omitempty"`
ShipAddr PhysicalAddress `json:",omitempty"`
EmailStatus string `json:",omitempty"`
BillAddr PhysicalAddress `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
BillEmail EmailAddress `json:",omitempty"`
Id string `json:",omitempty"`
}
type CustomField ¶
type Customer ¶
type Customer struct {
CustomerTypeRef *ReferenceType `json:",omitempty"`
ParentRef *ReferenceType `json:",omitempty"`
CurrencyRef *ReferenceType `json:",omitempty"`
DefaultTaxCodeRef *ReferenceType `json:",omitempty"`
SalesTermRef *ReferenceType `json:",omitempty"`
PaymentMethodRef *ReferenceType `json:",omitempty"`
PrimaryPhone *TelephoneNumber `json:",omitempty"`
AlternatePhone *TelephoneNumber `json:",omitempty"`
Mobile *TelephoneNumber `json:",omitempty"`
Fax *TelephoneNumber `json:",omitempty"`
PrimaryEmailAddr *EmailAddress `json:",omitempty"`
WebAddr *WebSiteAddress `json:",omitempty"`
BillAddr *PhysicalAddress `json:",omitempty"`
ShipAddr *PhysicalAddress `json:",omitempty"`
OpenBalanceDate *Date `json:",omitempty"`
Job null.Bool `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
Balance json.Number `json:",omitempty"`
BalanceWithJobs json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Title string `json:",omitempty"`
GivenName string `json:",omitempty"`
MiddleName string `json:",omitempty"`
FamilyName string `json:",omitempty"`
Suffix string `json:",omitempty"`
DisplayName string `json:",omitempty"`
FullyQualifiedName string `json:",omitempty"`
CompanyName string `json:",omitempty"`
PrintOnCheckName string `json:",omitempty"`
TaxExemptionReasonId string `json:",omitempty"`
Notes string `json:",omitempty"`
ResaleNum string `json:",omitempty"`
Level int `json:",omitempty"`
Active bool `json:",omitempty"`
Taxable bool `json:",omitempty"`
BillWithParent bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
Customer represents a QuickBooks Customer object.
type CustomerType ¶
type Date ¶
Date represents a Quickbooks date
func (*Date) UnmarshalJSON ¶
UnmarshalJSON removes time from parsed date
type DeliveryInfo ¶
type Deposit ¶
type Deposit struct {
Line []Line
TxnTaxDetail *TxnTaxDetail `json:",omitempty"`
DepositToAccountRef ReferenceType
CurrencyRef ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
RecurDataRef *ReferenceType `json:",omitempty"`
TxnDate *Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
HomeTotalAmt json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type DepositLineDetail ¶
type DepositLineDetail struct {
AccountRef ReferenceType
PaymentMethodRef ReferenceType `json:",omitempty"`
ClassRef ReferenceType `json:",omitempty"`
TaxCodeRef ReferenceType `json:",omitempty"`
EntityRef ReferenceType `json:",omitempty"`
CheckNum string `json:",omitempty"`
}
DepositLineDetail ...
type DescriptionLineDetail ¶
type DescriptionLineDetail struct {
TaxCodeRef ReferenceType `json:",omitempty"`
ServiceDate Date `json:",omitempty"`
}
DescriptionLineDetail ...
type DiscountLineDetail ¶
type DiscountLineDetail struct {
PercentBased bool `json:",omitempty"`
DiscountPercent json.Number `json:",omitempty"`
}
DiscountLineDetail ...
type DiscoveryAPI ¶
type DiscoveryAPI struct {
Issuer string `json:"issuer"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
UserinfoEndpoint string `json:"userinfo_endpoint"`
RevocationEndpoint string `json:"revocation_endpoint"`
JwksUri string `json:"jwks_uri"`
}
func CallDiscoveryAPI ¶
func CallDiscoveryAPI(discoveryEndpoint string) (*DiscoveryAPI, error)
CallDiscoveryAPI See https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/openid-connect#discovery-document
type EmailAddress ¶
type EmailAddress struct {
Address string `json:",omitempty"`
}
EmailAddress represents a QuickBooks email address.
type Employee ¶
type Employee struct {
PrimaryAddr PhysicalAddress `json:",omitempty"`
PrimaryEmailAddr *EmailAddress `json:",omitempty"`
PrimaryPhone *TelephoneNumber `json:",omitempty"`
Mobile *TelephoneNumber `json:",omitempty"`
BirthDate *Date `json:",omitempty"`
HiredDate *Date `json:",omitempty"`
ReleasedDate *Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
CostRate json.Number `json:",omitempty"`
BillRate json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Title string `json:",omitempty"`
GivenName string `json:",omitempty"`
MiddleName string `json:",omitempty"`
FamilyName string `json:",omitempty"`
Suffix string `json:",omitempty"`
DisplayName string `json:",omitempty"`
PrintOnCheckName string `json:",omitempty"`
Gender string `json:",omitempty"`
EmployeeNumber string `json:",omitempty"`
SSN string `json:",omitempty"`
Active bool `json:",omitempty"`
BillableTime bool `json:",omitempty"`
Organization bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type Estimate ¶
type Estimate struct {
Line []Line
LinkedTxn []LinkedTxn `json:",omitempty"`
CustomField []CustomField `json:",omitempty"`
TxnTaxDetail *TxnTaxDetail `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
ClassRef *ReferenceType `json:",omitempty"`
SalesTermRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
ShipMethodRef *ReferenceType `json:",omitempty"`
RecurDataRef *ReferenceType `json:",omitempty"`
TaxExemptionRef *ReferenceType `json:",omitempty"`
CurrencyRef ReferenceType `json:",omitempty"`
ProjectRef ReferenceType `json:",omitempty"`
ShipFromAddr PhysicalAddress `json:",omitempty"`
ShipAddr *PhysicalAddress `json:",omitempty"`
BillAddr *PhysicalAddress `json:",omitempty"`
BillEmail EmailAddress `json:",omitempty"`
BillEmailCC *EmailAddress `json:"BillEmailCc,omitempty"`
BillEmailBCC *EmailAddress `json:"BillEmailBcc,omitempty"`
DeliveryInfo *DeliveryInfo `json:",omitempty"`
TxnDate *Date `json:",omitempty"`
ShipDate *Date `json:",omitempty"`
AcceptedDate *Date `json:",omitempty"`
ExpirationDate *Date `json:",omitempty"`
DueDate *Date `json:",omitempty"`
CustomerMemo MemoRef `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
HomeTotalAmt json.Number `json:",omitempty"`
Id string `json:",omitempty"`
DocNumber string `json:",omitempty"`
SyncToken string `json:",omitempty"`
TxnStatus string `json:",omitempty"`
PrintStatus string `json:",omitempty"`
EmailStatus string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
AcceptedBy string `json:",omitempty"`
ApplyTaxAfterDiscount bool `json:",omitempty"`
FreeFormAddress bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type Failure ¶
type Failure struct {
Fault struct {
Error []struct {
Message string
Detail string
Code string `json:"code"`
Element string `json:"element"`
}
Type string `json:"type"`
}
Time Date `json:"time"`
}
Failure is the outermost struct that holds an error response.
type GroupLineDetail ¶
type GroupLineDetail struct {
Quantity json.Number `json:",omitempty"`
GroupItemRef ReferenceType `json:",omitempty"`
Line []Line `json:",omitempty"`
}
GroupLineDetail ...
type Invoice ¶
type Invoice struct {
Line []Line
LinkedTxn []LinkedTxn `json:"LinkedTxn"`
CustomField []CustomField `json:",omitempty"`
TxnTaxDetail *TxnTaxDetail `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
ClassRef *ReferenceType `json:",omitempty"`
SalesTermRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
ShipMethodRef *ReferenceType `json:",omitempty"`
RecurDatRef *ReferenceType `json:",omitempty"`
TaxExemptionRef *ReferenceType `json:",omitempty"`
DepositToAccountRef *ReferenceType `json:",omitempty"`
CurrencyRef ReferenceType `json:",omitempty"`
ProjectRef ReferenceType `json:",omitempty"`
ShipFromAddr PhysicalAddress `json:",omitempty"`
ShipAddr *PhysicalAddress `json:",omitempty"`
BillAddr *PhysicalAddress `json:",omitempty"`
BillEmail EmailAddress `json:",omitempty"`
BillEmailCC *EmailAddress `json:"BillEmailCc,omitempty"`
BillEmailBCC *EmailAddress `json:"BillEmailBcc,omitempty"`
DeliveryInfo *DeliveryInfo `json:",omitempty"`
TxnDate *Date `json:",omitempty"`
ShipDate *Date `json:",omitempty"`
DueDate *Date `json:",omitempty"`
CustomerMemo MemoRef `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
Deposit json.Number `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
Balance json.Number `json:",omitempty"`
HomeAmtTotal json.Number `json:",omitempty"`
HomeBalance json.Number `json:",omitempty"`
Id string `json:"Id,omitempty"`
DocNumber string `json:",omitempty"`
SyncToken string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
TrackingNum string `json:",omitempty"`
PrintStatus string `json:",omitempty"`
EmailStatus string `json:",omitempty"`
TxnSource string `json:",omitempty"`
ApplyTaxAfterDiscount bool `json:",omitempty"`
AllowOnlineCreditCardPayment bool `json:",omitempty"`
AllowOnlineACHPayment bool `json:",omitempty"`
FreeFormAddress bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
Invoice represents a QuickBooks Invoice object.
type Item ¶
type Item struct {
AssetAccountRef ReferenceType `json:",omitempty"`
IncomeAccountRef ReferenceType `json:",omitempty"`
ExpenseAccountRef *ReferenceType `json:",omitempty"`
SalesTaxCodeRef *ReferenceType `json:",omitempty"`
PurchaseTaxCodeRef *ReferenceType `json:",omitempty"`
TaxClassificationRef *ReferenceType `json:",omitempty"`
ClassRef *ReferenceType `json:",omitempty"`
PrefVendorRef *ReferenceType `json:",omitempty"`
ParentRef *ReferenceType `json:",omitempty"`
InvStartDate Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
QtyOnHand json.Number `json:",omitempty"`
ReorderPoint json.Number `json:",omitempty"`
PurchaseCost json.Number `json:",omitempty"`
UnitPrice json.Number `json:",omitempty"`
Level json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Name string `json:",omitempty"`
FullyQualifiedName string `json:",omitempty"`
SKU string `json:"Sku,omitempty"`
Description string `json:",omitempty"`
PurchaseDesc string `json:",omitempty"`
Type string `json:",omitempty"`
TrackQtyOnHand bool `json:",omitempty"`
Active bool `json:",omitempty"`
Taxable bool `json:",omitempty"`
SalesTaxIncluded bool `json:",omitempty"`
PurchaseTaxIncluded bool `json:",omitempty"`
SubItem bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
Item represents a QuickBooks Item object (a product type).
type ItemBasedExpenseLineDetail ¶
type ItemBasedExpenseLineDetail struct {
ItemRef ReferenceType
// TaxInclusiveAmt json.Number `json:",omitempty"`
// PriceLevelRef ReferenceType `json:",omitempty"`
ClassRef ReferenceType `json:",omitempty"`
TaxCodeRef ReferenceType `json:",omitempty"`
MarkupInfo MarkupInfo `json:",omitempty"`
BillableStatus BillableStatusEnum `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
Qty json.Number
UnitPrice json.Number
}
ItemBasedExpenseLineDetail ...
type Line ¶
type Line struct {
Id string `json:",omitempty"`
LineNum int `json:",omitempty"`
Description string `json:",omitempty"`
Amount json.Number `json:",omitempty"`
DetailType LineDetailTypeEnum `json:",omitempty"`
LinkedTxn []LinkedTxn `json:",omitempty"`
ProjectRef ReferenceType `json:",omitempty"`
AccountBasedExpenseLineDetail AccountBasedExpenseLineDetail `json:",omitempty"`
ItemBasedExpenseLineDetail ItemBasedExpenseLineDetail `json:",omitempty"`
SalesItemLineDetail SalesItemLineDetail `json:",omitempty"`
GroupLineDetail GroupLineDetail `json:",omitempty"`
DescriptionLineDetail DescriptionLineDetail `json:",omitempty"`
DiscountLineDetail DiscountLineDetail `json:",omitempty"`
SubTotalLineDetail SubTotalLineDetail `json:",omitempty"`
TaxLineDetail TaxLineDetail `json:",omitempty"`
ReimburseLineDetail ReimburseLineDetail `json:",omitempty"`
DepositLineDetail
}
type LineDetailTypeEnum ¶
type LineDetailTypeEnum string
const ( SalesItemLine LineDetailTypeEnum = "SalesItemLineDetail" GroupLine LineDetailTypeEnum = "GroupLineDetail" DescriptionLine LineDetailTypeEnum = "DescriptionOnly" DiscountLine LineDetailTypeEnum = "DiscountLineDetail" SubTotalLine LineDetailTypeEnum = "SubTotalLineDetail" ItemExpenseLine LineDetailTypeEnum = "ItemBasedExpenseLineDetail" AccountExpenseLine LineDetailTypeEnum = "AccountBasedExpenseLineDetail" TaxLine LineDetailTypeEnum = "TaxLineDetail" ReimburseLine LineDetailTypeEnum = "ReimburseLineDetail" DepositLine LineDetailTypeEnum = "DepositLineDetail" )
type MarkupInfo ¶
type MarkupInfo struct {
PriceLevelRef ReferenceType `json:",omitempty"`
Percent json.Number `json:",omitempty"`
MarkUpIncomeAccountRef ReferenceType `json:",omitempty"`
}
type MemoRef ¶
type MemoRef struct {
Value string `json:"value,omitempty"`
}
MemoRef represents a QuickBooks MemoRef object.
type ModificationMetaData ¶
type ModificationMetaData struct {
CreateTime Date `json:",omitempty"`
LastUpdatedTime Date `json:",omitempty"`
}
ModificationMetaData is a timestamp of genesis and last change of a Quickbooks object
type Payment ¶
type Payment struct {
Line []Line
CustomerRef ReferenceType `json:",omitempty"`
DepositToAccountRef *ReferenceType `json:",omitempty"`
CurrencyRef ReferenceType `json:",omitempty"`
ProjectRef ReferenceType `json:",omitempty"`
PaymentMethodRef *ReferenceType `json:",omitempty"`
TaxExemptionRef *ReferenceType `json:",omitempty"`
TxnDate Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
UnappliedAmt json.Number `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
ProcessPayment bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type PaymentMethod ¶
type PaymentMethod struct {
MetaData ModificationMetaData `json:",omitempty"`
Id string `json:",omitempty"`
Name string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Type string `json:",omitempty"`
Active bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type PhysicalAddress ¶
type PhysicalAddress struct {
Id string `json:"Id,omitempty"`
// These lines are context-dependent! Read the QuickBooks API carefully.
Line1 string `json:",omitempty"`
Line2 string `json:",omitempty"`
Line3 string `json:",omitempty"`
Line4 string `json:",omitempty"`
Line5 string `json:",omitempty"`
City string `json:",omitempty"`
Country string `json:",omitempty"`
// A.K.A. State.
CountrySubDivisionCode string `json:",omitempty"`
PostalCode string `json:",omitempty"`
Lat string `json:",omitempty"`
Long string `json:",omitempty"`
}
PhysicalAddress represents a QuickBooks address.
type PrintStatusEnum ¶
type PrintStatusEnum string
const ( NotSetStatus PrintStatusEnum = "NotSet" NeedToPrintStatus PrintStatusEnum = "NeedToPrint" PrintCompleteStatus PrintStatusEnum = "PrintComplete" )
type Purchase ¶
type Purchase struct {
Line []Line
LinkedTxn []LinkedTxn `json:",omitempty"`
TxnTaxDetail *TxnTaxDetail `json:",omitempty"`
AccountRef ReferenceType `json:",omitempty"`
CurrencyRef ReferenceType `json:",omitempty"`
PaymentMethodRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
EntityRef *ReferenceType `json:",omitempty"`
RecurDataRef *ReferenceType `json:",omitempty"`
RemitToAddr *PhysicalAddress `json:",omitempty"`
TxnDate *Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
Id string `json:",omitempty"`
DocNumber string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
SyncToken string `json:",omitempty"`
PaymentType string `json:",omitempty"`
PrintStatus PrintStatusEnum `json:",omitempty"`
Credit bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type RateLimitError ¶
type RateLimitError struct {
Message string
LimitType rateLimitType
}
func NewRateLimitError ¶
func NewRateLimitError(limitType rateLimitType) *RateLimitError
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
type RateLimiterManager ¶
type RateLimiterManager struct {
// contains filtered or unexported fields
}
RateLimiterManager manages rate limiters per realm.
func NewRateLimiterManager ¶
func NewRateLimiterManager() *RateLimiterManager
NewRateLimiterManager initializes a new RateLimiterManager.
type RealmRateLimiters ¶
type RealmRateLimiters struct {
// contains filtered or unexported fields
}
type ReferenceType ¶
type ReferenceType struct {
Value string `json:"value,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
}
ReferenceType represents a QuickBooks reference to another object.
type ReimburseCharge ¶
type ReimburseCharge struct {
Line []Line
LinkedTxn []LinkedTxn `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
CurrencyRef ReferenceType `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
Amount json.Number `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
HomeTotalAmt json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
HasBeenInvoiced bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type ReimburseLineDetail ¶
type ReimburseLineDetail struct {
ClassRef ReferenceType `json:",omitempty"`
TaxCodeRef ReferenceType `json:",omitempty"`
DiscountAccountRef ReferenceType `json:",omitempty"`
DiscountPercent json.Number `json:",omitempty"`
PercentBased bool `json:",omitempty"`
}
ReimburseLineDetail ...
type RequestParameters ¶
type RequestParameters struct {
Ctx context.Context
RealmId string
Token *BearerToken
}
type SalesItemLineDetail ¶
type SalesItemLineDetail struct {
ItemRef ReferenceType `json:",omitempty"`
ClassRef ReferenceType `json:",omitempty"`
UnitPrice json.Number `json:",omitempty"`
MarkupInfo MarkupInfo `json:",omitempty"`
Qty json.Number `json:",omitempty"`
ItemAccountRef ReferenceType `json:",omitempty"`
TaxCodeRef ReferenceType `json:",omitempty"`
ServiceDate Date `json:",omitempty"`
TaxInclusiveAmt json.Number `json:",omitempty"`
DiscountRate json.Number `json:",omitempty"`
DiscountAmt json.Number `json:",omitempty"`
}
SalesItemLineDetail ...
type SubTotalLineDetail ¶
type SubTotalLineDetail struct {
ItemRef ReferenceType `json:",omitempty"`
}
SubTotalLineDetail ...
type TaxCode ¶
type TaxCode struct {
PurchaseTaxRateList TaxRateList `json:",omitempty"`
SalesTaxRateList TaxRateList `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
Id string `json:",omitempty"`
Name string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Description string `json:",omitempty"`
TaxCodeConfigType string `json:",omitempty"`
TaxGroup bool `json:",omitempty"`
Taxable bool `json:",omitempty"`
Active bool `json:",omitempty"`
Hidden bool `json:",omitempty"`
}
type TaxLineDetail ¶
type TaxLineDetail struct {
TaxRateRef ReferenceType `json:",omitempty"`
NetAmountTaxable json.Number `json:",omitempty"`
TaxInclusiveAmount json.Number `json:",omitempty"`
OverrideDeltaAmount json.Number `json:",omitempty"`
TaxPercent json.Number `json:",omitempty"`
PercentBased bool `json:",omitempty"`
}
TaxLineDetail ...
type TaxRate ¶
type TaxRate struct {
// EffectiveTaxRate EffectiveTaxRateData `json:",omitempty"`
// AgencyRef ReferenceType `json:",omitempty"`
// TaxReturnLineRef ReferenceType `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
RateValue json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Name string `json:",omitempty"`
Description string `json:",omitempty"`
SpecialTaxType string `json:",omitempty"`
DisplayType string `json:",omitempty"`
Active bool `json:",omitempty"`
}
type TaxRateDetail ¶
type TaxRateDetail struct {
TaxRateRef ReferenceType
TaxTypeApplicable TaxTypeEnum `json:",omitempty"`
TaxOrder json.Number `json:",omitempty"`
}
TaxRateDetail
type TaxRateList ¶
type TaxRateList struct {
TaxRateDetail []TaxRateDetail `json:",omitempty"`
}
TaxRateList ...
type TaxTypeEnum ¶
type TaxTypeEnum string
const ( TaxOnAmount TaxTypeEnum = "TaxOnAmount" TaxOnAmountPlusTax TaxTypeEnum = "TaxOnAmountPlusTax" TaxOnTax TaxTypeEnum = "TaxOnTax" )
type TelephoneNumber ¶
type TelephoneNumber struct {
FreeFormNumber string `json:",omitempty"`
}
TelephoneNumber represents a QuickBooks phone number.
type Term ¶
type Term struct {
MetaData ModificationMetaData `json:",omitempty"`
DiscountPercent json.Number `json:",omitempty"`
DiscountDays json.Number `json:",omitempty"`
DayOfMonthDue json.Number `json:",omitempty"`
DiscountDayOfMonth json.Number `json:",omitempty"`
DueNextMonthDays json.Number `json:",omitempty"`
DueDays json.Number `json:",omitempty"`
Id string `json:",omitempty"`
Name string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Type string `json:",omitempty"`
Active bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type TimeActivity ¶
type TimeActivity struct {
VendorRef ReferenceType `json:",omitempty"`
EmployeeRef ReferenceType `json:",omitempty"`
CustomerRef ReferenceType `json:",omitempty"`
ProjectRef ReferenceType `json:",omitempty"`
ClassRef *ReferenceType `json:",omitempty"`
ItemRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
PayrollItemRef *ReferenceType `json:",omitempty"`
TxnDate Date `json:",omitempty"`
StartTime *DateTime `json:",omitempty"`
EndTime *DateTime `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
BillableStatus BillableStatusEnum `json:",omitempty"`
BreakHours json.Number `json:",omitempty"`
BreakMinutes json.Number `json:",omitempty"`
BreakSeconds json.Number `json:",omitempty"`
Hours json.Number `json:",omitempty"`
Minutes json.Number `json:",omitempty"`
Seconds json.Number `json:",omitempty"`
HourlyRate json.Number `json:",omitempty"`
CostRate json.Number `json:",omitempty"`
Id string `json:",omitempty"`
NameOf string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Description string `json:",omitempty"`
Taxable bool `json:",omitempty"`
}
type TxnTaxDetail ¶
type TxnTaxDetail struct {
TxnTaxCodeRef ReferenceType `json:",omitempty"`
TotalTax json.Number `json:",omitempty"`
TaxLine []Line `json:",omitempty"`
}
type Vendor ¶
type Vendor struct {
TermRef *ReferenceType `json:",omitempty"`
CurrencyRef *ReferenceType `json:",omitempty"`
PrimaryPhone *TelephoneNumber `json:",omitempty"`
AlternatePhone *TelephoneNumber `json:",omitempty"`
Mobile *TelephoneNumber `json:",omitempty"`
Fax *TelephoneNumber `json:",omitempty"`
PrimaryEmailAddr *EmailAddress `json:",omitempty"`
WebAddr *WebSiteAddress `json:",omitempty"`
BillAddr *PhysicalAddress `json:",omitempty"`
OtherContactInfo *ContactInfo `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
CostRate json.Number `json:",omitempty"`
BillRate json.Number `json:",omitempty"`
Balance json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
Title string `json:",omitempty"`
GivenName string `json:",omitempty"`
MiddleName string `json:",omitempty"`
Suffix string `json:",omitempty"`
FamilyName string `json:",omitempty"`
DisplayName string `json:",omitempty"`
CompanyName string `json:",omitempty"`
TaxIdentifier string `json:",omitempty"`
AcctNum string `json:",omitempty"`
GSTRegistrationType string `json:",omitempty"`
PrintOnCheckName string `json:",omitempty"`
Active bool `json:",omitempty"`
Vendor1099 bool `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
Vendor describes a vendor.
type VendorCredit ¶
type VendorCredit struct {
Line []Line
LinkedTxn []LinkedTxn `json:",omitempty"`
VendorRef ReferenceType
CurrencyRef ReferenceType `json:",omitempty"`
APAccountRef *ReferenceType `json:",omitempty"`
DepartmentRef *ReferenceType `json:",omitempty"`
RecurDataRef *ReferenceType `json:",omitempty"`
TxnDate *Date `json:",omitempty"`
MetaData ModificationMetaData `json:",omitempty"`
TotalAmt json.Number `json:",omitempty"`
Balance json.Number `json:",omitempty"`
ExchangeRate json.Number `json:",omitempty"`
Id string `json:",omitempty"`
SyncToken string `json:",omitempty"`
DocNumber string `json:",omitempty"`
PrivateNote string `json:",omitempty"`
Domain string `json:"domain,omitempty"`
Status string `json:"status,omitempty"`
}
type WebSiteAddress ¶
type WebSiteAddress struct {
URI string `json:",omitempty"`
}
WebSiteAddress represents a Quickbooks Website
Source Files
¶
- account.go
- attachable.go
- batch.go
- bill.go
- bill_payment.go
- cdc.go
- class.go
- client.go
- company.go
- credit_memo.go
- customer.go
- customer_type.go
- defs.go
- deposit.go
- discovery.go
- employee.go
- errors.go
- estimate.go
- invoice.go
- item.go
- payment.go
- payment_method.go
- purchase.go
- reimburse_charge.go
- tax_code.go
- tax_rate.go
- term.go
- time_activity.go
- token.go
- vendor.go
- vendor_credit.go