NAME

Twilio::Jwt::TaskRouter::Policy - One rule inside a TaskRouter capability token

SYNOPSIS

my $policy = Twilio::Jwt::TaskRouter::Policy->new($url, 'GET', {}, {}, 1);

DESCRIPTION

Used by Twilio::Jwt::TaskRouter::CapabilityToken.

METHODS

new

my $policy = Twilio::Jwt::TaskRouter::Policy->new(
  $url, $method, \%query_filter, \%post_filter, $allow
);

A filter that is left out is empty, and an undefined one is left out of the token. $allow defaults to true.

add_query_filter

add_post_filter

Add a filter.

to_hash

Returns the policy as it goes into the token.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.