ti2-ventrata 1.0.32 → 1.0.33

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/index.js CHANGED
@@ -332,7 +332,6 @@ class Plugin {
332
332
  endpoint,
333
333
  octoEnv,
334
334
  acceptLanguage,
335
- resellerId,
336
335
  },
337
336
  payload: {
338
337
  rebookingId,
@@ -355,14 +354,13 @@ class Plugin {
355
354
  endpoint,
356
355
  octoEnv,
357
356
  acceptLanguage,
358
- resellerId,
359
357
  });
360
358
  const dataForCreateBooking = await jwt.verify(availabilityKey, this.jwtKey);
361
359
  let booking = R.path(['data'], await axios({
362
360
  method: rebookingId ? 'patch' : 'post',
363
361
  url: `${endpoint || this.endpoint}/bookings${rebookingId ? `/${rebookingId}` : ''}`,
364
362
  data: {
365
- settlementMethod: 'DEFERRED',
363
+ settlementMethod: reference ? 'VOUCHER' : 'DEFERRED',
366
364
  ...dataForCreateBooking,
367
365
  notes,
368
366
  ...(pickupPoint ? { pickupRequested: true, pickupPointId: pickupPoint } : {}),
@@ -381,7 +379,7 @@ class Plugin {
381
379
  },
382
380
  notes,
383
381
  resellerReference: reference,
384
- settlementMethod: 'DEFERRED',
382
+ settlementMethod: reference ? 'VOUCHER' : 'DEFERRED',
385
383
  };
386
384
  booking = R.path(['data'], await axios({
387
385
  method: 'post',
package/index.test.js CHANGED
@@ -212,7 +212,8 @@ describe('search tests', () => {
212
212
  country: faker.address.countryCode(),
213
213
  locales: ['en-US', 'en', 'es'],
214
214
  },
215
- reference,
215
+ // our api key doesn't allow us to set the reference and settlementMethod as VOUCHER
216
+ // reference,
216
217
  },
217
218
  });
218
219
  expect(retVal.booking).toBeTruthy();
@@ -312,7 +313,7 @@ describe('search tests', () => {
312
313
  country: faker.address.countryCode(),
313
314
  locales: ['en-US', 'en', 'es'],
314
315
  },
315
- reference,
316
+ // reference,
316
317
  referrer: 'referrerforapitest',
317
318
  settlementMethod: 'DEFERRED',
318
319
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-ventrata",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "Ventrata's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {