Money filters
MoneyRangeFilter
Filters by comparing a field to a range of monetary values.
Property | Type | Description |
---|---|---|
operator | RangeOperators | The operator to apply to the filter value |
value | range object | The value to use for the filter operation |
Range object:
Property | Type | Description |
---|---|---|
min | Money | The minimum monetary value for this range |
max | Money | The maximum monetary value for this range |
$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 operationrequired: - operator - valuedescription: Filters by comparing a field to a range of monetary values
/** Filters by comparing a field to a range of monetary values */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; };}
{ "operator": "within", "value": { "min": { "amount": "1000", "currency": "USD" }, "max": { "amount": "10000", "currency": "USD" } }}
MoneyComparisonFilter
Filters by comparing a field to a monetary value.
Property | Type | Description |
---|---|---|
operator | ComparisonOperators | The operator to apply to the filter value |
value | Money | The value to use for the filter operation |
$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 description: The value to use for the filter operationrequired: - operator - valuedescription: Filters by comparing a field to a monetary value
/** Filters by comparing a field to a monetary value */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;}
{ "operator": "eq", "value": { "amount": "1000", "currency": "USD" }}