quickbooks

package module
v0.0.0-...-624efd8 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2017 License: MIT Imports: 10 Imported by: 0

README

go-quickbooks

Quickbooks online SDK for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(consumerKey, consumerSecret, oauthToken, oauthSecret, realmID string, isSandbox bool) *quickbooks

NewClient creates a new client to work with Quickbooks

Types

type Account

type Account struct {
	ID                            string `json:"Id,omitempty"`
	Name                          string `json:"Name"`
	SubAccount                    bool   `json:"SubAccount,omitempty"`
	FullyQualifiedName            string `json:"FullyQualifiedName,omitempty"`
	Active                        bool   `json:"Active,omitempty"`
	Classification                string `json:"Classification,omitempty"`
	AccountType                   string `json:"AccountType"`
	AccountSubType                string `json:"AccountSubType,omitempty"`
	CurrentBalance                int    `json:"CurrentBalance,omitempty"`
	CurrentBalanceWithSubAccounts int    `json:"CurrentBalanceWithSubAccounts,omitempty"`
	CurrencyRef                   *struct {
		Value string `json:"value"`
		Name  string `json:"name"`
	} `json:"CurrencyRef,omitempty"`
	Domain    string `json:"domain,omitempty"`
	Sparse    bool   `json:"sparse,omitempty"`
	SyncToken string `json:"SyncToken,omitempty"`
	MetaData  *struct {
		CreateTime      string `json:"CreateTime"`
		LastUpdatedTime string `json:"LastUpdatedTime"`
	} `json:"MetaData,omitempty"`
}

Account quickbooks account type

type AccountObject

type AccountObject struct {
	Account *Account `json:"Account"`
	Time    string   `json:"time"`
}

AccountObject the complete quickbooks account object type

type AccountRef

type AccountRef struct {
	Value string `json:"value"`
	Name  string `json:"name,omitempty"`
}

AccountRef chart of account reference

type Address

type Address struct {
	ID                     string `json:"Id,omitempty"`
	Line1                  string `json:"Line1"`
	Line2                  string `json:"Line2,omitempty"`
	City                   string `json:"City"`
	CountrySubDivisionCode string `json:"CountrySubDivisionCode"`
	PostalCode             string `json:"PostalCode"`
	Lat                    string `json:"Lat,omitempty"`
	Long                   string `json:"Long,omitempty"`
}

type CompanyObject

type CompanyObject struct {
	CompanyInfo struct {
		CompanyName string `json:"CompanyName"`
		LegalName   string `json:"LegalName"`
		CompanyAddr struct {
			ID                     string `json:"Id"`
			Line1                  string `json:"Line1"`
			City                   string `json:"City"`
			CountrySubDivisionCode string `json:"CountrySubDivisionCode"`
			PostalCode             string `json:"PostalCode"`
			Lat                    string `json:"Lat"`
			Long                   string `json:"Long"`
		} `json:"CompanyAddr"`
		CustomerCommunicationAddr struct {
			ID                     string `json:"Id"`
			Line1                  string `json:"Line1"`
			City                   string `json:"City"`
			CountrySubDivisionCode string `json:"CountrySubDivisionCode"`
			PostalCode             string `json:"PostalCode"`
			Lat                    string `json:"Lat"`
			Long                   string `json:"Long"`
		} `json:"CustomerCommunicationAddr"`
		LegalAddr struct {
			ID                     string `json:"Id"`
			Line1                  string `json:"Line1"`
			City                   string `json:"City"`
			CountrySubDivisionCode string `json:"CountrySubDivisionCode"`
			PostalCode             string `json:"PostalCode"`
			Lat                    string `json:"Lat"`
			Long                   string `json:"Long"`
		} `json:"LegalAddr"`
		PrimaryPhone struct {
		} `json:"PrimaryPhone"`
		CompanyStartDate     string `json:"CompanyStartDate"`
		FiscalYearStartMonth string `json:"FiscalYearStartMonth"`
		Country              string `json:"Country"`
		Email                struct {
			Address string `json:"Address"`
		} `json:"Email"`
		WebAddr struct {
		} `json:"WebAddr"`
		SupportedLanguages string `json:"SupportedLanguages"`
		NameValue          []struct {
			Name  string `json:"Name"`
			Value string `json:"Value"`
		} `json:"NameValue"`
		Domain    string `json:"domain"`
		Sparse    bool   `json:"sparse"`
		ID        string `json:"Id"`
		SyncToken string `json:"SyncToken"`
		MetaData  struct {
			CreateTime      string `json:"CreateTime"`
			LastUpdatedTime string `json:"LastUpdatedTime"`
		} `json:"MetaData"`
	} `json:"CompanyInfo"`
	Time string `json:"time"`
}

