class Sagekit::IC::CategoriesResource

Public Instance Methods

create(company, **attributes) click to toggle source
# File lib/sagekit/resources/IC/categories.rb, line 12
def create(company, **attributes)
  Category.new post_request("#{company}/IC/ICCategories", body: attributes).body
end
delete(company, item_id) click to toggle source
# File lib/sagekit/resources/IC/categories.rb, line 21
def delete(company, item_id)
  delete_request("#{company}/IC/ICCategories('#{item_id}')")
  true
end
list(company, **params) click to toggle source
# File lib/sagekit/resources/IC/categories.rb, line 4
def list(company, **params)
  Collection.from_response get_request("#{company}/IC/ICCategories?$count=true", params: params), type: Category
end
retreive(company, cat_id, **params) click to toggle source
# File lib/sagekit/resources/IC/categories.rb, line 8
def retreive(company, cat_id, **params)
  Category.new get_request("#{company}/IC/ICCategories('#{cat_id}')", params: params).body
end
update(company, cat_id, **attributes) click to toggle source
# File lib/sagekit/resources/IC/categories.rb, line 16
def update(company, cat_id, **attributes)
  patch_request("#{company}/IC/ICCategories('#{cat_id}')", body: attributes)
  true
end