Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/zendesk_api/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ module CreateOrUpdateMany
# @param [Array<Hash>] attributes The attributes to update resources with
#
# @return [JobStatus] the {JobStatus} instance for this destroy job
def create_or_update_many!(client, attributes)
association = Association.new(class: self)
def create_or_update_many!(client, attributes, association = Association.new(class: self))

response = client.connection.post("#{association.generate_path}/create_or_update_many") do |req|
req.body = {resource_name => attributes}
Expand Down
2 changes: 1 addition & 1 deletion lib/zendesk_api/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def initialize(client, resource, options = {})
end

# Methods that take an Array argument
methods = %w[create_many! destroy_many!]
methods = %w[create_many! destroy_many! create_or_update_many!]
methods.each do |deferrable|
# Passes arguments and the proper path to the resource class method.
# @param [Array] array arguments
Expand Down