"""
    Cloudbeds Accounting Service API

    The Cloudbeds Accounting Service API provides programmatic access to financial data and operations for hospitality properties. Use this API to manage transactions, folios, deposits, accounts receivable ledgers, trial balances, and related accounting configuration.  **Key concepts:** - **Transactions** represent individual financial entries (charges, payments,   taxes, fees) associated with a source such as a reservation, group profile,   or house account.  - **Folios** organize transactions into logical groups within a source. You   can create custom folios and move or route transactions between them.  - **Source Balances** provide a real-time financial summary (charges, payments,   balance due, tax/fee breakdowns) for a reservation, group profile, house   account, or accounts receivable ledger.  - **Accounts Receivable (AR) Ledgers** track outstanding balances that have   been transferred from reservations or group profiles for later collection.  - **Trial Balance** is a daily financial reconciliation report that summarizes   ledger activity across guest, deposit, and AR ledgers.  - **Custom Codes** let you map Cloudbeds internal transaction codes to your   own chart-of-accounts codes and general ledger codes.   **Authentication:** All endpoints require a valid OAuth2 bearer token. Endpoints are protected by scopes: `read:payment` for read operations and `write:payment` for mutating operations. A few search endpoints use POST with a request body to support complex filter criteria; these require the `read:payment` scope.  **Base URL:** Use `https://api.cloudbeds.com` for production and `https://api.cloudbeds-stage.com` for staging. All endpoint paths are prefixed with `/accounting/v1.0`.  **Property context:** Every request must include the `X-Property-ID` header to identify which property the request applies to.  **Monetary amounts:** Unless otherwise noted, monetary amounts are expressed in the smallest currency unit (e.g., cents for USD). Use the `currencyScale` field to determine the number of decimal places.  **Pagination:** Paginated endpoints return a `nextPageToken` value. Pass this token in subsequent requests to retrieve the next page of results. When `nextPageToken` is null or absent, you have reached the last page. 

    The version of the OpenAPI document: v0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictInt, StrictStr
from typing import Optional
from typing_extensions import Annotated
from cloudbeds_accounting.models.async_event_response import AsyncEventResponse
from cloudbeds_accounting.models.deposit_balance_response import DepositBalanceResponse
from cloudbeds_accounting.models.extended_transaction_paginated import ExtendedTransactionPaginated
from cloudbeds_accounting.models.get_deposit_transactions_filter_parameter import GetDepositTransactionsFilterParameter
from cloudbeds_accounting.models.source_kind import SourceKind
from cloudbeds_accounting.models.transfer_deposit_post_request import TransferDepositPostRequest

from cloudbeds_accounting.api_client import ApiClient, RequestSerialized
from cloudbeds_accounting.api_response import ApiResponse
from cloudbeds_accounting.rest import RESTResponseType


class DepositsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def get_deposit_balance(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        source_id: Annotated[Optional[StrictInt], Field(description="Identifier of the source to get the deposit balance for (e.g., a reservation ID). Omit along with sourceKind to get the property-wide deposit balance. ")] = None,
        source_kind: Annotated[Optional[SourceKind], Field(description="Type of the source entity. Required when sourceId is provided. ")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> DepositBalanceResponse:
        """Get deposit balance

        Retrieve the deposit balance for a specific source or the entire property. To get the balance for a specific reservation or other source, provide both sourceId and sourceKind. To get the aggregate deposit balance for the whole property, omit both parameters. The response includes the posted balance and pending balance in the smallest currency unit. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param source_id: Identifier of the source to get the deposit balance for (e.g., a reservation ID). Omit along with sourceKind to get the property-wide deposit balance. 
        :type source_id: int
        :param source_kind: Type of the source entity. Required when sourceId is provided. 
        :type source_kind: SourceKind
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_deposit_balance_serialize(
            x_property_id=x_property_id,
            source_id=source_id,
            source_kind=source_kind,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DepositBalanceResponse",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_deposit_balance_with_http_info(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        source_id: Annotated[Optional[StrictInt], Field(description="Identifier of the source to get the deposit balance for (e.g., a reservation ID). Omit along with sourceKind to get the property-wide deposit balance. ")] = None,
        source_kind: Annotated[Optional[SourceKind], Field(description="Type of the source entity. Required when sourceId is provided. ")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[DepositBalanceResponse]:
        """Get deposit balance

        Retrieve the deposit balance for a specific source or the entire property. To get the balance for a specific reservation or other source, provide both sourceId and sourceKind. To get the aggregate deposit balance for the whole property, omit both parameters. The response includes the posted balance and pending balance in the smallest currency unit. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param source_id: Identifier of the source to get the deposit balance for (e.g., a reservation ID). Omit along with sourceKind to get the property-wide deposit balance. 
        :type source_id: int
        :param source_kind: Type of the source entity. Required when sourceId is provided. 
        :type source_kind: SourceKind
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_deposit_balance_serialize(
            x_property_id=x_property_id,
            source_id=source_id,
            source_kind=source_kind,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DepositBalanceResponse",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_deposit_balance_without_preload_content(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        source_id: Annotated[Optional[StrictInt], Field(description="Identifier of the source to get the deposit balance for (e.g., a reservation ID). Omit along with sourceKind to get the property-wide deposit balance. ")] = None,
        source_kind: Annotated[Optional[SourceKind], Field(description="Type of the source entity. Required when sourceId is provided. ")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get deposit balance

        Retrieve the deposit balance for a specific source or the entire property. To get the balance for a specific reservation or other source, provide both sourceId and sourceKind. To get the aggregate deposit balance for the whole property, omit both parameters. The response includes the posted balance and pending balance in the smallest currency unit. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param source_id: Identifier of the source to get the deposit balance for (e.g., a reservation ID). Omit along with sourceKind to get the property-wide deposit balance. 
        :type source_id: int
        :param source_kind: Type of the source entity. Required when sourceId is provided. 
        :type source_kind: SourceKind
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_deposit_balance_serialize(
            x_property_id=x_property_id,
            source_id=source_id,
            source_kind=source_kind,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DepositBalanceResponse",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_deposit_balance_serialize(
        self,
        x_property_id,
        source_id,
        source_kind,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if source_id is not None:
            
            _query_params.append(('sourceId', source_id))
            
        if source_kind is not None:
            
            _query_params.append(('sourceKind', source_kind.value))
            
        # process the header parameters
        if x_property_id is not None:
            _header_params['X-Property-ID'] = x_property_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/accounting/v1.0/deposits/balance',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_deposit_transactions(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        page_token: Annotated[Optional[StrictStr], Field(description="Opaque token for cursor-based pagination. Pass the `nextPageToken` value from a previous response to retrieve the next page. Omit this parameter (or pass null) for the first page. ")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page. If not specified, the server uses a default page size. ")] = None,
        filter: Optional[GetDepositTransactionsFilterParameter] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ExtendedTransactionPaginated:
        """List deposit transactions

        Retrieve a paginated list of deposit transactions for a property. You can filter by transaction state, reservation, date ranges (transaction date, check-in, check-out), reservation status, and user. Use this endpoint to review deposit activity including payments received, transfers, and refunds. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param page_token: Opaque token for cursor-based pagination. Pass the `nextPageToken` value from a previous response to retrieve the next page. Omit this parameter (or pass null) for the first page. 
        :type page_token: str
        :param page_size: Number of results to return per page. If not specified, the server uses a default page size. 
        :type page_size: int
        :param filter:
        :type filter: GetDepositTransactionsFilterParameter
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_deposit_transactions_serialize(
            x_property_id=x_property_id,
            page_token=page_token,
            page_size=page_size,
            filter=filter,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExtendedTransactionPaginated",
            '400': "ApiAccountingError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_deposit_transactions_with_http_info(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        page_token: Annotated[Optional[StrictStr], Field(description="Opaque token for cursor-based pagination. Pass the `nextPageToken` value from a previous response to retrieve the next page. Omit this parameter (or pass null) for the first page. ")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page. If not specified, the server uses a default page size. ")] = None,
        filter: Optional[GetDepositTransactionsFilterParameter] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ExtendedTransactionPaginated]:
        """List deposit transactions

        Retrieve a paginated list of deposit transactions for a property. You can filter by transaction state, reservation, date ranges (transaction date, check-in, check-out), reservation status, and user. Use this endpoint to review deposit activity including payments received, transfers, and refunds. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param page_token: Opaque token for cursor-based pagination. Pass the `nextPageToken` value from a previous response to retrieve the next page. Omit this parameter (or pass null) for the first page. 
        :type page_token: str
        :param page_size: Number of results to return per page. If not specified, the server uses a default page size. 
        :type page_size: int
        :param filter:
        :type filter: GetDepositTransactionsFilterParameter
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_deposit_transactions_serialize(
            x_property_id=x_property_id,
            page_token=page_token,
            page_size=page_size,
            filter=filter,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExtendedTransactionPaginated",
            '400': "ApiAccountingError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_deposit_transactions_without_preload_content(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        page_token: Annotated[Optional[StrictStr], Field(description="Opaque token for cursor-based pagination. Pass the `nextPageToken` value from a previous response to retrieve the next page. Omit this parameter (or pass null) for the first page. ")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page. If not specified, the server uses a default page size. ")] = None,
        filter: Optional[GetDepositTransactionsFilterParameter] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List deposit transactions

        Retrieve a paginated list of deposit transactions for a property. You can filter by transaction state, reservation, date ranges (transaction date, check-in, check-out), reservation status, and user. Use this endpoint to review deposit activity including payments received, transfers, and refunds. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param page_token: Opaque token for cursor-based pagination. Pass the `nextPageToken` value from a previous response to retrieve the next page. Omit this parameter (or pass null) for the first page. 
        :type page_token: str
        :param page_size: Number of results to return per page. If not specified, the server uses a default page size. 
        :type page_size: int
        :param filter:
        :type filter: GetDepositTransactionsFilterParameter
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_deposit_transactions_serialize(
            x_property_id=x_property_id,
            page_token=page_token,
            page_size=page_size,
            filter=filter,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExtendedTransactionPaginated",
            '400': "ApiAccountingError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_deposit_transactions_serialize(
        self,
        x_property_id,
        page_token,
        page_size,
        filter,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if filter is not None:
            
            _query_params.append(('filter', filter))
            
        # process the header parameters
        if x_property_id is not None:
            _header_params['X-Property-ID'] = x_property_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/accounting/v1.0/deposits/transactions',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def post_deposits_transfer(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        transfer_deposit_post_request: TransferDepositPostRequest,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> AsyncEventResponse:
        """Transfer deposit transactions

        Transfer one or more deposit transactions to the guest ledger. Provide the transaction IDs of the deposits you want to transfer. This operation is processed asynchronously; the response includes an event ID you can use to track the result. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param transfer_deposit_post_request: (required)
        :type transfer_deposit_post_request: TransferDepositPostRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_deposits_transfer_serialize(
            x_property_id=x_property_id,
            transfer_deposit_post_request=transfer_deposit_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AsyncEventResponse",
            '400': "ApiAccountingError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def post_deposits_transfer_with_http_info(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        transfer_deposit_post_request: TransferDepositPostRequest,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[AsyncEventResponse]:
        """Transfer deposit transactions

        Transfer one or more deposit transactions to the guest ledger. Provide the transaction IDs of the deposits you want to transfer. This operation is processed asynchronously; the response includes an event ID you can use to track the result. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param transfer_deposit_post_request: (required)
        :type transfer_deposit_post_request: TransferDepositPostRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_deposits_transfer_serialize(
            x_property_id=x_property_id,
            transfer_deposit_post_request=transfer_deposit_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AsyncEventResponse",
            '400': "ApiAccountingError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def post_deposits_transfer_without_preload_content(
        self,
        x_property_id: Annotated[StrictInt, Field(description="Unique identifier of the property. Required for all requests to scope data to a specific property. ")],
        transfer_deposit_post_request: TransferDepositPostRequest,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Transfer deposit transactions

        Transfer one or more deposit transactions to the guest ledger. Provide the transaction IDs of the deposits you want to transfer. This operation is processed asynchronously; the response includes an event ID you can use to track the result. 

        :param x_property_id: Unique identifier of the property. Required for all requests to scope data to a specific property.  (required)
        :type x_property_id: int
        :param transfer_deposit_post_request: (required)
        :type transfer_deposit_post_request: TransferDepositPostRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_deposits_transfer_serialize(
            x_property_id=x_property_id,
            transfer_deposit_post_request=transfer_deposit_post_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "AsyncEventResponse",
            '400': "ApiAccountingError",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _post_deposits_transfer_serialize(
        self,
        x_property_id,
        transfer_deposit_post_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        if x_property_id is not None:
            _header_params['X-Property-ID'] = x_property_id
        # process the form parameters
        # process the body parameter
        if transfer_deposit_post_request is not None:
            _body_params = transfer_deposit_post_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/accounting/v1.0/deposits/transfer',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


