| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Rfp/RateQuotes/{RequestId} |
|---|
<?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 RateQuote implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Tier=null,
/** @var string|null */
public ?string $Confidence=null,
/** @var float|null */
public ?float $Value=null,
/** @var string|null */
public ?string $Unit=null,
/** @var string|null */
public ?string $Provenance=null,
/** @var string|null */
public ?string $Url=null,
/** @var DateTime|null */
public ?DateTime $FetchedAtUtc=null,
/** @var string|null */
public ?string $Vendor=null,
/** @var string|null */
public ?string $Location=null,
/** @var float|null */
public ?float $RateDay=null,
/** @var float|null */
public ?float $RateWeek=null,
/** @var float|null */
public ?float $RateMonth=null,
/** @var float|null */
public ?float $AdjustmentPct=null,
/** @var float|null */
public ?float $ListValue=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $ChipShort=null,
/** @var string|null */
public ?string $Status=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Tier'])) $this->Tier = $o['Tier'];
if (isset($o['Confidence'])) $this->Confidence = $o['Confidence'];
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['Provenance'])) $this->Provenance = $o['Provenance'];
if (isset($o['Url'])) $this->Url = $o['Url'];
if (isset($o['FetchedAtUtc'])) $this->FetchedAtUtc = JsonConverters::from('DateTime', $o['FetchedAtUtc']);
if (isset($o['Vendor'])) $this->Vendor = $o['Vendor'];
if (isset($o['Location'])) $this->Location = $o['Location'];
if (isset($o['RateDay'])) $this->RateDay = $o['RateDay'];
if (isset($o['RateWeek'])) $this->RateWeek = $o['RateWeek'];
if (isset($o['RateMonth'])) $this->RateMonth = $o['RateMonth'];
if (isset($o['AdjustmentPct'])) $this->AdjustmentPct = $o['AdjustmentPct'];
if (isset($o['ListValue'])) $this->ListValue = $o['ListValue'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['ChipShort'])) $this->ChipShort = $o['ChipShort'];
if (isset($o['Status'])) $this->Status = $o['Status'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Tier)) $o['Tier'] = $this->Tier;
if (isset($this->Confidence)) $o['Confidence'] = $this->Confidence;
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->Provenance)) $o['Provenance'] = $this->Provenance;
if (isset($this->Url)) $o['Url'] = $this->Url;
if (isset($this->FetchedAtUtc)) $o['FetchedAtUtc'] = JsonConverters::to('DateTime', $this->FetchedAtUtc);
if (isset($this->Vendor)) $o['Vendor'] = $this->Vendor;
if (isset($this->Location)) $o['Location'] = $this->Location;
if (isset($this->RateDay)) $o['RateDay'] = $this->RateDay;
if (isset($this->RateWeek)) $o['RateWeek'] = $this->RateWeek;
if (isset($this->RateMonth)) $o['RateMonth'] = $this->RateMonth;
if (isset($this->AdjustmentPct)) $o['AdjustmentPct'] = $this->AdjustmentPct;
if (isset($this->ListValue)) $o['ListValue'] = $this->ListValue;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->ChipShort)) $o['ChipShort'] = $this->ChipShort;
if (isset($this->Status)) $o['Status'] = $this->Status;
return empty($o) ? new class(){} : $o;
}
}
class RateQuotePollResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var string|null */
public ?string $Status=null,
/** @var RateQuote|null */
public ?RateQuote $Quote=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Quote'])) $this->Quote = JsonConverters::from('RateQuote', $o['Quote']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Quote)) $o['Quote'] = JsonConverters::to('RateQuote', $this->Quote);
return empty($o) ? new class(){} : $o;
}
}
class RateQuotePollRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $RequestId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RequestId'])) $this->RequestId = $o['RequestId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RequestId)) $o['RequestId'] = $this->RequestId;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Rfp/RateQuotes/{RequestId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Status":"String","Quote":{"Tier":"String","Confidence":"String","Value":0,"Unit":"String","Provenance":"String","Url":"String","FetchedAtUtc":"0001-01-01T00:00:00.0000000","Vendor":"String","Location":"String","RateDay":0,"RateWeek":0,"RateMonth":0,"AdjustmentPct":0,"ListValue":0,"Note":"String","ChipShort":"String","Status":"String"}}