forked from intercom/intercom-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reply.go
37 lines (32 loc) · 895 Bytes
/
reply.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package intercom
// A Reply to an Intercom conversation
type Reply struct {
Type string `json:"type"`
ReplyType string `json:"message_type"`
Body string `json:"body,omitempty"`
AssigneeID string `json:"assignee_id,omitempty"`
AdminID string `json:"admin_id,omitempty"`
IntercomID string `json:"intercom_user_id,omitempty"`
Email string `json:"email,omitempty"`
UserID string `json:"user_id,omitempty"`
AttachmentURLs []string `json:"attachment_urls,omitempty"`
}
// ReplyType determines the type of Reply
type ReplyType int
const (
CONVERSATION_COMMENT ReplyType = iota
CONVERSATION_NOTE
CONVERSATION_ASSIGN
CONVERSATION_OPEN
CONVERSATION_CLOSE
)
var replyTypes = [...]string{
"comment",
"note",
"assignment",
"open",
"close",
}
func (reply ReplyType) String() string {
return replyTypes[reply]
}