MyCloud Logo

MyCloud API Documentation

ProductCategory Model

The ProductCategory model represents a category that you have defined to group products together.

Model Attributes

id
Unique numeric ID of the category.
Methods:
integer getId()
object setId( integer )
code
The code assigned by the shop for this category.
Methods:
string getCode()
object setCode( string )
name
The name of the category.
Methods:
string getName()
object setName( string )

API Calls

array ProductCategory::all()
Get all product categories defined by your shop.
Returns:
Array containing the list of ProductCategory objects that are defined by your shop.
object ProductCategory::get( integer $id )
Get the product category identified by the unique id.
Returns:
An ProductCategory object identified by the unique id.
object create()
Create a new product category with the attributes defined by this object. The id attribute, if set, will be ignored.
Returns:
The ProductCategory object that was created.