Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotnet-SDK changes for P2 Apis #270

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [5.43.0](https://github.com/plivo/plivo-dotnet/tree/v5.43.0) (2023-01-11)
**Feature - Fixes for api-messaing list API meta data**
- Fixed Meta data response for powerpack, media, and profile list

## [5.42.1](https://github.com/plivo/plivo-dotnet/tree/v5.42.1) (2023-12-19)
**Feature - added param in speak api**
- Added new field `type` for POST Speak APIs
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 5.42.1
PM> Install-Package Plivo -Version 5.43.0
```

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

```
> dotnet add package Plivo --version 5.42.1
> dotnet add package Plivo --version 5.43.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.42.1</ReleaseVersion>
<ReleaseVersion>5.43.0</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
3 changes: 2 additions & 1 deletion src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<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.42.1</version>
<version>5.43.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.43.0 Fixes for api-messaging list API meta data.
* 5.42.0 Added Params `vertical`, `campaign_alias` for GET and LIST Campaigns.
* 5.41.1 Support Params `from_number` and `to_number` for LIST Message.
* 5.41.0 Added New Params `error_code`, `error_reason` for GET and LIST Campaign.
Expand Down
6 changes: 4 additions & 2 deletions src/Plivo/Resource/Media/MediaInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public ListResponse<Media> List(
return ExecuteWithExceptionUnwrap(() =>
{
var resources = Task.Run(async () => await ListResources<ListResponse<Media>>(data).ConfigureAwait(false)).Result;

resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);
Expand All @@ -153,7 +154,8 @@ public async Task<ListResponse<Media>> ListAsync(
offset
});
var resources = await ListResources<ListResponse<Media>>(data);

resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);
Expand Down
25 changes: 20 additions & 5 deletions src/Plivo/Resource/Powerpack/PowerpackInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,11 @@ public ListResponse<Powerpack> List(
return ExecuteWithExceptionUnwrap(() =>
{
var resources = Task.Run(async () => await ListResources<ListResponse<Powerpack>>("Powerpack",data).ConfigureAwait(false)).Result;
resources.Objects.ForEach(
resources.Objects.ForEach(
(obj) => obj.Interface = this
);
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;

return resources;
});
Expand All @@ -211,7 +213,8 @@ public async Task<ListResponse<Powerpack>> ListAsync(
resources.Objects.ForEach(
(obj) => obj.Interface = this
);

resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
return resources;
}
#endregion
Expand Down Expand Up @@ -306,7 +309,9 @@ public ListResponse<Numbers> List_Numbers(string uuid, string starts_with =null,
return ExecuteWithExceptionUnwrap(() =>
{
var resources = Task.Run(async () => await ListResources<ListResponse<Numbers>>("NumberPool/"+uuid+"/Number", data).ConfigureAwait(false)).Result;
resources.Objects.ForEach(
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);

Expand Down Expand Up @@ -342,6 +347,8 @@ public async Task<ListResponse<Numbers>> List_NumbersAsync(
service
});
var resources = await ListResources<ListResponse<Numbers>>("NumberPool/"+uuid+"/Number", data);
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);
Expand Down Expand Up @@ -681,7 +688,9 @@ public ListResponse<Shortcode> ListShortcode(string uuid, uint? limit = null, ui
return ExecuteWithExceptionUnwrap(() =>
{
var resources = Task.Run(async () => await ListResources<ListResponse<Shortcode>>("NumberPool/"+uuid+"/Shortcode", data).ConfigureAwait(false)).Result;
resources.Objects.ForEach(
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);

Expand Down Expand Up @@ -709,6 +718,8 @@ public async Task<ListResponse<Shortcode>> List_ShortcodeAsync(
offset
});
var resources = await ListResources<ListResponse<Shortcode>>("NumberPool/"+uuid+"/Shortcode", data);
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);
Expand Down Expand Up @@ -808,7 +819,9 @@ public ListResponse<Tollfree> ListTollfree(string uuid, uint? limit = null, uint
return ExecuteWithExceptionUnwrap(() =>
{
var resources = Task.Run(async () => await ListResources<ListResponse<Tollfree>>("NumberPool/"+uuid+"/Tollfree", data).ConfigureAwait(false)).Result;
resources.Objects.ForEach(
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);

Expand Down Expand Up @@ -836,6 +849,8 @@ public async Task<ListResponse<Tollfree>> List_TollfreeAsync(
offset
});
var resources = await ListResources<ListResponse<Tollfree>>("NumberPool/"+uuid+"/Tollfree", data);
resources.Meta.Previous = string.IsNullOrEmpty(resources.Meta.Previous) ? "null" : resources.Meta.Previous;
resources.Meta.Next = string.IsNullOrEmpty(resources.Meta.Next) ? "null" : resources.Meta.Next;
resources.Objects.ForEach(
(obj) => obj.Interface = this
);
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.42.1";
public const string SdkVersion = "5.43.0";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.42.1",
"version": "5.43.0",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down
Loading