Skip to content

Commit a0cd323

Browse files
Merge pull request #303 from plivo/add-campaign-optional-fields
feat: add sample3-5 and policy links to campaign create/update
2 parents 3bc956d + ead01bb commit a0cd323

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Change Log
2+
## [4.59.6](https://github.com/plivo/plivo-python/tree/v4.59.6) (2026-02-18)
3+
**Feature - Campaign API optional fields support**
4+
- Added `sample3`, `sample4`, `sample5` optional sample message fields to Campaign `create` and `update` methods
5+
- Added `terms_and_conditions_link` and `privacy_policy_link` optional fields to Campaign `create` and `update` methods
6+
27
## [4.59.5](https://github.com/plivo/plivo-python/tree/v4.59.5) (2026-01-21)
38
**Feature - HA Number support**
49
- Added `ha_enable` optional parameter to PhoneNumber `buy` method for enabling High Availability Number functionality

plivo/resources/brand.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@ def list(self, type=None, status=None,
4040
brand_type=[optional(of_type(six.text_type), is_in(('STANDARD','STARTER')))],
4141
profile_uuid=[required(of_type(six.text_type))],
4242
secondary_vetting=[optional(of_type_exact(bool))],
43+
business_contact_email=[optional(of_type(six.text_type))],
4344
url=[optional(of_type(six.text_type))],
4445
method=[optional(of_type(six.text_type))])
4546
def create(self,
4647
brand_alias,
4748
brand_type,
4849
profile_uuid,
4950
secondary_vetting=False,
51+
business_contact_email='',
5052
url='',
5153
method='POST'
5254
):

plivo/resources/campaign.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ def delete(self, campaign_id):
3535
optout_keywords=[optional(of_type(six.text_type))],
3636
optout_message=[optional(of_type(six.text_type))],
3737
help_keywords=[optional(of_type(six.text_type))],
38+
sample3=[optional(of_type(six.text_type))],
39+
sample4=[optional(of_type(six.text_type))],
40+
sample5=[optional(of_type(six.text_type))],
41+
terms_and_conditions_link=[optional(of_type(six.text_type))],
42+
privacy_policy_link=[optional(of_type(six.text_type))],
3843
)
39-
def update(self, campaign_id, reseller_id='', description='', sample1='', sample2='', help_message='', message_flow='', optin_keywords='', optin_message='', optout_keywords='', optout_message='', help_keywords=''):
44+
def update(self, campaign_id, reseller_id='', description='', sample1='', sample2='', sample3='', sample4='', sample5='', help_message='', message_flow='', optin_keywords='', optin_message='', optout_keywords='', optout_message='', help_keywords='', terms_and_conditions_link='', privacy_policy_link=''):
4045

4146
payload = locals()
4247
payload.pop("campaign_id")
@@ -90,7 +95,9 @@ def list(self, brand_id=None, registration_status=None, usecase=None, campaign_s
9095
optout_message=[optional(of_type(six.text_type))],
9196
help_keywords=[optional(of_type(six.text_type))],
9297
url=[optional(of_type(six.text_type))],
93-
method=[optional(of_type(six.text_type))])
98+
method=[optional(of_type(six.text_type))],
99+
terms_and_conditions_link=[optional(of_type(six.text_type))],
100+
privacy_policy_link=[optional(of_type(six.text_type))])
94101
def create(self,
95102
brand_id,
96103
vertical,
@@ -119,7 +126,9 @@ def create(self,
119126
subscriber_help=False,
120127
affiliate_marketing=False,
121128
campaign_alias=None,
122-
sub_usecases=[]):
129+
sub_usecases=[],
130+
terms_and_conditions_link='',
131+
privacy_policy_link=''):
123132
return self.client.request('POST', ('10dlc', 'Campaign'),
124133
to_param_dict(self.create, locals()))
125134

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.59.5',
13+
version='4.59.6',
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)