CompanyObject the complete quickbooks company object type

type Customer

type Customer struct {
	ID                      string            `json:"Id,omitempty"`
	Taxable                 bool              `json:"Taxable,omitempty"`
	BillAddr                *Address          `json:"BillAddr,omitempty"`
	ShipAddr                *Address          `json:"ShipAddr,omitempty"`
	Job                     bool              `json:"Job,omitempty"`
	BillWithParent          bool              `json:"BillWithParent,omitempty"`
	Balance                 float64           `json:"Balance,omitempty"`
	BalanceWithJobs         float64           `json:"BalanceWithJobs,omitempty"`
	PreferredDeliveryMethod string            `json:"PreferredDeliveryMethod,omitempty"`
	Domain                  string            `json:"domain,omitempty"`
	Sparse                  bool              `json:"sparse,omitempty"`
	SyncToken               string            `json:"SyncToken,omitempty"`
	GivenName               string            `json:"GivenName"`
	MiddleName              string            `json:"MiddleName,omitempty"`
	FamilyName              string            `json:"FamilyName"`
	FullyQualifiedName      string            `json:"FullyQualifiedName,omitempty"`
	CompanyName             string            `json:"CompanyName,omitempty"`
	DisplayName             string            `json:"DisplayName"`
	PrintOnCheckName        string            `json:"PrintOnCheckName,omitempty"`
	Active                  bool              `json:"Active,omitempty"`
	PrimaryPhone            *PrimaryPhone     `json:"PrimaryPhone,omitempty"`
	PrimaryEmailAddr        *PrimaryEmailAddr `json:"PrimaryEmailAddr,omitempty"`
	MetaData                *MetaData         `json:"MetaData,omitempty"`
}

Customer quickbooks customer type

type CustomerObject

type CustomerObject struct {
	Customer Customer `json:"Customer"`
	Time     string   `json:"time,omitempty"`
}

CustomerObject the complete quickbooks customer object type

type CustomerRef

type CustomerRef struct {
	Value string `json:"value"`
	Name  string `json:"name,omitempty"`
}

type Invoice

type Invoice struct {
	ID        string `json:"Id,omitempty"`
	Deposit   int    `json:"Deposit,omitempty"`
	Domain    string `json:"domain,omitempty"`
	Sparse    bool   `json:"sparse,omitempty"`
	SyncToken string `json:"SyncToken,omitempty"`
	MetaData  *struct {
		CreateTime      string `json:"CreateTime"`
		LastUpdatedTime string `json:"LastUpdatedTime"`
	} `json:"MetaData,omitempty"`
	CustomField *[]struct {
		DefinitionID string `json:"DefinitionId"`
		Name         string `json:"Name"`
		Type         string `json:"Type"`
		StringValue  string `json:"StringValue"`
	} `json:"CustomField,omitempty"`
	DocNumber string `json:"DocNumber,omitempty"`
	TxnDate   string `json:"TxnDate,omitempty"`
	LinkedTxn *[]struct {
		TxnID   string `json:"TxnId"`
		TxnType string `json:"TxnType"`
	} `json:"LinkedTxn,omitempty"`
	Line         []InvoiceLine `json:"Line"`
	TxnTaxDetail *struct {
		TxnTaxCodeRef *struct {
			Value string `json:"value"`
		} `json:"TxnTaxCodeRef,omitempty"`
		TotalTax float64 `json:"TotalTax,omitempty"`
		TaxLine  *[]struct {
			Amount        float64 `json:"Amount"`
			DetailType    string  `json:"DetailType"`
			TaxLineDetail *struct {
				TaxRateRef *struct {
					Value string `json:"value"`
				} `json:"TaxRateRef,omitempty"`
				PercentBased     bool    `json:"PercentBased"`
				TaxPercent       int     `json:"TaxPercent"`
				NetAmountTaxable float64 `json:"NetAmountTaxable"`
			} `json:"TaxLineDetail,omitempty"`
		} `json:"TaxLine,omitempty"`
	} `json:"TxnTaxDetail,omitempty"`
	CustomerRef  *CustomerRef `json:"CustomerRef"`
	CustomerMemo *struct {
		Value string `json:"value"`
	} `json:"CustomerMemo,omitempty"`
	BillAddr     *Address `json:"BillAddr,omitempty"`
	ShipAddr     *Address `json:"ShipAddr,omitempty"`
	SalesTermRef *struct {
		Value string `json:"value"`
	} `json:"SalesTermRef,omitempty"`
	DueDate               string            `json:"DueDate,omitempty"`
	TotalAmt              float64           `json:"TotalAmt,omitempty"`
	ApplyTaxAfterDiscount bool              `json:"ApplyTaxAfterDiscount,omitempty"`
	PrintStatus           string            `json:"PrintStatus,omitempty"`
	EmailStatus           string            `json:"EmailStatus,omitempty"`
	BillEmail             *PrimaryEmailAddr `json:"BillEmail,omitempty"`
	Balance               float64           `json:"Balance,omitempty"`
}

