regis

<back to all web services

UnauthenticatedRegistrationInProgressSummaryRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Registration/InProgressSummaryForUnauthenticatedPerson/{uuid}/Term/{reporting_term}/{transaction_uuid}
<?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 RegistrationInProgressSummaryResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var string|null */
        public ?string $transaction_uuid=null,
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $uuid=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var int */
        public int $numberOfStudentSections=0,
        /** @var float */
        public float $amountOwing=0.0,
        /** @var bool|null */
        public ?bool $mustPayBeforeRegistering=null,
        /** @var array<RegistrationDocumentResponse>|null */
        public ?array $requiredDocuments=null,
        /** @var array<RegistrationDocumentResponse>|null */
        public ?array $completedDocuments=null,
        /** @var bool|null */
        public ?bool $isLate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['transaction_uuid'])) $this->transaction_uuid = $o['transaction_uuid'];
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['numberOfStudentSections'])) $this->numberOfStudentSections = $o['numberOfStudentSections'];
        if (isset($o['amountOwing'])) $this->amountOwing = $o['amountOwing'];
        if (isset($o['mustPayBeforeRegistering'])) $this->mustPayBeforeRegistering = $o['mustPayBeforeRegistering'];
        if (isset($o['requiredDocuments'])) $this->requiredDocuments = JsonConverters::fromArray('RegistrationDocumentResponse', $o['requiredDocuments']);
        if (isset($o['completedDocuments'])) $this->completedDocuments = JsonConverters::fromArray('RegistrationDocumentResponse', $o['completedDocuments']);
        if (isset($o['isLate'])) $this->isLate = $o['isLate'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->transaction_uuid)) $o['transaction_uuid'] = $this->transaction_uuid;
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->numberOfStudentSections)) $o['numberOfStudentSections'] = $this->numberOfStudentSections;
        if (isset($this->amountOwing)) $o['amountOwing'] = $this->amountOwing;
        if (isset($this->mustPayBeforeRegistering)) $o['mustPayBeforeRegistering'] = $this->mustPayBeforeRegistering;
        if (isset($this->requiredDocuments)) $o['requiredDocuments'] = JsonConverters::toArray('RegistrationDocumentResponse', $this->requiredDocuments);
        if (isset($this->completedDocuments)) $o['completedDocuments'] = JsonConverters::toArray('RegistrationDocumentResponse', $this->completedDocuments);
        if (isset($this->isLate)) $o['isLate'] = $this->isLate;
        return empty($o) ? new class(){} : $o;
    }
}

class UnauthenticatedRegistrationInProgressSummaryRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null,
        /** @var string|null */
        public ?string $transaction_uuid=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var bool|null */
        public ?bool $audio_only=null
    ) {
    }

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

PHP UnauthenticatedRegistrationInProgressSummaryRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /Registration/InProgressSummaryForUnauthenticatedPerson/{uuid}/Term/{reporting_term}/{transaction_uuid} HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"uuid":"String","transaction_uuid":"String","reporting_term":"String","audio_only":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"transaction_uuid":"String","regent_id":0,"uuid":"String","reporting_term":"String","numberOfStudentSections":0,"amountOwing":0,"mustPayBeforeRegistering":false,"requiredDocuments":[{"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"}],"completedDocuments":[{"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"}],"isLate":false}