<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cns="http://www.iata.org/IATA/2015/00/2022.1/IATA_PaymentClearanceCommonTypes" elementFormDefault="qualified" targetNamespace="http://www.iata.org/IATA/2015/00/2022.1/IATA_PaymentClearanceCommonTypes" version="1.0">
  <xs:simpleType name="ClearanceID_Type">
    <xs:annotation>
      <xs:documentation>Clearance identifier is a character string managed by a carrier.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:pattern value="([0-9]{7}[A-Za-z0-9]{8})"/>
      <xs:length value="15"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CodeType">
    <xs:annotation>
      <xs:documentation>A code is a character string of letters, numbers, special characters (except escape sequences), and symbols.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DateTimeType">
    <xs:annotation>
      <xs:documentation>A date time identifies a date and time of day to various common resolutions: year, month, week, day, hour, minute, second, and fraction of second.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:dateTime"/>
  </xs:simpleType>
  <xs:complexType name="IATA_PayloadStandardAttributesType">
    <xs:annotation>
      <xs:documentation>The IATA_PayloadStdAttributes defines the standard attributes that appear on the root element for all IATA payloads.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="1" minOccurs="0" name="AltLangID" type="cns:ID_Type">
        <xs:annotation>
          <xs:documentation>Identifies the alternate language for a customer or message. The human language is identified by ISO 639 codes.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="CorrelationID" type="cns:ID_Type">
        <xs:annotation>
          <xs:documentation>Allow end-to-end correlation of log messages with the corresponding Web service message throughout the processing of the Web service message.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="EchoTokenText" type="cns:TextType">
        <xs:annotation>
          <xs:documentation>A reference for additional message identification, assigned by the requesting host system. When a request message includes an echo token the corresponding response message MUST include an echo token with an identical value.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="PrimaryLangID" type="cns:ID_Type">
        <xs:annotation>
          <xs:documentation>Identifies the primary language preference for the message. The human language is identified by ISO 639 codes.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="RetransmissionInd" type="cns:IndType">
        <xs:annotation>
          <xs:documentation>When true, indicates the message is being re-sent after a failure. It is recommended that this attribute is used (i.e., set to true) only when a message is retransmitted.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="SeqNumber" type="cns:NumberType">
        <xs:annotation>
          <xs:documentation>Used to identify the sequence number of the transaction as assigned by the sending system; allows for an application to process messages in a certain order or to request a resynchronization of messages in the event that a system has been off-line and needs to retrieve messages that were missed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="Timestamp" type="cns:DateTimeType">
        <xs:annotation>
          <xs:documentation>Indicates the creation date and time of the message in UTC.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="TrxID" type="cns:ID_Type">
        <xs:annotation>
          <xs:documentation>A unique identifier to relate all messages within a transaction (e.g. this would be sent in all request and response messages that are part of an on-going transaction).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="TrxStatusCode" type="cns:CodeType">
        <xs:annotation>
          <xs:documentation>This indicates where this message falls within a sequence of messages.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="VersionNumber" type="cns:NumberType">
        <xs:annotation>
          <xs:documentation>For all IATA versioned messages, the version of the message is indicated by a decimal value.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="ID_Type">
    <xs:annotation>
      <xs:documentation>An identifier is a character string used to uniquely identify one instance of an object within an identification scheme that is managed by an agency.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:maxLength value="35"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="IndType">
    <xs:annotation>
      <xs:documentation>An indicator is a list of two mutually exclusive Boolean values that express the only possible states of a property.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:boolean"/>
  </xs:simpleType>
  <xs:simpleType name="NumberType">
    <xs:annotation>
      <xs:documentation>A mathematical number that is assigned or is determined by calculation.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal"/>
  </xs:simpleType>
  <xs:simpleType name="TextType">
    <xs:annotation>
      <xs:documentation>Text is a character string such as a finite set of characters generally in the form of words of a language.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
</xs:schema>