Compare commits
2 Commits
2f10dcd9fc
...
947924bd6d
Author | SHA1 | Date | |
---|---|---|---|
947924bd6d | |||
a396f83e13 |
@ -18,13 +18,6 @@ type Company struct {
|
||||
StatusHref string `json:"status_href"`
|
||||
} `json:"_info"`
|
||||
} `json:"status"`
|
||||
Type struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Info struct {
|
||||
TypeHref string `json:"type_href"`
|
||||
} `json:"_info"`
|
||||
} `json:"type"`
|
||||
AddressLine1 string `json:"addressLine1"`
|
||||
City string `json:"city"`
|
||||
State string `json:"state"`
|
||||
@ -39,8 +32,20 @@ type Company struct {
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
FaxNumber string `json:"faxNumber"`
|
||||
Website string `json:"website"`
|
||||
TerritoryID int `json:"territoryId"`
|
||||
MarketID int `json:"marketId"`
|
||||
Territory struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Info struct {
|
||||
LocationHref string `json:"location_href"`
|
||||
} `json:"_info"`
|
||||
} `json:"territory"`
|
||||
Market struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Info struct {
|
||||
MarketHref string `json:"Market_href"`
|
||||
} `json:"_info"`
|
||||
} `json:"market"`
|
||||
AccountNumber string `json:"accountNumber"`
|
||||
DefaultContact struct {
|
||||
ID int `json:"id"`
|
||||
@ -52,19 +57,20 @@ type Company struct {
|
||||
DateAcquired time.Time `json:"dateAcquired"`
|
||||
AnnualRevenue float64 `json:"annualRevenue"`
|
||||
NumberOfEmployees int `json:"numberOfEmployees"`
|
||||
TimeZone struct {
|
||||
TimeZoneSetup struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Info struct {
|
||||
TimeZoneSetupHref string `json:"timeZoneSetup_href"`
|
||||
} `json:"_info"`
|
||||
} `json:"timeZone"`
|
||||
} `json:"timeZoneSetup"`
|
||||
LeadFlag bool `json:"leadFlag"`
|
||||
UnsubscribeFlag bool `json:"unsubscribeFlag"`
|
||||
UserDefinedField1 string `json:"userDefinedField1"`
|
||||
UserDefinedField2 string `json:"userDefinedField2"`
|
||||
UserDefinedField3 string `json:"userDefinedField3"`
|
||||
UserDefinedField7 string `json:"userDefinedField7"`
|
||||
UserDefinedField4 string `json:"userDefinedField4"`
|
||||
UserDefinedField5 string `json:"userDefinedField5"`
|
||||
VendorIdentifier string `json:"vendorIdentifier"`
|
||||
TaxIdentifier string `json:"taxIdentifier"`
|
||||
TaxCode struct {
|
||||
@ -107,15 +113,7 @@ type Company struct {
|
||||
InvoiceToEmailAddress string `json:"invoiceToEmailAddress"`
|
||||
DeletedFlag bool `json:"deletedFlag"`
|
||||
MobileGUID string `json:"mobileGuid"`
|
||||
Currency struct {
|
||||
ID int `json:"id"`
|
||||
Symbol string `json:"symbol"`
|
||||
IsoCode string `json:"isoCode"`
|
||||
Name string `json:"name"`
|
||||
Info struct {
|
||||
CurrencyHref string `json:"currency_href"`
|
||||
} `json:"_info"`
|
||||
} `json:"currency"`
|
||||
TypeIds []int `json:"typeIds"`
|
||||
Info struct {
|
||||
LastUpdated time.Time `json:"lastUpdated"`
|
||||
UpdatedBy string `json:"updatedBy"`
|
||||
@ -384,6 +382,8 @@ func (cw *Site) GetCompanyByName(companyName string) (*Company, error) {
|
||||
return nil, fmt.Errorf("request failed for %s: %s", req.RestAction, err)
|
||||
}
|
||||
|
||||
fmt.Println(string(req.Body))
|
||||
|
||||
co := &[]Company{}
|
||||
err = json.Unmarshal(req.Body, co)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user