Module: Layer::Operations::Create::ClassMethods

Included in:
Announcement, Content, Conversation, Webhook
Defined in:
lib/layer/operations/create.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes = {}, client = self.client) ⇒ Layer::Resource

Creates the resource with the given attributes

Parameters:

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

    the resource's attributes

  • client (Layer::Client) (defaults to: self.client)

    the client to use to make this request

Returns:

Raises:


12
13
14
15
# File 'lib/layer/operations/create.rb', line 12

def create(attributes = {}, client = self.client)
  response = client.post(url, attributes)
  from_response(response, client)
end