DaBRemService

<back to all web services

GetInbox

The following routes are available for this service:
All Verbs/GetInbox
<?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 RemMsgEvidence implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RemMessageEvidenceId=0,
        /** @var int|null */
        public ?int $RemId=null,
        /** @var int|null */
        public ?int $EvidenceTypeId=null,
        /** @var int|null */
        public ?int $EvidenceCodeId=null,
        /** @var string|null */
        public ?string $EvidenceRemSubject=null,
        /** @var string|null */
        public ?string $EvidenceMessageID=null,
        /** @var DateTime|null */
        public ?DateTime $EvidenceDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RemMessageEvidenceId'])) $this->RemMessageEvidenceId = $o['RemMessageEvidenceId'];
        if (isset($o['RemId'])) $this->RemId = $o['RemId'];
        if (isset($o['EvidenceTypeId'])) $this->EvidenceTypeId = $o['EvidenceTypeId'];
        if (isset($o['EvidenceCodeId'])) $this->EvidenceCodeId = $o['EvidenceCodeId'];
        if (isset($o['EvidenceRemSubject'])) $this->EvidenceRemSubject = $o['EvidenceRemSubject'];
        if (isset($o['EvidenceMessageID'])) $this->EvidenceMessageID = $o['EvidenceMessageID'];
        if (isset($o['EvidenceDate'])) $this->EvidenceDate = JsonConverters::from('DateTime', $o['EvidenceDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RemMessageEvidenceId)) $o['RemMessageEvidenceId'] = $this->RemMessageEvidenceId;
        if (isset($this->RemId)) $o['RemId'] = $this->RemId;
        if (isset($this->EvidenceTypeId)) $o['EvidenceTypeId'] = $this->EvidenceTypeId;
        if (isset($this->EvidenceCodeId)) $o['EvidenceCodeId'] = $this->EvidenceCodeId;
        if (isset($this->EvidenceRemSubject)) $o['EvidenceRemSubject'] = $this->EvidenceRemSubject;
        if (isset($this->EvidenceMessageID)) $o['EvidenceMessageID'] = $this->EvidenceMessageID;
        if (isset($this->EvidenceDate)) $o['EvidenceDate'] = JsonConverters::to('DateTime', $this->EvidenceDate);
        return empty($o) ? new class(){} : $o;
    }
}

class RemMsgDelivery implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RemDeliveryId=0,
        /** @var int */
        public int $RemId=0,
        /** @var string|null */
        public ?string $AddressType=null,
        /** @var string|null */
        public ?string $RemDisplayName=null,
        /** @var string|null */
        public ?string $RemAddress=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var int|null */
        public ?int $RemSPId=null,
        /** @var int */
        public int $SystemAcceptance=0,
        /** @var DateTime|null */
        public ?DateTime $SystemAcceptanceDate=null,
        /** @var int */
        public int $RecipientAcceptance=0,
        /** @var DateTime|null */
        public ?DateTime $RecipientAcceptanceDate=null,
        /** @var int */
        public int $Delivered=0,
        /** @var DateTime|null */
        public ?DateTime $DeliveredDate=null,
        /** @var int */
        public int $Read=0,
        /** @var DateTime|null */
        public ?DateTime $ReadDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RemDeliveryId'])) $this->RemDeliveryId = $o['RemDeliveryId'];
        if (isset($o['RemId'])) $this->RemId = $o['RemId'];
        if (isset($o['AddressType'])) $this->AddressType = $o['AddressType'];
        if (isset($o['RemDisplayName'])) $this->RemDisplayName = $o['RemDisplayName'];
        if (isset($o['RemAddress'])) $this->RemAddress = $o['RemAddress'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['RemSPId'])) $this->RemSPId = $o['RemSPId'];
        if (isset($o['SystemAcceptance'])) $this->SystemAcceptance = $o['SystemAcceptance'];
        if (isset($o['SystemAcceptanceDate'])) $this->SystemAcceptanceDate = JsonConverters::from('DateTime', $o['SystemAcceptanceDate']);
        if (isset($o['RecipientAcceptance'])) $this->RecipientAcceptance = $o['RecipientAcceptance'];
        if (isset($o['RecipientAcceptanceDate'])) $this->RecipientAcceptanceDate = JsonConverters::from('DateTime', $o['RecipientAcceptanceDate']);
        if (isset($o['Delivered'])) $this->Delivered = $o['Delivered'];
        if (isset($o['DeliveredDate'])) $this->DeliveredDate = JsonConverters::from('DateTime', $o['DeliveredDate']);
        if (isset($o['Read'])) $this->Read = $o['Read'];
        if (isset($o['ReadDate'])) $this->ReadDate = JsonConverters::from('DateTime', $o['ReadDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RemDeliveryId)) $o['RemDeliveryId'] = $this->RemDeliveryId;
        if (isset($this->RemId)) $o['RemId'] = $this->RemId;
        if (isset($this->AddressType)) $o['AddressType'] = $this->AddressType;
        if (isset($this->RemDisplayName)) $o['RemDisplayName'] = $this->RemDisplayName;
        if (isset($this->RemAddress)) $o['RemAddress'] = $this->RemAddress;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->RemSPId)) $o['RemSPId'] = $this->RemSPId;
        if (isset($this->SystemAcceptance)) $o['SystemAcceptance'] = $this->SystemAcceptance;
        if (isset($this->SystemAcceptanceDate)) $o['SystemAcceptanceDate'] = JsonConverters::to('DateTime', $this->SystemAcceptanceDate);
        if (isset($this->RecipientAcceptance)) $o['RecipientAcceptance'] = $this->RecipientAcceptance;
        if (isset($this->RecipientAcceptanceDate)) $o['RecipientAcceptanceDate'] = JsonConverters::to('DateTime', $this->RecipientAcceptanceDate);
        if (isset($this->Delivered)) $o['Delivered'] = $this->Delivered;
        if (isset($this->DeliveredDate)) $o['DeliveredDate'] = JsonConverters::to('DateTime', $this->DeliveredDate);
        if (isset($this->Read)) $o['Read'] = $this->Read;
        if (isset($this->ReadDate)) $o['ReadDate'] = JsonConverters::to('DateTime', $this->ReadDate);
        return empty($o) ? new class(){} : $o;
    }
}

