plenigo::AccessRightsManager - A utility class to get/add/remove access rights from/to a customer.
use plenigo::AccessRightsManager; # Prepare configuration my $use_stage = 0; # set if stage system should be used my $configuration = plenigo::Configuration->new(access_token => 'ACCESS_TOKEN', use_stage => $use_stage); # Instantiate access rights manager my $access_rights = plenigo::AccessRightsManager->new(configuration => $configuration); # Checking access rights from a customer my %access_rights = $access_rights->hasAccess($plenigo_customer_id, ['ACCESS_RIGHT_ID']); if ($access_rights{'accessGranted'}) { # customer has the right to access } else { # customer is not allowed to access } # Adding access rights to a customer $access_rights->addAccess($plenigo_customer_id, (details => [{productId => 'ACCESS_RIGHT_ID'}])); # Removing access rights from a customer $access_rights->removeAccess($plenigo_customer_id, ['ACCESS_RIGHT_ID']);
plenigo::AccessRightsManager provides functionality to manage access rights of a customer.
Test if a customer has access rights.
Add access rights to a customer.
Remove access right from a customer.
To install plenigo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm plenigo
CPAN shell
perl -MCPAN -e shell install plenigo
For more information on module installation, please visit the detailed CPAN module installation guide.