uapi-json 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uapi-json",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Travelport Universal API",
5
5
  "main": "src/",
6
6
  "files": [
@@ -71,6 +71,13 @@ module.exports = `
71
71
  {{/each}}
72
72
  </air:PreferredCabins>
73
73
  {{/if}}
74
+ {{#if ../bookingCodes}}
75
+ <air:PermittedBookingCodes>
76
+ {{#each ../bookingCodes}}
77
+ <air:BookingCode Code="{{this}}"/>
78
+ {{/each}}
79
+ </air:PermittedBookingCodes>
80
+ {{/if}}
74
81
  </air:AirLegModifiers>
75
82
  </air:SearchAirLeg>
76
83
  {{/legs}}
@@ -21,8 +21,11 @@ const DEFAULT_RETRY_TIMES = 3;
21
21
 
22
22
  const UNEXPECTED_TERMINAL_ERRORS = [
23
23
  'NO PREVIOUS OR ORIGINAL REQUEST',
24
+ 'OPTIONS ERROR',
24
25
  ];
25
26
 
27
+ const isFinancialCommand = command => /^F.*/.test(command);
28
+
26
29
  // Adding event handler on beforeExit and exit process events to process open terminals
27
30
  process.on('beforeExit', () => {
28
31
  Promise.all(
@@ -232,7 +235,11 @@ module.exports = function (settings) {
232
235
  });
233
236
 
234
237
  if (UNEXPECTED_TERMINAL_ERRORS.some(e => response.includes(e))) {
235
- throw new TerminalRuntimeError.TerminalUnexpectedError({ screen: response });
238
+ const errorObject = isFinancialCommand(command)
239
+ ? new TerminalRuntimeError.TerminalUnexpectedFinancialError({ screen: response })
240
+ : new TerminalRuntimeError.TerminalUnexpectedError({ screen: response });
241
+
242
+ throw errorObject;
236
243
  }
237
244
 
238
245
  return response;
@@ -47,7 +47,8 @@ Object.assign(TerminalRuntimeError, createErrorsList({
47
47
  ErrorClosingSession: 'Error closing session',
48
48
  NoAgreement: ['There is no agreement between current pcc and you trying to reach', errorCodes.Validation],
49
49
  TerminalAuthIssue: ['Temporary terminal auth issue. Please, try again later', errorCodes.Validation],
50
- TerminalUnexpectedError: ['Terminal unexpected error. Please, try again later', errorCodes.Validation],
50
+ TerminalUnexpectedError: ['Unexpected error message is returned by Travelport system. Please check PNR and try again later.', errorCodes.Validation],
51
+ TerminalUnexpectedFinancialError: ['Unexpected error message is returned by Travelport system. Please check PNR and new Fare calculation. If the problem persists, contact your local helpdesk.', errorCodes.Validation],
51
52
  }, TerminalRuntimeError));
52
53
 
53
54
  module.exports = {
@@ -1,5 +1,5 @@
1
1
  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">
3
3
  <soapenv:Body>
4
4
  <util:CurrencyConversionReq TargetBranch="{{TargetBranch}}">
5
5
  <com:BillingPointOfSaleInfo OriginApplication="UAPI" />
@@ -2,7 +2,7 @@ module.exports = `
2
2
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
3
3
  <soapenv:Header/>
4
4
  <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">
6
6
  <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v52_0"/>
7
7
  <ReferenceDataSearchModifiers MaxResults="20000" ProviderCode="1V"/>
8
8
  </ReferenceDataRetrieveReq>