Skip to content

Commit

Permalink
feat(common): CHECKOUT-3035 Provide setter for config
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Sanchez committed Apr 10, 2018
1 parent 2a14a10 commit 0d58b2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default class Client {
this.storeRequestSender = storeRequestSender;
}

setHost(host) {
this.config.host = host;
}

/**
* @param {PaymentRequestData} data
* @param {Function} [callback]
Expand Down
14 changes: 11 additions & 3 deletions src/payment/url-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ export default class UrlHelper {
* @param {string} config.host
* @returns {void}
*/
constructor({ host }) {
constructor(config) {
/**
* @private
* @type {string}
* @type {Object}
*/
this.host = host;
this.config = config;
}

/**
* @private
* @returns {string}
*/
get host() {
return this.config.host;
}

/**
Expand Down

0 comments on commit 0d58b2b

Please sign in to comment.