ServiceRouterGetPayrollPayType Method | |
Namespace: AppOne.Services.V2Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax Remarks
Use this method to get a results list of
GetPayrollPayTypeModel. The
GetPayrollPayTypeModel 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 PayTypeID input values. | ["-1", "-4", "1", "8"] |
Note |
---|
Pay types contain both an internal ID labeled 'ID' and a pay type ID labeled PayTypeID
|
Example {
"AuthToken":"..==",
"DataAction":{
"Name":"SELECT-PAYID",
"Values":["-7","-8"]
}
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "0.132753",
"RequestTime": "/Date(1466109592885-0700)/",
"ResponseTime": "/Date(1466109593017-0700)/",
"Results": 2
},
"Results": [
{
"Code": "OT2",
"EndDateTime": "/Date(4102470000000-0700)/",
"ID": 175,
"IsDeleted": false,
"IsWorkType": true,
"Name": "OT2",
"PayTypeID": -7,
"StartDateTime": "/Date(1293865200000-0700)/"
},
{
"Code": "OT3",
"EndDateTime": "/Date(4102470000000-0700)/",
"ID": 176,
"IsDeleted": false,
"IsWorkType": true,
"Name": "OT3",
"PayTypeID": -8,
"StartDateTime": "/Date(1293865200000-0700)/"
}
]
}
public void V2_GetPayrollPayType_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
int countTest_1 = 0;
SoapServiceV2.GetPayrollPayTypeRequest request1 = new SoapServiceV2.GetPayrollPayTypeRequest();
request1.input = new SoapServiceV2.GetPayrollPayTypeIn
{
AuthToken = AuthToken,
DataAction = new DataAction
{
Name = "SELECT-ALL"
}
};
SoapServiceV2.GetPayrollPayTypeResponse response1 = client.GetPayrollPayType(request1);
countTest_1 = (response1.GetPayrollPayTypeResult.Results != null) ? response1.GetPayrollPayTypeResult.Results.Count : 0;
var first_id = response1.GetPayrollPayTypeResult.Results.FirstOrDefault().ID;
if (countTest_1 > 0)
{
int countTest_2 = 0;
SoapServiceV2.GetPayrollPayTypeRequest request2 = new SoapServiceV2.GetPayrollPayTypeRequest();
request2.input = new SoapServiceV2.GetPayrollPayTypeIn
{
AuthToken = AuthToken,
DataAction = new DataAction
{
Name = "SELECT-PAYID",
Values = new List<string> { first_id.ToString() }
}
};
SoapServiceV2.GetPayrollPayTypeResponse response2 = client.GetPayrollPayType(request2);
countTest_2 = (response2.GetPayrollPayTypeResult.Results != null) ? response2.GetPayrollPayTypeResult.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