Skip to content

Commit b2b1fa5

Browse files
author
nukosuke
authored
Merge pull request #250 from cowell21/patch-1
Add option to filter by trigger categoryID for GetTriggers() endpoint
2 parents aa2f07b + 8ad1c22 commit b2b1fa5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

zendesk/trigger.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type Trigger struct {
3838
} `json:"conditions"`
3939
Actions []TriggerAction `json:"actions"`
4040
Description string `json:"description,omitempty"`
41+
CategoryID string `json:"category_id,omitempty"`
4142
CreatedAt *time.Time `json:"created_at,omitempty"`
4243
UpdatedAt *time.Time `json:"updated_at,omitempty"`
4344
}
@@ -47,9 +48,10 @@ type Trigger struct {
4748
// ref: https://developer.zendesk.com/rest_api/docs/support/triggers#list-triggers
4849
type TriggerListOptions struct {
4950
PageOptions
50-
Active bool `url:"active,omitempty"`
51-
SortBy string `url:"sort_by,omitempty"`
52-
SortOrder string `url:"sort_order,omitempty"`
51+
Active bool `url:"active,omitempty"`
52+
CategoryID string `url:"category_id,omitempty"`
53+
SortBy string `url:"sort_by,omitempty"`
54+
SortOrder string `url:"sort_order,omitempty"`
5355
}
5456

5557
// TriggerAPI an interface containing all trigger related methods

0 commit comments

Comments
 (0)