Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Change Log
## [4.59.5](https://github.com/plivo/plivo-python/tree/v4.59.5) (2026-01-21)
**Feature - HA Number support**
- Added `ha_enable` optional parameter to PhoneNumber `buy` method for enabling High Availability Number functionality
- Added `fallback_number` field in PhoneNumber buy response

## [4.59.4](https://github.com/plivo/plivo-python/tree/v4.59.4) (2026-01-13)
**Feature - Profile API business_contact_email support**
- Added `business_contact_email` parameter support to Profile `create` and `update` methods for PUBLIC entity types
Expand Down
5 changes: 3 additions & 2 deletions plivo/resources/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def __init__(self, client):
number=[is_phonenumber()],
app_id=[optional(of_type(six.text_type))],
verification_info=[optional(of_type_exact(dict))],
cnam_lookup=[optional(of_type(six.text_type))],)
def buy(self, number, app_id=None, verification_info=None, cnam_lookup=None):
cnam_lookup=[optional(of_type(six.text_type))],
ha_enable=[optional(of_type(bool))],)
def buy(self, number, app_id=None, verification_info=None, cnam_lookup=None, ha_enable=None):
return self.client.request('POST', ('PhoneNumber', number),
to_param_dict(self.buy, locals()))

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.59.3'
__version__ = '4.59.5'
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.59.4',
version='4.59.5',
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
3 changes: 2 additions & 1 deletion tests/resources/fixtures/phoneNumberCreateResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"numbers": [
{
"number": "14154009186",
"status": "Success"
"status": "Success",
"fallback_number": "14154009187"
}
],
"status": "fulfilled"
Expand Down
7 changes: 7 additions & 0 deletions tests/resources/test_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,10 @@ def test_create(self):
self.assertUrlEqual(self.client.current_request.url,
self.get_url('PhoneNumber', number_id))
self.assertEqual(self.client.current_request.method, 'POST')

@with_response(202)
def test_create_with_ha_enable(self):
self.client.numbers.buy(number_id, app_id='test', ha_enable=True)
self.assertUrlEqual(self.client.current_request.url,
self.get_url('PhoneNumber', number_id))
self.assertEqual(self.client.current_request.method, 'POST')
Loading