RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

VarietyController

Controller Class for Varieties

Constructor

new VarietyController()

Source

Methods

static

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

Create a Variety [POST /packhouse/sites/{siteId}/varieties]

Parameters

  • siteId number

    The Site ID

  • createData VarietyController.CreateData

    The Variety Create Data

Returns

  • Promise.<VarietyModel>

Source

static

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

List all Varieties [GET /packhouse/sites/{siteId}/varieties]

Parameters

  • siteId number

    The Site ID

  • queryParameters VarietyController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<VarietyModel>>

Source

static

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

Update a Variety [PATCH /packhouse/sites/{siteId}/varieties/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Variety ID

  • updateData VarietyController.UpdateData

    The Variety Update Data

Returns

  • Promise.<VarietyModel>

Source

Type Definitions

CreateData

The Create Data for a Variety

Type

  • Object

Properties

  • code string <optional>

    The Variety Code

  • name string

    The Variety Name

  • description string

    The Variety Description

  • image string

    The Variety Image Source

  • fruitSizes Array.<VarietyController.VarietyFruitSize>

    An Array of Fruit Sizes Defined for this Variety

Source

UpdateData

The Update Data for a Variety

Type

  • Object

Properties

  • name string <optional>

    The Variety Name

  • description string <optional>

    The Variety Description

  • image string <optional>

    The Variety Image Source

  • fruitSizes Array.<VarietyController.VarietyFruitSize> <optional>

    An Array of Fruit Sizes Defined for this Variety

Source