Versions in this module Expand all Collapse all v1 v1.0.2 Jun 18, 2024 Changes in this version type Bill + GlobalTaxCalculation GlobalTaxCalculation + type GlobalTaxCalculation string + const NotApplicable + const TaxExclusive + const TaxInclusive v1.0.1 Jun 18, 2024 Changes in this version type AccountBasedExpenseLineDetail + TaxCodeRef ReferenceType v1.0.0 Jun 5, 2024 Changes in this version + const AccountsPayableAccountType + const AccountsReceivableAccountType + const BankAccountType + const CostOfGoodsSoldAccountType + const CreditCardAccountType + const EquityAccountType + const ExpenseAccountType + const FixedAssetAccountType + const IncomeAccountType + const LongTermLiabilityAccountType + const OtherAssetAccountType + const OtherCurrentAssetAccountType + const OtherCurrentLiabilityAccountType + const OtherExpenseAccountType + const OtherIncomeAccountType + type Account struct + AccountAlias string + AccountSubType string + AccountType string + AcctNum string + Active bool + Classification string + CurrencyRef ReferenceType + CurrentBalance json.Number + CurrentBalanceWithSubAccounts json.Number + Description string + FullyQualifiedName string + Id string + MetaData MetaData + Name string + ParentRef ReferenceType + SubAccount bool + SyncToken string + TaxCodeRef ReferenceType + TxnLocationType string + type AccountBasedExpenseLineDetail struct + AccountRef ReferenceType + CustomerRef ReferenceType + TaxAmount json.Number + type Attachable struct + AttachableRef []AttachableRef + Category string + ContentType ContentType + FileAccessUri string + FileName string + Id string + Lat string + Long string + MetaData MetaData + Note string + PlaceName string + Size json.Number + SyncToken string + Tag string + TempDownloadUri string + ThumbnailFileAccessUri string + ThumbnailTempDownloadUri string + type AttachableRef struct + EntityRef ReferenceType + Inactive bool + IncludeOnSend bool + LineInfo string + NoRefOnly bool + type BearerToken struct + AccessToken string + ExpiresIn int64 + IdToken string + RefreshToken string + TokenType string + XRefreshTokenExpiresIn int64 + type Bill struct + APAccountRef ReferenceType + Balance json.Number + CurrencyRef ReferenceType + DepartmentRef ReferenceType + DocNumber string + DueDate Date + ExchangeRate json.Number + HomeBalance json.Number + Id string + IncludeInAnnualTPAR bool + Line []Line + LinkedTxn []LinkedTxn + MetaData MetaData + PrivateNote string + RecurDataRef ReferenceType + SalesTermRef ReferenceType + SyncToken string + TotalAmt json.Number + TransactionLocationType string + TxnDate Date + TxnTaxDetail TxnTaxDetail + VendorRef ReferenceType + type Client struct + Client *http.Client + func NewClient(clientId string, clientSecret string, realmId string, isProduction bool, ...) (c *Client, err error) + func (c *Client) CreateAccount(account *Account) (*Account, error) + func (c *Client) CreateAttachable(attachable *Attachable) (*Attachable, error) + func (c *Client) CreateBill(bill *Bill) (*Bill, error) + func (c *Client) CreateCreditMemo(creditMemo *CreditMemo) (*CreditMemo, error) + func (c *Client) CreateCustomer(customer *Customer) (*Customer, error) + func (c *Client) CreateDeposit(deposit *Deposit) (*Deposit, error) + func (c *Client) CreateEmployee(employee *Employee) (*Employee, error) + func (c *Client) CreateEstimate(estimate *Estimate) (*Estimate, error) + func (c *Client) CreateInvoice(invoice *Invoice) (*Invoice, error) + func (c *Client) CreateItem(item *Item) (*Item, error) + func (c *Client) CreatePayment(payment *Payment) (*Payment, error) + func (c *Client) CreateVendor(vendor *Vendor) (*Vendor, error) + func (c *Client) DeleteAttachable(attachable *Attachable) error + func (c *Client) DeleteBill(bill *Bill) error + func (c *Client) DeleteCreditMemo(creditMemo *CreditMemo) error + func (c *Client) DeleteDeposit(deposit *Deposit) error + func (c *Client) DeleteEstimate(estimate *Estimate) error + func (c *Client) DeleteInvoice(invoice *Invoice) error + func (c *Client) DeletePayment(payment *Payment) error + func (c *Client) DownloadAttachable(id string) (string, error) + func (c *Client) FindAccountById(id string) (*Account, error) + func (c *Client) FindAccounts() ([]Account, error) + func (c *Client) FindAttachableById(id string) (*Attachable, error) + func (c *Client) FindAttachables() ([]Attachable, error) + func (c *Client) FindAuthorizationUrl(scope string, state string, redirectUri string) (string, error) + func (c *Client) FindBillById(id string) (*Bill, error) + func (c *Client) FindBills() ([]Bill, error) + func (c *Client) FindCompanyInfo() (*CompanyInfo, error) + func (c *Client) FindCreditMemoById(id string) (*CreditMemo, error) + func (c *Client) FindCreditMemos() ([]CreditMemo, error) + func (c *Client) FindCustomerById(id string) (*Customer, error) + func (c *Client) FindCustomerByName(name string) (*Customer, error) + func (c *Client) FindCustomerTypeById(id string) (*CustomerType, error) + func (c *Client) FindCustomers() ([]Customer, error) + func (c *Client) FindDepositById(id string) (*Deposit, error) + func (c *Client) FindDeposits() ([]Deposit, error) + func (c *Client) FindEmployeeById(id string) (*Employee, error) + func (c *Client) FindEmployees() ([]Employee, error) + func (c *Client) FindEstimateById(id string) (*Estimate, error) + func (c *Client) FindEstimates() ([]Estimate, error) + func (c *Client) FindInvoiceById(id string) (*Invoice, error) + func (c *Client) FindInvoices() ([]Invoice, error) + func (c *Client) FindItemById(id string) (*Item, error) + func (c *Client) FindItems() ([]Item, error) + func (c *Client) FindPaymentById(id string) (*Payment, error) + func (c *Client) FindPayments() ([]Payment, error) + func (c *Client) FindVendorById(id string) (*Vendor, error) + func (c *Client) FindVendors() ([]Vendor, error) + func (c *Client) QueryAccounts(query string) ([]Account, error) + func (c *Client) QueryAttachables(query string) ([]Attachable, error) + func (c *Client) QueryBills(query string) ([]Bill, error) + func (c *Client) QueryCreditMemos(query string) ([]CreditMemo, error) + func (c *Client) QueryCustomerTypes(query string) ([]CustomerType, error) + func (c *Client) QueryCustomers(query string) ([]Customer, error) + func (c *Client) QueryDeposits(query string) ([]Deposit, error) + func (c *Client) QueryEmployees(query string) ([]Employee, error) + func (c *Client) QueryEstimates(query string) ([]Estimate, error) + func (c *Client) QueryInvoices(query string) ([]Invoice, error) + func (c *Client) QueryItems(query string) ([]Item, error) + func (c *Client) QueryPayments(query string) ([]Payment, error) + func (c *Client) QueryVendors(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(estimateId string, emailAddress string) error + func (c *Client) SendInvoice(invoiceId string, emailAddress string) error + func (c *Client) UpdateAccount(account *Account) (*Account, error) + func (c *Client) UpdateAttachable(attachable *Attachable) (*Attachable, error) + func (c *Client) UpdateBill(bill *Bill) (*Bill, error) + func (c *Client) UpdateCompanyInfo(companyInfo *CompanyInfo) (*CompanyInfo, error) + func (c *Client) UpdateCreditMemo(creditMemo *CreditMemo) (*CreditMemo, error) + func (c *Client) UpdateCustomer(customer *Customer) (*Customer, error) + func (c *Client) UpdateDeposit(deposit *Deposit) (*Deposit, error) + func (c *Client) UpdateEmployee(employee *Employee) (*Employee, error) + func (c *Client) UpdateEstimate(estimate *Estimate) (*Estimate, error) + func (c *Client) UpdateInvoice(invoice *Invoice) (*Invoice, error) + func (c *Client) UpdateItem(item *Item) (*Item, error) + func (c *Client) UpdatePayment(payment *Payment) (*Payment, error) + func (c *Client) UpdateVendor(vendor *Vendor) (*Vendor, error) + func (c *Client) UploadAttachable(attachable *Attachable, data io.Reader) (*Attachable, error) + func (c *Client) VoidEstimate(estimate Estimate) error + func (c *Client) VoidInvoice(invoice Invoice) error + func (c *Client) VoidPayment(payment Payment) error + type CompanyInfo struct + CompanyName string + CompanyStartDate string + Country string + Domain string + FiscalYearStartMonth string + Id string + LegalName string + Metadata MetaData + SupportedLanguages string + SyncToken string + type ContentType string + const AI + const CSV + const DOC + const DOCX + const EPS + const GIF + const JPEG + const JPG + const ODS + const PDF + const PNG + const RTF + const TIF + const TXT + const XLS + const XLSX + const XML + type CreditMemo struct + ApplyTaxAfterDiscount bool + Balance json.Number + BillAddr PhysicalAddress + BillEmail EmailAddress + CustomField []CustomField + CustomerMemo MemoRef + CustomerRef ReferenceType + DocNumber string + EmailStatus string + Id string + Line []Line + MetaData MetaData + ProjectRef ReferenceType + RemainingCredit json.Number + ShipAddr PhysicalAddress + Sparse bool + SyncToken string + TotalAmt float64 + TxnDate Date + TxnTaxDetail *TxnTaxDetail + type CustomField struct + DefinitionId string + Name string + StringValue string + Type string + type Customer struct + Active bool + AlternatePhone TelephoneNumber + Balance json.Number + BalanceWithJobs json.Number + BillAddr *PhysicalAddress + BillWithParent bool + CompanyName string + CustomerTypeRef ReferenceType + DisplayName string + FamilyName string + Fax TelephoneNumber + FullyQualifiedName string + GivenName string + Id string + Job null.Bool + Level int + MetaData MetaData + MiddleName string + Mobile TelephoneNumber + Notes string + OpenBalanceDate Date + ParentRef ReferenceType + PrimaryEmailAddr *EmailAddress + PrimaryPhone TelephoneNumber + PrintOnCheckName string + ShipAddr *PhysicalAddress + Suffix string + SyncToken string + TaxExemptionReasonId *string + Taxable *bool + Title string + WebAddr *WebSiteAddress + func (c *Customer) GetAddress() PhysicalAddress + func (c *Customer) GetPrimaryEmail() string + func (c *Customer) GetWebsite() string + type CustomerType struct + Active bool + Domain string + Id string + MetaData MetaData + Name string + SyncToken string + type Date struct + func (d *Date) UnmarshalJSON(b []byte) (err error) + func (d Date) String() string + type DeliveryInfo struct + DeliveryTime Date + DeliveryType string + type Deposit struct + DepositToAccountRef ReferenceType + Domain string + Id string + Line []PaymentLine + MetaData MetaData + SyncToken string + TotalAmt float64 + TxnDate Date + type DiscountLineDetail struct + DiscountPercent float32 + PercentBased bool + type DiscoveryAPI struct + AuthorizationEndpoint string + Issuer string + JwksUri string + RevocationEndpoint string + TokenEndpoint string + UserinfoEndpoint string + func CallDiscoveryAPI(discoveryEndpoint EndpointUrl) (*DiscoveryAPI, error) + type EmailAddress struct + Address string + type Employee struct + Active bool + BillableTime bool + DisplayName string + Domain string + FamilyName string + GivenName string + Id string + MetaData MetaData + PrimaryAddr PhysicalAddress + PrimaryPhone TelephoneNumber + PrintOnCheckName string + SSN string + SyncToken string + type EndpointUrl string + const DiscoveryProductionEndpoint + const DiscoverySandboxEndpoint + const ProductionEndpoint + const SandboxEndpoint + func (u EndpointUrl) String() string + type Estimate struct + ApplyTaxAfterDiscount bool + BillAddr PhysicalAddress + BillEmail EmailAddress + CustomField []CustomField + CustomerMemo MemoRef + CustomerRef ReferenceType + DocNumber string + Domain string + EmailStatus string + Id string + Line []Line + MetaData MetaData + PrintStatus string + ShipAddr PhysicalAddress + SyncToken string + TotalAmt float64 + TxnDate Date + TxnStatus string + TxnTaxDetail TxnTaxDetail + type Failure struct + Fault struct{ ... } + Time Date + func (f Failure) Error() string + type Invoice struct + AllowOnlineACHPayment bool + AllowOnlineCreditCardPayment bool + ApplyTaxAfterDiscount bool + Balance json.Number + BillAddr PhysicalAddress + BillEmail EmailAddress + BillEmailBCC EmailAddress + BillEmailCC EmailAddress + ClassRef ReferenceType + CurrencyRef ReferenceType + CustomField []CustomField + CustomerMemo MemoRef + CustomerRef ReferenceType + DeliveryInfo *DeliveryInfo + DepartmentRef ReferenceType + Deposit json.Number + DepositToAccountRef ReferenceType + DocNumber string + DueDate Date + EmailStatus string + ExchangeRate json.Number + HomeAmtTotal json.Number + HomeBalance json.Number + Id string + Line []Line + LinkedTxn []LinkedTxn + MetaData MetaData + PrintStatus string + PrivateNote string + SalesTermRef ReferenceType + ShipAddr PhysicalAddress + ShipDate Date + ShipMethodRef ReferenceType + SyncToken string + TotalAmt json.Number + TrackingNum string + TxnDate Date + TxnSource string + TxnTaxDetail TxnTaxDetail + type Item struct + Active bool + AssetAccountRef ReferenceType + Description string + ExpenseAccountRef ReferenceType + Id string + IncomeAccountRef ReferenceType + MetaData MetaData + Name string + PurchaseCost json.Number + PurchaseDesc string + PurchaseTaxCodeRef ReferenceType + PurchaseTaxIncluded bool + QtyOnHand json.Number + SKU string + SalesTaxCodeRef ReferenceType + SalesTaxIncluded bool + SyncToken string + Taxable bool + TrackQtyOnHand bool + Type string + UnitPrice json.Number + type Line struct + AccountBasedExpenseLineDetail AccountBasedExpenseLineDetail + Amount json.Number + Description string + DetailType string + DiscountLineDetail DiscountLineDetail + Id string + LineNum int + SalesItemLineDetail SalesItemLineDetail + TaxLineDetail TaxLineDetail + type LinkedTxn struct + TxnID string + TxnType string + type MemoRef struct + Value string + type MetaData struct + CreateTime Date + LastUpdatedTime Date + type Payment struct + CustomerRef ReferenceType + DepositToAccountRef ReferenceType + Domain string + Id string + Line []PaymentLine + MetaData MetaData + ProcessPayment bool + SyncToken string + TotalAmt float64 + TxnDate Date + UnappliedAmt float64 + type PaymentLine struct + Amount float64 + LinkedTxn []LinkedTxn + type PhysicalAddress struct + City string + Country string + CountrySubDivisionCode string + Id string + Lat string + Line1 string + Line2 string + Line3 string + Line4 string + Line5 string + Long string + PostalCode string + type ReferenceType struct + Name string + Type string + Value string + type SalesItemLineDetail struct + ClassRef ReferenceType + DiscountAmt json.Number + DiscountRate json.Number + ItemAccountRef ReferenceType + ItemRef ReferenceType + Qty float32 + ServiceDate Date + TaxCodeRef ReferenceType + TaxInclusiveAmt json.Number + UnitPrice json.Number + type TaxLineDetail struct + NetAmountTaxable json.Number + PercentBased bool + TaxPercent json.Number + TaxRateRef ReferenceType + type TelephoneNumber struct + FreeFormNumber string + type TxnTaxDetail struct + TaxLine []Line + TotalTax json.Number + TxnTaxCodeRef ReferenceType + type Vendor struct + APAccountRef ReferenceType + AcctNum string + Active bool + AlternatePhone TelephoneNumber + Balance json.Number + BillAddr *PhysicalAddress + BillRate json.Number + BusinessNumber string + CompanyName string + CurrencyRef ReferenceType + DisplayName string + FamilyName string + Fax TelephoneNumber + GSTIN string + GSTRegistrationType string + GivenName string + HasTPAR bool + Id string + MetaData MetaData + MiddleName string + Mobile TelephoneNumber + PrimaryEmailAddr EmailAddress + PrimaryPhone TelephoneNumber + PrintOnCheckName string + Suffix string + SyncToken string + TaxIdentifier string + TaxReportingBasis string + TermRef ReferenceType + Title string + Vendor1099 bool + WebAddr *WebSiteAddress + type WebSiteAddress struct + URI string