Skip to content

Commit

Permalink
Merge pull request #16 from TourConnect/feature/check_bookingrefid
Browse files Browse the repository at this point in the history
Send bookingPartnerId to check the bookingRefID against
  • Loading branch information
shintre authored Aug 5, 2024
2 parents cafe4df + edd270b commit 4475043
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ class Plugin {
email: R.path(['emailAddress'], holder),
phone: R.pathOr('', ['phone'], holder),
bookingRefID: reference,
bookingPartnerId: bookingPartnerId,
...R.omit(['iat', 'currency'], dataForBooking),
// notes,
},
Expand Down
6 changes: 3 additions & 3 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('search tests', () => {
const token = {
endpoint: process.env.ti2_bonza_endpoint,
apiKey: process.env.ti2_bonza_apiKey,
bookingPartnerId: 181
bookingPartnerId: 181,
};
const dateFormat = 'DD/MM/YYYY';
const dateFormatCB = 'YYYY-MM-DD';
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('search tests', () => {
expect(availabilityKey).toBeTruthy();
});
let booking;
const reference = faker.datatype.uuid();
const bookingRefId = faker.datatype.uuid();
it('should be able to create a booking', async () => {
const fullName = faker.name.findName().split(' ');
const retVal = await app.createBooking({
Expand Down Expand Up @@ -214,7 +214,7 @@ describe('search tests', () => {
phone: "888888877",
country: faker.address.countryCode(),
},
reference,
reference: bookingRefId,
},
});
expect(retVal.booking).toBeTruthy();
Expand Down

0 comments on commit 4475043

Please sign in to comment.