regis

<back to all web services

FinancePaymentLogRequest

Requires Authentication
Required permission:CreatePayments
The following routes are available for this service:
POST/Finance/Payment/Log
<?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 FinancePaymentResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $paymentUUID=null,
        /** @var string|null */
        public ?string $order_id=null,
        /** @var int */
        public int $external_payment_id=0,
        /** @var DateTime */
        public DateTime $added_date=new DateTime(),
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $uuid=null,
        /** @var float */
        public float $amount=0.0,
        /** @var string|null */
        public ?string $payment_type=null,
        /** @var bool|null */
        public ?bool $is_pushed_to_gl=null,
        /** @var string|null */
        public ?string $current_status=null,
        /** @var DateTime|null */
        public ?DateTime $current_status_date=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['paymentUUID'])) $this->paymentUUID = $o['paymentUUID'];
        if (isset($o['order_id'])) $this->order_id = $o['order_id'];
        if (isset($o['external_payment_id'])) $this->external_payment_id = $o['external_payment_id'];
        if (isset($o['added_date'])) $this->added_date = JsonConverters::from('DateTime', $o['added_date']);
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['amount'])) $this->amount = $o['amount'];
        if (isset($o['payment_type'])) $this->payment_type = $o['payment_type'];
        if (isset($o['is_pushed_to_gl'])) $this->is_pushed_to_gl = $o['is_pushed_to_gl'];
        if (isset($o['current_status'])) $this->current_status = $o['current_status'];
        if (isset($o['current_status_date'])) $this->current_status_date = JsonConverters::from('DateTime', $o['current_status_date']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->paymentUUID)) $o['paymentUUID'] = $this->paymentUUID;
        if (isset($this->order_id)) $o['order_id'] = $this->order_id;
        if (isset($this->external_payment_id)) $o['external_payment_id'] = $this->external_payment_id;
        if (isset($this->added_date)) $o['added_date'] = JsonConverters::to('DateTime', $this->added_date);
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->amount)) $o['amount'] = $this->amount;
        if (isset($this->payment_type)) $o['payment_type'] = $this->payment_type;
        if (isset($this->is_pushed_to_gl)) $o['is_pushed_to_gl'] = $this->is_pushed_to_gl;
        if (isset($this->current_status)) $o['current_status'] = $this->current_status;
        if (isset($this->current_status_date)) $o['current_status_date'] = JsonConverters::to('DateTime', $this->current_status_date);
        return empty($o) ? new class(){} : $o;
    }
}

class FinancePaymentLogRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $process=null,
        /** @var string|null */
        public ?string $action=null,
        /** @var string|null */
        public ?string $note=null,
        /** @var string|null */
        public ?string $message=null,
        /** @var string|null */
        public ?string $order_id=null,
        /** @var int */
        public int $external_payment_id=0,
        /** @var int */
        public int $regent_id=0,
        /** @var float */
        public float $amount=0.0,
        /** @var string|null */
        public ?string $payment_type=null,
        /** @var string|null */
        public ?string $customer_ip=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $email=null,
        /** @var string|null */
        public ?string $phone=null,
        /** @var string|null */
        public ?string $addr1=null,
        /** @var string|null */
        public ?string $addr2=null,
        /** @var string|null */
        public ?string $city=null,
        /** @var string|null */
        public ?string $state=null,
        /** @var string|null */
        public ?string $country=null,
        /** @var string|null */
        public ?string $code=null,
        /** @var string|null */
        public ?string $current_status=null,
        /** @var DateTime|null */
        public ?DateTime $current_status_date=null,
        /** @var bool|null */
        public ?bool $pushed_to_gl=null,
        /** @var DateTime|null */
        public ?DateTime $pushed_to_gl_date=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['process'])) $this->process = $o['process'];
        if (isset($o['action'])) $this->action = $o['action'];
        if (isset($o['note'])) $this->note = $o['note'];
        if (isset($o['message'])) $this->message = $o['message'];
        if (isset($o['order_id'])) $this->order_id = $o['order_id'];
        if (isset($o['external_payment_id'])) $this->external_payment_id = $o['external_payment_id'];
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['amount'])) $this->amount = $o['amount'];
        if (isset($o['payment_type'])) $this->payment_type = $o['payment_type'];
        if (isset($o['customer_ip'])) $this->customer_ip = $o['customer_ip'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['email'])) $this->email = $o['email'];
        if (isset($o['phone'])) $this->phone = $o['phone'];
        if (isset($o['addr1'])) $this->addr1 = $o['addr1'];
        if (isset($o['addr2'])) $this->addr2 = $o['addr2'];
        if (isset($o['city'])) $this->city = $o['city'];
        if (isset($o['state'])) $this->state = $o['state'];
        if (isset($o['country'])) $this->country = $o['country'];
        if (isset($o['code'])) $this->code = $o['code'];
        if (isset($o['current_status'])) $this->current_status = $o['current_status'];
        if (isset($o['current_status_date'])) $this->current_status_date = JsonConverters::from('DateTime', $o['current_status_date']);
        if (isset($o['pushed_to_gl'])) $this->pushed_to_gl = $o['pushed_to_gl'];
        if (isset($o['pushed_to_gl_date'])) $this->pushed_to_gl_date = JsonConverters::from('DateTime', $o['pushed_to_gl_date']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->process)) $o['process'] = $this->process;
        if (isset($this->action)) $o['action'] = $this->action;
        if (isset($this->note)) $o['note'] = $this->note;
        if (isset($this->message)) $o['message'] = $this->message;
        if (isset($this->order_id)) $o['order_id'] = $this->order_id;
        if (isset($this->external_payment_id)) $o['external_payment_id'] = $this->external_payment_id;
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->amount)) $o['amount'] = $this->amount;
        if (isset($this->payment_type)) $o['payment_type'] = $this->payment_type;
        if (isset($this->customer_ip)) $o['customer_ip'] = $this->customer_ip;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->email)) $o['email'] = $this->email;
        if (isset($this->phone)) $o['phone'] = $this->phone;
        if (isset($this->addr1)) $o['addr1'] = $this->addr1;
        if (isset($this->addr2)) $o['addr2'] = $this->addr2;
        if (isset($this->city)) $o['city'] = $this->city;
        if (isset($this->state)) $o['state'] = $this->state;
        if (isset($this->country)) $o['country'] = $this->country;
        if (isset($this->code)) $o['code'] = $this->code;
        if (isset($this->current_status)) $o['current_status'] = $this->current_status;
        if (isset($this->current_status_date)) $o['current_status_date'] = JsonConverters::to('DateTime', $this->current_status_date);
        if (isset($this->pushed_to_gl)) $o['pushed_to_gl'] = $this->pushed_to_gl;
        if (isset($this->pushed_to_gl_date)) $o['pushed_to_gl_date'] = JsonConverters::to('DateTime', $this->pushed_to_gl_date);
        return empty($o) ? new class(){} : $o;
    }
}

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

<FinancePaymentLogRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <action>String</action>
  <addr1>String</addr1>
  <addr2>String</addr2>
  <amount>0</amount>
  <city>String</city>
  <code>String</code>
  <country>String</country>
  <current_status>String</current_status>
  <current_status_date>0001-01-01T00:00:00</current_status_date>
  <customer_ip>String</customer_ip>
  <email>String</email>
  <external_payment_id>0</external_payment_id>
  <message>String</message>
  <name>String</name>
  <note>String</note>
  <order_id>String</order_id>
  <payment_type>String</payment_type>
  <phone>String</phone>
  <process>String</process>
  <pushed_to_gl>false</pushed_to_gl>
  <pushed_to_gl_date>0001-01-01T00:00:00</pushed_to_gl_date>
  <regent_id>0</regent_id>
  <state>String</state>
</FinancePaymentLogRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FinancePaymentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses">
  <added_date>0001-01-01T00:00:00</added_date>
  <amount>0</amount>
  <current_status>String</current_status>
  <current_status_date>0001-01-01T00:00:00</current_status_date>
  <external_payment_id>0</external_payment_id>
  <is_pushed_to_gl>false</is_pushed_to_gl>
  <order_id>String</order_id>
  <paymentUUID>String</paymentUUID>
  <payment_type>String</payment_type>
  <regent_id>0</regent_id>
  <uuid>String</uuid>
</FinancePaymentResponse>