zendesk

package
v0.0.0-...-527a0e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool is a helper function that returns a pointer to the bool value b.

func Int

func Int(i int64) *int64

Int is a helper function that returns a pointer to the int value i.

func String

func String(s string) *string

String is a helper function that returns a pointer to the string value s.

Types

type APIError

type APIError struct {
	Response *http.Response

	Type        string                       `json:"error,omitmepty"`
	Description string                       `json:"description,omitempty"`
	Details     map[string][]*APIErrorDetail `json:"details,omitempty"`
}

APIError represents an error response returnted by the API.

func (*APIError) Error

func (e *APIError) Error() string

type APIErrorDetail

type APIErrorDetail struct {
	Type        string `json:"error,omitempty"`
	Description string `json:"description,omitempty"`
}

APIErrorDetail represents a detail about an APIError.

func (*APIErrorDetail) Error

func (e *APIErrorDetail) Error() string

type APIPayload

type APIPayload struct {
	Attachment              *Attachment              `json:"attachment"`
	Attachments             []Attachment             `json:"attachments"`
	Comment                 *TicketComment           `json:"comment,omitempty"`
	Comments                []TicketComment          `json:"comments,omitempty"`
	Identity                *UserIdentity            `json:"identity,omitempty"`
	Identities              []UserIdentity           `json:"identities,omitempty"`
	Locale                  *Locale                  `json:"locale,omitempty"`
	Locales                 []Locale                 `json:"locales,omitempty"`
	Organization            *Organization            `json:"organization,omitempty"`
	OrganizationMembership  *OrganizationMembership  `json:"organization_membership,omitempty"`
	OrganizationMemberships []OrganizationMembership `json:"organization_memberships,omitempty"`
	Organizations           []Organization           `json:"organizations,omitempty"`
	Tags                    []string                 `json:"tags,omitempty"`
	Ticket                  *Ticket                  `json:"ticket,omitempty"`
	TicketField             *TicketField             `json:"ticket_field,omitempty"`
	TicketFields            []TicketField            `json:"ticket_fields,omitempty"`
	Tickets                 []Ticket                 `json:"tickets,omitempty"`
	Upload                  *Upload                  `json:"upload,omitempty"`
	User                    *User                    `json:"user,omitempty"`
	Users                   []User                   `json:"users,omitempty"`
	TicketForm              *TicketForm              `json:"ticket_form,omitempty"`
	TicketForms             []TicketForm             `json:"ticket_forms,omitempty"`
	TicketMetric            *TicketMetric            `json:"ticket_metric,omitempty"`
	TicketMetrics           []TicketMetric           `json:"ticket_metrics,omitempty"`
	NextPage                string                   `json:"next_page,omitempty"`
	SatisfactionRating      Score                    `json:"satisfaction_rating,omitempty"`
	SatisfactionRatings     []Score                  `json:"satisfaction_ratings,omitempty"`
	CallLegs                []CallLeg                `json:"legs,omitempty"`
}

APIPayload represents the payload of an API call.

type Attachment

type Attachment struct {
	ID          int64       `json:"id"`
	FileName    string      `json:"file_name"`
	ContentURL  string      `json:"content_url"`
	ContentType string      `json:"content_type"`
	Size        int64       `json:"size"`
	Inline      bool        `json:"inline,omitempty"`
	Thumbnails  []Thumbnail `json:"thumbnails"`
}

type Call

