RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

ReemoonSizerBatchController

Controller Class for Reemoon Sizer Batches

Constructor

new ReemoonSizerBatchController()

Source

Methods

static

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

Create a Reemoon Sizer Batch [POST /packhouse/sites/{siteId}/reemoon-sizer-batches]

Parameters

  • siteId number

    The Site ID

  • createData ReemoonSizerBatchController.CreateData

    The Reemoon Sizer Batch Create Data

Returns

  • Promise.<ReemoonSizerBatchModel>

Source

static

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

Create a Comment [POST /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}/comments]

Create a Comment for a Reemoon Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<ReemoonSizerBatchController.CommentItem>

Source

static

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

Delete a Comment [DELETE /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}/comments/{commentId}]

Delete a Comment for a Reemoon Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

List all Reemoon Sizer Batches [GET /packhouse/sites/{siteId}/reemoon-sizer-batches]

Parameters

  • siteId number

    The Site ID

  • queryParameters ReemoonSizerBatchController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<ReemoonSizerBatchModel>>

Source

static

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

Retrieve Comments [GET /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}/comments]

Retrieves Comments for a Reemoon Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

Returns

  • Promise.<Array.<ReemoonSizerBatchController.CommentItem>>

Source

static

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

Retrieve a Reemoon Sizer Batch [GET /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

Returns

  • Promise.<ReemoonSizerBatchModel>

Source

static

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

Retrieve a Comment [GET /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}/comments/{commentId}]

Retrieves Comments for a Reemoon Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

  • commentId string

    The Comment ID

Returns

  • Promise.<ReemoonSizerBatchController.CommentItem>

Source

static

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

Update a Reemoon Sizer Batch [PATCH /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

  • updateData ReemoonSizerBatchController.UpdateData

    The Reemoon Sizer Batch Update Data

Returns

  • Promise.<ReemoonSizerBatchModel>

Source

static

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

Update a Comment [PATCH /packhouse/sites/{siteId}/reemoon-sizer-batches/{id}/comments/{commentId}]

Update a Comment for a Reemoon Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The Reemoon Sizer Batch ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<ReemoonSizerBatchController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount ReemoonSizerBatchController.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 Reemoon Sizer Batch

Type

  • Object

Properties

  • reemoonSizerId string

    The Reemoon Sizer ID this Batch is associated with

  • batchId string <optional>

    The Numeric Reemoon Batch ID

  • createdTimestamp Date <optional>

    When this Batch was Created

  • batchName string <optional>
    <nullable>

    The Batch Name

  • startTimestamp Date <optional>
    <nullable>

    When this Batch was Started

  • finishTimestamp Date <optional>
    <nullable>

    When this Batch was Finished

  • varietyCode string <optional>
    <nullable>

    The Variety Code

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • products Array.<ReemoonSizerBatchController.Product> <optional>

    An Array of Products for this Batch

  • outletSummaries Array.<ReemoonSizerBatchController.OutletSummary> <optional>

    An Array of Summary Data Objects for each Outlet by Fruit Size and Product

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • reemoonSizerId string <optional>

    The Reemoon Sizer ID this Batch is associated with

  • batchId string <optional>

    The Numeric Reemoon Batch ID

  • batchName string <optional>

    Filter by the Reemoon Batch Name

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when this Reemoon Sizer Batch was Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when this Reemoon Sizer Batch was Created. Results Less than or Equal to Timestamp

Source

OutletSummary

A OutletSummary Type

Type

  • Object

Properties

  • outletNumber number

    The Outlet Number

  • fruitSize string

    The Fruit Size

  • productId number <nullable>

    The Product ID

  • productName string

    The Product Name

  • fruitCount number

    The Fruit Count

  • fruitWeight number

    The Fruit Weight expressed in Kilograms

Source

Product

A Product Type

Type

  • Object

Properties

  • id number

    The Product ID

  • name string

    The Product Name

  • fruitSizes Array.<string>

    An Array of Fruit Sizes for this Product

  • packType string <nullable>

    The Product Pack Type

  • grades Array.<string>

    An Array of Grades for this Product

  • qualities Array.<string>

    An Array of Qualities for this Product

Source

UpdateData

The Update Data for a Reemoon Sizer Batch

Type

  • Object

Properties

  • reemoonSizerId string <optional>

    The Reemoon Sizer ID this Batch is associated with

  • createdTimestamp Date <optional>

    When this Batch was Created

  • batchName string <optional>
    <nullable>

    The Batch Name

  • startTimestamp Date <optional>
    <nullable>

    When this Batch was Started

  • finishTimestamp Date <optional>
    <nullable>

    When this Batch was Finished

  • varietyCode string <optional>
    <nullable>

    The Variety Code

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • products Array.<ReemoonSizerBatchController.Product> <optional>

    An Array of Products for this Batch

  • outletSummaries Array.<ReemoonSizerBatchController.OutletSummary> <optional>

    An Array of Summary Data Objects for each Outlet by Fruit Size and Product

Source