RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

PackTypeController

Controller Class for Pack Types

Constructor

new PackTypeController()

Source

Methods

static

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

Create a Pack Type [POST /packhouse/sites/{siteId}/pack-types]

Parameters

  • siteId number

    The Site ID

  • createData PackTypeController.CreateData

    The Pack Type Create Data

Returns

  • Promise.<PackTypeModel>

Source

static

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

List all Pack Types [GET /packhouse/sites/{siteId}/pack-types]

Parameters

  • siteId number

    The Site ID

  • queryParameters PackTypeController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<PackTypeModel>>

Source

static

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

Retrieve a Pack Type [GET /packhouse/sites/{siteId}/pack-types/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Pack Type ID

Returns

  • Promise.<PackTypeModel>

Source

static

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

Update a Pack Type [PATCH /packhouse/sites/{siteId}/pack-types/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Pack Type ID

  • updateData PackTypeController.UpdateData

    The Pack Type Update Data

Returns

  • Promise.<PackTypeModel>

Source

Type Definitions

CreateData

The Create Data for a Pack Type

Type

  • Object

Properties

  • code string <optional>

    The Code for this Pack Type

  • name string

    The Name for this Pack Type

  • description string <optional>

    An Optional Description for this Pack Type

  • form string

    The Physical Form of this Pack Type

  • fruitSizes Array.<PackTypeController.PackTypeFruitSize> <optional>

    An Array of Fruit Sizes Defined for this Pack Type

Source

UpdateData

The Update Data for a Pack Type

Type

  • Object

Properties

  • name string <optional>

    The Name for this Pack Type

  • description string <optional>

    An Optional Description for this Pack Type

  • form string <optional>

    The Physical Form of this Pack Type

  • fruitSizes Array.<PackTypeController.PackTypeFruitSize> <optional>

    An Array of Fruit Sizes Defined for this Pack Type

Source