digitaluapi

<back to all web services

OnceOffPaymentRequests

Requires Authentication
Required role:Client
The following routes are available for this service:
POST/onceoffpaymentOnce of Payments
<?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 OnceOffPaymentResponse implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $PublicAccessGuid='',
        /** @var string|null */
        public ?string $InvoiceNumber=null,
        /** @var int */
        public int $StatusCodesId=0,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

class OnceOffPaymentRequests implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=1)
        // @Validate(Validator="NotNull")
        /** @var string */
        public string $Segment='',

        // @DataMember(Order=2)
        // @Validate(Validator="NotNull")
        /** @var string */
        public string $FirstName='',

        // @DataMember(Order=3)
        // @Validate(Validator="NotNull")
        /** @var string */
        public string $LastName='',

        // @DataMember(Order=4)
        /** @var string|null */
        public ?string $Address=null,

        // @DataMember(Order=5)
        /** @var string|null */
        public ?string $City=null,

        // @DataMember(Order=6)
        /** @var string|null */
        public ?string $Region=null,

        // @DataMember(Order=7)
        /** @var string|null */
        public ?string $Suburb=null,

        // @DataMember(Order=8)
        /** @var string|null */
        public ?string $PostalCode=null,

        // @DataMember(Order=9)
        /** @var string|null */
        public ?string $MobileNumber=null,

        // @DataMember(Order=10)
        /** @var string|null */
        public ?string $Email=null,

        // @DataMember(Order=11)
        /** @var string|null */
        public ?string $IdNumber=null,

        // @DataMember(Order=12)
        /** @var string|null */
        public ?string $PassportNumber=null,

        // @DataMember(Order=13)
        // @Validate(Validator="NotNull")
        /** @var string */
        public string $InvoiceNumber='',

        // @DataMember(Order=14)
        /** @var DateTime */
        public DateTime $DebtDate=new DateTime(),

        // @DataMember(Order=15)
        // @Validate(Validator="NotNull")
        /** @var float */
        public float $AmountOutstanding=0.0,

        // @DataMember(Order=16)
        // @Validate(Validator="NotNull")
        /** @var int */
        public int $CurrenciesId=0,

        // @DataMember(Order=17)
        // @Validate(Validator="NotNull")
        /** @var int */
        public int $ChannelsId=0,

        // @DataMember(Order=18)
        /** @var array<string,string>|null */
        public ?array $DebtMeta=null,

        // @DataMember(Order=19)
        /** @var array<string,string>|null */
        public ?array $CustomersMeta=null,

        // @DataMember(Order=20)
        /** @var string|null */
        public ?string $UrlToDocument=null,

        // @DataMember(Order=21)
        /** @var string|null */
        public ?string $CustomerUniqueIdentifier=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Segment'])) $this->Segment = $o['Segment'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['Address'])) $this->Address = $o['Address'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['Region'])) $this->Region = $o['Region'];
        if (isset($o['Suburb'])) $this->Suburb = $o['Suburb'];
        if (isset($o['PostalCode'])) $this->PostalCode = $o['PostalCode'];
        if (isset($o['MobileNumber'])) $this->MobileNumber = $o['MobileNumber'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['IdNumber'])) $this->IdNumber = $o['IdNumber'];
        if (isset($o['PassportNumber'])) $this->PassportNumber = $o['PassportNumber'];
        if (isset($o['InvoiceNumber'])) $this->InvoiceNumber = $o['InvoiceNumber'];
        if (isset($o['DebtDate'])) $this->DebtDate = JsonConverters::from('DateTime', $o['DebtDate']);
        if (isset($o['AmountOutstanding'])) $this->AmountOutstanding = $o['AmountOutstanding'];
        if (isset($o['CurrenciesId'])) $this->CurrenciesId = $o['CurrenciesId'];
        if (isset($o['ChannelsId'])) $this->ChannelsId = $o['ChannelsId'];
        if (isset($o['DebtMeta'])) $this->DebtMeta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['DebtMeta']);
        if (isset($o['CustomersMeta'])) $this->CustomersMeta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['CustomersMeta']);
        if (isset($o['UrlToDocument'])) $this->UrlToDocument = $o['UrlToDocument'];
        if (isset($o['CustomerUniqueIdentifier'])) $this->CustomerUniqueIdentifier = $o['CustomerUniqueIdentifier'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Segment)) $o['Segment'] = $this->Segment;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->Address)) $o['Address'] = $this->Address;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->Region)) $o['Region'] = $this->Region;
        if (isset($this->Suburb)) $o['Suburb'] = $this->Suburb;
        if (isset($this->PostalCode)) $o['PostalCode'] = $this->PostalCode;
        if (isset($this->MobileNumber)) $o['MobileNumber'] = $this->MobileNumber;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->IdNumber)) $o['IdNumber'] = $this->IdNumber;
        if (isset($this->PassportNumber)) $o['PassportNumber'] = $this->PassportNumber;
        if (isset($this->InvoiceNumber)) $o['InvoiceNumber'] = $this->InvoiceNumber;
        if (isset($this->DebtDate)) $o['DebtDate'] = JsonConverters::to('DateTime', $this->DebtDate);
        if (isset($this->AmountOutstanding)) $o['AmountOutstanding'] = $this->AmountOutstanding;
        if (isset($this->CurrenciesId)) $o['CurrenciesId'] = $this->CurrenciesId;
        if (isset($this->ChannelsId)) $o['ChannelsId'] = $this->ChannelsId;
        if (isset($this->DebtMeta)) $o['DebtMeta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->DebtMeta);
        if (isset($this->CustomersMeta)) $o['CustomersMeta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->CustomersMeta);
        if (isset($this->UrlToDocument)) $o['UrlToDocument'] = $this->UrlToDocument;
        if (isset($this->CustomerUniqueIdentifier)) $o['CustomerUniqueIdentifier'] = $this->CustomerUniqueIdentifier;
        return empty($o) ? new class(){} : $o;
    }
}

PHP OnceOffPaymentRequests 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 /onceoffpayment HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<OnceOffPaymentRequests xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <Address>String</Address>
  <AmountOutstanding>0</AmountOutstanding>
  <ChannelsId>0</ChannelsId>
  <City>String</City>
  <CurrenciesId>0</CurrenciesId>
  <CustomerUniqueIdentifier>String</CustomerUniqueIdentifier>
  <CustomersMeta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </CustomersMeta>
  <DebtDate>0001-01-01T00:00:00</DebtDate>
  <DebtMeta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </DebtMeta>
  <Email>String</Email>
  <FirstName>String</FirstName>
  <IdNumber>String</IdNumber>
  <InvoiceNumber>String</InvoiceNumber>
  <LastName>String</LastName>
  <MobileNumber>String</MobileNumber>
  <PassportNumber>String</PassportNumber>
  <PostalCode>String</PostalCode>
  <Region>String</Region>
  <Segment>String</Segment>
  <Suburb>String</Suburb>
  <UrlToDocument>String</UrlToDocument>
</OnceOffPaymentRequests>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<OnceOffPaymentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <InvoiceNumber>String</InvoiceNumber>
  <PublicAccessGuid>00000000-0000-0000-0000-000000000000</PublicAccessGuid>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <StatusCodesId>0</StatusCodesId>
</OnceOffPaymentResponse>