Trendsic Platform Service

<back to all web services

RfpBriefRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/Rfp/{RfpDocumentUID}/Brief
<?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 RfpLocation implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $City=null,
        /** @var string|null */
        public ?string $State=null,
        /** @var string|null */
        public ?string $Identifier=null
    ) {
    }

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

class RfpSchedule implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $BidDueDate=null,
        /** @var string|null */
        public ?string $EstimatedStartDate=null,
        /** @var string|null */
        public ?string $QuestionsDueDate=null,
        /** @var int|null */
        public ?int $ContractDurationDays=null,
        /** @var string|null */
        public ?string $Notes=null
    ) {
    }

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

class RfpLineItem implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ItemNumber=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var float|null */
        public ?float $Quantity=null,
        /** @var string|null */
        public ?string $Unit=null,
        /** @var string|null */
        public ?string $Category=null,
        /** @var string|null */
        public ?string $SourceReference=null
    ) {
    }

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

class RfpBidConstraint implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Constraint=null,
        /** @var string|null */
        public ?string $Detail=null
    ) {
    }

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

class RfpBrief implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ProjectTitle=null,
        /** @var string|null */
        public ?string $SolicitationNumber=null,
        /** @var string|null */
        public ?string $IssuingOrganization=null,
        /** @var string|null */
        public ?string $ProjectType=null,
        /** @var string|null */
        public ?string $Summary=null,
        /** @var array<RfpLocation>|null */
        public ?array $Locations=null,
        /** @var RfpSchedule|null */
        public ?RfpSchedule $Schedule=null,
        /** @var array<RfpLineItem>|null */
        public ?array $LineItems=null,
        /** @var array<RfpBidConstraint>|null */
        public ?array $BidConstraints=null,
        /** @var array<string>|null */
        public ?array $SpecialRequirements=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ProjectTitle'])) $this->ProjectTitle = $o['ProjectTitle'];
        if (isset($o['SolicitationNumber'])) $this->SolicitationNumber = $o['SolicitationNumber'];
        if (isset($o['IssuingOrganization'])) $this->IssuingOrganization = $o['IssuingOrganization'];
        if (isset($o['ProjectType'])) $this->ProjectType = $o['ProjectType'];
        if (isset($o['Summary'])) $this->Summary = $o['Summary'];
        if (isset($o['Locations'])) $this->Locations = JsonConverters::fromArray('RfpLocation', $o['Locations']);
        if (isset($o['Schedule'])) $this->Schedule = JsonConverters::from('RfpSchedule', $o['Schedule']);
        if (isset($o['LineItems'])) $this->LineItems = JsonConverters::fromArray('RfpLineItem', $o['LineItems']);
        if (isset($o['BidConstraints'])) $this->BidConstraints = JsonConverters::fromArray('RfpBidConstraint', $o['BidConstraints']);
        if (isset($o['SpecialRequirements'])) $this->SpecialRequirements = JsonConverters::fromArray('string', $o['SpecialRequirements']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ProjectTitle)) $o['ProjectTitle'] = $this->ProjectTitle;
        if (isset($this->SolicitationNumber)) $o['SolicitationNumber'] = $this->SolicitationNumber;
        if (isset($this->IssuingOrganization)) $o['IssuingOrganization'] = $this->IssuingOrganization;
        if (isset($this->ProjectType)) $o['ProjectType'] = $this->ProjectType;
        if (isset($this->Summary)) $o['Summary'] = $this->Summary;
        if (isset($this->Locations)) $o['Locations'] = JsonConverters::toArray('RfpLocation', $this->Locations);
        if (isset($this->Schedule)) $o['Schedule'] = JsonConverters::to('RfpSchedule', $this->Schedule);
        if (isset($this->LineItems)) $o['LineItems'] = JsonConverters::toArray('RfpLineItem', $this->LineItems);
        if (isset($this->BidConstraints)) $o['BidConstraints'] = JsonConverters::toArray('RfpBidConstraint', $this->BidConstraints);
        if (isset($this->SpecialRequirements)) $o['SpecialRequirements'] = JsonConverters::toArray('string', $this->SpecialRequirements);
        return empty($o) ? new class(){} : $o;
    }
}

class RfpBriefResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var int */
        public int $RfpDocumentID=0,
        /** @var RfpBrief|null */
        public ?RfpBrief $Brief=null
    ) {
    }

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

class RfpBriefRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $RfpDocumentUID=''
    ) {
    }

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

PHP RfpBriefRequest 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/Rfp/{RfpDocumentUID}/Brief HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RfpBriefResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Brief>
    <BidConstraints>
      <RfpBidConstraint>
        <Constraint>String</Constraint>
        <Detail>String</Detail>
      </RfpBidConstraint>
    </BidConstraints>
    <IssuingOrganization>String</IssuingOrganization>
    <LineItems>
      <RfpLineItem>
        <Category>String</Category>
        <Description>String</Description>
        <ItemNumber>String</ItemNumber>
        <Quantity>0</Quantity>
        <SourceReference>String</SourceReference>
        <Unit>String</Unit>
      </RfpLineItem>
    </LineItems>
    <Locations>
      <RfpLocation>
        <City>String</City>
        <Description>String</Description>
        <Identifier>String</Identifier>
        <State>String</State>
      </RfpLocation>
    </Locations>
    <ProjectTitle>String</ProjectTitle>
    <ProjectType>String</ProjectType>
    <Schedule>
      <BidDueDate>String</BidDueDate>
      <ContractDurationDays>0</ContractDurationDays>
      <EstimatedStartDate>String</EstimatedStartDate>
      <Notes>String</Notes>
      <QuestionsDueDate>String</QuestionsDueDate>
    </Schedule>
    <SolicitationNumber>String</SolicitationNumber>
    <SpecialRequirements xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </SpecialRequirements>
    <Summary>String</Summary>
  </Brief>
  <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>
  <RfpDocumentID>0</RfpDocumentID>
</RfpBriefResponse>