NAME
Twilio::Rest::Events::V1::Subscription::SubscribedEvent - The SubscribedEvent resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $subscribed_event = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->create($type, \%options);
for my $subscribed_event ($client->events->v1->subscriptions($subscription_sid)->subscribed_events->read({}, 20)) {
...
}
my $subscribed_event = $client->events->v1->subscriptions($subscription_sid)->subscribed_events($type)->fetch;
$client->events->v1->subscriptions($subscription_sid)->subscribed_events($type)->update(\%options);
$client->events->v1->subscriptions($subscription_sid)->subscribed_events($type)->delete;
DESCRIPTION
Event subscribed to in the parent Subscription
This file holds SubscribedEventList, SubscribedEventPage, SubscribedEventContext and SubscribedEventInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
SubscribedEventList
Returned by $client->events->v1->subscriptions($subscription_sid)->subscribed_events. See also Twilio::ListResource.
create
my $subscribed_event = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->create($type, \%options);
Add an event type to a Subscription. Returns a SubscribedEventInstance.
The required values are:
The options are:
schema_version-
The schema version that the Subscription should use.
read
my @records = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->read(\%options, $limit, $page_size);
Retrieve a list of all Subscribed Event types for a Subscription. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->events->v1->subscriptions($subscription_sid)->subscribed_events->get_context($type);
Returns a SubscribedEventContext, and makes no request.
SubscribedEventPage
A Twilio::Page of SubscribedEventInstance objects.
records_key
build_instance
Used by Twilio::Page.
SubscribedEventContext
Returned by $client->events->v1->subscriptions($subscription_sid)->subscribed_events($type). It makes no request until one of these methods is called.
fetch
my $subscribed_event = $client->events->v1->subscriptions($subscription_sid)->subscribed_events($type)->fetch;
Read an Event for a Subscription. Returns a SubscribedEventInstance.
update
my $subscribed_event = $client->events->v1->subscriptions($subscription_sid)->subscribed_events($type)->update(\%options);
Update an Event for a Subscription. Returns a SubscribedEventInstance.
The options are:
schema_version-
The schema version that the Subscription should use.
delete
$client->events->v1->subscriptions($subscription_sid)->subscribed_events($type)->delete;
Remove an event type from a Subscription. Returns true.
SubscribedEventInstance
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.
- schema_version
-
The schema version that the Subscription should use.
- subscription_sid
-
The unique SID identifier of the Subscription.
- type
-
Type of event being subscribed to.
- url
-
The URL of this 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.