NAME

Twilio::Rest::FlexApi::V1::Plugin - The Plugin resource

SYNOPSIS

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

my $plugin = $client->flex_api->v1->plugins->create($unique_name, \%options);
for my $plugin ($client->flex_api->v1->plugins->read({}, 20)) {
  ...
}
my $plugin = $client->flex_api->v1->plugins($sid)->fetch;
$client->flex_api->v1->plugins($sid)->update(\%options);

DESCRIPTION

This file holds PluginList, PluginPage, PluginContext and PluginInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

PluginList

Returned by $client->flex_api->v1->plugins. See also Twilio::ListResource.

create

my $plugin = $client->flex_api->v1->plugins->create($unique_name, \%options);

Returns a PluginInstance.

The required values are:

$unique_name

The Flex Plugin's unique name.

The options are:

description

A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long

friendly_name

The Flex Plugin's friendly name.

flex_metadata

The Flex-Metadata HTTP request header

read

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

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

The options are:

flex_metadata

The Flex-Metadata HTTP request header

stream

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

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

page

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

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

get_page

my $page = $client->flex_api->v1->plugins->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->flex_api->v1->plugins->get_context($sid);

Returns a PluginContext, and makes no request.

PluginPage

A Twilio::Page of PluginInstance objects.

records_key

build_instance

Used by Twilio::Page.

PluginContext

Returned by $client->flex_api->v1->plugins($sid). It makes no request until one of these methods is called.

fetch

my $plugin = $client->flex_api->v1->plugins($sid)->fetch(\%options);

Returns a PluginInstance.

The options are:

flex_metadata

The Flex-Metadata HTTP request header

update

my $plugin = $client->flex_api->v1->plugins($sid)->update(\%options);

Returns a PluginInstance.

The options are:

description

A descriptive string that you update to describe the plugin resource. It can be up to 500 characters long

friendly_name

The Flex Plugin's friendly name.

flex_metadata

The Flex-Metadata HTTP request header

plugin_versions

my $list = $object->plugin_versions;

my $context = $object->plugin_versions($sid);

See Twilio::Rest::FlexApi::V1::Plugin::PluginVersions.

PluginInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The SID of the Account that created the Flex Plugin resource and owns this resource.

archived

Whether the Flex Plugin is archived. The default value is false.

date_created

The date and time in GMT-7 when the Flex Plugin was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT-7 when the Flex Plugin was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

description

A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long

friendly_name

The friendly name this Flex Plugin resource.

No description in the specification.

sid

The unique string that we created to identify the Flex Plugin resource.

unique_name

The name that uniquely identifies this Flex Plugin resource.

url

The absolute URL of the Flex Plugin 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.