public void Init()
 {
     if (!string.IsNullOrEmpty(Config.ApiKey))
     {
         client = new HelloSignClient(Config.ApiKey);
     }
     else
     {
         client = new HelloSignClient(Config.Username, Config.Password);
     }
 }
Example #2
0
        private void btnChangeKey_Click(object sender, RoutedEventArgs e)
        {
            var key = boxApiKey.Text.Trim();

            if (!string.IsNullOrEmpty(key))
            {
                var client = new HelloSignClient(key, log: this);
                viewRequests.ChangeClient(client);

                client.GetSignatureRequestListAsync();
            }
        }
 public void Init()
 {
     if (!string.IsNullOrEmpty(Config.ApiKey))
     {
         client = new HelloSignClient(Config.ApiKey);
     }
     else if (!string.IsNullOrEmpty(Config.Username))
     {
         client = new HelloSignClient(Config.Username, Config.Password);
     }
     else
     {
         Assert.Fail("Config.Username or Config.ApiKey must be set to run test. Environment variables are suggested");
     }
 }
        public void Initialize()
        {
            eventTime = DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
            eventHash1 = HelloSignUtilities.GenerateEventHash(Config.ApiKey, eventTime, "callback_test");
            eventHash2 = HelloSignUtilities.GenerateEventHash(Config.ApiKey, eventTime, "signature_request_sent");
            NoAssociatedModelJsonPayload = JObject.Parse(string.Format(NoAssociatedModelJsonPayloadFormat, eventTime, eventHash1, "testAccountId"));
            RequestAssociatedModelJsonPayload = JObject.Parse(string.Format(RequestAssociatedModelJsonPayloadFormat, eventTime, eventHash2, "testAccountId", Config.Username));

            if (!string.IsNullOrEmpty(Config.ApiKey))
            {
                client = new HelloSignClient(Config.ApiKey);
            }
            else if (!string.IsNullOrEmpty(Config.Username))
            {
                client = new HelloSignClient(Config.Username, Config.Password);
            }
            else
            {
                Assert.Fail("Config.Username or Config.ApiKey must be set to run test. Environment variables are suggested");
            }
        }
Example #5
0
 internal void ChangeClient(HelloSignClient client)
 {
 }
Example #6
0
 internal void ChangeClient(HelloSignClient client)
 {
     _client        = client;
     this.IsEnabled = client != null;
 }