Trendsic Platform Service

<back to all web services

FormFillDraftRequest

The following routes are available for this service:
GET/v1/formfill/draft/{Token}
<?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 FormFillDraftResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $AppJson=null,
        /** @var string|null */
        public ?string $TenantName=null,
        /** @var string|null */
        public ?string $Today=null,
        /** @var string|null */
        public ?string $Who=null,
        /** @var string|null */
        public ?string $AnswersJson=null,
        /** @var int */
        public int $Page=0,
        /** @var int */
        public int $Rev=0,
        /** @var string|null */
        public ?string $Lang=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AppJson'])) $this->AppJson = $o['AppJson'];
        if (isset($o['TenantName'])) $this->TenantName = $o['TenantName'];
        if (isset($o['Today'])) $this->Today = $o['Today'];
        if (isset($o['Who'])) $this->Who = $o['Who'];
        if (isset($o['AnswersJson'])) $this->AnswersJson = $o['AnswersJson'];
        if (isset($o['Page'])) $this->Page = $o['Page'];
        if (isset($o['Rev'])) $this->Rev = $o['Rev'];
        if (isset($o['Lang'])) $this->Lang = $o['Lang'];
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AppJson)) $o['AppJson'] = $this->AppJson;
        if (isset($this->TenantName)) $o['TenantName'] = $this->TenantName;
        if (isset($this->Today)) $o['Today'] = $this->Today;
        if (isset($this->Who)) $o['Who'] = $this->Who;
        if (isset($this->AnswersJson)) $o['AnswersJson'] = $this->AnswersJson;
        if (isset($this->Page)) $o['Page'] = $this->Page;
        if (isset($this->Rev)) $o['Rev'] = $this->Rev;
        if (isset($this->Lang)) $o['Lang'] = $this->Lang;
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class FormFillDraftRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Token=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Token'])) $this->Token = $o['Token'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Token)) $o['Token'] = $this->Token;
        return empty($o) ? new class(){} : $o;
    }
}

PHP FormFillDraftRequest DTOs

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

HTTP + OTHER

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

GET /v1/formfill/draft/{Token} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"AppJson":"String","TenantName":"String","Today":"String","Who":"String","AnswersJson":"String","Page":0,"Rev":0,"Lang":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}