| Required role: | REGISUserRole |
| POST | /Finance/AccountLate/{reporting_term}/Jobs/Result |
|---|
<?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 FinanceAccountLateChargeOutcome implements JsonSerializable
{
public function __construct(
/** @var int */
public int $regent_id=0,
/** @var string|null */
public ?string $status=null,
/** @var float|null */
public ?float $charge_amount=null,
/** @var string|null */
public ?string $charge_status=null,
/** @var string|null */
public ?string $email_status=null,
/** @var string|null */
public ?string $message=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
if (isset($o['status'])) $this->status = $o['status'];
if (isset($o['charge_amount'])) $this->charge_amount = $o['charge_amount'];
if (isset($o['charge_status'])) $this->charge_status = $o['charge_status'];
if (isset($o['email_status'])) $this->email_status = $o['email_status'];
if (isset($o['message'])) $this->message = $o['message'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
if (isset($this->status)) $o['status'] = $this->status;
if (isset($this->charge_amount)) $o['charge_amount'] = $this->charge_amount;
if (isset($this->charge_status)) $o['charge_status'] = $this->charge_status;
if (isset($this->email_status)) $o['email_status'] = $this->email_status;
if (isset($this->message)) $o['message'] = $this->message;
return empty($o) ? new class(){} : $o;
}
}
class FinanceAccountLateChargeJobResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null,
/** @var string */
public string $operation_id='',
/** @var string|null */
public ?string $reporting_term=null,
/** @var DateTime */
public DateTime $calculation_date=new DateTime(),
/** @var bool|null */
public ?bool $preview_only=null,
/** @var float|null */
public ?float $skip_exact_balance=null,
/** @var string|null */
public ?string $state=null,
/** @var int|null */
public ?int $total=null,
/** @var int|null */
public ?int $current_regent_id=null,
/** @var int */
public int $processed=0,
/** @var int */
public int $succeeded=0,
/** @var int */
public int $skipped=0,
/** @var int */
public int $failed=0,
/** @var DateTime */
public DateTime $created_utc=new DateTime(),
/** @var DateTime */
public DateTime $updated_utc=new DateTime(),
/** @var string|null */
public ?string $message=null,
/** @var bool|null */
public ?bool $report_available=null,
/** @var array<FinanceAccountLateChargeOutcome>|null */
public ?array $outcomes=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
if (isset($o['operation_id'])) $this->operation_id = $o['operation_id'];
if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
if (isset($o['calculation_date'])) $this->calculation_date = JsonConverters::from('DateTime', $o['calculation_date']);
if (isset($o['preview_only'])) $this->preview_only = $o['preview_only'];
if (isset($o['skip_exact_balance'])) $this->skip_exact_balance = $o['skip_exact_balance'];
if (isset($o['state'])) $this->state = $o['state'];
if (isset($o['total'])) $this->total = $o['total'];
if (isset($o['current_regent_id'])) $this->current_regent_id = $o['current_regent_id'];
if (isset($o['processed'])) $this->processed = $o['processed'];
if (isset($o['succeeded'])) $this->succeeded = $o['succeeded'];
if (isset($o['skipped'])) $this->skipped = $o['skipped'];
if (isset($o['failed'])) $this->failed = $o['failed'];
if (isset($o['created_utc'])) $this->created_utc = JsonConverters::from('DateTime', $o['created_utc']);
if (isset($o['updated_utc'])) $this->updated_utc = JsonConverters::from('DateTime', $o['updated_utc']);
if (isset($o['message'])) $this->message = $o['message'];
if (isset($o['report_available'])) $this->report_available = $o['report_available'];
if (isset($o['outcomes'])) $this->outcomes = JsonConverters::fromArray('FinanceAccountLateChargeOutcome', $o['outcomes']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
if (isset($this->operation_id)) $o['operation_id'] = $this->operation_id;
if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
if (isset($this->calculation_date)) $o['calculation_date'] = JsonConverters::to('DateTime', $this->calculation_date);
if (isset($this->preview_only)) $o['preview_only'] = $this->preview_only;
if (isset($this->skip_exact_balance)) $o['skip_exact_balance'] = $this->skip_exact_balance;
if (isset($this->state)) $o['state'] = $this->state;
if (isset($this->total)) $o['total'] = $this->total;
if (isset($this->current_regent_id)) $o['current_regent_id'] = $this->current_regent_id;
if (isset($this->processed)) $o['processed'] = $this->processed;
if (isset($this->succeeded)) $o['succeeded'] = $this->succeeded;
if (isset($this->skipped)) $o['skipped'] = $this->skipped;
if (isset($this->failed)) $o['failed'] = $this->failed;
if (isset($this->created_utc)) $o['created_utc'] = JsonConverters::to('DateTime', $this->created_utc);
if (isset($this->updated_utc)) $o['updated_utc'] = JsonConverters::to('DateTime', $this->updated_utc);
if (isset($this->message)) $o['message'] = $this->message;
if (isset($this->report_available)) $o['report_available'] = $this->report_available;
if (isset($this->outcomes)) $o['outcomes'] = JsonConverters::toArray('FinanceAccountLateChargeOutcome', $this->outcomes);
return empty($o) ? new class(){} : $o;
}
}
class FinanceAccountLateChargeResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null,
/** @var string|null */
public ?string $skip_reason=null,
/** @var string|null */
public ?string $charge_status=null,
/** @var string|null */
public ?string $email_status=null,
/** @var string|null */
public ?string $charge_error=null,
/** @var string|null */
public ?string $email_error=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 $uuid=null,
/** @var bool|null */
public ?bool $has_late_reg_fee=null,
/** @var float */
public float $amount_owing=0.0,
/** @var float */
public float $late_fee=0.0,
/** @var float */
public float $interest=0.0,
/** @var string|null */
public ?string $active_financial_restrictions=null,
/** @var string|null */
public ?string $new_financial_restriction=null,
/** @var DateTime|null */
public ?DateTime $last_registration_date=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
if (isset($o['skip_reason'])) $this->skip_reason = $o['skip_reason'];
if (isset($o['charge_status'])) $this->charge_status = $o['charge_status'];
if (isset($o['email_status'])) $this->email_status = $o['email_status'];
if (isset($o['charge_error'])) $this->charge_error = $o['charge_error'];
if (isset($o['email_error'])) $this->email_error = $o['email_error'];
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['uuid'])) $this->uuid = $o['uuid'];
if (isset($o['has_late_reg_fee'])) $this->has_late_reg_fee = $o['has_late_reg_fee'];
if (isset($o['amount_owing'])) $this->amount_owing = $o['amount_owing'];
if (isset($o['late_fee'])) $this->late_fee = $o['late_fee'];
if (isset($o['interest'])) $this->interest = $o['interest'];
if (isset($o['active_financial_restrictions'])) $this->active_financial_restrictions = $o['active_financial_restrictions'];
if (isset($o['new_financial_restriction'])) $this->new_financial_restriction = $o['new_financial_restriction'];
if (isset($o['last_registration_date'])) $this->last_registration_date = JsonConverters::from('DateTime', $o['last_registration_date']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
if (isset($this->skip_reason)) $o['skip_reason'] = $this->skip_reason;
if (isset($this->charge_status)) $o['charge_status'] = $this->charge_status;
if (isset($this->email_status)) $o['email_status'] = $this->email_status;
if (isset($this->charge_error)) $o['charge_error'] = $this->charge_error;
if (isset($this->email_error)) $o['email_error'] = $this->email_error;
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->uuid)) $o['uuid'] = $this->uuid;
if (isset($this->has_late_reg_fee)) $o['has_late_reg_fee'] = $this->has_late_reg_fee;
if (isset($this->amount_owing)) $o['amount_owing'] = $this->amount_owing;
if (isset($this->late_fee)) $o['late_fee'] = $this->late_fee;
if (isset($this->interest)) $o['interest'] = $this->interest;
if (isset($this->active_financial_restrictions)) $o['active_financial_restrictions'] = $this->active_financial_restrictions;
if (isset($this->new_financial_restriction)) $o['new_financial_restriction'] = $this->new_financial_restriction;
if (isset($this->last_registration_date)) $o['last_registration_date'] = JsonConverters::to('DateTime', $this->last_registration_date);
return empty($o) ? new class(){} : $o;
}
}
class FinanceAccountLateChargeJobResultResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null,
/** @var FinanceAccountLateChargeJobResponse|null */
public ?FinanceAccountLateChargeJobResponse $job=null,
/** @var array<FinanceAccountLateChargeResponse>|null */
public ?array $accounts=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
if (isset($o['job'])) $this->job = JsonConverters::from('FinanceAccountLateChargeJobResponse', $o['job']);
if (isset($o['accounts'])) $this->accounts = JsonConverters::fromArray('FinanceAccountLateChargeResponse', $o['accounts']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
if (isset($this->job)) $o['job'] = JsonConverters::to('FinanceAccountLateChargeJobResponse', $this->job);
if (isset($this->accounts)) $o['accounts'] = JsonConverters::toArray('FinanceAccountLateChargeResponse', $this->accounts);
return empty($o) ? new class(){} : $o;
}
}
class FinanceAccountLateChargeJobResultRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $authorizing_uuid=null,
/** @var string|null */
public ?string $reporting_term=null,
/** @var string */
public string $operation_id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
if (isset($o['operation_id'])) $this->operation_id = $o['operation_id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
if (isset($this->operation_id)) $o['operation_id'] = $this->operation_id;
return empty($o) ? new class(){} : $o;
}
}
PHP FinanceAccountLateChargeJobResultRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Finance/AccountLate/{reporting_term}/Jobs/Result HTTP/1.1
Host: data.regent-college.edu
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"authorizing_uuid":"String","reporting_term":"String","operation_id":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"job":{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"operation_id":"00000000000000000000000000000000","reporting_term":"String","calculation_date":"0001-01-01T00:00:00.0000000","preview_only":false,"skip_exact_balance":0,"state":"String","total":0,"current_regent_id":0,"processed":0,"succeeded":0,"skipped":0,"failed":0,"created_utc":"0001-01-01T00:00:00.0000000","updated_utc":"0001-01-01T00:00:00.0000000","message":"String","report_available":false,"outcomes":[{"regent_id":0,"status":"String","charge_amount":0,"charge_status":"String","email_status":"String","message":"String"}]},"accounts":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"skip_reason":"String","charge_status":"String","email_status":"String","charge_error":"String","email_error":"String","regent_id":0,"first_name":"String","last_name":"String","uuid":"String","has_late_reg_fee":false,"amount_owing":0,"late_fee":0,"interest":0,"active_financial_restrictions":"String","new_financial_restriction":"String","last_registration_date":"0001-01-01T00:00:00.0000000"}]}