Module: ZendeskAPI::UpdateMany
Instance Method Summary collapse
-
#update_many!(client, ids, attributes) ⇒ JobStatus
Updates multiple resources using the update_many endpoint.
Instance Method Details
#update_many!(client, ids, attributes) ⇒ JobStatus
Updates multiple resources using the update_many endpoint.
282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/zendesk_api/actions.rb', line 282 def update_many!(client, ids, attributes) association = attributes.delete(:association) || Association.new(:class => self) response = client.connection.put("#{association.generate_path}/update_many") do |req| req.params = { :ids => ids.join(',') } req.body = { singular_resource_name => attributes } yield req if block_given? end JobStatus.new_from_response(client, response) end |