Протокол AV5 для интеграции систем продажи электронных билетов перевозчиков и системы GDS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

401 lines
16 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:simpleType name="IDType">
<xs:restriction base="xs:string">
<xs:maxLength value="36"/>
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NameType">
<xs:restriction base="xs:string">
<xs:maxLength value="100"/>
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="OkatoType">
<xs:restriction base="xs:string">
<xs:length value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="InnType">
<xs:restriction base="xs:string">
<xs:maxLength value="20"/>
<xs:minLength value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="SimpleStringType">
<xs:restriction base="xs:string">
<xs:maxLength value="100"/>
<xs:minLength value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="AbstractResponse">
<xs:sequence>
<xs:element name="Error" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="code" type="xs:string" minOccurs="1"/>
<xs:element name="message" type="xs:string" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="UidType">
<xs:restriction base="xs:string">
<xs:length value="36"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="RouteKey">
<xs:sequence>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="dispatchTime" type="xs:time"/>
<xs:element name="carrierCode" type="InnType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Agent">
<xs:sequence>
<xs:element name="name" type="NameType" minOccurs="0"/>
<xs:element name="inn" type="InnType" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Seat">
<xs:sequence>
<xs:element name="id" type="IDType" minOccurs="1"/>
<xs:element name="num" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="GenderType">
<xs:restriction base="xs:string">
<xs:enumeration value="MALE"/>
<xs:enumeration value="FEMALE"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ErrorCode">
<xs:restriction base="xs:string">
<xs:enumeration value="INTERNAL"/>
<xs:enumeration value="NOT_FOUND"/>
<xs:enumeration value="SEAT_OCCUPIED"/>
<xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="SetStationInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="stationId" type="IDType" minOccurs="1"/>
<xs:element name="uid" type="UidType" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SetStationInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="TransitSeat">
<xs:sequence>
<xs:element name="seatId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:element name="TransitBookRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="seatId" type="IDType" maxOccurs="unbounded" minOccurs="1"/>
<xs:element name="Agent" type="Agent" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TransitBookResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="TransitTicket" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:simpleType name="RelationType">
<xs:restriction base="xs:string">
<xs:enumeration value="OWN"/>
<xs:enumeration value="AGENT"/>
<xs:enumeration value="ATP"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="TransitConfirmRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Ticket" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Passenger" type="Passenger" minOccurs="0"/>
<xs:element name="ticketSeries" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="price" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
<xs:element name="relation" type="RelationType" minOccurs="0" maxOccurs="1"/>
<xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TransitConfirmResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="TransitCancelRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TransitCancelResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="CarrierType">
<xs:sequence>
<xs:element name="name" type="SimpleStringType" minOccurs="0"/>
<xs:element name="inn" type="InnType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Passenger">
<xs:sequence>
<xs:element name="firstName" type="xs:string" minOccurs="1"/>
<xs:element name="lastName" type="xs:string" minOccurs="1"/>
<xs:element name="middleName" type="xs:string" minOccurs="0"/>
<xs:element name="docNum" type="xs:string" minOccurs="0"/>
<xs:element name="docSeries" type="xs:string" minOccurs="0"/>
<xs:element name="docTypeId" type="IDType" minOccurs="1"/>
<xs:element name="birthday" type="xs:date" minOccurs="0"/>
<xs:element name="citizenshipISO2" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="gender" type="GenderType" minOccurs="0"/>
<xs:element name="phone" type="xs:string" minOccurs="0"/>
<xs:element name="info" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:element name="GetFreeSeatsRequest">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="GetFreeSeatsResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:choice>
<xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="TransitTripInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
<xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="TransitTicket">
<xs:sequence>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="dispatchStationName" type="SimpleStringType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="arrivalStationName" type="SimpleStringType"/>
<xs:element name="Passenger" type="Passenger"/>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
<xs:element name="Agent" type="Agent"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:element name="TransitTripInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded" minOccurs="0"/>
<xs:element name="offlineSaleSeats" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(\d\,?)+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="maxSeats" type="xs:int"/>
<xs:element name="freeSeats" type="xs:int"/>
<xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="TransitRouteInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="RouteItem">
<xs:sequence>
<xs:element name="order" type="xs:int"/>
<xs:element name="stationName" type="SimpleStringType"/>
<xs:element name="stationUid" type="UidType"/>
<xs:element name="distance" type="xs:integer"/>
<xs:element name="arrivalTime" type="xs:time"/>
<xs:element name="dispatchTime" type="xs:time"/>
</xs:sequence>
</xs:complexType>
<xs:element name="TransitRouteInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="SimpleStringType"/>
<xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="TransitUpdateTicketRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="Ticket" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TransitUpdateTicketResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>