The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

GDPR::IAB::TCFv2::PublisherRestrictions - Transparency & Consent String version 2 publisher restriction

SYNOPSIS

my $range = GDPR::IAB::TCFv2::PublisherRestrictions->new(
    restrictions => {
        purpose id => {
            restriction type => instance of GDPR::IAB::TCFv2::RangeSection
        },
    },
);

die "there is publisher restriction on purpose id 1, type 0 on vendor 284"
    if $range->contains(1, 0, 284);

CONSTRUCTOR

Receive 1 parameters: restrictions. Hashref.

Will die if it is undefined.

METHODS

contains

Return true for a given combination of purpose id, restriction type and vendor

my $purpose_id = 1;
my $restriction_type = 0;
my $vendor = 284;
$ok = $range->contains($purpose_id, $restriction_type, $vendor);