zendesk_api 1.14.4 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zendesk_api/actions.rb +8 -4
- 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: eb86ef3d8973e1a86275ced7816d925ef0fe38fb
|
4
|
+
data.tar.gz: 54f2a42245dc39949fce3915ff19d49d519e2e76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e33068ac176420bf5dc1a71b5332814170ca95aa2651c7ab6616ebb299b78c363070ad64e6d38f506f4ec56dd58bc68ecabe1a226aa2c8719a05f33cd17061e
|
7
|
+
data.tar.gz: 4f712377c4b1fb8c81d95e2fb413e2e63fac5ba2bb551b920c7449a1c6345d77df245e12d7b0426bdfa527ea1d6930380cc3a70bb860d3a3a7aaa8f9da836447
|
data/lib/zendesk_api/actions.rb
CHANGED
@@ -276,15 +276,19 @@ module ZendeskAPI
|
|
276
276
|
module UpdateMany
|
277
277
|
# Updates multiple resources using the update_many endpoint.
|
278
278
|
# @param [Client] client The {Client} object to be used
|
279
|
-
# @param [Array]
|
279
|
+
# @param [Array] ids_or_attributes An array of ids or arributes including ids to update
|
280
280
|
# @param [Hash] attributes The attributes to update resources with
|
281
281
|
# @return [JobStatus] the {JobStatus} instance for this destroy job
|
282
|
-
def update_many!(client,
|
282
|
+
def update_many!(client, ids_or_attributes, attributes = {})
|
283
283
|
association = attributes.delete(:association) || Association.new(:class => self)
|
284
284
|
|
285
285
|
response = client.connection.put("#{association.generate_path}/update_many") do |req|
|
286
|
-
|
287
|
-
|
286
|
+
if attributes == {}
|
287
|
+
req.body = { resource_name => ids_or_attributes }
|
288
|
+
else
|
289
|
+
req.params = { :ids => ids_or_attributes.join(',') }
|
290
|
+
req.body = { singular_resource_name => attributes }
|
291
|
+
end
|
288
292
|
|
289
293
|
yield req if block_given?
|
290
294
|
end
|
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.15.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: 2017-
|
12
|
+
date: 2017-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|