Revert "Remove merchantAccount from Config. (#590)"

This reverts commit 21700d8bb6.
This commit is contained in:
KadoBOT
2020-11-16 07:18:17 +01:00
parent 0322f35e6b
commit d459f00871
2 changed files with 4 additions and 0 deletions

View File

@@ -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}`);

View File

@@ -19,6 +19,7 @@
interface ConfigConstructor {
username?: string;
password?: string;
merchantAccount?: string;
environment?: Environment;
endpoint?: string;
marketPayEndpoint?: string;
@@ -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;
@@ -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;