Skip to content

Commit

Permalink
Merge pull request #246 from plivo/VT-5519
Browse files Browse the repository at this point in the history
Added new recording params and filter
  • Loading branch information
abhishekGupta-Plivo authored May 31, 2023
2 parents cd60929 + 117ae36 commit 35aa639
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [v5.28.0](https://github.com/plivo/plivo-dotnet/tree/v5.28.0) (2023-05-29)
- Added `MonthlyRecordingStorageAmount`, `RecordingStorageRate`, `RoundedRecordingDuration`, and `RecordingStorageDuration` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)
- Added `RecordingStorageDuration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)

## [v5.27.0](https://github.com/plivo/plivo-dotnet/tree/v5.27.0) (2023-05-04)
- Add New Param `renewalDate` to the response of the [list all numbers API], [list single number API]
- Add 5 new filters to AccountPhoneNumber - list all my numbers API:`renewal_date`, `renewal_date__gt`, `renewal_date__gte`,`renewal_date__lt` and `renewal_date__lte` (https://www.plivo.com/docs/numbers/api/account-phone-number#list-all-my-numbers)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 4.2.5
PM> Install-Package Plivo -Version 5.28.0
```

You can also use the .NET CLI to install this package as follows

```
> dotnet add package Plivo --version 4.2.5
> dotnet add package Plivo --version 5.28.0
```

## Getting started
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Plivo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard1.3</TargetFrameworks>
<ReleaseVersion>5.27.0</ReleaseVersion>
<ReleaseVersion>5.28.0</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
9 changes: 5 additions & 4 deletions src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
<summary>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</summary>
<description>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</description>
<id>Plivo</id>
<version>5.27.0</version>
<version>5.28.0</version>
<title>Plivo</title>
<authors>Plivo SDKs Team</authors>
<owners>Plivo, Inc.</owners>
<licenseUrl>https://github.com/plivo/plivo-dotnet/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>http://github.com/plivo/plivo-dotnet</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>
*5.27.0 Added New Param 'renewalDate' in GetNumbers and ListNumbers. Add 5 new filters to AccountPhoneNumber - list all my numbers API:'renewal_date', 'renewal_date__gt', 'renewal_date__gte','renewal_date__lt' and 'renewal_date__lte'
*5.26.0 Added new param 'ReplacedSender' to the response
*5.25.0 Added New Param 'source_ip' in GetCall and ListCalls. Add source_ip to the response for the retrieve a call details API and the retreive all call details API
* 5.28.0 Added new Params 'MonthlyRecordingStorageAmount', 'RecordingStorageRate', 'RecordingStorageDuration' and 'RoundedRecordingDuration' to List Recordings and Get Recording APIs
* 5.27.0 Added New Param 'renewalDate' in GetNumbers and ListNumbers. Add 5 new filters to AccountPhoneNumber - list all my numbers API:'renewal_date', 'renewal_date__gt', 'renewal_date__gte','renewal_date__lt' and 'renewal_date__lte'
* 5.26.0 Added new param 'ReplacedSender' to the response
* 5.25.0 Added New Param 'source_ip' in GetCall and ListCalls. Add source_ip to the response for the retrieve a call details API and the retreive all call details API
* 5.24.0 Added New Param 'CreatedAt' to List Profiles, Get Profile, List Brands, Get Brand, List Campaigns, Get Campaign APIs
* 5.23.0 Added New Param 'IsDomestic' to List Message and Get Message APIs
* 5.22.0 Added New Params to List Message and Get Message APIs
Expand Down
8 changes: 8 additions & 0 deletions src/Plivo/Resource/Recording/Recording.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ public class Recording : Resource
public string AddTime { get; set; }
public string CallUuid { get; set; }
public string ConferenceName { get; set; }
public float MonthlyRecordingStorageAmount { get; set; }
public string RecordingDurationMs { get; set; }
public string RecordingEndMs { get; set; }
public string RecordingFormat { get; set; }
public string RecordingId { get; set; }
public string RecordingStartMs { get; set; }
public uint RecordingStorageDuration { get; set; }
public float RecordingStorageRate { get; set; }
public string RecordingType { get; set; }
public string RecordingUrl { get; set; }
public string ResourceUri { get; set; }
public uint RoundedRecordingDuration { get; set; }
public string FromNumber { get; set; }
public string ToNumber { get; set; }

