| 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 .other suffix or ?format=other
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: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Input":{"Base":0,"BillRate":0,"FringeCash":0,"FringePlan":0,"IsNight":false,"HoursPerDay":0,"OnDays":0,"OnDaysExact":0,"HasTravel":false,"PerDiemEligible":false,"PrevailingWage":false,"Jurisdiction":"String","Unit":"String","PriorHours":0,"BurdenClass":"String","WcRateOverride":0},"ContactID":0,"ProjectID":0,"ShiftPatternID":0,"Unit":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Result":{"Rrop":0,"St":0,"Ot":0,"Dt":0,"TotalHours":0,"Straight":0,"DiffPay":0,"OtPremium":0,"DtPremium":0,"CashWages":0,"FringeCashPay":0,"FringePlanPay":0,"BurdenPct":0,"BurdenAmount":0,"PerDiemApplies":false,"PerDiemCost":0,"PerDiemTaxable":0,"PerDiemNonTax":0,"Loaded":0,"Revenue":0,"Margin":0,"MarginPct":0,"OtMultiplier":0,"DtMultiplier":0,"PerDiemDaily":0,"Lines":[{"Label":"String","Detail":"String","Amount":0,"RuleId":"String"}],"Notes":["String"]},"ResolvedInput":{"Base":0,"BillRate":0,"FringeCash":0,"FringePlan":0,"IsNight":false,"HoursPerDay":0,"OnDays":0,"OnDaysExact":0,"HasTravel":false,"PerDiemEligible":false,"PrevailingWage":false,"Jurisdiction":"String","Unit":"String","PriorHours":0,"BurdenClass":"String","WcRateOverride":0},"CanSeePay":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}