Method: FreshdeskAPI::Create::ClassMethods#create!

Defined in:
lib/freshdesk_api/actions.rb

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

Create a resource given the attributes passed in.

Parameters:

  • client (Client)

    The FreshdeskAPI::Client object to be used

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

    The attributes to create.



89
90
91
92
93
94
95
96
# File 'lib/freshdesk_api/actions.rb', line 89

def create!(client, attributes = {}, &block)
  response = nil
  new(client, attributes).tap do |resource|
    response = resource.save!(&block)
  end

  response
end