| PUT,OPTIONS | /v1/projects/{ProjectID}/change-orders/{ChangeOrderID} |
|---|
"use strict";
export class ChangeOrderLine {
/** @param {{ChangeOrderLineID?:number,ChangeOrderID?:number,Category?:string,Description?:string,CostUSD?:number,MarkupPct?:number,CostCode?:string,SortOrder?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ChangeOrderLineID;
/** @type {number} */
ChangeOrderID;
/** @type {string} */
Category;
/** @type {string} */
Description;
/** @type {number} */
CostUSD;
/** @type {number} */
MarkupPct;
/** @type {string} */
CostCode;
/** @type {number} */
SortOrder;
}
export class ChangeOrder {
/** @param {{ChangeOrderID?:number,ChangeOrderUID?:string,ProjectID?:number,CONumber?:string,Title?:string,Scope?:string,Status?:string,CostUSD?:number,PriceUSD?:number,ScheduleDays?:number,OverheadProfitPct?:number,PricingMethod?:string,OriginType?:string,OriginRef?:string,CostCode?:string,OpenedAt?:string,SubmittedAt?:string,DecidedAt?:string,CreatedBy?:string,CreatedAt?:string,UpdatedAt?:string,DaysOpen?:number,Lines?:ChangeOrderLine[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ChangeOrderID;
/** @type {string} */
ChangeOrderUID;
/** @type {number} */
ProjectID;
/** @type {string} */
CONumber;
/** @type {string} */
Title;
/** @type {string} */
Scope;
/** @type {string} */
Status;
/** @type {number} */
CostUSD;
/** @type {number} */
PriceUSD;
/** @type {number} */
ScheduleDays;
/** @type {number} */
OverheadProfitPct;
/** @type {string} */
PricingMethod;
/** @type {string} */
OriginType;
/** @type {string} */
OriginRef;
/** @type {string} */
CostCode;
/** @type {?string} */
OpenedAt;
/** @type {?string} */
SubmittedAt;
/** @type {?string} */
DecidedAt;
/** @type {string} */
CreatedBy;
/** @type {?string} */
CreatedAt;
/** @type {?string} */
UpdatedAt;
/** @type {number} */
DaysOpen;
/** @type {ChangeOrderLine[]} */
Lines = [];
}
export class ChangeOrderContractSummary {
/** @param {{ProjectID?:number,OriginalContract?:number,ApprovedCOValue?:number,ApprovedCOCount?:number,PendingCOValue?:number,PendingCOCount?:number,RevisedContract?:number,PotentialContract?:number,ApprovedScheduleDays?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {number} */
OriginalContract;
/** @type {number} */
ApprovedCOValue;
/** @type {number} */
ApprovedCOCount;
/** @type {number} */
PendingCOValue;
/** @type {number} */
PendingCOCount;
/** @type {number} */
RevisedContract;
/** @type {number} */
PotentialContract;
/** @type {number} */
ApprovedScheduleDays;
}
export class ChangeOrderResponse {
/** @param {{ResponseStatus?:ResponseStatus,Order?:ChangeOrder,Summary?:ChangeOrderContractSummary}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {ChangeOrder} */
Order;
/** @type {ChangeOrderContractSummary} */
Summary;
}
export class ChangeOrderUpdateRequest {
/** @param {{ProjectID?:number,ChangeOrderID?:number,Title?:string,Scope?:string,OriginType?:string,OriginRef?:string,CostCode?:string,ScheduleDays?:number,OverheadProfitPct?:number,PricingMethod?:string,Lines?:ChangeOrderLine[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {number} */
ChangeOrderID;
/** @type {string} */
Title;
/** @type {string} */
Scope;
/** @type {string} */
OriginType;
/** @type {string} */
OriginRef;
/** @type {string} */
CostCode;
/** @type {number} */
ScheduleDays;
/** @type {number} */
OverheadProfitPct;
/** @type {string} */
PricingMethod;
/** @type {ChangeOrderLine[]} */
Lines = [];
}
JavaScript ChangeOrderUpdateRequest 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.
PUT /v1/projects/{ProjectID}/change-orders/{ChangeOrderID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ChangeOrderUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ChangeOrderID>0</ChangeOrderID>
<CostCode>String</CostCode>
<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>
<OriginRef>String</OriginRef>
<OriginType>String</OriginType>
<OverheadProfitPct>0</OverheadProfitPct>
<PricingMethod>String</PricingMethod>
<ProjectID>0</ProjectID>
<ScheduleDays>0</ScheduleDays>
<Scope>String</Scope>
<Title>String</Title>
</ChangeOrderUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ChangeOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Order>
<CONumber>String</CONumber>
<ChangeOrderID>0</ChangeOrderID>
<ChangeOrderUID>00000000-0000-0000-0000-000000000000</ChangeOrderUID>
<CostCode>String</CostCode>
<CostUSD>0</CostUSD>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<DaysOpen>0</DaysOpen>
<DecidedAt>0001-01-01T00:00:00</DecidedAt>
<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>
<OpenedAt>0001-01-01T00:00:00</OpenedAt>
<OriginRef>String</OriginRef>
<OriginType>String</OriginType>
<OverheadProfitPct>0</OverheadProfitPct>
<PriceUSD>0</PriceUSD>
<PricingMethod>String</PricingMethod>
<ProjectID>0</ProjectID>
<ScheduleDays>0</ScheduleDays>
<Scope>String</Scope>
<Status>String</Status>
<SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
<Title>String</Title>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
</Order>
<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>
<Summary>
<ApprovedCOCount>0</ApprovedCOCount>
<ApprovedCOValue>0</ApprovedCOValue>
<ApprovedScheduleDays>0</ApprovedScheduleDays>
<OriginalContract>0</OriginalContract>
<PendingCOCount>0</PendingCOCount>
<PendingCOValue>0</PendingCOValue>
<PotentialContract>0</PotentialContract>
<ProjectID>0</ProjectID>
<RevisedContract>0</RevisedContract>
</Summary>
</ChangeOrderResponse>