class KayakoClient::KnowledgebaseCategory

Constants

SORT_CREATIONDATE
SORT_DISPLAYORDER
SORT_INHERIT
SORT_RATING
SORT_TITLE
TYPE_GLOBAL
TYPE_INHERIT
TYPE_PRIVATE
TYPE_PUBLIC

Public Class Methods

all(*args) click to toggle source
Calls superclass method
# File lib/kayako_client/knowledgebase_category.rb, line 70
def self.all(*args)
    e = path + '/ListAll'
    options = args.last.is_a?(Hash) ? args.pop : {}
    if args.size > 0
        if args.size <= 2
            e << '/' + args.collect { |arg| arg.to_i }.join('/')
        else
            raise ArgumentError, "too many arguments"
        end
    end
    super(options.merge(:e => e))
end

Public Instance Methods

has_parent_category?() click to toggle source
# File lib/kayako_client/knowledgebase_category.rb, line 62
def has_parent_category?
    !parent_kb_category_id.nil? && parent_kb_category_id > 0
end
parent_is_root?() click to toggle source
# File lib/kayako_client/knowledgebase_category.rb, line 66
def parent_is_root?
    !parent_kb_category_id.nil? && parent_kb_category_id == 0
end