Skip to content

Commit

Permalink
Enhancement=fare-debit Internal restructuring to enable reuse of paym…
Browse files Browse the repository at this point in the history
…ent (#620)

* enhacnement - introduce separate FARE DEBIT package

Payment details are modularised onto a separate FARE DEBIT element as per TM . This is a "hygiene" prereq for making further transactions and validation additiosn to enable thr ENTUR customer account CR  . Shoudl not functionally

* enhancement-Faredebit updated files

* Lint and update documentation tables

* Update Netex_era_distance_ro.xml

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_version.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_customerPurchasePackage_version.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_support.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_support.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_support.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_support.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_version.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_version.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* Update xsd/netex_part_3/part3_salesTransactions/netex_salesContract_version.xsd

Co-authored-by: Stefan de Konink <[email protected]>

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthias Günter <[email protected]>
Co-authored-by: Christophe Duquesne <[email protected]>
Co-authored-by: Stefan de Konink <[email protected]>
  • Loading branch information
5 people authored Jul 25, 2024
1 parent f2a8c7f commit 05531c3
Show file tree
Hide file tree
Showing 8 changed files with 626 additions and 47 deletions.
2 changes: 2 additions & 0 deletions NeTEx.spp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_customerPaymentMeans_version.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_customerPurchasePackage_support.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_customerPurchasePackage_version.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_fareDebit_support.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_fareDebit_version.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_mediumApplication_support.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_mediumApplication_version.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_3\part3_salesTransactions\netex_retailConsortium_support.xsd" HomeFolder="Yes"/>
Expand Down
1 change: 1 addition & 0 deletions examples/functions/fares/rail/Netex_era_distance_ro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7822,6 +7822,7 @@ c
<SalesTransaction version="any" id="tfc_t:ANONYMOUS@trans12345001">
<Description>Single Ticket - Bucharest North to Buzau, first class, adult, bought at ticket machine, issued as paper ticket </Description>
<Date>2018-07-08T01:07:00</Date>
<IsValid>true</IsValid>
<TypeOfFareContractEntryRef ref="eura:product_purchase"/>
<Amount>36.30</Amount>
<PriceUnitRef ref="eura:Kilometres"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:core="http://www.govtalk.gov.uk/core" xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2.2" id="netex_customerPaymentMeans_support">
<xsd:include schemaLocation="../../netex_framework/netex_reusableComponents/netex_securityList_support.xsd"/>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:core="http://www.govtalk.gov.uk/core" xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" id="netex_customerPaymentMeans_support">
<xsd:include schemaLocation="../../netex_framework/netex_responsibility/netex_relationship.xsd"/>
<!-- ======================================================================= -->
<xsd:annotation>
<xsd:appinfo>
Expand All @@ -13,8 +13,7 @@
<Creator>First drafted for NeTEx version 1.0 CEN TC278 WG3 SG9 Editor Nicholas Knowles. mailto:[email protected]</Creator>
<Date><Created>2020-10-07</Created>Add for New Modes
</Date>
<Date>
<Modified>2020-10-07</Modified>
<Date><Modified>2023-12-157</Modified>Narrow the dependencies
</Date>
<Description>
<p>NeTEx is a European CEN standard for the exchange of Public Transport data including timetables.</p>
Expand All @@ -32,7 +31,7 @@
<Requires>http://www.netex.org.uk/schemas/1.0/PATH/netex_prereqfile.xsd</Requires>
</Relation>
<Rights>Unclassified
<Copyright>CEN, Crown Copyright 2019-2020</Copyright>
<Copyright>CEN, Crown Copyright 2019-2023</Copyright>
</Rights>
<Source>
<ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" xmlns:siri="http://www.siri.org.uk/siri" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2.2" id="netex_customerPurchasePackage_version">
<xsd:schema xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" xmlns:siri="http://www.siri.org.uk/siri" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" id="netex_customerPurchasePackage_version">
<!-- ======================================================================= -->
<xsd:include schemaLocation="../part3_fares/netex_geographicStructureFactor_support.xsd"/>
<xsd:include schemaLocation="../part3_PiQuery/netex_piRequest_support.xsd"/>
Expand All @@ -15,6 +15,7 @@
<xsd:include schemaLocation="../../netex_part_5/part5_fm/netex_nm_individualTraveller_support.xsd"/>
<xsd:include schemaLocation="../../netex_part_5/part5_fm/netex_nm_accessCredentialsAssignment_version.xsd"/>
<xsd:include schemaLocation="../part3_fares/netex_trip_support.xsd"/>
<xsd:include schemaLocation="netex_fareDebit_version.xsd"/>
<!-- ======================================================================= -->
<xsd:annotation>
<xsd:appinfo>
Expand All @@ -33,7 +34,7 @@
</Date>
<Date><Modified>2019-03-01</Modified>Fix: Correct case on customerPurchasePackageRefs
</Date>
<Date><Modified>2019-03-15</Modified>EURA-(nk) Allow marking of use of CustomerPurchasePackage
<Date><Modified>2019-03-15</Modified>EURA-(nk) Allow marking of use of CustomerPurchasePackage
Also Fix Numerous issues and align with TM
Add new attribute Status to CustomerPurchasePackage with values reserved, ordered, paidFor, unused, activated, partiallyUsed, blocked, used, archived and other
Add new attribute MarkedAs to CustomerPurchasePackageElement with values unused, activated, marked and used
Expand All @@ -51,6 +52,10 @@
</Date>
<Date><Modified>2021-05-14</Modified>NewModes - Add TravellerInfo and DRiverPoolInfo to CUSTOMER PUCRHASE PACHAGE ASSIGNMENT
</Date>
<Date><Modified>2023-12-15</Modified> Customer Purchase Package to hold Package History
</Date>
<Date><Modified>2023-12-18</Modified>Factor out Paymount amount to FARE DEBIT PACKAGE
</Date>
<Description>
<p>NeTEx is a European CEN standard for the exchange of Public Transport data including timetables.</p>
<p>This sub-schema describes the CUSTOMER PURCHASE PACKAGE types.</p>
Expand All @@ -67,7 +72,7 @@
<Requires>http://www.netex.org.uk/schemas/1.0/PATH/netex_prereqfile.xsd</Requires>
</Relation>
<Rights>Unclassified
<Copyright>CEN, Crown Copyright 2009-2020</Copyright>
<Copyright>CEN, Crown Copyright 2009-2023</Copyright>
</Rights>
<Source>
<ul>
Expand All @@ -76,7 +81,7 @@
</Source>
<Status>Version 1.0</Status>
<Subject>
<Category>Arts, recreation and travel, Tourism, Travel (tourism), Transport,
<Category>Arts, recreation and travel, Tourism, Travel (tourism), Transport,
Air transport, Airports,
Ports and maritime transport, Ferries (marine),
Public transport, Bus services, Coach services, Bus stops and stations,
Expand Down Expand Up @@ -129,24 +134,6 @@ Rail transport, Roads and Road transport
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:group name="PaymentAmountGroup">
<xsd:annotation>
<xsd:documentation>Amount Elements for a FARE PRICE.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="FarePriceAmountWithDerivationGroup">
<xsd:annotation>
<xsd:documentation>Amount Elements Step Calculation</xsd:documentation>
</xsd:annotation>
</xsd:group>
<xsd:element name="PaymentMethod" type="PaymentMethodEnumeration" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Method of payment used,</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="TypeOfPaymentMethodRef" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="travelDocuments_RelStructure">
<xsd:annotation>
<xsd:documentation>Type for containment in frame of TRAVEL DOCUMENT.</xsd:documentation>
Expand Down Expand Up @@ -576,6 +563,7 @@ Rail transport, Roads and Road transport
</xsd:element>
<xsd:element ref="MediumAccessDeviceRef" minOccurs="0"/>
<xsd:element ref="MediumApplicationInstanceRef" minOccurs="0"/>
<xsd:group ref="CustomerPurchasePackageHistoryGroup"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="CustomerPurchasePackageCustomerGroup">
Expand Down Expand Up @@ -650,6 +638,18 @@ Rail transport, Roads and Road transport
</xsd:element>
</xsd:sequence>
</xsd:group>
<xsd:group name="CustomerPurchasePackageHistoryGroup">
<xsd:annotation>
<xsd:documentation>FARE CONTRACT entries CUSTOMER PURCHASE PACKAGE.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="customerPurchasePackageEntries" type="fareContractEntries_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>FARE CONTRACT ENTRIES relating to CUSTOMER PURCHASE PACKAGE. May be references to ENTRIEs held, or entry instances inlined here for convenience so that , they may exchanged along with package. This can include any type of entry: note that TRAVEL SPECIFICATIONs and SALES TRANSACTIONS may be referenced separately by a given PACKAGE. +v2.0</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<!-- ====CUSTOMER PURCHASE PACKAGE ELEMENT================================================= -->
<xsd:complexType name="customerPurchasePackageElements_RelStructure">
<xsd:annotation>
Expand Down
229 changes: 229 additions & 0 deletions xsd/netex_part_3/part3_salesTransactions/netex_fareDebit_support.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" xmlns:siri="http://www.siri.org.uk/siri" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" id="netex_fareDebit_support">
<xsd:include schemaLocation="../../netex_framework/netex_genericFramework/netex_loggable_support.xsd"/>
<!-- =============================================================== -->
<xsd:annotation>
<xsd:appinfo>
<Metadata xmlns="http://www.govtalk.gov.uk/CM/gms-xs">
<Aggregation>main schema</Aggregation>
<Audience>e-service developers</Audience>
<Contributor>V1.0 Christophe Duquesne</Contributor>
<Contributor>Nicholas Knowles</Contributor>
<Coverage>Europe</Coverage>
<Creator>First drafted for NeTEx version 1.0 CEN TC278 WG3 SG9 Editor Nicholas Knowles. mailto:[email protected]</Creator>
<Date>
<Created>2023-12-18</Created>
</Date>
<Date>
<Modified>2023-12-18</Modified>
</Date>
<Description>
<p>NeTEx is a European CEN standard for the exchange of Public Transport data including timetables.</p>
<p>This sub-schema describes the FARE DEBIT types.</p>
</Description>
<Format>
<MediaType>text/xml</MediaType>
<Syntax>http://www.w3.org/2001/XMLSchema</Syntax>
<Description>XML schema, W3C Recommendation 2001</Description>
</Format>
<Identifier>{http://www.netex.org.uk/schemas/1.0/xsd/netex_part_3/part3_FareDebits}netex_FareDebit_support.xsd</Identifier>
<Language>[ISO 639-2/B] ENG</Language>
<Publisher>Kizoom, 109-123 Clifton Street, London EC4A 4LD </Publisher>
<Relation>
<Requires>http://www.netex.org.uk/schemas/1.0/PATH/netex_prereqfile.xsd</Requires>
</Relation>
<Rights>Unclassified
<Copyright>CEN, Crown Copyright 2009-2023</Copyright>
</Rights>
<Source>
<ul>
<li>Derived from the Transmodel, standards.</li>
</ul>
</Source>
<Status>Version 1.0</Status>
<Subject>
<Category>Arts, recreation and travel, Tourism, Travel (tourism), Transport,
Air transport, Airports,
Ports and maritime transport, Ferries (marine),
Public transport, Bus services, Coach services, Bus stops and stations,
Rail transport, Railway stations and track, Train services, Underground trains,
Business and industry, Transport, Air transport , Ports and maritime transport, Public transport,
Rail transport, Roads and Road transport
</Category>
<Project>CEN TC278 WG3 SG9.</Project>
</Subject>
<Title>NeTEx FARE DEBIT identifier types.</Title>
<Type>Standard</Type>
</Metadata>
</xsd:appinfo>
<xsd:documentation>NeTEx: FARE DEBIT identifier types.</xsd:documentation>
</xsd:annotation>
<!-- ==== FARE DEBIT ======================================================== -->
<xsd:complexType name="fareDebitRefs_RelStructure">
<xsd:annotation>
<xsd:documentation>Type for a collection of one or more references to a FARE DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="oneToManyRelationshipStructure">
<xsd:sequence>
<xsd:element ref="FareDebitRef" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:simpleType name="FareDebitIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of a FARE DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="LogEntryIdType"/>
</xsd:simpleType>
<xsd:element name="FareDebitRef" type="FareDebitRefStructure" abstract="false" substitutionGroup="LogEntryRef">
<xsd:annotation>
<xsd:documentation>Reference to a FARE DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="FareDebitRefStructure">
<xsd:annotation>
<xsd:documentation>Type for Reference to a FARE DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="LogEntryRefStructure">
<xsd:attribute name="ref" type="FareDebitIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of a FARE DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- ==== OTHER DEBIT ======================================================== -->
<xsd:simpleType name="OtherDebitIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of an OTHER DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="FareDebitIdType"/>
</xsd:simpleType>
<xsd:element name="OtherDebitRef" type="OtherDebitRefStructure" abstract="false" substitutionGroup="FareDebitRef">
<xsd:annotation>
<xsd:documentation>Reference to an OTHER DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="OtherDebitRefStructure">
<xsd:annotation>
<xsd:documentation>Type for Reference to an OTHER DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="FareDebitRefStructure">
<xsd:attribute name="ref" type="OtherDebitIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of an OTHER DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- ==== BOOKING DEBIT ======================================================== -->
<xsd:simpleType name="BookingDebitIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of a BOOKING DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="FareDebitIdType"/>
</xsd:simpleType>
<xsd:element name="BookingDebitRef" type="BookingDebitRefStructure" abstract="false" substitutionGroup="FareDebitRef">
<xsd:annotation>
<xsd:documentation>Reference to a BOOKING DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="BookingDebitRefStructure">
<xsd:annotation>
<xsd:documentation>Type for Reference to a BOOKING DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="FareDebitRefStructure">
<xsd:attribute name="ref" type="BookingDebitIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of a BOOKING DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- ==== TRIP DEBIT ======================================================== -->
<xsd:simpleType name="TripDebitIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of a TRIP DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="FareDebitIdType"/>
</xsd:simpleType>
<xsd:element name="TripDebitRef" type="TripDebitRefStructure" abstract="false" substitutionGroup="FareDebitRef">
<xsd:annotation>
<xsd:documentation>Reference to a TRIP DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="TripDebitRefStructure">
<xsd:annotation>
<xsd:documentation>Type for Reference to a TRIP DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="FareDebitRefStructure">
<xsd:attribute name="ref" type="TripDebitIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of a TRIP DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- ==== FARE PRODUCT SALES DEBIT ======================================================== -->
<xsd:simpleType name="FareProductSaleDebitIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of a FARE PRODUCT SALES DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="FareDebitIdType"/>
</xsd:simpleType>
<xsd:element name="FareProductSaleDebitRef" type="FareProductSaleDebitRefStructure" abstract="false" substitutionGroup="FareDebitRef">
<xsd:annotation>
<xsd:documentation>Reference to a FARE PRODUCT SALES DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="FareProductSaleDebitRefStructure">
<xsd:annotation>
<xsd:documentation>Type for Reference to a FARE PRODUCT SALES DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="FareDebitRefStructure">
<xsd:attribute name="ref" type="FareProductSaleDebitIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of a FARE PRODUCT SALES DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- ==== OFFENCE DEBIT ======================================================== -->
<xsd:simpleType name="OffenceDebitIdType">
<xsd:annotation>
<xsd:documentation>Type for identifier of a OFFENCE DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="FareDebitIdType"/>
</xsd:simpleType>
<xsd:element name="OffenceDebitRef" type="OffenceDebitRefStructure" abstract="false" substitutionGroup="FareDebitRef">
<xsd:annotation>
<xsd:documentation>Reference to a OFFENCE DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="OffenceDebitRefStructure">
<xsd:annotation>
<xsd:documentation>Type for Reference to a OFFENCE DEBIT.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="FareDebitRefStructure">
<xsd:attribute name="ref" type="OffenceDebitIdType" use="required">
<xsd:annotation>
<xsd:documentation>Identifier of a OFFENCE DEBIT.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
Loading

0 comments on commit 05531c3

Please sign in to comment.