RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

PackrunGrowerNotificationController

Controller Class for Packrun Grower Notifications

Constructor

new PackrunGrowerNotificationController()

Source

Methods

static

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

Create a Packrun Grower Notification [POST /packhouse/sites/{siteId}/packrun-grower-notifications]

Parameters

  • siteId number

    The Site ID

  • createData PackrunGrowerNotificationController.CreateData

    The Packrun Grower Notification Create Data

Returns

  • Promise.<PackrunGrowerNotificationModel>

Source

static

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

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

Create a Comment for a Packrun Grower Notification

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<PackrunGrowerNotificationController.CommentItem>

Source

static

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

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

Delete a Comment for a Packrun Grower Notification

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

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

List all Packrun Grower Notifications [GET /packhouse/sites/{siteId}/packrun-grower-notifications]

Parameters

  • siteId number

    The Site ID

  • queryParameters PackrunGrowerNotificationController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<PackrunGrowerNotificationModel>>

Source

static

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

Retrieve Comments [GET /packhouse/sites/{siteId}/packrun-grower-notifications/{id}/comments]

Retrieves Comments for a Packrun Grower Notification

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

Returns

  • Promise.<Array.<PackrunGrowerNotificationController.CommentItem>>

Source

static

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

Retrieve a Packrun Grower Notification [GET /packhouse/sites/{siteId}/packrun-grower-notifications/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

Returns

  • Promise.<PackrunGrowerNotificationModel>

Source

static

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

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

Retrieves Comments for a Packrun Grower Notification

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

  • commentId string

    The Comment ID

Returns

  • Promise.<PackrunGrowerNotificationController.CommentItem>

Source

static

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

Update a Packrun Grower Notification [PATCH /packhouse/sites/{siteId}/packrun-grower-notifications/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

  • updateData PackrunGrowerNotificationController.UpdateData

    The Packrun Grower Notification Update Data

Returns

  • Promise.<PackrunGrowerNotificationModel>

Source

static

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

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

Update a Comment for a Packrun Grower Notification

Parameters

  • siteId number

    The Site ID

  • id string

    The Packrun Grower Notification ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<PackrunGrowerNotificationController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount PackrunGrowerNotificationController.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 Packrun Grower Notification

Type

  • Object

Properties

  • packingLineId string

    The Packing Line ID this Grower Notification is associated with

  • packrunId string <optional>

    The Packrun ID this Grower Notification is associated with

  • createdTimestamp Date <optional>

    When this Grower Notification was Created

  • notificationType string

    The Grower Notification Type

  • smsRequests Array.<PackrunGrowerNotificationController.SmsRequestStatus> <optional>

    The SMS Request Statuses indicating progress when sending SMS Messages

  • emailRequest PackrunGrowerNotificationController.EmailRequestStatus <optional>
    <nullable>

    The Email Request Status indicating progress when sending Emails

  • status string

    Whether the Grower Notification is in the process of being Sent

  • smsContacts Array.<PackrunGrowerNotificationController.SmsContact> <optional>

    An Array of SMS Contacts for this Grower Notification

  • emailContacts Array.<PackrunGrowerNotificationController.EmailContact> <optional>

    An Array of Email Contacts for this Grower Notification

Source

EmailRequestStatus

A EmailRequestStatus Type

Type

  • Object

Properties

  • requestCount number

    The Number of API Requests made to Attempt to Send the Email

  • requestTimestamp Date <nullable>

    When the latest API Request was made

  • responseCode number <nullable>

    The HTTP Response Code received from the Email API

  • responseMessage string <nullable>

    The HTTP Response Message received from the Email API

  • completed boolean

    Whether the sending of API Requests has been completed

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Grower Notification is associated with

  • packrunId string <optional>

    The Packrun ID this Grower Notification is associated with

  • notificationType string <optional>

    The Grower Notification Type

  • status string <optional>

    Whether the Grower Notification is in the process of being Sent

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when Grower Notifications were Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when Grower Notifications were Created. Results Less than or Equal to Timestamp

  • updateTimestampBegin Date <optional>

    Filter by the Timestamp when Grower Notifications were last Updated. Results Greater than or Equal to Timestamp

  • updateTimestampEnd Date <optional>

    Filter by the Timestamp when Grower Notifications were last Updated. Results Less than or Equal to Timestamp

Source

SmsRequestStatus

A SmsRequestStatus Type

Type

  • Object

Properties

  • mobileNumber string

    The Recipient Mobile Number for this SMS Request

  • messageId string <nullable>

    The Message ID returned from the SMS API

  • messageStatus string <nullable>

    The Message Status returned from the SMS API

  • sendRequestCount number

    The Number of API Requests made to Attempt to Send the SMS

  • sendRequestTimestamp Date <nullable>

    When the latest API Request was made to Send the SMS

  • sendResponseCode number <nullable>

    The HTTP Response Code received from the SMS API Send Message Request

  • sendResponseMessage string <nullable>

    The HTTP Response Message received from the SMS API Send Message Request

  • getStatusRequestCount number

    The Number of API Requests made to Attempt to Get the SMS Status

  • getStatusRequestTimestamp Date <nullable>

    When the latest API Request was made to Get the SMS Status

  • getStatusResponseCode number <nullable>

    The HTTP Response Code received from the SMS API Get Message Status Request

  • getStatusResponseMessage string <nullable>

    The HTTP Response Message received from the SMS API Get Message Status Request

  • completed boolean

    Whether the sending of API Requests has been completed

Source

UpdateData

The Update Data for a Packrun Grower Notification

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Grower Notification is associated with

  • createdTimestamp Date <optional>

    When this Grower Notification was Created

  • notificationType string <optional>

    The Grower Notification Type

  • smsRequests Array.<PackrunGrowerNotificationController.SmsRequestStatus> <optional>

    The SMS Request Statuses indicating progress when sending SMS Messages

  • emailRequest PackrunGrowerNotificationController.EmailRequestStatus <optional>
    <nullable>

    The Email Request Status indicating progress when sending Emails

  • status string <optional>

    Whether the Grower Notification is in the process of being Sent

  • smsContacts Array.<PackrunGrowerNotificationController.SmsContact> <optional>

    An Array of SMS Contacts for this Grower Notification

  • emailContacts Array.<PackrunGrowerNotificationController.EmailContact> <optional>

    An Array of Email Contacts for this Grower Notification

Source