sub to_api {
my ( $self, $params ) = @_;
return unless $self->accessible;
my $json_object = $self->TO_JSON;
# Remove forbidden attributes if required
my $json_patron = $self->SUPER::to_api( $params );
return unless $json_patron;
$json_patron->{restricted} = ( $self->is_debarred )
? Mojo::JSON->true
: Mojo::JSON->false;
-