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.



224
225
226
227
228
# File 'lib/zendesk_api/actions.rb', line 224

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 {}



217
218
219
220
221
# File 'lib/zendesk_api/actions.rb', line 217

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

  true
end