Skip to content

Instantly share code, notes, and snippets.

@anthgur
Created October 3, 2017 16:07
Show Gist options
  • Save anthgur/dba79c8df50997812bb6173afb509855 to your computer and use it in GitHub Desktop.
Save anthgur/dba79c8df50997812bb6173afb509855 to your computer and use it in GitHub Desktop.
Example sabre-soap usage
'use strict';
const { createSession, closeSession } = require('sabre-soap');
const sabreCertUrl = 'https://sws3-crt.cert.sabre.com/';
const credentials = {
username: 'your_username',
password: 'your_password',
pcc: 'your_pseudocity_code',
partyId: 'yourdomain.com'
};
const cycleSession = () => {
createSession(sabreCertUrl, credentials)
.then((token) => {
console.log('sabre token: ', token);
return closeSession(sabreCertUrl, credentials, token);
})
.then(() => {
console.log('session closed');
});
};
module.exports = { cycleSession };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment