Added OrganizationType

Added Metadata
This commit is contained in:
Steven Polley 2018-07-22 01:45:09 -06:00
parent cff418c0ff
commit 9fdb1641d9
1 changed files with 16 additions and 4 deletions

View File

@ -30,9 +30,9 @@ type OrganizationTypeData struct {
} `json:"links"`
}
//OrganizationInternalData contains the schema of an Organization in IT Glue without the "data" wrapper.
//OrganizationData contains the schema of an Organization in IT Glue without the "data" wrapper.
//This allows us to reuse the schema when data is either a JSON object or an array, depending on what results are returned
type OrganizationInternalData struct {
type OrganizationData struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes struct {
@ -52,12 +52,24 @@ type OrganizationInternalData struct {
//Organization contains a single Organization
type Organization struct {
Data struct{ OrganizationInternalData } `json:"data"`
Data struct{ OrganizationData } `json:"data"`
Meta struct{ Metadata } `json:"metadata"`
}
//OrganizationList contains a slice of Organizations
type OrganizationList struct {
Data []struct{ OrganizationInternalData } `json:"data"`
Data []struct{ OrganizationData } `json:"data"`
Meta struct{ Metadata } `json:"metadata"`
}
type OrganizationType struct {
Data struct{ OrganizationTypeData } `json:"data"`
Meta struct{ Metadata } `json:"metadata"`
}
type OrganizationTypeList struct {
Data []struct{ OrganizationTypeData } `json:"data"`
Meta struct{ Metadata } `json:"metadata"`
}
///organization_types