Skip to content

Commit

Permalink
Merge e43b344 into c6f66ad
Browse files Browse the repository at this point in the history
  • Loading branch information
nukosuke committed Mar 11, 2019
2 parents c6f66ad + e43b344 commit fa6dd30
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 31 deletions.
22 changes: 22 additions & 0 deletions zendesk/attachment.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package zendesk

// Attachment is struct for attachment payload
// https://developer.zendesk.com/rest_api/docs/support/attachments.html
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"`
Thumbnails []Photo `json:"thumbnails"`
Inline bool `json:"inline"`
}

// Photo is thumbnail which is included in attachment
type Photo struct {
ID int64 `json:"id"`
FileName string `json:"file_name"`
ContentURL string `json:"content_url"`
ContentType string `json:"content_type"`
Size int64 `json:"size"`
}
25 changes: 25 additions & 0 deletions zendesk/brand.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package zendesk

import (
"time"
)

// Brand is struct for brand payload
// https://developer.zendesk.com/rest_api/docs/support/brands
type Brand struct {
ID int64 `json:"id,omitempty"`
URL string `json:"url,omitempty"`
Name string `json:"name"`
BrandURL string `json:"brand_url,omitempty"`
HasHelpCenter bool `json:"has_help_center,omitempty"`
HelpCenterState string `json:"help_center_state,omitempty"`
Active bool `json:"active,omitempty"`
Default bool `json:"default,omitempty"`
Logo Attachment `json:"logo,omitempty"`
TicketFieldIDs []int64 `json:"ticket_field_ids,omitempty"`
Subdomain string `json:"subdomain"`
HostMapping string `json:"host_mapping,omitempty"`
SignatureTemplate string `json:"signature_template"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
62 changes: 31 additions & 31 deletions zendesk/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@ import (
// User is zendesk user JSON payload format
// https://developer.zendesk.com/rest_api/docs/support/users
type User struct {
ID int64 `json:"id,omitempty"`
URL string `json:"url,omitempty"`
Email string `json:"email,omitempty"`
Name string `json:"name"`
Active bool `json:"active,omitempty"`
Alias string `json:"alias,omitempty"`
ChatOnly bool `json:"chat_only,omitempty"`
CustomRoleID int64 `json:"custom_role_id,omitempty"`
RoleType int64 `json:"role_type,omitempty"`
Details string `json:"details,omitempty"`
ExternalID string `json:"external_id,omitempty"`
Locale string `json:"locale,omitempty"`
LocaleID int64 `json:"locale_id,omitempty"`
Moderator bool `json:"moderator,omitempty"`
Notes string `json:"notes,omitempty"`
OnlyPrivateComments bool `json:"only_private_comments,omitempty"`
OrganizationID int64 `json:"organization_id,omitempty"`
DefaultGroupID int64 `json:"default_group_id,omitempty"`
Phone string `json:"phone,omitempty"`
SharedPhoneNumber bool `json:"shared_phone_number,omitempty"`
//TODO: Photo Attachment
RestrictedAgent bool `json:"restricted_agent,omitempty"`
Role string `json:"role,omitempty"`
Shared bool `json:"shared,omitempty"`
SharedAgent bool `json:"shared_agent,omitempty"`
Signature string `json:"signature,omitempty"`
Suspended bool `json:"suspended,omitempty"`
Tags []string `json:"tags,omitempty"`
TicketRestriction string `json:"ticket_restriction,omitempty"`
Timezone string `json:"time_zone,omitempty"`
TwoFactorAuthEnabled bool `json:"two_factor_auth_enabled,omitempty"`
ID int64 `json:"id,omitempty"`
URL string `json:"url,omitempty"`
Email string `json:"email,omitempty"`
Name string `json:"name"`
Active bool `json:"active,omitempty"`
Alias string `json:"alias,omitempty"`
ChatOnly bool `json:"chat_only,omitempty"`
CustomRoleID int64 `json:"custom_role_id,omitempty"`
RoleType int64 `json:"role_type,omitempty"`
Details string `json:"details,omitempty"`
ExternalID string `json:"external_id,omitempty"`
Locale string `json:"locale,omitempty"`
LocaleID int64 `json:"locale_id,omitempty"`
Moderator bool `json:"moderator,omitempty"`
Notes string `json:"notes,omitempty"`
OnlyPrivateComments bool `json:"only_private_comments,omitempty"`
OrganizationID int64 `json:"organization_id,omitempty"`
DefaultGroupID int64 `json:"default_group_id,omitempty"`
Phone string `json:"phone,omitempty"`
SharedPhoneNumber bool `json:"shared_phone_number,omitempty"`
Photo Attachment `json:"photo,omitempty"`
RestrictedAgent bool `json:"restricted_agent,omitempty"`
Role string `json:"role,omitempty"`
Shared bool `json:"shared,omitempty"`
SharedAgent bool `json:"shared_agent,omitempty"`
Signature string `json:"signature,omitempty"`
Suspended bool `json:"suspended,omitempty"`
Tags []string `json:"tags,omitempty"`
TicketRestriction string `json:"ticket_restriction,omitempty"`
Timezone string `json:"time_zone,omitempty"`
TwoFactorAuthEnabled bool `json:"two_factor_auth_enabled,omitempty"`
//TODO: UserFields UserFields
Verified bool `json:"verified,omitempty"`
ReportCSV bool `json:"report_csv,omitempty"`
Expand Down

0 comments on commit fa6dd30

Please sign in to comment.