| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<RfpChangeOrderSessionRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ChangeOrderID>0</ChangeOrderID>
<ProjectID>0</ProjectID>
</RfpChangeOrderSessionRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RfpChangeOrderSessionResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CONumber>String</CONumber>
<ChangeOrderID>0</ChangeOrderID>
<Lines>
<ChangeOrderLine>
<Category>String</Category>
<ChangeOrderID>0</ChangeOrderID>
<ChangeOrderLineID>0</ChangeOrderLineID>
<CostCode>String</CostCode>
<CostUSD>0</CostUSD>
<Description>String</Description>
<MarkupPct>0</MarkupPct>
<SortOrder>0</SortOrder>
</ChangeOrderLine>
</Lines>
<Mode>String</Mode>
<ProjectID>0</ProjectID>
<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>
<ScheduleDays>0</ScheduleDays>
<Scope>String</Scope>
<Title>String</Title>
</RfpChangeOrderSessionResponse>