digitaluapi

<back to all web services

CustomersLookup

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
GET/customers
<?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};


// @DataContract
class CustomersLookup implements JsonSerializable
{
    public function __construct(
        // @DataMember(Order=2)
        /** @var int */
        public int $TenantsId=0,

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

        // @DataMember(Order=4)
        /** @var int */
        public int $SegmentsId=0,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TenantsId'])) $this->TenantsId = $o['TenantsId'];
        if (isset($o['UserAuthId'])) $this->UserAuthId = $o['UserAuthId'];
        if (isset($o['SegmentsId'])) $this->SegmentsId = $o['SegmentsId'];
        if (isset($o['CompaniesId'])) $this->CompaniesId = $o['CompaniesId'];
        if (isset($o['CurrenciesId'])) $this->CurrenciesId = $o['CurrenciesId'];
        if (isset($o['Address'])) $this->Address = $o['Address'];
        if (isset($o['Age'])) $this->Age = $o['Age'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['ContactNumber'])) $this->ContactNumber = $o['ContactNumber'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['EthnicGroup'])) $this->EthnicGroup = $o['EthnicGroup'];
        if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
        if (isset($o['Gender'])) $this->Gender = $o['Gender'];
        if (isset($o['HomeLanguage'])) $this->HomeLanguage = $o['HomeLanguage'];
        if (isset($o['IdNumber'])) $this->IdNumber = $o['IdNumber'];
        if (isset($o['LastName'])) $this->LastName = $o['LastName'];
        if (isset($o['PostalCode'])) $this->PostalCode = $o['PostalCode'];
        if (isset($o['Region'])) $this->Region = $o['Region'];
        if (isset($o['Suburb'])) $this->Suburb = $o['Suburb'];
        if (isset($o['UniqueIdentifier'])) $this->UniqueIdentifier = $o['UniqueIdentifier'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TenantsId)) $o['TenantsId'] = $this->TenantsId;
        if (isset($this->UserAuthId)) $o['UserAuthId'] = $this->UserAuthId;
        if (isset($this->SegmentsId)) $o['SegmentsId'] = $this->SegmentsId;
        if (isset($this->CompaniesId)) $o['CompaniesId'] = $this->CompaniesId;
        if (isset($this->CurrenciesId)) $o['CurrenciesId'] = $this->CurrenciesId;
        if (isset($this->Address)) $o['Address'] = $this->Address;
        if (isset($this->Age)) $o['Age'] = $this->Age;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->ContactNumber)) $o['ContactNumber'] = $this->ContactNumber;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->EthnicGroup)) $o['EthnicGroup'] = $this->EthnicGroup;
        if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
        if (isset($this->Gender)) $o['Gender'] = $this->Gender;
        if (isset($this->HomeLanguage)) $o['HomeLanguage'] = $this->HomeLanguage;
        if (isset($this->IdNumber)) $o['IdNumber'] = $this->IdNumber;
        if (isset($this->LastName)) $o['LastName'] = $this->LastName;
        if (isset($this->PostalCode)) $o['PostalCode'] = $this->PostalCode;
        if (isset($this->Region)) $o['Region'] = $this->Region;
        if (isset($this->Suburb)) $o['Suburb'] = $this->Suburb;
        if (isset($this->UniqueIdentifier)) $o['UniqueIdentifier'] = $this->UniqueIdentifier;
        return empty($o) ? new class(){} : $o;
    }
}

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

<ArrayOfCustomersLookupResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <CustomersLookupResponse>
    <Address>String</Address>
    <Age>0</Age>
    <City>String</City>
    <CompaniesId>0</CompaniesId>
    <ContactNumber>String</ContactNumber>
    <CurrenciesId>0</CurrenciesId>
    <Email>String</Email>
    <EthnicGroup>String</EthnicGroup>
    <FirstName>String</FirstName>
    <Gender>String</Gender>
    <HomeLanguage>String</HomeLanguage>
    <IdNumber>String</IdNumber>
    <LastName>String</LastName>
    <PostalCode>String</PostalCode>
    <Region>String</Region>
    <ResponseStatus xmlns:d3p1="http://schemas.servicestack.net/types">
      <d3p1:ErrorCode>String</d3p1:ErrorCode>
      <d3p1:Message>String</d3p1:Message>
      <d3p1:StackTrace>String</d3p1:StackTrace>
      <d3p1:Errors>
        <d3p1:ResponseError>
          <d3p1:ErrorCode>String</d3p1:ErrorCode>
          <d3p1:FieldName>String</d3p1:FieldName>
          <d3p1:Message>String</d3p1:Message>
          <d3p1:Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringstring>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value>String</d6p1:Value>
            </d6p1:KeyValueOfstringstring>
          </d3p1:Meta>
        </d3p1:ResponseError>
      </d3p1:Errors>
      <d3p1:Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:Meta>
    </ResponseStatus>
    <SegmentsId>0</SegmentsId>
    <Suburb>String</Suburb>
    <TenantsId>0</TenantsId>
    <UniqueIdentifier>String</UniqueIdentifier>
    <UserAuthId>0</UserAuthId>
  </CustomersLookupResponse>
</ArrayOfCustomersLookupResponse>