quickbooks

package module
v0.0.0-...-62a580b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2021 License: BSD-2-Clause Imports: 17 Imported by: 0

README

quickbooks-go

Build GoDoc Go Report Card

quickbooks-go is a Go library that provides access to Intuit's QuickBooks Online API.

NOTE: This library is very incomplete. I just implemented the minimum for my use case. Pull requests welcome :)

Example

Authorization flow

See auth_flow_test.go

clientId     := "<your-client-id>"
clientSecret := "<your-client-secret>"
realmId      := "<realm-id>"

qbClient, _ := quickbooks.NewQuickbooksClient(clientId, clientSecret, realmId, false, nil)

// To do first when you receive the authorization code from quickbooks callback
authorizationCode := "<received-from-callback>"
bearerToken, _ := qbClient.RetrieveBearerToken(authorizationCode)
// Save the bearer token inside a db

// When the token expire, you can use the following function
bearerToken, _ = qbClient.RefreshToken(bearerToken.RefreshToken)

// Make a request!
info, _ := qbClient.FetchCompanyInfo()
fmt.Println(info)

// Revoke the token, this should be done only if a user unsubscribe from your app
qbClient.RevokeToken(bearerToken.RefreshToken)

Re-using tokens

See reuse_token_test.go

clientId     := "<your-client-id>"
clientSecret := "<your-client-secret>"
realmId      := "<realm-id>"

token := quickbooks.BearerToken{
RefreshToken:           "<saved-refresh-token>",
AccessToken:            "<saved-access-token>",
}

qbClient, _ := quickbooks.NewQuickbooksClient(clientId, clientSecret, realmId, false, &token)

// Make a request!
info, _ := qbClient.FetchCompanyInfo()
fmt.Println(info)

License

BSD-2-Clause

Documentation

Overview

Package quickbooks provides access to Intuit's QuickBooks Online API.

NOTE: This library is very incomplete. I just implemented the minimum for my use case. Pull requests welcome :)

 // Do this after you go through the normal OAuth process.
 var client = oauth2.NewClient(ctx, tokenSource)

 // Initialize the client handle.
 var qb = quickbooks.Client{
	 Client: client,
	 Endpoint: quickbooks.SandboxEndpoint,
	 RealmID: "some company account ID"'
 }

 // Make a request!
 var companyInfo, err = qb.FetchCompanyInfo()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBasedExpenseLineDetail

type AccountBasedExpenseLineDetail struct {
	AccountRef ReferenceType
	TaxAmount  json.Number `json:",omitempty"`
}

