regis

<back to all web services

InvoiceDynamicsAuditLogsRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/finance/invoice-dynamics-audit/logs
<?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 InvoiceDynamicsTransactionResponse implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $dynamics_log_id=null,
        /** @var string|null */
        public ?string $action=null,
        /** @var string|null */
        public ?string $note=null,
        /** @var float|null */
        public ?float $logged_amount=null,
        /** @var string|null */
        public ?string $document_number=null,
        /** @var string|null */
        public ?string $customer_number=null,
        /** @var DateTime|null */
        public ?DateTime $logged_at=null,
        /** @var string|null */
        public ?string $regis_invoice_reference=null,
        /** @var string|null */
        public ?string $gp_source=null,
        /** @var bool|null */
        public ?bool $found_in_gp=null,
        /** @var int */
        public int $gp_type=0,
        /** @var int */
        public int $gp_status=0,
        /** @var string|null */
        public ?string $batch_number=null,
        /** @var float|null */
        public ?float $gp_amount=null,
        /** @var bool|null */
        public ?bool $is_open=null,
        /** @var bool|null */
        public ?bool $is_posted=null,
        /** @var bool|null */
        public ?bool $is_void=null,
        /** @var DateTime|null */
        public ?DateTime $document_date=null,
        /** @var DateTime|null */
        public ?DateTime $posting_date=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['dynamics_log_id'])) $this->dynamics_log_id = $o['dynamics_log_id'];
        if (isset($o['action'])) $this->action = $o['action'];
        if (isset($o['note'])) $this->note = $o['note'];
        if (isset($o['logged_amount'])) $this->logged_amount = $o['logged_amount'];
        if (isset($o['document_number'])) $this->document_number = $o['document_number'];
        if (isset($o['customer_number'])) $this->customer_number = $o['customer_number'];
        if (isset($o['logged_at'])) $this->logged_at = JsonConverters::from('DateTime', $o['logged_at']);
        if (isset($o['regis_invoice_reference'])) $this->regis_invoice_reference = $o['regis_invoice_reference'];
        if (isset($o['gp_source'])) $this->gp_source = $o['gp_source'];
        if (isset($o['found_in_gp'])) $this->found_in_gp = $o['found_in_gp'];
        if (isset($o['gp_type'])) $this->gp_type = $o['gp_type'];
        if (isset($o['gp_status'])) $this->gp_status = $o['gp_status'];
        if (isset($o['batch_number'])) $this->batch_number = $o['batch_number'];
        if (isset($o['gp_amount'])) $this->gp_amount = $o['gp_amount'];
        if (isset($o['is_open'])) $this->is_open = $o['is_open'];
        if (isset($o['is_posted'])) $this->is_posted = $o['is_posted'];
        if (isset($o['is_void'])) $this->is_void = $o['is_void'];
        if (isset($o['document_date'])) $this->document_date = JsonConverters::from('DateTime', $o['document_date']);
        if (isset($o['posting_date'])) $this->posting_date = JsonConverters::from('DateTime', $o['posting_date']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->dynamics_log_id)) $o['dynamics_log_id'] = $this->dynamics_log_id;
        if (isset($this->action)) $o['action'] = $this->action;
        if (isset($this->note)) $o['note'] = $this->note;
        if (isset($this->logged_amount)) $o['logged_amount'] = $this->logged_amount;
        if (isset($this->document_number)) $o['document_number'] = $this->document_number;
        if (isset($this->customer_number)) $o['customer_number'] = $this->customer_number;
        if (isset($this->logged_at)) $o['logged_at'] = JsonConverters::to('DateTime', $this->logged_at);
        if (isset($this->regis_invoice_reference)) $o['regis_invoice_reference'] = $this->regis_invoice_reference;
        if (isset($this->gp_source)) $o['gp_source'] = $this->gp_source;
        if (isset($this->found_in_gp)) $o['found_in_gp'] = $this->found_in_gp;
        if (isset($this->gp_type)) $o['gp_type'] = $this->gp_type;
        if (isset($this->gp_status)) $o['gp_status'] = $this->gp_status;
        if (isset($this->batch_number)) $o['batch_number'] = $this->batch_number;
        if (isset($this->gp_amount)) $o['gp_amount'] = $this->gp_amount;
        if (isset($this->is_open)) $o['is_open'] = $this->is_open;
        if (isset($this->is_posted)) $o['is_posted'] = $this->is_posted;
        if (isset($this->is_void)) $o['is_void'] = $this->is_void;
        if (isset($this->document_date)) $o['document_date'] = JsonConverters::to('DateTime', $this->document_date);
        if (isset($this->posting_date)) $o['posting_date'] = JsonConverters::to('DateTime', $this->posting_date);
        return empty($o) ? new class(){} : $o;
    }
}

class InvoiceEconnectLogResponse implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var DateTime */
        public DateTime $timestamp=new DateTime(),
        /** @var string|null */
        public ?string $xml=null,
        /** @var string|null */
        public ?string $response=null
    ) {
    }

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

