Constructor
new PackTypeController()
Source
Methods
create(siteId, createData) → {Promise.<PackTypeModel>}
Create a Pack Type [POST /packhouse/sites/{siteId}/pack-types]
Parameters
-
siteId
number
The Site ID
-
createData
PackTypeController.CreateData
The 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
number
The Site ID
-
id
string
The 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
number
The 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
number
The Site ID
-
id
string
The 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
number
The Site ID
-
id
string
The Pack Type ID
-
updateData
PackTypeController.UpdateData
The 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
string
The Name for this Pack Type
-
description
string
<optional>
An Optional Description for this Pack Type
-
form
string
The 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
string
The Fruit Size
-
count
number
The 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