ServiceRouterAddUserTimeOffRequest Method | |
Namespace: AppOne.Services.V2Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax Remarks Example {
"AuthToken":"...",
"Payload":[{
"DateTimeSubmitted":"\/Date(1467270000000+0000)\/",
"EmpIdentifier":"5555",
"EmpNotes":"String_Content",
"EndDateTimeRange":"\/Date(1466146800000+0000)\/",
"HoursPerDay":8.0,
"IncludeWeekends":true,
"PayTypeID":9,
"StartDateTimeRange":"\/Date(1466060400000+0000)\/",
"StartTime":"\/Date(1466060400000+0000)\/"
}]
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "0.0391452",
"RequestTime": "/Date(1464894444981-0700)/",
"ResponseTime": "/Date(1464894445020-0700)/",
"Results": 1
},
"Results": [ {
"ID": 1003,
"Messages": ["Time Off Request Added Successfully!"],
"Status": 1
}]
}
public void V2_AddUserTimeOffRequest_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
bool pass = false;
SoapServiceV2.AddUserTimeOffRequestRequest request1 = new SoapServiceV2.AddUserTimeOffRequestRequest();
List<AddUserTimeOffRequestModel> payLoad = new List<AddUserTimeOffRequestModel>();
AddUserTimeOffRequestModel payLoadItem1 = new AddUserTimeOffRequestModel
{
DateTimeSubmitted = ChangeTime(DateTime.Now, 8, 0, 0, 0),
EmpIdentifier = "84",
EmpNotes = string.Empty,
EndDateTimeRange = ChangeTime(DateTime.Now.AddDays(2), 8, 0, 0, 0),
HoursPerDay = 8,
IncludeWeekends = false,
PayTypeID = 1,
StartDateTimeRange = ChangeTime(DateTime.Now.AddDays(1), 8, 0, 0, 0),
StartTime = ChangeTime(DateTime.Now, 8, 0, 0, 0),
};
payLoad.Add(payLoadItem1);
request1.input = new AddUserTimeOffRequestIn
{
AuthToken = AuthToken,
Payload = payLoad
};
AddUserTimeOffRequestResponse response1 = client.AddUserTimeOffRequest(request1);
pass = (response1.AddUserTimeOffRequestResult.Results != null && response1.AddUserTimeOffRequestResult.Results.Count > 0) ? true : false;
Assert.IsTrue(pass);
});
RunServiceClient(actionTestLogic);
}
catch (FaultException<SoapServiceV2.ServiceException> fe)
{
Assert.Fail(fe.Detail.Message);
}
}
See Also