Xml schema description

ContractBilling

  <xs:element name="ContractBilling">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="CustomerInfo" minOccurs="1" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="CustomerNo" type="Identifier15" nillable="false" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                  <xs:documentation>Unique identifier of customer, Customer number</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="CustomerInfo" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Name" type="NameAddressString72" minOccurs="1" maxOccurs="1"/>
                    <xs:element name="RegNo" type="RegNo" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Customer Social Security No</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="LegalAddressInfo" minOccurs="1" maxOccurs="1">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="LegalAddress" type="Address" minOccurs="1" maxOccurs="1"/>
                          <xs:element name="E-MailAddress" type="Email" minOccurs="0" maxOccurs="1"/>
                          <xs:element name="Cellphone" type="String15" minOccurs="0" maxOccurs="1"/>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="LegalEntity" type="LegalEntity" use="optional"/>
                </xs:complexType>
              </xs:element>
              <xs:element name="BillingAddress" type="Address" minOccurs="0" maxOccurs="1"/>
              <xs:element name="BillInfo" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ContractId" type="xs:unsignedInt" nillable="false" minOccurs="1" maxOccurs="1">
                      <xs:annotation>
                        <xs:documentation>Unique identifier of each contract in the ledger</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="ReferenceInfo" type="ReferenceInfo" minOccurs="1" maxOccurs="1"/>
                    <xs:element name="VatInfo" type="VatInfo" minOccurs="0" maxOccurs="5">
                      <xs:annotation>
                        <xs:documentation>Aggregated amount per VATRate</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Product" minOccurs="1" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="AmountInclVat" type="Amount" minOccurs="1" maxOccurs="1"/>
                          <xs:element name="ProductDescription" type="String90" nillable="false" minOccurs="1" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>Textual description of the product</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element name="BillingPeriod" type="String35" minOccurs="0" maxOccurs="1">
                            <xs:annotation>
                              <xs:documentation>Product billing period</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="Version" type="Version" use="required">
        <xs:annotation>
          <xs:documentation>Versions supported by this schema</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="CreatedDateTime" type="xs:dateTime" use="required">
        <xs:annotation>
          <xs:documentation>Date and time when the file was created</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="CompanyNo" type="CompanyNumber" use="required"/>
      <xs:attribute name="CompanyName" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>

Money

  <xs:simpleType name="Money">
    <xs:restriction base="xs:decimal">
      <xs:fractionDigits value="2"/>
      <xs:minInclusive value="-100000000"/>
      <xs:maxInclusive
           value="100000000"/>
    </xs:restriction>
  </xs:simpleType>

Amount

  <xs:complexType name="Amount">
    <xs:sequence>
      <xs:element name="AmountInclVat" type="Money" nillable="false" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
    <xs:attribute name="Currency" type="eCurrencyType" use="required"/>
  </xs:complexType>

Version

    <xs:simpleType name="Version">
    <xs:restriction base="xs:string">
      <xs:enumeration value="1.0">
        <xs:annotation>
          <xs:documentation>Original version</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>

eCurrencyType

  <xs:simpleType name="eCurrencyType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="SEK"/>
      <xs:enumeration value="NOK"/>
      <xs:enumeration value="DKK"/>
      <xs:enumeration value="EUR"/>
    </xs:restriction>
  </xs:simpleType>

Identifier15

  <xs:simpleType name="Identifier15">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
      <xs:pattern value="[a-zA-Z0-9\-]*"/>
    </xs:restriction>
  </xs:simpleType>

ISO3166

  <xs:simpleType name="ISO3166">
    <xs:restriction base="xs:string">
      <xs:minLength value="2"/>
      <xs:maxLength value="2"/>
      <xs:pattern value="[A-Z]*"/>
    </xs:restriction>
  </xs:simpleType>

CompanyNumber

  <xs:simpleType name="CompanyNumber">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
      <xs:pattern value="[0-9]*"/>
    </xs:restriction>
  </xs:simpleType>

String35

  <xs:simpleType name="String35">
    <xs:restriction base="PXString">
      <xs:maxLength
           value="35"/>
    </xs:restriction>
  </xs:simpleType>

String90

  <xs:simpleType name="String90">
    <xs:restriction base="PXString">
      <xs:minLength value="1"/>
      <xs:maxLength
           value="90"/>
    </xs:restriction>
  </xs:simpleType>

Email

  <xs:simpleType name="Email">
    <xs:restriction base="PXString">
      <xs:maxLength
           value="60"/>
      <xs:pattern value="[^@]+@[^\.]+\..+"/>
    </xs:restriction>
  </xs:simpleType>

