From f215fc50b8e19c2bb9461a92ead1c085470f2005 Mon Sep 17 00:00:00 2001 From: twilio-dx Date: Tue, 1 Jul 2025 16:33:50 +0530 Subject: [PATCH] chore: Preview for removing encoding from Phone NUmber format --- .../com/twilio/rest/api/v2010/account/MessageCreator.java | 2 +- .../rest/api/v2010/account/ValidationRequestCreator.java | 2 +- .../api/v2010/account/incomingphonenumber/LocalCreator.java | 2 +- .../api/v2010/account/incomingphonenumber/MobileCreator.java | 2 +- .../v2010/account/incomingphonenumber/TollFreeCreator.java | 2 +- .../com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java | 2 +- .../twilio/rest/numbers/v2/AuthorizationDocumentCreator.java | 2 +- .../com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java | 4 ++-- .../rest/preview/hostedNumbers/HostedNumberOrderCreator.java | 2 +- .../java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java | 3 +-- src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java | 2 +- .../java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java | 2 +- .../com/twilio/rest/studio/v1/flow/EngagementCreator.java | 4 ++-- .../java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java | 4 ++-- .../java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java | 4 ++-- .../rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java | 2 +- 16 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java index 4ee0387373..c938512a64 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java @@ -318,7 +318,7 @@ public Message create(final TwilioRestClient client) { "{" + "AccountSid" + "}", this.pathAccountSid.toString() ); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java index b98f8f62b9..15486f1597 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java @@ -115,7 +115,7 @@ public ValidationRequest create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java index 27ecf933c4..25a74eb499 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java @@ -241,7 +241,7 @@ public Local create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java index 5a40e409a0..6fe7fa36c0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java @@ -241,7 +241,7 @@ public Mobile create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java index c6426ab2ce..61034d20c3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java @@ -243,7 +243,7 @@ public TollFree create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java index eedc6e5dc1..3eec9d2bbe 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java @@ -56,7 +56,7 @@ public PortingPortability fetch(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.encode("utf-8") + this.pathPhoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java index fded505c8a..3e9f6c5dd8 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java @@ -118,7 +118,7 @@ public AuthorizationDocument create(final TwilioRestClient client) { path = path.replace( "{" + "ContactPhoneNumber" + "}", - this.contactPhoneNumber.encode("utf-8") + this.contactPhoneNumber.toString() ); path = path.replace( diff --git a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java index 7de5551daf..1345e5ce8a 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java @@ -196,12 +196,12 @@ public HostedNumberOrder create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); path = path.replace( "{" + "ContactPhoneNumber" + "}", - this.contactPhoneNumber.encode("utf-8") + this.contactPhoneNumber.toString() ); path = path.replace("{" + "AddressSid" + "}", this.addressSid.toString()); diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java index 4f48c3128b..927eba9f60 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java @@ -192,7 +192,7 @@ public HostedNumberOrder create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); path = path.replace( diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java index 4b3b9a50fd..ff3d62d4e3 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java @@ -37,8 +37,7 @@ public NumberFetcher(final com.twilio.type.PhoneNumber pathNumber) { public Number fetch(final TwilioRestClient client) { String path = "/v1/Voice/Numbers/{Number}"; - path = - path.replace("{" + "Number" + "}", this.pathNumber.encode("utf-8")); + path = path.replace("{" + "Number" + "}", this.pathNumber.toString()); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java index b433b097a0..e41c589818 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java @@ -57,7 +57,7 @@ public Number fetch(final TwilioRestClient client) { path = path.replace( "{" + "DestinationNumber" + "}", - this.pathDestinationNumber.encode("utf-8") + this.pathDestinationNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java index a0285c5f44..806d653a7b 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java @@ -57,7 +57,7 @@ public Number fetch(final TwilioRestClient client) { path = path.replace( "{" + "DestinationNumber" + "}", - this.pathDestinationNumber.encode("utf-8") + this.pathDestinationNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java b/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java index cbd788a972..8e4b257cdd 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java @@ -77,8 +77,8 @@ public Engagement create(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Engagements"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); - path = path.replace("{" + "From" + "}", this.from.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); + path = path.replace("{" + "From" + "}", this.from.toString()); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java b/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java index 89c8f288e0..69eadb7a86 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java @@ -77,8 +77,8 @@ public Execution create(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Executions"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); - path = path.replace("{" + "From" + "}", this.from.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); + path = path.replace("{" + "From" + "}", this.from.toString()); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java b/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java index df3d5c1245..92c58d3cbc 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java @@ -77,8 +77,8 @@ public Execution create(final TwilioRestClient client) { String path = "/v2/Flows/{FlowSid}/Executions"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); - path = path.replace("{" + "From" + "}", this.from.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); + path = path.replace("{" + "From" + "}", this.from.toString()); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java index 35cf959970..a4413dc4c8 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java @@ -259,7 +259,7 @@ public ComplianceTollfreeInquiries create(final TwilioRestClient client) { path = path.replace( "{" + "TollfreePhoneNumber" + "}", - this.tollfreePhoneNumber.encode("utf-8") + this.tollfreePhoneNumber.toString() ); path = path.replace(