module Layer::Operations::Create::ClassMethods

Public Instance Methods

create(attributes = {}, client = self.client) click to toggle source

Creates the resource with the given attributes

@param attributes [Hash] the resource's attributes @param client [Layer::Client] the client to use to make this request @return [Layer::Resource] the created resource @raise [Layer::Exceptions::Exception] a subclass of Layer::Exceptions::Exception describing the error

# File lib/layer/operations/create.rb, line 12
def create(attributes = {}, client = self.client)
  response = client.post(url, attributes)
  from_response(response, client)
end