type Call struct {
	AgentID                      int         `json:"agent_id"`
	CallCharge                   string      `json:"call_charge"`
	CallRecordingConsent         string      `json:"call_recording_consent"`
	CallRecordingConsentAction   string      `json:"call_recording_consent_action"`
	CallRecordingConsentKeypress string      `json:"call_recording_consent_keypress"`
	Callback                     bool        `json:"callback"`
	CallbackSource               interface{} `json:"callback_source"`
	CompletionStatus             string      `json:"completion_status"`
	ConsultationTime             int         `json:"consultation_time"`
	CreatedAt                    time.Time   `json:"created_at"`
	CustomerID                   int         `json:"customer_id"`
	CustomerRequestedVoicemail   bool        `json:"customer_requested_voicemail"`
	DefaultGroup                 bool        `json:"default_group"`
	Direction                    string      `json:"direction"`
	Duration                     int         `json:"duration"`
	ExceededQueueWaitTime        bool        `json:"exceeded_queue_wait_time"`
	HoldTime                     int         `json:"hold_time"`
	ID                           int         `json:"id"`
	IvrAction                    interface{} `json:"ivr_action"`
	IvrDestinationGroupName      interface{} `json:"ivr_destination_group_name"`
	IvrHops                      interface{} `json:"ivr_hops"`
	IvrRoutedTo                  interface{} `json:"ivr_routed_to"`
	IvrTimeSpent                 interface{} `json:"ivr_time_spent"`
	Line                         string      `json:"line"`
	LineID                       int         `json:"line_id"`
	MinutesBilled                int         `json:"minutes_billed"`
	NotRecordingTime             int         `json:"not_recording_time"`
	OutsideBusinessHours         bool        `json:"outside_business_hours"`
	Overflowed                   bool        `json:"overflowed"`
	OverflowedTo                 interface{} `json:"overflowed_to"`
	PhoneNumber                  string      `json:"phone_number"`
	PhoneNumberID                int         `json:"phone_number_id"`
	QualityIssues                []string    `json:"quality_issues"`
	RecordingControlInteractions int         `json:"recording_control_interactions"`
	RecordingTime                int         `json:"recording_time"`
	TalkTime                     int         `json:"talk_time"`
	TicketID                     int         `json:"ticket_id"`
	TimeToAnswer                 int         `json:"time_to_answer"`
	UpdatedAt                    time.Time   `json:"updated_at"`
	Voicemail                    bool        `json:"voicemail"`
	WaitTime                     int         `json:"wait_time"`
	WrapUpTime                   int         `json:"wrap_up_time"`
}

type CallLeg

type CallLeg struct {
	AgentID          int         `json:"agent_id"`
	AvailableVia     interface{} `json:"available_via"`
	CallCharge       string      `json:"call_charge"`
	CallID           int         `json:"call_id"`
	CompletionStatus string      `json:"completion_status"`
	ConferenceFrom   interface{} `json:"conference_from"`
	ConferenceTime   interface{} `json:"conference_time"`
	ConferenceTo     interface{} `json:"conference_to"`
	ConsultationFrom interface{} `json:"consultation_from"`
	ConsultationTime interface{} `json:"consultation_time"`
	ConsultationTo   interface{} `json:"consultation_to"`
	CreatedAt        time.Time   `json:"created_at"`
	Duration         int         `json:"duration"`
	ForwardedTo      interface{} `json:"forwarded_to"`
	HoldTime         int         `json:"hold_time"`
	ID               int         `json:"id"`
	MinutesBilled    int         `json:"minutes_billed"`
	QualityIssues    []string    `json:"quality_issues"`
	TalkTime         int         `json:"talk_time"`
	TransferredFrom  interface{} `json:"transferred_from"`
	TransferredTo    interface{} `json:"transferred_to"`
	Type             string      `json:"type"`
	UpdatedAt        time.Time   `json:"updated_at"`
	UserID           int         `json:"user_id"`
	WrapUpTime       interface{} `json:"wrap_up_time"`
}

type Client

