Constructor
new RejectBinController()
Source
Methods
create(siteId, createData) → {Promise.<RejectBinModel>}
Create a Reject Bin [POST /packhouse/sites/{siteId}/reject-bins]
Parameters
-
siteId
number
The Site ID
-
createData
RejectBinController.CreateData
The Reject Bin Create Data
Returns
-
Promise.<RejectBinModel>
Source
createComment(siteId, id, content) → {Promise.<RejectBinController.CommentItem>}
Create a Comment [POST /packhouse/sites/{siteId}/reject-bins/{id}/comments]
Create a Comment for a Reject Bin
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
-
content
string
The Content of the New Comment
Returns
-
Promise.<RejectBinController.CommentItem>
Source
delete(siteId, id) → {Promise.<boolean>}
Delete a Reject Bin [DELETE /packhouse/sites/{siteId}/reject-bins/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
Returns
-
Promise.<boolean>
Source
deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}
Delete a Comment [DELETE /packhouse/sites/{siteId}/reject-bins/{id}/comments/{commentId}]
Delete a Comment for a Reject Bin
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
-
commentId
string
The Comment ID
Returns
-
Promise.<boolean>
Source
getAll(siteId, queryParametersopt) → {Promise.<Array.<RejectBinModel>>}
List all Reject Bins [GET /packhouse/sites/{siteId}/reject-bins]
Parameters
-
siteId
number
The Site ID
-
queryParameters
RejectBinController.GetAllQueryParameters
<optional>
The Optional Query Parameters
Returns
-
Promise.<Array.<RejectBinModel>>
Source
getComments(siteId, id) → {Promise.<Array.<RejectBinController.CommentItem>>}
Retrieve Comments [GET /packhouse/sites/{siteId}/reject-bins/{id}/comments]
Retrieves Comments for a Reject Bin
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
Returns
-
Promise.<Array.<RejectBinController.CommentItem>>
Source
getOne(siteId, id) → {Promise.<RejectBinModel>}
Retrieve a Reject Bin [GET /packhouse/sites/{siteId}/reject-bins/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
Returns
-
Promise.<RejectBinModel>
Source
getOneComment(siteId, id, commentId) → {Promise.<RejectBinController.CommentItem>}
Retrieve a Comment [GET /packhouse/sites/{siteId}/reject-bins/{id}/comments/{commentId}]
Retrieves Comments for a Reject Bin
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
-
commentId
string
The Comment ID
Returns
-
Promise.<RejectBinController.CommentItem>
Source
update(siteId, id, updateData) → {Promise.<RejectBinModel>}
Update a Reject Bin [PATCH /packhouse/sites/{siteId}/reject-bins/{id}]
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
-
updateData
RejectBinController.UpdateData
The Reject Bin Update Data
Returns
-
Promise.<RejectBinModel>
Source
updateOneComment(siteId, id, commentId, content) → {Promise.<RejectBinController.CommentItem>}
Update a Comment [PATCH /packhouse/sites/{siteId}/reject-bins/{id}/comments/{commentId}]
Update a Comment for a Reject Bin
Parameters
-
siteId
number
The Site ID
-
id
string
The Reject Bin ID
-
commentId
string
The Comment ID
-
content
string
The Updated Content for the Comment
Returns
-
Promise.<RejectBinController.CommentItem>
Source
Type Definitions
BinCardApiStatus
Results from Interacting with the FreshPack API to Print a Multi-Grower Bin Card
Type
-
Object
Properties
-
requestCount
number
Number of Requests made to the FreshPack API
-
requestTimestamp
Date
<nullable>
Timestamp of the last Request made to the FreshPack API
-
responseCode
number
<nullable>
Response Code from the last FreshPack API Request
-
responseMessage
string
<nullable>
Response Message from the last FreshPack API Request
-
completed
boolean
Whether Interaction with the FreshPack API has been Completed
Source
BinNumberApiStatus
Results from Interacting with the FreshPack API to Create a Multi-Grower Bin
Type
-
Object
Properties
-
requestCount
number
Number of Requests made to the FreshPack API
-
requestTimestamp
Date
<nullable>
Timestamp of the last Request made to the FreshPack API
-
responseCode
number
<nullable>
Response Code from the last FreshPack API Request
-
responseMessage
string
<nullable>
Response Message from the last FreshPack API Request
-
completed
boolean
Whether Interaction with the FreshPack API has been Completed
Source
CommentItem
A CommentItem Type
Type
-
Object
Properties
-
id
string
The Comment ID
-
userAccount
RejectBinController.UserAccount
-
content
string
<nullable>
The Content of the Comment
-
createdTimestamp
Date
<nullable>
When the Comment was Created
-
updatedTimestamp
Date
<nullable>
When the Comment was last Updated
Source
CreateData
The Create Data for a Reject Bin
Type
-
Object
Properties
-
rejectBinScaleId
string
The Reject Bin Scale ID this Reject Bin is associated with
-
createdTimestamp
Date
<optional>
When this Reject Bin was Created
-
rejectBinScaleName
string
The Name of the Reject Bin Scale where this Bin was Created
-
tareWeight
number
<optional>
<nullable>
The Tare Weight Captured by the Reject Bin Scale
-
finalizedTimestamp
Date
<optional>
<nullable>
When this Reject Bin was Finalized (No new Weights)
-
freshPackMultiGrowerBins
Array.<RejectBinController.FreshPackMultiGrowerBin>
<optional>
The Multi-Grower Bins that will be submitted to FreshPack
Source
FreshPackMultiGrowerBin
A FreshPackMultiGrowerBin Type
Type
-
Object
Properties
-
classType
string
The Class Type of this Multi-Grower Bin
-
binNumber
string
<nullable>
The FreshPack Assigned Number of this Multi-Grower Bin
-
printBinCard
boolean
Whether a Bin Card should be Printed when the Reject Bin is Finalized
-
binNumberApi
RejectBinController.BinNumberApiStatus
<nullable>
Results from Interacting with the FreshPack API to Create a Multi-Grower Bin
-
binCardApi
RejectBinController.BinCardApiStatus
<nullable>
Results from Interacting with the FreshPack API to Print a Multi-Grower Bin Card
Source
GetAllQueryParameters
The Optional Query Parameters for the getAll Function
Type
-
Object
Properties
-
rejectBinScaleId
string
<optional>
The Reject Bin Scale ID this Reject Bin is associated with
-
rejectBinScaleName
string
<optional>
The Name of the Reject Bin Scale where this Bin was Created
-
createdTimestampBegin
Date
<optional>
Filter by the Timestamp when this Reject Bin was Created. Results Greater than or Equal to Timestamp
-
createdTimestampEnd
Date
<optional>
Filter by the Timestamp when this Reject Bin was Created. Results Less than or Equal to Timestamp
-
finalizedTimestampBegin
Date
<optional>
Filter by the Timestamp when this Reject Bin was Finalized. Results Greater than or Equal to Timestamp
-
finalizedTimestampEnd
Date
<optional>
Filter by the Timestamp when this Reject Bin was Finalized. Results Less than or Equal to Timestamp
Source
UpdateData
The Update Data for a Reject Bin
Type
-
Object
Properties
-
rejectBinScaleId
string
<optional>
The Reject Bin Scale ID this Reject Bin is associated with
-
createdTimestamp
Date
<optional>
When this Reject Bin was Created
-
rejectBinScaleName
string
<optional>
The Name of the Reject Bin Scale where this Bin was Created
-
tareWeight
number
<optional>
<nullable>
The Tare Weight Captured by the Reject Bin Scale
-
finalizedTimestamp
Date
<optional>
<nullable>
When this Reject Bin was Finalized (No new Weights)
-
freshPackMultiGrowerBins
Array.<RejectBinController.FreshPackMultiGrowerBin>
<optional>
The Multi-Grower Bins that will be submitted to FreshPack
Source
UserAccount
A UserAccount Type
Type
-
Object
Properties
-
id
string
<nullable>
The User Account ID
-
firstName
string
<nullable>
The User's First Name
-
lastName
string
<nullable>
The User's Last Name