WSPayrollPayAdjustGetPayrollPayAdjust Method | |
Namespace: AppOne.Services.V2.MethodsAssembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax Remarks
Use this method to get a results list of
GetPayrollPayAdjustModel. The
GetPayrollPayAdjustModel contains the meta data necessary
to report on payroll pay types
DataAction Names
Name | Description | Values Example |
---|
SELECT-ALL | Returns all pay types in system regardless of any state. | [ignored] |
SELECT-ACTIVE | Returns only the payroll pay types that are active. | [ignored] |
SELECT-PAYID | Returns only the payroll pay types by the PayAdjustID input values. | ["-1", "-4", "1", "8"] |
Example {
"AuthToken":"...==",
"DataAction":{
"Name":"SELECT-PAYID",
"Values":["1", "10"]
}
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "0.0088903",
"RequestTime": "/Date(1469577225208-0700)/",
"ResponseTime": "/Date(1469577225217-0700)/",
"Results": 2
},
"Results": [
{
"Code": "F",
"EndDateTime": "/Date(4102470000000-0700)/",
"ID": 83,
"IsDeduction": false,
"IsDeleted": false,
"Name": "Fuel",
"PayAdjustID": 1,
"StartDateTime": "/Date(1311750000000-0700)/"
},
{
"Code": "HRA ",
"EndDateTime": "/Date(4102556399000-0700)/",
"ID": 101,
"IsDeduction": false,
"IsDeleted": false,
"Name": "HRA 001",
"PayAdjustID": 10,
"StartDateTime": "/Date(1342162800000-0700)/"
}
]
}
public void V2_GetPayrollPayAdjust_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
int countTest_1 = 0;
SoapServiceV2.GetPayrollPayAdjustRequest request1 = new SoapServiceV2.GetPayrollPayAdjustRequest();
request1.input = new SoapServiceV2.GetPayrollPayAdjustIn
{
AuthToken = AuthToken,
DataAction = new DataAction
{
Name = "SELECT-ALL"
}
};
SoapServiceV2.GetPayrollPayAdjustResponse response1 = client.GetPayrollPayAdjust(request1);
countTest_1 = (response1.GetPayrollPayAdjustResult.Results != null) ? response1.GetPayrollPayAdjustResult.Results.Count : 0;
var first_id = response1.GetPayrollPayAdjustResult.Results.FirstOrDefault().ID;
if (countTest_1 > 0)
{
int countTest_2 = 0;
SoapServiceV2.GetPayrollPayAdjustRequest request2 = new SoapServiceV2.GetPayrollPayAdjustRequest();
request2.input = new SoapServiceV2.GetPayrollPayAdjustIn
{
AuthToken = AuthToken,
DataAction = new DataAction
{
Name = "SELECT-PAYID",
Values = new List<string> { first_id.ToString() }
}
};
SoapServiceV2.GetPayrollPayAdjustResponse response2 = client.GetPayrollPayAdjust(request2);
countTest_2 = (response2.GetPayrollPayAdjustResult.Results != null) ? response2.GetPayrollPayAdjustResult.Results.Count : 0;
Assert.IsTrue(countTest_1 > 0);
}
else
{
Assert.IsTrue(countTest_1 > 0);
}
});
RunServiceClient(actionTestLogic);
}
catch (FaultException<SoapServiceV2.ServiceException> fe)
{
Assert.Fail(fe.Detail.Message);
}
}
See Also