Skip to content

Commit

Permalink
Add TicketCommentAPI interface to API interface definition
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhb committed Dec 9, 2020
1 parent a409e37 commit 980367a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions zendesk/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type API interface {
SLAPolicyAPI
TagAPI
TicketAuditAPI
TicketCommentAPI
}

var _ API = (*Client)(nil)
33 changes: 31 additions & 2 deletions zendesk/mock/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions zendesk/ticket_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import (
"time"
)

// TicketCommentAPI is an interface containing all ticket comment related API methods
type TicketCommentAPI interface {
CreateTicketComment(ctx context.Context, ticketID int64, ticketComment TicketComment) error
ListTicketComments(ctx context.Context, ticketID int64) ([]TicketComment, error)
}

// TicketComment is a struct for ticket comment payload
// Via and Metadata are currently unused
// https://developer.zendesk.com/rest_api/docs/support/ticket_comments
Expand Down

0 comments on commit 980367a

Please sign in to comment.