sub to_api {
my ( $self, $params ) = @_;
return unless $self->accessible;
my $json_object = $self->TO_JSON;
# Make sure we duplicate the $params variable to avoid
my $json_patron = $self->SUPER::to_api( $params );
return unless $json_patron;
$json_patron->{restricted} = ( $self->is_debarred )
? Mojo::JSON->true
: Mojo::JSON->false;
-