public async Task<RemoveIpAddressWhitelistResponse> Remove(RemoveIpAddressWhitelistRequest request, AdminKey adminKey = null, HttpClient httpClient = null)
 {
     using (var api = new GetAddesssApi(adminKey ?? AdminKey, HttpClient ?? httpClient))
     {
         return await api.IpAddressWhitelist.Remove(request);
     }
 }
        public async static Task <RemoveIpAddressWhitelistResponse> Remove(GetAddesssApi api, RemoveIpAddressWhitelistRequest request, string path, AdminKey adminKey)
        {
            if (api == null)
            {
                throw new ArgumentNullException(nameof(api));
            }
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }


            var fullPath = path + request.Id;

            api.SetAuthorizationKey(adminKey);

            var response = await api.Delete(fullPath);

            var body = await response.Content.ReadAsStringAsync();

            if (response.IsSuccessStatusCode)
            {
                var message = GetMessage(body);

                return(new RemoveIpAddressWhitelistResponse.Success((int)response.StatusCode, response.ReasonPhrase, body, message));
            }

            return(new RemoveIpAddressWhitelistResponse.Failed((int)response.StatusCode, response.ReasonPhrase, body));
        }
 public async Task <RemoveIpAddressWhitelistResponse> Remove(RemoveIpAddressWhitelistRequest request)
 {
     return(await Remove(Api, request, Path, AdminKey));
 }