NAME
Twilio::Rest::Pricing::V2::Voice::Number - The Number resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $number = $client->pricing->v2->voice->numbers($destination_number)->fetch;
DESCRIPTION
Voice 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->voice->numbers. See also Twilio::ListResource.
get_context
my $context = $client->pricing->v2->voice->numbers->get_context($destination_number);
Returns a NumberContext, and makes no request.
NumberContext
Returned by $client->pricing->v2->voice->numbers($destination_number). It makes no request until one of these methods is called.
fetch
my $number = $client->pricing->v2->voice->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.
- inbound_call_price
-
The InboundCallPrice record.
- iso_country
-
The ISO country code
- origination_number
-
The origination phone number in [E.164 format, which consists of a + followed by the country code and subscriber number.
- outbound_call_prices
-
The list of OutboundCallPriceWithOrigin records.
- price_unit
-
The currency in which prices are measured, specified in ISO 4127 format (e.g.
usd,eur,jpy). - 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.