Required role: | REGISUserRole |
POST | /Registration/Provisional |
---|
<?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 RegistrationDocumentResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $uuid=null,
/** @var int */
public int $regent_id=0,
/** @var string|null */
public ?string $first_name=null,
/** @var string|null */
public ?string $last_name=null,
/** @var string|null */
public ?string $gender=null,
/** @var string|null */
public ?string $email=null,
/** @var string|null */
public ?string $program=null,
/** @var string|null */
public ?string $concentration=null,
/** @var string|null */
public ?string $section_uuid=null,
/** @var string|null */
public ?string $course_name=null,
/** @var string|null */
public ?string $course_title=null,
/** @var string|null */
public ?string $reporting_term=null,
/** @var string|null */
public ?string $document_code=null,
/** @var string|null */
public ?string $document_json=null,
/** @var string|null */
public ?string $document_name=null,
/** @var string|null */
public ?string $document_description=null,
/** @var DateTime|null */
public ?DateTime $added_date=null,
/** @var DateTime|null */
public ?DateTime $changed_date=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['uuid'])) $this->uuid = $o['uuid'];
if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
if (isset($o['first_name'])) $this->first_name = $o['first_name'];
if (isset($o['last_name'])) $this->last_name = $o['last_name'];
if (isset($o['gender'])) $this->gender = $o['gender'];
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['program'])) $this->program = $o['program'];
if (isset($o['concentration'])) $this->concentration = $o['concentration'];
if (isset($o['section_uuid'])) $this->section_uuid = $o['section_uuid'];
if (isset($o['course_name'])) $this->course_name = $o['course_name'];
if (isset($o['course_title'])) $this->course_title = $o['course_title'];
if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
if (isset($o['document_code'])) $this->document_code = $o['document_code'];
if (isset($o['document_json'])) $this->document_json = $o['document_json'];
if (isset($o['document_name'])) $this->document_name = $o['document_name'];
if (isset($o['document_description'])) $this->document_description = $o['document_description'];
if (isset($o['added_date'])) $this->added_date = JsonConverters::from('DateTime', $o['added_date']);
if (isset($o['changed_date'])) $this->changed_date = JsonConverters::from('DateTime', $o['changed_date']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->uuid)) $o['uuid'] = $this->uuid;
if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
if (isset($this->first_name)) $o['first_name'] = $this->first_name;
if (isset($this->last_name)) $o['last_name'] = $this->last_name;
if (isset($this->gender)) $o['gender'] = $this->gender;
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->program)) $o['program'] = $this->program;
if (isset($this->concentration)) $o['concentration'] = $this->concentration;
if (isset($this->section_uuid)) $o['section_uuid'] = $this->section_uuid;
if (isset($this->course_name)) $o['course_name'] = $this->course_name;
if (isset($this->course_title)) $o['course_title'] = $this->course_title;
if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
if (isset($this->document_code)) $o['document_code'] = $this->document_code;
if (isset($this->document_json)) $o['document_json'] = $this->document_json;
if (isset($this->document_name)) $o['document_name'] = $this->document_name;
if (isset($this->document_description)) $o['document_description'] = $this->document_description;
if (isset($this->added_date)) $o['added_date'] = JsonConverters::to('DateTime', $this->added_date);
if (isset($this->changed_date)) $o['changed_date'] = JsonConverters::to('DateTime', $this->changed_date);
return empty($o) ? new class(){} : $o;
}
}
class ProvisionalRegistrationResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $uuid=null,
/** @var int|null */
public ?int $regent_id=null,
/** @var string|null */
public ?string $student_name=null,
/** @var string|null */
public ?string $email=null,
/** @var string|null */
public ?string $section_uuid=null,
/** @var string|null */
public ?string $student_section_uuid=null,
/** @var string|null */
public ?string $course_name=null,
/** @var string|null */
public ?string $section_code=null,
/** @var string|null */
public ?string $title=null,
/** @var string|null */
public ?string $term=null,
/** @var float */
public float $amount=0.0,
/** @var bool|null */
public ?bool $is_audit=null,
/** @var bool|null */
public ?bool $is_waitlist=null,
/** @var bool|null */
public ?bool $is_missing_requisites=null,
/** @var bool|null */
public ?bool $is_other_restriction=null,
/** @var array<RegistrationDocumentResponse>|null */
public ?array $documents=null,
/** @var DateTime */
public DateTime $requested_date=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['uuid'])) $this->uuid = $o['uuid'];
if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
if (isset($o['student_name'])) $this->student_name = $o['student_name'];
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['section_uuid'])) $this->section_uuid = $o['section_uuid'];
if (isset($o['student_section_uuid'])) $this->student_section_uuid = $o['student_section_uuid'];
if (isset($o['course_name'])) $this->course_name = $o['course_name'];
if (isset($o['section_code'])) $this->section_code = $o['section_code'];
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['term'])) $this->term = $o['term'];
if (isset($o['amount'])) $this->amount = $o['amount'];
if (isset($o['is_audit'])) $this->is_audit = $o['is_audit'];
if (isset($o['is_waitlist'])) $this->is_waitlist = $o['is_waitlist'];
if (isset($o['is_missing_requisites'])) $this->is_missing_requisites = $o['is_missing_requisites'];
if (isset($o['is_other_restriction'])) $this->is_other_restriction = $o['is_other_restriction'];
if (isset($o['documents'])) $this->documents = JsonConverters::fromArray('RegistrationDocumentResponse', $o['documents']);
if (isset($o['requested_date'])) $this->requested_date = JsonConverters::from('DateTime', $o['requested_date']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->uuid)) $o['uuid'] = $this->uuid;
if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
if (isset($this->student_name)) $o['student_name'] = $this->student_name;
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->section_uuid)) $o['section_uuid'] = $this->section_uuid;
if (isset($this->student_section_uuid)) $o['student_section_uuid'] = $this->student_section_uuid;
if (isset($this->course_name)) $o['course_name'] = $this->course_name;
if (isset($this->section_code)) $o['section_code'] = $this->section_code;
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->term)) $o['term'] = $this->term;
if (isset($this->amount)) $o['amount'] = $this->amount;
if (isset($this->is_audit)) $o['is_audit'] = $this->is_audit;
if (isset($this->is_waitlist)) $o['is_waitlist'] = $this->is_waitlist;
if (isset($this->is_missing_requisites)) $o['is_missing_requisites'] = $this->is_missing_requisites;
if (isset($this->is_other_restriction)) $o['is_other_restriction'] = $this->is_other_restriction;
if (isset($this->documents)) $o['documents'] = JsonConverters::toArray('RegistrationDocumentResponse', $this->documents);
if (isset($this->requested_date)) $o['requested_date'] = JsonConverters::to('DateTime', $this->requested_date);
return empty($o) ? new class(){} : $o;
}
}
class ProvisionalRegistrationsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null,
/** @var array<ProvisionalRegistrationResponse>|null */
public ?array $provisional_registrations=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
if (isset($o['provisional_registrations'])) $this->provisional_registrations = JsonConverters::fromArray('ProvisionalRegistrationResponse', $o['provisional_registrations']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
if (isset($this->provisional_registrations)) $o['provisional_registrations'] = JsonConverters::toArray('ProvisionalRegistrationResponse', $this->provisional_registrations);
return empty($o) ? new class(){} : $o;
}
}
class ProvisionalRegistrationsRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $reporting_term=null,
/** @var string|null */
public ?string $authorizing_uuid=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
return empty($o) ? new class(){} : $o;
}
}
PHP ProvisionalRegistrationsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Registration/Provisional HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"reporting_term":"String","authorizing_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"}},"provisional_registrations":[{"uuid":"String","regent_id":0,"student_name":"String","email":"String","section_uuid":"String","student_section_uuid":"String","course_name":"String","section_code":"String","title":"String","term":"String","amount":0,"is_audit":false,"is_waitlist":false,"is_missing_requisites":false,"is_other_restriction":false,"documents":[{"uuid":"String","regent_id":0,"first_name":"String","last_name":"String","gender":"String","email":"String","program":"String","concentration":"String","section_uuid":"String","course_name":"String","course_title":"String","reporting_term":"String","document_code":"String","document_json":"String","document_name":"String","document_description":"String","added_date":"0001-01-01T00:00:00.0000000","changed_date":"0001-01-01T00:00:00.0000000"}],"requested_date":"0001-01-01T00:00:00.0000000"}]}