Trendsic Platform Service

<back to all web services

RfpReprocessRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/Rfp/{RfpDocumentUID}/Reprocess
<?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 RfpStatusResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var int */
        public int $RfpDocumentID=0,
        /** @var string|null */
        public ?string $FileName=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $ErrorMessage=null,
        /** @var DateTime */
        public DateTime $CreatedAt=new DateTime(),
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null,
        /** @var string|null */
        public ?string $Stage=null,
        /** @var string|null */
        public ?string $StageLabel=null,
        /** @var int */
        public int $StagePct=0,
        /** @var int */
        public int $ElapsedSeconds=0
    ) {
    }

    /** @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['FileName'])) $this->FileName = $o['FileName'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['ErrorMessage'])) $this->ErrorMessage = $o['ErrorMessage'];
        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['Stage'])) $this->Stage = $o['Stage'];
        if (isset($o['StageLabel'])) $this->StageLabel = $o['StageLabel'];
        if (isset($o['StagePct'])) $this->StagePct = $o['StagePct'];
        if (isset($o['ElapsedSeconds'])) $this->ElapsedSeconds = $o['ElapsedSeconds'];
    }
    
    /** @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->FileName)) $o['FileName'] = $this->FileName;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->ErrorMessage)) $o['ErrorMessage'] = $this->ErrorMessage;
        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->Stage)) $o['Stage'] = $this->Stage;
        if (isset($this->StageLabel)) $o['StageLabel'] = $this->StageLabel;
        if (isset($this->StagePct)) $o['StagePct'] = $this->StagePct;
        if (isset($this->ElapsedSeconds)) $o['ElapsedSeconds'] = $this->ElapsedSeconds;
        return empty($o) ? new class(){} : $o;
    }
}

class RfpReprocessRequest 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 RfpReprocessRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /v1/Rfp/{RfpDocumentUID}/Reprocess HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"RfpDocumentUID":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"RfpDocumentID":0,"FileName":"String","Status":"String","ErrorMessage":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","Stage":"String","StageLabel":"String","StagePct":0,"ElapsedSeconds":0}