poc-reports/es_elt/xsd/auditData/daq/TransactionExtendedData.xsd
2026-01-27 14:48:39 +01:00

175 lines
8.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) Revenue Collection Systems France S.A.S. - 2018-2025 ALL RIGHTS RESERVED
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:head="http://www.thales.dc/Headers"
xmlns="http://www.thales.dc/TransactionExtendedData"
targetNamespace="http://www.thales.dc/TransactionExtendedData"
version="2.0.0">
<!-- Import of xsd file -->
<xs:import namespace="http://www.thales.dc/Headers" schemaLocation="../../common/Headers.xsd"/>
<!-- Annotate all modification of the xsd file according to version -->
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>Version List</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>04/11/2021 - Version 1.0.0</xs:documentation>
<xs:documentation>
1st part: Add the AuditMessages, AuditMessage, Headers and Payload element for the XML validation
2nd part: Add version to xsd schema
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>03/08/2023 - Version 1.1.0</xs:documentation>
<xs:documentation>
Replace EmvTagType enum value OUT_OF_SCOPE by the value OTHER
Note that UNDEFINED is kept for compatibility purpose and should not be used anymore at this point
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>04/03/2022 - Version 2.0.0</xs:documentation>
<xs:documentation>
Audit is now used by bo messages. This change leads to one breaking change :
- TransactionId property is now mandatory and should be set by the bo in all cases
Other changes:
- BoTransactionUID added
- DeviceId is no more mandatory because some BoMessages are not sent by device
</xs:documentation>
</xs:annotation>
<!-- Description of the AuditMessages structure -->
<xs:element name="AuditMessages" type="AuditMessagesType"/>
<xs:complexType name="AuditMessagesType">
<xs:sequence>
<!-- List of AuditMessage -->
<xs:element name="AuditMessage" type="AuditMessageType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<!-- version of AuditMessages structure -->
<xs:attribute name="TransactionExtendedDataXsdVersion" type="xs:string" fixed="1.0"/>
</xs:complexType>
<!-- Description of the AuditMessage structure -->
<xs:complexType name="AuditMessageType">
<xs:sequence>
<!-- Headers structure -->
<xs:element name="Headers" type="head:HeadersType" minOccurs="0"/>
<!-- Payload is a TransactionExtendedDataAuditExchange structure -->
<xs:element name="Payload" type="TransactionExtendedDataAuditExchange"/>
</xs:sequence>
</xs:complexType>
<!-- Description of the TransactionExtendedDataAuditExchange structure -->
<xs:annotation>
<xs:documentation>daq_transaction_extended_data: At media creation</xs:documentation>
</xs:annotation>
<xs:complexType name="TransactionExtendedDataAuditExchange">
<xs:all>
<xs:element name="MediaSerialNumber" type="xs:string" minOccurs="0"/>
<xs:element name="IssuerCountryCode" type="xs:int" minOccurs="0">
<xs:annotation>
<xs:documentation>Issuer Country Code in accordance with ISO 3166 (num-3)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TransactionCurrencyCode" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Transaction Currency Code (from EMV tag 5F2A) according to ISO 4217</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PaymentAccountReference" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>TODO</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IssuerName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Issuer's name</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CardSubType" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Card's sub-type</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PaymentSchemeIdentificationMnemonic" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Mnemonic according to EMV tag 50</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExpiryDate" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation>Validity end date of the travel event to be processed</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TransactionId" type="xs:string">
<xs:annotation>
<xs:documentation>
Transaction unique identifier. All duplicates transactions got the same value.
This field can be used either by device message batches or bo message batches.
It is set by DAQ after transaction hash calculation.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BoTransactionUID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
ID set on transactions by Transcity system used for hash calculation.
It allows to identify duplicate bo messages.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceTransactionUID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Unique identifier allocated to the transaction by the device (unique by deviceId)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GenerationDate" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Date and time of transaction's generation</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceTSN" type="xs:unsignedLong" minOccurs="0">
<xs:annotation>
<xs:documentation>Sequence number allocated to the transaction by the device (unique by deviceId)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceId" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Device technical identifier</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TicketingVersion" type="xs:string" minOccurs="0"/>
<xs:element name="FormFactor" type="EmvTagType" minOccurs="0">
<xs:annotation>
<xs:documentation>Type of media used</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:simpleType name="EmvTagType">
<xs:restriction base="xs:string">
<xs:enumeration value="PLASTIC_CARD"/>
<xs:enumeration value="MOBILE"/>
<xs:enumeration value="WEARABLE"/>
<xs:enumeration value="UNREFERENCED"/>
<xs:enumeration value="OTHER"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>