Bazaar.Schemas.Shopping.Types.UnitPrice (Bazaar v0.3.0)

Copy Markdown View Source

Unit Price

Price per standard unit of measurement. MAY be omitted when unit pricing does not apply. unit_price.currency MUST equal price.currency; the comparator MUST NOT perform currency conversion. measure.unit and reference.unit MUST be identical; cross-unit conversion is not permitted. Their scales MAY differ; each value represents value × 10^-scale.

Generated from: unit_price.json

Summary

Functions

Creates a changeset for validating and casting params.

Returns the description for a field, if available.

Creates a new changeset from params.

Functions

changeset(struct \\ %__MODULE__{}, params)

Creates a changeset for validating and casting params.

field_description(field)

Returns the description for a field, if available.

new(params \\ %{})

Creates a new changeset from params.