The measurement object

The measurement object has the following attributes:

measurement.type

Returns the measurement type, which can be one of the following:

  • dimension
  • volume
  • weight

measurement.unit

Returns the name of associated unit for the measurement type. For example, if the type is weight, then the unit could be grams.

measurement.value

Returns the measurement value.