Money
مقداری پول را با نوع ارز آن نشان می دهد.
نمایندگی JSON |
---|
{
"currencyCode": string,
"units": string,
"nanos": integer
} |
فیلدها |
---|
currency Code | string کد ارز سه حرفی تعریف شده در ISO 4217. |
units | string ( int64 format) کل واحدهای مقدار. به عنوان مثال، اگر currencyCode "USD" باشد، 1 واحد یک دلار آمریکا است. |
nanos | integer تعداد نانو (10^-9) واحد مقدار. مقدار باید بین -999,999,999 و +999,999,999 باشد. اگر units مثبت باشد، nanos باید مثبت یا صفر باشد. اگر units صفر باشد، nanos می تواند مثبت، صفر یا منفی باشد. اگر units منفی باشد، nanos باید منفی یا صفر باشد. به عنوان مثال 1.75-$ به صورت units =-1 و nanos =-750,000,000 نشان داده می شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-27 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-27 بهوقت ساعت هماهنگ جهانی."],[[["JSON is used to represent monetary amounts with their currency type."],["The representation includes the currency code (ISO 4217), whole units, and nano units for precision."],["`units` and `nanos` must adhere to specific rules based on their values to ensure accurate representation."],["The `currencyCode` follows the ISO 4217 standard using a three-letter code."]]],["The core content defines a JSON structure for representing monetary amounts. It includes three fields: `currencyCode` (a string for the three-letter currency code), `units` (a string representing whole units of the currency), and `nanos` (an integer for the fractional nano-units). The `nanos` value must adhere to constraints based on the sign of `units` and is used for precision in amounts. The amount value is based on those three elements.\n"]]