Module: FreshdeskAPI::Destroy::ClassMethods

Defined in:
lib/freshdesk_api/actions.rb

Instance Method Summary collapse

Instance Method Details

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



186
187
188
189
190
# File 'lib/freshdesk_api/actions.rb', line 186

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

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

Deteles a resource given the id passed in.

Parameters:

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

    The optional parameters to pass. Defaults to {}



181
182
183
184
# File 'lib/freshdesk_api/actions.rb', line 181

def destroy!(client, attributes = {}, &block)
  new(client, attributes).destroy!(&block)
  true
end