Expand description
Billing primitives built on decimal-money.
Re-exports decimal_money::CurrencyAmount and decimal_money::Currency
and provides Price — a net/gross/tax helper that mirrors
ecom-core::Money::percentage_of and the promo/insurance math in
ecom-http (crates/ecom-http/tests/integration_test.rs).
Structs§
- Currency
Amount - A monetary amount with a currency.
- Decimal
Decimalrepresents a 128 bit representation of a fixed-precision decimal number. The finite set of values of typeDecimalare of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.- Price
- A net price plus a percentage tax rate (e.g. VAT 20%).
Enums§
- Currency
- Represents a supported currency.
- Money
Error - Errors that can occur in money operations.
- Price
Error - Errors for
Priceconstruction.