createEmployee method
Future<EmployeeModel>
createEmployee(
- NewEmployeeModel employeeModel, {
- required Object authorization,
Parameters:
-
NewEmployeeModel employeeModel (required):
-
Object authorization:
Implementation
Future<EmployeeModel> createEmployee(
NewEmployeeModel employeeModel, {
required Object authorization,
}) async {
final response = await _createEmployeeWithHttpInfo(
employeeModel,
authorization: authorization,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'EmployeeModel',
) as EmployeeModel;
}