NAME

Twilio::Rest::Numbers::V2::RegulatoryCompliance::Bundle - The Bundle resource

SYNOPSIS

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

my $bundle = $client->numbers->v2->regulatory_compliance->bundles->create($friendly_name, $email, \%options);
for my $bundle ($client->numbers->v2->regulatory_compliance->bundles->read({}, 20)) {
  ...
}
my $bundle = $client->numbers->v2->regulatory_compliance->bundles($sid)->fetch;
$client->numbers->v2->regulatory_compliance->bundles($sid)->update(\%options);
$client->numbers->v2->regulatory_compliance->bundles($sid)->delete;

DESCRIPTION

This file holds BundleList, BundlePage, BundleContext and BundleInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

BundleList

Returned by $client->numbers->v2->regulatory_compliance->bundles. See also Twilio::ListResource.

create

my $bundle = $client->numbers->v2->regulatory_compliance->bundles->create($friendly_name, $email, \%options);

Create a new Bundle. Returns a BundleInstance.

The required values are:

$friendly_name

The string that you assigned to describe the resource.

$email

The email address that will receive updates when the Bundle resource changes status.

The options are:

end_user_type

One of individual or business.

is_test

Indicates that Bundle is a Test Bundle and will be Auto-Rejected

iso_country

The ISO country code of the Bundle's phone number country ownership request.

number_type

The type of phone number of the Bundle's ownership request. Can be local, mobile, national, or toll-free.

regulation_sid

The unique string of a regulation that is associated to the Bundle resource.

status_callback

The URL we call to inform your application of status changes.

read

my @records = $client->numbers->v2->regulatory_compliance->bundles->read(\%options, $limit, $page_size);

Retrieve a list of all Bundles for an account. Returns the records as a list, fetching as many pages as it needs.

The options are:

bundle_sids

A comma-separated list of Bundle SIDs to filter the results (maximum 20). Each Bundle SID must match ^BU[0-9a-fA-F]{32}$.

end_user_type

The end user type of the regulation of the Bundle. Can be business or individual. One of business or individual.

friendly_name

The string that you assigned to describe the resource. The column can contain 255 variable characters.

has_valid_until_date

Indicates that the Bundle is a valid Bundle until a specified expiration date.

iso_country

The 2-digit ISO country code of the Bundle's phone number country ownership request.

number_type

The type of phone number of the Bundle's ownership request. Can be local, mobile, national, or toll-free.

regulation_sid

The unique string of a Regulation resource that is associated to the Bundle resource.

sort_by

Can be valid-until or date-updated. Defaults to date-created. One of valid-until or date-updated.

sort_direction

Default is DESC. Can be ASC or DESC. One of ASC or DESC.

status

The verification status of the Bundle resource. Please refer to Bundle Statuses for more details. One of draft, pending-review, in-review, twilio-rejected, twilio-approved or provisionally-approved.

valid_until_date

Date to filter Bundles having their valid_until_date before or after the specified date. Can be ValidUntilDate>= or ValidUntilDate<=. Both can be used in conjunction as well. ISO 8601 is the acceptable date format. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

valid_until_date_before

Date to filter Bundles having their valid_until_date before or after the specified date. Can be ValidUntilDate>= or ValidUntilDate<=. Both can be used in conjunction as well. ISO 8601 is the acceptable date format. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

valid_until_date_after

Date to filter Bundles having their valid_until_date before or after the specified date. Can be ValidUntilDate>= or ValidUntilDate<=. Both can be used in conjunction as well. ISO 8601 is the acceptable date format. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

stream

my $stream = $client->numbers->v2->regulatory_compliance->bundles->stream(\%options, $limit, $page_size);

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

page

my $page = $client->numbers->v2->regulatory_compliance->bundles->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->numbers->v2->regulatory_compliance->bundles->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->numbers->v2->regulatory_compliance->bundles->get_context($sid);

Returns a BundleContext, and makes no request.

BundlePage

A Twilio::Page of BundleInstance objects.

records_key

build_instance

Used by Twilio::Page.

BundleContext

Returned by $client->numbers->v2->regulatory_compliance->bundles($sid). It makes no request until one of these methods is called.

fetch

my $bundle = $client->numbers->v2->regulatory_compliance->bundles($sid)->fetch;

Fetch a specific Bundle instance. Returns a BundleInstance.

update

my $bundle = $client->numbers->v2->regulatory_compliance->bundles($sid)->update(\%options);

Updates a Bundle in an account. Returns a BundleInstance.

The options are:

email

The email address that will receive updates when the Bundle resource changes status.

friendly_name

The string that you assigned to describe the resource.

status

One of draft, pending-review, in-review, twilio-rejected, twilio-approved or provisionally-approved.

status_callback

The URL we call to inform your application of status changes.

delete

$client->numbers->v2->regulatory_compliance->bundles($sid)->delete;

Delete a specific Bundle. Returns true.

bundle_copies

my $list = $object->bundle_copies;

See Twilio::Rest::Numbers::V2::RegulatoryCompliance::Bundle::BundleCopy.

evaluations

my $list = $object->evaluations;

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

See Twilio::Rest::Numbers::V2::RegulatoryCompliance::Bundle::Evaluation.

item_assignments

my $list = $object->item_assignments;

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

See Twilio::Rest::Numbers::V2::RegulatoryCompliance::Bundle::ItemAssignment.

replace_items

my $list = $object->replace_items;

See Twilio::Rest::Numbers::V2::RegulatoryCompliance::Bundle::ReplaceItems.

BundleInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The SID of the Account that created the Bundle resource.

date_created

The date and time in GMT when the resource 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 when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

email

The email address that will receive updates when the Bundle resource changes status.

friendly_name

The string that you assigned to describe the resource.

The URLs of the Assigned Items of the Bundle resource.

regulation_sid

The unique string of a regulation that is associated to the Bundle resource.

sid

The unique string that we created to identify the Bundle resource.

status

One of draft, pending-review, in-review, twilio-rejected, twilio-approved or provisionally-approved.

status_callback

The URL we call to inform your application of status changes.

url

The absolute URL of the Bundle resource.

valid_until

The date and time in GMT in ISO 8601 format when the resource will be valid until. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

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.