Skip to content

Commit

Permalink
Adding payload parameter in whatsapp templates (#339)
Browse files Browse the repository at this point in the history
* Adding payload parameter in whatsapp templates
  • Loading branch information
saurabhnewatiya-plivo authored Apr 18, 2024
1 parent c41af1d commit 05e9441
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Plivo/Util/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Parameter {
public $type;
public $text;
public $media;
public $payload;
public $currency;
public $date_time;

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 05e9441

Please sign in to comment.