| 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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RateQuotePollResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Quote>
<AdjustmentPct>0</AdjustmentPct>
<ChipShort>String</ChipShort>
<Confidence>String</Confidence>
<FetchedAtUtc>0001-01-01T00:00:00</FetchedAtUtc>
<ListValue>0</ListValue>
<Location>String</Location>
<Note>String</Note>
<Provenance>String</Provenance>
<RateDay>0</RateDay>
<RateMonth>0</RateMonth>
<RateWeek>0</RateWeek>
<Status>String</Status>
<Tier>String</Tier>
<Unit>String</Unit>
<Url>String</Url>
<Value>0</Value>
<Vendor>String</Vendor>
</Quote>
<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>
<Status>String</Status>
</RateQuotePollResponse>