regis

<back to all web services

PersonLibraryLoginCheckRequest

Requires Authentication
Required permission:SearchPerson
The following routes are available for this service:
POST/person/{uuid}/library-login/check
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class PersonLibraryLoginStatusResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var bool|null */
        public ?bool $has_library_login=null,
        /** @var bool|null */
        public ?bool $is_expired=null,
        /** @var bool|null */
        public ?bool $can_create_login=null,
        /** @var bool|null */
        public ?bool $created_library_login=null,
        /** @var bool|null */
        public ?bool $updated_library_login=null,
        /** @var string|null */
        public ?string $regent_login=null,
        /** @var DateTime|null */
        public ?DateTime $expiry_date=null,
        /** @var string|null */
        public ?string $message=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['has_library_login'])) $this->has_library_login = $o['has_library_login'];
        if (isset($o['is_expired'])) $this->is_expired = $o['is_expired'];
        if (isset($o['can_create_login'])) $this->can_create_login = $o['can_create_login'];
        if (isset($o['created_library_login'])) $this->created_library_login = $o['created_library_login'];
        if (isset($o['updated_library_login'])) $this->updated_library_login = $o['updated_library_login'];
        if (isset($o['regent_login'])) $this->regent_login = $o['regent_login'];
        if (isset($o['expiry_date'])) $this->expiry_date = JsonConverters::from('DateTime', $o['expiry_date']);
        if (isset($o['message'])) $this->message = $o['message'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->has_library_login)) $o['has_library_login'] = $this->has_library_login;
        if (isset($this->is_expired)) $o['is_expired'] = $this->is_expired;
        if (isset($this->can_create_login)) $o['can_create_login'] = $this->can_create_login;
        if (isset($this->created_library_login)) $o['created_library_login'] = $this->created_library_login;
        if (isset($this->updated_library_login)) $o['updated_library_login'] = $this->updated_library_login;
        if (isset($this->regent_login)) $o['regent_login'] = $this->regent_login;
        if (isset($this->expiry_date)) $o['expiry_date'] = JsonConverters::to('DateTime', $this->expiry_date);
        if (isset($this->message)) $o['message'] = $this->message;
        return empty($o) ? new class(){} : $o;
    }
}

class PersonLibraryLoginCheckRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        return empty($o) ? new class(){} : $o;
    }
}

PHP PersonLibraryLoginCheckRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /person/{uuid}/library-login/check HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"uuid":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"has_library_login":false,"is_expired":false,"can_create_login":false,"created_library_login":false,"updated_library_login":false,"regent_login":"String","expiry_date":"0001-01-01T00:00:00.0000000","message":"String"}