package de.barzahlen.api.online;

/**
 * Configuration for the Barzahlen API
 */
public class Configuration {

    private final static String PRODUCTION_URL = "https://api-staging.barzahlen.de/v1/";
    private final static String SANDBOX_URL = "https://api-sandbox-staging.barzahlen.de/v1/";

    private boolean sandboxMode;
    private String shopId;
    private String paymentKey;
    private String notificationKey;

    public Configuration() {
    }

    public Configuration(boolean sandboxMode, String shopId, String paymentKey, String notificationKey) {
        this.sandboxMode = sandboxMode;
        this.shopId = shopId;
        this.paymentKey = paymentKey;
        this.notificationKey = notificationKey;
    }

    public String getBaseUrl() {
        if (sandboxMode) {
            return SANDBOX_URL;
        } else {
            return PRODUCTION_URL;
        }
    }

    public boolean isSandboxMode() {
        return sandboxMode;
    }

    public String getShopId() {
        return shopId;
    }

    public String getPaymentKey() {
        return paymentKey;
    }

    public String getNotificationKey() {
        return notificationKey;
    }
}

@@ -165,24 +165,16 @@
 ps://api
--staging
 .barzahl
@@ -255,16 +255,8 @@
 dbox
--staging
 .bar

Correct URL'S in config