Skip to content

Commit

Permalink
Merge commit '1019ef72847d41d8cc640218d2530e876a34cf4c' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dchertousov committed Sep 20, 2021
2 parents 85d5253 + 1019ef7 commit c0c6d5f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uapi-json",
"version": "1.10.0",
"version": "1.10.1",
"description": "Travelport Universal API",
"main": "src/",
"files": [
Expand Down
9 changes: 8 additions & 1 deletion src/Services/Air/Air.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,14 @@ module.exports = (settings) => {
},

getEMDItem(options) {
return service.getEMDItem(options);
return service.getEMDItem(options)
.then((result) => {
if (options.pnr) {
return result;
}

return service.getEMDItem({ ...options, pnr: result.pnr });
});
},
};
};
1 change: 1 addition & 0 deletions src/Services/Air/AirParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,7 @@ function getEMDItem(obj) {
totalTax: pricingInfo.TotalTax,
},
uapi_emd_ref: emdInfo.Key,
pnr: emdInfo.ProviderLocatorCode,
};
}

Expand Down
2 changes: 1 addition & 1 deletion test/Air/AirParser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,7 @@ describe('#AirParser', () => {
const mainArrays = ['payment', 'fop', 'airlineLocatorInfo'];

expect(res).to.be.an('object');
expect(res).to.have.all.keys([...mainObjects, ...mainArrays, 'uapi_emd_ref']);
expect(res).to.have.all.keys([...mainObjects, ...mainArrays, 'uapi_emd_ref', 'pnr']);

expect(res.airlineLocatorInfo).to.be.an('array');
mainObjects.forEach((val) => {
Expand Down

0 comments on commit c0c6d5f

Please sign in to comment.