NAME

Twilio::ApiV1Version - A version of an API that follows Twilio's API Standards V1

SYNOPSIS

package Twilio::Rest::Example::V3;

use parent 'Twilio::ApiV1Version';

sub new {
  my ($class, $domain) = @_;
  return $class->SUPER::new($domain, 'v3');
}

DESCRIPTION

Works like Twilio::Version, except for the error format. Generated versions of the newer APIs inherit from it.

METHODS

new

my $version = Twilio::ApiV1Version->new($domain, $version_name);

exception

my $error = $version->exception($response, 'Unable to fetch record');

Returns a Twilio::Exceptions::RestExceptionV1 built from httpStatusCode, params and userError. A response in the classic shape, with more_info or status, gives a Twilio::Exceptions::RestException, and one in the RFC 9457 shape gives a Twilio::Exceptions::TwilioServiceException.

LICENSE

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