Skip to content

Latest commit

 

History

History
301 lines (202 loc) · 14.5 KB

File metadata and controls

301 lines (202 loc) · 14.5 KB

Timeoff

Overview

Available Operations

create_hris_timeoff

Create a timeoff

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.timeoff.create_hris_timeoff(request={
        "hris_timeoff": {
            "user_id": "<id>",
        },
        "connection_id": "<id>",
    })

    assert res.hris_timeoff is not None

    # Handle response
    print(res.hris_timeoff)

Parameters

Parameter Type Required Description
request operations.CreateHrisTimeoffRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.CreateHrisTimeoffResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get_hris_timeoff

Retrieve a timeoff

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.timeoff.get_hris_timeoff(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.hris_timeoff is not None

    # Handle response
    print(res.hris_timeoff)

Parameters

Parameter Type Required Description
request operations.GetHrisTimeoffRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetHrisTimeoffResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

list_hris_timeoffs

List all timeoffs

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.timeoff.list_hris_timeoffs(request={
        "connection_id": "<id>",
    })

    assert res.hris_timeoffs is not None

    # Handle response
    print(res.hris_timeoffs)

Parameters

Parameter Type Required Description
request operations.ListHrisTimeoffsRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.ListHrisTimeoffsResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

patch_hris_timeoff

Update a timeoff

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.timeoff.patch_hris_timeoff(request={
        "hris_timeoff": {
            "user_id": "<id>",
        },
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.hris_timeoff is not None

    # Handle response
    print(res.hris_timeoff)

Parameters

Parameter Type Required Description
request operations.PatchHrisTimeoffRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.PatchHrisTimeoffResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

remove_hris_timeoff

Remove a timeoff

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.timeoff.remove_hris_timeoff(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request operations.RemoveHrisTimeoffRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.RemoveHrisTimeoffResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

update_hris_timeoff

Update a timeoff

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.timeoff.update_hris_timeoff(request={
        "hris_timeoff": {
            "user_id": "<id>",
        },
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.hris_timeoff is not None

    # Handle response
    print(res.hris_timeoff)

Parameters

Parameter Type Required Description
request operations.UpdateHrisTimeoffRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.UpdateHrisTimeoffResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*