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

<RfiListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ProjectID>0</ProjectID>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Rfis>
    <Rfi>
      <Answer>String</Answer>
      <AnsweredDate>0001-01-01T00:00:00</AnsweredDate>
      <AskedOf>String</AskedOf>
      <ClosedDate>0001-01-01T00:00:00</ClosedDate>
      <CostImpact>false</CostImpact>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <DaysOpen>0</DaysOpen>
      <Discipline>String</Discipline>
      <DueDate>0001-01-01T00:00:00</DueDate>
      <ProjectID>0</ProjectID>
      <PromotedChangeOrderID>0</PromotedChangeOrderID>
      <Question>String</Question>
      <RfiID>0</RfiID>
      <RfiNo>String</RfiNo>
      <RfiUID>00000000-0000-0000-0000-000000000000</RfiUID>
      <ScheduleImpact>false</ScheduleImpact>
      <Status>String</Status>
      <Subject>String</Subject>
      <SubmittedDate>0001-01-01T00:00:00</SubmittedDate>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    </Rfi>
  </Rfis>
</RfiListResponse>