Esempio n. 1
0
 /// <summary>
 /// Create or Update Employee
 /// </summary>
 /// <remarks>
 /// <p>If an ID is passed, the existing employee will be updated, otherwise a new employee will be created.
 ///             </p>
 /// <p>
 ///             NOTE: the MatchType parameter currently has no effect
 ///             </p>
 /// <p>
 ///             An employee may be created with a status of 'Incomplete' by specifying at least the minimum fields;
 ///             firstName, surname, startDate, employmentType, address details, gender, legalStatus, nationality, coveredByEmploymentAct.<br />
 ///             For an employee record to be considered 'Complete' the following groups of data are required:
 ///               <list><li>Basic Details (Name, Start Date, Date of Birth, Gender and Address Details)</li><li>Pay Run Defaults (Default Pay Category, Pay Cycle and Location)</li><li>Locations (at least one)</li><li>Bank Account/s (at least one)</li></list></p>
 /// </remarks>
 public Task <EmployeeUpdateResponseModel> CreateOrUpdateEmployeeAsync(int businessId, MyUnstructuredEmployeeModel model, CreateOrUpdateEmployeeQueryModel request, CancellationToken cancellationToken = default)
 {
     return(ApiRequestAsync <EmployeeUpdateResponseModel, MyUnstructuredEmployeeModel>($"/business/{businessId}/employee/unstructured?matchType={request.MatchType}", model, Method.POST, cancellationToken));
 }
Esempio n. 2
0
 /// <summary>
 /// Create or Update Employee
 /// </summary>
 /// <remarks>
 /// <p>If an ID is passed, the existing employee will be updated, otherwise a new employee will be created.
 ///             </p>
 /// <p>
 ///             NOTE: the MatchType parameter currently has no effect
 ///             </p>
 /// <p>
 ///             An employee may be created with a status of 'Incomplete' by specifying at least the minimum fields;
 ///             firstName, surname, startDate, employmentType, address details, gender, legalStatus, nationality, coveredByEmploymentAct.<br />
 ///             For an employee record to be considered 'Complete' the following groups of data are required:
 ///               <list><li>Basic Details (Name, Start Date, Date of Birth, Gender and Address Details)</li><li>Pay Run Defaults (Default Pay Category, Pay Cycle and Location)</li><li>Locations (at least one)</li><li>Bank Account/s (at least one)</li></list></p>
 /// </remarks>
 public EmployeeUpdateResponseModel CreateOrUpdateEmployee(int businessId, MyUnstructuredEmployeeModel model, CreateOrUpdateEmployeeQueryModel request)
 {
     return(ApiRequest <EmployeeUpdateResponseModel, MyUnstructuredEmployeeModel>($"/business/{businessId}/employee/unstructured?matchType={request.MatchType}", model, Method.POST));
 }