class ViewedRemMessage implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $kepId=0,
        /** @var string|null */
        public ?string $kepCC=null,
        /** @var string|null */
        public ?string $kepEventCode=null,
        /** @var string|null */
        public ?string $kepEvidenceType=null,
        /** @var string|null */
        public ?string $kepFrom=null,
        /** @var string|null */
        public ?string $kepIleti=null,
        /** @var string|null */
        public ?string $kepMessageID=null,
        /** @var string|null */
        public ?string $kepMsgType=null,
        /** @var DateTime */
        public DateTime $kepReceivedDate=new DateTime(),
        /** @var bool|null */
        public ?bool $kepReceivedDateSpecified=null,
        /** @var DateTime */
        public DateTime $kepSendDate=new DateTime(),
        /** @var bool|null */
        public ?bool $kepSendDateSpecified=null,
        /** @var string|null */
        public ?string $kepSubject=null,
        /** @var string|null */
        public ?string $kepTo=null,
        /** @var string|null */
        public ?string $kepTRgunSayac=null,
        /** @var string|null */
        public ?string $kepTRIletiID=null,
        /** @var string|null */
        public ?string $kepTRIletiTip=null,
        /** @var string|null */
        public ?string $kepUAMessageIdentifier=null,
        /** @var string|null */
        public ?string $status=null,
        /** @var array<RemMsgEvidence>|null */
        public ?array $kepDelilListesi=null,
        /** @var array<RemMsgDelivery>|null */
        public ?array $kepTeslimalListesi=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['kepId'])) $this->kepId = $o['kepId'];
        if (isset($o['kepCC'])) $this->kepCC = $o['kepCC'];
        if (isset($o['kepEventCode'])) $this->kepEventCode = $o['kepEventCode'];
        if (isset($o['kepEvidenceType'])) $this->kepEvidenceType = $o['kepEvidenceType'];
        if (isset($o['kepFrom'])) $this->kepFrom = $o['kepFrom'];
        if (isset($o['kepIleti'])) $this->kepIleti = $o['kepIleti'];
        if (isset($o['kepMessageID'])) $this->kepMessageID = $o['kepMessageID'];
        if (isset($o['kepMsgType'])) $this->kepMsgType = $o['kepMsgType'];
        if (isset($o['kepReceivedDate'])) $this->kepReceivedDate = JsonConverters::from('DateTime', $o['kepReceivedDate']);
        if (isset($o['kepReceivedDateSpecified'])) $this->kepReceivedDateSpecified = $o['kepReceivedDateSpecified'];
        if (isset($o['kepSendDate'])) $this->kepSendDate = JsonConverters::from('DateTime', $o['kepSendDate']);
        if (isset($o['kepSendDateSpecified'])) $this->kepSendDateSpecified = $o['kepSendDateSpecified'];
        if (isset($o['kepSubject'])) $this->kepSubject = $o['kepSubject'];
        if (isset($o['kepTo'])) $this->kepTo = $o['kepTo'];
        if (isset($o['kepTRgunSayac'])) $this->kepTRgunSayac = $o['kepTRgunSayac'];
        if (isset($o['kepTRIletiID'])) $this->kepTRIletiID = $o['kepTRIletiID'];
        if (isset($o['kepTRIletiTip'])) $this->kepTRIletiTip = $o['kepTRIletiTip'];
        if (isset($o['kepUAMessageIdentifier'])) $this->kepUAMessageIdentifier = $o['kepUAMessageIdentifier'];
        if (isset($o['status'])) $this->status = $o['status'];
        if (isset($o['kepDelilListesi'])) $this->kepDelilListesi = JsonConverters::fromArray('RemMsgEvidence', $o['kepDelilListesi']);
        if (isset($o['kepTeslimalListesi'])) $this->kepTeslimalListesi = JsonConverters::fromArray('RemMsgDelivery', $o['kepTeslimalListesi']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->kepId)) $o['kepId'] = $this->kepId;
        if (isset($this->kepCC)) $o['kepCC'] = $this->kepCC;
        if (isset($this->kepEventCode)) $o['kepEventCode'] = $this->kepEventCode;
        if (isset($this->kepEvidenceType)) $o['kepEvidenceType'] = $this->kepEvidenceType;
        if (isset($this->kepFrom)) $o['kepFrom'] = $this->kepFrom;
        if (isset($this->kepIleti)) $o['kepIleti'] = $this->kepIleti;
        if (isset($this->kepMessageID)) $o['kepMessageID'] = $this->kepMessageID;
        if (isset($this->kepMsgType)) $o['kepMsgType'] = $this->kepMsgType;
        if (isset($this->kepReceivedDate)) $o['kepReceivedDate'] = JsonConverters::to('DateTime', $this->kepReceivedDate);
        if (isset($this->kepReceivedDateSpecified)) $o['kepReceivedDateSpecified'] = $this->kepReceivedDateSpecified;
        if (isset($this->kepSendDate)) $o['kepSendDate'] = JsonConverters::to('DateTime', $this->kepSendDate);
        if (isset($this->kepSendDateSpecified)) $o['kepSendDateSpecified'] = $this->kepSendDateSpecified;
        if (isset($this->kepSubject)) $o['kepSubject'] = $this->kepSubject;
        if (isset($this->kepTo)) $o['kepTo'] = $this->kepTo;
        if (isset($this->kepTRgunSayac)) $o['kepTRgunSayac'] = $this->kepTRgunSayac;
        if (isset($this->kepTRIletiID)) $o['kepTRIletiID'] = $this->kepTRIletiID;
        if (isset($this->kepTRIletiTip)) $o['kepTRIletiTip'] = $this->kepTRIletiTip;
        if (isset($this->kepUAMessageIdentifier)) $o['kepUAMessageIdentifier'] = $this->kepUAMessageIdentifier;
        if (isset($this->status)) $o['status'] = $this->status;
        if (isset($this->kepDelilListesi)) $o['kepDelilListesi'] = JsonConverters::toArray('RemMsgEvidence', $this->kepDelilListesi);
        if (isset($this->kepTeslimalListesi)) $o['kepTeslimalListesi'] = JsonConverters::toArray('RemMsgDelivery', $this->kepTeslimalListesi);
        return empty($o) ? new class(){} : $o;
    }
}

class GetInboxResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<ViewedRemMessage>|null */
        public ?array $Result=null,
        /** @var bool|null */
        public ?bool $ServiceSuccessResult=null,
        /** @var string|null */
        public ?string $ErrorMesage=null
    ) {
    }

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

class GetInbox implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $AuthorizationID=null,
        /** @var string|null */
        public ?string $ClientKey=null,
        /** @var int */
        public int $RemAdressID=0,
        /** @var int */
        public int $LastRemID=0,
        /** @var DateTime */
        public DateTime $DateBegin=new DateTime(),
        /** @var DateTime */
        public DateTime $DateEnd=new DateTime(),
        /** @var int|null */
        public ?int $CurrentRemID=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AuthorizationID'])) $this->AuthorizationID = $o['AuthorizationID'];
        if (isset($o['ClientKey'])) $this->ClientKey = $o['ClientKey'];
        if (isset($o['RemAdressID'])) $this->RemAdressID = $o['RemAdressID'];
        if (isset($o['LastRemID'])) $this->LastRemID = $o['LastRemID'];
        if (isset($o['DateBegin'])) $this->DateBegin = JsonConverters::from('DateTime', $o['DateBegin']);
        if (isset($o['DateEnd'])) $this->DateEnd = JsonConverters::from('DateTime', $o['DateEnd']);
        if (isset($o['CurrentRemID'])) $this->CurrentRemID = $o['CurrentRemID'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AuthorizationID)) $o['AuthorizationID'] = $this->AuthorizationID;
        if (isset($this->ClientKey)) $o['ClientKey'] = $this->ClientKey;
        if (isset($this->RemAdressID)) $o['RemAdressID'] = $this->RemAdressID;
        if (isset($this->LastRemID)) $o['LastRemID'] = $this->LastRemID;
        if (isset($this->DateBegin)) $o['DateBegin'] = JsonConverters::to('DateTime', $this->DateBegin);
        if (isset($this->DateEnd)) $o['DateEnd'] = JsonConverters::to('DateTime', $this->DateEnd);
        if (isset($this->CurrentRemID)) $o['CurrentRemID'] = $this->CurrentRemID;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetInbox 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 /GetInbox HTTP/1.1 
