| GET,OPTIONS | /v1/Project/ProfitLoss/{ProjectID}/{ProfitLossStartDate}/{ProfitLossEndDate} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ProjectProfitLossRequest
{
public Integer ProjectID = null;
public Date ProfitLossStartDate = null;
public Date ProfitLossEndDate = null;
public Integer getProjectID() { return ProjectID; }
public ProjectProfitLossRequest setProjectID(Integer value) { this.ProjectID = value; return this; }
public Date getProfitLossStartDate() { return ProfitLossStartDate; }
public ProjectProfitLossRequest setProfitLossStartDate(Date value) { this.ProfitLossStartDate = value; return this; }
public Date getProfitLossEndDate() { return ProfitLossEndDate; }
public ProjectProfitLossRequest setProfitLossEndDate(Date value) { this.ProfitLossEndDate = value; return this; }
}
public static class ProjectProfitLossResponse
{
public ResponseStatus ResponseStatus = null;
public ProjectCost ProjectProfitLoss = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ProjectProfitLossResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ProjectCost getProjectProfitLoss() { return ProjectProfitLoss; }
public ProjectProfitLossResponse setProjectProfitLoss(ProjectCost value) { this.ProjectProfitLoss = value; return this; }
}
public static class ProjectCost
{
public Integer ProjectID = null;
public BigDecimal Budget = null;
public BigDecimal CrewCost = null;
public BigDecimal EquipmentCost = null;
public BigDecimal MaterialCost = null;
public BigDecimal TotalCost = null;
public BigDecimal BilledCrewCost = null;
public BigDecimal BilledEquipmentCost = null;
public BigDecimal BilledMaterialCost = null;
public BigDecimal BilledTotalCost = null;
public Integer getProjectID() { return ProjectID; }
public ProjectCost setProjectID(Integer value) { this.ProjectID = value; return this; }
public BigDecimal getBudget() { return Budget; }
public ProjectCost setBudget(BigDecimal value) { this.Budget = value; return this; }
public BigDecimal getCrewCost() { return CrewCost; }
public ProjectCost setCrewCost(BigDecimal value) { this.CrewCost = value; return this; }
public BigDecimal getEquipmentCost() { return EquipmentCost; }
public ProjectCost setEquipmentCost(BigDecimal value) { this.EquipmentCost = value; return this; }
public BigDecimal getMaterialCost() { return MaterialCost; }
public ProjectCost setMaterialCost(BigDecimal value) { this.MaterialCost = value; return this; }
public BigDecimal getTotalCost() { return TotalCost; }
public ProjectCost setTotalCost(BigDecimal value) { this.TotalCost = value; return this; }
public BigDecimal getBilledCrewCost() { return BilledCrewCost; }
public ProjectCost setBilledCrewCost(BigDecimal value) { this.BilledCrewCost = value; return this; }
public BigDecimal getBilledEquipmentCost() { return BilledEquipmentCost; }
public ProjectCost setBilledEquipmentCost(BigDecimal value) { this.BilledEquipmentCost = value; return this; }
public BigDecimal getBilledMaterialCost() { return BilledMaterialCost; }
public ProjectCost setBilledMaterialCost(BigDecimal value) { this.BilledMaterialCost = value; return this; }
public BigDecimal getBilledTotalCost() { return BilledTotalCost; }
public ProjectCost setBilledTotalCost(BigDecimal value) { this.BilledTotalCost = value; return this; }
}
}
Java ProjectProfitLossRequest 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.
GET /v1/Project/ProfitLoss/{ProjectID}/{ProfitLossStartDate}/{ProfitLossEndDate} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ProjectProfitLossResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ProjectProfitLoss>
<BilledCrewCost>0</BilledCrewCost>
<BilledEquipmentCost>0</BilledEquipmentCost>
<BilledMaterialCost>0</BilledMaterialCost>
<BilledTotalCost>0</BilledTotalCost>
<Budget>0</Budget>
<CrewCost>0</CrewCost>
<EquipmentCost>0</EquipmentCost>
<MaterialCost>0</MaterialCost>
<ProjectID>0</ProjectID>
<TotalCost>0</TotalCost>
</ProjectProfitLoss>
<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>
</ProjectProfitLossResponse>