Commit b3882dc6 authored by Volker Krause's avatar Volker Krause
Browse files

Extract program membership data from IATA BCBPs

parent 892a817f
......@@ -4,6 +4,16 @@
"@type": "FlightReservation",
"airplaneSeat": "3A",
"passengerSequenceNumber": "27",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
},
"membershipNumber": "1234567890123",
"programName": "AC"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -28,9 +38,9 @@
"ticketToken": "aztecCode:M1DESMARAIS/LUC EAB12C3 YULFRAAC 0834 326J003A0027 167>5321WW1325BAC 0014123456002001412346700100141234789012A0141234567890 1AC AC 1234567890123 4PCYLX58Z^108ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
}
}
]
......@@ -4,6 +4,16 @@
"@type": "FlightReservation",
"airplaneSeat": "2F",
"passengerSequenceNumber": "25",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
},
"membershipNumber": "1234567890123456",
"programName": "AF"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -28,9 +38,9 @@
"ticketToken": "aztecCode:M1GRANDMAIRE/MELANIE EABC123 GVACDGAF 0123 339C002F0025 130>5002A0571234567890 AF AF 1234567890123456 Y^108ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
}
}
]
......@@ -4,6 +4,16 @@
"@type": "FlightReservation",
"airplaneSeat": "3A",
"passengerSequenceNumber": "27",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
},
"membershipNumber": "1234567890123",
"programName": "AC"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -28,16 +38,26 @@
"ticketToken": "aztecCode:M2DESMARAIS/LUC EAB12C3 YULFRAAC 0834 326J003A0027 167>5321WW1325BAC 0014123456002001412346700100141234789012A0141234567890 1AC AC 1234567890123 4PCYLX58ZDEF456 FRAGVALH 3664 327C012C0002 12E2A0140987654321 1AC AC 1234567890123 3PCNWQ^108ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
}
},
{
"@context": "http://schema.org",
"@type": "FlightReservation",
"passengerSequenceNumber": "2",
"airplaneSeat": "12C",
"passengerSequenceNumber": "2",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
},
"membershipNumber": "1234567890123",
"programName": "AC"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -62,9 +82,9 @@
"ticketToken": "aztecCode:M2DESMARAIS/LUC EAB12C3 YULFRAAC 0834 326J003A0027 167>5321WW1325BAC 0014123456002001412346700100141234789012A0141234567890 1AC AC 1234567890123 4PCYLX58ZDEF456 FRAGVALH 3664 327C012C0002 12E2A0140987654321 1AC AC 1234567890123 3PCNWQ^108ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
"@type": "Person",
"familyName": "DESMARAIS",
"givenName": "LUC"
}
}
]
......@@ -4,6 +4,16 @@
"@type": "FlightReservation",
"airplaneSeat": "2F",
"passengerSequenceNumber": "25",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
},
"membershipNumber": "1234567890123456",
"programName": "AF"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -28,9 +38,9 @@
"ticketToken": "aztecCode:M2GRANDMAIRE/MELANIE EABC123 GVACDGAF 0123 339C002F0025 130>5002A0571234567890 AF AF 1234567890123456 YDEF456 CDGDTWNW 0049 339F001A0002 12C2A012098765432101 2PC ^108ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
}
},
{
......@@ -62,9 +72,9 @@
"ticketToken": "aztecCode:M2GRANDMAIRE/MELANIE EABC123 GVACDGAF 0123 339C002F0025 130>5002A0571234567890 AF AF 1234567890123456 YDEF456 CDGDTWNW 0049 339F001A0002 12C2A012098765432101 2PC ^108ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE"
}
}
]
......@@ -4,6 +4,16 @@
"@type": "FlightReservation",
"airplaneSeat": "23D",
"passengerSequenceNumber": "999",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DOE",
"givenName": "JOHN"
},
"membershipNumber": "123456789012345",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......
......@@ -4,6 +4,16 @@
"@type": "FlightReservation",
"airplaneSeat": "12C",
"passengerSequenceNumber": "30",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DOE",
"givenName": "JOHN"
},
"membershipNumber": "123456789012345",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -28,9 +38,9 @@
"ticketToken": "aztecCode:M1DOE/JOHN XXX007 BRUTXLEW 8103 035Y012C0030 147>1181W 8033BEW 0000000000000291040000000000 0 LH 123456789012345 "
},
"underName": {
"@type": "Person",
"familyName": "DOE",
"givenName": "JOHN"
"@type": "Person",
"familyName": "DOE",
"givenName": "JOHN"
}
}
]
......@@ -5,6 +5,17 @@
"airplaneSeat": "13C",
"modifiedTime": "2019-08-19T19:23:28+01:00",
"passengerSequenceNumber": "42",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DRAGON",
"givenName": "KONQUI",
"name": "KONQUI DRAGON"
},
"membershipNumber": "1234567890123",
"programName": "AK"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......
......@@ -5,6 +5,17 @@
"airplaneSeat": "17C",
"modifiedTime": "2017-06-17T18:40:00+01:00",
"passengerSequenceNumber": "40",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "KRAUSE",
"givenName": "VOLKER",
"name": "VOLKER KRAUSE"
},
"membershipNumber": "123412341234012",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......
......@@ -7,6 +7,17 @@
"passengerSequenceNumber": "143",
"pkpassPassTypeIdentifier": "pass.booking.swiss.com",
"pkpassSerialNumber": "123456789",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "KRAUSE",
"givenName": "VOLKER",
"name": "VOLKER KRAUSE"
},
"membershipNumber": "123456789012345",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......
......@@ -4,6 +4,17 @@
"@type": "FlightReservation",
"airplaneSeat": "2F",
"passengerSequenceNumber": "25",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE",
"name": "MELANIE GRANDMAIRE"
},
"membershipNumber": "1234567890123456",
"programName": "AF"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -46,10 +57,10 @@
"ticketToken": "aztecCode:M2GRANDMAIRE/MELANIE EABC123 GVACDGAF 0123 339C002F0025 130>5002A0571234567890 AF AF 1234567890123456 YDEF456 CDGDTWNW 0049 339F001A0002 12C2A012098765432101 2PC ^18ABCDEFGH"
},
"underName": {
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE",
"name": "MELANIE GRANDMAIRE"
"@type": "Person",
"familyName": "GRANDMAIRE",
"givenName": "MELANIE",
"name": "MELANIE GRANDMAIRE"
}
}
]
......@@ -6,6 +6,17 @@
"passengerSequenceNumber": "14",
"pkpassPassTypeIdentifier": "pass.ncr.brussels.boarding-pass",
"pkpassSerialNumber": "123456789",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "DOE",
"givenName": "JOHNMR",
"name": "JOHNMR DOE"
},
"membershipNumber": "123456789012345",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......@@ -60,16 +71,16 @@
"flightNumber": "3667"
},
"reservationNumber": "XXX007",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"reservedTicket": {
"@type": "Ticket",
"ticketToken": "aztecCode:M1DOE/JOHNMR EXXX007 BRUTLSSN 3667 110Y014D0014 35D>5181WM8109BSN 2A08221234567890 SN LH 123456789012345 *30600000K0902 "
},
"reservationStatus": "http://schema.org/ReservationConfirmed",
"underName": {
"@type": "Person",
"name": "JOHNMR DOE",
"familyName": "DOE",
"givenName": "JOHNMR"
"givenName": "JOHNMR",
"name": "JOHNMR DOE"
}
}
]
......@@ -259,6 +259,12 @@
"@type": "FlightReservation",
"airplaneSeat": "10E",
"passengerSequenceNumber": "143",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": "[...]",
"membershipNumber": "123456789012345",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": "[...]",
......@@ -512,6 +518,16 @@
"@type": "FlightReservation",
"airplaneSeat": "10E",
"passengerSequenceNumber": "143",
"programMembershipUsed": {
"@type": "ProgramMembership",
"member": {
"@type": "Person",
"familyName": "KRAUSE",
"givenName": "VOLKER"
},
"membershipNumber": "123456789012345",
"programName": "LH"
},
"reservationFor": {
"@type": "Flight",
"airline": {
......
......@@ -82,6 +82,16 @@ QVector<QVariant> IataBcbpParser::parse(const IataBcbp &bcbp, const QDate &conte
res.setReservationNumber(rms.operatingCarrierPNRCode());
res.setUnderName(person);
res.setReservedTicket(ticket);
const auto rcs = bcbp.repeatedConditionalSection(i);
if (!rcs.frequenFlyerNumber().isEmpty()) {
ProgramMembership program;
program.setMembershipNumber(rcs.frequenFlyerNumber());
program.setProgramName(rcs.frequentFlyerAirlineDesignator());
program.setMember(person);
res.setProgramMembershipUsed(program);
}
result.push_back(std::move(res));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment