regis

<back to all web services

BeanstreamInteracPaymentRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Beanstream/Payment/{uuid}/Interac/Create
<?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 BeanstreamInteracRedirectResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $redirect_form=null
    ) {
    }

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

class BeanstreamInteracPaymentRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null,
        /** @var string|null */
        public ?string $department=null,
        /** @var string|null */
        public ?string $item=null,
        /** @var float */
        public float $amount=0.0,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $customer_ip=null,
        /** @var string|null */
        public ?string $email=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 $phone=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['department'])) $this->department = $o['department'];
        if (isset($o['item'])) $this->item = $o['item'];
        if (isset($o['amount'])) $this->amount = $o['amount'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['customer_ip'])) $this->customer_ip = $o['customer_ip'];
        if (isset($o['email'])) $this->email = $o['email'];
        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['phone'])) $this->phone = $o['phone'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->department)) $o['department'] = $this->department;
        if (isset($this->item)) $o['item'] = $this->item;
        if (isset($this->amount)) $o['amount'] = $this->amount;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->customer_ip)) $o['customer_ip'] = $this->customer_ip;
        if (isset($this->email)) $o['email'] = $this->email;
        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->phone)) $o['phone'] = $this->phone;
        return empty($o) ? new class(){} : $o;
    }
}

PHP BeanstreamInteracPaymentRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Beanstream/Payment/{uuid}/Interac/Create HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"uuid":"String","department":"String","item":"String","amount":0,"name":"String","customer_ip":"String","email":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","code":"String","phone":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"redirect_form":"String"}