| POST | /v1/workforce/calc |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class CostBreakdown
Public Overridable Property Rrop As Decimal
Public Overridable Property St As Decimal
Public Overridable Property Ot As Decimal
Public Overridable Property Dt As Decimal
Public Overridable Property TotalHours As Decimal
Public Overridable Property Straight As Decimal
Public Overridable Property DiffPay As Decimal
Public Overridable Property OtPremium As Decimal
Public Overridable Property DtPremium As Decimal
Public Overridable Property CashWages As Decimal
Public Overridable Property FringeCashPay As Decimal
Public Overridable Property FringePlanPay As Decimal
Public Overridable Property BurdenPct As Decimal
Public Overridable Property BurdenAmount As Decimal
Public Overridable Property PerDiemApplies As Boolean
Public Overridable Property PerDiemCost As Decimal
Public Overridable Property PerDiemTaxable As Decimal
Public Overridable Property PerDiemNonTax As Decimal
Public Overridable Property Loaded As Decimal
Public Overridable Property Revenue As Decimal
Public Overridable Property Margin As Decimal
Public Overridable Property MarginPct As Decimal
Public Overridable Property OtMultiplier As Decimal
Public Overridable Property DtMultiplier As Decimal
Public Overridable Property PerDiemDaily As Decimal
Public Overridable Property Lines As List(Of CostLine) = New List(Of CostLine)
Public Overridable Property Notes As List(Of String) = New List(Of String)
End Class
Public Partial Class CostCalcRequest
Public Overridable Property Input As CostInput
Public Overridable Property ContactID As Integer?
Public Overridable Property ProjectID As Integer?
Public Overridable Property ShiftPatternID As Integer?
Public Overridable Property Unit As String
End Class
Public Partial Class CostCalcResponse
Public Overridable Property Result As CostBreakdown
Public Overridable Property ResolvedInput As CostInput
Public Overridable Property CanSeePay As Boolean
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class CostInput
Public Overridable Property Base As Decimal
Public Overridable Property BillRate As Decimal
Public Overridable Property FringeCash As Decimal
Public Overridable Property FringePlan As Decimal
Public Overridable Property IsNight As Boolean
Public Overridable Property HoursPerDay As Decimal
Public Overridable Property OnDays As Integer
Public Overridable Property OnDaysExact As Decimal?
Public Overridable Property HasTravel As Boolean
Public Overridable Property PerDiemEligible As Boolean
Public Overridable Property PrevailingWage As Boolean
Public Overridable Property Jurisdiction As String
Public Overridable Property Unit As String
Public Overridable Property PriorHours As Decimal
Public Overridable Property BurdenClass As String
Public Overridable Property WcRateOverride As Decimal?
End Class
Public Partial Class CostLine
Public Overridable Property Label As String
Public Overridable Property Detail As String
Public Overridable Property Amount As Decimal
Public Overridable Property RuleId As String
End Class
End Namespace
End Namespace
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>