Skip to content

Latest commit

 

History

History
210 lines (158 loc) · 10.9 KB

TimeOffBalancesApi.md

File metadata and controls

210 lines (158 loc) · 10.9 KB

MergeHRISClient.TimeOffBalancesApi

All URIs are relative to https://api.merge.dev/api/hris/v1

Method HTTP request Description
time_off_balances_list GET /time-off-balances
time_off_balances_retrieve GET /time-off-balances/{id}

time_off_balances_list

PaginatedTimeOffBalanceList time_off_balances_list(x_account_token)

Returns a list of TimeOffBalance objects.

Example

  • Api Key Authentication (tokenAuth):
import time
import MergeHRISClient
from MergeHRISClient.api import time_off_balances_api
from MergeHRISClient.model.paginated_time_off_balance_list import PaginatedTimeOffBalanceList
from pprint import pprint
# Defining the host is optional and defaults to https://api.merge.dev/api/hris/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeHRISClient.Configuration(
    host = "https://api.merge.dev/api/hris/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with MergeHRISClient.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = time_off_balances_api.TimeOffBalancesApi(api_client)
    x_account_token = "X-Account-Token_example" # str | Token identifying the end user.
    created_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created after this datetime. (optional)
    created_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects created before this datetime. (optional)
    cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
    employee_id = "employee_id_example" # str | If provided, will only return time off balances for this employee. (optional)
    include_deleted_data = True # bool | Whether to include data that was marked as deleted by third party webhooks. (optional)
    include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional)
    modified_after = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified after this datetime. (optional)
    modified_before = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | If provided, will only return objects modified before this datetime. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    policy_type = "BEREAVEMENT" # str, none_type | If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') (optional)
    remote_fields = "policy_type" # str | Deprecated. Use show_enum_origins. (optional) if omitted the server will use the default value of "policy_type"
    remote_id = "remote_id_example" # str, none_type | The API provider's ID for the given object. (optional)
    show_enum_origins = "policy_type" # str | Which fields should be returned in non-normalized form. (optional) if omitted the server will use the default value of "policy_type"

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.time_off_balances_list(x_account_token)
        pprint(api_response)
    except MergeHRISClient.ApiException as e:
        print("Exception when calling TimeOffBalancesApi->time_off_balances_list: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.time_off_balances_list(x_account_token, created_after=created_after, created_before=created_before, cursor=cursor, employee_id=employee_id, include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, modified_after=modified_after, modified_before=modified_before, page_size=page_size, policy_type=policy_type, remote_fields=remote_fields, remote_id=remote_id, show_enum_origins=show_enum_origins)
        pprint(api_response)
    except MergeHRISClient.ApiException as e:
        print("Exception when calling TimeOffBalancesApi->time_off_balances_list: %s\n" % e)

Parameters

Name Type Description Notes
x_account_token str Token identifying the end user.
created_after datetime If provided, will only return objects created after this datetime. [optional]
created_before datetime If provided, will only return objects created before this datetime. [optional]
cursor str The pagination cursor value. [optional]
employee_id str If provided, will only return time off balances for this employee. [optional]
include_deleted_data bool Whether to include data that was marked as deleted by third party webhooks. [optional]
include_remote_data bool Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
modified_after datetime If provided, will only return objects modified after this datetime. [optional]
modified_before datetime If provided, will only return objects modified before this datetime. [optional]
page_size int Number of results to return per page. [optional]
policy_type str, none_type If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') [optional]
remote_fields str Deprecated. Use show_enum_origins. [optional] if omitted the server will use the default value of "policy_type"
remote_id str, none_type The API provider's ID for the given object. [optional]
show_enum_origins str Which fields should be returned in non-normalized form. [optional] if omitted the server will use the default value of "policy_type"

Return type

PaginatedTimeOffBalanceList

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

time_off_balances_retrieve

TimeOffBalance time_off_balances_retrieve(x_account_token, id)

Returns a TimeOffBalance object with the given id.

Example

  • Api Key Authentication (tokenAuth):
import time
import MergeHRISClient
from MergeHRISClient.api import time_off_balances_api
from MergeHRISClient.model.time_off_balance import TimeOffBalance
from pprint import pprint
# Defining the host is optional and defaults to https://api.merge.dev/api/hris/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = MergeHRISClient.Configuration(
    host = "https://api.merge.dev/api/hris/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with MergeHRISClient.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = time_off_balances_api.TimeOffBalancesApi(api_client)
    x_account_token = "X-Account-Token_example" # str | Token identifying the end user.
    id = "id_example" # str | 
    include_remote_data = True # bool | Whether to include the original data Merge fetched from the third-party to produce these models. (optional)
    remote_fields = "policy_type" # str | Deprecated. Use show_enum_origins. (optional) if omitted the server will use the default value of "policy_type"
    show_enum_origins = "policy_type" # str | Which fields should be returned in non-normalized form. (optional) if omitted the server will use the default value of "policy_type"

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.time_off_balances_retrieve(x_account_token, id)
        pprint(api_response)
    except MergeHRISClient.ApiException as e:
        print("Exception when calling TimeOffBalancesApi->time_off_balances_retrieve: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.time_off_balances_retrieve(x_account_token, id, include_remote_data=include_remote_data, remote_fields=remote_fields, show_enum_origins=show_enum_origins)
        pprint(api_response)
    except MergeHRISClient.ApiException as e:
        print("Exception when calling TimeOffBalancesApi->time_off_balances_retrieve: %s\n" % e)

Parameters

Name Type Description Notes
x_account_token str Token identifying the end user.
id str
include_remote_data bool Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
remote_fields str Deprecated. Use show_enum_origins. [optional] if omitted the server will use the default value of "policy_type"
show_enum_origins str Which fields should be returned in non-normalized form. [optional] if omitted the server will use the default value of "policy_type"

Return type

TimeOffBalance

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]