AccountBasedExpenseLineDetail

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                 MetaData        `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 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              int64  `json:"expires_in"`
	XRefreshTokenExpiresIn int64  `json:"x_refresh_token_expires_in"`
}

type Bill

type Bill struct {
	ID           string        `json:"Id,omitempty"`
	VendorRef    ReferenceType `json:",omitempty"`
	Line         []Line
	SyncToken    string        `json:",omitempty"`
	CurrencyRef  ReferenceType `json:",omitempty"`
	TxnDate      Date          `json:",omitempty"`
	APAccountRef ReferenceType `json:",omitempty"`
	SalesTermRef ReferenceType `json:",omitempty"`
	//LinkedTxn
	//GlobalTaxCalculation
	TotalAmt                json.Number `json:",omitempty"`
	TransactionLocationType string      `json:",omitempty"`
	DueDate                 Date        `json:",omitempty"`
	MetaData                MetaData    `json:",omitempty"`
	DocNumber               string
	PrivateNote             string        `json:",omitempty"`
	TxnTaxDetail            TxnTaxDetail  `json:",omitempty"`
	ExchangeRate            json.Number   `json:",omitempty"`
	DepartmentRef           ReferenceType `json:",omitempty"`
	IncludeInAnnualTPAR     bool          `json:",omitempty"`
	HomeBalance             json.Number   `json:",omitempty"`
	RecurDataRef            ReferenceType `json:",omitempty"`
	Balance                 json.Number   `json:",omitempty"`
}

type Client

type Client struct {
	// Get this from oauth2.NewClient().
	Client *http.Client
	// Set to ProductionEndpoint or SandboxEndpoint.
	Endpoint EndpointURL

	// The account ID you're connecting to.
	RealmID string
	// contains filtered or unexported fields
}

Client is your handle to the QuickBooks API.

func NewQuickbooksClient

func NewQuickbooksClient(clientId string, clientSecret string, realmID string, isProduction bool, token *BearerToken) (c *Client, err error)

func (*Client) CreateAttachable

func (c *Client) CreateAttachable(attachable *Attachable) (*Attachable, error)

CreateAttachable creates the attachable

func (*Client) CreateBill

func (c *Client) CreateBill(bill *Bill) (*Bill, error)

func (*Client) CreateCustomer

func (c *Client) CreateCustomer(customer *Customer) (*Customer, error)

CreateCustomer creates the given Customer on the QuickBooks server, returning the resulting Customer object.

func (*Client) CreateInvoice

func (c *Client) CreateInvoice(inv *Invoice) (*Invoice, error)

CreateInvoice creates the given Invoice on the QuickBooks server, returning the resulting Invoice object.

func (*Client) CreatePayment

func (c *Client) CreatePayment(inv *Payment) (*Payment, error)

CreatePayment creates the given Payment on the QuickBooks server, returning the resulting Payment object.

func (*Client) CreateRefund

func (c *Client) CreateRefund(inv *Refund) (*Refund, error)

CreateRefund creates the given Refund on the QuickBooks server, returning the resulting Refund object.

func (*Client) CreateVendor

func (c *Client) CreateVendor(vendor *Vendor) (*Vendor, error)

CreateVendor creates the vendor

func (*Client) DeleteAttachable

func (c *Client) DeleteAttachable(attachable *Attachable) error

DeleteAttachable deletes the attachable

func (*Client) DeleteInvoice

func (c *Client) DeleteInvoice(id, syncToken string) error

DeleteInvoice deletes the given Invoice by ID and sync token from the QuickBooks server.

func (*Client) DownloadAttachable

func (c *Client) DownloadAttachable(attachableId string) (string, error)

DownloadAttachable downloads the attachable

func (*Client) FetchCompanyInfo

func (c *Client) FetchCompanyInfo() (*CompanyInfo, error)

FetchCompanyInfo returns the QuickBooks CompanyInfo object. This is a good test to check whether you're connected.

func (*Client) FetchCustomerByID

func (c *Client) FetchCustomerByID(id string) (*Customer, error)

FetchCustomerByID returns a customer with a given ID.

func (*Client) FetchCustomers

func (c *Client) FetchCustomers() ([]Customer, error)

FetchCustomers gets the full list of Customers in the QuickBooks account.

func (*Client) FetchInvoices

func (c *Client) FetchInvoices() ([]Invoice, error)

FetchInvoices gets the full list of Invoices in the QuickBooks account.

func (*Client) FetchItem

func (c *Client) FetchItem(id string) (*Item, error)

FetchItem returns just one particular Item from QuickBooks, by ID.

func (*Client) FetchItems

func (c *Client) FetchItems() ([]Item, error)

FetchItems returns the list of Items in the QuickBooks account. These are basically product types, and you need them to create invoices.

func (*Client) GetAttachable

func (c *Client) GetAttachable(attachableId string) (*Attachable, error)

GetAttachable gets the attachable

func (*Client) GetAttachables

func (c *Client) GetAttachables(startpos int) ([]Attachable, error)

GetAttachables gets the attachables

func (*Client) GetVendors

func (c *Client) GetVendors(startpos int) ([]Vendor, error)

GetVendors gets the vendors

func (*Client) RefreshToken

func (c *Client) RefreshToken(refreshToken string) (*BearerToken, error)

Call the refresh endpoint to generate new tokens

func (*Client) RetrieveBearerToken

func (c *Client) RetrieveBearerToken(authorizationCode string) (*BearerToken, error)

Method to retrieve access token (bearer token) This method can only be called once

func (*Client) RevokeToken

func (c *Client) RevokeToken(refreshToken string) error

Call the revoke endpoint to revoke tokens

func (*Client) UpdateAttachable

func (c *Client) UpdateAttachable(attachable *Attachable) (*Attachable, error)

UpdateAttachable updates the attachable

func (*Client) UpdateCustomer

func (c *Client) UpdateCustomer(customer *Customer) (*Customer, error)

UpdateCustomer updates the given Customer on the QuickBooks server, returning the resulting Customer object. It's a sparse update, as not all QB fields are present in our Customer object.

func (*Client) UpdateVendor

func (c *Client) UpdateVendor(vendor *Vendor) (*Vendor, error)

UpdateVendor updates the vendor

func (*Client) UploadAttachable

func (c *Client) UploadAttachable(attachable *Attachable, data io.Reader) (*Attachable, error)

UploadAttachable uploads the attachable

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 `json:"Id"`
	SyncToken string
	Metadata  MetaData `json:",omitempty"`
}

CompanyInfo describes a company account.

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 Customer

type Customer struct {
	ID                 string          `json:"Id,omitempty"`
	SyncToken          string          `json:",omitempty"`
	MetaData           MetaData        `json:",omitempty"`
	Title              null.String     `json:",omitempty"`
	GivenName          null.String     `json:",omitempty"`
	MiddleName         null.String     `json:",omitempty"`
	FamilyName         null.String     `json:",omitempty"`
	Suffix             null.String     `json:",omitempty"`
	DisplayName        string          `json:",omitempty"`
	FullyQualifiedName null.String     `json:",omitempty"`
	CompanyName        null.String     `json:",omitempty"`
	PrintOnCheckName   string          `json:",omitempty"`
	Active             bool            `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"`
	//DefaultTaxCodeRef
	Taxable              *bool            `json:",omitempty"`
	TaxExemptionReasonID *string          `json:"TaxExemptionReasonId,omitempty"`
	BillAddr             *PhysicalAddress `json:",omitempty"`
	ShipAddr             *PhysicalAddress `json:",omitempty"`
	Notes                string           `json:",omitempty"`
	Job                  null.Bool        `json:",omitempty"`
	BillWithParent       bool             `json:",omitempty"`
	ParentRef            ReferenceType    `json:",omitempty"`
	Level                int              `json:",omitempty"`
	//SalesTermRef
	//PaymentMethodRef
	Balance         json.Number `json:",omitempty"`
	OpenBalanceDate Date        `json:",omitempty"`
	BalanceWithJobs json.Number `json:",omitempty"`
}

