forked from adobe/xdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurrency.schema.json
More file actions
63 lines (63 loc) · 2.53 KB
/
currency.schema.json
File metadata and controls
63 lines (63 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"meta:license": [
"Copyright 2020 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/datatypes/currency",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Currency",
"type": "object",
"meta:extensible": true,
"description": "This datatype is used where ever you want to store any kind of amount in combination of currency code.",
"definitions": {
"currency": {
"properties": {
"xdm:amount": {
"title": "Amount",
"description": "Amount represented by the currencyCode",
"type": "number",
"meta:titleId": "currency##xdm:amount##title##16261",
"meta:descriptionId": "currency##xdm:amount##description##25051"
},
"xdm:currencyCode": {
"title": "Currency Code",
"type": "string",
"examples": [
"USD",
"EUR"
],
"pattern": "^[A-Z]{3}$",
"description": "The ISO 4217 currency code.",
"meta:titleId": "currency##xdm:currencyCode##title##99221",
"meta:descriptionId": "currency##xdm:currencyCode##description##31611"
},
"xdm:conversionDate": {
"title": "Conversion Date",
"description": "Date when currency conversion was made.",
"type": "string",
"format": "date-time",
"meta:titleId": "currency##xdm:conversionDate##title##50641",
"meta:descriptionId": "currency##xdm:conversionDate##description##9481"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/currency"
}
],
"meta:status": "stable",
"meta:createdDate": "2020-09-29",
"meta:titleId": "currency##title##30671",
"meta:descriptionId": "currency##description##25081",
"examples": [
{
"xdm:amount": -200757575,
"xdm:currencyCode": "USD",
"xdm:conversionDate": "2018-01-12T15:52:25+00:00"
}
]
}