Skip to content

Latest commit

 

History

History
110 lines (64 loc) · 2.31 KB

currency.schema.md

File metadata and controls

110 lines (64 loc) · 2.31 KB

Currency Schema

https://ns.adobe.com/xdm/datatypes/currency

This datatype is used where ever you want to store any kind of amount in combination of currency code.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated Yes Stable No Forbidden Permitted datatypes/currency.schema.json

Currency Example

{
  "xdm:amount": -200757575,
  "xdm:currencyCode": "USD",
  "xdm:conversionDate": "2018-01-12T15:52:25+00:00"
}

Currency Properties

Property Type Required Defined by
xdm:amount number Optional Currency (this schema)
xdm:conversionDate string Optional Currency (this schema)
xdm:currencyCode string Optional Currency (this schema)
* any Additional this schema allows additional properties

xdm:amount

Amount

Amount represented by the currencyCode

xdm:amount

  • is optional
  • type: number
  • defined in this schema

xdm:amount Type

number

xdm:conversionDate

Conversion Date

Date when currency conversion was made.

xdm:conversionDate

  • is optional
  • type: string
  • defined in this schema

xdm:conversionDate Type

string

xdm:currencyCode

Currency Code

The ISO 4217 currency code.

xdm:currencyCode

  • is optional
  • type: string
  • defined in this schema

xdm:currencyCode Type

string

All instances must conform to this regular expression

^[A-Z]{3}$
  • test example: USD
  • test example: EUR

xdm:currencyCode Examples

"USD"
"EUR"