regis

<back to all web services

FinancePayMyTuitionRequest

Requires Authentication
Required permission:CreatePayments
The following routes are available for this service:
POST/Finance/PayMyTuition
<?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 FinancePayStudentAccountByCardResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var bool|null */
        public ?bool $success=null
    ) {
    }

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

class FinancePayMyTuitionPayloadRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $studentGuid=null,
        /** @var string|null */
        public ?string $academicPeriodGUID=null,
        /** @var string|null */
        public ?string $paymentType=null,
        /** @var string|null */
        public ?string $paidOn=null,
        /** @var string|null */
        public ?string $comments=null,
        /** @var string|null */
        public ?string $amount=null,
        /** @var string|null */
        public ?string $currency=null,
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $studentResidenceType=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['studentGuid'])) $this->studentGuid = $o['studentGuid'];
        if (isset($o['academicPeriodGUID'])) $this->academicPeriodGUID = $o['academicPeriodGUID'];
        if (isset($o['paymentType'])) $this->paymentType = $o['paymentType'];
        if (isset($o['paidOn'])) $this->paidOn = $o['paidOn'];
        if (isset($o['comments'])) $this->comments = $o['comments'];
        if (isset($o['amount'])) $this->amount = $o['amount'];
        if (isset($o['currency'])) $this->currency = $o['currency'];
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['studentResidenceType'])) $this->studentResidenceType = $o['studentResidenceType'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->studentGuid)) $o['studentGuid'] = $this->studentGuid;
        if (isset($this->academicPeriodGUID)) $o['academicPeriodGUID'] = $this->academicPeriodGUID;
        if (isset($this->paymentType)) $o['paymentType'] = $this->paymentType;
        if (isset($this->paidOn)) $o['paidOn'] = $this->paidOn;
        if (isset($this->comments)) $o['comments'] = $this->comments;
        if (isset($this->amount)) $o['amount'] = $this->amount;
        if (isset($this->currency)) $o['currency'] = $this->currency;
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->studentResidenceType)) $o['studentResidenceType'] = $this->studentResidenceType;
        return empty($o) ? new class(){} : $o;
    }
}

class FinancePayMyTuitionRequest implements JsonSerializable
{
    public function __construct(
        /** @var array<FinancePayMyTuitionPayloadRequest>|null */
        public ?array $payload=null,
        /** @var string|null */
        public ?string $stamp=null,
        /** @var string|null */
        public ?string $hash=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['payload'])) $this->payload = JsonConverters::fromArray('FinancePayMyTuitionPayloadRequest', $o['payload']);
        if (isset($o['stamp'])) $this->stamp = $o['stamp'];
        if (isset($o['hash'])) $this->hash = $o['hash'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->payload)) $o['payload'] = JsonConverters::toArray('FinancePayMyTuitionPayloadRequest', $this->payload);
        if (isset($this->stamp)) $o['stamp'] = $this->stamp;
        if (isset($this->hash)) $o['hash'] = $this->hash;
        return empty($o) ? new class(){} : $o;
    }
}

PHP FinancePayMyTuitionRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Finance/PayMyTuition HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	payload: 
	[
		{
			studentGuid: String,
			academicPeriodGUID: String,
			paymentType: String,
			paidOn: String,
			comments: String,
			amount: String,
			currency: String,
			id: String,
			studentResidenceType: String
		}
	],
	stamp: String,
	hash: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	success: False
}