regis

<back to all web services

CrossTermRegistrationBillingAuditRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/registration/cross-term-billing-audit
<?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 CrossTermRegistrationBillingAuditRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var DateTime */
        public DateTime $from_date=new DateTime(),
        /** @var DateTime */
        public DateTime $to_date=new DateTime(),
        /** @var string|null */
        public ?string $billed_term=null,
        /** @var int|null */
        public ?int $regent_id=null,
        /** @var string|null */
        public ?string $operation=null,
        /** @var bool|null */
        public ?bool $is_admin=null,
        /** @var string|null */
        public ?string $authorizing_uuid=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['from_date'])) $this->from_date = JsonConverters::from('DateTime', $o['from_date']);
        if (isset($o['to_date'])) $this->to_date = JsonConverters::from('DateTime', $o['to_date']);
        if (isset($o['billed_term'])) $this->billed_term = $o['billed_term'];
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['operation'])) $this->operation = $o['operation'];
        if (isset($o['is_admin'])) $this->is_admin = $o['is_admin'];
        if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->from_date)) $o['from_date'] = JsonConverters::to('DateTime', $this->from_date);
        if (isset($this->to_date)) $o['to_date'] = JsonConverters::to('DateTime', $this->to_date);
        if (isset($this->billed_term)) $o['billed_term'] = $this->billed_term;
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->operation)) $o['operation'] = $this->operation;
        if (isset($this->is_admin)) $o['is_admin'] = $this->is_admin;
        if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
        return empty($o) ? new class(){} : $o;
    }
}

PHP CrossTermRegistrationBillingAuditRequest 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 /registration/cross-term-billing-audit HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	reporting_term: String,
	from_date: 0001-01-01,
	to_date: 0001-01-01,
	billed_term: String,
	regent_id: 0,
	operation: String,
	is_admin: False,
	authorizing_uuid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

[
	{
		transaction_uuid: String,
		source_reporting_term: String,
		completed_datetime: 0001-01-01,
		operation: String,
		is_admin: False,
		transaction_by: String,
		regent_id: 0,
		student_uuid: String,
		student_name: String,
		billed_terms: 
		[
			String
		],
		invoices: 
		[
			{
				invoice_uuid: String,
				billed_term: String,
				billing_component: String,
				status: String,
				description: String,
				total_charges: 0,
				total_credits: 0,
				is_cross_term: False,
				items: 
				[
					{
						invoice_item_uuid: String,
						rate_code: String,
						rate_description: String,
						description: String,
						charge: 0,
						credit: 0
					}
				]
			}
		]
	}
]