zendesk_api 1.19.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zendesk_api/resources.rb +15 -68
- data/lib/zendesk_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ca9aa0ddce262ba5fadb72ce684429eb50ab36e
|
|
4
|
+
data.tar.gz: 2baae275b6f852eacebcdd0f43ed5987b553d5ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24e4b719dc32561a6ab91f6ae06d6023f3e798d6ca473497372ecab487523cccf4127a69e3173a40e492fb9f4cc7f1c6c998f4fe29333af4ae0b43c79c53b9fd
|
|
7
|
+
data.tar.gz: a4735c86c92b08cebecf3fd7a3f0fa2d7dd16f952a6ef86274295ad434b161cb1b91367b7a50b151c172431447b2b56c6cb405850186ba6c03220a5868358618
|
|
@@ -169,77 +169,33 @@ module ZendeskAPI
|
|
|
169
169
|
end
|
|
170
170
|
|
|
171
171
|
class Category < Resource
|
|
172
|
+
class << self
|
|
173
|
+
def resource_path
|
|
174
|
+
"help_center/categories"
|
|
175
|
+
end
|
|
176
|
+
end
|
|
172
177
|
end
|
|
173
178
|
|
|
174
179
|
class TopicSubscription < Resource
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
class TopicComment < Data
|
|
180
|
-
has Topic
|
|
181
|
-
has User
|
|
182
|
-
has_many Attachment
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
class Topic < Resource
|
|
186
|
-
class TopicComment < TopicComment
|
|
187
|
-
include Read
|
|
188
|
-
include Create
|
|
189
|
-
include Update
|
|
190
|
-
include Destroy
|
|
191
|
-
|
|
192
|
-
has_many :uploads, :class => Attachment, :inline => true
|
|
193
|
-
|
|
194
|
-
def self.import!(client, attributes)
|
|
195
|
-
new(client, attributes).tap do |comment|
|
|
196
|
-
comment.save!(:path => 'import/' + comment.path)
|
|
197
|
-
end
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
def self.import(client, attributes)
|
|
201
|
-
comment = new(client, attributes)
|
|
202
|
-
return unless comment.save(:path => 'import/' + comment.path)
|
|
203
|
-
comment
|
|
180
|
+
class << self
|
|
181
|
+
def model_key
|
|
182
|
+
"subscriptions"
|
|
204
183
|
end
|
|
205
184
|
end
|
|
206
185
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
has User
|
|
210
|
-
|
|
211
|
-
private
|
|
186
|
+
has Topic
|
|
187
|
+
has User
|
|
212
188
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
end
|
|
189
|
+
def path(options = {})
|
|
190
|
+
super(options.merge(:with_parent => true))
|
|
216
191
|
end
|
|
192
|
+
end
|
|
217
193
|
|
|
218
|
-
|
|
219
|
-
has_many :subscriptions, :class => TopicSubscription
|
|
220
|
-
has :vote, :class => TopicVote
|
|
194
|
+
class Topic < Resource
|
|
195
|
+
has_many :subscriptions, :class => TopicSubscription, :inline => true
|
|
221
196
|
has_many Tag, :extend => Tag::Update, :inline => :create
|
|
222
197
|
has_many Attachment
|
|
223
198
|
has_many :uploads, :class => Attachment, :inline => true
|
|
224
|
-
|
|
225
|
-
def votes(opts = {})
|
|
226
|
-
return @votes if @votes && !opts[:reload]
|
|
227
|
-
|
|
228
|
-
association = ZendeskAPI::Association.new(:class => TopicVote, :parent => self, :path => 'votes')
|
|
229
|
-
@votes = ZendeskAPI::Collection.new(@client, TopicVote, opts.merge(:association => association))
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
def self.import!(client, attributes)
|
|
233
|
-
new(client, attributes).tap do |topic|
|
|
234
|
-
topic.save!(:path => "import/topics")
|
|
235
|
-
end
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
def self.import(client, attributes)
|
|
239
|
-
topic = new(client, attributes)
|
|
240
|
-
return unless topic.save(:path => "import/topics")
|
|
241
|
-
topic
|
|
242
|
-
end
|
|
243
199
|
end
|
|
244
200
|
|
|
245
201
|
class Activity < Resource
|
|
@@ -642,10 +598,6 @@ module ZendeskAPI
|
|
|
642
598
|
extend CreateOrUpdateMany
|
|
643
599
|
extend DestroyMany
|
|
644
600
|
|
|
645
|
-
class TopicComment < TopicComment
|
|
646
|
-
include Read
|
|
647
|
-
end
|
|
648
|
-
|
|
649
601
|
class GroupMembership < Resource
|
|
650
602
|
put :make_default
|
|
651
603
|
end
|
|
@@ -737,14 +689,9 @@ module ZendeskAPI
|
|
|
737
689
|
|
|
738
690
|
has_many Group
|
|
739
691
|
has_many GroupMembership
|
|
740
|
-
has_many Topic
|
|
741
692
|
has_many OrganizationMembership
|
|
742
693
|
has_many OrganizationSubscription
|
|
743
694
|
|
|
744
|
-
has_many TopicSubscription
|
|
745
|
-
has_many :topic_comments, :class => TopicComment
|
|
746
|
-
has_many :topic_votes, :class => Topic::TopicVote
|
|
747
|
-
|
|
748
695
|
has_many Setting
|
|
749
696
|
has_many Tag, :extend => Tag::Update, :inline => :create
|
|
750
697
|
|
data/lib/zendesk_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zendesk_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steven Davidovitz
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-09-
|
|
12
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: faraday
|