String15

  <xs:simpleType name="String15">
    <xs:restriction base="PXString">
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

ZipCode

  <xs:simpleType name="ZipCode">
    <xs:restriction base="xs:string">
      <xs:maxLength value="9"/>
      <xs:pattern value="[A-Z0-9\-]+"/>
    </xs:restriction>
  </xs:simpleType>

String50

  <xs:simpleType name="String50">
    <xs:restriction base="PXString">
      <xs:minLength value="1"/>
      <xs:maxLength
           value="50"/>
    </xs:restriction>
  </xs:simpleType>

VatRate

  <xs:simpleType name="VatRate">
    <xs:restriction base="xs:decimal">
      <xs:enumeration value="0.00"/>
      <xs:enumeration value="6.00"/>
      <xs:enumeration value="8.00"/>
      <xs:enumeration value="12.00"/>
      <xs:enumeration value="13.00"/>
      <xs:enumeration value="14.00"/>
      <xs:enumeration
           value="22.00"/>
      <xs:enumeration
           value="23.00"/>
      <xs:enumeration
           value="24.00"/>
      <xs:enumeration
           value="25.00"/>
    </xs:restriction>
  </xs:simpleType>

String20

  <xs:simpleType name="String20">
    <xs:restriction base="PXString">
      <xs:maxLength
           value="20"/>
    </xs:restriction>
  </xs:simpleType>

NameAddressString35

  <xs:simpleType name="NameAddressString35">
    <xs:restriction base="PXNameAddressString">
      <xs:minLength value="1"/>
      <xs:maxLength
           value="35"/>
    </xs:restriction>
  </xs:simpleType>

NameAddressString36

  <xs:simpleType name="NameAddressString36">
    <xs:restriction base="PXNameAddressString">
      <xs:minLength value="1"/>
      <xs:maxLength
           value="36"/>
    </xs:restriction>
  </xs:simpleType>

NameAddressString27

  <xs:simpleType name="NameAddressString27">
    <xs:restriction base="PXNameAddressString">
      <xs:minLength value="1"/>
      <xs:maxLength
           value="27"/>
    </xs:restriction>
  </xs:simpleType>

PXString

  <xs:simpleType name="PXString">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_:!;"#<>=?\[\]@{}´ %'-0À-ÖØ-öø-ú&]*"/>
    </xs:restriction>
  </xs:simpleType>

PXNameAddressString

  <xs:simpleType name="PXNameAddressString">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_:!;"#<>=?\[\]@{}´ %'-0À-ÖØ-öø-úü&]*"/>
    </xs:restriction>
  </xs:simpleType>

String74

  <xs:simpleType name="String74">
    <xs:restriction base="xs:string">
      <xs:maxLength
           value="74"/>
    </xs:restriction>
  </xs:simpleType>

ReferenceInfo

  <xs:complexType name="ReferenceInfo">
    <xs:sequence>
      <xs:element name="ExternalBillId" type="String20" nillable="false" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

RegNo

  <xs:complexType name="RegNo">
    <xs:simpleContent>
      <xs:extension base="String15">
        <xs:attribute name="CountryCode" type="ISO3166"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

LegalEntity

  <xs:simpleType name="LegalEntity">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Private"/>
    </xs:restriction>
  </xs:simpleType>

VatInfo

  <xs:complexType name="VatInfo">
    <xs:sequence>
      <xs:element name="Amount" type="Amount" minOccurs="1" maxOccurs="1"/>
      <xs:element name="VatAmount" type="Money" minOccurs="1" maxOccurs="1"/>
      <xs:element name="VatRate" type="VatRate" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

NameAddressString72

  <xs:simpleType name="NameAddressString72">
    <xs:restriction base="PXNameAddressString">
      <xs:minLength value="1"/>
      <xs:maxLength
           value="72"/>
    </xs:restriction>
  </xs:simpleType>

Address

  <xs:complexType name="Address">
    <xs:sequence>
      <xs:element name="Addressee" type="NameAddressString72" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Full name of addressee</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StreetAddress" type="NameAddressString35" nillable="false" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Street address</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ZipCode" type="ZipCode" nillable="false" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Zipcode conforming to country standard</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="City" type="NameAddressString27" nillable="false" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>City</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CoAddress" type="NameAddressString35" nillable="false" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Care of address</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CountryCode" type="ISO3166" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Country code according to ISO 3166</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

 

Created by David Persson on 2020/06/25 22:52