Skip to content

Commit

Permalink
Merge pull request #204 from JacobBarba/addRequester
Browse files Browse the repository at this point in the history
Add requester struct and field for Ticket
  • Loading branch information
nukosuke authored Apr 27, 2021
2 parents 00ed785 + e91ca52 commit 0dfede2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions zendesk/ticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,21 @@ type Ticket struct {

// Comment is POST only and required
Comment TicketComment `json:"comment,omitempty"`

// Requester is POST only and can be used to create a ticket for a nonexistent requester
Requester Requester `json:"requester,omitempty"`

// TODO: TicketAudit (POST only) #126
}

// Requester is the struct that can be passed to create a new requester on ticket creation
// https://develop.zendesk.com/hc/en-us/articles/360059146153#creating-a-ticket-with-a-new-requester
type Requester struct {
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
LocaleID string `json:"locale_id,omitempty"`
}

// Via is information about source of Ticket or TicketComment
type Via struct {
Channel string `json:"channel"`
Expand Down

0 comments on commit 0dfede2

Please sign in to comment.