Skip to content

Conversation

@manisha1997
Copy link
Contributor

@manisha1997 manisha1997 commented Nov 25, 2025

Changes

Introducing Region-Edge mapping
Deprecating setEdge()

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@manisha1997 manisha1997 changed the title Chore: Regional API domain processing chore: Regional API domain processing Nov 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces region-to-edge mapping functionality by adding a new RegionEndpoints class that maps regional identifiers (e.g., "us1", "br1") to their corresponding edge locations (e.g., "ashburn", "sao-paulo"). The PR deprecates the setEdge() and edge() methods in favor of using region-based configuration, as Twilio is transitioning to regional processing architecture.

Key Changes:

  • Added RegionEndpoints class with static mapping of regions to edge locations
  • Modified TwilioRestClient and Twilio classes to automatically set edge from region when edge is not explicitly provided
  • Deprecated setEdge() and edge() methods with appropriate documentation

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/main/java/com/twilio/type/RegionEndpoints.java New class providing static region-to-edge mapping
src/main/java/com/twilio/http/TwilioRestClient.java Updated constructor to auto-set edge from region; deprecated edge() builder method
src/main/java/com/twilio/Twilio.java Updated buildRestClient() to auto-set edge from region; deprecated setEdge() method
src/test/java/com/twilio/http/TwilioRestClientTest.java Added tests for region-to-edge mapping and edge override behavior
src/test/java/com/twilio/TwilioTest.java Added tests for region-to-edge mapping and edge override in Twilio class

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

manisha1997 and others added 2 commits November 28, 2025 12:40
Co-authored-by: Shubham <tiwarishubham635@gmail.com>
Co-authored-by: Shubham <tiwarishubham635@gmail.com>
@sonarqubecloud
Copy link

@manisha1997 manisha1997 merged commit 48ed0a0 into main Nov 28, 2025
13 checks passed
@manisha1997 manisha1997 deleted the regional-api-domain-processing branch November 28, 2025 07:32
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.

4 participants