Customer represents a QuickBooks Customer object.

func (Customer) GetAddress

func (c Customer) GetAddress() PhysicalAddress

GetAddress prioritizes the ship address, but falls back on bill address

func (Customer) GetPrimaryEmail

func (c Customer) GetPrimaryEmail() string

GetPrimaryEmail de-nests the PrimaryEmailAddr object

func (Customer) GetWebsite

func (c Customer) GetWebsite() string

GetWebsite de-nests the Website object

type Date

type Date struct {
	time.Time
}

Date represents a Quickbooks date

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON removes time from parsed date

type DiscountLineDetail

type DiscountLineDetail struct {
	PercentBased    bool
	DiscountPercent float32 `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"`
}

type EmailAddress

type EmailAddress struct {
	Address string `json:",omitempty"`
}

EmailAddress represents a QuickBooks email address.

type EndpointURL

type EndpointURL string

EndpointURL specifies the endpoint to connect to.

const (
	// ProductionEndpoint is for live apps.
	ProductionEndpoint EndpointURL = "https://quickbooks.api.intuit.com"
	// SandboxEndpoint is for testing.
	SandboxEndpoint EndpointURL = "https://sandbox-quickbooks.api.intuit.com"
	// DiscoverySandboxEndpoint is for testing.
	DiscoverySandboxEndpoint EndpointURL = "https://developer.api.intuit.com/.well-known/openid_sandbox_configuration"
	// DiscoveryProductionEndpoint is for live apps.
	DiscoveryProductionEndpoint EndpointURL = "https://developer.api.intuit.com/.well-known/openid_configuration"
)

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.

func (Failure) Error

func (f Failure) Error() string

Error implements the error interface.

type Invoice

