Constructor
new PackTypeController()
Source
Methods
create(siteId, createData) → {Promise.<PackTypeModel>}
Create a Pack Type [POST /packhouse/sites/{siteId}/pack-types]
Parameters
-
siteId
numberThe Site ID
-
createData
PackTypeController.CreateDataThe Pack Type Create Data
Returns
-
Promise.<PackTypeModel>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a Pack Type [DELETE /packhouse/sites/{siteId}/pack-types/{id}]
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Pack Type ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<PackTypeModel>>}
List all Pack Types [GET /packhouse/sites/{siteId}/pack-types]
Parameters
-
siteId
numberThe Site ID
-
queryParameters
PackTypeController.GetAllQueryParameters<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<PackTypeModel>>
Source
getOne(siteId, id) → {Promise.<PackTypeModel>}
Retrieve a Pack Type [GET /packhouse/sites/{siteId}/pack-types/{id}]
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Pack Type ID
Returns
-
Promise.<PackTypeModel>
Source
update(siteId, id, updateData) → {Promise.<PackTypeModel>}
Update a Pack Type [PATCH /packhouse/sites/{siteId}/pack-types/{id}]
Parameters
-
siteId
numberThe Site ID
-
id
stringThe Pack Type ID
-
updateData
PackTypeController.UpdateDataThe Pack Type Update Data
Returns
-
Promise.<PackTypeModel>
Source
Type Definitions
CreateData
The Create Data for a Pack Type
Type
-
Object
Properties
-
code
string<optional>
The Code for this Pack Type
-
name
stringThe Name for this Pack Type
-
description
string<optional>
An Optional Description for this Pack Type
-
form
stringThe Physical Form of this Pack Type
-
fruitSizes
Array.<PackTypeController.PackTypeFruitSize><optional>
An Array of Fruit Sizes Defined for this Pack Type
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
code
string<optional>
The Code for this Pack Type
-
form
string<optional>
The Physical Form of this Pack Type
Source
PackTypeFruitSize
A PackTypeFruitSize Type
Type
-
Object
Properties
-
size
stringThe Fruit Size
-
count
numberThe Count of Fruit in one Pack
Source
UpdateData
The Update Data for a Pack Type
Type
-
Object
Properties
-
name
string<optional>
The Name for this Pack Type
-
description
string<optional>
An Optional Description for this Pack Type
-
form
string<optional>
The Physical Form of this Pack Type
-
fruitSizes
Array.<PackTypeController.PackTypeFruitSize><optional>
An Array of Fruit Sizes Defined for this Pack Type