<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:is-ext-account="urn:is.isnic:xml:ns:is-ext-account-1.0"
        xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
        targetNamespace="urn:is.isnic:xml:ns:is-ext-account-1.0"
        elementFormDefault="qualified">

    <annotation><documentation>.is account extension</documentation></annotation>


    <import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>

    <element name="info" type="is-ext-account:infoType"/>

    <!--
    Child elements of the <info> and <transfer> commands.
    -->
    <complexType name="infoType">
    </complexType>

    <element name="infData" type="is-ext-account:infDataType"/>

    <complexType name="infDataType">
        <sequence>
            <element name="account" type="is-ext-account:account"
                     minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

    <complexType name="allowedContactHandlesType">
        <sequence>
            <element name="contact" type="eppcom:clIDType"
                     maxOccurs="unbounded"/>
        </sequence>
    </complexType>

    <simpleType name="monthType">
        <restriction base="unsignedShort">
            <minInclusive value="1"/>
            <maxInclusive value="12"/>
        </restriction>
    </simpleType>

    <simpleType name="brandType">
        <restriction base="string">
            <enumeration value="ISNICPP"/>
            <enumeration value="VISA"/>
            <enumeration value="MASTERCARD"/>
            <enumeration value="JCB"/>
            <enumeration value="TOKENIZED_CARD"/>
        </restriction>
    </simpleType>

    <simpleType name="currencyType">
        <restriction base="string">
            <enumeration value="ISK"/>
            <enumeration value="EUR"/>
        </restriction>
    </simpleType>

    <simpleType name="balanceType">
        <restriction base="decimal">
            <fractionDigits value="2"/>
        </restriction>
    </simpleType>

    <complexType name="account">
        <annotation><documentation>
            Represents an account with ISNIC.
        </documentation></annotation>
        <sequence>
            <element name="id" type="unsignedInt"/>
            <element name="contactHandle" type="eppcom:clIDType"/>
            <element name="allowedContactHandles" type="is-ext-account:allowedContactHandlesType"/>
            <element name="number" type="string" minOccurs="0" maxOccurs="1"/>
            <element name="owner" type="string"/>
            <element name="expireYear" type="unsignedShort"/>
            <element name="expireMonth" type="is-ext-account:monthType"/>
            <element name="brand" type="is-ext-account:brandType" minOccurs="0" maxOccurs="1"/>
            <element name="currency" type="is-ext-account:currencyType" minOccurs="0" maxOccurs="1"/>
            <element name="balance" type="is-ext-account:balanceType"/>
            <element name="backupAccountID" type="unsignedInt"/>
        </sequence>
    </complexType>
</schema>