forked from jayadeba/api-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
money.json
20 lines (20 loc) · 837 Bytes
/
money.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"type": "object",
"title": "Money",
"description": "The currency and amount for a financial transaction, such as a balance or payment due.",
"properties": {
"currency_code": {
"$ref": "currency_code.json"
},
"value": {
"type": "string",
"description": "The value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).",
"maxLength": 32,
"pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$"
}
},
"required": [
"currency_code",
"value"
]
}