RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

CompacSizerBinWeightController

Controller Class for Compac Sizer Bin Weights

Constructor

new CompacSizerBinWeightController()

Source

Methods

static

create(siteId, createData) → {Promise.<CompacSizerBinWeightModel>}

Create a Compac Sizer Bin Weight [POST /packhouse/sites/{siteId}/compac-sizer-bin-weights]

Parameters

  • siteId number

    The Site ID

  • createData CompacSizerBinWeightController.CreateData

    The Compac Sizer Bin Weight Create Data

Returns

  • Promise.<CompacSizerBinWeightModel>

Source

static

createComment(siteId, id, content) → {Promise.<CompacSizerBinWeightController.CommentItem>}

Create a Comment [POST /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}/comments]

Create a Comment for a Compac Sizer Bin Weight

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<CompacSizerBinWeightController.CommentItem>

Source

static

deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}

Delete a Comment [DELETE /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}/comments/{commentId}]

Delete a Comment for a Compac Sizer Bin Weight

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

getAll(siteId, queryParametersopt) → {Promise.<Array.<CompacSizerBinWeightModel>>}

List all Compac Sizer Bin Weights [GET /packhouse/sites/{siteId}/compac-sizer-bin-weights]

Parameters

  • siteId number

    The Site ID

  • queryParameters CompacSizerBinWeightController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<CompacSizerBinWeightModel>>

Source

static

getComments(siteId, id) → {Promise.<Array.<CompacSizerBinWeightController.CommentItem>>}

Retrieve Comments [GET /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}/comments]

Retrieves Comments for a Compac Sizer Bin Weight

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

Returns

  • Promise.<Array.<CompacSizerBinWeightController.CommentItem>>

Source

static

getOne(siteId, id) → {Promise.<CompacSizerBinWeightModel>}

Retrieve a Compac Sizer Bin Weight [GET /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

Returns

  • Promise.<CompacSizerBinWeightModel>

Source

static

getOneComment(siteId, id, commentId) → {Promise.<CompacSizerBinWeightController.CommentItem>}

Retrieve a Comment [GET /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}/comments/{commentId}]

Retrieves Comments for a Compac Sizer Bin Weight

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

  • commentId string

    The Comment ID

Returns

  • Promise.<CompacSizerBinWeightController.CommentItem>

Source

static

update(siteId, id, updateData) → {Promise.<CompacSizerBinWeightModel>}

Update a Compac Sizer Bin Weight [PATCH /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

  • updateData CompacSizerBinWeightController.UpdateData

    The Compac Sizer Bin Weight Update Data

Returns

  • Promise.<CompacSizerBinWeightModel>

Source

static

updateOneComment(siteId, id, commentId, content) → {Promise.<CompacSizerBinWeightController.CommentItem>}

Update a Comment [PATCH /packhouse/sites/{siteId}/compac-sizer-bin-weights/{id}/comments/{commentId}]

Update a Comment for a Compac Sizer Bin Weight

Parameters

  • siteId number

    The Site ID

  • id string

    The Compac Sizer Bin Weight ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<CompacSizerBinWeightController.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

BinWeightApiStatus

Results from Interacting with the FreshPack API to Send Multi-Grower Bin Weights

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 CompacSizerBinWeightController.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 Compac Sizer Bin Weight

Type

  • Object

Properties

  • compacSizerId string

    The Compac Sizer ID this Bin Weight is associated with

  • packrunId string <optional>

    The Packrun ID associated with this Bin Weight

  • createdTimestamp Date <optional>

    When this Bin Weight was Created

  • timeBatchId string <optional>
    <nullable>

    The Time Batch ID associated with this Bin Weight

  • sources Array.<(CompacSizerBinWeightController.OutletSource|CompacSizerBinWeightController.SizerBulkSource)> <optional>

    The Sources and Weights that make up this Bin Weight

  • freshPackMultiGrowerBinWeights Array.<CompacSizerBinWeightController.FreshPackMultiGrowerBinWeight>

    The Multi-Grower Bin Weights that will be submitted to FreshPack

  • freshPackMultiGrowerBins Array.<CompacSizerBinWeightController.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 Bin Weight is Finalized

  • binNumberApi CompacSizerBinWeightController.BinNumberApiStatus <nullable>

    Results from Interacting with the FreshPack API to Create a Multi-Grower Bin

  • binCardApi CompacSizerBinWeightController.BinCardApiStatus <nullable>

    Results from Interacting with the FreshPack API to Print a Multi-Grower Bin Card

Source

FreshPackMultiGrowerBinWeight

A FreshPackMultiGrowerBinWeight Type

Type

  • Object

Properties

  • classType string

    The Class Type of this Multi-Grower Bin Weight

  • weight number

    The Net Weight in Kilograms of this Multi-Grower Bin Weight

  • weightApi CompacSizerBinWeightController.BinWeightApiStatus <nullable>

    Results from Interacting with the FreshPack API to Send Multi-Grower Bin Weights

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • compacSizerId string <optional>

    The Compac Sizer ID this Bin Weight is associated with

  • packrunId string <optional>

    The Packrun ID associated with this Bin Weight

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when this Compac Sizer Bin Weight was Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when this Compac Sizer Bin Weight was Created. Results Less than or Equal to Timestamp

Source

OutletSource

A OutletSource Type

Type

  • Object

Properties

  • type string

    Type of this Bin Weight Source

  • outletNumber number

    Outlet Number of the Sizer Outlet

  • outletName string <nullable>

    Name of the Sizer Outlet

  • weights Array.<{classType: string, weight: number, fruitCount: ?number}>

    An Array of Weights by Class Type for this Bin Weight Source

Source

UpdateData

The Update Data for a Compac Sizer Bin Weight

Type

  • Object

Properties

  • compacSizerId string <optional>

    The Compac Sizer ID this Bin Weight is associated with

  • createdTimestamp Date <optional>

    When this Bin Weight was Created

  • timeBatchId string <optional>
    <nullable>

    The Time Batch ID associated with this Bin Weight

  • sources Array.<(CompacSizerBinWeightController.OutletSource|CompacSizerBinWeightController.SizerBulkSource)> <optional>

    The Sources and Weights that make up this Bin Weight

  • freshPackMultiGrowerBinWeights Array.<CompacSizerBinWeightController.FreshPackMultiGrowerBinWeight> <optional>

    The Multi-Grower Bin Weights that will be submitted to FreshPack

  • freshPackMultiGrowerBins Array.<CompacSizerBinWeightController.FreshPackMultiGrowerBin> <optional>

    The Multi-Grower Bins that will be submitted to FreshPack

Source