type Invoice struct {
	ID        string   `json:"Id,omitempty"`
	SyncToken string   `json:",omitempty"`
	MetaData  MetaData `json:",omitempty"`
	//CustomField
	DocNumber string `json:",omitempty"`
	TxnDate   Date   `json:",omitempty"`
	//DepartmentRef
	PrivateNote string `json:",omitempty"`
	//LinkedTxn
	Line         []Line
	TxnTaxDetail TxnTaxDetail `json:",omitempty"`
	CustomerRef  ReferenceType
	CustomerMemo MemoRef         `json:",omitempty"`
	BillAddr     PhysicalAddress `json:",omitempty"`
	ShipAddr     PhysicalAddress `json:",omitempty"`
	ClassRef     ReferenceType   `json:",omitempty"`
	SalesTermRef ReferenceType   `json:",omitempty"`
	DueDate      Date            `json:",omitempty"`
	//GlobalTaxCalculation
	ShipMethodRef ReferenceType `json:",omitempty"`
	ShipDate      Date          `json:",omitempty"`
	TrackingNum   string        `json:",omitempty"`
	TotalAmt      json.Number   `json:",omitempty"`
	//CurrencyRef
	ExchangeRate          json.Number  `json:",omitempty"`
	HomeAmtTotal          json.Number  `json:",omitempty"`
	HomeBalance           json.Number  `json:",omitempty"`
	ApplyTaxAfterDiscount bool         `json:",omitempty"`
	PrintStatus           string       `json:",omitempty"`
	EmailStatus           string       `json:",omitempty"`
	BillEmail             EmailAddress `json:",omitempty"`
	BillEmailCC           EmailAddress `json:"BillEmailCc,omitempty"`
	BillEmailBCC          EmailAddress `json:"BillEmailBcc,omitempty"`
	//DeliveryInfo
	Balance                      json.Number   `json:",omitempty"`
	TxnSource                    string        `json:",omitempty"`
	AllowOnlineCreditCardPayment bool          `json:",omitempty"`
	AllowOnlineACHPayment        bool          `json:",omitempty"`
	Deposit                      json.Number   `json:",omitempty"`
	DepositToAccountRef          ReferenceType `json:",omitempty"`
}

Invoice represents a QuickBooks Invoice object.

type Item

type Item struct {
	ID        string `json:"Id,omitempty"`
	SyncToken string `json:",omitempty"`
	//MetaData
	Name        string
	SKU         string `json:"Sku,omitempty"`
	Description string `json:",omitempty"`
	Active      bool   `json:",omitempty"`
	//SubItem
	//ParentRef
	//Level
	//FullyQualifiedName
	Taxable             bool        `json:",omitempty"`
	SalesTaxIncluded    bool        `json:",omitempty"`
	UnitPrice           json.Number `json:",omitempty"`
	Type                string
	IncomeAccountRef    ReferenceType
	ExpenseAccountRef   ReferenceType
	PurchaseDesc        string      `json:",omitempty"`
	PurchaseTaxIncluded bool        `json:",omitempty"`
	PurchaseCost        json.Number `json:",omitempty"`
	AssetAccountRef     ReferenceType
	TrackQtyOnHand      bool `json:",omitempty"`
	//InvStartDate Date
	QtyOnHand          json.Number   `json:",omitempty"`
	SalesTaxCodeRef    ReferenceType `json:",omitempty"`
	PurchaseTaxCodeRef ReferenceType `json:",omitempty"`
}

Item represents a QuickBooks Item object (a product type).

type Line

type Line struct {
	ID                            string `json:"Id,omitempty"`
	LineNum                       int    `json:",omitempty"`
	Description                   string `json:",omitempty"`
	Amount                        json.Number
	DetailType                    string
	AccountBasedExpenseLineDetail AccountBasedExpenseLineDetail
	SalesItemLineDetail           SalesItemLineDetail `json:",omitempty"`
	DiscountLineDetail            DiscountLineDetail  `json:",omitempty"`
	TaxLineDetail                 TaxLineDetail       `json:",omitempty"`
}

Line ...

type MemoRef

type MemoRef struct {
	Value string `json:"value,omitempty"`
}

MemoRef represents a QuickBooks MemoRef object.

type MetaData

type MetaData struct {
	CreateTime      Date
	LastUpdatedTime Date
}

MetaData is a timestamp of genesis and last change of a Quickbooks object

