NAME

Twilio::Rest::Routes::V3::PhoneNumber - The PhoneNumber resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $phone_number = $client->routes->v3->phone_numbers($phone_number)->fetch;
$client->routes->v3->phone_numbers($phone_number)->update(\%options);

DESCRIPTION

This file holds PhoneNumberList, PhoneNumberContext and PhoneNumberInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

PhoneNumberList

Returned by $client->routes->v3->phone_numbers. See also Twilio::ListResource.

get_context

my $context = $client->routes->v3->phone_numbers->get_context($phone_number);

Returns a PhoneNumberContext, and makes no request.

PhoneNumberContext

Returned by $client->routes->v3->phone_numbers($phone_number). It makes no request until one of these methods is called.

fetch

my $phone_number = $client->routes->v3->phone_numbers($phone_number)->fetch;

Fetch the Processing Region assigned to a phone number. Returns a PhoneNumberInstance.

update

my $phone_number = $client->routes->v3->phone_numbers($phone_number)->update(\%options);

Assign an Processing Region to a phone number. Returns a PhoneNumberInstance.

The options are:

friendly_name

A human readable description of this resource, up to 64 characters.

messaging_region

The Inbound Processing Region used for this phone number for messaging

voice_region

The Inbound Processing Region used for this phone number for voice

PhoneNumberInstance

See also Twilio::InstanceResource.

It has fetch and update, which work as they do on the context.

Its fields are:

account_sid

The unique SID identifier of the Account.

date_created

The date that this phone number was assigned an Inbound Processing Region, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that the Inbound Processing Region was updated for this phone number, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

A human readable description of the Inbound Processing Region assignments for this phone number, up to 64 characters.

messaging_region

The Inbound Processing Region used for this phone number for messaging.

phone_number

The phone number in E.164 format

url

The absolute URL of the resource.

voice_region

The Inbound Processing Region used for this phone number for voice.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.