Skip to content

Commit d52f90a

Browse files
Merge pull request #311 from plivo/feat/add-dba-field-to-profile
feat: add Doing Business As (DBA) field support to Profile API
2 parents 524c115 + 3592d39 commit d52f90a

5 files changed

Lines changed: 14 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22
## [4.60.2](https://github.com/plivo/plivo-python/tree/v4.60.2) (2026-05-26)
3+
**Feature - Profile API DBA field support**
4+
- Added Doing Business As (DBA) field support to Profile API
5+
36
**Feature - Expose sub_account_name on Number resource**
47
- `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)
58

plivo/resources/profile.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def delete(self, profile_uuid):
6060
plivo_subaccount=[optional(of_type(six.text_type))],
6161
address=[optional(of_type_exact(dict))],
6262
authorized_contact=[optional(of_type_exact(dict))],
63-
business_contact_email=[optional(of_type(six.text_type))])
63+
business_contact_email=[optional(of_type(six.text_type))],
64+
doing_business_as=[optional(of_type(six.text_type))])
6465
def create(self,
6566
profile_alias,
6667
customer_type,
@@ -77,13 +78,14 @@ def create(self,
7778
website='',
7879
address={},
7980
authorized_contact={},
80-
business_contact_email=''):
81+
business_contact_email='',
82+
doing_business_as=''):
8183
return self.client.request('POST', ('Profile', ),
8284
to_param_dict(self.create, locals()))
8385

8486

85-
# params values should be dictionary like
86-
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':''}
87+
# params values should be dictionary like
88+
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':'', 'doing_business_as':''}
8789
def update(self,profile_uuid, params=None):
8890
if params == None:
8991
raise ValidationError(

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.60.1'
2+
__version__ = '4.60.2'

tests/resources/fixtures/profileGetResponse.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"company_name": "ABC Inc.",
99
"customer_type": "RESELLER",
10+
"doing_business_as": "ABC DBA",
1011
"ein": "111111111",
1112
"ein_issuing_country": "US",
1213
"entity_type": "PUBLIC_PROFIT",

tests/resources/test_profile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def test_create(self):
3434
"title": "CEO",
3535
"seniority": "C_LEVEL"
3636
},
37-
business_contact_email="employee@company.com"
37+
business_contact_email="employee@company.com",
38+
doing_business_as="Test DBA"
3839
)
3940
self.assertEqual('POST', self.client.current_request.method)
4041
self.assertUrlEqual(
@@ -73,7 +74,7 @@ def test_delete(self):
7374

7475
@with_response(200)
7576
def test_update(self):
76-
param = {'company_name': 'google'}
77+
param = {'company_name': 'google', 'doing_business_as': 'Updated DBA'}
7778
response = self.client.profile.update(profile_uuid='09322f43-fe16-4525-b8e4-4229c867795d', params=param)
7879
# Verifying the endpoint hit
7980
print(self.client.current_request.url)

0 commit comments

Comments
 (0)