| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Addenda |
|---|
<?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 AddendaChange implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $ChangeId=null,
/** @var string|null */
public ?string $ChangeType=null,
/** @var int|null */
public ?int $TargetSeq=null,
/** @var string|null */
public ?string $ItemNumber=null,
/** @var string|null */
public ?string $ItemName=null,
/** @var string|null */
public ?string $Field=null,
/** @var string|null */
public ?string $OldValue=null,
/** @var string|null */
public ?string $NewValue=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $Status=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ChangeId'])) $this->ChangeId = $o['ChangeId'];
if (isset($o['ChangeType'])) $this->ChangeType = $o['ChangeType'];
if (isset($o['TargetSeq'])) $this->TargetSeq = $o['TargetSeq'];
if (isset($o['ItemNumber'])) $this->ItemNumber = $o['ItemNumber'];
if (isset($o['ItemName'])) $this->ItemName = $o['ItemName'];
if (isset($o['Field'])) $this->Field = $o['Field'];
if (isset($o['OldValue'])) $this->OldValue = $o['OldValue'];
if (isset($o['NewValue'])) $this->NewValue = $o['NewValue'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Status'])) $this->Status = $o['Status'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ChangeId)) $o['ChangeId'] = $this->ChangeId;
if (isset($this->ChangeType)) $o['ChangeType'] = $this->ChangeType;
if (isset($this->TargetSeq)) $o['TargetSeq'] = $this->TargetSeq;
if (isset($this->ItemNumber)) $o['ItemNumber'] = $this->ItemNumber;
if (isset($this->ItemName)) $o['ItemName'] = $this->ItemName;
if (isset($this->Field)) $o['Field'] = $this->Field;
if (isset($this->OldValue)) $o['OldValue'] = $this->OldValue;
if (isset($this->NewValue)) $o['NewValue'] = $this->NewValue;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Status)) $o['Status'] = $this->Status;
return empty($o) ? new class(){} : $o;
}
}
class AddendaChangeSet implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $ChangeSetId=null,
/** @var int */
public int $SourceRfpDocumentID=0,
/** @var string|null */
public ?string $SourceFileName=null,
/** @var string|null */
public ?string $DocumentType=null,
/** @var DateTime|null */
public ?DateTime $ExtractedAtUtc=null,
/** @var string|null */
public ?string $Summary=null,
/** @var array<AddendaChange>|null */
public ?array $Changes=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ChangeSetId'])) $this->ChangeSetId = $o['ChangeSetId'];
if (isset($o['SourceRfpDocumentID'])) $this->SourceRfpDocumentID = $o['SourceRfpDocumentID'];
if (isset($o['SourceFileName'])) $this->SourceFileName = $o['SourceFileName'];
if (isset($o['DocumentType'])) $this->DocumentType = $o['DocumentType'];
if (isset($o['ExtractedAtUtc'])) $this->ExtractedAtUtc = JsonConverters::from('DateTime', $o['ExtractedAtUtc']);
if (isset($o['Summary'])) $this->Summary = $o['Summary'];
if (isset($o['Changes'])) $this->Changes = JsonConverters::fromArray('AddendaChange', $o['Changes']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ChangeSetId)) $o['ChangeSetId'] = $this->ChangeSetId;
if (isset($this->SourceRfpDocumentID)) $o['SourceRfpDocumentID'] = $this->SourceRfpDocumentID;
if (isset($this->SourceFileName)) $o['SourceFileName'] = $this->SourceFileName;
if (isset($this->DocumentType)) $o['DocumentType'] = $this->DocumentType;
if (isset($this->ExtractedAtUtc)) $o['ExtractedAtUtc'] = JsonConverters::to('DateTime', $this->ExtractedAtUtc);
if (isset($this->Summary)) $o['Summary'] = $this->Summary;
if (isset($this->Changes)) $o['Changes'] = JsonConverters::toArray('AddendaChange', $this->Changes);
return empty($o) ? new class(){} : $o;
}
}
class WageClassification implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Title=null,
/** @var float|null */
public ?float $BaseRate=null,
/** @var float|null */
public ?float $FringeRate=null,
/** @var string|null */
public ?string $ParishNote=null,
/** @var string|null */
public ?string $SourceLine=null,
/** @var float|null */
public ?float $BenchmarkFringeRate=null,
/** @var string|null */
public ?string $FringeCompareNote=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['BaseRate'])) $this->BaseRate = $o['BaseRate'];
if (isset($o['FringeRate'])) $this->FringeRate = $o['FringeRate'];
if (isset($o['ParishNote'])) $this->ParishNote = $o['ParishNote'];
if (isset($o['SourceLine'])) $this->SourceLine = $o['SourceLine'];
if (isset($o['BenchmarkFringeRate'])) $this->BenchmarkFringeRate = $o['BenchmarkFringeRate'];
if (isset($o['FringeCompareNote'])) $this->FringeCompareNote = $o['FringeCompareNote'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->BaseRate)) $o['BaseRate'] = $this->BaseRate;
if (isset($this->FringeRate)) $o['FringeRate'] = $this->FringeRate;
if (isset($this->ParishNote)) $o['ParishNote'] = $this->ParishNote;
if (isset($this->SourceLine)) $o['SourceLine'] = $this->SourceLine;
if (isset($this->BenchmarkFringeRate)) $o['BenchmarkFringeRate'] = $this->BenchmarkFringeRate;
if (isset($this->FringeCompareNote)) $o['FringeCompareNote'] = $this->FringeCompareNote;
return empty($o) ? new class(){} : $o;
}
}
class WageDeterminationResult implements JsonSerializable
{
public function __construct(
/** @var int */
public int $SourceRfpDocumentID=0,
/** @var string|null */
public ?string $SourceFileName=null,
/** @var string|null */
public ?string $WdNumber=null,
/** @var DateTime|null */
public ?DateTime $ExtractedAtUtc=null,
/** @var array<WageClassification>|null */
public ?array $Classifications=null,
/** @var string|null */
public ?string $Source=null,
/** @var bool|null */
public ?bool $IsTrustworthy=null,
/** @var float|null */
public ?float $ExecutiveOrderFloor=null,
/** @var string|null */
public ?string $PublishedDate=null,
/** @var string|null */
public ?string $ProjectParish=null,
/** @var array<string>|null */
public ?array $Warnings=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SourceRfpDocumentID'])) $this->SourceRfpDocumentID = $o['SourceRfpDocumentID'];
if (isset($o['SourceFileName'])) $this->SourceFileName = $o['SourceFileName'];
if (isset($o['WdNumber'])) $this->WdNumber = $o['WdNumber'];
if (isset($o['ExtractedAtUtc'])) $this->ExtractedAtUtc = JsonConverters::from('DateTime', $o['ExtractedAtUtc']);
if (isset($o['Classifications'])) $this->Classifications = JsonConverters::fromArray('WageClassification', $o['Classifications']);
if (isset($o['Source'])) $this->Source = $o['Source'];
if (isset($o['IsTrustworthy'])) $this->IsTrustworthy = $o['IsTrustworthy'];
if (isset($o['ExecutiveOrderFloor'])) $this->ExecutiveOrderFloor = $o['ExecutiveOrderFloor'];
if (isset($o['PublishedDate'])) $this->PublishedDate = $o['PublishedDate'];
if (isset($o['ProjectParish'])) $this->ProjectParish = $o['ProjectParish'];
if (isset($o['Warnings'])) $this->Warnings = JsonConverters::fromArray('string', $o['Warnings']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SourceRfpDocumentID)) $o['SourceRfpDocumentID'] = $this->SourceRfpDocumentID;
if (isset($this->SourceFileName)) $o['SourceFileName'] = $this->SourceFileName;
if (isset($this->WdNumber)) $o['WdNumber'] = $this->WdNumber;
if (isset($this->ExtractedAtUtc)) $o['ExtractedAtUtc'] = JsonConverters::to('DateTime', $this->ExtractedAtUtc);
if (isset($this->Classifications)) $o['Classifications'] = JsonConverters::toArray('WageClassification', $this->Classifications);
if (isset($this->Source)) $o['Source'] = $this->Source;
if (isset($this->IsTrustworthy)) $o['IsTrustworthy'] = $this->IsTrustworthy;
if (isset($this->ExecutiveOrderFloor)) $o['ExecutiveOrderFloor'] = $this->ExecutiveOrderFloor;
if (isset($this->PublishedDate)) $o['PublishedDate'] = $this->PublishedDate;
if (isset($this->ProjectParish)) $o['ProjectParish'] = $this->ProjectParish;
if (isset($this->Warnings)) $o['Warnings'] = JsonConverters::toArray('string', $this->Warnings);
return empty($o) ? new class(){} : $o;
}
}
class RfpAddendaResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var int */
public int $RfpDocumentID=0,
/** @var array<AddendaChangeSet>|null */
public ?array $Diffs=null,
/** @var array<WageDeterminationResult>|null */
public ?array $WageDeterminations=null,
/** @var string|null */
public ?string $Message=null,
/** @var bool|null */
public ?bool $Reflowed=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['Diffs'])) $this->Diffs = JsonConverters::fromArray('AddendaChangeSet', $o['Diffs']);
if (isset($o['WageDeterminations'])) $this->WageDeterminations = JsonConverters::fromArray('WageDeterminationResult', $o['WageDeterminations']);
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['Reflowed'])) $this->Reflowed = $o['Reflowed'];
}
/** @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->Diffs)) $o['Diffs'] = JsonConverters::toArray('AddendaChangeSet', $this->Diffs);
if (isset($this->WageDeterminations)) $o['WageDeterminations'] = JsonConverters::toArray('WageDeterminationResult', $this->WageDeterminations);
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->Reflowed)) $o['Reflowed'] = $this->Reflowed;
return empty($o) ? new class(){} : $o;
}
}
class RfpAddendaListRequest 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 RfpAddendaListRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Rfp/{RfpDocumentUID}/Addenda HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
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,"Diffs":[{"ChangeSetId":"String","SourceRfpDocumentID":0,"SourceFileName":"String","DocumentType":"String","ExtractedAtUtc":"0001-01-01T00:00:00.0000000","Summary":"String","Changes":[{"ChangeId":"String","ChangeType":"String","TargetSeq":0,"ItemNumber":"String","ItemName":"String","Field":"String","OldValue":"String","NewValue":"String","Description":"String","Status":"String"}]}],"WageDeterminations":[{"SourceRfpDocumentID":0,"SourceFileName":"String","WdNumber":"String","ExtractedAtUtc":"0001-01-01T00:00:00.0000000","Classifications":[{"Title":"String","BaseRate":0,"FringeRate":0,"ParishNote":"String","SourceLine":"String","BenchmarkFringeRate":0,"FringeCompareNote":"String"}],"Source":"String","IsTrustworthy":false,"ExecutiveOrderFloor":0,"PublishedDate":"String","ProjectParish":"String","Warnings":["String"]}],"Message":"String","Reflowed":false}