Skip to content

Latest commit

 

History

History
295 lines (196 loc) · 15.9 KB

File metadata and controls

295 lines (196 loc) · 15.9 KB

Journal

Overview

Available Operations

create_accounting_journal

Create a journal

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.journal.create_accounting_journal(request={
        "accounting_journal": {},
        "connection_id": "<id>",
    })

    assert res.accounting_journal is not None

    # Handle response
    print(res.accounting_journal)

Parameters

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

Response

operations.CreateAccountingJournalResponse

Errors

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

get_accounting_journal

Retrieve a journal

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.journal.get_accounting_journal(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.accounting_journal is not None

    # Handle response
    print(res.accounting_journal)

Parameters

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

Response

operations.GetAccountingJournalResponse

Errors

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

list_accounting_journals

List all journals

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.journal.list_accounting_journals(request={
        "connection_id": "<id>",
    })

    assert res.accounting_journals is not None

    # Handle response
    print(res.accounting_journals)

Parameters

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

Response

operations.ListAccountingJournalsResponse

Errors

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

patch_accounting_journal

Update a journal

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.journal.patch_accounting_journal(request={
        "accounting_journal": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.accounting_journal is not None

    # Handle response
    print(res.accounting_journal)

Parameters

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

Response

operations.PatchAccountingJournalResponse

Errors

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

remove_accounting_journal

Remove a journal

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.journal.remove_accounting_journal(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

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

Response

operations.RemoveAccountingJournalResponse

Errors

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

update_accounting_journal

Update a journal

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.journal.update_accounting_journal(request={
        "accounting_journal": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.accounting_journal is not None

    # Handle response
    print(res.accounting_journal)

Parameters

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

Response

operations.UpdateAccountingJournalResponse

Errors

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