diff --git a/CHANGELOG.md b/CHANGELOG.md index ffbeb192..1e83db78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/plivo/resources/profile.py b/plivo/resources/profile.py index 74988316..ba4da1d3 100644 --- a/plivo/resources/profile.py +++ b/plivo/resources/profile.py @@ -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, @@ -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( diff --git a/plivo/version.py b/plivo/version.py index d9200218..0aa31533 100644 --- a/plivo/version.py +++ b/plivo/version.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -__version__ = '4.60.1' +__version__ = '4.60.2' diff --git a/tests/resources/fixtures/profileGetResponse.json b/tests/resources/fixtures/profileGetResponse.json index 66c84d02..a30b2a96 100644 --- a/tests/resources/fixtures/profileGetResponse.json +++ b/tests/resources/fixtures/profileGetResponse.json @@ -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", diff --git a/tests/resources/test_profile.py b/tests/resources/test_profile.py index 54611281..bdba33e8 100644 --- a/tests/resources/test_profile.py +++ b/tests/resources/test_profile.py @@ -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( @@ -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)