Trendsic Platform Service

<back to all web services

RfiListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/rfis
<?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 Rfi implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RfiID=0,
        /** @var string */
        public string $RfiUID='',
        /** @var int */
        public int $ProjectID=0,
        /** @var string|null */
        public ?string $RfiNo=null,
        /** @var string|null */
        public ?string $Subject=null,
        /** @var string|null */
        public ?string $Question=null,
        /** @var string|null */
        public ?string $Answer=null,
        /** @var string|null */
        public ?string $Discipline=null,
        /** @var string|null */
        public ?string $AskedOf=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var bool|null */
        public ?bool $CostImpact=null,
        /** @var bool|null */
        public ?bool $ScheduleImpact=null,
        /** @var DateTime|null */
        public ?DateTime $SubmittedDate=null,
        /** @var DateTime|null */
        public ?DateTime $DueDate=null,
        /** @var DateTime|null */
        public ?DateTime $AnsweredDate=null,
        /** @var DateTime|null */
        public ?DateTime $ClosedDate=null,
        /** @var int|null */
        public ?int $PromotedChangeOrderID=null,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null,
        /** @var int */
        public int $DaysOpen=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RfiID'])) $this->RfiID = $o['RfiID'];
        if (isset($o['RfiUID'])) $this->RfiUID = $o['RfiUID'];
        if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
        if (isset($o['RfiNo'])) $this->RfiNo = $o['RfiNo'];
        if (isset($o['Subject'])) $this->Subject = $o['Subject'];
        if (isset($o['Question'])) $this->Question = $o['Question'];
        if (isset($o['Answer'])) $this->Answer = $o['Answer'];
        if (isset($o['Discipline'])) $this->Discipline = $o['Discipline'];
        if (isset($o['AskedOf'])) $this->AskedOf = $o['AskedOf'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['CostImpact'])) $this->CostImpact = $o['CostImpact'];
        if (isset($o['ScheduleImpact'])) $this->ScheduleImpact = $o['ScheduleImpact'];
        if (isset($o['SubmittedDate'])) $this->SubmittedDate = JsonConverters::from('DateTime', $o['SubmittedDate']);
        if (isset($o['DueDate'])) $this->DueDate = JsonConverters::from('DateTime', $o['DueDate']);
        if (isset($o['AnsweredDate'])) $this->AnsweredDate = JsonConverters::from('DateTime', $o['AnsweredDate']);
        if (isset($o['ClosedDate'])) $this->ClosedDate = JsonConverters::from('DateTime', $o['ClosedDate']);
        if (isset($o['PromotedChangeOrderID'])) $this->PromotedChangeOrderID = $o['PromotedChangeOrderID'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
        if (isset($o['DaysOpen'])) $this->DaysOpen = $o['DaysOpen'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RfiID)) $o['RfiID'] = $this->RfiID;
        if (isset($this->RfiUID)) $o['RfiUID'] = $this->RfiUID;
        if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
        if (isset($this->RfiNo)) $o['RfiNo'] = $this->RfiNo;
        if (isset($this->Subject)) $o['Subject'] = $this->Subject;
        if (isset($this->Question)) $o['Question'] = $this->Question;
        if (isset($this->Answer)) $o['Answer'] = $this->Answer;
        if (isset($this->Discipline)) $o['Discipline'] = $this->Discipline;
        if (isset($this->AskedOf)) $o['AskedOf'] = $this->AskedOf;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->CostImpact)) $o['CostImpact'] = $this->CostImpact;
        if (isset($this->ScheduleImpact)) $o['ScheduleImpact'] = $this->ScheduleImpact;
        if (isset($this->SubmittedDate)) $o['SubmittedDate'] = JsonConverters::to('DateTime', $this->SubmittedDate);
        if (isset($this->DueDate)) $o['DueDate'] = JsonConverters::to('DateTime', $this->DueDate);
        if (isset($this->AnsweredDate)) $o['AnsweredDate'] = JsonConverters::to('DateTime', $this->AnsweredDate);
        if (isset($this->ClosedDate)) $o['ClosedDate'] = JsonConverters::to('DateTime', $this->ClosedDate);
        if (isset($this->PromotedChangeOrderID)) $o['PromotedChangeOrderID'] = $this->PromotedChangeOrderID;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
        if (isset($this->DaysOpen)) $o['DaysOpen'] = $this->DaysOpen;
        return empty($o) ? new class(){} : $o;
    }
}

class RfiListResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var int */
        public int $ProjectID=0,
        /** @var array<Rfi>|null */
        public ?array $Rfis=null
    ) {
    }

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

class RfiListRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectID=0
    ) {
    }

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

PHP RfiListRequest 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/projects/{ProjectID}/rfis HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ProjectID":0,"Rfis":[{"RfiID":0,"RfiUID":"00000000000000000000000000000000","ProjectID":0,"RfiNo":"String","Subject":"String","Question":"String","Answer":"String","Discipline":"String","AskedOf":"String","Status":"String","CostImpact":false,"ScheduleImpact":false,"SubmittedDate":"0001-01-01T00:00:00.0000000","DueDate":"0001-01-01T00:00:00.0000000","AnsweredDate":"0001-01-01T00:00:00.0000000","ClosedDate":"0001-01-01T00:00:00.0000000","PromotedChangeOrderID":0,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","DaysOpen":0}]}