NAME
Twilio::Rest::Intelligence::V2::CustomOperator - The CustomOperator resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $custom_operator = $client->intelligence->v2->custom_operators->create($friendly_name, $operator_type, $config);
for my $custom_operator ($client->intelligence->v2->custom_operators->read({}, 20)) {
...
}
my $custom_operator = $client->intelligence->v2->custom_operators($sid)->fetch;
$client->intelligence->v2->custom_operators($sid)->update($friendly_name, $config, \%options);
$client->intelligence->v2->custom_operators($sid)->delete;
DESCRIPTION
This file holds CustomOperatorList, CustomOperatorPage, CustomOperatorContext and CustomOperatorInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
CustomOperatorList
Returned by $client->intelligence->v2->custom_operators. See also Twilio::ListResource.
create
my $custom_operator = $client->intelligence->v2->custom_operators->create($friendly_name, $operator_type, $config);
Create a new Custom Operator for the given Account. Returns a CustomOperatorInstance.
The required values are:
$friendly_name-
A human readable description of the new Operator, up to 64 characters.
$operator_type-
Operator Type for this Operator. References an existing Operator Type resource.
$config-
Operator configuration, following the schema defined by the Operator Type. A hash or array reference, or a string of JSON.
read
my @records = $client->intelligence->v2->custom_operators->read(\%options, $limit, $page_size);
Retrieves a list of all Custom Operators for an Account. Returns the records as a list, fetching as many pages as it needs.
The options are:
availability-
Returns Custom Operators with the provided availability type. Possible values: internal, beta, public, retired. One of
internal,beta,public,retired,general-availabilityordeprecated. language_code-
Returns Custom Operators that support the provided language code.
stream
my $stream = $client->intelligence->v2->custom_operators->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->intelligence->v2->custom_operators->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->intelligence->v2->custom_operators->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->intelligence->v2->custom_operators->get_context($sid);
Returns a CustomOperatorContext, and makes no request.
CustomOperatorPage
A Twilio::Page of CustomOperatorInstance objects.
records_key
build_instance
Used by Twilio::Page.
CustomOperatorContext
Returned by $client->intelligence->v2->custom_operators($sid). It makes no request until one of these methods is called.
fetch
my $custom_operator = $client->intelligence->v2->custom_operators($sid)->fetch;
Fetch a specific Custom Operator. Returns a CustomOperatorInstance.
update
my $custom_operator = $client->intelligence->v2->custom_operators($sid)->update($friendly_name, $config, \%options);
Update a specific Custom Operator. Returns a CustomOperatorInstance.
The required values are:
$friendly_name-
A human-readable name of this resource, up to 64 characters.
$config-
Operator configuration, following the schema defined by the Operator Type. A hash or array reference, or a string of JSON.
The options are:
if_match-
The If-Match HTTP request header
delete
$client->intelligence->v2->custom_operators($sid)->delete;
Delete a specific Custom Operator. Returns true.
CustomOperatorInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The unique SID identifier of the Account the Custom Operator belongs to.
-
The creator of the Custom Operator. Custom Operators can only be created by a Twilio Account.
- availability
-
One of
internal,beta,public,retired,general-availabilityordeprecated. - config
-
Operator configuration, following the schema defined by the Operator Type. Only available on Operators created by the Account.
- date_created
-
The date that this Custom Operator was created, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date that this Custom Operator was updated, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- description
-
A human-readable description of this resource, longer than the friendly name.
- friendly_name
-
A human-readable name of this resource, up to 64 characters.
- operator_type
-
Operator Type for this Operator. References an existing Operator Type resource.
- sid
-
A 34 character string that uniquely identifies this Custom Operator.
- url
-
The URL of this resource.
- version
-
Numeric Custom Operator version. Incremented with each update on the resource, used to ensure integrity when updating the Custom Operator.
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.