Added OrganizationType
Added Metadata
This commit is contained in:
parent
cff418c0ff
commit
9fdb1641d9
@ -30,9 +30,9 @@ type OrganizationTypeData struct {
|
|||||||
} `json:"links"`
|
} `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
|
//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"`
|
ID string `json:"id"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Attributes struct {
|
Attributes struct {
|
||||||
@ -52,12 +52,24 @@ type OrganizationInternalData struct {
|
|||||||
|
|
||||||
//Organization contains a single Organization
|
//Organization contains a single Organization
|
||||||
type Organization struct {
|
type Organization struct {
|
||||||
Data struct{ OrganizationInternalData } `json:"data"`
|
Data struct{ OrganizationData } `json:"data"`
|
||||||
|
Meta struct{ Metadata } `json:"metadata"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//OrganizationList contains a slice of Organizations
|
//OrganizationList contains a slice of Organizations
|
||||||
type OrganizationList struct {
|
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
|
///organization_types
|
||||||
|
Loading…
Reference in New Issue
Block a user