Module: ZendeskAPI::Destroy::ClassMethod

Defined in:
lib/zendesk_api/actions.rb

Instance Method Summary collapse

Instance Method Details

#destroy(client, attributes = {}, &block) ⇒ Object

Destroys, returning false on error.



259
260
261
262
263
# File 'lib/zendesk_api/actions.rb', line 259

def destroy(client, attributes = {}, &block)
  destroy!(client, attributes, &block)
rescue ZendeskAPI::Error::ClientError
  false
end

#destroy!(client, opts = {}, &block) ⇒ Object

Deletes a resource given the id passed in.

Parameters:

  • client (Client)

    The Client object to be used

  • opts (Hash) (defaults to: {})

    The optional parameters to pass. Defaults to {}



252
253
254
255
256
# File 'lib/zendesk_api/actions.rb', line 252

def destroy!(client, opts = {}, &block)
  new(client, opts).destroy!(&block)

  true
end