RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

FreshPackPackrunSummaryController

Controller Class for FreshPack Packrun Summaries

Constructor

new FreshPackPackrunSummaryController()

Source

Methods

static

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

Create a FreshPack Packrun Summary [POST /packhouse/sites/{siteId}/freshpack-packrun-summaries]

Parameters

  • siteId number

    The Site ID

  • createData FreshPackPackrunSummaryController.CreateData

    The FreshPack Packrun Summary Create Data

Returns

  • Promise.<FreshPackPackrunSummaryModel>

Source

static

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

Create a Comment [POST /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}/comments]

Create a Comment for a FreshPack Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<FreshPackPackrunSummaryController.CommentItem>

Source

static

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

Delete a Comment [DELETE /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}/comments/{commentId}]

Delete a Comment for a FreshPack Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

List all FreshPack Packrun Summaries [GET /packhouse/sites/{siteId}/freshpack-packrun-summaries]

Parameters

  • siteId number

    The Site ID

  • queryParameters FreshPackPackrunSummaryController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<FreshPackPackrunSummaryModel>>

Source

static

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

Retrieve Comments [GET /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}/comments]

Retrieves Comments for a FreshPack Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

Returns

  • Promise.<Array.<FreshPackPackrunSummaryController.CommentItem>>

Source

static

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

Retrieve a FreshPack Packrun Summary [GET /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

Returns

  • Promise.<FreshPackPackrunSummaryModel>

Source

static

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

Retrieve a Comment [GET /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}/comments/{commentId}]

Retrieves Comments for a FreshPack Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

  • commentId string

    The Comment ID

Returns

  • Promise.<FreshPackPackrunSummaryController.CommentItem>

Source

static

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

Update a FreshPack Packrun Summary [PATCH /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

  • updateData FreshPackPackrunSummaryController.UpdateData

    The FreshPack Packrun Summary Update Data

Returns

  • Promise.<FreshPackPackrunSummaryModel>

Source

static

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

Update a Comment [PATCH /packhouse/sites/{siteId}/freshpack-packrun-summaries/{id}/comments/{commentId}]

Update a Comment for a FreshPack Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshPack Packrun Summary ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<FreshPackPackrunSummaryController.CommentItem>

Source

Type Definitions

ClearanceSummary

A ClearanceSummary Type

Type

  • Object

Properties

  • fruitSize string <nullable>

    The Fruit Size of this Clearance Summary

  • tasteBand string <nullable>

    Taste Band (e.g. Y, T, M, R, L)

  • maturityProtocol string <nullable>

    The Maturity Protocol (since Harvesting) of this Fruit Size (e.g. A, B, C, N)

  • harvestProtocol string <nullable>

    The Protocol (at Harvest) of this Fruit Size

  • clearanceDate Date <nullable>

    When this Fruit Size met the Clearance Criteria. Will be null if this Fruit Size has not Cleared

  • kiwiStartDate Date <nullable>

    The Kiwi-Start Date for this Fruit Size

  • trayEstimate number <nullable>

    The Estimated Number of Tray Equivalents for this Fruit Size

  • protocolADate Date <nullable>

    Estimated or Actual Date when this Fruit Size will reach Protocol A Maturity

  • protocolBDate Date <nullable>

    Estimated or Actual Date when this Fruit Size will reach Protocol B Maturity

  • protocolCDate Date <nullable>

    Estimated or Actual Date when this Fruit Size will reach Protocol C Maturity

  • protocolNDate Date <nullable>

    Estimated or Actual Date when this Fruit Size will reach Protocol N Maturity

  • useNIRPacking boolean <nullable>

    Whether NIR Packing should be utilized for this Fruit Size

Source

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount FreshPackPackrunSummaryController.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 FreshPack Packrun Summary

Type

  • Object

Properties

  • packingLineId string

    The Packing Line ID this Summary is associated with

  • packrunId string <optional>

    The Packrun ID this Summary is associated with

  • createdTimestamp Date <optional>

    When this Summary was Created

  • timeBatchId string <optional>
    <nullable>

    The Time Batch this Summary is associated with

  • traySummaries Array.<FreshPackPackrunSummaryController.TraySummary> <optional>

    An Array of Tray Summary Data Objects for all Sizes and Class Types

  • clearanceSummaries Array.<FreshPackPackrunSummaryController.ClearanceSummary> <optional>

    An Array of Clearance Summary Data Objects for all Sizes

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Summary is associated with

  • packrunId string <optional>

    The Packrun ID this Summary is associated with

  • timeBatchId string <optional>
    <nullable>

    The Time Batch this Summary is associated with

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when this FreshPack Packrun Summary was Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when this FreshPack Packrun Summary was Created. Results Less than or Equal to Timestamp

Source

TraySummary

A TraySummary Type

Type

  • Object

Properties

  • classType string

    The Class Type of this Tray Summary

  • fruitSize string <nullable>

    The Fruit Size of this Tray Summary

  • trayCount number

    Total Number of Tray Equivalents

  • averageTrayWeight number

    Average Tray Weight in Kilograms

  • weight number

    The Total Fruit Weight in Kilograms for this Tray Summary

Source

UpdateData

The Update Data for a FreshPack Packrun Summary

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Summary is associated with

  • createdTimestamp Date <optional>

    When this Summary was Created

  • timeBatchId string <optional>
    <nullable>

    The Time Batch this Summary is associated with

  • traySummaries Array.<FreshPackPackrunSummaryController.TraySummary> <optional>

    An Array of Tray Summary Data Objects for all Sizes and Class Types

  • clearanceSummaries Array.<FreshPackPackrunSummaryController.ClearanceSummary> <optional>

    An Array of Clearance Summary Data Objects for all Sizes

Source