<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersMessage" xmlns:cns="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes" xmlns:opt="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypesFullyOptional" elementFormDefault="qualified" targetNamespace="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersMessage" version="12.000">
  <xs:import namespace="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypes" schemaLocation="IATA_OrderHistoryRS_CommonTypes.xsd"/>
  <xs:import namespace="http://www.iata.org/IATA/2015/EASD/00/IATA_OffersAndOrdersCommonTypesFullyOptional" schemaLocation="IATA_OrderHistoryRS_OptionalCommonTypes.xsd"/>
  <xs:complexType name="ChangeGroupType">
    <xs:annotation>
      <xs:documentation>A node containing change operation group</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="1" name="ChangeOperationGroup" type="ChangeOperationGroupType">
        <xs:annotation>
          <xs:documentation>Change Operation is an Instruction on addition, replacement or deletion of elements within an Order.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChangeOperationGroupType">
    <xs:annotation>
      <xs:documentation>Change Operation Group is a logical grouping of one or more operations that leads to a new Order Version.
Should not have multiple change operations to the same element.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="1" name="ChangeOperation" type="ChangeOperationType">
        <xs:annotation>
          <xs:documentation>Change Operation is an Instruction on addition, replacement or deletion of elements within an Order.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="DistributionChain" type="cns:DistributionChainType">
        <xs:annotation>
          <xs:documentation>An organization playing a participating role in an instance of a distribution channel.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="1" name="OrderVersionNumber" type="cns:OrderVersionNumberType">
        <xs:annotation>
          <xs:documentation>Version of the Order.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChangeOperationType">
    <xs:annotation>
      <xs:documentation>Change Operation is an Instruction on addition, replacement or deletion of elements within an Order.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="1" minOccurs="1" name="ChangeDateTime" type="cns:DateTimeType">
        <xs:annotation>
          <xs:documentation>Change Operation Date and Time within an Order.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="1" name="ChangeTypeCode" type="cns:CodeType">
        <xs:annotation>
          <xs:documentation>Refer to IATA ATSB Codeset: CHT Indicates to the Seller the type of change.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="New" type="opt:ChangeDetailsType">
        <xs:annotation>
          <xs:documentation>A Structural node used in messages which contains details of the changes.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="0" name="Old" type="opt:ChangeDetailsType">
        <xs:annotation>
          <xs:documentation>A Structural node used in messages which contains details of the changes.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="1" name="ReasonCode" type="cns:CodeType">
        <xs:annotation>
          <xs:documentation>Refer to ATSB Codeset: CHR Indicating the reason for change.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="IATA_OrderHistoryRS">
    <xs:annotation>
      <xs:documentation>The OrderHistory transaction of an Order managed and tracked by the Airline in their Order Management System from the time of Order creation.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:choice maxOccurs="1" minOccurs="1">
          <xs:element maxOccurs="unbounded" minOccurs="1" name="Error" type="cns:ErrorType">
            <xs:annotation>
              <xs:documentation>Contains information related to errors detected during processing of the preceding request.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element maxOccurs="1" minOccurs="1" name="Response" type="OrderHistoryResponseType">
            <xs:annotation>
              <xs:documentation>Order History RS response information.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:choice>
        <xs:element maxOccurs="1" minOccurs="0" name="AugmentationPoint" type="cns:AugmentationPointType">
          <xs:annotation>
            <xs:documentation>Implementer-Augmented Structure.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element maxOccurs="1" minOccurs="0" name="DistributionChain" type="cns:DistributionChainType">
          <xs:annotation>
            <xs:documentation>An instance of a distribution channel. That is, the set of organizations involved in the development of the current transaction.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element maxOccurs="1" minOccurs="0" name="PayloadAttributes" type="cns:IATA_PayloadStandardAttributesType">
          <xs:annotation>
            <xs:documentation>IATA standard payload attributes</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="OrderHistoryResponseType">
    <xs:annotation>
      <xs:documentation>Information related to the response for Order History</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="ChangeGroup" type="ChangeGroupType">
        <xs:annotation>
          <xs:documentation>Order History RS response information.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="1" minOccurs="1" name="OrderRefID" type="cns:ID_Type">
        <xs:annotation>
          <xs:documentation>Carrier assigned ID which uniquely identifies a specific Order across several messages.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>