Skip to content
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log
## [4.60.2](https://github.com/plivo/plivo-python/tree/v4.60.2) (2026-05-26)
**Feature - Profile API DBA field support**
- Added Doing Business As (DBA) field support to Profile API

**Feature - Expose sub_account_name on Number resource**
- `Number` resource now surfaces `sub_account_name` alongside the existing `sub_account` (auth_id) on rented number listing and get APIs (dynamic attribute, already worked at runtime; this release adds explicit test coverage)

Expand Down
10 changes: 6 additions & 4 deletions plivo/resources/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def delete(self, profile_uuid):
plivo_subaccount=[optional(of_type(six.text_type))],
address=[optional(of_type_exact(dict))],
authorized_contact=[optional(of_type_exact(dict))],
business_contact_email=[optional(of_type(six.text_type))])
business_contact_email=[optional(of_type(six.text_type))],
doing_business_as=[optional(of_type(six.text_type))])
def create(self,
profile_alias,
customer_type,
Expand All @@ -77,13 +78,14 @@ def create(self,
website='',
address={},
authorized_contact={},
business_contact_email=''):
business_contact_email='',
doing_business_as=''):
return self.client.request('POST', ('Profile', ),
to_param_dict(self.create, locals()))


# params values should be dictionary like
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':''}
# params values should be dictionary like
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':'', 'doing_business_as':''}
def update(self,profile_uuid, params=None):
if params == None:
raise ValidationError(
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.60.1'
__version__ = '4.60.2'
1 change: 1 addition & 0 deletions tests/resources/fixtures/profileGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"company_name": "ABC Inc.",
"customer_type": "RESELLER",
"doing_business_as": "ABC DBA",
"ein": "111111111",
"ein_issuing_country": "US",
"entity_type": "PUBLIC_PROFIT",
Expand Down
5 changes: 3 additions & 2 deletions tests/resources/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def test_create(self):
"title": "CEO",
"seniority": "C_LEVEL"
},
business_contact_email="employee@company.com"
business_contact_email="employee@company.com",
doing_business_as="Test DBA"
)
self.assertEqual('POST', self.client.current_request.method)
self.assertUrlEqual(
Expand Down Expand Up @@ -73,7 +74,7 @@ def test_delete(self):

@with_response(200)
def test_update(self):
param = {'company_name': 'google'}
param = {'company_name': 'google', 'doing_business_as': 'Updated DBA'}
response = self.client.profile.update(profile_uuid='09322f43-fe16-4525-b8e4-4229c867795d', params=param)
# Verifying the endpoint hit
print(self.client.current_request.url)
Expand Down
Loading