| Required role: | REGISUserRole |
| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<InvoiceDynamicsAuditLogsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<authorizing_uuid>String</authorizing_uuid>
<document_number>String</document_number>
<invoice_id>0</invoice_id>
</InvoiceDynamicsAuditLogsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<InvoiceDynamicsAuditResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses">
<description>String</description>
<dynamics_status>String</dynamics_status>
<dynamics_transactions>
<InvoiceDynamicsTransactionResponse>
<action>String</action>
<batch_number>String</batch_number>
<customer_number>String</customer_number>
<document_date>0001-01-01T00:00:00</document_date>
<document_number>String</document_number>
<dynamics_log_id>0</dynamics_log_id>
<found_in_gp>false</found_in_gp>
<gp_amount>0</gp_amount>
<gp_source>String</gp_source>
<gp_status>0</gp_status>
<gp_type>0</gp_type>
<is_open>false</is_open>
<is_posted>false</is_posted>
<is_void>false</is_void>
<logged_amount>0</logged_amount>
<logged_at>0001-01-01T00:00:00</logged_at>
<note>String</note>
<posting_date>0001-01-01T00:00:00</posting_date>
<regis_invoice_reference>String</regis_invoice_reference>
</InvoiceDynamicsTransactionResponse>
</dynamics_transactions>
<econnect_logs>
<InvoiceEconnectLogResponse>
<id>0</id>
<response>String</response>
<timestamp>0001-01-01T00:00:00</timestamp>
<xml>String</xml>
</InvoiceEconnectLogResponse>
</econnect_logs>
<has_regis_invoice>false</has_regis_invoice>
<initiator_name>String</initiator_name>
<invoice_date>0001-01-01T00:00:00</invoice_date>
<invoice_id>0</invoice_id>
<invoice_status>String</invoice_status>
<invoice_uuid>String</invoice_uuid>
<reconciliation_type>String</reconciliation_type>
<regent_id>0</regent_id>
<reporting_term>String</reporting_term>
<student_name>String</student_name>
<student_uuid>String</student_uuid>
<total_charges>0</total_charges>
<total_credits>0</total_credits>
</InvoiceDynamicsAuditResponse>