RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

MAFSizerBatchController

Controller Class for MAF Sizer Batches

Constructor

new MAFSizerBatchController()

Source

Methods

static

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

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

Parameters

  • siteId number

    The Site ID

  • createData MAFSizerBatchController.CreateData

    The MAF Sizer Batch Create Data

Returns

  • Promise.<MAFSizerBatchModel>

Source

static

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

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

Create a Comment for a MAF Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<MAFSizerBatchController.CommentItem>

Source

static

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

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

Delete a Comment for a MAF Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

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

Parameters

  • siteId number

    The Site ID

  • queryParameters MAFSizerBatchController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<MAFSizerBatchModel>>

Source

static

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

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

Retrieves Comments for a MAF Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

Returns

  • Promise.<Array.<MAFSizerBatchController.CommentItem>>

Source

static

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

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

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

Returns

  • Promise.<MAFSizerBatchModel>

Source

static

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

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

Retrieves Comments for a MAF Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

  • commentId string

    The Comment ID

Returns

  • Promise.<MAFSizerBatchController.CommentItem>

Source

static

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

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

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

  • updateData MAFSizerBatchController.UpdateData

    The MAF Sizer Batch Update Data

Returns

  • Promise.<MAFSizerBatchModel>

Source

static

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

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

Update a Comment for a MAF Sizer Batch

Parameters

  • siteId number

    The Site ID

  • id string

    The MAF Sizer Batch ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<MAFSizerBatchController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount MAFSizerBatchController.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 MAF Sizer Batch

Type

  • Object

Properties

  • mafSizerId string

    The MAF Sizer ID this Batch is associated with

  • batchId string <optional>

    The Numeric MAF Batch ID

  • createdTimestamp Date <optional>

    When this Batch was Created

  • batchName string <optional>
    <nullable>

    The Batch Name

  • growerCode string <optional>
    <nullable>

    The Grower Code

  • growerName string <optional>
    <nullable>

    The Grower Name

  • varietyCode string <optional>
    <nullable>

    The Variety Code

  • varietyName string <optional>
    <nullable>

    The Variety Name

  • totalWeight number

    The Total Weight Processed for this Batch

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • articleSummaries Array.<MAFSizerBatchController.ArticleSummary> <optional>

    An Array of Summary Data Objects for each Article

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

    An Array of Summary Data Objects for each Outlet

  • fruitSummaries Array.<MAFSizerBatchController.FruitSummary> <optional>

    An Array of Summary Data Objects for each Fruit Size and Article

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • mafSizerId string <optional>

    The MAF Sizer ID this Batch is associated with

  • batchId string <optional>

    The Numeric MAF Batch ID

  • batchName string <optional>
    <nullable>

    The Batch Name

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • createdTimestampBegin Date <optional>

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

  • createdTimestampEnd Date <optional>

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

Source

UpdateData

The Update Data for a MAF Sizer Batch

Type

  • Object

Properties

  • mafSizerId string <optional>

    The MAF Sizer ID this Batch is associated with

  • createdTimestamp Date <optional>

    When this Batch was Created

  • batchName string <optional>
    <nullable>

    The Batch Name

  • growerCode string <optional>
    <nullable>

    The Grower Code

  • growerName string <optional>
    <nullable>

    The Grower Name

  • varietyCode string <optional>
    <nullable>

    The Variety Code

  • varietyName string <optional>
    <nullable>

    The Variety Name

  • totalWeight number <optional>

    The Total Weight Processed for this Batch

  • packrunId string <optional>
    <nullable>

    The Packrun ID associated with this Batch

  • articleSummaries Array.<MAFSizerBatchController.ArticleSummary> <optional>

    An Array of Summary Data Objects for each Article

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

    An Array of Summary Data Objects for each Outlet

  • fruitSummaries Array.<MAFSizerBatchController.FruitSummary> <optional>

    An Array of Summary Data Objects for each Fruit Size and Article

Source