Methods
create(siteId, createData) → {Promise.<VarietyModel>}
Create a Variety [POST /packhouse/sites/{siteId}/varieties]
Parameters
-
siteId
number
The Site ID
-
createData
VarietyController.CreateData
The Variety Create Data
Returns
-
Promise.<VarietyModel>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a Variety [DELETE /packhouse/sites/{siteId}/varieties/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Variety ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<VarietyModel>>}
List all Varieties [GET /packhouse/sites/{siteId}/varieties]
Parameters
-
siteId
number
The Site ID
-
queryParameters
VarietyController.GetAllQueryParameters
<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<VarietyModel>>
Source
getOne(siteId, id) → {Promise.<VarietyModel>}
Retrieve a Variety [GET /packhouse/sites/{siteId}/varieties/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Variety ID
Returns
-
Promise.<VarietyModel>
Source
update(siteId, id, updateData) → {Promise.<VarietyModel>}
Update a Variety [PATCH /packhouse/sites/{siteId}/varieties/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Variety ID
-
updateData
VarietyController.UpdateData
The Variety Update Data
Returns
-
Promise.<VarietyModel>
Source
Type Definitions
CreateData
The Create Data for a Variety
Type
-
Object
Properties
-
code
string
<optional>
The Variety Code
-
name
string
The Variety Name
-
description
string
The Variety Description
-
image
string
The Variety Image Source
-
fruitSizes
Array.<VarietyController.VarietyFruitSize>
An Array of Fruit Sizes Defined for this Variety
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
code
string
<optional>
The Variety Code
-
name
string
<optional>
The Variety Name
Source
UpdateData
The Update Data for a Variety
Type
-
Object
Properties
-
name
string
<optional>
The Variety Name
-
description
string
<optional>
The Variety Description
-
image
string
<optional>
The Variety Image Source
-
fruitSizes
Array.<VarietyController.VarietyFruitSize>
<optional>
An Array of Fruit Sizes Defined for this Variety
Source
VarietyFruitSize
A VarietyFruitSize Type
Type
-
Object
Properties
-
size
string
The Fruit Size