NAME

Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry - The AvailablePhoneNumberCountry resource

SYNOPSIS

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

for my $available_phone_number_country ($client->available_phone_numbers->read({}, 20)) {
  ...
}
my $available_phone_number_country = $client->available_phone_numbers($country_code)->fetch;

DESCRIPTION

Country codes with available phone numbers

This file holds AvailablePhoneNumberCountryList, AvailablePhoneNumberCountryPage, AvailablePhoneNumberCountryContext and AvailablePhoneNumberCountryInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

AvailablePhoneNumberCountryList

Returned by $client->available_phone_numbers. See also Twilio::ListResource.

read

my @records = $client->available_phone_numbers->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->available_phone_numbers->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->available_phone_numbers->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->available_phone_numbers->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->available_phone_numbers->get_context($country_code);

Returns a AvailablePhoneNumberCountryContext, and makes no request.

AvailablePhoneNumberCountryPage

A Twilio::Page of AvailablePhoneNumberCountryInstance objects.

records_key

build_instance

Used by Twilio::Page.

AvailablePhoneNumberCountryContext

Returned by $client->available_phone_numbers($country_code). It makes no request until one of these methods is called.

fetch

my $available_phone_number_country = $client->available_phone_numbers($country_code)->fetch;

Returns a AvailablePhoneNumberCountryInstance.

local

my $list = $object->local;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::Local.

machine_to_machine

my $list = $object->machine_to_machine;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::MachineToMachine.

mobile

my $list = $object->mobile;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::Mobile.

national

my $list = $object->national;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::National.

shared_cost

my $list = $object->shared_cost;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::SharedCost.

toll_free

my $list = $object->toll_free;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::TollFree.

voip

my $list = $object->voip;

See Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::Voip.

AvailablePhoneNumberCountryInstance

See also Twilio::InstanceResource.

It has fetch, local, machine_to_machine, mobile, national, shared_cost, toll_free and voip, which work as they do on the context.

Its fields are:

beta

Whether all phone numbers available in the country are new to the Twilio platform. true if they are and false if all numbers are not in the Twilio Phone Number Beta program.

country

The name of the country.

country_code

The ISO-3166-1 country code of the country.

subresource_uris

A list of related AvailablePhoneNumber resources identified by their URIs relative to https://api.twilio.com.

uri

The URI of the Country resource, relative to https://api.twilio.com.

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.