type Payment

type Payment struct {
	ID             string      `json:"Id,omitempty"`
	TxnDate        Date        `json:",omitempty"`
	TotalAmt       json.Number `json:",omitempty"`
	ProcessPayment bool        `json:",omitempty"`
	CustomerRef    ReferenceType
	Line           []PaymentLine
}

type PaymentLine

type PaymentLine struct {
	ID        string `json:"Id,omitempty"`
	LineNum   int    `json:",omitempty"`
	Amount    json.Number
	LinkedTxn []TxnLine
}

PaymentLine ...

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 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 Refund

type Refund struct {
	ID                  string `json:"Id,omitempty"`
	TxnDate             Date   `json:",omitempty"`
	Line                []RefundLine
	DepositToAccountRef ReferenceType `json:",omitempty"`
	CustomerRef         ReferenceType `json:",omitempty"`
}

type RefundLine

type RefundLine struct {
	ID string `json:"Id,omitempty"`

	DetailType          string              `json:",omitempty"`
	Amount              json.Number         `json:",omitempty"`
	SalesItemLineDetail SalesItemLineDetail `json:",omitempty"`
}

type SalesItemLineDetail

type SalesItemLineDetail struct {
	ItemRef   ReferenceType `json:",omitempty"`
	ClassRef  ReferenceType `json:",omitempty"`
	UnitPrice json.Number   `json:",omitempty"`
	//MarkupInfo
	Qty             float32       `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 TaxLineDetail

type TaxLineDetail struct {
	PercentBased     bool        `json:",omitempty"`
	NetAmountTaxable json.Number `json:",omitempty"`
	//TaxInclusiveAmount json.Number `json:",omitempty"`
	//OverrideDeltaAmount
	TaxPercent json.Number `json:",omitempty"`
	TaxRateRef ReferenceType
}

TaxLineDetail ...

type TelephoneNumber

type TelephoneNumber struct {
	FreeFormNumber string
}

TelephoneNumber represents a QuickBooks phone number.

type TxnLine

type TxnLine struct {
	TxnId   json.Number `json:",omitempty"`
	TxnType string      `json:",omitempty"`
}

type TxnTaxDetail

type TxnTaxDetail struct {
	TxnTaxCodeRef ReferenceType `json:",omitempty"`
	TotalTax      json.Number   `json:",omitempty"`
	TaxLine       []Line        `json:",omitempty"`
}

TxnTaxDetail ...

type Vendor

type Vendor struct {
	ID               string       `json:"Id,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"`
	PrimaryEmailAddr EmailAddress `json:",omitempty"`
	DisplayName      string       `json:",omitempty"`
	// ContactInfo
	APAccountRef   ReferenceType   `json:",omitempty"`
	TermRef        ReferenceType   `json:",omitempty"`
	GSTIN          string          `json:",omitempty"`
	Fax            TelephoneNumber `json:",omitempty"`
	BusinessNumber string          `json:",omitempty"`
	// CurrencyRef
	HasTPAR           bool            `json:",omitempty"`
	TaxReportingBasis string          `json:",omitempty"`
	Mobile            TelephoneNumber `json:",omitempty"`
	PrimaryPhone      TelephoneNumber `json:",omitempty"`
	Active            bool            `json:",omitempty"`
	AlternatePhone    TelephoneNumber `json:",omitempty"`
	MetaData          MetaData        `json:",omitempty"`
	Vendor1099        bool            `json:",omitempty"`
	BillRate          json.Number     `json:",omitempty"`
	WebAddr           *WebSiteAddress `json:",omitempty"`
	CompanyName       string          `json:",omitempty"`
	// VendorPaymentBankDetail
	TaxIdentifier       string           `json:",omitempty"`
	AcctNum             string           `json:",omitempty"`
	GSTRegistrationType string           `json:",omitempty"`
	PrintOnCheckName    string           `json:",omitempty"`
	BillAddr            *PhysicalAddress `json:",omitempty"`
	Balance             json.Number      `json:",omitempty"`
}

Vendor describes a vendor.

type WebSiteAddress

type WebSiteAddress struct {
	URI string
}

WebSiteAddress represents a Quickbooks Website

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL