Skip to content

Commit

Permalink
Merge pull request #215 from plivo/campaign_creation_addition_param
Browse files Browse the repository at this point in the history
adding more attributes to campaign request
  • Loading branch information
narayana-plivo authored Sep 28, 2022
2 parents 567849b + 2a665d3 commit 92b5bf3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Change Log

## [4.26.2](https://github.com/plivo/plivo-python/tree/v4.26.2) (2022-09-28)
**10DLC: Adding more attributes to campaign creation request**
- Adding more attributes to campaign creation request

## [4.26.1](https://github.com/plivo/plivo-python/tree/v4.26.1) (2022-09-08)
**Feature - Limit bug fix**
- Fixed Limit threshold in 10DLC APIs


## [4.26.0](https://github.com/plivo/plivo-python/tree/v4.26.0) (2022-08-30)
**Feature - 10DLC APIs**
- Added new 10DLC APIs
Expand Down
14 changes: 14 additions & 0 deletions plivo/resources/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def list(self, brand=None, usecase=None,
sample3=[optional(of_type(six.text_type))],
sample4=[optional(of_type(six.text_type))],
sample5=[optional(of_type(six.text_type))],
message_flow=[optional(of_type(six.text_type))],
help_message=[optional(of_type(six.text_type))],
optin_keywords=[optional(of_type(six.text_type))],
optin_message=[optional(of_type(six.text_type))],
optout_keywords=[optional(of_type(six.text_type))],
optout_message=[optional(of_type(six.text_type))],
help_keywords=[optional(of_type(six.text_type))],
url=[optional(of_type(six.text_type))],
method=[optional(of_type(six.text_type))])
def create(self,
Expand All @@ -67,6 +74,13 @@ def create(self,
sample4='',
sample5='',
url='',
message_flow='',
help_message='',
optin_keywords='',
optin_message='',
optout_keywords='',
optout_message='',
help_keywords='',
method='POST',
embedded_link=False,
embedded_phone=False,
Expand Down
2 changes: 1 addition & 1 deletion plivo/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = '4.26.1'
__version__ = '4.26.2'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='plivo',
version='4.26.1',
version='4.26.2',
description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML',
long_description=long_description,
url='https://github.com/plivo/plivo-python',
Expand Down
15 changes: 11 additions & 4 deletions tests/resources/test_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_create(self):
vertical = "INSURANCE",
usecase = "MIXED",
sub_usecases = sub_usecase,
description = "sample description text",
description = "sample description is mandatory param and minimum 40 character,sample description is mandatory param and minimum 40 character",
embedded_link = False,
embedded_phone = False,
age_gated = False,
Expand All @@ -20,13 +20,20 @@ def test_create(self):
subscriber_optout = True,
subscriber_help = True,
affiliate_marketing = False,
sample1 = "test 1",
sample2 = "test 2",
sample1 = "sample messgae 1 is mandatory param and minimum 20 character",
sample2 = "sample messgae 2 is mandatory param and minimum 20 character",
sample3 = "test 1",
sample4 = "test 2",
sample5 = "test 2",
url="http://example.com/test",
method="POST")
method="POST",
message_flow = "message flow is mandatory field with 40 minimum character length,message flow is mandatory field with 40 minimum character length",
help_message = "help messgae is mandatory param and minimum 20 character",
optin_keywords= '',
optin_message ='',
optout_keywords = '',
optout_message = "optout message should be mandatory and 20 minimum character",
help_keywords='')
self.assertEqual('POST', self.client.current_request.method)
self.assertUrlEqual(
'https://api.plivo.com/v1/Account/MAXXXXXXXXXXXXXXXXXX/10dlc/Campaign/',
Expand Down

0 comments on commit 92b5bf3

Please sign in to comment.