CategoryAPI Class

class CategoryAPI(parent)

Bases: FreeAgentBase

The CategoryAPI class

property categories

Property to lazy load categories

get_desc_id(description)

Return the category id url for passed category name

Parameters:

description (str) – name of category to find

Return type:

str

Returns:

id url of the category

Raises:

ValueError – if category not found

get_desc_nominal_code(description)

Return the nominal code for a given category description

Parameters:

description (str) – The description of the category

Return type:

str

Returns:

The nominal code of the category

Raises:

ValueError – if category not found

get_nominal_code_id(nominal_code)

Get category id url from nominal code

Parameters:

nominal_code (int) – nominal code of category to find

Return type:

str

Returns:

id url of the category

Raises:

ValueError – if category not found

get_nominal_name(nominal_code)

Get category name from nominal code

Parameters:

nominal_code (int) – nominal code of category to find

Return type:

str

Returns:

name (description) of the category

Raises:

ValueError – if category not found