Service |
public GetTimePunchStateOut GetTimePunchState( GetTimePunchStateIn input )
Name | Description | Values Example |
---|---|---|
SELECT-EMPID | Returns only the users with the specified employee ID passed in the values property. | "abc-123","123","efg"... |
Caution |
---|
Please note the following 1. The preference policy of a user will control how the punch types can be displayed. 2. The payroll policy of a user will control which punch types are available. Please validate the Preference/Payroll policy of each employee if results are not coming back as expected |
Note |
---|
Business Rules: Punching in and out is the core of the time-web system. The WSTime class encapsulate the needed methods/operations to interact with a users time entry. Users can be assigned to different preferences and policies. These policies are what will affect the results of a users time entry into the system. Setup: Employee > Dashboard Manager > Time Cards |
//EXAMPLE: Get the selected users punch state { "AuthToken":"...", "DataAction":{ "Name":"SELECT-EMPID", "Values":["1234", "1337"] } }
//EXAMPLE: Response for two requested users { "Report": { "ProcessTime": "0.2025195", "RequestTime": "/Date(1430773866067-0700)/", "ResponseTime": "/Date(1430773866269-0700)/", "Results": 2 }, "Results": [ { "EmpIdentifier": "1234", "PunchTypeId": "6,7,4,5,8,3,2", "PunchTypeName": "StartBreak,EndBreak,StartLunch,EndLunch,Transfer,ClockOut,ClockIn", "PunchStatus": "Blocked", "PunchMessage": "User is not eligible for a Begin Meal until 5/4/2015 3:42:00 PM" }, { "EmpIdentifier": "1337", "PunchTypeId": "2,8,3", "PunchTypeName": "ClockIn,Transfer,ClockOut", "PunchStatus": "Valid", "PunchMessage": "" } ] }
SoapServiceV2.GetTimePunchStateRequest request = new SoapServiceV2.GetTimePunchStateRequest(); request.input = new SoapServiceV2.GetTimePunchStateIn() { AuthToken = AuthToken, DataAction = new DataAction() { Name = "SELECT-EMPID", Values = new List<string>() { "1234", "5555"} } }; SoapServiceV2.GetTimePunchStateResponse response = client.GetTimePunchState(request); Assert.IsTrue((response.GetTimePunchStateResult.Results != null ? response.GetTimePunchStateResult.Results.Count : 0) > 0);