class Setka::Workflow::Category

Public Class Methods

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

Creates a category.

@param [Hash] body Attributes of a new category.

@param [Hash] options Additional options (explicit HTTP headers,

specific Client object).

@raise [Workflow::Category] If something went wrong during category's

creation.

@return [Hash] Hash of category's attibutes.

# File lib/setka/workflow/category.rb, line 17
def create(body, options = {})
  collection(:post, nil, body, options)
end
delete(id, options = {}) click to toggle source

Deletes a category. @param [Integer] id Category's id

@param [Hash] options Additional options (explicit HTTP headers,

specific Client object).

@raise [Workflow::Category] If something went wrong during category's

deleting.

@return [Hash] Hash of category's attibutes.

# File lib/setka/workflow/category.rb, line 47
def delete(id, options = {})
  member(:delete, id, nil, nil, options)
end
update(id, body, options = {}) click to toggle source

Updates a category. @param [Integer] id Category's id

@param [Hash] body Category's attributes to update.

@param [Hash] options Additional options (explicit HTTP headers,

specific Client object).

@raise [Workflow::Category] If something went wrong during category's

updating.

@return [Hash] Hash of category's attibutes.

# File lib/setka/workflow/category.rb, line 33
def update(id, body, options = {})
  member(:patch, id, nil, body, options)
end

Private Class Methods

resource_plural() click to toggle source
# File lib/setka/workflow/category.rb, line 53
def resource_plural
  :categories
end