Skip to content

Commit 8617274

Browse files
authored
Merge pull request #633 from Travelport-Ukraine/schema-utils-version-fix
schema-utils-version-fix: currency and reference templates update; re…
2 parents 58b722e + 0346a35 commit 8617274

File tree

7 files changed

+25
-22
lines changed

7 files changed

+25
-22
lines changed

examples/Air/availability.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const AirService = uAPI.createAirService(
1313
const params = {
1414
legs: [
1515
{
16-
from: 'IEV',
17-
to: 'NYC',
18-
departureDate: '2018-11-10',
16+
from: 'WAW',
17+
to: 'AMS',
18+
departureDate: '2023-11-10',
1919
},
2020
],
2121
passengers: {
@@ -26,8 +26,9 @@ const params = {
2626
INS: 1, //infant with a seat
2727
*/
2828
},
29-
permittedCarriers: ['KL'],
29+
permittedCarriers: ['LO'],
3030
cabins: ['Economy'], // ['Business'],
31+
bookingCode: 'Y',
3132
requestId: '4e2fd1f8-2221-4b6c-bb6e-cf05c367cf60',
3233
// permittedConnectionPoints: ['AMS'],
3334
// preferredConnectionPoints: ['KBP'],

examples/Utils/referenceData.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
const uAPI = require('../../index');
22
const config = require('../../test/testconfig');
3-
const uuid = require('uuid');
43

5-
const UtilService = uAPI.createUtilsService( {
6-
auth: config,
7-
debug: 2,
8-
production: false,
9-
}
10-
);
4+
const UtilService = uAPI.createUtilsService({
5+
auth: config,
6+
debug: 2,
7+
production: true,
8+
});
119

1210
const params = {
13-
dataType: "HotelAmenities",
14-
TraceId: uuid()
11+
dataType: 'HotelAmenities',
12+
TraceId: 'some-unique-trace-id',
1513
};
1614

1715
UtilService.referenceData(params)
18-
.then(
19-
res => console.log(res),
20-
err => console.log(err)
21-
);
22-
16+
.then(
17+
res => console.log(res),
18+
err => console.log(err)
19+
);

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uapi-json",
3-
"version": "1.15.1",
3+
"version": "1.16.0",
44
"description": "Travelport Universal API",
55
"main": "src/",
66
"files": [

src/Services/Air/templates/AIR_AVAILABILTIY_REQUEST.handlebars.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ module.exports = `
7171
{{/each}}
7272
</air:PreferredCabins>
7373
{{/if}}
74+
{{#if ../bookingCode}}
75+
<air:PermittedBookingCodes>
76+
<air:BookingCode Code="{{../bookingCode}}" />
77+
</air:PermittedBookingCodes>
78+
{{/if}}
7479
</air:AirLegModifiers>
7580
</air:SearchAirLeg>
7681
{{/legs}}

src/Services/Utils/templates/UTILS_CURRENCY_CONVERSION.handlebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = `
2-
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:util="http://www.travelport.com/schema/util_v47_0" xmlns:com="http://www.travelport.com/schema/common_v52_0">
2+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:util="http://www.travelport.com/schema/util_v52_0" xmlns:com="http://www.travelport.com/schema/common_v52_0">
33
<soapenv:Body>
44
<util:CurrencyConversionReq TargetBranch="{{TargetBranch}}">
55
<com:BillingPointOfSaleInfo OriginApplication="UAPI" />

src/Services/Utils/templates/UTILS_REFERENCE_DATA_RETRIVE.handlebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = `
22
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
33
<soapenv:Header/>
44
<soapenv:Body>
5-
<ReferenceDataRetrieveReq TraceId="{{TraceId}}" AuthorizedBy="user" TargetBranch="{{TargetBranch}}" TypeCode="{{dataType}}" xmlns="http://www.travelport.com/schema/util_v47_0">
5+
<ReferenceDataRetrieveReq TraceId="{{TraceId}}" AuthorizedBy="user" TargetBranch="{{TargetBranch}}" TypeCode="{{dataType}}" xmlns="http://www.travelport.com/schema/util_v52_0">
66
<BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v52_0"/>
77
<ReferenceDataSearchModifiers MaxResults="20000" ProviderCode="1V"/>
88
</ReferenceDataRetrieveReq>

0 commit comments

Comments
 (0)