Skip to content

Commit

Permalink
Merge pull request #60 from ColinCrawford/master
Browse files Browse the repository at this point in the history
add optional partnerId param support for connection's getTokenQuery m…
  • Loading branch information
pcothenet authored Sep 24, 2018
2 parents f47a7c3 + c77d3a1 commit 1d8ab82
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,16 @@ Connection.prototype.getOAuthToken = function(force) {
};

Connection.prototype._getTokenQuery = function() {
return {
var queryOptions = {
grant_type: 'client_credentials',
client_id: this._options.clientId,
client_secret: this._options.clientSecret
};
var partnerId = this._options.partnerId;
if (partnerId) {
queryOptions.partner_id = partnerId;
}
return queryOptions;
};

module.exports = Connection;

0 comments on commit 1d8ab82

Please sign in to comment.