| GET | /v1/workforce/planning |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PlanningRequest
{
public Date AsOf = null;
public Date getAsOf() { return AsOf; }
public PlanningRequest setAsOf(Date value) { this.AsOf = value; return this; }
}
public static class PlanningResponse
{
public PlanningSurface Surface = null;
public Boolean CanSeePay = null;
public ResponseStatus ResponseStatus = null;
public PlanningSurface getSurface() { return Surface; }
public PlanningResponse setSurface(PlanningSurface value) { this.Surface = value; return this; }
public Boolean isCanSeePay() { return CanSeePay; }
public PlanningResponse setCanSeePay(Boolean value) { this.CanSeePay = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PlanningResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PlanningSurface
{
public String WeekLabel = null;
public Date WeekStart = null;
public Integer WorkerCount = null;
public OtExposureBoard Ot = null;
public PerDiemBoard PerDiem = null;
public MarginBoard Margin = null;
public UtilizationBoard Utilization = null;
public ArrayList<PlanningSuggestion> Suggestions = new ArrayList<PlanningSuggestion>();
public String getWeekLabel() { return WeekLabel; }
public PlanningSurface setWeekLabel(String value) { this.WeekLabel = value; return this; }
public Date getWeekStart() { return WeekStart; }
public PlanningSurface setWeekStart(Date value) { this.WeekStart = value; return this; }
public Integer getWorkerCount() { return WorkerCount; }
public PlanningSurface setWorkerCount(Integer value) { this.WorkerCount = value; return this; }
public OtExposureBoard getOt() { return Ot; }
public PlanningSurface setOt(OtExposureBoard value) { this.Ot = value; return this; }
public PerDiemBoard getPerDiem() { return PerDiem; }
public PlanningSurface setPerDiem(PerDiemBoard value) { this.PerDiem = value; return this; }
public MarginBoard getMargin() { return Margin; }
public PlanningSurface setMargin(MarginBoard value) { this.Margin = value; return this; }
public UtilizationBoard getUtilization() { return Utilization; }
public PlanningSurface setUtilization(UtilizationBoard value) { this.Utilization = value; return this; }
public ArrayList<PlanningSuggestion> getSuggestions() { return Suggestions; }
public PlanningSurface setSuggestions(ArrayList<PlanningSuggestion> value) { this.Suggestions = value; return this; }
}
public static class OtExposureBoard
{
public BigDecimal TotalOtCost = null;
public BigDecimal TotalOtHours = null;
public Integer OverCount = null;
public Integer WorkerCount = null;
public ArrayList<OtRow> Rows = new ArrayList<OtRow>();
public BigDecimal getTotalOtCost() { return TotalOtCost; }
public OtExposureBoard setTotalOtCost(BigDecimal value) { this.TotalOtCost = value; return this; }
public BigDecimal getTotalOtHours() { return TotalOtHours; }
public OtExposureBoard setTotalOtHours(BigDecimal value) { this.TotalOtHours = value; return this; }
public Integer getOverCount() { return OverCount; }
public OtExposureBoard setOverCount(Integer value) { this.OverCount = value; return this; }
public Integer getWorkerCount() { return WorkerCount; }
public OtExposureBoard setWorkerCount(Integer value) { this.WorkerCount = value; return this; }
public ArrayList<OtRow> getRows() { return Rows; }
public OtExposureBoard setRows(ArrayList<OtRow> value) { this.Rows = value; return this; }
}
public static class OtRow
{
public Integer ContactID = null;
public String WorkerName = null;
public String ClassCode = null;
public String Crew = null;
public String Job = null;
public String PatternLabel = null;
public BigDecimal ProjHours = null;
public BigDecimal OtHours = null;
public BigDecimal DtHours = null;
public BigDecimal OtCost = null;
public String State = null;
public String Tone = null;
public Integer getContactID() { return ContactID; }
public OtRow setContactID(Integer value) { this.ContactID = value; return this; }
public String getWorkerName() { return WorkerName; }
public OtRow setWorkerName(String value) { this.WorkerName = value; return this; }
public String getClassCode() { return ClassCode; }
public OtRow setClassCode(String value) { this.ClassCode = value; return this; }
public String getCrew() { return Crew; }
public OtRow setCrew(String value) { this.Crew = value; return this; }
public String getJob() { return Job; }
public OtRow setJob(String value) { this.Job = value; return this; }
public String getPatternLabel() { return PatternLabel; }
public OtRow setPatternLabel(String value) { this.PatternLabel = value; return this; }
public BigDecimal getProjHours() { return ProjHours; }
public OtRow setProjHours(BigDecimal value) { this.ProjHours = value; return this; }
public BigDecimal getOtHours() { return OtHours; }
public OtRow setOtHours(BigDecimal value) { this.OtHours = value; return this; }
public BigDecimal getDtHours() { return DtHours; }
public OtRow setDtHours(BigDecimal value) { this.DtHours = value; return this; }
public BigDecimal getOtCost() { return OtCost; }
public OtRow setOtCost(BigDecimal value) { this.OtCost = value; return this; }
public String getState() { return State; }
public OtRow setState(String value) { this.State = value; return this; }
public String getTone() { return Tone; }
public OtRow setTone(String value) { this.Tone = value; return this; }
}
public static class PerDiemBoard
{
public BigDecimal TotalCost = null;
public BigDecimal NonTaxable = null;
public BigDecimal Taxable = null;
public Integer AwayCount = null;
public ArrayList<PerDiemJobRow> Jobs = new ArrayList<PerDiemJobRow>();
public BigDecimal getTotalCost() { return TotalCost; }
public PerDiemBoard setTotalCost(BigDecimal value) { this.TotalCost = value; return this; }
public BigDecimal getNonTaxable() { return NonTaxable; }
public PerDiemBoard setNonTaxable(BigDecimal value) { this.NonTaxable = value; return this; }
public BigDecimal getTaxable() { return Taxable; }
public PerDiemBoard setTaxable(BigDecimal value) { this.Taxable = value; return this; }
public Integer getAwayCount() { return AwayCount; }
public PerDiemBoard setAwayCount(Integer value) { this.AwayCount = value; return this; }
public ArrayList<PerDiemJobRow> getJobs() { return Jobs; }
public PerDiemBoard setJobs(ArrayList<PerDiemJobRow> value) { this.Jobs = value; return this; }
}
public static class PerDiemJobRow
{
public String Job = null;
public BigDecimal Total = null;
public BigDecimal NonTax = null;
public BigDecimal Tax = null;
public Integer Days = null;
public Integer AwayCount = null;
public Boolean DayRateFlag = null;
public String getJob() { return Job; }
public PerDiemJobRow setJob(String value) { this.Job = value; return this; }
public BigDecimal getTotal() { return Total; }
public PerDiemJobRow setTotal(BigDecimal value) { this.Total = value; return this; }
public BigDecimal getNonTax() { return NonTax; }
public PerDiemJobRow setNonTax(BigDecimal value) { this.NonTax = value; return this; }
public BigDecimal getTax() { return Tax; }
public PerDiemJobRow setTax(BigDecimal value) { this.Tax = value; return this; }
public Integer getDays() { return Days; }
public PerDiemJobRow setDays(Integer value) { this.Days = value; return this; }
public Integer getAwayCount() { return AwayCount; }
public PerDiemJobRow setAwayCount(Integer value) { this.AwayCount = value; return this; }
public Boolean isDayRateFlag() { return DayRateFlag; }
public PerDiemJobRow setDayRateFlag(Boolean value) { this.DayRateFlag = value; return this; }
}
public static class MarginBoard
{
public Integer JobCount = null;
public BigDecimal TotalFade = null;
public ArrayList<MarginJobRow> Jobs = new ArrayList<MarginJobRow>();
public Integer getJobCount() { return JobCount; }
public MarginBoard setJobCount(Integer value) { this.JobCount = value; return this; }
public BigDecimal getTotalFade() { return TotalFade; }
public MarginBoard setTotalFade(BigDecimal value) { this.TotalFade = value; return this; }
public ArrayList<MarginJobRow> getJobs() { return Jobs; }
public MarginBoard setJobs(ArrayList<MarginJobRow> value) { this.Jobs = value; return this; }
}
public static class MarginJobRow
{
public String Job = null;
public BigDecimal BasePct = null;
public BigDecimal ProjPct = null;
public BigDecimal FadePts = null;
public String Severity = null;
public BigDecimal OtCost = null;
public BigDecimal PerDiem = null;
public String getJob() { return Job; }
public MarginJobRow setJob(String value) { this.Job = value; return this; }
public BigDecimal getBasePct() { return BasePct; }
public MarginJobRow setBasePct(BigDecimal value) { this.BasePct = value; return this; }
public BigDecimal getProjPct() { return ProjPct; }
public MarginJobRow setProjPct(BigDecimal value) { this.ProjPct = value; return this; }
public BigDecimal getFadePts() { return FadePts; }
public MarginJobRow setFadePts(BigDecimal value) { this.FadePts = value; return this; }
public String getSeverity() { return Severity; }
public MarginJobRow setSeverity(String value) { this.Severity = value; return this; }
public BigDecimal getOtCost() { return OtCost; }
public MarginJobRow setOtCost(BigDecimal value) { this.OtCost = value; return this; }
public BigDecimal getPerDiem() { return PerDiem; }
public MarginJobRow setPerDiem(BigDecimal value) { this.PerDiem = value; return this; }
}
public static class UtilizationBoard
{
public Integer UnderCount = null;
public Integer OverCount = null;
public ArrayList<UtilRow> Rows = new ArrayList<UtilRow>();
public Integer getUnderCount() { return UnderCount; }
public UtilizationBoard setUnderCount(Integer value) { this.UnderCount = value; return this; }
public Integer getOverCount() { return OverCount; }
public UtilizationBoard setOverCount(Integer value) { this.OverCount = value; return this; }
public ArrayList<UtilRow> getRows() { return Rows; }
public UtilizationBoard setRows(ArrayList<UtilRow> value) { this.Rows = value; return this; }
}
public static class UtilRow
{
public Integer ContactID = null;
public String WorkerName = null;
public String Crew = null;
public BigDecimal ProjHours = null;
public BigDecimal BaselineHours = null;
public BigDecimal Pct = null;
public String Band = null;
public Integer getContactID() { return ContactID; }
public UtilRow setContactID(Integer value) { this.ContactID = value; return this; }
public String getWorkerName() { return WorkerName; }
public UtilRow setWorkerName(String value) { this.WorkerName = value; return this; }
public String getCrew() { return Crew; }
public UtilRow setCrew(String value) { this.Crew = value; return this; }
public BigDecimal getProjHours() { return ProjHours; }
public UtilRow setProjHours(BigDecimal value) { this.ProjHours = value; return this; }
public BigDecimal getBaselineHours() { return BaselineHours; }
public UtilRow setBaselineHours(BigDecimal value) { this.BaselineHours = value; return this; }
public BigDecimal getPct() { return Pct; }
public UtilRow setPct(BigDecimal value) { this.Pct = value; return this; }
public String getBand() { return Band; }
public UtilRow setBand(String value) { this.Band = value; return this; }
}
public static class PlanningSuggestion
{
public String Id = null;
public String Kind = null;
public String Title = null;
public String Detail = null;
public String SaveText = null;
public String Effect = null;
public String RuleId = null;
public String LegalNote = null;
public String ApplyLabel = null;
public String Severity = null;
public String getId() { return Id; }
public PlanningSuggestion setId(String value) { this.Id = value; return this; }
public String getKind() { return Kind; }
public PlanningSuggestion setKind(String value) { this.Kind = value; return this; }
public String getTitle() { return Title; }
public PlanningSuggestion setTitle(String value) { this.Title = value; return this; }
public String getDetail() { return Detail; }
public PlanningSuggestion setDetail(String value) { this.Detail = value; return this; }
public String getSaveText() { return SaveText; }
public PlanningSuggestion setSaveText(String value) { this.SaveText = value; return this; }
public String getEffect() { return Effect; }
public PlanningSuggestion setEffect(String value) { this.Effect = value; return this; }
public String getRuleId() { return RuleId; }
public PlanningSuggestion setRuleId(String value) { this.RuleId = value; return this; }
public String getLegalNote() { return LegalNote; }
public PlanningSuggestion setLegalNote(String value) { this.LegalNote = value; return this; }
public String getApplyLabel() { return ApplyLabel; }
public PlanningSuggestion setApplyLabel(String value) { this.ApplyLabel = value; return this; }
public String getSeverity() { return Severity; }
public PlanningSuggestion setSeverity(String value) { this.Severity = value; return this; }
}
}
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/workforce/planning HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PlanningResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CanSeePay>false</CanSeePay>
<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>
<Surface>
<Margin>
<JobCount>0</JobCount>
<Jobs>
<MarginJobRow>
<BasePct>0</BasePct>
<FadePts>0</FadePts>
<Job>String</Job>
<OtCost>0</OtCost>
<PerDiem>0</PerDiem>
<ProjPct>0</ProjPct>
<Severity>String</Severity>
</MarginJobRow>
</Jobs>
<TotalFade>0</TotalFade>
</Margin>
<Ot>
<OverCount>0</OverCount>
<Rows>
<OtRow>
<ClassCode>String</ClassCode>
<ContactID>0</ContactID>
<Crew>String</Crew>
<DtHours>0</DtHours>
<Job>String</Job>
<OtCost>0</OtCost>
<OtHours>0</OtHours>
<PatternLabel>String</PatternLabel>
<ProjHours>0</ProjHours>
<State>String</State>
<Tone>String</Tone>
<WorkerName>String</WorkerName>
</OtRow>
</Rows>
<TotalOtCost>0</TotalOtCost>
<TotalOtHours>0</TotalOtHours>
<WorkerCount>0</WorkerCount>
</Ot>
<PerDiem>
<AwayCount>0</AwayCount>
<Jobs>
<PerDiemJobRow>
<AwayCount>0</AwayCount>
<DayRateFlag>false</DayRateFlag>
<Days>0</Days>
<Job>String</Job>
<NonTax>0</NonTax>
<Tax>0</Tax>
<Total>0</Total>
</PerDiemJobRow>
</Jobs>
<NonTaxable>0</NonTaxable>
<Taxable>0</Taxable>
<TotalCost>0</TotalCost>
</PerDiem>
<Suggestions>
<PlanningSuggestion>
<ApplyLabel>String</ApplyLabel>
<Detail>String</Detail>
<Effect>String</Effect>
<Id>String</Id>
<Kind>String</Kind>
<LegalNote>String</LegalNote>
<RuleId>String</RuleId>
<SaveText>String</SaveText>
<Severity>String</Severity>
<Title>String</Title>
</PlanningSuggestion>
</Suggestions>
<Utilization>
<OverCount>0</OverCount>
<Rows>
<UtilRow>
<Band>String</Band>
<BaselineHours>0</BaselineHours>
<ContactID>0</ContactID>
<Crew>String</Crew>
<Pct>0</Pct>
<ProjHours>0</ProjHours>
<WorkerName>String</WorkerName>
</UtilRow>
</Rows>
<UnderCount>0</UnderCount>
</Utilization>
<WeekLabel>String</WeekLabel>
<WeekStart>0001-01-01T00:00:00</WeekStart>
<WorkerCount>0</WorkerCount>
</Surface>
</PlanningResponse>