Skip to content

Commit

Permalink
Add support for currency system.
Browse files Browse the repository at this point in the history
Fixes w3c#185.
  • Loading branch information
adrianba committed Sep 17, 2016
1 parent bf4e6e6 commit 6cf5971
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,11 @@ <h2>PaymentMethodData dictionary</h2>
<section>
<h2>PaymentCurrencyAmount</h2>
<pre class="idl">
dictionary PaymentCurrencyAmount {
required DOMString currency;
required DOMString value;
};
dictionary PaymentCurrencyAmount {
required DOMString currency;
required DOMString value;
DOMString currencySystem = "urn:iso:std:iso:4217";
};
</pre>
<p>
A <a><code>PaymentCurrencyAmount</code></a> dictionary is used to supply monetary amounts.
Expand All @@ -646,13 +647,20 @@ <h2>PaymentCurrencyAmount</h2>
The following fields are required:
</p>
<dl>
<dt><code><dfn>currency</dfn></code></dt>
<dt><code>currencySystem</code></dt>
<dd>
<code>currencySystem</code> is a URL that indicates the currency system that the
<code>currency</code> identifier belongs to. By default, the value is
<code>urn:iso:std:iso:4217</code> indicating that <code>currency</code>
is defined by [[ISO4217]] (for example, <code>USD</code> for US Dollars).
</dd>
<dt><code>currency</code></dt>
<dd>
<code>currency</code> is a string containing a currency identifier. The most common
identifiers are three-letter alphabetic codes as defined by [[ISO4217]] (for example,
<code>"USD"</code> for US Dollars) however any string is considered valid.
<code>currency</code> is a string containing a currency identifier. The
value of <code>currency</code> can be any string that is valid within
the currency system indicated by <code>currencySystem</code>.
</dd>
<dt><code><dfn>value</dfn></code></dt>
<dt><code>value</code></dt>
<dd>
A <a>valid decimal monetary value</a> containing a monetary amount. A string is a <dfn>valid
decimal monetary value</dfn> if it consists of the following components in the given order:
Expand Down

0 comments on commit 6cf5971

Please sign in to comment.