ServiceRouterAddUserPayAdjust Method | |
Namespace: AppOne.Services.V2Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax Remarks Example {
"AuthToken":"...",
"Payload":[{
"Amount":12678967.543233,
"EmpIdentifier":"1234",
"EnableHomeLaborLevelAssignment":true,
"Notes":"String_Content",
"PayAdjustmentDate":"\/Date(1484208000000)\/",
"PayAdjustmentID":14,
"Unit":12.3,
"LL01ID":3
},
{
"Amount":12678967.543233,
"EmpIdentifier":"1234",
"EnableHomeLaborLevelAssignment":true,
"Notes":"String_Content",
"PayAdjustmentDate":"\/Date(1484208000000)\/",
"PayAdjustmentID":99,
"Unit":12.3,
"LL01ID":3
}
]
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "0.2288007",
"RequestTime": "/Date(1484251152672-0700)/",
"ResponseTime": "/Date(1484251152901-0700)/",
"Results": 2
},
"Results": [
{
"ID": 110,
"Messages": ["PASS: Pay adjustment added for EmpIdentifier 1234"],
"Status": 1
},
{
"ID": 0,
"Messages": ["FAIL: Invalid PayAdjustmentID value [99] received."],
"Status": 0
}
]
}
public void V2_AddUserPayAdjust_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
List<int> payAdjustmentIds = new List<int>();
bool pass = true;
SoapServiceV2.AddUserPayAdjustRequest request1 = new SoapServiceV2.AddUserPayAdjustRequest();
List<SoapServiceV2.AddUserPayAdjustModel> payLoad = new List<AddUserPayAdjustModel>();
SoapServiceV2.AddUserPayAdjustModel payLoadItem = new AddUserPayAdjustModel
{
EmpIdentifier = "123",
EnableHomeLaborLevelAssignment = true,
PayAdjustmentID = 1,
PayAdjustmentDate = ChangeTime(DateTime.Now, 8, 0, 0, 0),
Unit = 1,
Amount = 1
};
payLoad.Add(payLoadItem);
request1.input = new SoapServiceV2.AddUserPayAdjustIn
{
AuthToken = AuthToken,
Payload = payLoad
};
SoapServiceV2.AddUserPayAdjustResponse response1 = client.AddUserPayAdjust(request1);
pass = (response1.AddUserPayAdjustResult.Results != null && response1.AddUserPayAdjustResult.Results.Count > 0) ? true : false;
Assert.IsTrue(pass);
payAdjustmentIds.Add(response1.AddUserPayAdjustResult.Results.Where(s => s.ID != 0).Select(s => s.ID).SingleOrDefault());
DeletePayAdjustments(payAdjustmentIds);
});
RunServiceClient(actionTestLogic);
}
catch (FaultException<SoapServiceV2.ServiceException> fe)
{
Assert.Fail(fe.Detail.Message);
}
}
See Also