type Client interface {
	WithHeader(name, value string) Client

	AddUserTags(int64, []string) ([]string, error)
	AddTicketTags(int64, []string) ([]string, error)
	BatchUpdateManyTickets([]Ticket) error
	BulkUpdateManyTickets([]int64, *Ticket) error
	CreateIdentity(int64, *UserIdentity) (*UserIdentity, error)
	CreateOrganization(*Organization) (*Organization, error)
	CreateOrganizationMembership(*OrganizationMembership) (*OrganizationMembership, error)
	CreateOrUpdateUser(*User) (*User, error)
	CreateTicket(*Ticket) (*Ticket, error)
	CreateUser(*User) (*User, error)
	DeleteIdentity(int64, int64) error
	DeleteOrganization(int64) error
	DeleteTicket(int64) error
	DeleteUser(int64) (*User, error)
	DeleteOrganizationMembershipByID(int64) error
	ListIdentities(int64) ([]UserIdentity, error)
	ListLocales() ([]Locale, error)
	ListOrganizationMembershipsByUserID(id int64) ([]OrganizationMembership, error)
	ListOrganizations(*ListOptions) ([]Organization, error)
	ListOrganizationUsers(int64, *ListUsersOptions) ([]User, error)
	ListRequestedTickets(int64) ([]Ticket, error)
	ListTicketComments(int64) ([]TicketComment, error)
	ListTicketFields() ([]TicketField, error)
	ListTicketForms() ([]TicketForm, error)
	ListTicketIncidents(int64) ([]Ticket, error)
	ListUsers(*ListUsersOptions) ([]User, error)
	MakeIdentityPrimary(int64, int64) ([]UserIdentity, error)
	SearchUsers(string) ([]User, error)
	ShowIdentity(int64, int64) (*UserIdentity, error)
	ShowLocale(int64) (*Locale, error)
	ShowLocaleByCode(string) (*Locale, error)
	ShowManyUsers([]int64) ([]User, error)
	ShowOrganization(int64) (*Organization, error)
	ShowTicket(int64) (*Ticket, error)
	ShowUser(int64) (*User, error)
	UpdateIdentity(int64, int64, *UserIdentity) (*UserIdentity, error)
	UpdateOrganization(int64, *Organization) (*Organization, error)
	UpdateTicket(int64, *Ticket) (*Ticket, error)
	UpdateUser(int64, *User) (*User, error)
	UploadFile(string, string, io.Reader) (*Upload, error)
	GetAllTickets() ([]Ticket, error)
	GetTicketsIncrementally(int64) ([]Ticket, error)
	GetAllUsers() ([]User, error)
	GetAllTicketMetrics() ([]TicketMetric, error)
	GetTicketMetricsIncrementally([]int64) ([]TicketMetric, error)
	ShowTicketMetric(int64) (*TicketMetric, error)
	GetAllTicketComments([]int64) (map[int64][]TicketComment, error)
	GetUsersIncrementally(int64) ([]User, error)
	GetSatisfactionScores() ([]Score, error)
	GetSatisfactionScoresIncrementally(int64) ([]Score, error)
	GetCallLegIncrementally(int64) ([]CallLeg, error)
}

Client describes a client for the Zendesk Core API.

func NewClient

func NewClient(domain, username, password string, middleware ...MiddlewareFunction) (Client, error)

NewClient creates a new Client. You can use either a user email/password combination or an API token. For the latter, append /token to the email and use the API token as a password

func NewURLClient

func NewURLClient(endpoint, username, password string, middleware ...MiddlewareFunction) (Client, error)

NewURLClient is like NewClient but accepts an explicit end point instead of a Zendesk domain.

type CustomField

type CustomField struct {
	ID    int64       `json:"id"`
	Value interface{} `json:"value"`
}

type CustomFieldOption

