Money filters
Filters that compare a field to a monetary value or range.
MoneyComparisonFilter
Section titled “MoneyComparisonFilter”Filters by comparing a field to a monetary value.
| Property | Type | Required | Description |
|---|---|---|---|
operator | ComparisonOperators | Yes | The operator to apply to the filter value. |
value | Money | Yes | The value to use for the filter operation. |
{ "operator": "gt", "value": { "amount": "1000", "currency": "USD" }}$schema: https://json-schema.org/draft/2020-12/schema$id: MoneyComparisonFilter.yamltype: objectproperties: operator: $ref: ComparisonOperators.yaml description: The operator to apply to the filter value. value: $ref: Money.yaml examples: - amount: "1000" currency: USD description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to a monetary value./** Filters by comparing a field to a monetary value. */@Versioning.added(Versions.v0_1)model MoneyComparisonFilter { /** The operator to apply to the filter value. */ operator: ComparisonOperators;
/** The value to use for the filter operation. */ @example(#{ amount: "1000", currency: "USD" }) value: Fields.Money;}MoneyRangeFilter
Section titled “MoneyRangeFilter”Filters by comparing a field to a range of monetary values.
| Property | Type | Required | Description |
|---|---|---|---|
operator | RangeOperators | Yes | The operator to apply to the filter value. |
value | object | Yes | The value to use for the filter operation. |
{ "operator": "between", "value": { "min": { "amount": "1000", "currency": "USD" }, "max": { "amount": "10000", "currency": "USD" } }}$schema: https://json-schema.org/draft/2020-12/schema$id: MoneyRangeFilter.yamltype: objectproperties: operator: $ref: RangeOperators.yaml description: The operator to apply to the filter value. value: type: object properties: min: $ref: Money.yaml max: $ref: Money.yaml required: - min - max examples: - min: amount: "1000" currency: USD max: amount: "10000" currency: USD description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to a range of monetary values./** Filters by comparing a field to a range of monetary values. */@Versioning.added(Versions.v0_1)model MoneyRangeFilter { /** The operator to apply to the filter value. */ operator: RangeOperators;
/** The value to use for the filter operation. */ @example(#{ min: #{ amount: "1000", currency: "USD" }, max: #{ amount: "10000", currency: "USD" }, }) value: { min: Fields.Money; max: Fields.Money; };}