regis

<back to all web services

FinanceAdjustmentRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Finance/{uuid}/Adjustment/{reporting_term}
<?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 InvoiceItemBalanceResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $rate_id=0,
        /** @var string|null */
        public ?string $rate_code=null,
        /** @var string|null */
        public ?string $rate_description=null,
        /** @var float */
        public float $balance_amount=0.0,
        /** @var float */
        public float $charge_amount=0.0,
        /** @var float */
        public float $credit_amount=0.0
    ) {
    }

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

class InvoiceItemAdminResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var string|null */
        public ?string $invoiceItemUUID=null,
        /** @var int */
        public int $rate_id=0,
        /** @var string|null */
        public ?string $rate_code=null,
        /** @var string|null */
        public ?string $rate_description=null,
        /** @var bool|null */
        public ?bool $is_required=null,
        /** @var bool|null */
        public ?bool $is_optional=null,
        /** @var float|null */
        public ?float $charge=null,
        /** @var float|null */
        public ?float $credit=null
    ) {
    }

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

class FinanceAdjustmentResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $uuid=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var DateTime|null */
        public ?DateTime $openFiscalDate=null,
        /** @var array<InvoiceItemBalanceResponse>|null */
        public ?array $invoiceItemBalances=null,
        /** @var array<InvoiceItemAdminResponse>|null */
        public ?array $availableInvoiceItems=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['openFiscalDate'])) $this->openFiscalDate = JsonConverters::from('DateTime', $o['openFiscalDate']);
        if (isset($o['invoiceItemBalances'])) $this->invoiceItemBalances = JsonConverters::fromArray('InvoiceItemBalanceResponse', $o['invoiceItemBalances']);
        if (isset($o['availableInvoiceItems'])) $this->availableInvoiceItems = JsonConverters::fromArray('InvoiceItemAdminResponse', $o['availableInvoiceItems']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->openFiscalDate)) $o['openFiscalDate'] = JsonConverters::to('DateTime', $this->openFiscalDate);
        if (isset($this->invoiceItemBalances)) $o['invoiceItemBalances'] = JsonConverters::toArray('InvoiceItemBalanceResponse', $this->invoiceItemBalances);
        if (isset($this->availableInvoiceItems)) $o['availableInvoiceItems'] = JsonConverters::toArray('InvoiceItemAdminResponse', $this->availableInvoiceItems);
        return empty($o) ? new class(){} : $o;
    }
}

class FinanceAdjustmentRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var bool|null */
        public ?bool $is_financial_aid=null,
        /** @var string|null */
        public ?string $authorizing_uuid=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['is_financial_aid'])) $this->is_financial_aid = $o['is_financial_aid'];
        if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->is_financial_aid)) $o['is_financial_aid'] = $this->is_financial_aid;
        if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
        return empty($o) ? new class(){} : $o;
    }
}

PHP FinanceAdjustmentRequest 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/{uuid}/Adjustment/{reporting_term} HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<FinanceAdjustmentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <authorizing_uuid>String</authorizing_uuid>
  <is_financial_aid>false</is_financial_aid>
  <reporting_term>String</reporting_term>
  <uuid>String</uuid>
</FinanceAdjustmentRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FinanceAdjustmentResponse 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>
  <availableInvoiceItems>
    <InvoiceItemAdminResponse>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1: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>
        </d4p1:Meta>
      </ResponseStatus>
      <charge>0</charge>
      <credit>0</credit>
      <invoiceItemUUID>String</invoiceItemUUID>
      <is_optional>false</is_optional>
      <is_required>false</is_required>
      <rate_code>String</rate_code>
      <rate_description>String</rate_description>
      <rate_id>0</rate_id>
    </InvoiceItemAdminResponse>
  </availableInvoiceItems>
  <invoiceItemBalances>
    <InvoiceItemBalanceResponse>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1: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>
        </d4p1:Meta>
      </ResponseStatus>
      <balance_amount>0</balance_amount>
      <charge_amount>0</charge_amount>
      <credit_amount>0</credit_amount>
      <rate_code>String</rate_code>
      <rate_description>String</rate_description>
      <rate_id>0</rate_id>
    </InvoiceItemBalanceResponse>
  </invoiceItemBalances>
  <openFiscalDate>0001-01-01T00:00:00</openFiscalDate>
  <regent_id>0</regent_id>
  <reporting_term>String</reporting_term>
  <uuid>String</uuid>
</FinanceAdjustmentResponse>