diff --git a/Vonage.Test/PricingTests.cs b/Vonage.Test/PricingTests.cs
index 4fbdd9f86..76a443016 100644
--- a/Vonage.Test/PricingTests.cs
+++ b/Vonage.Test/PricingTests.cs
@@ -8,68 +8,6 @@ namespace Vonage.Test;
[Trait("Category", "Legacy")]
public class PricingTests : TestBase
{
- [Theory]
- [InlineData(true)]
- [InlineData(false)]
- public void GetPricingAllCountries(bool passCreds)
- {
- //ARRANGE
- var expectedUri =
- $"{this.RestUrl}/account/get-pricing/outbound/sms?api_key={this.ApiKey}&api_secret={this.ApiSecret}&";
- var expectedResponse = @"{
- ""count"": ""243"",
- ""countries"": [
- {
- ""countryName"": ""Canada"",
- ""countryDisplayName"": ""Canada"",
- ""currency"": ""EUR"",
- ""defaultPrice"": ""0.00620000"",
- ""dialingPrefix"": ""1"",
- ""networks"": [
- {
- ""type"": ""mobile"",
- ""price"": ""0.00590000"",
- ""currency"": ""EUR"",
- ""mcc"": ""302"",
- ""mnc"": ""530"",
- ""networkCode"": ""302530"",
- ""networkName"": ""Keewaytinook Okimakanak""
- }
- ]
- }
- ]
- }";
- this.Setup(expectedUri, expectedResponse);
-
- //ACT
- var creds = Credentials.FromApiKeyAndSecret(this.ApiKey, this.ApiSecret);
- var client = this.BuildVonageClient(creds);
- PricingResult pricing;
- if (passCreds)
- {
- pricing = client.PricingClient.RetrievePricingAllCountries("sms", creds);
- }
- else
- {
- pricing = client.PricingClient.RetrievePricingAllCountries("sms");
- }
-
- //ASSERT
- Assert.Equal("302530", pricing.Countries[0].Networks[0].NetworkCode);
- Assert.Equal("Keewaytinook Okimakanak", pricing.Countries[0].Networks[0].NetworkName);
- Assert.Equal("530", pricing.Countries[0].Networks[0].Mnc);
- Assert.Equal("302", pricing.Countries[0].Networks[0].Mcc);
- Assert.Equal("EUR", pricing.Countries[0].Networks[0].Currency);
- Assert.Equal("0.00590000", pricing.Countries[0].Networks[0].Price);
- Assert.Equal("mobile", pricing.Countries[0].Networks[0].Type);
- Assert.Equal("1", pricing.Countries[0].DialingPrefix);
- Assert.Equal("0.00620000", pricing.Countries[0].DefaultPrice);
- Assert.Equal("EUR", pricing.Countries[0].Currency);
- Assert.Equal("Canada", pricing.Countries[0].CountryDisplayName);
- Assert.Equal("Canada", pricing.Countries[0].CountryName);
- Assert.Equal("243", pricing.Count);
- }
-
[Theory]
[InlineData(true)]
[InlineData(false)]
@@ -132,66 +70,6 @@ public async Task GetPricingAllCountriesAsync(bool passCreds)
Assert.Equal("243", pricing.Count);
}
- [Theory]
- [InlineData(true)]
- [InlineData(false)]
- public void GetPricingForCountry(bool passCreds)
- {
- //ARRANGE
- var expectedUri =
- $"{this.RestUrl}/account/get-pricing/outbound/sms?country=CA&api_key={this.ApiKey}&api_secret={this.ApiSecret}&";
- var expectedResponseContent = @"{
- ""countryCode"": ""CA"",
- ""countryName"": ""Canada"",
- ""countryDisplayName"": ""Canada"",
- ""currency"": ""EUR"",
- ""defaultPrice"": ""0.00620000"",
- ""dialingPrefix"": ""1"",
- ""networks"": [
- {
- ""type"": ""mobile"",
- ""price"": ""0.00590000"",
- ""currency"": ""EUR"",
- ""mcc"": ""302"",
- ""mnc"": ""530"",
- ""networkCode"": ""302530"",
- ""networkName"": ""Keewaytinook Okimakanak""
- }
- ]
- }";
- this.Setup(expectedUri, expectedResponseContent);
-
- //ACT
- var creds = Credentials.FromApiKeyAndSecret(this.ApiKey, this.ApiSecret);
- var client = this.BuildVonageClient(creds);
- Country country;
- if (passCreds)
- {
- country = client.PricingClient.RetrievePricingCountry("sms",
- new PricingCountryRequest {Country = "CA"}, creds);
- }
- else
- {
- country = client.PricingClient.RetrievePricingCountry("sms",
- new PricingCountryRequest {Country = "CA"});
- }
-
- //ASSERT
- Assert.Equal("302530", country.Networks[0].NetworkCode);
- Assert.Equal("Keewaytinook Okimakanak", country.Networks[0].NetworkName);
- Assert.Equal("530", country.Networks[0].Mnc);
- Assert.Equal("302", country.Networks[0].Mcc);
- Assert.Equal("EUR", country.Networks[0].Currency);
- Assert.Equal("0.00590000", country.Networks[0].Price);
- Assert.Equal("mobile", country.Networks[0].Type);
- Assert.Equal("1", country.DialingPrefix);
- Assert.Equal("0.00620000", country.DefaultPrice);
- Assert.Equal("EUR", country.Currency);
- Assert.Equal("Canada", country.CountryDisplayName);
- Assert.Equal("Canada", country.CountryName);
- Assert.Equal("CA", country.CountryCode);
- }
-
[Theory]
[InlineData(true)]
[InlineData(false)]
@@ -252,70 +130,6 @@ public async Task GetPricingForCountryAsync(bool passCreds)
Assert.Equal("CA", country.CountryCode);
}
- [Theory]
- [InlineData(true)]
- [InlineData(false)]
- public void GetPricingForPrefix(bool passCreds)
- {
- //ARRANGE
- var expectedUri =
- $"{this.RestUrl}/account/get-prefix-pricing/outbound/sms?prefix=1&api_key={this.ApiKey}&api_secret={this.ApiSecret}&";
- var expectedResponse = @"{
- ""count"": ""243"",
- ""countries"": [
- {
- ""countryName"": ""Canada"",
- ""countryDisplayName"": ""Canada"",
- ""currency"": ""EUR"",
- ""defaultPrice"": ""0.00620000"",
- ""dialingPrefix"": ""1"",
- ""networks"": [
- {
- ""type"": ""mobile"",
- ""price"": ""0.00590000"",
- ""currency"": ""EUR"",
- ""mcc"": ""302"",
- ""mnc"": ""530"",
- ""networkCode"": ""302530"",
- ""networkName"": ""Keewaytinook Okimakanak""
- }
- ]
- }
- ]
- }";
- this.Setup(expectedUri, expectedResponse);
-
- //ACT
- var creds = Credentials.FromApiKeyAndSecret(this.ApiKey, this.ApiSecret);
- var client = this.BuildVonageClient(creds);
- PricingResult pricing;
- if (passCreds)
- {
- pricing = client.PricingClient.RetrievePrefixPricing("sms",
- new PricingPrefixRequest {Prefix = "1"}, creds);
- }
- else
- {
- pricing = client.PricingClient.RetrievePrefixPricing("sms",
- new PricingPrefixRequest {Prefix = "1"});
- }
-
- //ASSERT
- Assert.Equal("302530", pricing.Countries[0].Networks[0].NetworkCode);
- Assert.Equal("Keewaytinook Okimakanak", pricing.Countries[0].Networks[0].NetworkName);
- Assert.Equal("530", pricing.Countries[0].Networks[0].Mnc);
- Assert.Equal("302", pricing.Countries[0].Networks[0].Mcc);
- Assert.Equal("EUR", pricing.Countries[0].Networks[0].Currency);
- Assert.Equal("0.00590000", pricing.Countries[0].Networks[0].Price);
- Assert.Equal("mobile", pricing.Countries[0].Networks[0].Type);
- Assert.Equal("1", pricing.Countries[0].DialingPrefix);
- Assert.Equal("0.00620000", pricing.Countries[0].DefaultPrice);
- Assert.Equal("EUR", pricing.Countries[0].Currency);
- Assert.Equal("Canada", pricing.Countries[0].CountryDisplayName);
- Assert.Equal("Canada", pricing.Countries[0].CountryName);
- Assert.Equal("243", pricing.Count);
- }
-
[Theory]
[InlineData(true)]
[InlineData(false)]
diff --git a/Vonage/Pricing/IPricingClient.cs b/Vonage/Pricing/IPricingClient.cs
index 47f54ba8d..166dddd0f 100644
--- a/Vonage/Pricing/IPricingClient.cs
+++ b/Vonage/Pricing/IPricingClient.cs
@@ -33,33 +33,4 @@ public interface IPricingClient
///
///
Task RetrievePrefixPricingAsync(string type, PricingPrefixRequest request, Credentials creds = null);
-
- ///
- /// Retrieves the pricing information based on the specified country.
- ///
- /// The type of service you wish to retrieve data about:
- /// either sms, sms-transit or voice.
- ///
- ///
- ///
- Country RetrievePricingCountry(string type, PricingCountryRequest request, Credentials creds = null);
-
- ///
- /// Retrieves the pricing information for all countries.
- ///
- /// The type of service you wish to retrieve data about:
- /// either sms, sms-transit or voice.
- ///
- ///
- PricingResult RetrievePricingAllCountries(string type, Credentials creds = null);
-
- ///
- /// Retrieves the pricing information based on the dialing prefix.
- ///
- /// The type of service you wish to retrieve data about:
- /// either sms, sms-transit or voice.
- ///
- ///
- ///
- PricingResult RetrievePrefixPricing(string type, PricingPrefixRequest request, Credentials creds = null);
}
\ No newline at end of file
diff --git a/Vonage/Pricing/PricingClient.cs b/Vonage/Pricing/PricingClient.cs
index 4f8f68756..30f0f8fc3 100644
--- a/Vonage/Pricing/PricingClient.cs
+++ b/Vonage/Pricing/PricingClient.cs
@@ -1,4 +1,3 @@
-using System;
using System.Threading.Tasks;
using Vonage.Common;
using Vonage.Request;
@@ -25,18 +24,6 @@ internal PricingClient(Credentials credentials, Configuration configuration, ITi
public Credentials Credentials { get; set; }
- ///
- [Obsolete("Favor asynchronous version instead.")]
- public PricingResult RetrievePrefixPricing(string type, PricingPrefixRequest request, Credentials creds = null) =>
- ApiRequest.Build(this.GetCredentials(creds), this.configuration, this.timeProvider)
- .DoGetRequestWithQueryParameters
- (
- ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, this.configuration,
- $"/account/get-prefix-pricing/outbound/{type}"),
- AuthType.Query,
- request
- );
-
///
public Task RetrievePrefixPricingAsync(string type, PricingPrefixRequest request,
Credentials creds = null) =>
@@ -49,17 +36,6 @@ public Task RetrievePrefixPricingAsync(string type, PricingPrefix
request
);
- ///
- [Obsolete("Favor asynchronous version instead.")]
- public PricingResult RetrievePricingAllCountries(string type, Credentials creds = null) =>
- ApiRequest.Build(this.GetCredentials(creds), this.configuration, this.timeProvider)
- .DoGetRequestWithQueryParameters
- (
- ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, this.configuration,
- $"/account/get-pricing/outbound/{type}"),
- AuthType.Query
- );
-
///
public Task RetrievePricingAllCountriesAsync(string type, Credentials creds = null) =>
ApiRequest.Build(this.GetCredentials(creds), this.configuration, this.timeProvider)
@@ -70,18 +46,6 @@ public Task RetrievePricingAllCountriesAsync(string type, Credent
AuthType.Query
);
- ///
- [Obsolete("Favor asynchronous version instead.")]
- public Country RetrievePricingCountry(string type, PricingCountryRequest request, Credentials creds = null) =>
- ApiRequest.Build(this.GetCredentials(creds), this.configuration, this.timeProvider)
- .DoGetRequestWithQueryParameters
- (
- ApiRequest.GetBaseUri(ApiRequest.UriType.Rest, this.configuration,
- $"/account/get-pricing/outbound/{type}"),
- AuthType.Query,
- request
- );
-
///
public Task RetrievePricingCountryAsync(string type, PricingCountryRequest request,
Credentials creds = null) =>