From ac8a0e79b3d3281f0b6d784e5219f9440b511f3f Mon Sep 17 00:00:00 2001 From: abheet-plivo <83641147+abheet-plivo@users.noreply.github.com> Date: Mon, 26 Jun 2023 23:28:14 +0530 Subject: [PATCH 1/7] cnam changes done --- CHANGELOG.md | 10 +++++++ src/Plivo/Plivo.csproj | 2 +- src/Plivo/Plivo.nuspec | 3 +- src/Plivo/Resource/PhoneNumber/PhoneNumber.cs | 14 ++++++--- .../PhoneNumber/PhoneNumberInterface.cs | 14 ++++++--- .../Resource/RentedNumber/RentedNumber.cs | 4 ++- .../RentedNumber/RentedNumberInterface.cs | 29 +++++++++++++++---- src/Plivo/Version.cs | 2 +- tests/Plivo.Test/Mocks/numberGetResponse.json | 3 +- .../Plivo.Test/Mocks/numberListResponse.json | 9 ++++-- version.json | 2 +- 11 files changed, 69 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a737d0..90f18255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## [5.31.0](https://github.com/plivo/plivo-dotnet/tree/v5.31.0) (2023-06-27) +**Feature - CNAM** +- Added New Param `cnam` in to the response of the [list all numbers API], [list single number API] +- Added `cnam` parameter to buy number[Buy a Phone Number] to configure CNAM while buying a US number +- Added `callback_url` parameter to buy number[Buy a Phone Number] to configure CNAM callback url while buying a US number +- Added `callback_method` parameter to buy number[Buy a Phone Number] to configure CNAM callback method while buying a US number +- Added `cnam` parameter to update number[Update an account phone number] to configure CNAM while updating a US number +- Added `callback_url` parameter to update number[Update an account phone number] to configure CNAM callback url while updating a US number +- Added `callback_method` parameter to update number[Update an account phone number] to configure CNAM callback method while updating a US number + ## [5.30.0](https://github.com/plivo/plivo-dotnet/tree/v5.30.0) (2023-05-02) **Feature - CNAM Lookup** - Added New Param `cnam_lookup` in to the response of the [list all numbers API], [list single number API] diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index e14a6d5e..356e002a 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.30.0 + 5.31.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 1b875070..8c972c57 100644 --- a/src/Plivo/Plivo.nuspec +++ b/src/Plivo/Plivo.nuspec @@ -4,7 +4,7 @@ A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML Plivo - 5.30.0 + 5.31.0 Plivo Plivo SDKs Team Plivo, Inc. @@ -12,6 +12,7 @@ http://github.com/plivo/plivo-dotnet false + * 5.31.0 Added New Param 'cnam' in to the response of the [list all numbers API], [list single number API] * 5.30.0 Added New Param 'cnam_lookup' in to the response of the [list all numbers API], [list single number API] * 5.29.0 Added New Param 'cnam_lookup_number_config' in GetCall and ListCalls * 5.28.0 Added new Params 'MonthlyRecordingStorageAmount', 'RecordingStorageRate', 'RecordingStorageDuration' and 'RoundedRecordingDuration' to List Recordings and Get Recording APIs diff --git a/src/Plivo/Resource/PhoneNumber/PhoneNumber.cs b/src/Plivo/Resource/PhoneNumber/PhoneNumber.cs index f906d0c0..f33fb26d 100755 --- a/src/Plivo/Resource/PhoneNumber/PhoneNumber.cs +++ b/src/Plivo/Resource/PhoneNumber/PhoneNumber.cs @@ -65,9 +65,12 @@ public override string ToString() /// The buy. /// App identifier. /// CnamLookup. - public PhoneNumberBuyResponse Buy(string appId = null, string cnamLookup = null) + /// Cnam. + /// CallbackUrl. + /// CallbackMethod. + public PhoneNumberBuyResponse Buy(string appId = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null) { - return ((PhoneNumberInterface) Interface).Buy(Id, appId, cnamLookup); + return ((PhoneNumberInterface) Interface).Buy(Id, appId, cnamLookup, cnam, callbackUrl, callbackMethod); } /// /// Asynchronously buy PhoneNumber and associate it with @@ -76,9 +79,12 @@ public PhoneNumberBuyResponse Buy(string appId = null, string cnamLookup = null) /// The buy. /// App identifier. /// Cnam Lookup - public async Task BuyAsync(string appId = null, string cnamLookup = null) + /// Cnam. + /// CallbackUrl. + /// CallbackMethod. + public async Task BuyAsync(string appId = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null) { - return await ((PhoneNumberInterface)Interface).BuyAsync(Id, appId, cnamLookup); + return await ((PhoneNumberInterface)Interface).BuyAsync(Id, appId, cnamLookup, cnam, callbackUrl, callbackMethod); } #endregion } diff --git a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs index 14ca5a9b..8ac63cb0 100755 --- a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs +++ b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs @@ -133,12 +133,15 @@ public async Task> ListAsync( /// App identifier. /// Verification information. address_id and identity_id are the keys /// Cnam Lookup - public PhoneNumberBuyResponse Buy(string number, string appId = null, string cnamLookup = null, + /// Cnam + /// CallbackUrl + /// CallbackMethod + public PhoneNumberBuyResponse Buy(string number, string appId = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, Dictionary verificationInfo = null ) { var mandatoryParams = new List {""}; var data = CreateData( - mandatoryParams, new {appId, verificationInfo, cnamLookup}); + mandatoryParams, new {appId, verificationInfo, cnamLookup, cnam, callbackUrl, callbackMethod}); return ExecuteWithExceptionUnwrap(() => { @@ -159,12 +162,15 @@ public PhoneNumberBuyResponse Buy(string number, string appId = null, string cna /// App identifier. /// Verification information. address_id and identity_id are the keys /// Cnam Lookup - public async Task BuyAsync(string number, string appId = null, string cnamLookup = null, + /// Cnam + /// CallbackUrl + /// CallbackMethod + public async Task BuyAsync(string number, string appId = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, Dictionary verificationInfo = null) { var mandatoryParams = new List { "" }; var data = CreateData( - mandatoryParams, new { appId, verificationInfo, cnamLookup }); + mandatoryParams, new { appId, verificationInfo, cnamLookup, cnam, callbackUrl, callbackMethod}); var result = await Client.Update( Uri + number + "/", data diff --git a/src/Plivo/Resource/RentedNumber/RentedNumber.cs b/src/Plivo/Resource/RentedNumber/RentedNumber.cs index 8a756a8d..1713412f 100755 --- a/src/Plivo/Resource/RentedNumber/RentedNumber.cs +++ b/src/Plivo/Resource/RentedNumber/RentedNumber.cs @@ -36,7 +36,8 @@ public class RentedNumber : Resource public string TollFreeSmsVerification {get; set;} public string RenewalDate {get; set;} public string CnamLookup {get; set;} - + public string Cnam{get; set;} + public override string ToString() { if (string.Compare(Carrier, "Plivo", StringComparison.Ordinal) == 0) @@ -50,6 +51,7 @@ public override string ToString() "City: " + City + "\n" + "Country: " + Country + "\n" + "CnamLookup: " + CnamLookup + "\n" + + "Cnam: " + Cnam + "\n" + "MmsEnabled: " + MmsEnabled + "\n" + "MmsRate: " + MmsRate + "\n" + "MonthlyRentalRate: " + MonthlyRentalRate + "\n" + diff --git a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs index 3d1e235c..e6ea1d73 100755 --- a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs +++ b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs @@ -72,6 +72,7 @@ public async Task GetAsync(string number) /// Renewal Date Greater Than /// Renewal Date Greater Than or Equal /// Cnam Lookup configuration + /// Cnam configuration public ListResponse List( string type = null, string numberStartswith = null, string subaccount = null, string alias = null, @@ -82,6 +83,7 @@ public ListResponse List( string renewalDate_Lt = null, string renewalDate_Lte = null, string renewalDate_Gt = null, string renewalDate_Gte = null, string cnamLookup = null, + string cnam = null, uint? limit = null, uint? offset = null) { var mandatoryParams = new List {""}; @@ -103,6 +105,7 @@ public ListResponse List( renewalDate_Gte, renewalDate_Gt, cnamLookup, + cnam, limit, offset }); @@ -228,7 +231,7 @@ public async Task> AddNumberAsync( #region Update /// - /// Update RentedNumber with the specified number, appId, subaccount and alias. + /// Update RentedNumber with the specified number, appId, subaccount, alias, cnamLookup, cnam , callbackUrl and callbackMethod. /// /// The update. /// Number. @@ -237,9 +240,13 @@ public async Task> AddNumberAsync( /// Alias. /// Verification Information. /// Cnam Lookup. + /// Cnam + /// CallbackUrl + /// CallbackMethod public UpdateResponse Update( string number, string appId = null, string subaccount = null, - string alias = null, Dictionary verificationInfo = null, string cnamLookup = null) + string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, + string cnam = null, string callbackUrl = null, string callbackMethod = null) { var mandatoryParams = new List {""}; var data = CreateData( @@ -250,7 +257,10 @@ public UpdateResponse Update( subaccount, alias, verificationInfo, - cnamLookup + cnamLookup, + cnam, + callbackUrl, + callbackMethod }); if (appId == "null") data["app_id"] = null; @@ -265,7 +275,7 @@ public UpdateResponse Update( }); } /// - /// Asynchronously update RentedNumber with the specified number, appId, subaccount and alias. + /// Asynchronously update RentedNumber with the specified number, appId, subaccount cnamLookup, cnam , callbackUrl and callbackMethod. /// /// The update. /// Number. @@ -274,9 +284,13 @@ public UpdateResponse Update( /// Alias. /// Verification Information. /// Cnam Lookup. + /// Cnam + /// CallbackUrl + /// CallbackMethod public async Task> UpdateAsync( string number, string appId = null, string subaccount = null, - string alias = null, Dictionary verificationInfo = null, string cnamLookup = null) + string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, + string cnam = null, string callbackUrl = null, string callbackMethod = null) { var mandatoryParams = new List { "" }; var data = CreateData( @@ -287,7 +301,10 @@ public async Task> UpdateAsync( subaccount, alias, verificationInfo, - cnamLookup + cnamLookup, + cnam, + callbackUrl, + callbackMethod }); if (appId == "null") data["app_id"] = null; var result = await Client.Update>( diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index 95c2b4aa..ff096991 100644 --- a/src/Plivo/Version.cs +++ b/src/Plivo/Version.cs @@ -10,7 +10,7 @@ public class Version /// /// DotNet SDK version /// - public const string SdkVersion = "5.30.0"; + public const string SdkVersion = "5.31.0"; /// /// Plivo API version /// diff --git a/tests/Plivo.Test/Mocks/numberGetResponse.json b/tests/Plivo.Test/Mocks/numberGetResponse.json index 2798285a..a5c1a06f 100755 --- a/tests/Plivo.Test/Mocks/numberGetResponse.json +++ b/tests/Plivo.Test/Mocks/numberGetResponse.json @@ -18,5 +18,6 @@ "tendlc_registration_status": "COMPLETED", "toll_free_sms_verification": "verified", "renewal_date": "2023-05-01", - "cnam_lookup": "enabled" + "cnam_lookup": "enabled", + "cnam": "test1" } diff --git a/tests/Plivo.Test/Mocks/numberListResponse.json b/tests/Plivo.Test/Mocks/numberListResponse.json index 4d3bbc29..dcc4cf1f 100755 --- a/tests/Plivo.Test/Mocks/numberListResponse.json +++ b/tests/Plivo.Test/Mocks/numberListResponse.json @@ -27,7 +27,8 @@ "tendlc_registration_status": "COMPLETED", "toll_free_sms_verification": "verified", "renewal_date": "2023-05-01", - "cnam_lookup": "enabled" + "cnam_lookup": "enabled", + "cnam": "test1" }, { "added_on": "2013-01-01", @@ -48,7 +49,8 @@ "tendlc_registration_status": "COMPLETED", "toll_free_sms_verification": "verified", "renewal_date": "2023-05-01", - "cnam_lookup": "enabled" + "cnam_lookup": "enabled", + "cnam": "test1" }, { "added_on": "2013-03-25", @@ -69,7 +71,8 @@ "tendlc_registration_status": "COMPLETED", "toll_free_sms_verification": "verified", "renewal_date": "2023-05-01", - "cnam_lookup": "enabled" + "cnam_lookup": "enabled", + "cnam": "test1" } ] } diff --git a/version.json b/version.json index 128391ac..53269aac 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.30.0", + "version": "5.31.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" From 44c6324d030d03fd90568e4a335fa0d7e100abd4 Mon Sep 17 00:00:00 2001 From: abheet-plivo <83641147+abheet-plivo@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:34:51 +0530 Subject: [PATCH 2/7] update response --- src/Plivo/Resource/PhoneNumber/PhoneNumberBuyResponse.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Plivo/Resource/PhoneNumber/PhoneNumberBuyResponse.cs b/src/Plivo/Resource/PhoneNumber/PhoneNumberBuyResponse.cs index 91541231..e27f5f8e 100755 --- a/src/Plivo/Resource/PhoneNumber/PhoneNumberBuyResponse.cs +++ b/src/Plivo/Resource/PhoneNumber/PhoneNumberBuyResponse.cs @@ -9,7 +9,7 @@ public class PhoneNumberBuyResponse : BaseResponse public override string ToString() { - return "StatusCode:" + Status +"\n"+"[Numbers]\n" + string.Join("\n", Numbers)+"\n"+"StatusCode:" + StatusCode + "\n"; + return "Status:" + Status +"\n"+"[Numbers]\n" + string.Join("\n", Numbers)+"\n"+"StatusCode:" + StatusCode + "\n"; } } @@ -18,10 +18,15 @@ public class Phone { public string Number { get; set; } public string Status { get; set; } + public string NewCnam { get; set; } + public string CnamUpdateStatus { get; set; } public override string ToString() { - return "Number:" + Number + "\n"; + if (NewCnam != "") { + return "Number:" + Number + "\n" + "Status:" + Status + "\n" + "NewCnam:" + NewCnam + "\n" +"CnamUpdateStatus:" + CnamUpdateStatus + "\n"; + } + return "Number:" + Number + "\n" + "Status:" + Status + "\n"; } } From afe981fcd77d60f1bee3db61055399ef66475b49 Mon Sep 17 00:00:00 2001 From: abheet-plivo Date: Wed, 9 Aug 2023 14:19:26 +0530 Subject: [PATCH 3/7] handled params --- src/Plivo/Resource/NumberUpdateResponse.cs | 15 ++++++++ .../Resource/RentedNumber/RentedNumber.cs | 4 +-- .../RentedNumber/RentedNumberInterface.cs | 34 +++++++++---------- 3 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 src/Plivo/Resource/NumberUpdateResponse.cs diff --git a/src/Plivo/Resource/NumberUpdateResponse.cs b/src/Plivo/Resource/NumberUpdateResponse.cs new file mode 100644 index 00000000..0b33a230 --- /dev/null +++ b/src/Plivo/Resource/NumberUpdateResponse.cs @@ -0,0 +1,15 @@ +namespace Plivo.Resource +{ + public class NumberUpdateResponse : UpdateResponse + { + public string NewCnam { get; set; } + public string CnamUpdateStatus { get; set; } + + public override string ToString() + { + return base.ToString() + + "NewCnam: " + NewCnam + "\n" + + "CnamUpdateStatus: " + CnamUpdateStatus + "\n"; + } + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/RentedNumber/RentedNumber.cs b/src/Plivo/Resource/RentedNumber/RentedNumber.cs index 1713412f..5d6fec78 100755 --- a/src/Plivo/Resource/RentedNumber/RentedNumber.cs +++ b/src/Plivo/Resource/RentedNumber/RentedNumber.cs @@ -106,7 +106,7 @@ public override string ToString() /// App identifier. /// SubAccount. /// Alias. - public UpdateResponse Update( + public NumberUpdateResponse Update( string appId = null, string subAccount = null, string alias = null) { var updateResponse = @@ -134,7 +134,7 @@ public UpdateResponse Update( /// App identifier. /// SubAccount. /// Alias. - public async Task> UpdateAsync( + public async Task> UpdateAsync( string appId = null, string subAccount = null, string alias = null) { var updateResponse = await ((RentedNumberInterface) Interface) diff --git a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs index e6ea1d73..a21c21fe 100755 --- a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs +++ b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs @@ -190,7 +190,7 @@ public UpdateResponse AddNumber( return ExecuteWithExceptionUnwrap(() => { - var result = Task.Run(async () => await Client.Update>(Uri, data).ConfigureAwait(false)).Result; + var result = Task.Run(async () => await Client.Update>(Uri, data).ConfigureAwait(false)).Result; result.Object.StatusCode = result.StatusCode; return result.Object; }); @@ -205,7 +205,7 @@ public UpdateResponse AddNumber( /// Number type. /// App identifier. /// Subaccount. - public async Task> AddNumberAsync( + public async Task> AddNumberAsync( List numbers, string carrier, string region, string numberType = null, string appId = null, string subaccount = null) @@ -223,7 +223,7 @@ public async Task> AddNumberAsync( appId, subaccount }); - var result = await Client.Update>(Uri, data); + var result = await Client.Update>(Uri, data); result.Object.StatusCode = result.StatusCode; return result.Object; } @@ -241,12 +241,12 @@ public async Task> AddNumberAsync( /// Verification Information. /// Cnam Lookup. /// Cnam - /// CallbackUrl - /// CallbackMethod - public UpdateResponse Update( + /// callback_url + /// callback_method + public Number Update( string number, string appId = null, string subaccount = null, string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, - string cnam = null, string callbackUrl = null, string callbackMethod = null) + string cnam = null, string callback_url = null, string callback_method = null) { var mandatoryParams = new List {""}; var data = CreateData( @@ -259,14 +259,14 @@ public UpdateResponse Update( verificationInfo, cnamLookup, cnam, - callbackUrl, - callbackMethod + callback_url, + callback_method }); if (appId == "null") data["app_id"] = null; return ExecuteWithExceptionUnwrap(() => { - var result = Task.Run(async () => await Client.Update>( + var result = Task.Run(async () => await Client.Update>( Uri + number + "/", data ).ConfigureAwait(false)).Result; @@ -285,12 +285,12 @@ public UpdateResponse Update( /// Verification Information. /// Cnam Lookup. /// Cnam - /// CallbackUrl - /// CallbackMethod - public async Task> UpdateAsync( + /// callback_url + /// callback_method + public async Task> UpdateAsync( string number, string appId = null, string subaccount = null, string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, - string cnam = null, string callbackUrl = null, string callbackMethod = null) + string cnam = null, string callback_url = null, string callback_method = null) { var mandatoryParams = new List { "" }; var data = CreateData( @@ -303,11 +303,11 @@ public async Task> UpdateAsync( verificationInfo, cnamLookup, cnam, - callbackUrl, - callbackMethod + callback_url, + callback_method }); if (appId == "null") data["app_id"] = null; - var result = await Client.Update>( + var result = await Client.Update>( Uri + number + "/", data ); From c5cbebcf77a7478cb03200894c9df7cf3fe56b3a Mon Sep 17 00:00:00 2001 From: abheet-plivo Date: Wed, 9 Aug 2023 14:38:29 +0530 Subject: [PATCH 4/7] handled params --- src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs index a21c21fe..e25b8964 100755 --- a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs +++ b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs @@ -243,7 +243,7 @@ public async Task> AddNumberAsync( /// Cnam /// callback_url /// callback_method - public Number Update( + public NumberUpdateResponse Update( string number, string appId = null, string subaccount = null, string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, string cnam = null, string callback_url = null, string callback_method = null) From cc31604749ff2761951e273e21c56ba7da568f4f Mon Sep 17 00:00:00 2001 From: abheet-plivo Date: Wed, 9 Aug 2023 17:41:01 +0530 Subject: [PATCH 5/7] fix --- .../Resource/PhoneNumber/PhoneNumberInterface.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs index 8ac63cb0..5d86554d 100755 --- a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs +++ b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs @@ -130,18 +130,18 @@ public async Task> ListAsync( /// /// The buy. /// Number. - /// App identifier. + /// App identifier. /// Verification information. address_id and identity_id are the keys - /// Cnam Lookup + /// Cnam Lookup /// Cnam /// CallbackUrl /// CallbackMethod - public PhoneNumberBuyResponse Buy(string number, string appId = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, + public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, Dictionary verificationInfo = null ) { var mandatoryParams = new List {""}; var data = CreateData( - mandatoryParams, new {appId, verificationInfo, cnamLookup, cnam, callbackUrl, callbackMethod}); + mandatoryParams, new {app_id, verificationInfo, cnam_lookup, cnam, callbackUrl, callbackMethod}); return ExecuteWithExceptionUnwrap(() => { @@ -159,18 +159,18 @@ public PhoneNumberBuyResponse Buy(string number, string appId = null, string cna /// /// The buy. /// Number. - /// App identifier. + /// App identifier. /// Verification information. address_id and identity_id are the keys - /// Cnam Lookup + /// Cnam Lookup /// Cnam /// CallbackUrl /// CallbackMethod - public async Task BuyAsync(string number, string appId = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, + public async Task BuyAsync(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, Dictionary verificationInfo = null) { var mandatoryParams = new List { "" }; var data = CreateData( - mandatoryParams, new { appId, verificationInfo, cnamLookup, cnam, callbackUrl, callbackMethod}); + mandatoryParams, new { appId, verificationInfo, cnam_lookup, cnam, callbackUrl, callbackMethod}); var result = await Client.Update( Uri + number + "/", data From 9dbede3acfb52fe4232b443fda0c7be7a0c5d09a Mon Sep 17 00:00:00 2001 From: abheet-plivo Date: Wed, 9 Aug 2023 20:11:00 +0530 Subject: [PATCH 6/7] fix --- .../Resource/PhoneNumber/PhoneNumberInterface.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs index 5d86554d..cfe05dda 100755 --- a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs +++ b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs @@ -134,14 +134,14 @@ public async Task> ListAsync( /// Verification information. address_id and identity_id are the keys /// Cnam Lookup /// Cnam - /// CallbackUrl - /// CallbackMethod - public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, + /// callback_url + /// callback_method + public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callback_url = null, string callback_method = null, Dictionary verificationInfo = null ) { var mandatoryParams = new List {""}; var data = CreateData( - mandatoryParams, new {app_id, verificationInfo, cnam_lookup, cnam, callbackUrl, callbackMethod}); + mandatoryParams, new {app_id, verificationInfo, cnam_lookup, cnam, callback_url, callback_method}); return ExecuteWithExceptionUnwrap(() => { @@ -163,14 +163,14 @@ public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cn /// Verification information. address_id and identity_id are the keys /// Cnam Lookup /// Cnam - /// CallbackUrl - /// CallbackMethod - public async Task BuyAsync(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, + /// callback_url + /// callback_method + public async Task BuyAsync(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callback_url = null, string callback_method = null, Dictionary verificationInfo = null) { var mandatoryParams = new List { "" }; var data = CreateData( - mandatoryParams, new { appId, verificationInfo, cnam_lookup, cnam, callbackUrl, callbackMethod}); + mandatoryParams, new { app_id, verificationInfo, cnam_lookup, cnam, callback_url, callback_method}); var result = await Client.Update( Uri + number + "/", data From a3db3d3561a34ab13a2ff682baf16f63f5a96c9a Mon Sep 17 00:00:00 2001 From: abheet-plivo Date: Wed, 16 Aug 2023 18:04:15 +0530 Subject: [PATCH 7/7] fix --- .../PhoneNumber/PhoneNumberInterface.cs | 20 +++++++++---------- .../RentedNumber/RentedNumberInterface.cs | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs index cfe05dda..0dcc221c 100755 --- a/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs +++ b/src/Plivo/Resource/PhoneNumber/PhoneNumberInterface.cs @@ -132,16 +132,16 @@ public async Task> ListAsync( /// Number. /// App identifier. /// Verification information. address_id and identity_id are the keys - /// Cnam Lookup + /// Cnam Lookup /// Cnam - /// callback_url - /// callback_method - public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callback_url = null, string callback_method = null, + /// callbackUrl + /// callbackMethod + public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, Dictionary verificationInfo = null ) { var mandatoryParams = new List {""}; var data = CreateData( - mandatoryParams, new {app_id, verificationInfo, cnam_lookup, cnam, callback_url, callback_method}); + mandatoryParams, new {app_id, verificationInfo, cnamLookup, cnam, callbackUrl, callbackMethod}); return ExecuteWithExceptionUnwrap(() => { @@ -161,16 +161,16 @@ public PhoneNumberBuyResponse Buy(string number, string app_id = null, string cn /// Number. /// App identifier. /// Verification information. address_id and identity_id are the keys - /// Cnam Lookup + /// Cnam Lookup /// Cnam - /// callback_url - /// callback_method - public async Task BuyAsync(string number, string app_id = null, string cnam_lookup = null, string cnam = null, string callback_url = null, string callback_method = null, + /// callbackUrl + /// callbackMethod + public async Task BuyAsync(string number, string app_id = null, string cnamLookup = null, string cnam = null, string callbackUrl = null, string callbackMethod = null, Dictionary verificationInfo = null) { var mandatoryParams = new List { "" }; var data = CreateData( - mandatoryParams, new { app_id, verificationInfo, cnam_lookup, cnam, callback_url, callback_method}); + mandatoryParams, new { app_id, verificationInfo, cnamLookup, cnam, callbackUrl, callbackMethod}); var result = await Client.Update( Uri + number + "/", data diff --git a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs index e25b8964..05c3b02d 100755 --- a/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs +++ b/src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs @@ -241,12 +241,12 @@ public async Task> AddNumberAsync( /// Verification Information. /// Cnam Lookup. /// Cnam - /// callback_url - /// callback_method + /// callbackUrl + /// callbackMethod public NumberUpdateResponse Update( string number, string appId = null, string subaccount = null, string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, - string cnam = null, string callback_url = null, string callback_method = null) + string cnam = null, string callbackUrl = null, string callbackMethod = null) { var mandatoryParams = new List {""}; var data = CreateData( @@ -259,8 +259,8 @@ public NumberUpdateResponse Update( verificationInfo, cnamLookup, cnam, - callback_url, - callback_method + callbackUrl, + callbackMethod }); if (appId == "null") data["app_id"] = null; @@ -285,12 +285,12 @@ public NumberUpdateResponse Update( /// Verification Information. /// Cnam Lookup. /// Cnam - /// callback_url - /// callback_method + /// callbackUrl + /// callbackMethod public async Task> UpdateAsync( string number, string appId = null, string subaccount = null, string alias = null, Dictionary verificationInfo = null, string cnamLookup = null, - string cnam = null, string callback_url = null, string callback_method = null) + string cnam = null, string callbackUrl = null, string callbackMethod = null) { var mandatoryParams = new List { "" }; var data = CreateData( @@ -303,8 +303,8 @@ public async Task> UpdateAsync( verificationInfo, cnamLookup, cnam, - callback_url, - callback_method + callbackUrl, + callbackMethod }); if (appId == "null") data["app_id"] = null; var result = await Client.Update>(