NAME

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

SYNOPSIS

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

for my $toll_free ($client->available_phone_numbers($country_code)->toll_free->read({}, 20)) {
  ...
}

DESCRIPTION

Available toll free phone numbers

This file holds TollFreeList, TollFreePage and TollFreeInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

TollFreeList

Returned by $client->available_phone_numbers($country_code)->toll_free. See also Twilio::ListResource.

read

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

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

The options are:

area_code

The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.

beta

Whether to read phone numbers that are new to the Twilio platform. Can be: true or false and the default is true.

contains

Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters: *, %, +, $. The * and % meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use * to match any single character or % to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters, and wildcards cannot be used between non-meta-characters. To match the beginning of a pattern, start the pattern with +. To match the end of the pattern, append the pattern with $. These meta-characters can't be adjacent to each other.

distance

The search radius, in miles, for a near_ query. Can be up to 500 and the default is 25. Applies to only phone numbers in the US and Canada.

exclude_all_address_required

Whether to exclude phone numbers that require an Address. Can be: true or false and the default is false.

exclude_foreign_address_required

Whether to exclude phone numbers that require a foreign Address. Can be: true or false and the default is false.

exclude_local_address_required

Whether to exclude phone numbers that require a local Address. Can be: true or false and the default is false.

fax_enabled

Whether the phone numbers can receive faxes. Can be: true or false.

in_lata

Limit results to a specific local access and transport area (LATA). Given a phone number, search within the same LATA as that number. Applies to only phone numbers in the US and Canada.

in_locality

Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.

in_postal_code

Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.

in_rate_center

Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires in_lata to be set as well. Applies to only phone numbers in the US and Canada.

in_region

Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.

mms_enabled

Whether the phone numbers can receive MMS messages. Can be: true or false.

near_lat_long

Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. Applies to only phone numbers in the US and Canada.

near_number

Given a phone number, find a geographically close number within distance miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.

sms_enabled

Whether the phone numbers can receive text messages. Can be: true or false.

voice_enabled

Whether the phone numbers can receive calls. Can be: true or false.

stream

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

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

page

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

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

get_page

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

Fetches the page at a URL given by Twilio.

TollFreePage

A Twilio::Page of TollFreeInstance objects.

records_key

build_instance

Used by Twilio::Page.

TollFreeInstance

See also Twilio::InstanceResource.

Its fields are:

address_requirements

The type of Address resource the phone number requires. Can be: none, any, local, or foreign. none means no address is required. any means an address is required, but it can be anywhere in the world. local means an address in the phone number's country is required. foreign means an address outside of the phone number's country is required.

beta

Whether the phone number is new to the Twilio platform. Can be: true or false.

capabilities

The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: Voice, SMS, and MMS and each capability can be: true or false. A Twilio::Base::PhoneNumberCapabilities object.

friendly_name

A formatted version of the phone number.

iso_country

The ISO country code of this phone number.

lata

The LATA of this phone number. Available for only phone numbers from the US and Canada.

latitude

The latitude of this phone number's location. Available for only phone numbers from the US and Canada.

locality

The locality or city of this phone number's location.

longitude

The longitude of this phone number's location. Available for only phone numbers from the US and Canada.

phone_number

The phone number in E.164 format, which consists of a + followed by the country code and subscriber number.

postal_code

The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.

rate_center

The rate center of this phone number. Available for only phone numbers from the US and Canada.

region

The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.

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.