| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/ChangeOrderSession |
|---|
<?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 ChangeOrderLine implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ChangeOrderLineID=0,
/** @var int */
public int $ChangeOrderID=0,
/** @var string|null */
public ?string $Category=null,
/** @var string|null */
public ?string $Description=null,
/** @var float */
public float $CostUSD=0.0,
/** @var float */
public float $MarkupPct=0.0,
/** @var string|null */
public ?string $CostCode=null,
/** @var int */
public int $SortOrder=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ChangeOrderLineID'])) $this->ChangeOrderLineID = $o['ChangeOrderLineID'];
if (isset($o['ChangeOrderID'])) $this->ChangeOrderID = $o['ChangeOrderID'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['CostUSD'])) $this->CostUSD = $o['CostUSD'];
if (isset($o['MarkupPct'])) $this->MarkupPct = $o['MarkupPct'];
if (isset($o['CostCode'])) $this->CostCode = $o['CostCode'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ChangeOrderLineID)) $o['ChangeOrderLineID'] = $this->ChangeOrderLineID;
if (isset($this->ChangeOrderID)) $o['ChangeOrderID'] = $this->ChangeOrderID;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->CostUSD)) $o['CostUSD'] = $this->CostUSD;
if (isset($this->MarkupPct)) $o['MarkupPct'] = $this->MarkupPct;
if (isset($this->CostCode)) $o['CostCode'] = $this->CostCode;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
return empty($o) ? new class(){} : $o;
}
}
class RfpChangeOrderSessionResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var string|null */
public ?string $Mode=null,
/** @var int */
public int $ProjectID=0,
/** @var int */
public int $ChangeOrderID=0,
/** @var string|null */
public ?string $CONumber=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Scope=null,
/** @var int */
public int $ScheduleDays=0,
/** @var array<ChangeOrderLine>|null */
public ?array $Lines=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Mode'])) $this->Mode = $o['Mode'];
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
if (isset($o['ChangeOrderID'])) $this->ChangeOrderID = $o['ChangeOrderID'];
if (isset($o['CONumber'])) $this->CONumber = $o['CONumber'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Scope'])) $this->Scope = $o['Scope'];
if (isset($o['ScheduleDays'])) $this->ScheduleDays = $o['ScheduleDays'];
if (isset($o['Lines'])) $this->Lines = JsonConverters::fromArray('ChangeOrderLine', $o['Lines']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Mode)) $o['Mode'] = $this->Mode;
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
if (isset($this->ChangeOrderID)) $o['ChangeOrderID'] = $this->ChangeOrderID;
if (isset($this->CONumber)) $o['CONumber'] = $this->CONumber;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Scope)) $o['Scope'] = $this->Scope;
if (isset($this->ScheduleDays)) $o['ScheduleDays'] = $this->ScheduleDays;
if (isset($this->Lines)) $o['Lines'] = JsonConverters::toArray('ChangeOrderLine', $this->Lines);
return empty($o) ? new class(){} : $o;
}
}
class RfpChangeOrderSessionRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ProjectID=0,
/** @var int */
public int $ChangeOrderID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
if (isset($o['ChangeOrderID'])) $this->ChangeOrderID = $o['ChangeOrderID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
if (isset($this->ChangeOrderID)) $o['ChangeOrderID'] = $this->ChangeOrderID;
return empty($o) ? new class(){} : $o;
}
}
PHP RfpChangeOrderSessionRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Rfp/ChangeOrderSession HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
ChangeOrderID: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Mode: String,
ProjectID: 0,
ChangeOrderID: 0,
CONumber: String,
Title: String,
Scope: String,
ScheduleDays: 0,
Lines:
[
{
ChangeOrderLineID: 0,
ChangeOrderID: 0,
Category: String,
Description: String,
CostUSD: 0,
MarkupPct: 0,
CostCode: String,
SortOrder: 0
}
]
}