type CustomFieldOption struct {
	ID      int64  `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	RawName string `json:"raw_name,omitempty"`
	Value   string `json:"value,omitempty"`
	Default bool   `json:"default,omitempty"`
}

type Flow

type Flow struct {
	To   *ToObject   `json:"to"`
	From *FromObject `json:"from"`
	Rel  *string     `json:"rel"`
}

type FromObject

type FromObject struct {
	FromName               *string  `json:"name,omitempty"`
	FromAddress            *string  `json:"address,omitempty"`
	FromOriginalRecipients []string `json:"original_recipients,omitempty"`
	FromPhone              *string  `json:"phone,omitempty"`
}

type ListOptions

type ListOptions struct {
	// Sets the page of results to retrieve.
	Page int `url:"page,omitempty"`
	// Sets the number of results to include per page.
	PerPage int `url:"per_page,omitempty"`
}

ListOptions specifies the optional parameters for the list methods that support pagination.

Zendesk Core API doscs: https://developer.zendesk.com/rest_api/docs/core/introduction#pagination

type ListUsersOptions

type ListUsersOptions struct {
	ListOptions

	Role          []string `url:"role"`
	PermissionSet int64    `url:"permision_set"`
}

ListUsersOptions specifies the optional parameters for the list users methods.

type Locale

type Locale struct {
	ID        int64      `json:"id,omitempty"`
	URL       string     `json:"url,omitempty"`
	Locale    string     `json:"locale,omitempty"`
	Name      string     `json:"name,omitempty"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

Locale represents an Zendesk translation locale.

Zendesk Core API docs: https://developer.zendesk.com/rest_api/docs/core/locales

type MiddlewareFunction

type MiddlewareFunction func(RequestFunction) RequestFunction

type Minutes

type Minutes struct {
	Calendar int64 `json:"calendar"`
	Business int64 `json:"business"`
}

type Organization

type Organization struct {
	ID                 int64                  `json:"id,omitempty"`
	URL                string                 `json:"url,omitempty"`
	ExternalID         string                 `json:"external_id,omitempty"`
	Name               string                 `json:"name,omitempty"`
	CreatedAt          *time.Time             `json:"created_at,omitempty"`
	UpdatedAt          *time.Time             `json:"updated_at,omitempty"`
	DomainNames        []string               `json:"domain_names,omitempty"`
	Details            string                 `json:"details,omitempty"`
	Notes              string                 `json:"notes,omitempty"`
	GroupID            int64                  `json:"group_id,omitempty"`
	SharedTickets      bool                   `json:"shared_tickets,omitempty"`
	SharedComments     bool                   `json:"shared_comments,omitempty"`
	OrganizationFields map[string]interface{} `json:"organization_fields,omitempty"`
}

Organization represents a Zendesk organization.

Zendesk Core API docs: https://developer.zendesk.com/rest_api/docs/core/organizations

type OrganizationMembership

type OrganizationMembership struct {
	ID             int64      `json:"id,omitempty"`
	URL            string     `json:"url,omitempty"`
	UserID         int64      `json:"user_id,omitempty"`
	OrganizationID int64      `json:"organization_id,omitempty"`
	Default        bool       `json:"default,omitempty"`
	CreatedAt      *time.Time `json:"created_at,omitempty"`
	UpdatedAt      *time.Time `json:"updated_at,omitempty"`
}

OrganizationMembership represents a Zendesk association between an org and a user.

Zendesk Core API docs: https://developer.zendesk.com/rest_api/docs/core/organization_memberships

type RequestFunction

type RequestFunction func(*http.Request) (*http.Response, error)

type SAT

type SAT struct {
	ID      int64  `json:"id"`
	Score   string `json:"score"`
	Comment string `json:"comment"`
}

type Score

type Score struct {
	ID          int64      `json:"id,omitempty"`
	AssigneeID  int64      `json:"assignee_id,omitempty`
	GroupID     int64      `json:"group_id,omitempty"`
	RequesterID int64      `json:"requester_id,omitempty"`
	TicketID    int64      `json:"ticket_id,omitempty"`
	Score       string     `json:"score,omitempty"`
	CreatedAt   *time.Time `json:"created_at,omitempty"`
	UpdatedAt   *time.Time `json:"updated_at,omitempty"`
}

type SystemFieldOption

type SystemFieldOption struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type Thumbnail

type Thumbnail struct {
	ID          int    `json:"id"`
	FileName    string `json:"file_name"`
	ContentURL  string `json:"content_url"`
	ContentType string `json:"content_type"`
	Size        int    `json:"size"`
}

type Ticket

type Ticket struct {
	ID                 int64          `json:"id,omitempty"`
	URL                string         `json:"url,omitempty"`
	ExternalID         string         `json:"external_id,omitempty"`
	Type               string         `json:"type,omitempty"`
	Subject            string         `json:"subject,omitempty"`
	RawSubject         string         `json:"raw_subject,omitempty"`
	Description        string         `json:"description,omitempty"`
	Priority           string         `json:"priority,omitempty"`
	Comment            *TicketComment `json:"comment,omitempty"`
	Status             string         `json:"status,omitempty"`
	Recipient          string         `json:"recipient,omitempty"`
	RequesterID        int64          `json:"requester_id,omitempty"`
	Requester          *User          `json:"requester,omitempty"`
	SubmitterID        int64          `json:"submitter_id,omitempty"`
	AssigneeID         int64          `json:"assignee_id,omitempty"`
	OrganizationID     int64          `json:"organization_id,omitempty"`
	GroupID            int64          `json:"group_id,omitempty"`
	CollaboratorIDs    []int64        `json:"collaborator_ids,omitempty"`
	EmailCCIDs         []int64        `json:"email_cc_ids,omitempty"`
	FollowerIDs        []int64        `json:"follower_ids,omitempty"`
	ForumTopicID       int64          `json:"forum_topic_id,omitempty"`
	ProblemID          int64          `json:"problem_id,omitempty"`
	HasIncidents       bool           `json:"has_incidents,omitempty"`
	DueAt              *time.Time     `json:"due_at,omitempty"`
	Tags               []string       `json:"tags,omitempty"`
	Via                *Via           `json:"via,omitempty"`
	CreatedAt          *time.Time     `json:"created_at,omitempty"`
	UpdatedAt          *time.Time     `json:"updated_at,omitempty"`
	CustomFields       []CustomField  `json:"custom_fields,omitempty"`
	SatisfactionRating *SAT           `json:"satisfaction_rating,omitempty"`
	BrandID            int64          `json:"brand_id,omitempty"`
	TicketFormID       int64          `json:"ticket_form_id,omitempty"`
	FollowupSourceID   int64          `json:"via_followup_source_id,omitempty"`
	IsPublic           bool           `json:"is_public"`
	AdditionalTags     []string       `json:"additional_tags,omitempty"`
	RemoveTags         []string       `json:"remove_tags,omitempty"`
}

Ticket represents a Zendesk Ticket.

Zendesk Core API docs: https://developer.zendesk.com/rest_api/docs/core/tickets

type TicketComment

type TicketComment struct {
	ID          int64        `json:"id,omitempty"`
	Type        string       `json:"type,omitempty"`
	Body        string       `json:"body,omitempty"`
	HTMLBody    string       `json:"html_body,omitempty"`
	PlainBody   string       `json:"plain_body,omitempty"`
	Public      bool         `json:"public"`
	AuthorID    int64        `json:"author_id,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
	Via         *Via         `json:"via,omitempty"`
	MetaData    interface{}  `json:"metadata,omitempty"`
	CreatedAt   *time.Time   `json:"created_at,omitempty"`
	Uploads     []string     `json:"uploads,omitempty"`
}

type TicketField

type TicketField struct {
	ID                  int64               `json:"id,omitempty"`
	Type                TicketFieldType     `json:"type,omitempty"`
	Title               string              `json:"title,omitempty"`
	Description         string              `json:"description,omitempty"`
	Position            int64               `json:"position,omitempty"`
	Active              bool                `json:"active,omitempty"`
	Required            bool                `json:"required,omitempty"`
	RegexpForValidation string              `json:"regexp_for_validation,omitempty"`
	VisibleInPortal     bool                `json:"visible_in_portal,omitempty"`
	EditableInPortal    bool                `json:"editable_in_portal,omitempty"`
	RequiredInPortal    bool                `json:"required_in_portal,omitempty"`
	CreatedAt           *time.Time          `json:"created_at,omitempty"`
	UpdatedAt           *time.Time          `json:"updated_at,omitempty"`
	SystemFieldOptions  []SystemFieldOption `json:"system_field_options,omitempty"`
	CustomFieldOptions  []CustomFieldOption `json:"custom_field_options,omitempty"`
}

type TicketFieldType

type TicketFieldType string
const (
	// System field types
	SubjectType     TicketFieldType = "subject"
	DescriptionType TicketFieldType = "description"
	StatusType      TicketFieldType = "status"
	TicketType      TicketFieldType = "tickettype"
	PriorityType    TicketFieldType = "priority"
	GroupType       TicketFieldType = "group"
	AssigneeType    TicketFieldType = "assignee"

	// Customed field types
	TextType     TicketFieldType = "text"
	TextAreaType TicketFieldType = "textarea"
	CheckBoxType TicketFieldType = "checkbox"
	DateType     TicketFieldType = "date"
	IntegerType  TicketFieldType = "integer"
	DecimalType  TicketFieldType = "decimal"
	RegExpType   TicketFieldType = "regexp"
	TaggerType   TicketFieldType = "tagger"
)

type TicketForm

type TicketForm struct {
	URL                string     `json:"url,omitempty"`
	ID                 int64      `json:"id,omitempty"`
	Name               string     `json:"name,omitempty"`
	RawName            string     `json:"raw_name,omitempty"`
	DisplayName        string     `json:"display_name,omitempty"`
	RawDisplayName     string     `json:"raw_display_name,omitempty"`
	EndUserVisible     bool       `json:"end_user_visible,omitempty"`
	Position           int64      `json:"position,omitempty"`
	TicketFieldIDs     []int64    `json:"ticket_field_ids,omitempty"`
	Active             bool       `json:"active,omitempty"`
	Default            bool       `json:"default,omitempty"`
	CreatedAt          *time.Time `json:"created_at,omitempty"`
	UpdatedAt          *time.Time `json:"updated_at,omitempty"`
	InAllBrands        bool       `json:"in_all_brands,omitempty"`
	RestrictedBrandIDs []int64    `json:"restricted_brand_ids,omitempty"`
}

type TicketMetric

type TicketMetric struct {
	ID                   int64      `json:"id,omitempty"`
	TicketID             int64      `json:"ticket_id,omitempty"`
	URL                  string     `json:"url,omitempty"`
	GroupStations        int64      `json:"group_stations,omitempty"`
	AssigneeStations     int64      `json:"assignee_stations,omitempty"`
	Reopens              int64      `json:"reopens,omitempty"`
	Replies              int64      `json:"replies,omitempty"`
	AssigneeUpdatedAt    *time.Time `json:"assignee_updated_at,omitempty"`
	RequesterUpdatedAt   *time.Time `json:"requester_updated_at,omitempty"`
	StatusUpdatedAt      *time.Time `json:"status_updated_at,omitempty"`
	InitiallyAssigneeAt  *time.Time `json:"initially_assigned_at,omitempty"`
	AssignedAt           *time.Time `json:"assigned_at,omitempty"`
	SolvedAt             *time.Time `json:"solved_at,omitempty"`
	LatestCommentAddedAt *time.Time `json:"latest_comment_added_at,omitempty"`
	FirstResolutionTime  *Minutes   `json:"first_resolution_time_in_minutes,omitempty"`
	ReplyTime            *Minutes   `json:"reply_time_in_minutes,omitempty"`
	FullResolutionTime   *Minutes   `json:"full_resolution_time_in_minutes,omitempty"`
	AgentWaitTime        *Minutes   `json:"agent_wait_time_in_minutes,omitempty"`
	RequesterWaitTime    *Minutes   `json:"requester_wait_time_in_minutes,omitempty"`
	CreatedAt            *time.Time `json:"created_at,omitempty"`
	UpdatedAt            *time.Time `json:"updated_at,omitempty"`
}

type ToObject

type ToObject struct {
	ToName     *string       `json:"name,omitempty"`
	ToAddress  *string       `json:"address,omitempty"`
	ToEmailCcs []interface{} `json:"email_ccs,omitempty"`
	ToPhone    *string       `json:"phone,omitempty"`
}

type Upload

type Upload struct {
	Token       string       `json:"token"`
	Attachment  *Attachment  `json:"attachment"`
	Attachments []Attachment `json:"attachments"`
}

Upload represents a Zendesk file upload.

type User

type User struct {
	ID                  int64                  `json:"id,omitempty"`
	URL                 string                 `json:"url,omitempty"`
	Name                string                 `json:"name,omitempty"`
	ExternalID          string                 `json:"external_id,omitempty"`
	Alias               string                 `json:"alias,omitempty"`
	CreatedAt           *time.Time             `json:"created_at,omitempty"`
	UpdatedAt           *time.Time             `json:"updated_at,omitempty"`
	Active              bool                   `json:"active,omitempty"`
	Verified            bool                   `json:"verified,omitempty"`
	Shared              bool                   `json:"shared,omitempty"`
	SharedAgent         bool                   `json:"shared_agent,omitempty"`
	Locale              string                 `json:"locale,omitempty"`
	LocaleID            int64                  `json:"locale_id,omitempty"`
	TimeZone            string                 `json:"time_zone,omitempty"`
	LastLoginAt         *time.Time             `json:"last_login_at,omitempty"`
	Email               string                 `json:"email,omitempty"`
	Phone               string                 `json:"phone,omitempty"`
	Signature           string                 `json:"signature,omitempty"`
	Details             string                 `json:"details,omitempty"`
	Notes               string                 `json:"notes,omitempty"`
	OrganizationID      int64                  `json:"organization_id,omitempty"`
	Role                string                 `json:"role,omitempty"`
	CustomerRoleID      int64                  `json:"custom_role_id,omitempty"`
	Moderator           bool                   `json:"moderator,omitempty"`
	TicketRestriction   string                 `json:"ticket_restriction,omitempty"`
	OnlyPrivateComments bool                   `json:"only_private_comments,omitempty"`
	Tags                []string               `json:"tags,omitempty"`
	RestrictedAgent     bool                   `json:"restricted_agent,omitempty"`
	Suspended           bool                   `json:"suspended,omitempty"`
	UserFields          map[string]interface{} `json:"user_fields,omitempty"`
}

User represents a Zendesk user.

Zendesk Core API docs: https://developer.zendesk.com/rest_api/docs/core/users#content

type UserIdentity

type UserIdentity struct {
	ID                 int64      `json:"id,omitempty"`
	URL                string     `json:"url,omitempty"`
	UserID             int64      `json:"user_id,omitempty"`
	Type               string     `json:"type,omitempty"`
	Value              string     `json:"value,omitempty"`
	Verified           bool       `json:"verified,omitempty"`
	Primary            bool       `json:"primary,omitempty"`
	CreatedAt          *time.Time `json:"created_at,omitempty"`
	UpdatedAt          *time.Time `json:"updated_at,omitempty"`
	UndeliverableCount int64      `json:"undeliverable_count,omitempty"`
	DeliverableState   string     `json:"deliverable_state,omitempty"`
}

UserIdentity represents a Zendesk user identity.

Zendesk Core API docs: https://developer.zendesk.com/rest_api/docs/core/user_identities

type Via

type Via struct {
	Channel *string `json:"channel"`
	Source  *Flow   `json:"source"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL