Skip to content

Commit

Permalink
Merge pull request #250 from cowell21/patch-1
Browse files Browse the repository at this point in the history
Add option to filter by trigger categoryID for GetTriggers() endpoint
  • Loading branch information
nukosuke authored Jan 12, 2023
2 parents aa2f07b + 8ad1c22 commit b2b1fa5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zendesk/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type Trigger struct {
} `json:"conditions"`
Actions []TriggerAction `json:"actions"`
Description string `json:"description,omitempty"`
CategoryID string `json:"category_id,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Expand All @@ -47,9 +48,10 @@ type Trigger struct {
// ref: https://developer.zendesk.com/rest_api/docs/support/triggers#list-triggers
type TriggerListOptions struct {
PageOptions
Active bool `url:"active,omitempty"`
SortBy string `url:"sort_by,omitempty"`
SortOrder string `url:"sort_order,omitempty"`
Active bool `url:"active,omitempty"`
CategoryID string `url:"category_id,omitempty"`
SortBy string `url:"sort_by,omitempty"`
SortOrder string `url:"sort_order,omitempty"`
}

// TriggerAPI an interface containing all trigger related methods
Expand Down

0 comments on commit b2b1fa5

Please sign in to comment.