-
Notifications
You must be signed in to change notification settings - Fork 1
Worker
var worker;
Paychex.Workers.get('XXXXXX').then(function(w){
worker = w;
return worker;
});Update a worker Returns the updated worker
worker.update({employmentType : 'FULL_TIME'}).then(function(worker){
console.log(worker);
});Get workers compensation pay standards Returns worker pay standards
worker.payStandards().then(function(payStandards){
console.log(payStandards);
});Get information about a workers compensation
worker.compensation().then(function(compensation){
console.log(compensation);
});Get communications Returns an array of communications for a worker
worker.communications().then(function(communications){
console.log(communications);
});Add a communication Returns a communication
worker.communications().then(function(communications){
console.log(communications);
});Get a communication by communicationId Returns a communication
worker.communication('XXXXXX').then(function(communication){
console.log(communication);
});Update a communication Returns a communication
worker.communication('XXXXXX',{}).then(function(communication){
console.log(communication);
});Delete a communication by communicationId
worker.deleteCommunication('XXXXXX').then(function(result){
console.log(result);
});Get Workers compensation pay rates profile
worker.payRates().then(function(payRates){
console.log(payRates);
});Add a pay rate Returns the single newly added workers compensation rate.
worker.payRates(data).then(function(payRate){
console.log(payRate);
});Get a pay rate by rateId Returns a pay rate
worker.payRate('XXXXXX').then(function(payRate){
console.log(payRate);
});Update a pay rate Returns updated pay rate
worker.payRate('XXXXXX',update).then(function(payRate){
console.log(payRate);
});Delete a pay rate by rateId
worker.deletePayRate('XXXXXX').then(function(result){
console.log(result);
});Get Workers direct deposits
worker.directDeposits().then(function(directDeposits){
console.log(directDeposits);
});Add a direct deposit Returns the single newly added direct deposit.
worker.directDeposits(data).then(function(directDeposit){
console.log(directDeposit);
});Get a direct deposit by directDepositId Returns a direct deposit
worker.directDeposit('XXXXXX').then(function(directDeposit){
console.log(directDeposit);
});Update a direct deposit Returns updated direct deposit
worker.directDeposit('XXXXXX',update).then(function(directDeposit){
console.log(directDeposit);
});Delete a direct deposit by directDepositId
worker.deleteDirectDeposit('XXXXXX').then(function(result){
console.log(result);
});Get check(s) that are for a specific worker within a pay period that has not been processed
worker.checks('XXXXXX').then(function(checks){
console.log(checks);
});Add a check to a worker
earnings object needs to define as one of the following :
- payHours: Will use the default hourly rate defined on the worker to apply the hours against.
- payHours & payRate: Will allow you to define the monetary rate that the hours will be applied against.
- payHours & payRateId: Will allow you to define which workers predefined pay rate the hours will be applied against.
- payUnits: Will use the default hourly rate defined on the worker to apply the units against.
- payUnits & payRate: Will allow you to define the monetary rate that the units will be applied against.
- payUnits & payRateId: Will allow you to define which workers predefined pay rate the units will be applied against.
- payAmount: Will allow you to define straight monetary amount.
worker.checks('XXXXX', earnings).then(function(check){
console.log(check);
});Get a check by checkId Returns a check
worker.check('XXXXXX').then(function(check){
console.log(check);
});Delete a check by checkId
worker.deleteCheck('XXXXXX').then(function(result){
console.log(result);
});