Required role: | REGISUserRole |
POST | /Registration/InProgress/{uuid}/Term/{reporting_term}/Submit |
---|
<?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 RegistrationInProgressSubmitResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null,
/** @var string|null */
public ?string $email=null,
/** @var string|null */
public ?string $first_name=null,
/** @var string|null */
public ?string $preferred_name=null,
/** @var string|null */
public ?string $last_name=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['first_name'])) $this->first_name = $o['first_name'];
if (isset($o['preferred_name'])) $this->preferred_name = $o['preferred_name'];
if (isset($o['last_name'])) $this->last_name = $o['last_name'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->first_name)) $o['first_name'] = $this->first_name;
if (isset($this->preferred_name)) $o['preferred_name'] = $this->preferred_name;
if (isset($this->last_name)) $o['last_name'] = $this->last_name;
return empty($o) ? new class(){} : $o;
}
}
class RegistrationInProgressSubmitRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $transaction_uuid=null,
/** @var string|null */
public ?string $uuid=null,
/** @var string|null */
public ?string $reporting_term=null,
/** @var array<int>|null */
public ?array $rates_opted_in=null,
/** @var string|null */
public ?string $authorizing_uuid=null,
/** @var bool|null */
public ?bool $casl_optin=null,
/** @var bool|null */
public ?bool $ams_optin=null,
/** @var bool|null */
public ?bool $rcsa_locker_optin=null,
/** @var bool|null */
public ?bool $appliedForDEReentryBenefit=null,
/** @var bool|null */
public ?bool $appliedForSpousalAuditBenefit=null,
/** @var bool|null */
public ?bool $appliedForSpousalCreditBenefit=null,
/** @var string|null */
public ?string $notes=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['transaction_uuid'])) $this->transaction_uuid = $o['transaction_uuid'];
if (isset($o['uuid'])) $this->uuid = $o['uuid'];
if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
if (isset($o['rates_opted_in'])) $this->rates_opted_in = JsonConverters::fromArray('int', $o['rates_opted_in']);
if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
if (isset($o['casl_optin'])) $this->casl_optin = $o['casl_optin'];
if (isset($o['ams_optin'])) $this->ams_optin = $o['ams_optin'];
if (isset($o['rcsa_locker_optin'])) $this->rcsa_locker_optin = $o['rcsa_locker_optin'];
if (isset($o['appliedForDEReentryBenefit'])) $this->appliedForDEReentryBenefit = $o['appliedForDEReentryBenefit'];
if (isset($o['appliedForSpousalAuditBenefit'])) $this->appliedForSpousalAuditBenefit = $o['appliedForSpousalAuditBenefit'];
if (isset($o['appliedForSpousalCreditBenefit'])) $this->appliedForSpousalCreditBenefit = $o['appliedForSpousalCreditBenefit'];
if (isset($o['notes'])) $this->notes = $o['notes'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->transaction_uuid)) $o['transaction_uuid'] = $this->transaction_uuid;
if (isset($this->uuid)) $o['uuid'] = $this->uuid;
if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
if (isset($this->rates_opted_in)) $o['rates_opted_in'] = JsonConverters::toArray('int', $this->rates_opted_in);
if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
if (isset($this->casl_optin)) $o['casl_optin'] = $this->casl_optin;
if (isset($this->ams_optin)) $o['ams_optin'] = $this->ams_optin;
if (isset($this->rcsa_locker_optin)) $o['rcsa_locker_optin'] = $this->rcsa_locker_optin;
if (isset($this->appliedForDEReentryBenefit)) $o['appliedForDEReentryBenefit'] = $this->appliedForDEReentryBenefit;
if (isset($this->appliedForSpousalAuditBenefit)) $o['appliedForSpousalAuditBenefit'] = $this->appliedForSpousalAuditBenefit;
if (isset($this->appliedForSpousalCreditBenefit)) $o['appliedForSpousalCreditBenefit'] = $this->appliedForSpousalCreditBenefit;
if (isset($this->notes)) $o['notes'] = $this->notes;
return empty($o) ? new class(){} : $o;
}
}
PHP RegistrationInProgressSubmitRequest 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/InProgress/{uuid}/Term/{reporting_term}/Submit HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"transaction_uuid":"String","uuid":"String","reporting_term":"String","rates_opted_in":[0],"authorizing_uuid":"String","casl_optin":false,"ams_optin":false,"rcsa_locker_optin":false,"appliedForDEReentryBenefit":false,"appliedForSpousalAuditBenefit":false,"appliedForSpousalCreditBenefit":false,"notes":"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"}},"email":"String","first_name":"String","preferred_name":"String","last_name":"String"}