regis

<back to all web services

ProvisionalRegistrationsRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<ProvisionalRegistrationsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <authorizing_uuid>String</authorizing_uuid>
  <reporting_term>String</reporting_term>
</ProvisionalRegistrationsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ProvisionalRegistrationsResponse 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>
  <provisional_registrations>
    <ProvisionalRegistrationResponse>
      <amount>0</amount>
      <course_name>String</course_name>
      <documents>
        <RegistrationDocumentResponse>
          <added_date>0001-01-01T00:00:00</added_date>
          <changed_date>0001-01-01T00:00:00</changed_date>
          <concentration>String</concentration>
          <course_name>String</course_name>
          <course_title>String</course_title>
          <document_code>String</document_code>
          <document_description>String</document_description>
          <document_json>String</document_json>
          <document_name>String</document_name>
          <email>String</email>
          <first_name>String</first_name>
          <gender>String</gender>
          <last_name>String</last_name>
          <program>String</program>
          <regent_id>0</regent_id>
          <reporting_term>String</reporting_term>
          <section_uuid>String</section_uuid>
          <uuid>String</uuid>
        </RegistrationDocumentResponse>
      </documents>
      <email>String</email>
      <is_audit>false</is_audit>
      <is_missing_requisites>false</is_missing_requisites>
      <is_other_restriction>false</is_other_restriction>
      <is_waitlist>false</is_waitlist>
      <regent_id>0</regent_id>
      <requested_date>0001-01-01T00:00:00</requested_date>
      <section_code>String</section_code>
      <section_uuid>String</section_uuid>
      <student_name>String</student_name>
      <student_section_uuid>String</student_section_uuid>
      <term>String</term>
      <title>String</title>
      <uuid>String</uuid>
    </ProvisionalRegistrationResponse>
  </provisional_registrations>
</ProvisionalRegistrationsResponse>