diff --git a/Vonage/Accounts/AccountClient.cs b/Vonage/Accounts/AccountClient.cs index c2190cbf3..78e594a81 100644 --- a/Vonage/Accounts/AccountClient.cs +++ b/Vonage/Accounts/AccountClient.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.Http; using System.Threading.Tasks; using Vonage.Request; @@ -34,7 +34,7 @@ public Secret CreateApiSecret(CreateSecretRequest request, string apiKey = null, AuthType.Basic ); - public Task CreateApiSecretAsync(CreateSecretRequest request, string apiKey, Credentials creds = null) => + public Task CreateApiSecretAsync(CreateSecretRequest request, string apiKey = null, Credentials creds = null) => new ApiRequest(creds ?? this.Credentials).DoRequestWithJsonContentAsync( HttpMethod.Post, ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"/accounts/{apiKey}/secrets"), @@ -86,7 +86,7 @@ public Secret RetrieveApiSecret(string secretId, string apiKey = null, Credentia AuthType.Basic ); - public Task RetrieveApiSecretAsync(string secretId, string apiKey, Credentials creds = null) => + public Task RetrieveApiSecretAsync(string secretId, string apiKey = null, Credentials creds = null) => new ApiRequest(creds ?? this.Credentials).DoGetRequestWithQueryParametersAsync( ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"/accounts/{apiKey}/secrets/{secretId}"), AuthType.Basic @@ -98,7 +98,7 @@ public SecretsRequestResult RetrieveApiSecrets(string apiKey = null, Credentials AuthType.Basic ); - public Task RetrieveApiSecretsAsync(string apiKey, Credentials creds = null) => + public Task RetrieveApiSecretsAsync(string apiKey = null, Credentials creds = null) => new ApiRequest(creds ?? this.Credentials).DoGetRequestWithQueryParametersAsync( ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"/accounts/{apiKey}/secrets"), AuthType.Basic @@ -137,7 +137,7 @@ public bool RevokeApiSecret(string secretId, string apiKey = null, Credentials c return true; } - public async Task RevokeApiSecretAsync(string secretId, string apiKey, Credentials creds = null) + public async Task RevokeApiSecretAsync(string secretId, string apiKey = null, Credentials creds = null) { await new ApiRequest(creds ?? this.Credentials).DoDeleteRequestWithUrlContentAsync( ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"/accounts/{apiKey}/secrets/{secretId}"),