digitaluapi

<back to all web services

CampaignActionPaymentDetailsRequest

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
GET/campaign/responses/payment/{PublicAccessGuid}/Campaign Action Payment Detail Responses
<?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 CampaignActionPaymentResponsesDetailView implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=1)
        /** @var int|null */
        public ?int $Id=null,

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

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

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

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

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

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

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

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

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

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

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

        // @DataMember(Order=13)
        /** @var int|null */
        public ?int $CampaignActionsId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['UniqueIdentifier'])) $this->UniqueIdentifier = $o['UniqueIdentifier'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['ContactNumber'])) $this->ContactNumber = $o['ContactNumber'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['InvoiceNumber'])) $this->InvoiceNumber = $o['InvoiceNumber'];
        if (isset($o['AmountOutstanding'])) $this->AmountOutstanding = $o['AmountOutstanding'];
        if (isset($o['AmountPaid'])) $this->AmountPaid = $o['AmountPaid'];
        if (isset($o['RequestDate'])) $this->RequestDate = JsonConverters::from('DateTimeOffset', $o['RequestDate']);
        if (isset($o['StatusCodesDescription'])) $this->StatusCodesDescription = $o['StatusCodesDescription'];
        if (isset($o['StatusCodesId'])) $this->StatusCodesId = $o['StatusCodesId'];
        if (isset($o['CampaignActionsId'])) $this->CampaignActionsId = $o['CampaignActionsId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->UniqueIdentifier)) $o['UniqueIdentifier'] = $this->UniqueIdentifier;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->ContactNumber)) $o['ContactNumber'] = $this->ContactNumber;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->InvoiceNumber)) $o['InvoiceNumber'] = $this->InvoiceNumber;
        if (isset($this->AmountOutstanding)) $o['AmountOutstanding'] = $this->AmountOutstanding;
        if (isset($this->AmountPaid)) $o['AmountPaid'] = $this->AmountPaid;
        if (isset($this->RequestDate)) $o['RequestDate'] = JsonConverters::to('DateTimeOffset', $this->RequestDate);
        if (isset($this->StatusCodesDescription)) $o['StatusCodesDescription'] = $this->StatusCodesDescription;
        if (isset($this->StatusCodesId)) $o['StatusCodesId'] = $this->StatusCodesId;
        if (isset($this->CampaignActionsId)) $o['CampaignActionsId'] = $this->CampaignActionsId;
        return empty($o) ? new class(){} : $o;
    }
}

class CampaignActionPaymentDetailsResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<CampaignActionPaymentResponsesDetailView>|null */
        public ?array $campaignActionInboxResponsesDetailViews=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

class CampaignActionPaymentDetailsRequest implements JsonSerializable
{
    public function __construct(
        // @Validate(Validator="NotNull")
        /** @var string */
        public string $PublicAccessGuid='',

        // @Validate(Validator="NotNull")
        /** @var int */
        public int $CampaignActionsId=0,

        /** @var int */
        public int $PageNumber=0,
        /** @var int */
        public int $PageSize=0,
        /** @var string|null */
        public ?string $UniqueIdentifier=null,
        /** @var string|null */
        public ?string $FirstName=null,
        /** @var string|null */
        public ?string $LastName=null,
        /** @var string|null */
        public ?string $ContactNumber=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var int|null */
        public ?int $StatusCodesId=null,
        /** @var string|null */
        public ?string $InvoiceNumber=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['PublicAccessGuid'])) $this->PublicAccessGuid = $o['PublicAccessGuid'];
        if (isset($o['CampaignActionsId'])) $this->CampaignActionsId = $o['CampaignActionsId'];
        if (isset($o['PageNumber'])) $this->PageNumber = $o['PageNumber'];
        if (isset($o['PageSize'])) $this->PageSize = $o['PageSize'];
        if (isset($o['UniqueIdentifier'])) $this->UniqueIdentifier = $o['UniqueIdentifier'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['ContactNumber'])) $this->ContactNumber = $o['ContactNumber'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['StatusCodesId'])) $this->StatusCodesId = $o['StatusCodesId'];
        if (isset($o['InvoiceNumber'])) $this->InvoiceNumber = $o['InvoiceNumber'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->PublicAccessGuid)) $o['PublicAccessGuid'] = $this->PublicAccessGuid;
        if (isset($this->CampaignActionsId)) $o['CampaignActionsId'] = $this->CampaignActionsId;
        if (isset($this->PageNumber)) $o['PageNumber'] = $this->PageNumber;
        if (isset($this->PageSize)) $o['PageSize'] = $this->PageSize;
        if (isset($this->UniqueIdentifier)) $o['UniqueIdentifier'] = $this->UniqueIdentifier;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->ContactNumber)) $o['ContactNumber'] = $this->ContactNumber;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->StatusCodesId)) $o['StatusCodesId'] = $this->StatusCodesId;
        if (isset($this->InvoiceNumber)) $o['InvoiceNumber'] = $this->InvoiceNumber;
        return empty($o) ? new class(){} : $o;
    }
}

PHP CampaignActionPaymentDetailsRequest 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.

GET /campaign/responses/payment/{PublicAccessGuid}/ HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CampaignActionPaymentDetailsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <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>
  <campaignActionInboxResponsesDetailViews xmlns:d2p1="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel.Types">
    <d2p1:CampaignActionPaymentResponsesDetailView>
      <d2p1:AmountOutstanding>0</d2p1:AmountOutstanding>
      <d2p1:AmountPaid>0</d2p1:AmountPaid>
      <d2p1:CampaignActionsId>0</d2p1:CampaignActionsId>
      <d2p1:ContactNumber>String</d2p1:ContactNumber>
      <d2p1:Email>String</d2p1:Email>
      <d2p1:FirstName>String</d2p1:FirstName>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:InvoiceNumber>String</d2p1:InvoiceNumber>
      <d2p1:LastName>String</d2p1:LastName>
      <d2p1:RequestDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </d2p1:RequestDate>
      <d2p1:StatusCodesDescription>String</d2p1:StatusCodesDescription>
      <d2p1:StatusCodesId>0</d2p1:StatusCodesId>
      <d2p1:UniqueIdentifier>String</d2p1:UniqueIdentifier>
    </d2p1:CampaignActionPaymentResponsesDetailView>
  </campaignActionInboxResponsesDetailViews>
</CampaignActionPaymentDetailsResponse>