Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plating carrier support in AirCreateReservationReq #393

Open
engrashid opened this issue Apr 23, 2019 · 3 comments
Open

Add plating carrier support in AirCreateReservationReq #393

engrashid opened this issue Apr 23, 2019 · 3 comments

Comments

@engrashid
Copy link
Contributor

engrashid commented Apr 23, 2019

Missing plating carrier attributes in air:AirPriceRsp>air:AirPriceResult>air:AirPricingSolution>air:AirPricingInfo

Some flight booking needs plating carrier attributes in air price info section of air price result.
As air:AirPricingInfo from air price response gets passed to air create reservation .
It needs to be added explicitly to air:AirPricingInfo as attributes like PlatingCarrier="TK"

We need to modify air price info like below so that PlatingCarrier="TK" gets pushed.

<air:AirPricingInfo Key="nCMOso4R2BKAr12JDAAAAA==" TotalPrice="BDT49437" BasePrice="USD347.00" ApproximateTotalPrice="BDT49437" ApproximateBasePrice="BDT28958" EquivalentBasePrice="BDT28958" ApproximateTaxes="BDT20479" Taxes="BDT20479" LatestTicketingTime="2019-05-20T23:59:00.000+06:00" PricingMethod="Guaranteed" IncludesVAT="false" ETicketability="Yes" ProviderCode="1G" PlatingCarrier="TK">

Addressing this issue would be awesome.

@engrashid engrashid changed the title Missing plating carrier attributes in air:AirPriceRsp>air:AirPriceResult>air:AirPricingSolution>air:AirPricingInfo Add plating carrier support in AirCreateReservationReq May 1, 2019
@dchertousov
Copy link
Member

@engrashid isn't it fixed in #392 ?

@engrashid
Copy link
Contributor Author

@dchertousov no its not fixed in #392 .
#392 fix is for air price request.
I am talking about air create reservation request.

@creduo
Copy link
Contributor

creduo commented May 20, 2019

It'd be nicer to have separate AirPrice and CreateReservation,
however current createReservation method which just copies the air:AirPricingInfo XML strings from airPriceRsp and pass them into univ:AirCreateReservationReq>air:AirPricingSolution
so the source shouldn't be causing the issue.

const builder = new xml2js.Builder({
headless: true,
rootName: root,
});
// workaround because xml2js does not accept arrays to generate multiple "root objects"
const buildObject = {
[root]: pricingSolution[root],
};
const intResult = builder.buildObject(buildObject);
// remove root object tags at first and last line
const lines = intResult.split('\n');
lines.splice(0, 1);
lines.splice(-1, 1);
// return
resultXml[root + '_XML'] = lines.join('\n');

<air:AirPricingSolution {{#each air:AirPricingSolution}}{{@key}}="{{{this}}}" {{/each}}>
{{{air:AirPricingSolution_XML.air:AirSegment_XML}}}
{{{air:AirPricingSolution_XML.air:AirPricingInfo_XML}}}
{{{air:AirPricingSolution_XML.air:FareNote_XML}}}
{{{air:AirPricingSolution_XML.common_v47_0:HostToken_XML}}}
</air:AirPricingSolution>

If the platingCarrier is missing from AirPriceRsp, maybe you should open a ticket via MyTravelPort regarding the issue,
or please share the search criteria or XML req/rsp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants