modulepackage
0.0.0-20230513191230-2a30459a5865
Repository: https://github.com/nsotgui/quickbooks-go.git
Documentation: pkg.go.dev
# README
quickbooks-go
quickbooks-go is a Go library that provides access to Intuit's QuickBooks Online API.
Example
Authorization flow
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
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
# Packages
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DiscoveryProductionEndpoint is for live apps.
DiscoverySandboxEndpoint is for testing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProductionEndpoint is for live apps.
No description provided by the author
No description provided by the author
SandboxEndpoint is for testing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
AccountBasedExpenseLineDetail.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Client is your handle to the QuickBooks API.
CompanyInfo describes a company account.
Customer represents a QuickBooks Customer object.
No description provided by the author
Date represents a Quickbooks date.
DiscountLineDetail ...
No description provided by the author
EmailAddress represents a QuickBooks email address.
No description provided by the author
Failure is the outermost struct that holds an error response.
No description provided by the author
Invoice represents a QuickBooks Invoice object.
Item represents a QuickBooks Item object (a product type).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Line ...
MemoRef represents a QuickBooks MemoRef object.
MetaData is a timestamp of genesis and last change of a Quickbooks object.
PhysicalAddress represents a QuickBooks address.
No description provided by the author
ReferenceType represents a QuickBooks reference to another object.
SalesItemLineDetail ...
TaxLineDetail ...
TelephoneNumber represents a QuickBooks phone number.
TxnTaxDetail ...
No description provided by the author
Vendor describes a vendor.
No description provided by the author
WebSiteAddress represents a Quickbooks Website.
# Type aliases
No description provided by the author
EndpointURL specifies the endpoint to connect to.