module Hawkei::APIOperation::Save::ClassMethods

Public Instance Methods

create(params = {}, options = {}) click to toggle source

Create an API Resource and validate the params for the API.

@param [Hash] params for the request @param [Hash] Additional options for the request

@return [Hawkei::Object] response from the API

# File lib/hawkei/api_operation/save.rb, line 15
def create(params = {}, options = {})
  response = request(:post, resource_path, params, options)
  initialize_from(response)
end
update(id, params = {}, options = {}) click to toggle source

Update an API Resource and validate params for the API

@param [String] id for the request @param [Hash] params for the request @param [Hash] Additional options for the request

@return [Hawkei::Object] response from the API

# File lib/hawkei/api_operation/save.rb, line 28
def update(id, params = {}, options = {})
  response = request(:put, "#{resource_path}/#{id}", params, options)
  initialize_from(response)
end