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

Adding payload parameter in whatsapp templates #339

Merged
merged 2 commits into from
Apr 18, 2024
Merged
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

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