regis

<back to all web services

FinancialAidSummaryInTermRequest

Requires Authentication
Required permission:FinancialAidPermission
The following routes are available for this service:
POST/Finance/FinancialAid/Awards/{reporting_term}/Summary
<?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 FinancialAidAwardResponse 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 float */
        public float $awarded_amount=0.0
    ) {
    }

    /** @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['awarded_amount'])) $this->awarded_amount = $o['awarded_amount'];
    }
    
    /** @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->awarded_amount)) $o['awarded_amount'] = $this->awarded_amount;
        return empty($o) ? new class(){} : $o;
    }
}

class FinancialAidAwardSummaryInTermResponse implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $award_id=0,
        /** @var string|null */
        public ?string $award_code=null,
        /** @var string|null */
        public ?string $award_description=null,
        /** @var float */
        public float $budget_amount=0.0,
        /** @var float */
        public float $awarded_amount=0.0,
        /** @var array<FinancialAidAwardResponse>|null */
        public ?array $person_awards=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['award_id'])) $this->award_id = $o['award_id'];
        if (isset($o['award_code'])) $this->award_code = $o['award_code'];
        if (isset($o['award_description'])) $this->award_description = $o['award_description'];
        if (isset($o['budget_amount'])) $this->budget_amount = $o['budget_amount'];
        if (isset($o['awarded_amount'])) $this->awarded_amount = $o['awarded_amount'];
        if (isset($o['person_awards'])) $this->person_awards = JsonConverters::fromArray('FinancialAidAwardResponse', $o['person_awards']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->award_id)) $o['award_id'] = $this->award_id;
        if (isset($this->award_code)) $o['award_code'] = $this->award_code;
        if (isset($this->award_description)) $o['award_description'] = $this->award_description;
        if (isset($this->budget_amount)) $o['budget_amount'] = $this->budget_amount;
        if (isset($this->awarded_amount)) $o['awarded_amount'] = $this->awarded_amount;
        if (isset($this->person_awards)) $o['person_awards'] = JsonConverters::toArray('FinancialAidAwardResponse', $this->person_awards);
        return empty($o) ? new class(){} : $o;
    }
}

class FinancialAidSummaryInTermResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var array<FinancialAidAwardSummaryInTermResponse>|null */
        public ?array $awards=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['awards'])) $this->awards = JsonConverters::fromArray('FinancialAidAwardSummaryInTermResponse', $o['awards']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->awards)) $o['awards'] = JsonConverters::toArray('FinancialAidAwardSummaryInTermResponse', $this->awards);
        return empty($o) ? new class(){} : $o;
    }
}

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

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

PHP FinancialAidSummaryInTermRequest 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 /Finance/FinancialAid/Awards/{reporting_term}/Summary HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

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

<FinancialAidSummaryInTermResponse 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>
  <awards>
    <FinancialAidAwardSummaryInTermResponse>
      <award_code>String</award_code>
      <award_description>String</award_description>
      <award_id>0</award_id>
      <awarded_amount>0</awarded_amount>
      <budget_amount>0</budget_amount>
      <person_awards>
        <FinancialAidAwardResponse>
          <awarded_amount>0</awarded_amount>
          <first_name>String</first_name>
          <last_name>String</last_name>
          <regent_id>0</regent_id>
          <uuid>String</uuid>
        </FinancialAidAwardResponse>
      </person_awards>
    </FinancialAidAwardSummaryInTermResponse>
  </awards>
  <reporting_term>String</reporting_term>
</FinancialAidSummaryInTermResponse>