Host: remservices.eyyubiye.bel.tr 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetInbox xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DaBRemServices.ServiceModel">
  <AuthorizationID>String</AuthorizationID>
  <ClientKey>String</ClientKey>
  <CurrentRemID>0</CurrentRemID>
  <DateBegin>0001-01-01T00:00:00</DateBegin>
  <DateEnd>0001-01-01T00:00:00</DateEnd>
  <LastRemID>0</LastRemID>
  <RemAdressID>0</RemAdressID>
</GetInbox>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetInboxResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DaBRemServices.ServiceModel">
  <ErrorMesage>String</ErrorMesage>
  <Result>
    <ViewedRemMessage>
      <kepCC>String</kepCC>
      <kepDelilListesi>
        <RemMsgEvidence>
          <EvidenceCodeId>0</EvidenceCodeId>
          <EvidenceDate>0001-01-01T00:00:00</EvidenceDate>
          <EvidenceMessageID>String</EvidenceMessageID>
          <EvidenceRemSubject>String</EvidenceRemSubject>
          <EvidenceTypeId>0</EvidenceTypeId>
          <RemId>0</RemId>
          <RemMessageEvidenceId>0</RemMessageEvidenceId>
        </RemMsgEvidence>
      </kepDelilListesi>
      <kepEventCode>String</kepEventCode>
      <kepEvidenceType>String</kepEvidenceType>
      <kepFrom>String</kepFrom>
      <kepId>0</kepId>
      <kepIleti>String</kepIleti>
      <kepMessageID>String</kepMessageID>
      <kepMsgType>String</kepMsgType>
      <kepReceivedDate>0001-01-01T00:00:00</kepReceivedDate>
      <kepReceivedDateSpecified>false</kepReceivedDateSpecified>
      <kepSendDate>0001-01-01T00:00:00</kepSendDate>
      <kepSendDateSpecified>false</kepSendDateSpecified>
      <kepSubject>String</kepSubject>
      <kepTRIletiID>String</kepTRIletiID>
      <kepTRIletiTip>String</kepTRIletiTip>
      <kepTRgunSayac>String</kepTRgunSayac>
      <kepTeslimalListesi>
        <RemMsgDelivery>
          <AddressType>String</AddressType>
          <Delivered>0</Delivered>
          <DeliveredDate>0001-01-01T00:00:00</DeliveredDate>
          <Read>0</Read>
          <ReadDate>0001-01-01T00:00:00</ReadDate>
          <RecipientAcceptance>0</RecipientAcceptance>
          <RecipientAcceptanceDate>0001-01-01T00:00:00</RecipientAcceptanceDate>
          <RemAddress>String</RemAddress>
          <RemDeliveryId>0</RemDeliveryId>
          <RemDisplayName>String</RemDisplayName>
          <RemId>0</RemId>
          <RemSPId>0</RemSPId>
          <Status>String</Status>
          <SystemAcceptance>0</SystemAcceptance>
          <SystemAcceptanceDate>0001-01-01T00:00:00</SystemAcceptanceDate>
        </RemMsgDelivery>
      </kepTeslimalListesi>
      <kepTo>String</kepTo>
      <kepUAMessageIdentifier>String</kepUAMessageIdentifier>
      <status>String</status>
    </ViewedRemMessage>
  </Result>
  <ServiceSuccessResult>false</ServiceSuccessResult>
</GetInboxResponse>