class InvoiceDynamicsAuditResponse implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $invoice_id=null,
        /** @var string|null */
        public ?string $invoice_uuid=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var DateTime|null */
        public ?DateTime $invoice_date=null,
        /** @var string|null */
        public ?string $invoice_status=null,
        /** @var string|null */
        public ?string $description=null,
        /** @var float */
        public float $total_charges=0.0,
        /** @var float */
        public float $total_credits=0.0,
        /** @var float */
        public float $net=0.0,
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $student_uuid=null,
        /** @var string|null */
        public ?string $student_name=null,
        /** @var string|null */
        public ?string $initiator_name=null,
        /** @var bool|null */
        public ?bool $has_regis_invoice=null,
        /** @var string|null */
        public ?string $reconciliation_type=null,
        /** @var string|null */
        public ?string $dynamics_status=null,
        /** @var array<InvoiceDynamicsTransactionResponse>|null */
        public ?array $dynamics_transactions=null,
        /** @var array<InvoiceEconnectLogResponse>|null */
        public ?array $econnect_logs=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['invoice_id'])) $this->invoice_id = $o['invoice_id'];
        if (isset($o['invoice_uuid'])) $this->invoice_uuid = $o['invoice_uuid'];
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['invoice_date'])) $this->invoice_date = JsonConverters::from('DateTime', $o['invoice_date']);
        if (isset($o['invoice_status'])) $this->invoice_status = $o['invoice_status'];
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['total_charges'])) $this->total_charges = $o['total_charges'];
        if (isset($o['total_credits'])) $this->total_credits = $o['total_credits'];
        if (isset($o['net'])) $this->net = $o['net'];
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['student_uuid'])) $this->student_uuid = $o['student_uuid'];
        if (isset($o['student_name'])) $this->student_name = $o['student_name'];
        if (isset($o['initiator_name'])) $this->initiator_name = $o['initiator_name'];
        if (isset($o['has_regis_invoice'])) $this->has_regis_invoice = $o['has_regis_invoice'];
        if (isset($o['reconciliation_type'])) $this->reconciliation_type = $o['reconciliation_type'];
        if (isset($o['dynamics_status'])) $this->dynamics_status = $o['dynamics_status'];
        if (isset($o['dynamics_transactions'])) $this->dynamics_transactions = JsonConverters::fromArray('InvoiceDynamicsTransactionResponse', $o['dynamics_transactions']);
        if (isset($o['econnect_logs'])) $this->econnect_logs = JsonConverters::fromArray('InvoiceEconnectLogResponse', $o['econnect_logs']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->invoice_id)) $o['invoice_id'] = $this->invoice_id;
        if (isset($this->invoice_uuid)) $o['invoice_uuid'] = $this->invoice_uuid;
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->invoice_date)) $o['invoice_date'] = JsonConverters::to('DateTime', $this->invoice_date);
        if (isset($this->invoice_status)) $o['invoice_status'] = $this->invoice_status;
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->total_charges)) $o['total_charges'] = $this->total_charges;
        if (isset($this->total_credits)) $o['total_credits'] = $this->total_credits;
        if (isset($this->net)) $o['net'] = $this->net;
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->student_uuid)) $o['student_uuid'] = $this->student_uuid;
        if (isset($this->student_name)) $o['student_name'] = $this->student_name;
        if (isset($this->initiator_name)) $o['initiator_name'] = $this->initiator_name;
        if (isset($this->has_regis_invoice)) $o['has_regis_invoice'] = $this->has_regis_invoice;
        if (isset($this->reconciliation_type)) $o['reconciliation_type'] = $this->reconciliation_type;
        if (isset($this->dynamics_status)) $o['dynamics_status'] = $this->dynamics_status;
        if (isset($this->dynamics_transactions)) $o['dynamics_transactions'] = JsonConverters::toArray('InvoiceDynamicsTransactionResponse', $this->dynamics_transactions);
        if (isset($this->econnect_logs)) $o['econnect_logs'] = JsonConverters::toArray('InvoiceEconnectLogResponse', $this->econnect_logs);
        return empty($o) ? new class(){} : $o;
    }
}

class InvoiceDynamicsAuditLogsRequest implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $invoice_id=null,
        /** @var string|null */
        public ?string $document_number=null,
        /** @var string|null */
        public ?string $authorizing_uuid=null
    ) {
    }

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

PHP InvoiceDynamicsAuditLogsRequest 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/invoice-dynamics-audit/logs HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	invoice_id: 0,
	document_number: String,
	authorizing_uuid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	invoice_id: 0,
	invoice_uuid: String,
	reporting_term: String,
	invoice_date: 0001-01-01,
	invoice_status: String,
	description: String,
	total_charges: 0,
	total_credits: 0,
	net: 0,
	regent_id: 0,
	student_uuid: String,
	student_name: String,
	initiator_name: String,
	has_regis_invoice: False,
	reconciliation_type: String,
	dynamics_status: String,
	dynamics_transactions: 
	[
		{
			dynamics_log_id: 0,
			action: String,
			note: String,
			logged_amount: 0,
			document_number: String,
			customer_number: String,
			logged_at: 0001-01-01,
			regis_invoice_reference: String,
			gp_source: String,
			found_in_gp: False,
			gp_type: 0,
			gp_status: 0,
			batch_number: String,
			gp_amount: 0,
			is_open: False,
			is_posted: False,
			is_void: False,
			document_date: 0001-01-01,
			posting_date: 0001-01-01
		}
	],
	econnect_logs: 
	[
		{
			id: 0,
			timestamp: 0001-01-01,
			xml: String,
			response: String
		}
	]
}