Module: Planting

Members


default

Default planting. Does not include any applications.

Methods


<static> sanitize(planting)

Sanitizes the given planting into a valid API planting.

Parameters:
Name Type Description
planting planting

The planting to sanitize

Returns:

The sanitized planting

Type
planting

<static> updateCropId(planting, cropId)

Updates the crop ID for a planting and it's associated applications

Parameters:
Name Type Description
planting planting

The planting to update

cropId number

The new crop id for the given planting

Returns:

The updated planting (with applications)

Type
planting

<static> updatePlantedAcres(planting, acres)

Updates the planted acres for a planting and it's associated applications

Parameters:
Name Type Description
planting planting

The planting to update

acres number | string

The new acres for the given planting

Returns:

The updated planting (with applications)

Type
planting