NAME

Twilio::Rest::Lookups::V2::Bucket - The Bucket resource

SYNOPSIS

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

my $bucket = $client->lookups->v2->bucket($field, $bucket)->fetch;
$client->lookups->v2->bucket($field, $bucket)->update(\%body);
$client->lookups->v2->bucket($field, $bucket)->delete;

DESCRIPTION

This file holds BucketList, BucketContext and BucketInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

BucketList

Returned by $client->lookups->v2->bucket($field). See also Twilio::ListResource.

get_context

my $context = $client->lookups->v2->bucket($field)->get_context($bucket);

Returns a BucketContext, and makes no request.

BucketContext

Returned by $client->lookups->v2->bucket($field, $bucket). It makes no request until one of these methods is called.

fetch

my $bucket = $client->lookups->v2->bucket($field, $bucket)->fetch;

Returns a BucketInstance.

update

my $bucket = $client->lookups->v2->bucket($field, $bucket)->update(\%body);

Returns a BucketInstance.

%body is sent as JSON. It can be left out. When given, it takes the names Twilio's API documentation uses.

Its fields are:

limit

Limit of requests for the bucket

ttl

Time to live of the rule

delete

$client->lookups->v2->bucket($field, $bucket)->delete;

Returns true.

BucketInstance

See also Twilio::InstanceResource.

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

Its fields are:

bucket

Name of the bucket

field

Limit of requests for the bucket

limit

Limit of requests for the bucket

owner

Owner of the rule

ttl

Time to live of the rule

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.