zendesk_api 1.19.1 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acd8e10ff0ecbdb2e6a9de9b9c0a23b09dd4e99c
4
- data.tar.gz: 0f7563b74a805a0e4cbcd8cb77ce2372907fca29
3
+ metadata.gz: 7ca9aa0ddce262ba5fadb72ce684429eb50ab36e
4
+ data.tar.gz: 2baae275b6f852eacebcdd0f43ed5987b553d5ce
5
5
  SHA512:
6
- metadata.gz: bb3b7fad067d544972ee82db27afa4a8b1d6f0220de3b72169a8019fb123b7c766a1c369fd25f289a3a63922647134cc302ce0a747254bb673cb0291351b9151
7
- data.tar.gz: dfff0d1642dbc036c1b8d9b9f247d1114c404d9f19aa8097bff06b9af70d3a4c7e78e64f0be63dbd13f04128781e0aedf24c1a0384d49efd60dc894426b63b30
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
- has Topic
176
- has User
177
- end
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
- class TopicVote < SingularResource
208
- has Topic
209
- has User
210
-
211
- private
186
+ has Topic
187
+ has User
212
188
 
213
- def attributes_for_save
214
- attributes.changes
215
- end
189
+ def path(options = {})
190
+ super(options.merge(:with_parent => true))
216
191
  end
192
+ end
217
193
 
218
- has_many :comments, :class => TopicComment
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
 
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "1.19.1"
2
+ VERSION = "1.20.0"
3
3
  end
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.19.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-04 00:00:00.000000000 Z
12
+ date: 2019-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday