| POST | /v1/workforce/calc |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CostCalcRequest
{
public CostInput Input = null;
public Integer ContactID = null;
public Integer ProjectID = null;
public Integer ShiftPatternID = null;
public String Unit = null;
public CostInput getInput() { return Input; }
public CostCalcRequest setInput(CostInput value) { this.Input = value; return this; }
public Integer getContactID() { return ContactID; }
public CostCalcRequest setContactID(Integer value) { this.ContactID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public CostCalcRequest setProjectID(Integer value) { this.ProjectID = value; return this; }
public Integer getShiftPatternID() { return ShiftPatternID; }
public CostCalcRequest setShiftPatternID(Integer value) { this.ShiftPatternID = value; return this; }
public String getUnit() { return Unit; }
public CostCalcRequest setUnit(String value) { this.Unit = value; return this; }
}
public static class CostInput
{
public BigDecimal Base = null;
public BigDecimal BillRate = null;
public BigDecimal FringeCash = null;
public BigDecimal FringePlan = null;
public Boolean IsNight = null;
public BigDecimal HoursPerDay = null;
public Integer OnDays = null;
public BigDecimal OnDaysExact = null;
public Boolean HasTravel = null;
public Boolean PerDiemEligible = null;
public Boolean PrevailingWage = null;
public String Jurisdiction = null;
public String Unit = null;
public BigDecimal PriorHours = null;
public String BurdenClass = null;
public BigDecimal WcRateOverride = null;
public BigDecimal getBase() { return Base; }
public CostInput setBase(BigDecimal value) { this.Base = value; return this; }
public BigDecimal getBillRate() { return BillRate; }
public CostInput setBillRate(BigDecimal value) { this.BillRate = value; return this; }
public BigDecimal getFringeCash() { return FringeCash; }
public CostInput setFringeCash(BigDecimal value) { this.FringeCash = value; return this; }
public BigDecimal getFringePlan() { return FringePlan; }
public CostInput setFringePlan(BigDecimal value) { this.FringePlan = value; return this; }
public Boolean getIsNight() { return IsNight; }
public CostInput setIsNight(Boolean value) { this.IsNight = value; return this; }
public BigDecimal getHoursPerDay() { return HoursPerDay; }
public CostInput setHoursPerDay(BigDecimal value) { this.HoursPerDay = value; return this; }
public Integer getOnDays() { return OnDays; }
public CostInput setOnDays(Integer value) { this.OnDays = value; return this; }
public BigDecimal getOnDaysExact() { return OnDaysExact; }
public CostInput setOnDaysExact(BigDecimal value) { this.OnDaysExact = value; return this; }
public Boolean isHasTravel() { return HasTravel; }
public CostInput setHasTravel(Boolean value) { this.HasTravel = value; return this; }
public Boolean isPerDiemEligible() { return PerDiemEligible; }
public CostInput setPerDiemEligible(Boolean value) { this.PerDiemEligible = value; return this; }
public Boolean isPrevailingWage() { return PrevailingWage; }
public CostInput setPrevailingWage(Boolean value) { this.PrevailingWage = value; return this; }
public String getJurisdiction() { return Jurisdiction; }
public CostInput setJurisdiction(String value) { this.Jurisdiction = value; return this; }
public String getUnit() { return Unit; }
public CostInput setUnit(String value) { this.Unit = value; return this; }
public BigDecimal getPriorHours() { return PriorHours; }
public CostInput setPriorHours(BigDecimal value) { this.PriorHours = value; return this; }
public String getBurdenClass() { return BurdenClass; }
public CostInput setBurdenClass(String value) { this.BurdenClass = value; return this; }
public BigDecimal getWcRateOverride() { return WcRateOverride; }
public CostInput setWcRateOverride(BigDecimal value) { this.WcRateOverride = value; return this; }
}
public static class CostCalcResponse
{
public CostBreakdown Result = null;
public CostInput ResolvedInput = null;
public Boolean CanSeePay = null;
public ResponseStatus ResponseStatus = null;
public CostBreakdown getResult() { return Result; }
public CostCalcResponse setResult(CostBreakdown value) { this.Result = value; return this; }
public CostInput getResolvedInput() { return ResolvedInput; }
public CostCalcResponse setResolvedInput(CostInput value) { this.ResolvedInput = value; return this; }
public Boolean isCanSeePay() { return CanSeePay; }
public CostCalcResponse setCanSeePay(Boolean value) { this.CanSeePay = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public CostCalcResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class CostBreakdown
{
public BigDecimal Rrop = null;
public BigDecimal St = null;
public BigDecimal Ot = null;
public BigDecimal Dt = null;
public BigDecimal TotalHours = null;
public BigDecimal Straight = null;
public BigDecimal DiffPay = null;
public BigDecimal OtPremium = null;
public BigDecimal DtPremium = null;
public BigDecimal CashWages = null;
public BigDecimal FringeCashPay = null;
public BigDecimal FringePlanPay = null;
public BigDecimal BurdenPct = null;
public BigDecimal BurdenAmount = null;
public Boolean PerDiemApplies = null;
public BigDecimal PerDiemCost = null;
public BigDecimal PerDiemTaxable = null;
public BigDecimal PerDiemNonTax = null;
public BigDecimal Loaded = null;
public BigDecimal Revenue = null;
public BigDecimal Margin = null;
public BigDecimal MarginPct = null;
public BigDecimal OtMultiplier = null;
public BigDecimal DtMultiplier = null;
public BigDecimal PerDiemDaily = null;
public ArrayList<CostLine> Lines = new ArrayList<CostLine>();
public ArrayList<String> Notes = new ArrayList<String>();
public BigDecimal getRrop() { return Rrop; }
public CostBreakdown setRrop(BigDecimal value) { this.Rrop = value; return this; }
public BigDecimal getSt() { return St; }
public CostBreakdown setSt(BigDecimal value) { this.St = value; return this; }
public BigDecimal getOt() { return Ot; }
public CostBreakdown setOt(BigDecimal value) { this.Ot = value; return this; }
public BigDecimal getDt() { return Dt; }
public CostBreakdown setDt(BigDecimal value) { this.Dt = value; return this; }
public BigDecimal getTotalHours() { return TotalHours; }
public CostBreakdown setTotalHours(BigDecimal value) { this.TotalHours = value; return this; }
public BigDecimal getStraight() { return Straight; }
public CostBreakdown setStraight(BigDecimal value) { this.Straight = value; return this; }
public BigDecimal getDiffPay() { return DiffPay; }
public CostBreakdown setDiffPay(BigDecimal value) { this.DiffPay = value; return this; }
public BigDecimal getOtPremium() { return OtPremium; }
public CostBreakdown setOtPremium(BigDecimal value) { this.OtPremium = value; return this; }
public BigDecimal getDtPremium() { return DtPremium; }
public CostBreakdown setDtPremium(BigDecimal value) { this.DtPremium = value; return this; }
public BigDecimal getCashWages() { return CashWages; }
public CostBreakdown setCashWages(BigDecimal value) { this.CashWages = value; return this; }
public BigDecimal getFringeCashPay() { return FringeCashPay; }
public CostBreakdown setFringeCashPay(BigDecimal value) { this.FringeCashPay = value; return this; }
public BigDecimal getFringePlanPay() { return FringePlanPay; }
public CostBreakdown setFringePlanPay(BigDecimal value) { this.FringePlanPay = value; return this; }
public BigDecimal getBurdenPct() { return BurdenPct; }
public CostBreakdown setBurdenPct(BigDecimal value) { this.BurdenPct = value; return this; }
public BigDecimal getBurdenAmount() { return BurdenAmount; }
public CostBreakdown setBurdenAmount(BigDecimal value) { this.BurdenAmount = value; return this; }
public Boolean isPerDiemApplies() { return PerDiemApplies; }
public CostBreakdown setPerDiemApplies(Boolean value) { this.PerDiemApplies = value; return this; }
public BigDecimal getPerDiemCost() { return PerDiemCost; }
public CostBreakdown setPerDiemCost(BigDecimal value) { this.PerDiemCost = value; return this; }
public BigDecimal getPerDiemTaxable() { return PerDiemTaxable; }
public CostBreakdown setPerDiemTaxable(BigDecimal value) { this.PerDiemTaxable = value; return this; }
public BigDecimal getPerDiemNonTax() { return PerDiemNonTax; }
public CostBreakdown setPerDiemNonTax(BigDecimal value) { this.PerDiemNonTax = value; return this; }
public BigDecimal getLoaded() { return Loaded; }
public CostBreakdown setLoaded(BigDecimal value) { this.Loaded = value; return this; }
public BigDecimal getRevenue() { return Revenue; }
public CostBreakdown setRevenue(BigDecimal value) { this.Revenue = value; return this; }
public BigDecimal getMargin() { return Margin; }
public CostBreakdown setMargin(BigDecimal value) { this.Margin = value; return this; }
public BigDecimal getMarginPct() { return MarginPct; }
public CostBreakdown setMarginPct(BigDecimal value) { this.MarginPct = value; return this; }
public BigDecimal getOtMultiplier() { return OtMultiplier; }
public CostBreakdown setOtMultiplier(BigDecimal value) { this.OtMultiplier = value; return this; }
public BigDecimal getDtMultiplier() { return DtMultiplier; }
public CostBreakdown setDtMultiplier(BigDecimal value) { this.DtMultiplier = value; return this; }
public BigDecimal getPerDiemDaily() { return PerDiemDaily; }
public CostBreakdown setPerDiemDaily(BigDecimal value) { this.PerDiemDaily = value; return this; }
public ArrayList<CostLine> getLines() { return Lines; }
public CostBreakdown setLines(ArrayList<CostLine> value) { this.Lines = value; return this; }
public ArrayList<String> getNotes() { return Notes; }
public CostBreakdown setNotes(ArrayList<String> value) { this.Notes = value; return this; }
}
public static class CostLine
{
public String Label = null;
public String Detail = null;
public BigDecimal Amount = null;
public String RuleId = null;
public String getLabel() { return Label; }
public CostLine setLabel(String value) { this.Label = value; return this; }
public String getDetail() { return Detail; }
public CostLine setDetail(String value) { this.Detail = value; return this; }
public BigDecimal getAmount() { return Amount; }
public CostLine setAmount(BigDecimal value) { this.Amount = value; return this; }
public String getRuleId() { return RuleId; }
public CostLine setRuleId(String value) { this.RuleId = 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.
POST /v1/workforce/calc HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CostCalcRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ContactID>0</ContactID>
<Input>
<Base>0</Base>
<BillRate>0</BillRate>
<BurdenClass>String</BurdenClass>
<FringeCash>0</FringeCash>
<FringePlan>0</FringePlan>
<HasTravel>false</HasTravel>
<HoursPerDay>0</HoursPerDay>
<IsNight>false</IsNight>
<Jurisdiction>String</Jurisdiction>
<OnDays>0</OnDays>
<OnDaysExact>0</OnDaysExact>
<PerDiemEligible>false</PerDiemEligible>
<PrevailingWage>false</PrevailingWage>
<PriorHours>0</PriorHours>
<Unit>String</Unit>
<WcRateOverride>0</WcRateOverride>
</Input>
<ProjectID>0</ProjectID>
<ShiftPatternID>0</ShiftPatternID>
<Unit>String</Unit>
</CostCalcRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CostCalcResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CanSeePay>false</CanSeePay>
<ResolvedInput>
<Base>0</Base>
<BillRate>0</BillRate>
<BurdenClass>String</BurdenClass>
<FringeCash>0</FringeCash>
<FringePlan>0</FringePlan>
<HasTravel>false</HasTravel>
<HoursPerDay>0</HoursPerDay>
<IsNight>false</IsNight>
<Jurisdiction>String</Jurisdiction>
<OnDays>0</OnDays>
<OnDaysExact>0</OnDaysExact>
<PerDiemEligible>false</PerDiemEligible>
<PrevailingWage>false</PrevailingWage>
<PriorHours>0</PriorHours>
<Unit>String</Unit>
<WcRateOverride>0</WcRateOverride>
</ResolvedInput>
<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>
<Result>
<BurdenAmount>0</BurdenAmount>
<BurdenPct>0</BurdenPct>
<CashWages>0</CashWages>
<DiffPay>0</DiffPay>
<Dt>0</Dt>
<DtMultiplier>0</DtMultiplier>
<DtPremium>0</DtPremium>
<FringeCashPay>0</FringeCashPay>
<FringePlanPay>0</FringePlanPay>
<Lines>
<CostLine>
<Amount>0</Amount>
<Detail>String</Detail>
<Label>String</Label>
<RuleId>String</RuleId>
</CostLine>
</Lines>
<Loaded>0</Loaded>
<Margin>0</Margin>
<MarginPct>0</MarginPct>
<Notes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Notes>
<Ot>0</Ot>
<OtMultiplier>0</OtMultiplier>
<OtPremium>0</OtPremium>
<PerDiemApplies>false</PerDiemApplies>
<PerDiemCost>0</PerDiemCost>
<PerDiemDaily>0</PerDiemDaily>
<PerDiemNonTax>0</PerDiemNonTax>
<PerDiemTaxable>0</PerDiemTaxable>
<Revenue>0</Revenue>
<Rrop>0</Rrop>
<St>0</St>
<Straight>0</Straight>
<TotalHours>0</TotalHours>
</Result>
</CostCalcResponse>