amadeus-ws-client
amadeus-ws-client copied to clipboard
How to add Endorsement Details
Dear All,
How to add endorsement details while creating PNR. Please suggest me how to add the endorsement details as in the sample below.
<PNR_AddMultiElements> <pnrActions> <optionCode>0</optionCode> </pnrActions> <dataElementsMaster> <marker1/> <dataElementsIndiv> <elementManagementData> <reference> <qualifier>OT</qualifier> <number>1</number> </reference> <segmentName>FE</segmentName> </elementManagementData> <fareElement> <generalIndicator>E</generalIndicator> <passengerType>PAX</passengerType> <freetextLong>NON-END VALID ON AI ONLY/NQEXMPTNPCTZN65027501008</freetextLong> </fareElement> <referenceForDataElement> <reference> <qualifier>PT</qualifier> <number>1</number> </reference> </referenceForDataElement> </dataElementsIndiv> <dataElementsIndiv> <elementManagementData> <reference> <qualifier>OT</qualifier> <number>2</number> </reference> <segmentName>FE</segmentName> </elementManagementData> <fareElement> <generalIndicator>E</generalIndicator> <passengerType>PAX</passengerType> <freetextLong>NON-END VALID ON AI ONLY/NQEXMPTNPCTZN5786</freetextLong> </fareElement> <referenceForDataElement> <reference> <qualifier>PT</qualifier> <number>2</number> </reference> </referenceForDataElement> </dataElementsIndiv> </dataElementsMaster> </PNR_AddMultiElements>
I no longer have access to the Amadeus documentation, so it won't be easy to help you.
As far as I can remember, this library doesn't support adding FE elements yet.
Basically you need to add support for creating an FE
element and all necessary options to create such an element.
- Provide the element under
/src/Amadeus/Client/RequestOptions/Pnr/Element/
analogous to how other element option classes are made. - Make sure the element gets built in
/src/Amadeus/Client/Struct/Pnr/AddMultiElements/DataElementsIndiv.php#L165
- add a unittest
And that should be all! You just need to make sure you provide all the necessary options in the RequestOptions object to be able to build the element when encoding the message.
If you create a PR, I or one of the regular contributors can help you.