Skip to content

feat: add compliance_application_id param to numbers.buy()#314

Merged
koushiksk-plivo (koushiksk-plivo) merged 1 commit into
masterfrom
feat/compliance-application-id-buy
Jun 12, 2026
Merged

feat: add compliance_application_id param to numbers.buy()#314
koushiksk-plivo (koushiksk-plivo) merged 1 commit into
masterfrom
feat/compliance-application-id-buy

Conversation

@koushiksk-plivo

Copy link
Copy Markdown
Contributor

What

Adds an optional compliance_application_id parameter to numbers.buy() (the phone-number purchase method). It is forwarded as the compliance_application_id wire parameter on the POST request. Also bumps the SDK version to 4.61.0 with a matching CHANGELOG entry and adds test coverage.

Why

Regulated numbers (e.g. India) require an approved regulatory compliance application to be linked at purchase time. Previously buy() only sent app_id / cnam_lookup / ha_enable (and verification_info), with no way to associate a compliance application during the buy call.

The new parameter is a trailing optional argument, so the change is fully backward-compatible — existing callers are unaffected.

Testing

The full tests/resources/test_numbers.py suite passes (10/10), including the new test_create_with_compliance_application_id which asserts the param is serialized onto the request body.

🤖 Generated with Claude Code

Adds an optional compliance_application_id parameter to the phone-number
buy method, sent as the compliance_application_id wire param. Lets regulated
numbers (e.g. India) be purchased with an approved regulatory compliance
application linked at purchase time. Backward-compatible trailing optional kwarg.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@koushiksk-plivo koushiksk-plivo (koushiksk-plivo) merged commit 989c589 into master Jun 12, 2026
7 of 12 checks passed
@koushiksk-plivo koushiksk-plivo (koushiksk-plivo) deleted the feat/compliance-application-id-buy branch June 12, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants