module ZendeskAPI::CreateMany
Public Instance Methods
create_many!(client, attributes_array, association = Association.new(:class => self)) { |req| ... }
click to toggle source
Creates multiple resources using the create_many endpoint. @param [Client] client The {Client} object to be used @param [Array] attributes_array An array of resources to be created. @return [JobStatus] the {JobStatus} instance for this create job
# File lib/zendesk_api/actions.rb, line 173 def create_many!(client, attributes_array, association = Association.new(:class => self)) response = client.connection.post("#{association.generate_path}/create_many") do |req| req.body = { resource_name => attributes_array } yield req if block_given? end JobStatus.new_from_response(client, response) end