Skip to content

Commit 3fce6ff

Browse files
Adding payload parameter in whatsapp templates (#261)
* Adding payload parameter in whatsapp templates
1 parent 412e40f commit 3fce6ff

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [4.50.0](https://github.com/plivo/plivo-python/tree/v4.50.0) (2024-04-18)
4+
**Feature - Support for dynamic button components when sending a templated WhatsApp message**
5+
- Added new param `payload` in templates to support dynamic payload in templates
6+
37
## [4.49.0](https://github.com/plivo/plivo-python/tree/v4.49.0) (2024-03-13)
48
**Adding Import Campaign**
59
-Added Import Campaign API

plivo/utils/template.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ class Parameter:
55
type=[required(of_type_exact(str))],
66
text=[optional(of_type_exact(str, type(None)))],
77
media=[optional(of_type_exact(str))],
8+
payload=[optional(of_type_exact(str))],
89
currency=[optional(of_type_exact(dict))],
910
date_time=[optional(of_type_exact(dict))],
1011
)
11-
def __init__(self, type, text=None, media=None, currency=None, date_time=None):
12+
def __init__(self, type, text=None, media=None, payload=None, currency=None, date_time=None):
1213
self.type = type
1314
self.text = text
1415
self.media = media
16+
self.payload = payload
1517
self.currency = Currency(**currency) if currency else None
1618
self.date_time = DateTime(**date_time) if date_time else None
1719

plivo/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = '4.49.0'
2+
__version__ = '4.50.0'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='plivo',
13-
version='4.49.0',
13+
version='4.50.0',
1414
description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML',
1515
long_description=long_description,
1616
url='https://github.com/plivo/plivo-python',

0 commit comments

Comments
 (0)