public Configuration(string clientId, string clientSecret)
 {
     CredentialsParser parser = new CredentialsParser(clientId, clientSecret);
     ClientId = parser.ClientId;
     ClientSecret = parser.ClientSecret;
     Environment = parser.Environment;
 }
 public Configuration(string accessToken) : this()
 {
     CredentialsParser parser = new CredentialsParser(accessToken);
     MerchantId = parser.MerchantId;
     AccessToken = parser.AccessToken;
     Environment = parser.Environment;
 }
        public Configuration(string accessToken) : this()
        {
            CredentialsParser parser = new CredentialsParser(accessToken);

            MerchantId  = parser.MerchantId;
            AccessToken = parser.AccessToken;
            Environment = parser.Environment;
        }
        public Configuration(string clientId, string clientSecret) : this()
        {
            CredentialsParser parser = new CredentialsParser(clientId, clientSecret);

            ClientId     = parser.ClientId;
            ClientSecret = parser.ClientSecret;
            Environment  = parser.Environment;
        }
        public void CredentialsParser_ParsesAccessToken()
        {
            var parser = new CredentialsParser(
                "access_token$development$merchant_id$access_token_id"
            );

            Assert.AreEqual("access_token$development$merchant_id$access_token_id", parser.AccessToken);
            Assert.AreEqual("merchant_id", parser.MerchantId);
            Assert.AreEqual(Environment.DEVELOPMENT, parser.Environment);
        }
        public void CredentialsParser_ParsesClientCredentials()
        {
            var parser = new CredentialsParser(
                "client_id$development$integration_client_id",
                "client_secret$development$integration_client_secret"
            );

            Assert.AreEqual("client_id$development$integration_client_id", parser.ClientId);
            Assert.AreEqual("client_secret$development$integration_client_secret", parser.ClientSecret);
            Assert.AreEqual(Environment.DEVELOPMENT, parser.Environment);
        }