From 71f90bb2a06eb06afbeb09e0d617a3678d5d51eb Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 22 Apr 2024 09:38:16 +0530 Subject: [PATCH 01/15] MaskingSessionAdded --- .../Resource/MaskingSession/AsyncResponse.cs | 6 + .../Resource/MaskingSession/MaskingSession.cs | 134 +++++++ .../MaskingSessionCreateResponse.cs | 20 + .../MaskingSession/MaskingSessionInterface.cs | 350 ++++++++++++++++++ 4 files changed, 510 insertions(+) create mode 100644 src/Plivo/Resource/MaskingSession/AsyncResponse.cs create mode 100644 src/Plivo/Resource/MaskingSession/MaskingSession.cs create mode 100644 src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs create mode 100644 src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs diff --git a/src/Plivo/Resource/MaskingSession/AsyncResponse.cs b/src/Plivo/Resource/MaskingSession/AsyncResponse.cs new file mode 100644 index 00000000..a57d714c --- /dev/null +++ b/src/Plivo/Resource/MaskingSession/AsyncResponse.cs @@ -0,0 +1,6 @@ +namespace Plivo.Resource.MaskingSession +{ + public class AsyncResponse : BaseResponse + { + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/MaskingSession/MaskingSession.cs b/src/Plivo/Resource/MaskingSession/MaskingSession.cs new file mode 100644 index 00000000..1c9d3c84 --- /dev/null +++ b/src/Plivo/Resource/MaskingSession/MaskingSession.cs @@ -0,0 +1,134 @@ + +using System; +using System.Threading.Tasks; + +namespace Plivo.Resource.MaskingSession +{ + public class MaskingSession : Resource + { + public new string Id => SessionUuid; + public string FirstParty { get; set; } + public string SecondParty { get; set; } + public string VirtualNumber { get; set; } + public string Status { get; set; } + public bool InitiateCallToFirstParty { get; set; } + public string SessionUuid { get; set; } + public string CallbackUrl { get; set; } + public string CallbackMethod { get; set; } + public string CreatedTime { get; set; } + public string ModifiedTime { get; set; } + public string ExpiryTime { get; set; } + public int Duration { get; set; } + public int Amount { get; set; } + public int CallTimeLimit { get; set; } + public int RingTimeout { get; set; } + public string FirstPartyPlayUrl { get; set; } + public string SecondPartyPlayUrl { get; set; } + public bool Record { get; set; } + public string RecordFileFormat { get; set; } + public string RecordingCallbackUrl { get; set; } + public string RecordingCallbackMethod { get; set; } + public Object Interaction { get; set; } + public float TotalCallAmount { get; set; } + public int TotalCallCount { get; set; } + public int TotalCallBilledDuration { get; set; } + public float TotalSessionAmount { get; set; } + public string LastInteractionTime { get; set; } + public bool IsPinAuthenticationRequired { get; set; } + public bool GeneratePin { get; set; } + public Int64 GeneratePinLength { get; set; } + public string FirstPartyPin { get; set; } + public string SecondPartyPin { get; set; } + public string PinPromptPlay { get; set; } + public Int64 PinRetry { get; set; } + public Int64 PinRetryWait { get; set; } + public string IncorrectPinPlay { get; set; } + public string UnknownCallerPlay { get; set; } + + public override string ToString() + { + return "api_id: " + ApiId + "\n"+ + "first_party: " + FirstParty + "\n"+ + "second_party: " + SecondParty + "\n"+ + "virtual_number: " + VirtualNumber + "\n"+ + "status: " + Status + "\n"+ + "initiate_call_to_first_party: " + InitiateCallToFirstParty + "\n"+ + "session_uuid: " + SessionUuid + "\n"+ + "callback_url: " + CallbackUrl + "\n"+ + "callback_method: " + CallbackMethod + "\n"+ + "created_time: " + CreatedTime + "\n"+ + "modified_time: " + ModifiedTime + "\n"+ + "expiry_time: " + ExpiryTime + "\n"+ + "duration: " + Duration + "\n"+ + "amount: " + Amount + "\n"+ + "call_time_limit: " + CallTimeLimit + "\n"+ + "ring_timeout: " + RingTimeout + "\n"+ + "first_party_play_url: " + FirstPartyPlayUrl + "\n"+ + "second_party_play_url: " + SecondPartyPlayUrl + "\n"+ + "record: " + Record + "\n"+ + "record_file_format: " + RecordFileFormat + "\n"+ + "recording_callback_url: " + RecordingCallbackUrl + "\n"+ + "recording_callback_method: " + RecordingCallbackMethod + "\n"+ + "interaction: " + Interaction + "\n"+ + "total_call_amount: " + TotalCallAmount + "\n"+ + "total_call_count: " + TotalCallCount + "\n"+ + "total_call_billed_duration: " + TotalCallBilledDuration + "\n"+ + "total_session_amount: " + TotalSessionAmount + "\n"+ + "last_interaction_time: " + LastInteractionTime + "\n"+ + "is_pin_authentication_required: " + IsPinAuthenticationRequired + "\n"+ + "generate_pin: " + GeneratePin + "\n"+ + "generate_pin_length: " + GeneratePinLength + "\n"+ + "first_party_pin: " + FirstPartyPin + "\n"+ + "second_party_pin: " + SecondPartyPin + "\n"+ + "pin_prompt_play: " + PinPromptPlay + "\n"+ + "pin_retry: " + PinRetry + "\n"+ + "pin_retry_wait: " + PinRetryWait + "\n"+ + "incorrect_pin_play: " + IncorrectPinPlay + "\n"+ + "unknown_caller_play: " + UnknownCallerPlay + "\n"; + } + + #region Delete + public DeleteResponse Delete() + { + return ((MaskingSessionInterface) Interface).Delete(Id); + } + public async Task DeleteAsync(string Id) + { + return await ((MaskingSessionInterface)Interface).DeleteAsync(Id); + } + #endregion + + + #region Update + public UpdateResponse Update(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, + bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, + string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, + string recording_callback_method = null, string subaccount = null, bool? geomatch = null + ) + { + var updateResponse = + ((MaskingSessionInterface) Interface) + .Update(Id, session_expiry, call_time_limit, record, record_file_format, recording_callback_url, callback_url, + callback_method, ring_timeout, first_party_play_url, second_party_play_url, recording_callback_method, + subaccount, geomatch); + return updateResponse; + } + + public async Task UpdateAsync(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, + bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, + string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, + string recording_callback_method = null, string subaccount = null, bool? geomatch = null + ) + { + var updateResponse = await + ((MaskingSessionInterface)Interface) + .UpdateAsync(Id, session_expiry, call_time_limit, record, record_file_format, recording_callback_url, callback_url, + callback_method, ring_timeout, first_party_play_url, second_party_play_url, recording_callback_method, + subaccount, geomatch); + + return updateResponse; + } + #endregion + + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs new file mode 100644 index 00000000..07570596 --- /dev/null +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs @@ -0,0 +1,20 @@ + +namespace Plivo.Resource.MaskingSession +{ + public class MaskingSessionCreateResponse : CreateResponse + { + public string SessionUuid { get; set; } + public string VirtualNumber { get; set; } + public string SessionMessage { get; set; } + public string Session { get; set; } + + public override string ToString() + { + return base.ToString() + + "Session Uuid: " + SessionUuid + "\n" + + "VirtualNumber: " + VirtualNumber + "\n" + + "Message: " + SessionMessage + "\n" + + "Session: " + Session + "\n"; + } + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs new file mode 100644 index 00000000..f54158f1 --- /dev/null +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -0,0 +1,350 @@ +using Plivo.Client; +using System.Collections.Generic; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; +using System; + +namespace Plivo.Resource.MaskingSession +{ + public class MaskingSessionInterface : ResourceInterface + { + public MaskingSessionInterface(HttpClient client) : base(client) + { + Uri = "Account/" + Client.GetAuthId() + "/Masking/Session"; + } + + #region Create + public MaskingSessionCreateResponse Create( + string firstParty, string secondParty, uint? sessionExpiry = null, uint? callTimeLimit = null, + bool? record = null, string recordFileFormat = null, string recordingCallbackUrl = null, bool? initiateCallToFirstParty = null, + string callbackUrl = null, string callbackMethod = null, uint? ringTimeout = null, string firstPartyPlayUrl = null, + string secondPartyPlayUrl = null, string recordingCallbackMethod = null, bool? isPinAuthenticationRequired = null, + bool? generatePin = null, uint? generatePinLength = null, string firstPartyPin = null, string secondPartyPin = null, + string pinPromptPlay = null, uint? pinRetry = null, uint? pinRetryWait = null, string incorrectPinPlay = null, + string unknownCallerPlay = null, string subaccount = null, bool? geomatch = null + ) + { + var mandatoryParams = new List { "firstParty", "secondParty" }; + bool isVoiceRequest = true; + var data = CreateData( + mandatoryParams, + new + { + firstParty, + secondParty, + sessionExpiry, + callTimeLimit, + record, + recordFileFormat, + recordingCallbackUrl, + initiateCallToFirstParty, + callbackUrl, + callbackMethod, + ringTimeout, + firstPartyPlayUrl, + secondPartyPlayUrl, + recordingCallbackMethod, + isPinAuthenticationRequired, + generatePin, + generatePinLength, + firstPartyPin, + secondPartyPin, + pinPromptPlay, + pinRetry, + pinRetryWait, + incorrectPinPlay, + unknownCallerPlay, + subaccount, + geomatch, + isVoiceRequest + }); + + return ExecuteWithExceptionUnwrap(() => + { + var result = Task.Run(async () => await Client.Update(Uri, data).ConfigureAwait(false)).Result; + result.Object.StatusCode = result.StatusCode; + return result.Object; + }); + } + + public async Task CreateAsync( + string firstParty, string secondParty, uint? sessionExpiry = null, uint? callTimeLimit = null, + bool? record = null, string recordFileFormat = null, string recordingCallbackUrl = null, bool? initiateCallToFirstParty = null, + string callbackUrl = null, string callbackMethod = null, uint? ringTimeout = null, string firstPartyPlayUrl = null, + string secondPartyPlayUrl = null, string recordingCallbackMethod = null, bool? isPinAuthenticationRequired = null, + bool? generatePin = null, uint? generatePinLength = null, string firstPartyPin = null, string secondPartyPin = null, + string pinPromptPlay = null, uint? pinRetry = null, uint? pinRetryWait = null, string incorrectPinPlay = null, + string unknownCallerPlay = null, string subaccount = null, bool? geomatch = null + ) + { + var mandatoryParams = new List { "firstParty", "secondParty" }; + bool isVoiceRequest = true; + var data = CreateData( + mandatoryParams, + new + { + firstParty, + secondParty, + sessionExpiry, + callTimeLimit, + record, + recordFileFormat, + recordingCallbackUrl, + initiateCallToFirstParty, + callbackUrl, + callbackMethod, + ringTimeout, + firstPartyPlayUrl, + secondPartyPlayUrl, + recordingCallbackMethod, + isPinAuthenticationRequired, + generatePin, + generatePinLength, + firstPartyPin, + secondPartyPin, + pinPromptPlay, + pinRetry, + pinRetryWait, + incorrectPinPlay, + unknownCallerPlay, + subaccount, + geomatch, + isVoiceRequest + }); + + var result = Task.Run(async () => await Client.Update(Uri, data).ConfigureAwait(false)).Result; + await Task.WhenAll(); + result.Object.StatusCode = result.StatusCode; + JObject responseJson = JObject.Parse(result.Content); + result.Object.ApiId = responseJson["api_id"].ToString(); + result.Object.Message = responseJson["message"].ToString(); + return result.Object; + } + #endregion + + + #region Get + public MaskingSession Get(string sessionUuid) + { + return ExecuteWithExceptionUnwrap(() => + { + var endpoint = Task.Run(async () => await GetResource(sessionUuid, new Dictionary () { {"is_voice_request", true} }).ConfigureAwait(false)).Result; + endpoint.Interface = this; + return endpoint; + }); + } + + public async Task GetAsync(string sessionUuid) + { + var data = new Dictionary() + { + {"is_voice_request", true} + }; + var result = Task.Run(async () => await Client.Fetch( + Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; + await Task.WhenAll(); + result.Object.StatusCode = result.StatusCode; + JObject responseJson = JObject.Parse(result.Content); + result.Object.ApiId = responseJson["api_id"].ToString(); + result.Object.Message = responseJson["message"].ToString(); + return result.Object; + } + #endregion + + + #region List + public ListResponse List( + string first_party = null, string second_party = null, string virtual_number = null, string status = null, + string created_time = null, string created_time__lt = null,string created_time__gt = null,string created_time__lte = null, + string created_time__gte = null, string expiry_time = null,string expiry_time__lt = null,string expiry_time__gt = null, + string expiry_time__lte = null,string expiry_time__gte = null, uint? duration = null,uint? duration__lt = null, + uint? duration__gt = null,uint? duration__lte = null,uint? duration__gte = null,uint? limit = null, uint? offset = null, + string subaccount=null) + { + var mandatoryParams = new List { "" }; + bool isVoiceRequest = true; + var data = CreateData(mandatoryParams, + new { + first_party, + second_party, + virtual_number, + status, + created_time, + created_time__lt, + created_time__gt, + created_time__lte, + created_time__gte, + expiry_time, + expiry_time__lt, + expiry_time__gt, + expiry_time__lte, + expiry_time__gte, + duration, + duration__lt, + duration__gt, + duration__lte, + duration__gte, + limit, + offset, + subaccount, + isVoiceRequest + }); + return ExecuteWithExceptionUnwrap(() => + { + var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; + + resources.Objects.ForEach( + (obj) => obj.Interface = this + ); + + return resources; + }); + } + + public async Task ListAsync( + string first_party = null, string second_party = null, string virtual_number = null, string status = null, + string created_time = null, string created_time__lt = null,string created_time__gt = null,string created_time__lte = null, + string created_time__gte = null, string expiry_time = null,string expiry_time__lt = null,string expiry_time__gt = null, + string expiry_time__lte = null,string expiry_time__gte = null, uint? duration = null,uint? duration__lt = null, + uint? duration__gt = null,uint? duration__lte = null,uint? duration__gte = null,uint? limit = null, uint? offset = null, + string subaccount=null) + { + var mandatoryParams = new List { "" }; + bool isVoiceRequest = true; + var data = CreateData(mandatoryParams, + new { + first_party, + second_party, + virtual_number, + status, + created_time, + created_time__lt, + created_time__gt, + created_time__lte, + created_time__gte, + expiry_time, + expiry_time__lt, + expiry_time__gt, + expiry_time__lte, + expiry_time__gte, + duration, + duration__lt, + duration__gt, + duration__lte, + duration__gte, + limit, + offset, + subaccount, + isVoiceRequest + }); + var result = Task.Run(async () => await Client.Fetch( + Uri, data).ConfigureAwait(false)).Result; + await Task.WhenAll(); + result.Object.StatusCode = result.StatusCode; + JObject responseJson = JObject.Parse(result.Content); + result.Object.ApiId = responseJson["api_id"].ToString(); + result.Object.Message = responseJson["message"].ToString(); + return result.Object; + } + #endregion + + #region Delete + public DeleteResponse Delete(string sessionUuid) + { + return ExecuteWithExceptionUnwrap(() => + { + return Task.Run(async () => await DeleteResource>(sessionUuid, new Dictionary () { {"is_voice_request", true} }).ConfigureAwait(false)).Result; + }); + } + + public async Task DeleteAsync(string sessionUuid) + { + var data = new Dictionary() + { + {"is_voice_request", true} + }; + var result = Task.Run(async () => await Client.Delete( + Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; + await Task.WhenAll(); + result.Object.StatusCode = result.StatusCode; + return result.Object; + } + #endregion + + + #region Update + public UpdateResponse Update(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, + bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, + string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, + string recording_callback_method = null, string subaccount = null, bool? geomatch = null + ) + { + var mandatoryParams = new List { "" }; + bool isVoiceRequest = true; + var data = CreateData( + mandatoryParams, + new + { + session_expiry, + call_time_limit, + record, + record_file_format, + recording_callback_url, + callback_url, + callback_method, + ring_timeout, + first_party_play_url, + second_party_play_url, + recording_callback_method, + subaccount, + geomatch, + isVoiceRequest + }); + + return ExecuteWithExceptionUnwrap(() => + { + var result = Task.Run(async () => await Client.Update>(Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; + result.Object.StatusCode = result.StatusCode; + return result.Object; + }); + } + + public async Task UpdateAsync(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, + bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, + string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, + string recording_callback_method = null, string subaccount = null, bool? geomatch = null + ) + { + var mandatoryParams = new List { "" }; + bool isVoiceRequest = true; + var data = CreateData( + mandatoryParams, + new + { + session_expiry, + call_time_limit, + record, + record_file_format, + recording_callback_url, + callback_url, + callback_method, + ring_timeout, + first_party_play_url, + second_party_play_url, + recording_callback_method, + subaccount, + geomatch, + isVoiceRequest + } + ); + var result = Task.Run(async () => await Client.Update(Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; + await Task.WhenAll(); + result.Object.StatusCode = result.StatusCode; + JObject responseJson = JObject.Parse(result.Content); + result.Object.ApiId = responseJson["api_id"].ToString(); + result.Object.Message = responseJson["message"].ToString(); + return result.Object; + } + #endregion + } +} \ No newline at end of file From 3faf7a4dd77a0223687e39d0aa0e6af2f55ba923 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 22 Apr 2024 09:41:49 +0530 Subject: [PATCH 02/15] documentUpdated --- CHANGELOG.md | 4 ++++ src/Plivo/Version.cs | 2 +- version.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfe923aa..975bb54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.44.0](https://github.com/plivo/plivo-dotnet/tree/v5.44.0) (2024-04-22) +**Feature - Masking Session Functionality Added** +- Added Masking Session APIs + ## [5.43.2](https://github.com/plivo/plivo-dotnet/tree/v5.43.2) (2024-04-4) **Feature - new response field declined_reasons field** - Added new response field `declined_reasons` for LIST / GET Brand APIs diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index 5c2cd09b..4dacac2c 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.43.2"; + public const string SdkVersion = "5.44.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index 88071a9e..2bf6a325 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.43.2", + "version": "5.44.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" From 8798176937418544449703b489fc7f6fa07bdb1d Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Sat, 4 May 2024 13:41:26 +0530 Subject: [PATCH 03/15] new_commit --- src/Plivo/PlivoApi.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Plivo/PlivoApi.cs b/src/Plivo/PlivoApi.cs index 85f3ac36..e8d7908c 100755 --- a/src/Plivo/PlivoApi.cs +++ b/src/Plivo/PlivoApi.cs @@ -6,6 +6,7 @@ using Plivo.Resource.Call; using Plivo.Resource.Conference; using Plivo.Resource.Endpoint; +using Plivo.Resource.MaskingSession; using Plivo.Resource.Message; using Plivo.Resource.VerifySession; using Plivo.Resource.Lookup; @@ -66,6 +67,7 @@ public class PlivoApi private readonly Lazy _profile; private readonly Lazy _media; private readonly Lazy _endpoint; + private readonly Lazy _maskingSession; private readonly Lazy _pricing; private readonly Lazy _recording; private readonly Lazy _number; @@ -148,7 +150,13 @@ public class PlivoApi /// /// The endpoint. public EndpointInterface Endpoint => _endpoint.Value; - + + /// + /// Gets the maskingSession. + /// + /// The maskingSession. + public MaskingSessionInterface MaskingSession => _maskingSession.Value; + /// /// Gets the pricing. /// @@ -206,8 +214,7 @@ public class PlivoApi public TollfreeVerificationInterface TollfreeVerification => _tollfreeVerification.Value; public VerifyCallerIdInterface VerifyCallerId => _verifyCallerId.Value; - - + /// /// Initializes a new instance of the class. /// @@ -243,6 +250,7 @@ public PlivoApi( _campiagn = new Lazy(() => new CampaignInterface(Client)); _media = new Lazy(() => new MediaInterface(Client)); _endpoint = new Lazy(() => new EndpointInterface(Client)); + _maskingSession = new Lazy(() => new MaskingSessionInterface(Client)); _pricing = new Lazy(() => new PricingInterface(Client)); _recording = new Lazy(() => new RecordingInterface(Client)); _number = new Lazy(() => new RentedNumberInterface(Client)); From 014546348c221f1817bd5df6a5a2a20ab3a03474 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 7 May 2024 10:24:39 +0530 Subject: [PATCH 04/15] urlChanged --- src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index f54158f1..57872d90 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -10,7 +10,7 @@ public class MaskingSessionInterface : ResourceInterface { public MaskingSessionInterface(HttpClient client) : base(client) { - Uri = "Account/" + Client.GetAuthId() + "/Masking/Session"; + Uri = "Account/" + Client.GetAuthId() + "/Masking/Session/"; } #region Create From 3dedfca5f81012cab7aa4c758fb2096a51d6a4ad Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 7 May 2024 17:42:42 +0530 Subject: [PATCH 05/15] MaskingSessionGet --- .../Resource/MaskingSession/MaskingSession.cs | 76 +++++++++---------- .../MaskingSession/MaskingSessionInterface.cs | 8 +- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSession.cs b/src/Plivo/Resource/MaskingSession/MaskingSession.cs index 1c9d3c84..3d51a192 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSession.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSession.cs @@ -47,44 +47,44 @@ public class MaskingSession : Resource public override string ToString() { - return "api_id: " + ApiId + "\n"+ - "first_party: " + FirstParty + "\n"+ - "second_party: " + SecondParty + "\n"+ - "virtual_number: " + VirtualNumber + "\n"+ - "status: " + Status + "\n"+ - "initiate_call_to_first_party: " + InitiateCallToFirstParty + "\n"+ - "session_uuid: " + SessionUuid + "\n"+ - "callback_url: " + CallbackUrl + "\n"+ - "callback_method: " + CallbackMethod + "\n"+ - "created_time: " + CreatedTime + "\n"+ - "modified_time: " + ModifiedTime + "\n"+ - "expiry_time: " + ExpiryTime + "\n"+ - "duration: " + Duration + "\n"+ - "amount: " + Amount + "\n"+ - "call_time_limit: " + CallTimeLimit + "\n"+ - "ring_timeout: " + RingTimeout + "\n"+ - "first_party_play_url: " + FirstPartyPlayUrl + "\n"+ - "second_party_play_url: " + SecondPartyPlayUrl + "\n"+ - "record: " + Record + "\n"+ - "record_file_format: " + RecordFileFormat + "\n"+ - "recording_callback_url: " + RecordingCallbackUrl + "\n"+ - "recording_callback_method: " + RecordingCallbackMethod + "\n"+ - "interaction: " + Interaction + "\n"+ - "total_call_amount: " + TotalCallAmount + "\n"+ - "total_call_count: " + TotalCallCount + "\n"+ - "total_call_billed_duration: " + TotalCallBilledDuration + "\n"+ - "total_session_amount: " + TotalSessionAmount + "\n"+ - "last_interaction_time: " + LastInteractionTime + "\n"+ - "is_pin_authentication_required: " + IsPinAuthenticationRequired + "\n"+ - "generate_pin: " + GeneratePin + "\n"+ - "generate_pin_length: " + GeneratePinLength + "\n"+ - "first_party_pin: " + FirstPartyPin + "\n"+ - "second_party_pin: " + SecondPartyPin + "\n"+ - "pin_prompt_play: " + PinPromptPlay + "\n"+ - "pin_retry: " + PinRetry + "\n"+ - "pin_retry_wait: " + PinRetryWait + "\n"+ - "incorrect_pin_play: " + IncorrectPinPlay + "\n"+ - "unknown_caller_play: " + UnknownCallerPlay + "\n"; + return "ApiId: " + ApiId + "\n"+ + "FirstParty: " + FirstParty + "\n"+ + "SecondParty: " + SecondParty + "\n"+ + "VirtualNumber: " + VirtualNumber + "\n"+ + "Status: " + Status + "\n"+ + "InitiateCallToFirstParty: " + InitiateCallToFirstParty + "\n"+ + "SessionUuid: " + SessionUuid + "\n"+ + "CallbackUrl: " + CallbackUrl + "\n"+ + "CallbackMethod: " + CallbackMethod + "\n"+ + "CreatedTime: " + CreatedTime + "\n"+ + "ModifiedTime: " + ModifiedTime + "\n"+ + "ExpiryTime: " + ExpiryTime + "\n"+ + "Duration: " + Duration + "\n"+ + "Amount: " + Amount + "\n"+ + "CallTimeLimit: " + CallTimeLimit + "\n"+ + "RingTimeout: " + RingTimeout + "\n"+ + "FirstPartyPlayUrl: " + FirstPartyPlayUrl + "\n"+ + "SecondPartyPlayUrl: " + SecondPartyPlayUrl + "\n"+ + "Record: " + Record + "\n"+ + "RecordFileFormat: " + RecordFileFormat + "\n"+ + "RecordingCallbackUrl: " + RecordingCallbackUrl + "\n"+ + "RecordingCallbackMethod: " + RecordingCallbackMethod + "\n"+ + "Interaction: " + Interaction + "\n"+ + "TotalCallAmount: " + TotalCallAmount + "\n"+ + "TotalCallCount: " + TotalCallCount + "\n"+ + "TotalCallBilledDuration: " + TotalCallBilledDuration + "\n"+ + "TotalSessionAmount: " + TotalSessionAmount + "\n"+ + "LastInteractionTime: " + LastInteractionTime + "\n"+ + "IsPinAuthenticationRequired: " + IsPinAuthenticationRequired + "\n"+ + "GeneratePin: " + GeneratePin + "\n"+ + "GeneratePinLength: " + GeneratePinLength + "\n"+ + "FirstPartyPin: " + FirstPartyPin + "\n"+ + "SecondPartyPin: " + SecondPartyPin + "\n"+ + "PinPromptPlay: " + PinPromptPlay + "\n"+ + "PinRetry: " + PinRetry + "\n"+ + "PinRetryWait: " + PinRetryWait + "\n"+ + "IncorrectPinPlay: " + IncorrectPinPlay + "\n"+ + "UnknownCallerPlay: " + UnknownCallerPlay + "\n"; } #region Delete diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index 57872d90..a5e90248 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -126,11 +126,13 @@ public async Task CreateAsync( #region Get public MaskingSession Get(string sessionUuid) { + bool isVoiceRequest = true; + var data = CreateData(new List {""}, new {isVoiceRequest}); return ExecuteWithExceptionUnwrap(() => { - var endpoint = Task.Run(async () => await GetResource(sessionUuid, new Dictionary () { {"is_voice_request", true} }).ConfigureAwait(false)).Result; - endpoint.Interface = this; - return endpoint; + var maskingSession = Task.Run(async () => await GetResource(sessionUuid, data).ConfigureAwait(false)).Result; + maskingSession.Interface = this; + return maskingSession; }); } From cc09924866397df26b70673d741883e0cdc2f1a9 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 7 May 2024 17:53:59 +0530 Subject: [PATCH 06/15] get --- src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index a5e90248..34e326ac 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -148,7 +148,7 @@ public async Task GetAsync(string sessionUuid) result.Object.StatusCode = result.StatusCode; JObject responseJson = JObject.Parse(result.Content); result.Object.ApiId = responseJson["api_id"].ToString(); - result.Object.Message = responseJson["message"].ToString(); + result.Object.Message = responseJson["response"].ToString(); return result.Object; } #endregion From 6ff37c34ed06b5c74dcac990cab6c9675dce17a4 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 7 May 2024 18:04:13 +0530 Subject: [PATCH 07/15] logLine --- .../Resource/MaskingSession/MaskingSessionInterface.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index 34e326ac..faea9f5d 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -148,7 +148,13 @@ public async Task GetAsync(string sessionUuid) result.Object.StatusCode = result.StatusCode; JObject responseJson = JObject.Parse(result.Content); result.Object.ApiId = responseJson["api_id"].ToString(); - result.Object.Message = responseJson["response"].ToString(); + result.Object.Message = responseJson["message"].ToString(); + + Console.WriteLine($"responseJson: {responseJson}"); + Console.WriteLine($"StatusCode: {result.StatusCode}"); + Console.WriteLine($"Content: {result.Content}"); + Console.WriteLine($"Object: {result.Object}"); + return result.Object; } #endregion From 95aacd0ecc4359efe1437457f8fbd0b56bb409e4 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 7 May 2024 18:04:59 +0530 Subject: [PATCH 08/15] logLine --- src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index faea9f5d..c67dbad0 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -150,6 +150,7 @@ public async Task GetAsync(string sessionUuid) result.Object.ApiId = responseJson["api_id"].ToString(); result.Object.Message = responseJson["message"].ToString(); + Console.WriteLine($"result: {result}"); Console.WriteLine($"responseJson: {responseJson}"); Console.WriteLine($"StatusCode: {result.StatusCode}"); Console.WriteLine($"Content: {result.Content}"); From 6e9abd47f96b2fb1bc7250b6ba789b58d4910bda Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Wed, 8 May 2024 21:07:01 +0530 Subject: [PATCH 09/15] listResponse --- src/Plivo/Resource/ListResponse.cs | 6 +- .../Resource/MaskingSession/MaskingSession.cs | 75 +------- .../MaskingSession/MaskingSessionInterface.cs | 21 +-- .../MaskingSessionListResponse.cs | 164 ++++++++++++++++++ src/Plivo/Resource/NestedResponse.cs | 16 ++ 5 files changed, 191 insertions(+), 91 deletions(-) create mode 100644 src/Plivo/Resource/MaskingSession/MaskingSessionListResponse.cs create mode 100644 src/Plivo/Resource/NestedResponse.cs diff --git a/src/Plivo/Resource/ListResponse.cs b/src/Plivo/Resource/ListResponse.cs index f874d3bb..246af3eb 100755 --- a/src/Plivo/Resource/ListResponse.cs +++ b/src/Plivo/Resource/ListResponse.cs @@ -22,6 +22,8 @@ public class ListResponse : BaseResponse, IEnumerable /// The objects. public List Objects { get; set; } + public NestedResponse Response; + /// /// Initializes a new instance of the class. /// @@ -66,11 +68,9 @@ public override string ToString() { return "Api Id: " + ApiId + "\n" + "[Meta]\n" + Meta + + "[Response]\n" + Response + "StatusCode: " + StatusCode + "[Objects]\n" + string.Join("\n", Objects); - - - } } } \ No newline at end of file diff --git a/src/Plivo/Resource/MaskingSession/MaskingSession.cs b/src/Plivo/Resource/MaskingSession/MaskingSession.cs index 3d51a192..95965973 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSession.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSession.cs @@ -7,84 +7,13 @@ namespace Plivo.Resource.MaskingSession public class MaskingSession : Resource { public new string Id => SessionUuid; - public string FirstParty { get; set; } - public string SecondParty { get; set; } - public string VirtualNumber { get; set; } - public string Status { get; set; } - public bool InitiateCallToFirstParty { get; set; } public string SessionUuid { get; set; } - public string CallbackUrl { get; set; } - public string CallbackMethod { get; set; } - public string CreatedTime { get; set; } - public string ModifiedTime { get; set; } - public string ExpiryTime { get; set; } - public int Duration { get; set; } - public int Amount { get; set; } - public int CallTimeLimit { get; set; } - public int RingTimeout { get; set; } - public string FirstPartyPlayUrl { get; set; } - public string SecondPartyPlayUrl { get; set; } - public bool Record { get; set; } - public string RecordFileFormat { get; set; } - public string RecordingCallbackUrl { get; set; } - public string RecordingCallbackMethod { get; set; } - public Object Interaction { get; set; } - public float TotalCallAmount { get; set; } - public int TotalCallCount { get; set; } - public int TotalCallBilledDuration { get; set; } - public float TotalSessionAmount { get; set; } - public string LastInteractionTime { get; set; } - public bool IsPinAuthenticationRequired { get; set; } - public bool GeneratePin { get; set; } - public Int64 GeneratePinLength { get; set; } - public string FirstPartyPin { get; set; } - public string SecondPartyPin { get; set; } - public string PinPromptPlay { get; set; } - public Int64 PinRetry { get; set; } - public Int64 PinRetryWait { get; set; } - public string IncorrectPinPlay { get; set; } - public string UnknownCallerPlay { get; set; } + public object Response { get; set; } public override string ToString() { return "ApiId: " + ApiId + "\n"+ - "FirstParty: " + FirstParty + "\n"+ - "SecondParty: " + SecondParty + "\n"+ - "VirtualNumber: " + VirtualNumber + "\n"+ - "Status: " + Status + "\n"+ - "InitiateCallToFirstParty: " + InitiateCallToFirstParty + "\n"+ - "SessionUuid: " + SessionUuid + "\n"+ - "CallbackUrl: " + CallbackUrl + "\n"+ - "CallbackMethod: " + CallbackMethod + "\n"+ - "CreatedTime: " + CreatedTime + "\n"+ - "ModifiedTime: " + ModifiedTime + "\n"+ - "ExpiryTime: " + ExpiryTime + "\n"+ - "Duration: " + Duration + "\n"+ - "Amount: " + Amount + "\n"+ - "CallTimeLimit: " + CallTimeLimit + "\n"+ - "RingTimeout: " + RingTimeout + "\n"+ - "FirstPartyPlayUrl: " + FirstPartyPlayUrl + "\n"+ - "SecondPartyPlayUrl: " + SecondPartyPlayUrl + "\n"+ - "Record: " + Record + "\n"+ - "RecordFileFormat: " + RecordFileFormat + "\n"+ - "RecordingCallbackUrl: " + RecordingCallbackUrl + "\n"+ - "RecordingCallbackMethod: " + RecordingCallbackMethod + "\n"+ - "Interaction: " + Interaction + "\n"+ - "TotalCallAmount: " + TotalCallAmount + "\n"+ - "TotalCallCount: " + TotalCallCount + "\n"+ - "TotalCallBilledDuration: " + TotalCallBilledDuration + "\n"+ - "TotalSessionAmount: " + TotalSessionAmount + "\n"+ - "LastInteractionTime: " + LastInteractionTime + "\n"+ - "IsPinAuthenticationRequired: " + IsPinAuthenticationRequired + "\n"+ - "GeneratePin: " + GeneratePin + "\n"+ - "GeneratePinLength: " + GeneratePinLength + "\n"+ - "FirstPartyPin: " + FirstPartyPin + "\n"+ - "SecondPartyPin: " + SecondPartyPin + "\n"+ - "PinPromptPlay: " + PinPromptPlay + "\n"+ - "PinRetry: " + PinRetry + "\n"+ - "PinRetryWait: " + PinRetryWait + "\n"+ - "IncorrectPinPlay: " + IncorrectPinPlay + "\n"+ - "UnknownCallerPlay: " + UnknownCallerPlay + "\n"; + "Response: " + Response + "\n"; } #region Delete diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index c67dbad0..e6c1481d 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json.Linq; -using System; namespace Plivo.Resource.MaskingSession { @@ -149,20 +148,13 @@ public async Task GetAsync(string sessionUuid) JObject responseJson = JObject.Parse(result.Content); result.Object.ApiId = responseJson["api_id"].ToString(); result.Object.Message = responseJson["message"].ToString(); - - Console.WriteLine($"result: {result}"); - Console.WriteLine($"responseJson: {responseJson}"); - Console.WriteLine($"StatusCode: {result.StatusCode}"); - Console.WriteLine($"Content: {result.Content}"); - Console.WriteLine($"Object: {result.Object}"); - return result.Object; } #endregion #region List - public ListResponse List( + public ListResponse List( string first_party = null, string second_party = null, string virtual_number = null, string status = null, string created_time = null, string created_time__lt = null,string created_time__gt = null,string created_time__lte = null, string created_time__gte = null, string expiry_time = null,string expiry_time__lt = null,string expiry_time__gt = null, @@ -200,12 +192,11 @@ public ListResponse List( }); return ExecuteWithExceptionUnwrap(() => { - var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; - - resources.Objects.ForEach( - (obj) => obj.Interface = this - ); - + var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; + resources.Meta = resources.Response.Meta; + JArray responseArray = resources.Response.Objects as JArray; + List maskingSessionList = responseArray.ToObject>(); + resources.Objects = maskingSessionList; return resources; }); } diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionListResponse.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionListResponse.cs new file mode 100644 index 00000000..9b9ecdd2 --- /dev/null +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionListResponse.cs @@ -0,0 +1,164 @@ +using Newtonsoft.Json; + +namespace Plivo.Resource.MaskingSession +{ + public class MaskingSessionListResponse : Resource + { + [JsonProperty("amount")] + public object Amount { get; set; } + + [JsonProperty("call_time_limit")] + public object CallTimeLimit { get; set; } + + [JsonProperty("callback_method")] + public object CallbackMethod { get; set; } + + [JsonProperty("callback_url")] + public object CallbackUrl { get; set; } + + [JsonProperty("created_time")] + public object CreatedTime { get; set; } + + [JsonProperty("duration")] + public object Duration { get; set; } + + [JsonProperty("expiry_time")] + public object Expiry_time { get; set; } + + [JsonProperty("first_party")] + public object FirstParty { get; set; } + + [JsonProperty("first_party_pin")] + public object FirstPartyPin { get; set; } + + [JsonProperty("first_party_play_url")] + public object FirstPartyPlayUrl { get; set; } + + [JsonProperty("generate_pin")] + public object GeneratePin { get; set; } + + [JsonProperty("generate_pin_length")] + public object GeneratePinLength { get; set; } + + [JsonProperty("incorrect_pin_play")] + public object IncorrectPinPlay { get; set; } + + [JsonProperty("initiate_call_to_first_party")] + public object InitiateCallToFirstParty { get; set; } + + [JsonProperty("interaction")] + public object Interaction { get; set; } + + [JsonProperty("is_pin_authentication_required")] + public object IsPinAuthenticationRequired { get; set; } + + [JsonProperty("last_interaction_time")] + public object LastInteractionTime { get; set; } + + [JsonProperty("modified_time")] + public object ModifiedTime { get; set; } + + [JsonProperty("pin_prompt_play")] + public object PinPromptPlay { get; set; } + + [JsonProperty("pin_retry")] + public object PinRetry { get; set; } + + [JsonProperty("pin_retry_wait")] + public object PinRetryWait { get; set; } + + [JsonProperty("record")] + public object Record { get; set; } + + [JsonProperty("record_file_format")] + public object RecordFileFormat { get; set; } + + [JsonProperty("recording_callback_method")] + public object RecordingCallbackMethod { get; set; } + + [JsonProperty("recording_callback_url")] + public object RecordingCallbackUrl { get; set; } + + [JsonProperty("resource_uri")] + public object ResourceUri { get; set; } + + [JsonProperty("ring_timeout")] + public object RingTimeout { get; set; } + + [JsonProperty("second_party")] + public object SecondParty { get; set; } + + [JsonProperty("second_party_pin")] + public object SecondPartyPin { get; set; } + + [JsonProperty("second_party_play_url")] + public object SecondPartyPlayUrl { get; set; } + + [JsonProperty("session_uuid")] + public object SessionUuid { get; set; } + + [JsonProperty("status")] + public object Status { get; set; } + + [JsonProperty("total_call_amount")] + public object TotalCallAmount { get; set; } + + [JsonProperty("total_call_billed_duration")] + public object TotalCallBilledDuration { get; set; } + + [JsonProperty("total_call_count")] + public object TotalCallCount { get; set; } + + [JsonProperty("total_session_amount")] + public object TotalSessionAmount { get; set; } + + [JsonProperty("unknown_caller_play")] + public object UnknownCallerPlay { get; set; } + + [JsonProperty("virtual_number")] + public object VirtualNumber { get; set; } + + public override string ToString() + { + return "Amount: " + Amount + "\n" + + "CallTimeLimit: " + CallTimeLimit + "\n" + + "CallbackMethod: " + CallbackMethod + "\n" + + "CallbackUrl: " + CallbackUrl + "\n" + + "CreatedTime: " + CreatedTime + "\n" + + "Duration: " + Duration + "\n" + + "ExpiryTime: " + Expiry_time + "\n" + + "FirstParty: " + FirstParty + "\n" + + "FirstPartyPin: " + FirstPartyPin + "\n" + + "FirstPartyPlayUrl: " + FirstPartyPlayUrl + "\n" + + "GeneratePin: " + GeneratePin + "\n" + + "GeneratePinLength: " + GeneratePinLength + "\n" + + "IncorrectPinPlay: " + IncorrectPinPlay + "\n" + + "InitiateCallToFirstParty: " + InitiateCallToFirstParty + "\n" + + "Interaction: " + Interaction + "\n" + + "IsPinAuthenticationRequired: " + IsPinAuthenticationRequired + "\n" + + "LastInteractionTime: " + LastInteractionTime + "\n" + + "ModifiedTime: " + ModifiedTime + "\n" + + "PinPromptPlay: " + PinPromptPlay + "\n" + + "PinRetry: " + PinRetry + "\n" + + "PinRetryWait: " + PinRetryWait + "\n" + + "Record: " + Record + "\n" + + "RecordFileFormat: " + RecordFileFormat + "\n" + + "RecordingCallbackMethod: " + RecordingCallbackMethod + "\n" + + "RecordingCallbackUrl: " + RecordingCallbackUrl + "\n" + + "ResourceUri: " + ResourceUri + "\n" + + "RingTimeout: " + RingTimeout + "\n" + + "SecondParty: " + SecondParty + "\n" + + "SecondPartyPin: " + SecondPartyPin + "\n" + + "SecondPartyPlayUrl: " + SecondPartyPlayUrl + "\n" + + "SessionUuid: " + SessionUuid + "\n" + + "Status: " + Status + "\n" + + "TotalCallAmount: " + TotalCallAmount + "\n" + + "TotalCallBilledDuration: " + TotalCallBilledDuration + "\n" + + "TotalCallCount: " + TotalCallCount + "\n" + + "TotalSessionAmount: " + TotalSessionAmount + "\n" + + "UnknownCallerPlay: " + UnknownCallerPlay + "\n" + + "VirtualNumber: " + VirtualNumber + "\n"; + } + + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/NestedResponse.cs b/src/Plivo/Resource/NestedResponse.cs new file mode 100644 index 00000000..3a4e0b71 --- /dev/null +++ b/src/Plivo/Resource/NestedResponse.cs @@ -0,0 +1,16 @@ +namespace Plivo.Resource +{ + public class NestedResponse + { + public Meta Meta { get; set; } + + public object Objects { get; set; } + + public override string ToString() + { + return + "[Meta]\n" + Meta + "\n" + + "[Objects]\n" + string.Join("\n", Objects); + } + } +} \ No newline at end of file From ed08c9f7f579cc4692cd954ae784efeba92b5641 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Thu, 9 May 2024 17:15:21 +0530 Subject: [PATCH 10/15] versionFix --- CHANGELOG.md | 2 +- README.md | 4 ++-- src/Plivo/Plivo.csproj | 2 +- src/Plivo/Plivo.nuspec | 2 +- src/Plivo/Version.cs | 2 +- version.json | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aba38bf9..0ade51ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [6.0.0](https://github.com/plivo/plivo-dotnet/tree/v5.44.0) (2024-04-22) +## [5.46.0](https://github.com/plivo/plivo-dotnet/tree/v5.46.0) (2024-05-09) **Feature - Number Masking Feature Added** - Number Masking APIs added to create, update, delete and list sessions diff --git a/README.md b/README.md index 1c821246..7c102183 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ You can install this SDK either by referencing the .dll file or using NuGet. Use the following line to install the latest SDK using the NuGet CLI. ``` -PM> Install-Package Plivo -Version 6.0.0 +PM> Install-Package Plivo -Version 5.46.0 ``` You can also use the .NET CLI to install this package as follows ``` -> dotnet add package Plivo --version 6.0.0 +> dotnet add package Plivo --version 5.46.0 ``` ## Getting started diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index 66ecdeed..63e20c18 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 6.0.0 + 5.46.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 0bcf0e19..6a9600b9 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 - 6.0.0 + 5.46.0 Plivo Plivo SDKs Team Plivo, Inc. diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index dba3215d..8700e756 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 = "6.0.0"; + public const string SdkVersion = "5.46.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index e579f7f1..5e0ebe7f 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "6.0.0", + "version": "5.46.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" From a93cba47b310ab096d8616ceb8417247ac9564cd Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 13 May 2024 16:50:08 +0530 Subject: [PATCH 11/15] codeUpdated --- .../MaskingSessionCreateResponse.cs | 4 +- .../MaskingSession/MaskingSessionInterface.cs | 147 +++++++++--------- 2 files changed, 74 insertions(+), 77 deletions(-) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs index 07570596..1534ed12 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionCreateResponse.cs @@ -5,15 +5,13 @@ public class MaskingSessionCreateResponse : CreateResponse { public string SessionUuid { get; set; } public string VirtualNumber { get; set; } - public string SessionMessage { get; set; } - public string Session { get; set; } + public object Session { get; set; } public override string ToString() { return base.ToString() + "Session Uuid: " + SessionUuid + "\n" + "VirtualNumber: " + VirtualNumber + "\n" + - "Message: " + SessionMessage + "\n" + "Session: " + Session + "\n"; } } diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index e6c1481d..db761119 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -155,36 +155,36 @@ public async Task GetAsync(string sessionUuid) #region List public ListResponse List( - string first_party = null, string second_party = null, string virtual_number = null, string status = null, - string created_time = null, string created_time__lt = null,string created_time__gt = null,string created_time__lte = null, - string created_time__gte = null, string expiry_time = null,string expiry_time__lt = null,string expiry_time__gt = null, - string expiry_time__lte = null,string expiry_time__gte = null, uint? duration = null,uint? duration__lt = null, - uint? duration__gt = null,uint? duration__lte = null,uint? duration__gte = null,uint? limit = null, uint? offset = null, + string firstParty = null, string secondParty = null, string virtualNumber = null, string status = null, + string createdTime = null, string createdTime_Lt = null,string createdTime_Gt = null,string createdTime_Lte = null, + string createdTime_Gte = null, string expiryTime = null,string expiryTime_Lt = null,string expiryTime_Gt = null, + string expiryTime_Lte = null,string expiryTime_Gte = null, uint? duration = null,uint? duration_Lt = null, + uint? duration_Gt = null,uint? duration_Lte = null,uint? duration_Gte = null,uint? limit = null, uint? offset = null, string subaccount=null) { var mandatoryParams = new List { "" }; bool isVoiceRequest = true; var data = CreateData(mandatoryParams, new { - first_party, - second_party, - virtual_number, + firstParty, + secondParty, + virtualNumber, status, - created_time, - created_time__lt, - created_time__gt, - created_time__lte, - created_time__gte, - expiry_time, - expiry_time__lt, - expiry_time__gt, - expiry_time__lte, - expiry_time__gte, + createdTime, + createdTime_Lt, + createdTime_Gt, + createdTime_Lte, + createdTime_Gte, + expiryTime, + expiryTime_Lt, + expiryTime_Gt, + expiryTime_Lte, + expiryTime_Gte, duration, - duration__lt, - duration__gt, - duration__lte, - duration__gte, + duration_Lt, + duration_Gt, + duration_Lte, + duration_Gte, limit, offset, subaccount, @@ -202,36 +202,36 @@ public ListResponse List( } public async Task ListAsync( - string first_party = null, string second_party = null, string virtual_number = null, string status = null, - string created_time = null, string created_time__lt = null,string created_time__gt = null,string created_time__lte = null, - string created_time__gte = null, string expiry_time = null,string expiry_time__lt = null,string expiry_time__gt = null, - string expiry_time__lte = null,string expiry_time__gte = null, uint? duration = null,uint? duration__lt = null, - uint? duration__gt = null,uint? duration__lte = null,uint? duration__gte = null,uint? limit = null, uint? offset = null, + string firstParty = null, string secondParty = null, string virtualNumber = null, string status = null, + string createdTime = null, string createdTime_Lt = null,string createdTime_Gt = null,string createdTime_Lte = null, + string createdTime_Gte = null, string expiryTime = null,string expiryTime_Lt = null,string expiryTime_Gt = null, + string expiryTime_Lte = null,string expiryTime_Gte = null, uint? duration = null,uint? duration_Lt = null, + uint? duration_Gt = null,uint? duration_Lte = null,uint? duration_Gte = null,uint? limit = null, uint? offset = null, string subaccount=null) { var mandatoryParams = new List { "" }; bool isVoiceRequest = true; var data = CreateData(mandatoryParams, new { - first_party, - second_party, - virtual_number, + firstParty, + secondParty, + virtualNumber, status, - created_time, - created_time__lt, - created_time__gt, - created_time__lte, - created_time__gte, - expiry_time, - expiry_time__lt, - expiry_time__gt, - expiry_time__lte, - expiry_time__gte, + createdTime, + createdTime_Lt, + createdTime_Gt, + createdTime_Lte, + createdTime_Gte, + expiryTime, + expiryTime_Lt, + expiryTime_Gt, + expiryTime_Lte, + expiryTime_Gte, duration, - duration__lt, - duration__gt, - duration__lte, - duration__gte, + duration_Lt, + duration_Gt, + duration_Lte, + duration_Gte, limit, offset, subaccount, @@ -273,10 +273,10 @@ public async Task DeleteAsync(string sessionUuid) #region Update - public UpdateResponse Update(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, - bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, - string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, - string recording_callback_method = null, string subaccount = null, bool? geomatch = null + public UpdateResponse Update(string sessionUuid, uint? sessionExpiry = null, uint? callTimeLimit = null, + bool? record = null, string recordFileFormat = null, string recordingCallbackUrl = null, string callbackUrl = null, + string callbackMethod = null, uint? ringTimeout = null, string firstPartyPlayUrl = null, string secondPartyPlayUrl = null, + string recordingCallbackMethod = null, string subaccount = null, bool? geomatch = null ) { var mandatoryParams = new List { "" }; @@ -285,17 +285,17 @@ public UpdateResponse Update(string sessionUuid, uint? session_e mandatoryParams, new { - session_expiry, - call_time_limit, + sessionExpiry, + callTimeLimit, record, - record_file_format, - recording_callback_url, - callback_url, - callback_method, - ring_timeout, - first_party_play_url, - second_party_play_url, - recording_callback_method, + recordFileFormat, + recordingCallbackUrl, + callbackUrl, + callbackMethod, + ringTimeout, + firstPartyPlayUrl, + secondPartyPlayUrl, + recordingCallbackMethod, subaccount, geomatch, isVoiceRequest @@ -309,10 +309,10 @@ public UpdateResponse Update(string sessionUuid, uint? session_e }); } - public async Task UpdateAsync(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, - bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, - string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, - string recording_callback_method = null, string subaccount = null, bool? geomatch = null + public async Task UpdateAsync(string sessionUuid, uint? sessionExpiry = null, uint? callTimeLimit = null, + bool? record = null, string recordFileFormat = null, string recordingCallbackUrl = null, string callbackUrl = null, + string callbackMethod = null, uint? ringTimeout = null, string firstPartyPlayUrl = null, string secondPartyPlayUrl = null, + string recordingCallbackMethod = null, string subaccount = null, bool? geomatch = null ) { var mandatoryParams = new List { "" }; @@ -321,22 +321,21 @@ public async Task UpdateAsync(string sessionUuid, uint? session_e mandatoryParams, new { - session_expiry, - call_time_limit, + sessionExpiry, + callTimeLimit, record, - record_file_format, - recording_callback_url, - callback_url, - callback_method, - ring_timeout, - first_party_play_url, - second_party_play_url, - recording_callback_method, + recordFileFormat, + recordingCallbackUrl, + callbackUrl, + callbackMethod, + ringTimeout, + firstPartyPlayUrl, + secondPartyPlayUrl, + recordingCallbackMethod, subaccount, geomatch, isVoiceRequest - } - ); + }); var result = Task.Run(async () => await Client.Update(Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; await Task.WhenAll(); result.Object.StatusCode = result.StatusCode; From 474f02345cd7751e1fe8db6267879806d98edc07 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 14 May 2024 16:04:36 +0530 Subject: [PATCH 12/15] ListResponseAndUpdateResponse --- src/Plivo/Resource/ListResponse.cs | 5 ++--- .../Resource/MaskingSession/MaskingSession.cs | 2 +- .../MaskingSession/MaskingSessionInterface.cs | 9 ++++++--- .../MaskingSessionUpdateResponse.cs | 16 ++++++++++++++++ src/Plivo/Resource/NestedResponse.cs | 1 - 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 src/Plivo/Resource/MaskingSession/MaskingSessionUpdateResponse.cs diff --git a/src/Plivo/Resource/ListResponse.cs b/src/Plivo/Resource/ListResponse.cs index 246af3eb..cbbcc084 100755 --- a/src/Plivo/Resource/ListResponse.cs +++ b/src/Plivo/Resource/ListResponse.cs @@ -68,9 +68,8 @@ public override string ToString() { return "Api Id: " + ApiId + "\n" + "[Meta]\n" + Meta + - "[Response]\n" + Response + - "StatusCode: " + StatusCode + - "[Objects]\n" + string.Join("\n", Objects); + "[Response]\n" + Response + "\n"+ + "StatusCode:" + StatusCode; } } } \ No newline at end of file diff --git a/src/Plivo/Resource/MaskingSession/MaskingSession.cs b/src/Plivo/Resource/MaskingSession/MaskingSession.cs index 95965973..9c121798 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSession.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSession.cs @@ -29,7 +29,7 @@ public async Task DeleteAsync(string Id) #region Update - public UpdateResponse Update(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, + public MaskingSessionUpdateResponse Update(string sessionUuid, uint? session_expiry = null, uint? call_time_limit = null, bool? record = null, string record_file_format = null, string recording_callback_url = null, string callback_url = null, string callback_method = null, uint? ring_timeout = null, string first_party_play_url = null, string second_party_play_url = null, string recording_callback_method = null, string subaccount = null, bool? geomatch = null diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index db761119..686b3e5c 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json.Linq; +using Newtonsoft.Json; namespace Plivo.Resource.MaskingSession { @@ -273,7 +274,7 @@ public async Task DeleteAsync(string sessionUuid) #region Update - public UpdateResponse Update(string sessionUuid, uint? sessionExpiry = null, uint? callTimeLimit = null, + public MaskingSessionUpdateResponse Update(string sessionUuid, uint? sessionExpiry = null, uint? callTimeLimit = null, bool? record = null, string recordFileFormat = null, string recordingCallbackUrl = null, string callbackUrl = null, string callbackMethod = null, uint? ringTimeout = null, string firstPartyPlayUrl = null, string secondPartyPlayUrl = null, string recordingCallbackMethod = null, string subaccount = null, bool? geomatch = null @@ -303,7 +304,9 @@ public UpdateResponse Update(string sessionUuid, uint? sessionEx return ExecuteWithExceptionUnwrap(() => { - var result = Task.Run(async () => await Client.Update>(Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; + var result = Task.Run(async () => await Client.Update>(Uri + sessionUuid + "/", data).ConfigureAwait(false)).Result; + var contentJson = JObject.Parse(result.Content); + result.Object.SessionUuid = contentJson["session"]["session_uuid"].ToString(); result.Object.StatusCode = result.StatusCode; return result.Object; }); @@ -336,7 +339,7 @@ public async Task UpdateAsync(string sessionUuid, uint? sessionEx geomatch, isVoiceRequest }); - var result = Task.Run(async () => await Client.Update(Uri + "/" + sessionUuid + "/", data).ConfigureAwait(false)).Result; + var result = Task.Run(async () => await Client.Update(Uri + sessionUuid + "/", data).ConfigureAwait(false)).Result; await Task.WhenAll(); result.Object.StatusCode = result.StatusCode; JObject responseJson = JObject.Parse(result.Content); diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionUpdateResponse.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionUpdateResponse.cs new file mode 100644 index 00000000..288c521a --- /dev/null +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionUpdateResponse.cs @@ -0,0 +1,16 @@ +namespace Plivo.Resource.MaskingSession +{ + public class MaskingSessionUpdateResponse : BaseResponse + { + public object Session { get; set; } + + public string SessionUuid { get; set; } + + public override string ToString() + { + return base.ToString() + + "SessionUuid: " + SessionUuid + "\n" + + "Session: " + Session + "\n"; + } + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/NestedResponse.cs b/src/Plivo/Resource/NestedResponse.cs index 3a4e0b71..567bebfe 100644 --- a/src/Plivo/Resource/NestedResponse.cs +++ b/src/Plivo/Resource/NestedResponse.cs @@ -9,7 +9,6 @@ public class NestedResponse public override string ToString() { return - "[Meta]\n" + Meta + "\n" + "[Objects]\n" + string.Join("\n", Objects); } } From 724e86129c31846d0489344b62025697b1f9a565 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Fri, 24 May 2024 10:12:02 +0530 Subject: [PATCH 13/15] nullPointCheck --- src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index 686b3e5c..9493291a 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -194,11 +194,15 @@ public ListResponse List( return ExecuteWithExceptionUnwrap(() => { var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; + if (resources.Response == null) { + return resources; + } else { resources.Meta = resources.Response.Meta; JArray responseArray = resources.Response.Objects as JArray; List maskingSessionList = responseArray.ToObject>(); resources.Objects = maskingSessionList; return resources; + } }); } From 81289af62dca39a8494f6cada7746f76a7cf99ce Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 28 May 2024 07:35:31 +0530 Subject: [PATCH 14/15] ListMaskingSessionResponse --- .../Resource/ListMaskingSessionResponse.cs | 75 +++++++++++++++++++ src/Plivo/Resource/ListResponse.cs | 9 ++- .../MaskingSession/MaskingSessionInterface.cs | 4 +- 3 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 src/Plivo/Resource/ListMaskingSessionResponse.cs diff --git a/src/Plivo/Resource/ListMaskingSessionResponse.cs b/src/Plivo/Resource/ListMaskingSessionResponse.cs new file mode 100644 index 00000000..2fa52445 --- /dev/null +++ b/src/Plivo/Resource/ListMaskingSessionResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Plivo.Resource +{ + /// + /// List response. + /// + [JsonObject] + public class ListMaskingSessionResponse : BaseResponse, IEnumerable + { + /// + /// Gets or sets the meta. + /// + /// The meta. + public Meta Meta { get; set; } + /// + /// Gets or sets the objects. + /// + /// The objects. + public List Objects { get; set; } + + public NestedResponse Response; + + /// + /// Initializes a new instance of the class. + /// + public ListMaskingSessionResponse() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Meta. + /// Objects. + public ListMaskingSessionResponse(Meta meta, List objects) + { + Meta = meta ?? throw new ArgumentNullException(nameof(meta)); + Objects = objects ?? throw new ArgumentNullException(nameof(objects)); + } + + /// + /// System.s the collections. IE numerable. get enumerator. + /// + /// The collections. IE numerable. get enumerator. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + /// Gets the enumerator. + /// + /// The enumerator. + public IEnumerator GetEnumerator() + { + return ((IEnumerable)Objects).GetEnumerator(); + } + + /// + /// Returns a that represents the current . + /// + /// A that represents the current . + public override string ToString() + { + return "Api Id: " + ApiId + "\n" + + "[Meta]\n" + Meta + + "[Response]\n" + Response + "\n" + + "StatusCode:" + StatusCode; + } + } +} \ No newline at end of file diff --git a/src/Plivo/Resource/ListResponse.cs b/src/Plivo/Resource/ListResponse.cs index cbbcc084..f874d3bb 100755 --- a/src/Plivo/Resource/ListResponse.cs +++ b/src/Plivo/Resource/ListResponse.cs @@ -22,8 +22,6 @@ public class ListResponse : BaseResponse, IEnumerable /// The objects. public List Objects { get; set; } - public NestedResponse Response; - /// /// Initializes a new instance of the class. /// @@ -68,8 +66,11 @@ public override string ToString() { return "Api Id: " + ApiId + "\n" + "[Meta]\n" + Meta + - "[Response]\n" + Response + "\n"+ - "StatusCode:" + StatusCode; + "StatusCode: " + StatusCode + + "[Objects]\n" + string.Join("\n", Objects); + + + } } } \ No newline at end of file diff --git a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs index 9493291a..0eead7f5 100644 --- a/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs +++ b/src/Plivo/Resource/MaskingSession/MaskingSessionInterface.cs @@ -155,7 +155,7 @@ public async Task GetAsync(string sessionUuid) #region List - public ListResponse List( + public ListMaskingSessionResponse List( string firstParty = null, string secondParty = null, string virtualNumber = null, string status = null, string createdTime = null, string createdTime_Lt = null,string createdTime_Gt = null,string createdTime_Lte = null, string createdTime_Gte = null, string expiryTime = null,string expiryTime_Lt = null,string expiryTime_Gt = null, @@ -193,7 +193,7 @@ public ListResponse List( }); return ExecuteWithExceptionUnwrap(() => { - var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; + var resources = Task.Run(async () => await ListResources>(data).ConfigureAwait(false)).Result; if (resources.Response == null) { return resources; } else { From a5eda0f5fd856980f8b9d57fbb647f2f37790a12 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 28 May 2024 13:04:59 +0530 Subject: [PATCH 15/15] versionFix --- CHANGELOG.md | 2 +- src/Plivo/Plivo.csproj | 2 +- src/Plivo/Version.cs | 2 +- version.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47f79f8c..0fa4abe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [5.47.0](https://github.com/plivo/plivo-dotnet/tree/v5.47.0) (2024-05-24) +## [5.47.0](https://github.com/plivo/plivo-dotnet/tree/v5.47.0) (2024-05-28) **Feature - Number Masking Feature Added** - Number Masking APIs added to create, update, delete and list sessions diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index 63e20c18..8430e249 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.46.0 + 5.47.0 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Version.cs b/src/Plivo/Version.cs index 8700e756..b9e96dab 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.46.0"; + public const string SdkVersion = "5.47.0"; /// /// Plivo API version /// diff --git a/version.json b/version.json index 5e0ebe7f..04743731 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.46.0", + "version": "5.47.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"