MergeHRISClient.Api.TimeOff (MergeHRISClient v1.0.2) View Source

API calls for all endpoints tagged TimeOff.

Link to this section Summary

Link to this section Functions

Link to this function

time_off_create(connection, authorization, x_account_token, time_off_endpoint_request, opts \\ [])

View Source

Specs

Creates a TimeOff object with the given values.

Parameters

  • connection (MergeHRISClient.Connection): Connection to server
  • authorization (String.t): Should include 'Bearer ' followed by your production API Key.
  • x_account_token (String.t): Token identifying the end user.
  • time_off_endpoint_request (TimeOffEndpointRequest):
  • opts (KeywordList): [optional] Optional parameters
    • :run_async (boolean()): Whether or not third-party updates should be run asynchronously.

      Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

time_off_list(connection, authorization, x_account_token, opts \\ [])

View Source

Specs

Returns a list of TimeOff objects.

Parameters

  • connection (MergeHRISClient.Connection): Connection to server
  • authorization (String.t): Should include 'Bearer ' followed by your production API Key.
  • x_account_token (String.t): Token identifying the end user.
  • opts (KeywordList): [optional] Optional parameters
    • :approver_id (String.t): If provided, will only return time off for this approver.
    • :created_after (DateTime.t): If provided, will only return objects created after this datetime.
    • :created_before (DateTime.t): If provided, will only return objects created before this datetime.
    • :cursor (String.t): The pagination cursor value.
    • :employee_id (String.t): If provided, will only return time off for this employee.
    • :expand (String.t): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
    • :include_deleted_data (boolean()): Whether to include data that was deleted in the third-party service.
    • :include_remote_data (boolean()): Whether to include the original data Merge fetched from the third-party to produce these models.
    • :modified_after (DateTime.t): If provided, will only return objects modified after this datetime.
    • :modified_before (DateTime.t): If provided, will only return objects modified before this datetime.
    • :page_size (integer()): Number of results to return per page.
    • :remote_id (String.t): The API provider's ID for the given object.
    • :request_type (String.t): If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT')
    • :status (String.t): If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED')

      Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

time_off_retrieve(connection, authorization, x_account_token, id, opts \\ [])

View Source

Specs

time_off_retrieve(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, MergeHRISClient.Model.TimeOff.t()} | {:error, Tesla.Env.t()}

Returns a TimeOff object with the given id.

Parameters

  • connection (MergeHRISClient.Connection): Connection to server
  • authorization (String.t): Should include 'Bearer ' followed by your production API Key.
  • x_account_token (String.t): Token identifying the end user.
  • id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :expand (String.t): Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
    • :include_remote_data (boolean()): Whether to include the original data Merge fetched from the third-party to produce these models.

      Returns

on success {:error, Tesla.Env.t} on failure