NAME

Twilio::Rest::Pricing::V2::Number - The Number resource

SYNOPSIS

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

my $number = $client->pricing->v2->numbers($destination_number)->fetch;

DESCRIPTION

Trunking pricing for a specific phone number

This file holds NumberList, NumberContext and NumberInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

NumberList

Returned by $client->pricing->v2->numbers. See also Twilio::ListResource.

get_context

my $context = $client->pricing->v2->numbers->get_context($destination_number);

Returns a NumberContext, and makes no request.

NumberContext

Returned by $client->pricing->v2->numbers($destination_number). It makes no request until one of these methods is called.

fetch

my $number = $client->pricing->v2->numbers($destination_number)->fetch(\%options);

Fetch pricing information for a specific destination and, optionally, origination phone number. Returns a NumberInstance.

The options are:

origination_number

The origination phone number, in E.164 format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.

NumberInstance

See also Twilio::InstanceResource.

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

Its fields are:

country

The name of the country.

destination_number

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

iso_country

The ISO country code

originating_call_price

The OriginatingCallPrice record.

origination_number

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

price_unit

The currency in which prices are measured, specified in ISO 4127 format (e.g. usd, eur, jpy).

terminating_prefix_prices

No description in the specification.

url

The absolute URL of the resource.

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.