Skip to content

Commit

Permalink
Merge branch 'master' into SMS-6100
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumpala Vinay Kumar authored and Thumpala Vinay Kumar committed Jan 11, 2024
2 parents 3b28474 + c6367a8 commit 2daa85c
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 17 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## [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

## [5.42.0](https://github.com/plivo/plivo-dotnet/tree/v5.42.0) (2023-12-14)
**Feature - added two fields vertical and campaign_alias**
- Added response fields `vertical and campaign_alias`for LIST / GET Campaign APIs

## [5.41.1](https://github.com/plivo/plivo-dotnet/tree/v5.41.1) (2023-12-13)
**Support from_number and to_number filters for List Message**
- Supporting from_number and to_number params for List Message filtering

## [5.41.0](https://github.com/plivo/plivo-dotnet/tree/v5.41.0) (2023-11-29)
**Feature - new response field error_code and error_reason**
- Added new response field `error_code and error_reason`for LIST / GET Campaign 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.41.0
PM> Install-Package Plivo -Version 5.42.1
```

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

```
> dotnet add package Plivo --version 5.41.0
> dotnet add package Plivo --version 5.42.1
```

## 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.41.0</ReleaseVersion>
<ReleaseVersion>5.42.1</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
4 changes: 3 additions & 1 deletion src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
<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.41.0</version>
<version>5.42.1</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.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.
* 5.40.0 Added New Params `registration_status`.
* 5.39.0 API support for verifying, updating, getting and deleting caller IDs.
Expand Down
10 changes: 6 additions & 4 deletions src/Plivo/Resource/Call/Call.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,15 @@ public DeleteResponse<Call> StopRecording(string URL = null)
/// <param name="legs">Legs.</param>
/// <param name="loop">Loop.</param>
/// <param name="mix">Mix.</param>
/// <param name="type">Type.</param>
public UpdateResponse<Call> StartSpeaking(
string text, string voice = null,
string language = null, string legs = null, bool? loop = null,
bool? mix = null)
bool? mix = null, string type = null)
{
return ((CallInterface)Interface)
.StartSpeaking(
Id, text, voice, language, legs, loop, mix);
Id, text, voice, language, legs, loop, mix, type);
}
/// <summary>
/// Asynchronously starts the speaking.
Expand All @@ -294,16 +295,17 @@ public DeleteResponse<Call> StopRecording(string URL = null)
/// <param name="legs">Legs.</param>
/// <param name="loop">Loop.</param>
/// <param name="mix">Mix.</param>
/// <param name="type">Type.</param>
/// <param name="callbackUrl">Callback URL.</param>
/// <param name="callbackMethod">Callback method.</param>
public async Task<AsyncResponse> StartSpeakingAsync(
string text, string voice = null,
string language = null, string legs = null, bool? loop = null,
bool? mix = null, string callbackUrl = null, string callbackMethod = null)
bool? mix = null, string type = null, string callbackUrl = null, string callbackMethod = null)
{
return await ((CallInterface)Interface)
.StartSpeakingAsync(
Id, text, voice, language, legs, loop, mix, callbackUrl, callbackMethod);
Id, text, voice, language, legs, loop, mix, type, callbackUrl, callbackMethod);
}
#endregion

Expand Down
8 changes: 6 additions & 2 deletions src/Plivo/Resource/Call/CallInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,10 +1047,11 @@ public async Task<AsyncResponse> GetAsync(string callUuid = null, string callbac
/// <param name="legs">Legs.</param>
/// <param name="loop">Loop.</param>
/// <param name="mix">Mix.</param>
/// <param name="type">Type.</param>
public UpdateResponse<Call> StartSpeaking (
string callUuid = null, string text = null, string voice = null,
string language = null, string legs = null, bool? loop = null,
bool? mix = null) {
bool? mix = null, string type = null) {
MpcUtils.ValidParamString("callUuid",callUuid,true);
var mandatoryParams = new List<string> { "text" };
bool isVoiceRequest = true;
Expand All @@ -1063,6 +1064,7 @@ public async Task<AsyncResponse> GetAsync(string callUuid = null, string callbac
legs,
loop,
mix,
type,
isVoiceRequest
});

Expand All @@ -1083,12 +1085,13 @@ public async Task<AsyncResponse> GetAsync(string callUuid = null, string callbac
/// <param name="legs">Legs.</param>
/// <param name="loop">Loop.</param>
/// <param name="mix">Mix.</param>
/// <param name="type">Type.</param>
/// <param name="callbackUrl">Callback URL.</param>
/// <param name="callbackMethod">Callback method.</param>
public async Task<AsyncResponse> StartSpeakingAsync (
string callUuid = null, string text = null, string voice = null,
string language = null, string legs = null, bool? loop = null,
bool? mix = null, string callbackUrl = null, string callbackMethod = null) {
bool? mix = null, string type = null, string callbackUrl = null, string callbackMethod = null) {
MpcUtils.ValidParamString("callUuid",callUuid,true);
var mandatoryParams = new List<string> { "text" };
bool isVoiceRequest = true;
Expand All @@ -1101,6 +1104,7 @@ public async Task<AsyncResponse> GetAsync(string callUuid = null, string callbac
legs,
loop,
mix,
type,
callbackUrl,
callbackMethod,
isVoiceRequest
Expand Down
12 changes: 12 additions & 0 deletions src/Plivo/Resource/Campaign/Campaign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ public class CampaignResponse

[JsonProperty("error_reason")]
public string ErrorReason { get; set; }

[JsonProperty("vertical")]
public string Vertical { get; set; }

[JsonProperty("campaign_alias")]
public string CampaignAlias { get; set; }
}

[JsonObject(MemberSerialization.OptIn)]
Expand Down Expand Up @@ -231,6 +237,12 @@ public class ListCampaigns: Resource
[JsonProperty("error_reason")]
public string ErrorReason { get; set; }

[JsonProperty("vertical")]
public string Vertical { get; set; }

[JsonProperty("campaign_alias")]
public string CampaignAlias { get; set; }

public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
Expand Down
12 changes: 12 additions & 0 deletions src/Plivo/Resource/Message/MessageInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,8 @@ public async Task<ListResponse<MMSMedia>> ListMediaAsync(string messageUuid)
/// <param name="subaccount">Subaccount.</param>
/// <param name="limit">Limit.</param>
/// <param name="offset">Offset.</param>
/// <param name="from_number">FromNumber.</param>
/// <param name="to_number">ToNumber.</param>
/// <param name="message_state">MessageState.</param>
/// <param name="message_type">MessageType.</param>
/// <param name="message_direction">MessageDirection.</param>
Expand All @@ -599,6 +601,8 @@ public async Task<ListResponse<MMSMedia>> ListMediaAsync(string messageUuid)
string subaccount = null,
uint? limit = null,
uint? offset = null,
string from_number = null,
string to_number = null,
string message_state = null,
string message_type = null,
string message_direction = null,
Expand Down Expand Up @@ -628,6 +632,8 @@ public async Task<ListResponse<MMSMedia>> ListMediaAsync(string messageUuid)
subaccount,
limit,
offset,
from_number,
to_number,
message_state,
message_type,
message_direction,
Expand Down Expand Up @@ -661,6 +667,8 @@ public async Task<ListResponse<MMSMedia>> ListMediaAsync(string messageUuid)
/// <param name="subaccount">Subaccount.</param>
/// <param name="limit">Limit.</param>
/// <param name="offset">Offset.</param>
/// <param name="from_number">FromNumber.</param>
/// <param name="to_number">ToNumber.</param>
/// <param name="message_state">MessageState.</param>
/// <param name="message_type">MessageType.</param>
/// <param name="message_direction">MessageDirection.</param>
Expand All @@ -680,6 +688,8 @@ public async Task<ListResponse<MMSMedia>> ListMediaAsync(string messageUuid)
string subaccount = null,
uint? limit = null,
uint? offset = null,
string from_number = null,
string to_number = null,
string message_state = null,
string message_type = null,
string message_direction = null,
Expand Down Expand Up @@ -709,6 +719,8 @@ public async Task<ListResponse<MMSMedia>> ListMediaAsync(string messageUuid)
subaccount,
limit,
offset,
from_number,
to_number,
message_state,
message_type,
message_direction,
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.41.0";
public const string SdkVersion = "5.42.1";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
},
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
}
}
16 changes: 12 additions & 4 deletions tests_netcore/Plivo.NetCore.Test/Mocks/campaignListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"usecase": "MIXED",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BHYYNCK",
Expand All @@ -59,7 +61,9 @@
"usecase": "2FA",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BHYYNCK",
Expand All @@ -80,7 +84,9 @@
"usecase": "MIXED",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BRPXS6E",
Expand All @@ -99,7 +105,9 @@
"usecase": "ACCOUNT_NOTIFICATION",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
}
]
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.41.0",
"version": "5.42.1",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down

0 comments on commit 2daa85c

Please sign in to comment.