Expand All @@ -25,14 +29,18 @@ public override string ToString()
"AddTime: " + AddTime + "\n" +
"CallUuid: " + CallUuid + "\n" +
"ConferenceName: " + ConferenceName + "\n" +
"MonthlyRecordingStorageAmount: " + MonthlyRecordingStorageAmount + "\n" +
"RecordingDurationMs: " + RecordingDurationMs + "\n" +
"RecordingEndMs: " + RecordingEndMs + "\n" +
"RecordingFormat: " + RecordingFormat + "\n" +
"RecordingId: " + RecordingId + "\n" +
"RecordingStartMs: " + RecordingStartMs + "\n" +
"RecordingStorageDuration: " + RecordingStorageDuration + "\n" +
"RecordingStorageRate: " + RecordingStorageRate + "\n" +
"RecordingType: " + RecordingType + "\n" +
"RecordingUrl: " + RecordingUrl + "\n" +
"ResourceUri: " + ResourceUri + "\n" +
"RoundedRecordingDuration: " + RoundedRecordingDuration + "\n" +
"FromNumber: " + FromNumber + "\n" +
"ToNumber: " + ToNumber + "\n";

Expand Down
36 changes: 32 additions & 4 deletions src/Plivo/Resource/Recording/RecordingInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,26 @@ public async Task<AsyncResponse> GetAsync(string recordingId, string callbackUrl
/// <param name="mpcName">Mpc Name.</param>
/// <param name="conferenceUuid">Conference Uuid.</param>
/// <param name="mpcUuid">mpc Uuid.</param>
/// <param name="recordingStorageDuration">Number of days the recording has been stored.</param>
/// <param name="recordingStorageDuration__Gt">All recordings older than given number of days.</param>
/// <param name="recordingStorageDuration__Gte">All recordings older than given number of days or equal to it.</param>
/// <param name="recordingStorageDuration__Lt">All recordings newer than given number of days.</param>
/// <param name="recordingStorageDuration__Lte">All recordings older than given number of days or equal to it.</param>
public ListResponse<Recording> List(
string fromNumber = null, string toNumber = null,
string conferenceName = null, string mpcName = null,
string conferenceUuid = null, string mpcUuid = null,
string subaccount = null, string callUuid = null,
DateTime? addTime = null, DateTime? addTime_Gt = null,
string subaccount = null, string callUuid = null,
uint? recordingStorageDuration = null,
uint? recordingStorageDuration__Gt = null,
uint? recordingStorageDuration__Gte = null,
uint? recordingStorageDuration__Lt = null,
uint? recordingStorageDuration__Lte = null,
DateTime? addTime_Gt = null,
DateTime? addTime_Gte = null, DateTime? addTime_Lt = null,
DateTime? addTime_Lte = null, uint? limit = null,
uint? offset = null)
{
var _addTime = addTime?.ToString("yyyy-MM-dd HH':'mm':'ss'.'ffffff''") ?? null;
var _addTime_Gt = addTime_Gt?.ToString("yyyy-MM-dd HH':'mm':'ss'.'ffffff''") ?? null;
var _addTime_Gte = addTime_Gte?.ToString("yyyy-MM-dd HH':'mm':'ss'.'ffffff''") ?? null;
var _addTime_Lt = addTime_Lt?.ToString("yyyy-MM-dd HH':'mm':'ss'.'ffffff''") ?? null;
Expand All @@ -119,7 +128,11 @@ public ListResponse<Recording> List(
mpcUuid,
subaccount,
callUuid,
_addTime,
recordingStorageDuration,
recordingStorageDuration__Gt,
recordingStorageDuration__Gte,
recordingStorageDuration__Lt,
recordingStorageDuration__Lte,
_addTime_Gt,
_addTime_Gte,
_addTime_Lt,
Expand Down Expand Up @@ -161,11 +174,21 @@ public ListResponse<Recording> List(
/// <param name="mpcName">Mpc Name.</param>
/// <param name="conferenceUuid">Conference Uuid.</param>
/// <param name="mpcUuid">mpc Uuid.</param>
/// <param name="recordingStorageDuration">Number of days the recording has been stored.</param>
/// <param name="recordingStorageDuration__Gt">All recordings older than given number of days.</param>
/// <param name="recordingStorageDuration__Gte">All recordings older than given number of days or equal to it.</param>
/// <param name="recordingStorageDuration__Lt">All recordings newer than given number of days.</param>
/// <param name="recordingStorageDuration__Lte">All recordings older than given number of days or equal to it.</param>
public async Task<AsyncResponse> ListAsync(
string fromNumber = null, string toNumber = null,
string conferenceName = null, string mpcName = null,
string conferenceUuid = null, string mpcUuid = null,
string subaccount = null, string callUuid = null,
uint? recordingStorageDuration = null,
uint? recordingStorageDuration__Gt = null,
uint? recordingStorageDuration__Gte = null,
uint? recordingStorageDuration__Lt = null,
uint? recordingStorageDuration__Lte = null,
DateTime? addTime = null, DateTime? addTime_Gt = null,
DateTime? addTime_Gte = null, DateTime? addTime_Lt = null,
DateTime? addTime_Lte = null, uint? limit = null,
Expand All @@ -191,6 +214,11 @@ public async Task<AsyncResponse> ListAsync(
mpcUuid,
subaccount,
callUuid,
recordingStorageDuration,
recordingStorageDuration__Gt,
recordingStorageDuration__Gte,
recordingStorageDuration__Lt,
recordingStorageDuration__Lte,
_addTime,
_addTime_Gt,
_addTime_Gte,
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class Version
/// <summary>
/// DotNet SDK version
/// </summary>
public const string SdkVersion = "5.27.0";
public const string SdkVersion = "5.28.0";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3",
"resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/",
"from_number": "+919999323467",
"to_number": "+919891865130"
"to_number": "+919891865130",
"monthly_recording_storage_amount": 0.0008,
"rounded_recording_duration": 120,
"recording_storage_duration": 209,
"recording_storage_rate": 0.0004
}
18 changes: 15 additions & 3 deletions tests_netcore/Plivo.NetCore.Test/Mocks/recordingListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
"recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3",
"resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/",
"from_number": "+919999323467",
"to_number": "+919891865130"
"to_number": "+919891865130",
"monthly_recording_storage_amount": 0.0008,
"rounded_recording_duration": 120,
"recording_storage_duration": 209,
"recording_storage_rate": 0.0004
},
{
"add_time": "2014-08-05 16:05:21.993853+05:30",
Expand All @@ -36,7 +40,11 @@
"recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3",
"resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/",
"from_number": "+919999323467",
"to_number": "+919891865130"
"to_number": "+919891865130",
"monthly_recording_storage_amount": 0.0008,
"rounded_recording_duration": 120,
"recording_storage_duration": 209,
"recording_storage_rate": 0.0004
},
{
"add_time": "2014-08-05 15:51:56.582492+05:30",
Expand All @@ -51,7 +59,11 @@
"recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3",
"resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/",
"from_number": "+919999323467",
"to_number": "+919891865130"
"to_number": "+919891865130",
"monthly_recording_storage_amount": 0.0008,
"rounded_recording_duration": 120,
"recording_storage_duration": 209,
"recording_storage_rate": 0.0004
}
]
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.27.0",
"version": "5.28.0",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down

0 comments on commit 35aa639

Please sign in to comment.