diff --git a/class.go b/class.go index b961071..3ffbc63 100644 --- a/class.go +++ b/class.go @@ -8,12 +8,16 @@ import ( ) type Class struct { - ID string `json:"Id,omitempty"` - Name string `json:",omitempty"` - SyncToken string `json:",omitempty"` - ParentRef string `json:",omitempty"` - SubClass bool `json:",omitempty"` - FullyQualifiedName string `json:",omitempty"` + ID string `json:"Id,omitempty"` + Name string `json:",omitempty"` + SyncToken string `json:",omitempty"` + ParentRef ParentRef `json:",omitempty"` + SubClass bool `json:",omitempty"` + FullyQualifiedName string `json:",omitempty"` +} + +type ParentRef struct { + Value string `json:"value"` } // GetClasses fetches classes based on a page size diff --git a/client.go b/client.go index bb52027..53c5274 100644 --- a/client.go +++ b/client.go @@ -7,18 +7,18 @@ 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() + // 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() */ package quickbooks