diff --git a/Vonage.Test/PricingTests.cs b/Vonage.Test/PricingTests.cs index 76a443016..b260fd2eb 100644 --- a/Vonage.Test/PricingTests.cs +++ b/Vonage.Test/PricingTests.cs @@ -1,7 +1,9 @@ -using System.Threading.Tasks; +#region +using System.Threading.Tasks; using Vonage.Pricing; using Vonage.Request; using Xunit; +#endregion namespace Vonage.Test; @@ -15,7 +17,7 @@ public async Task GetPricingAllCountriesAsync(bool passCreds) { //ARRANGE var expectedUri = - $"{this.RestUrl}/account/get-pricing/outbound/sms?api_key={this.ApiKey}&api_secret={this.ApiSecret}&"; + $"{this.RestUrl}/account/get-pricing/outbound/sms"; var expectedResponse = @"{ ""count"": ""243"", ""countries"": [ @@ -77,7 +79,7 @@ public async Task GetPricingForCountryAsync(bool passCreds) { //ARRANGE var expectedUri = - $"{this.RestUrl}/account/get-pricing/outbound/sms?country=CA&api_key={this.ApiKey}&api_secret={this.ApiSecret}&"; + $"{this.RestUrl}/account/get-pricing/outbound/sms?country=CA&"; var expectedResponseContent = @"{ ""countryCode"": ""CA"", ""countryName"": ""Canada"", @@ -137,7 +139,7 @@ public async Task GetPricingForPrefixAsync(bool passCreds) { //ARRANGE var expectedUri = - $"{this.RestUrl}/account/get-prefix-pricing/outbound/sms?prefix=1&api_key={this.ApiKey}&api_secret={this.ApiSecret}&"; + $"{this.RestUrl}/account/get-prefix-pricing/outbound/sms?prefix=1&"; var expectedResponse = @"{ ""count"": ""243"", ""countries"": [ diff --git a/Vonage/Pricing/PricingClient.cs b/Vonage/Pricing/PricingClient.cs index 30f0f8fc3..6c44a96c6 100644 --- a/Vonage/Pricing/PricingClient.cs +++ b/Vonage/Pricing/PricingClient.cs @@ -1,6 +1,8 @@ +#region using System.Threading.Tasks; using Vonage.Common; using Vonage.Request; +#endregion namespace Vonage.Pricing; @@ -32,7 +34,7 @@ public Task RetrievePrefixPricingAsync(string type, PricingPrefix ( ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, this.configuration, $"/account/get-prefix-pricing/outbound/{type}"), - AuthType.Query, + AuthType.Basic, request ); @@ -43,7 +45,7 @@ public Task RetrievePricingAllCountriesAsync(string type, Credent ( ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, this.configuration, $"/account/get-pricing/outbound/{type}"), - AuthType.Query + AuthType.Basic ); /// @@ -54,7 +56,7 @@ public Task RetrievePricingCountryAsync(string type, PricingCountryRequ ( ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, this.configuration, $"/account/get-pricing/outbound/{type}"), - AuthType.Query, + AuthType.Basic, request );