| Required permission: | SearchPerson |
| POST | /person/{uuid}/library-login/create |
|---|
<?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 PersonLibraryLoginCreateRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $uuid=null,
/** @var string|null */
public ?string $authorizing_uuid=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['uuid'])) $this->uuid = $o['uuid'];
if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->uuid)) $o['uuid'] = $this->uuid;
if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
return empty($o) ? new class(){} : $o;
}
}
PHP PersonLibraryLoginCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /person/{uuid}/library-login/create HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PersonLibraryLoginCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<authorizing_uuid>String</authorizing_uuid>
<uuid>String</uuid>
</PersonLibraryLoginCreateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PersonLibraryLoginStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses">
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<can_create_login>false</can_create_login>
<created_library_login>false</created_library_login>
<expiry_date>0001-01-01T00:00:00</expiry_date>
<has_library_login>false</has_library_login>
<is_expired>false</is_expired>
<message>String</message>
<regent_login>String</regent_login>
<updated_library_login>false</updated_library_login>
</PersonLibraryLoginStatusResponse>