ti2-ventrata 1.0.24 → 1.0.25

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
@@ -589,6 +589,7 @@ class Plugin {
589
589
  pickupTypeDefs,
590
590
  pickupQuery,
591
591
  },
592
+ requestId,
592
593
  }) {
593
594
  const url = `${endpoint || this.endpoint}/products`;
594
595
  const headers = getHeaders({
@@ -597,8 +598,9 @@ class Plugin {
597
598
  octoEnv,
598
599
  acceptLanguage,
599
600
  resellerId,
601
+ requestId,
600
602
  });
601
- const products = R.pathOr([], ['data'], await axios({
603
+ const products = R.pathOr([], ['data'], await this.axios({
602
604
  method: 'get',
603
605
  url,
604
606
  headers,
package/index.test.js CHANGED
@@ -4,12 +4,12 @@ const moment = require('moment');
4
4
  const faker = require('faker');
5
5
 
6
6
  const Plugin = require('./index');
7
- const fixtureUnits = require('./__fixtures__/units.js');
8
7
 
9
8
  const { typeDefs: productTypeDefs, query: productQuery } = require('./node_modules/ti2/controllers/graphql-schemas/product');
10
9
  const { typeDefs: availTypeDefs, query: availQuery } = require('./node_modules/ti2/controllers/graphql-schemas/availability');
11
10
  const { typeDefs: bookingTypeDefs, query: bookingQuery } = require('./node_modules/ti2/controllers/graphql-schemas/booking');
12
11
  const { typeDefs: rateTypeDefs, query: rateQuery } = require('./node_modules/ti2/controllers/graphql-schemas/rate');
12
+ const { typeDefs: pickupTypeDefs, query: pickupQuery } = require('./node_modules/ti2/controllers/graphql-schemas/pickup-point');
13
13
 
14
14
  const typeDefsAndQueries = {
15
15
  productTypeDefs,
@@ -20,6 +20,8 @@ const typeDefsAndQueries = {
20
20
  bookingQuery,
21
21
  rateTypeDefs,
22
22
  rateQuery,
23
+ pickupQuery,
24
+ pickupTypeDefs,
23
25
  };
24
26
 
25
27
  const app = new Plugin({
@@ -306,5 +308,13 @@ describe('search tests', () => {
306
308
  expect(R.path(['supplierBookingId'], booking)).toBeTruthy();
307
309
  expect(R.path(['cancellable'], booking)).toBeTruthy();
308
310
  });
311
+ it('should be able to get a list of pickuppoints', async () => {
312
+ const retVal = await app.getPickupPoints({
313
+ token,
314
+ typeDefsAndQueries,
315
+ });
316
+ expect(Array.isArray(retVal.pickupPoints)).toBeTruthy();
317
+ expect(R.path(['pickupPoints', 0, 'id'], retVal)).toBeTruthy();
318
+ });
309
319
  });
310
320
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-ventrata",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Ventrata's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {