Skip to content

Commit f9befa7

Browse files
Merge pull request #294 from plivo/SMS-7359
SMS-7359 : Adding paramater_name
2 parents 6cce825 + f51ea03 commit f9befa7

File tree

6 files changed

+80
-3
lines changed

6 files changed

+80
-3
lines changed

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Change Log
2+
3+
## [5.49.4](https://github.com/plivo/plivo-dotnet/tree/v5.49.4) (2025-02-25)
4+
**Enhancement - Supporting parameter_name in WhatsApp Template .**
5+
- Supporting parameter_name in WhatsApp Template .
6+
27
## [5.49.3](https://github.com/plivo/plivo-dotnet/tree/v5.49.3) (2025-02-18)
38
**Feature - Throw PlivoGeoPermissionException on synchronous geopermissions error**
49

Diff for: README.md

+66
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,72 @@ namespace PlivoExamples
591591
}
592592
```
593593

594+
#### Templated WhatsApp Messages With Named Parameter
595+
This guide shows how to send templated WhatsApp messages with named parameters.
596+
597+
Example:
598+
```csharp
599+
using System;
600+
using System.Collections.Generic;
601+
using Plivo;
602+
using Plivo.Resource.Message;
603+
604+
namespace PlivoExamples
605+
{
606+
internal class Program
607+
{
608+
public static void Main(string[] args)
609+
{
610+
var api = new PlivoApi("<auth_id>","<auth_token>");
611+
612+
var template = new Template
613+
{
614+
Name = "template_name",
615+
Language = "en_US",
616+
Components = new List<Component>
617+
{
618+
new Component
619+
{
620+
Type = "header",
621+
Parameters = new List<Parameter>
622+
{
623+
new Parameter
624+
{
625+
Type = "text",
626+
ParameterName = "header_title",
627+
Text = "WA-header"
628+
629+
}
630+
}
631+
},
632+
new Component
633+
{
634+
Type = "body",
635+
Parameters = new List<Parameter>
636+
{
637+
new Parameter
638+
{
639+
Type = "text",
640+
Text = "Saurabh",
641+
ParameterName = "user_name"
642+
}
643+
}
644+
}
645+
}
646+
};
647+
648+
var response = api.Message.Create(
649+
src: "+14151112221",
650+
dst: "+14151112222",
651+
type: "whatsapp",
652+
template: template);
653+
Console.WriteLine(response);
654+
}
655+
}
656+
}
657+
658+
659+
```
594660
### More examples
595661
Refer to the [Plivo API Reference](https://api-reference.plivo.com/latest/net/introduction/overview) for more examples.
596662

Diff for: src/Plivo/Plivo.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;netstandard1.3</TargetFrameworks>
4-
<ReleaseVersion>5.49.3</ReleaseVersion>
4+
<ReleaseVersion>5.49.4</ReleaseVersion>
55
<Version />
66
<Authors>Plivo SDKs Team</Authors>
77
<Owners>Plivo Inc.</Owners>

Diff for: src/Plivo/Resource/Message/MessageInterface.cs

+6
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,12 @@ public class Parameter
987987
[JsonProperty("type")]
988988
public string Type { get; set; }
989989

990+
/// <summary>
991+
/// Gets or sets the name of the parameter.
992+
/// </summary>
993+
[JsonProperty("parameter_name")]
994+
public string ParameterName { get; set; }
995+
990996
/// <summary>
991997
/// Gets or sets the text value of the parameter.
992998
/// </summary>

Diff for: src/Plivo/Version.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Version
1010
/// <summary>
1111
/// DotNet SDK version
1212
/// </summary>
13-
public const string SdkVersion = "5.49.3";
13+
public const string SdkVersion = "5.49.4";
1414
/// <summary>
1515
/// Plivo API version
1616
/// </summary>

Diff for: version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "5.49.3",
2+
"version": "5.49.4",
33
"publicReleaseRefSpec": [
44
"^refs/heads/master$",
55
"^refs/heads/v\\d+(?:\\.\\d+)?$"

0 commit comments

Comments
 (0)