Added ConfigurationReference struct and GetTicketConfigurationsByID(ticketID) receiver
This commit is contained in:
parent
b35fcbbbb0
commit
ab8a24800f
@ -179,6 +179,15 @@ type TimeEntryReference struct {
|
|||||||
} `json:"_info"`
|
} `json:"_info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ConfigurationReference struct {
|
||||||
|
ID int `json:"id"`
|
||||||
|
DeviceIdentifier string `json:"deviceIdentifier"`
|
||||||
|
Info struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
ConfigurationHref string `json:"configuration_href"`
|
||||||
|
} `json:"_info"`
|
||||||
|
}
|
||||||
|
|
||||||
func (cw *ConnectwiseSite) GetTicketByID(ticketID int) *Ticket {
|
func (cw *ConnectwiseSite) GetTicketByID(ticketID int) *Ticket {
|
||||||
|
|
||||||
Url := cw.BuildUrl(fmt.Sprintf("/service/tickets/%d", ticketID))
|
Url := cw.BuildUrl(fmt.Sprintf("/service/tickets/%d", ticketID))
|
||||||
@ -200,3 +209,14 @@ func (cw *ConnectwiseSite) GetTicketTimeEntriesByID(ticketID int) *[]TimeEntryRe
|
|||||||
|
|
||||||
return &timeEntryReference
|
return &timeEntryReference
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (cw *ConnectwiseSite) GetTicketConfigurationsByID(ticketID int) *[]ConfigurationReference {
|
||||||
|
|
||||||
|
Url := cw.BuildUrl(fmt.Sprintf("/service/tickets/%d/configurations", ticketID))
|
||||||
|
|
||||||
|
body := cw.GetRequest(Url)
|
||||||
|
configurationReference := []ConfigurationReference{}
|
||||||
|
check(json.Unmarshal(body, &configurationReference))
|
||||||
|
|
||||||
|
return &configurationReference
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user