From 05e9441b2d6cba2f0b5686c1cd9e80edc2163705 Mon Sep 17 00:00:00 2001 From: Saurabh Newatiya <107537111+saurabhnewatiya-plivo@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:49:19 +0530 Subject: [PATCH] Adding payload parameter in whatsapp templates (#339) * Adding payload parameter in whatsapp templates --- CHANGELOG.md | 4 ++++ src/Plivo/Util/template.php | 2 ++ src/Plivo/Version.php | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5909c9a..90e4a67b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [4.61.0](https://github.com/plivo/plivo-php/tree/v4.61.0) (2024-04-18) +**Feature - Support for dynamic button components when sending a templated WhatsApp message** +- Added new param `payload` in templates to support dynamic payload in templates + ## [4.60.0](https://github.com/plivo/plivo-php/tree/v4.60.0) (2024-03-13) **Feature - Import Campaign API** - Added import campaign API diff --git a/src/Plivo/Util/template.php b/src/Plivo/Util/template.php index 9638e81c..5f1a42bc 100644 --- a/src/Plivo/Util/template.php +++ b/src/Plivo/Util/template.php @@ -49,6 +49,7 @@ class Parameter { public $type; public $text; public $media; + public $payload; public $currency; public $date_time; @@ -58,6 +59,7 @@ public function __construct(array $data) $this->type = isset($data['type'])? $data['type'] : null; $this->text = isset($data['text'])? $data['text'] : null; $this->media = isset($data['media'])? $data['media'] : null; + $this->payload = isset($data['payload'])? $data['payload'] : null; $this->currency = isset($data['currency'])? new Currency($data['currency']) : null; $this->date_time = isset($data['date_time']) ? new DateTime($data['date_time']) : null; validateNotNullAndDataType($this->type, 'parameter', 'type', 'string', true); diff --git a/src/Plivo/Version.php b/src/Plivo/Version.php index 06f0230e..c8de49e4 100644 --- a/src/Plivo/Version.php +++ b/src/Plivo/Version.php @@ -20,7 +20,7 @@ class Version /** * @const int PHP helper library minor version number */ - const MINOR = 60; + const MINOR = 61; /** * @const int PHP helper library patch number