Example #1
0
        public static async Task <HttpResponseMessage> SenderApiKeyAsync(string email, CancellationToken cancellationToken)
        {
            var response = await AccountSendersAsync(email, cancellationToken);

            if (!response.IsSuccessStatusCode)
            {
                return(response);
            }

            var sender = await response.Content.ReadAsAsync <JObject>();

            using (var client = new eSign20HttpClient())
                return(await client.GetAsync(string.Format("api/v1/account/senders/{0}/apiKey/", sender.Value <string>("id"))));
        }
Example #2
0
 public static async Task <HttpResponseMessage> AccountSendersChangeEmailAsync(IEnumerable <string> emails)
 {
     using (var client = new eSign20HttpClient())
         return(await client.PostAsJsonAsync <dynamic>("api/v1/account/senders/group/", new { emails = emails }));
 }
Example #3
0
 public eSign20Client(HttpRequestMessage request, string apiKey)
 {
     _eSign20HttpClient = new eSign20HttpClient(request, apiKey);
 }
Example #4
0
 internal static async Task <HttpResponseMessage> AccountSendersAsync(string email, CancellationToken cancellationToken)
 {
     using (var client = new eSign20HttpClient())
         return(await client.PostAsJsonAsync <dynamic>("api/v1/account/senders/", new { email = email }, cancellationToken));
 }
Example #5
0
 public eSign20Client()
 {
     _eSign20HttpClient = new eSign20HttpClient();
 }