Product Class Reference

Description

Renders a product.

Protected Member Functions

 _render ($product)
 Renders a product for API output. More...
 

Member Function Documentation

_render (   $product)
protected

Renders a product for API output.

{
"id": "1000",
"entityType": "Products",
"rev": "152",
"name": "Mac Mini",
"type": "0", // 0 = product, 1 = service
"sku": "NS0012MM", // present when type is product (0)
"unit": "", // present when type is service (1)
"prices": [ Product_Price, ... ] // may only have one price per market
}

The "unit" key is used if the "type" key is service (1), otherwise it is ignored.

Possible values for the "unit" key:

"minute"
"hour"
"day"
"week"
"month"
"quarter"
"year"
Returns
array