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 .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/PayMyTuition HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<FinancePayMyTuitionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <hash>String</hash>
  <payload>
    <FinancePayMyTuitionPayloadRequest>
      <AcademicPeriodGUID>String</AcademicPeriodGUID>
      <Currency>String</Currency>
      <Id>String</Id>
      <PaymentType>String</PaymentType>
      <StudentGuid>String</StudentGuid>
      <StudentResidenceType>String</StudentResidenceType>
      <amount>String</amount>
      <comments>String</comments>
      <paidOn>String</paidOn>
    </FinancePayMyTuitionPayloadRequest>
  </payload>
  <stamp>String</stamp>
</FinancePayMyTuitionRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FinancePayStudentAccountByCardResponse 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>
  <success>false</success>
</FinancePayStudentAccountByCardResponse>