Required permission: | FinancialAidPermission |
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 .other suffix or ?format=other
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: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"reporting_term":"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"}},"reporting_term":"String","awards":[{"award_id":0,"award_code":"String","award_description":"String","budget_amount":0,"awarded_amount":0,"person_awards":[{"uuid":"String","regent_id":0,"first_name":"String","last_name":"String","awarded_amount":0}]}]}