Invoice quickbooks invoice type

type InvoiceLine

type InvoiceLine struct {
	ID                  string               `json:"Id,omitempty"`
	LineNum             int                  `json:"LineNum,omitempty"`
	Description         string               `json:"Description,omitempty"`
	Amount              float64              `json:"Amount"`
	DetailType          string               `json:"DetailType"`
	SalesItemLineDetail *SalesItemLineDetail `json:"SalesItemLineDetail"`
	SubTotalLineDetail  *struct {
	} `json:"SubTotalLineDetail,omitempty"`
}

InvoiceLine quickbooks invoice line item type

type InvoiceObject

type InvoiceObject struct {
	Invoice *Invoice `json:"Invoice"`
	Time    string   `json:"time"`
}

InvoiceObject the complete quickbooks invoice object type

type Item

type Item struct {
	ID                 string      `json:"Id,omitempty"`
	Name               string      `json:"Name"`
	Description        string      `json:"Description,omitempty"`
	Type               string      `json:"Type"`
	Active             bool        `json:"Active,omitempty"`
	FullyQualifiedName string      `json:"FullyQualifiedName,omitempty"`
	Taxable            bool        `json:"Taxable,omitempty"`
	UnitPrice          int         `json:"UnitPrice,omitempty"`
	IncomeAccountRef   *AccountRef `json:"IncomeAccountRef"`
	PurchaseDesc       string      `json:"PurchaseDesc,omitempty"`
	PurchaseCost       int         `json:"PurchaseCost,omitempty"`
	ExpenseAccountRef  *AccountRef `json:"ExpenseAccountRef,omitempty"`
	AssetAccountRef    *AccountRef `json:"AssetAccountRef,omitempty"`
	TrackQtyOnHand     bool        `json:"TrackQtyOnHand,omitempty"`
	QtyOnHand          int         `json:"QtyOnHand,omitempty"`
	InvStartDate       string      `json:"InvStartDate,omitempty"`
	Domain             string      `json:"domain,omitempty"`
	Sparse             bool        `json:"sparse,omitempty"`
	SyncToken          string      `json:"SyncToken,omitempty"`
	MetaData           *struct {
		CreateTime      string `json:"CreateTime"`
		LastUpdatedTime string `json:"LastUpdatedTime"`
	} `json:"MetaData,omitempty"`
}

Item quickbooks item type

type ItemObject

type ItemObject struct {
	Item *Item  `json:"Item"`
	Time string `json:"time"`
}

ItemObject the complete quickbooks item object type

type ItemRef

type ItemRef struct {
	Value string `json:"value"`
	Name  string `json:"name,omitempty"`
}

type MetaData

type MetaData struct {
	CreateTime      string `json:"CreateTime"`
	LastUpdatedTime string `json:"LastUpdatedTime"`
}

type PrimaryEmailAddr

type PrimaryEmailAddr struct {
	Address string `json:"Address"`
}

type PrimaryPhone

type PrimaryPhone struct {
	FreeFormNumber string `json:"FreeFormNumber"`
}

type SalesItemLineDetail

type SalesItemLineDetail struct {
	ItemRef    *ItemRef    `json:"ItemRef"`
	UnitPrice  int         `json:"UnitPrice,omitempty"`
	Qty        int         `json:"Qty,omitempty"`
	TaxCodeRef *TaxCodeRef `json:"TaxCodeRef,omitempty"`
}

SalesItemLineDetail invoice sales line item detail type

type TaxCodeRef

type TaxCodeRef struct {
	Value string `json:"value"`
}

Directories

Path Synopsis
sdk

Jump to

Keyboard shortcuts

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