-
Notifications
You must be signed in to change notification settings - Fork 449
chore: Regional API domain processing #928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
RegionEndpointsclass with static mapping of regions to edge locations - Modified
TwilioRestClientandTwilioclasses to automatically set edge from region when edge is not explicitly provided - Deprecated
setEdge()andedge()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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Shubham <tiwarishubham635@gmail.com>
Co-authored-by: Shubham <tiwarishubham635@gmail.com>
|



Changes
Introducing Region-Edge mapping
Deprecating
setEdge()Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.