RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

FreshQualityPackrunSummaryController

Controller Class for FreshQuality Packrun Summaries

Constructor

new FreshQualityPackrunSummaryController()

Source

Methods

static

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

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

Parameters

  • siteId number

    The Site ID

  • createData FreshQualityPackrunSummaryController.CreateData

    The FreshQuality Packrun Summary Create Data

Returns

  • Promise.<FreshQualityPackrunSummaryModel>

Source

static

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

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

Create a Comment for a FreshQuality Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<FreshQualityPackrunSummaryController.CommentItem>

Source

static

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

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

Delete a Comment for a FreshQuality Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

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

Parameters

  • siteId number

    The Site ID

  • queryParameters FreshQualityPackrunSummaryController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<FreshQualityPackrunSummaryModel>>

Source

static

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

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

Retrieves Comments for a FreshQuality Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

Returns

  • Promise.<Array.<FreshQualityPackrunSummaryController.CommentItem>>

Source

static

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

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

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

Returns

  • Promise.<FreshQualityPackrunSummaryModel>

Source

static

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

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

Retrieves Comments for a FreshQuality Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

  • commentId string

    The Comment ID

Returns

  • Promise.<FreshQualityPackrunSummaryController.CommentItem>

Source

static

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

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

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

  • updateData FreshQualityPackrunSummaryController.UpdateData

    The FreshQuality Packrun Summary Update Data

Returns

  • Promise.<FreshQualityPackrunSummaryModel>

Source

static

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

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

Update a Comment for a FreshQuality Packrun Summary

Parameters

  • siteId number

    The Site ID

  • id string

    The FreshQuality Packrun Summary ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<FreshQualityPackrunSummaryController.CommentItem>

Source

Type Definitions

CategorySummary

A CategorySummary Type

Type

  • Object

Properties

  • name string

    The Category Name (e.g. Minor Packing Defects, Softs)

  • percentage number

    The Percentage of all Fruit Sampled that have Defects in this Category

  • defects Array.<FreshQualityPackrunSummaryController.CategorySummaryDefect>

    An Array of Defects within this Category Summary

Source

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount FreshQualityPackrunSummaryController.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 FreshQuality 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

  • class1R600Samples Array.<FreshQualityPackrunSummaryController.Sample> <optional>

    An Array of Class 1 R600 Samples

  • categorySummaries Array.<FreshQualityPackrunSummaryController.CategorySummary> <optional>

    An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)

  • totalFruitSampled number <optional>

    The Total Number of Fruit Sampled in this Packrun Summary

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 FreshQuality Packrun Summary was Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

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

Source

Sample

A Sample Type

Type

  • Object

Properties

  • fruitSize string

    The Fruit Size for this Sample

  • packType string

    The Pack Type for this Sample

  • timestamp Date

    When this Sample was taken

  • fruitCount number

    The Total Number of Fruit Sampled

  • defects Array.<FreshQualityPackrunSummaryController.SampleDefect>

    An Array of Defects found in this Sample

Source

UpdateData

The Update Data for a FreshQuality 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

  • class1R600Samples Array.<FreshQualityPackrunSummaryController.Sample> <optional>

    An Array of Class 1 R600 Samples

  • categorySummaries Array.<FreshQualityPackrunSummaryController.CategorySummary> <optional>

    An Array of Defect Category Summaries (e.g. Minor Packing Defects, Softs)

  • totalFruitSampled number <optional>

    The Total Number of Fruit Sampled in this Packrun Summary

Source