-
Notifications
You must be signed in to change notification settings - Fork 12
/
zendesk.rb
68 lines (61 loc) · 1.35 KB
/
zendesk.rb
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
require 'zendesk_api'
# Help Center support (https://github.com/zendesk/zendesk_api_client_rb/issues/175)
module ZendeskAPI
class Article < Resource; end
class Section < Resource; end
class Translation < Resource; end
class UserSegment < Resource; end
class UserSegment < Resource
namespace 'help_center'
end
class HcLocale < Resource
namespace 'help_center'
def self.singular_resource_name
'locale'
end
end
class Category < Resource
namespace 'help_center'
has_many Section
has_many Article
has_many Translation
end
class Section < Resource
namespace 'help_center'
has_many Article
has_many Translation
has Category
has UserSegment
end
class ParentSection < Section
namespace 'help_center'
def self.singular_resource_name
'parent_section'
end
end
class Section < Resource
has ParentSection
end
class Article < Resource
namespace 'help_center'
has_many Translation
has Section
has :author, class: User
end
class Topic < Resource; end
class Post < Resource; end
class Comment < Resource; end
class Topic < Resource
namespace 'community'
has_many Post
end
class Post < Resource
namespace 'community'
has_many Comment
has Topic
has :author, class: User
end
class Comment
namespace 'community'
end
end