Skip to content

Commit

Permalink
Revert "Remove merchantAccount from Config. (#590)"
Browse files Browse the repository at this point in the history
This reverts commit 21700d8.
  • Loading branch information
KadoBOT committed Nov 16, 2020
1 parent 0322f35 commit d459f00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/__tests__/terminalCloudAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ beforeEach((): void => {
nock.activate();
}
client = createClient(process.env.ADYEN_TERMINAL_APIKEY);
client.config.merchantAccount = process.env.ADYEN_TERMINAL_MERCHANT;

terminalCloudAPI = new TerminalCloudAPI(client);
scope = nock(`${client.config.terminalApiCloudEndpoint}`);
Expand Down
3 changes: 3 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
interface ConfigConstructor {
username?: string;
password?: string;
merchantAccount?: string;
environment?: Environment;
endpoint?: string;
marketPayEndpoint?: string;
Expand All @@ -38,6 +39,7 @@ interface ConfigConstructor {
class Config {
public username?: string;
public password?: string;
public merchantAccount?: string;
public environment?: Environment;
public endpoint?: string;
public marketPayEndpoint?: string;
Expand All @@ -59,6 +61,7 @@ class Config {
public constructor(options: ConfigConstructor = {}) {
if (options.username) this.username = options.username;
if (options.password) this.password = options.password;
if (options.merchantAccount) this.merchantAccount = options.merchantAccount;
if (options.environment) this.environment = options.environment;
if (options.endpoint) this.endpoint = options.endpoint;
if (options.marketPayEndpoint) this.marketPayEndpoint = options.marketPayEndpoint;
Expand Down

0 comments on commit d459f00

Please sign in to comment.