DigiOffice API Services Services

<back to all web services

DocumentClosed

Requires Authentication
<?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 DocumentClosed implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $DocumentID='',
        /** @var bool|null */
        public ?bool $IsEdited=null,
        /** @var bool|null */
        public ?bool $IsWizardStarted=null,
        /** @var bool|null */
        public ?bool $IsCorporateIdentity=null,
        /** @var int|null */
        public ?int $FileSize=null,
        /** @var DateTime */
        public DateTime $FileDateTime=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['DocumentID'])) $this->DocumentID = $o['DocumentID'];
        if (isset($o['IsEdited'])) $this->IsEdited = $o['IsEdited'];
        if (isset($o['IsWizardStarted'])) $this->IsWizardStarted = $o['IsWizardStarted'];
        if (isset($o['IsCorporateIdentity'])) $this->IsCorporateIdentity = $o['IsCorporateIdentity'];
        if (isset($o['FileSize'])) $this->FileSize = $o['FileSize'];
        if (isset($o['FileDateTime'])) $this->FileDateTime = JsonConverters::from('DateTime', $o['FileDateTime']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->DocumentID)) $o['DocumentID'] = $this->DocumentID;
        if (isset($this->IsEdited)) $o['IsEdited'] = $this->IsEdited;
        if (isset($this->IsWizardStarted)) $o['IsWizardStarted'] = $this->IsWizardStarted;
        if (isset($this->IsCorporateIdentity)) $o['IsCorporateIdentity'] = $this->IsCorporateIdentity;
        if (isset($this->FileSize)) $o['FileSize'] = $this->FileSize;
        if (isset($this->FileDateTime)) $o['FileDateTime'] = JsonConverters::to('DateTime', $this->FileDateTime);
        return empty($o) ? new class(){} : $o;
    }
}

PHP DocumentClosed DTOs

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

HTTP + JSV

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

POST /jsv/oneway/DocumentClosed HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	IsEdited: False,
	IsWizardStarted: False,
	IsCorporateIdentity: False,
	FileSize: 0,
	FileDateTime: 0001-01-01
}