| 1 |
from .._models import BaseModel |
| 2 |
from .beta_currency import BetaCurrency |
| 3 |
|
| 4 |
__all__ = ["BetaMonetaryAmount"] |
| 5 |
|
| 6 |
|
| 7 |
class BetaMonetaryAmount(BaseModel): |
| 8 |
"""A monetary amount in a specific currency.""" |
| 9 |
|
| 10 |
amount: str |
| 11 |
""" |
| 12 |
Amount in minor units of the currency, as an integer decimal string with no |
| 13 |
leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a |
| 14 |
number so no float rounding is ever applied. |
| 15 |
""" |
| 16 |
|
| 17 |
currency: BetaCurrency |
| 18 |
"""Uppercase ISO-4217 currency code. |
| 19 |
|
| 20 |
`USD` is the only currency currently supported; the accepted set is closed and |
| 21 |
grows only when a new currency is priced. |
| 22 |
""" |