# This file was auto-generated by Fern from our API Definition.

import typing
from json.decoder import JSONDecodeError

from ..core.api_error import ApiError
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.http_response import AsyncHttpResponse, HttpResponse
from ..core.jsonable_encoder import jsonable_encoder
from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
from ..errors.bad_request_error import BadRequestError
from ..errors.internal_server_error import InternalServerError
from ..errors.service_unavailable_error import ServiceUnavailableError
from ..errors.unauthorized_error import UnauthorizedError
from ..types.file import File
from ..types.payabli_api_response import PayabliApiResponse
from .types.export_format_1 import ExportFormat1


class RawExportClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._client_wrapper = client_wrapper

    def export_applications(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of boarding applications for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `createdAt` (gt, ge, lt, le, eq, ne)
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `dbaname`  (ct, nct)
            - `legalname`  (ct, nct)
            - `ein`  (ct, nct)
            - `address`  (ct, nct)
            - `city`  (ct, nct)
            - `state`  (ct, nct)
            - `phone`  (ct, nct)
            - `mcc`  (ct, nct)
            - `owntype`  (ct, nct)
            - `ownerName`  (ct, nct)
            - `contactName`  (ct, nct)
            - `status`  (eq, ne)
            - `orgParentname`  (ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - `limitRecord` : max number of records for query (default="20", "0" or negative value for all)
            - `fromRecord` : initial record in query

            Example: `dbaname(ct)=hoa` returns all records with a `dbaname` containing "hoa"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/boarding/{jsonable_encoder(format)}/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_batch_details(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**

              - `settlementDate` (gt, ge, lt, le, eq, ne)
              - `depositDate` (gt, ge, lt, le, eq, ne)
              - `transId`  (ne, eq, ct, nct)
              - `gatewayTransId`  (ne, eq, ct, nct)
              - `method`   (in, nin, eq, ne)
              - `settledAmount`  (gt, ge, lt, le, eq, ne)
              - `operation`    (in, nin, eq, ne)
              - `source`   (in, nin, eq, ne)
              - `batchNumber`  (ct, nct, eq, ne)
              - `payaccountLastfour`   (nct, ct)
              - `payaccountType`   (ne, eq, in, nin)
              - `customerFirstname`   (ct, nct, eq, ne)
              - `customerLastname`    (ct, nct, eq, ne)
              - `customerName`   (ct, nct)
              - `customerId`  (eq, ne)
              - `customerNumber`  (ct, nct, eq, ne)
              - `customerCompanyname`    (ct, nct, eq, ne)
              - `customerAddress` (ct, nct, eq, ne)
              - `customerCity`    (ct, nct, eq, ne)
              - `customerZip` (ct, nct, eq, ne)
              - `customerState` (ct, nct, eq, ne)
              - `customerCountry` (ct, nct, eq, ne)
              - `customerPhone` (ct, nct, eq, ne)
              - `customerEmail` (ct, nct, eq, ne)
              - `customerShippingAddress` (ct, nct, eq, ne)
              - `customerShippingCity`    (ct, nct, eq, ne)
              - `customerShippingZip` (ct, nct, eq, ne)
              - `customerShippingState` (ct, nct, eq, ne)
              - `customerShippingCountry` (ct, nct, eq, ne)
              - `orgId`  (eq) *mandatory when entry=org*
              - `isHold` (eq, ne)
              - `paypointId`  (ne, eq)
              - `paypointLegal`  (ne, eq, ct, nct)
              - `paypointDba`  (ne, eq, ct, nct)
              - `orgName`  (ne, eq, ct, nct)
              - `batchId` (ct, nct, eq, neq)
              - `additional-xxx`  (ne, eq, ct, nct) where xxx is the additional field name

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `amount(gt)=20` return all records with amount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/batchDetails/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_batch_details_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**

              - `settlementDate` (gt, ge, lt, le, eq, ne)
              - `depositDate` (gt, ge, lt, le, eq, ne)
              - `transId`  (ne, eq, ct, nct)
              - `gatewayTransId`  (ne, eq, ct, nct)
              - `method`   (in, nin, eq, ne)
              - `settledAmount`  (gt, ge, lt, le, eq, ne)
              - `operation`    (in, nin, eq, ne)
              - `source`   (in, nin, eq, ne)
              - `batchNumber`  (ct, nct, eq, ne)
              - `payaccountLastfour`   (nct, ct)
              - `payaccountType`   (ne, eq, in, nin)
              - `customerFirstname`   (ct, nct, eq, ne)
              - `customerLastname`    (ct, nct, eq, ne)
              - `customerName`   (ct, nct)
              - `customerId`  (eq, ne)
              - `customerNumber`  (ct, nct, eq, ne)
              - `customerCompanyname`    (ct, nct, eq, ne)
              - `customerAddress` (ct, nct, eq, ne)
              - `customerCity`    (ct, nct, eq, ne)
              - `customerZip` (ct, nct, eq, ne)
              - `customerState` (ct, nct, eq, ne)
              - `customerCountry` (ct, nct, eq, ne)
              - `customerPhone` (ct, nct, eq, ne)
              - `customerEmail` (ct, nct, eq, ne)
              - `customerShippingAddress` (ct, nct, eq, ne)
              - `customerShippingCity`    (ct, nct, eq, ne)
              - `customerShippingZip` (ct, nct, eq, ne)
              - `customerShippingState` (ct, nct, eq, ne)
              - `customerShippingCountry` (ct, nct, eq, ne)
              - `orgId`  (eq) *mandatory when entry=org*
              - `isHold` (eq, ne)
              - `paypointId`  (ne, eq)
              - `paypointLegal`  (ne, eq, ct, nct)
              - `paypointDba`  (ne, eq, ct, nct)
              - `orgName`  (ne, eq, ct, nct)
              - `batchId` (ct, nct, eq, neq)
              - `additional-xxx`  (ne, eq, ct, nct) where xxx is the additional field name

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `amount(gt)=20` return all records with amount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/batchDetails/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_batches(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of batches for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `batchDate` (gt, ge, lt, le, eq, ne)
            - `batchNumber` (ne, eq)
            - `connectorName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `batchAmount` (gt, ge, lt, le, eq, ne)
            - `feeBatchAmount` (gt, ge, lt, le, eq, ne)
            - `netBatchAmount` (gt, ge, lt, le, eq, ne)
            - `releaseAmount` (gt, ge, lt, le, eq, ne)
            - `heldAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `paypointId` (ne, eq)
            - `externalPaypointID` (ct, nct, eq, ne)
            - `expectedDepositDate` (gt, ge, lt, le, eq, ne)
            - `batchRecords` (gt, ge, lt, le, eq, ne)
            - `transferId` (ne, eq)
            - `transferDate` (gt, ge, lt, le, eq, ne)
            - `grossAmount` (gt, ge, lt, le, eq, ne)
            - `chargeBackAmount` (gt, ge, lt, le, eq, ne)
            - `returnedAmount` (gt, ge, lt, le, eq, ne)
            - `billingFeeAmount` (gt, ge, lt, le, eq, ne)
            - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)
            - `netFundedAmount` (gt, ge, lt, le, eq, ne)
            - `adjustmentAmount` (gt, ge, lt, le, eq, ne)
            - `processor` (ne, eq, ct, nct)
            - `transferStatus` (ne, eq, in, nin)

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/batches/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_batches_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of batches for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>
            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `batchDate` (gt, ge, lt, le, eq, ne)
            - `batchNumber` (ne, eq)
            - `connectorName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `batchAmount` (gt, ge, lt, le, eq, ne)
            - `feeBatchAmount` (gt, ge, lt, le, eq, ne)
            - `netBatchAmount` (gt, ge, lt, le, eq, ne)
            - `releaseAmount` (gt, ge, lt, le, eq, ne)
            - `heldAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `paypointId` (ne, eq)
            - `externalPaypointID` (ct, nct, eq, ne)
            - `expectedDepositDate` (gt, ge, lt, le, eq, ne)
            - `batchRecords` (gt, ge, lt, le, eq, ne)
            - `transferId` (ne, eq)
            - `transferDate` (gt, ge, lt, le, eq, ne)
            - `grossAmount` (gt, ge, lt, le, eq, ne)
            - `chargeBackAmount` (gt, ge, lt, le, eq, ne)
            - `returnedAmount` (gt, ge, lt, le, eq, ne)
            - `billingFeeAmount` (gt, ge, lt, le, eq, ne)
            - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)
            - `netFundedAmount` (gt, ge, lt, le, eq, ne)
            - `adjustmentAmount` (gt, ge, lt, le, eq, ne)
            - `processor` (ne, eq, ct, nct)
            - `transferStatus` (ne, eq, in, nin)

            List of parameters accepted:
            - `limitRecord`: max number of records for query (default="20", "0" or negative value for all)
            - `fromRecord`: initial record in query
            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/batches/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_batches_out(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of money out batches for a paypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
              - `batchDate` (gt, ge, lt, le, eq, ne)
              - `batchNumber` (ne, eq)
              - `batchAmount` (gt, ge, lt, le, eq, ne)
              - `status` (in, nin, eq, ne)
              - `paypointLegal` (ne, eq, ct, nct)
              - `paypointDba` (ne, eq, ct, nct)
              - `orgName` (ne, eq, ct, nct, nin, in)
              - `paypointId` (ne, eq)
              - `externalPaypointID` (ct, nct, eq, ne)
            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/batchesOut/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_batches_out_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of money out batches for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
              - `batchDate` (gt, ge, lt, le, eq, ne)
              - `batchNumber` (ne, eq)
              - `batchAmount` (gt, ge, lt, le, eq, ne)
              - `status` (in, nin, eq, ne)
              - `paypointLegal` (ne, eq, ct, nct)
              - `paypointDba` (ne, eq, ct, nct)
              - `orgName` (ne, eq, ct, nct, nin, in)
              - `paypointId` (ne, eq)
              - `externalPaypointID` (ct, nct, eq, ne)
            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/batchesOut/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_bills(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of bills for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `billNumber` (ct, nct, eq, ne)
            - `billDate` (gt, ge, lt, le, eq, ne)
            - `billDueDate` (gt, ge, lt, le, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: totalAmount(gt)=20  return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/bills/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_bills_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of bills for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `billNumber` (ct, nct, eq, ne)
            - `billDate` (gt, ge, lt, le, eq, ne)
            - `billDueDate` (gt, ge, lt, le, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: totalAmount(gt)=20  return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/bills/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_chargebacks(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of chargebacks and ACH returns for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `chargebackDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `reasonCode` (in, nin, eq, ne)
            - `reason` (ct, nct, eq, ne)
            - `caseNumber` (ct, nct, eq, ne)
            - `status` (in, nin, eq, ne)
            - `accountType` (in, nin, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/chargebacks/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_chargebacks_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of chargebacks and ACH returns for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `chargebackDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `reasonCode` (in, nin, eq, ne)
            - `reason` (ct, nct, eq, ne)
            - `caseNumber` (ct, nct, eq, ne)
            - `status` (in, nin, eq, ne)
            - `accountType` (in, nin, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/chargebacks/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_customers(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of customers for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**
            - `createdDate` (gt, ge, lt, le, eq, ne)
            - `customernumber` (ne, eq, ct, nct)
            - `firstname` (ne, eq, ct, nct)
            - `lastname` (ne, eq, ct, nct)
            - `name` (ct, nct)
            - `address` (ne, eq, ct, nct)
            - `city` (ne, eq, ct, nct)
            - `country` (ne, eq, ct, nct)
            - `zip` (ne, eq, ct, nct)
            - `state` (ne, eq, ct, nct)
            - `shippingaddress` (ne, eq, ct, nct)
            - `shippingcity` (ne, eq, ct, nct)
            - `shippingcountry` (ne, eq, ct, nct)
            - `shippingzip` (ne, eq, ct, nct)
            - `shippingstate` (ne, eq, ct, nct)
            - `phone` (ne, eq, ct, nct)
            - `email` (ne, eq, ct, nct)
            - `company` (ne, eq, ct, nct)
            - `username` (ne, eq, ct, nct)
            - `balance` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            **List of comparison accepted - enclosed between parentheses:**
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            **List of parameters accepted:**
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            **Example:**
            balance(gt)=20 return all records with balance greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/customers/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_customers_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Exports a list of customers for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**
            - `createdDate` (gt, ge, lt, le, eq, ne)
            - `customernumber` (ne, eq, ct, nct)
            - `firstname` (ne, eq, ct, nct)
            - `lastname` (ne, eq, ct, nct)
            - `name` (ct, nct)
            - `address` (ne, eq, ct, nct)
            - `city` (ne, eq, ct, nct)
            - `country` (ne, eq, ct, nct)
            - `zip` (ne, eq, ct, nct)
            - `state` (ne, eq, ct, nct)
            - `shippingaddress` (ne, eq, ct, nct)
            - `shippingcity` (ne, eq, ct, nct)
            - `shippingcountry` (ne, eq, ct, nct)
            - `shippingzip` (ne, eq, ct, nct)
            - `shippingstate` (ne, eq, ct, nct)
            - `phone` (ne, eq, ct, nct)
            - `email` (ne, eq, ct, nct)
            - `company` (ne, eq, ct, nct)
            - `username` (ne, eq, ct, nct)
            - `balance` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            **List of comparison accepted - enclosed between parentheses:**
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            **List of parameters accepted:**
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            **Example:**
            balance(gt)=20 return all records with balance greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/customers/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_invoices(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export list of invoices for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
             - `invoiceDate` (gt, ge, lt, le, eq, ne)
             - `dueDate` (gt, ge, lt, le, eq, ne)
             - `sentDate` (gt, ge, lt, le, eq, ne)
             - `frequency`  (in, nin,ne, eq)
             - `invoiceType`   (eq, ne)
             - `payTerms`   (in, nin, eq, ne)
             - `paypointId`  (ne, eq)
             - `totalAmount`  (gt, ge, lt, le, eq, ne)
             - `paidAmount`  (gt, ge, lt, le, eq, ne)
             - `status`   (in, nin, eq, ne)
             - `invoiceNumber`   (ct, nct, eq, ne)
             - `purchaseOrder`   (ct, nct, eq, ne)
             - `itemProductCode` (ct, nct)
             - `itemDescription` (ct, nct)
             - `customerFirstname`   (ct, nct, eq, ne)
             - `customerLastname`    (ct, nct, eq, ne)
             - `customerName`   (ct, nct)
             - `customerId`  (eq, ne)
             - `customerNumber`  (ct, nct, eq, ne)
             - `customerCompanyname`    (ct, nct, eq, ne)
             - `customerAddress` (ct, nct, eq, ne)
             - `customerCity`    (ct, nct, eq, ne)
             - `customerZip` (ct, nct, eq, ne)
             - `customerState` (ct, nct, eq, ne)
             - `customerCountry` (ct, nct, eq, ne)
             - `customerPhone` (ct, nct, eq, ne)
             - `customerEmail` (ct, nct, eq, ne)
             - `customerShippingAddress` (ct, nct, eq, ne)
             - `customerShippingCity` (ct, nct, eq, ne)
             - `customerShippingZip` (ct, nct, eq, ne)
             - `customerShippingState` (ct, nct, eq, ne)
             - `customerShippingCountry` (ct, nct, eq, ne)
             - `orgId`  (eq)
             - `paylinkId`  (ne, eq)
             - `paypointLegal`  (ne, eq, ct, nct)
             - `paypointDba`  (ne, eq, ct, nct)
             - `orgName`  (ne, eq, ct, nct)
             - `additional-xxx`  (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
             - eq or empty => equal
             - gt => greater than
             - ge => greater or equal
             - lt => less than
             - le => less or equal
             - ne => not equal
             - ct => contains
             - nct => not contains
             - in => inside array
             - nin => not inside array

            List of parameters accepted:
             - `limitRecord` : max number of records for query (default="20", "0" or negative value for all)
             - `fromRecord` : initial record in query

            Example: `totalAmount(gt)=20` returns all records with `totalAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/invoices/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_invoices_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of invoices for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
             - `invoiceDate` (gt, ge, lt, le, eq, ne)
             - `dueDate` (gt, ge, lt, le, eq, ne)
             - `sentDate` (gt, ge, lt, le, eq, ne)
             - `frequency` (in, nin,ne, eq)
             - `invoiceType` (eq, ne)
             - `payTerms` (in, nin, eq, ne)
             - `paypointId` (ne, eq)
             - `totalAmount` (gt, ge, lt, le, eq, ne)
             - `paidAmount` (gt, ge, lt, le, eq, ne)
             - `status` (in, nin, eq, ne)
             - `invoiceNumber` (ct, nct, eq, ne)
             - `purchaseOrder` (ct, nct, eq, ne)
             - `itemProductCode` (ct, nct)
             - `itemDescription` (ct, nct)
             - `customerFirstname` (ct, nct, eq, ne)
             - `customerLastname` (ct, nct, eq, ne)
             - `customerName` (ct, nct)
             - `customerId` (eq, ne)
             - `customerNumber` (ct, nct, eq, ne)
             - `customerCompanyname` (ct, nct, eq, ne)
             - `customerAddress` (ct, nct, eq, ne)
             - `customerCity` (ct, nct, eq, ne)
             - `customerZip` (ct, nct, eq, ne)
             - `customerState` (ct, nct, eq, ne)
             - `customerCountry` (ct, nct, eq, ne)
             - `customerPhone` (ct, nct, eq, ne)
             - `customerEmail` (ct, nct, eq, ne)
             - `customerShippingAddress` (ct, nct, eq, ne)
             - `customerShippingCity` (ct, nct, eq, ne)
             - `customerShippingZip` (ct, nct, eq, ne)
             - `customerShippingState` (ct, nct, eq, ne)
             - `customerShippingCountry` (ct, nct, eq, ne)
             - `orgId` (eq)
             - `paylinkId` (ne, eq)
             - `paypointLegal` (ne, eq, ct, nct)
             - `paypointDba` (ne, eq, ct, nct)
             - `orgName` (ne, eq, ct, nct)
             - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
             - eq or empty => equal
             - gt => greater than
             - ge => greater or equal
             - lt => less than
             - le => less or equal
             - ne => not equal
             - ct => contains
             - nct => not contains
             - in => inside array
             - nin => not inside array

            List of parameters accepted:
             - limitRecord : max number of records for query (default="20", "0" or negative value for all)
             - fromRecord : initial record in query

            Example: totalAmount(gt)=20  return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/invoices/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_organizations(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of child organizations (suborganizations) for a parent organization.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `name` (ct, nct, eq, ne)
            - `type` (ne, eq)
            - `contactName` (ct, nct, eq, ne)
            - `contactTitle` (ct, nct, eq, ne)
            - `contactEmail` (ct, nct, eq, ne)
            - `contactPhone` (ct, nct, eq, ne)
            - `city` (ct, nct, eq, ne)
            - `state` (in, nin, eq, ne)
            - `address` (ct, nct, eq, ne)
            - `country` (ct, nct, eq, ne)
            - `zip` (ct, nct, eq, ne)
            - `hasBilling` any value greater than zero is taken as TRUE otherwise is FALSE
            - `hasResidual` any value greater than zero is taken as TRUE otherwise is FALSE

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: name(ct)=hoa  return all records where name contains "hoa"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/organizations/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_payout(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of payouts and their statuses for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `billNumber` (ct, nct)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: totalAmount(gt)=20 return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/payouts/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_payout_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of payouts and their details for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `billNumber` (ct, nct)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: totalAmount(gt)=20 return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/payouts/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_paypoints(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of paypoints in an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `createdAt` (gt, ge, lt, le, eq, ne)
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `dbaname` (ct, nct)
            - `legalname` (ct, nct)
            - `ein` (ct, nct)
            - `address` (ct, nct)
            - `city` (ct, nct)
            - `state` (ct, nct)
            - `phone` (ct, nct)
            - `mcc` (ct, nct)
            - `owntype` (ct, nct)
            - `ownerName` (ct, nct)
            - `contactName` (ct, nct)
            - `orgParentname` (ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `dbaname(ct)=hoa` returns all records with `dbaname` containing "hoa"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/paypoints/{jsonable_encoder(format)}/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_settlements(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of settled transactions for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `settlementDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `settledAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `batchNumber` (ct, nct, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `settledAmount(gt)=20` returns all records with a `settledAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/settlements/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_settlements_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of settled transactions for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `settlementDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `settledAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `batchNumber` (ct, nct, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `settledAmount(gt)=20` returns all records with a `settledAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/settlements/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_subscriptions(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of subscriptions for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `endDate` (gt, ge, lt, le, eq, ne)
            - `nextDate` (gt, ge, lt, le, eq, ne)
            - `frequency` (in, nin, ne, eq)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `untilcancelled` (eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/subscriptions/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_subscriptions_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of subscriptions for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `endDate` (gt, ge, lt, le, eq, ne)
            - `nextDate` (gt, ge, lt, le, eq, ne)
            - `frequency` (in, nin, ne, eq)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `untilcancelled` (eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/subscriptions/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_transactions(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of transactions for an entrypoint in a file in XLXS or CSV format. Use filters to limit results. If you don't specify a date range in the request, the last two months of data are returned.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `orderId` (ne, eq)
            - `idTrans` (ne, eq)
            - `orgId` (ne, eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `settlementStatus` (in, nin, eq, ne)
            - `batchNumber` (nct, ct)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/transactions/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_transactions_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of transactions for an org in a file in XLSX or CSV format. Use filters to limit results. If you don't specify a date range in the request, the last two months of data are returned.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `orderId` (ne, eq)
            - `idTrans` (ne, eq)
            - `orgId` (ne, eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `settlementStatus` (in, nin, eq, ne)
            - `batchNumber` (nct, ct)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/transactions/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_transfer_details(
        self,
        entry: str,
        format: ExportFormat1,
        transfer_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        sort_by: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of transfer details for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        transfer_id : int
            Transfer identifier.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:

              - `grossAmount` (gt, ge, lt, le, eq, ne)

              - `chargeBackAmount` (gt, ge, lt, le, eq, ne)

              - `returnedAmount` (gt, ge, lt, le, eq, ne)

              - `billingFeeAmount` (gt, ge, lt, le, eq, ne)

              - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)

              - `netFundedAmount` (gt, ge, lt, le, eq, ne)

              - `adjustmentAmount` (gt, ge, lt, le, eq, ne)

              - `transactionId` (eq, ne, in, nin)

              - `category` (eq, ne, ct, nct)

              - `type` (eq, ne, in, nin)

              - `method` (eq, ne, in, nin)

        sort_by : typing.Optional[str]
            The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/transferDetails/{jsonable_encoder(format)}/{jsonable_encoder(entry)}/{jsonable_encoder(transfer_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
                "sortBy": sort_by,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_transfers(
        self,
        entry: str,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        sort_by: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Get a list of transfers for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
              - `transferDate` (gt, ge, lt, le, eq, ne)

              - `grossAmount` (gt, ge, lt, le, eq, ne)

              - `chargeBackAmount` (gt, ge, lt, le, eq, ne)

              - `returnedAmount` (gt, ge, lt, le, eq, ne)

              - `billingFeeAmount` (gt, ge, lt, le, eq, ne)

              - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)

              - `netFundedAmount` (gt, ge, lt, le, eq, ne)

              - `adjustmentAmount` (gt, ge, lt, le, eq, ne)

              - `processor` (ne, eq, ct, nct)

              - `transferStatus` (ne, eq, in, nin)

              - `batchNumber` (ne, eq, ct, nct)

              - `batchId` (ne, eq, in, nin)

        sort_by : typing.Optional[str]
            The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/transfers/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
                "sortBy": sort_by,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_vendors(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of vendors for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `method` (in, nin, eq, ne)
            - `enrollmentStatus` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `name` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `phone` (ct, nct, eq, ne)
            - `email` (ct, nct, eq, ne)
            - `address` (ct, nct, eq, ne)
            - `city` (ct, nct, eq, ne)
            - `state` (ct, nct, eq, ne)
            - `country` (ct, nct, eq, ne)
            - `zip` (ct, nct, eq, ne)
            - `mcc` (ct, nct, eq, ne)
            - `locationCode` (ct, nct, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/vendors/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    def export_vendors_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HttpResponse[File]:
        """
        Export a list of vendors for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `method` (in, nin, eq, ne)
            - `enrollmentStatus` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `name` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `phone` (ct, nct, eq, ne)
            - `email` (ct, nct, eq, ne)
            - `address` (ct, nct, eq, ne)
            - `city` (ct, nct, eq, ne)
            - `state` (ct, nct, eq, ne)
            - `country` (ct, nct, eq, ne)
            - `zip` (ct, nct, eq, ne)
            - `mcc` (ct, nct, eq, ne)
            - `locationCode` (ct, nct, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[File]
            Success
        """
        _response = self._client_wrapper.httpx_client.request(
            f"Export/vendors/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return HttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)


class AsyncRawExportClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._client_wrapper = client_wrapper

    async def export_applications(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of boarding applications for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `createdAt` (gt, ge, lt, le, eq, ne)
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `dbaname`  (ct, nct)
            - `legalname`  (ct, nct)
            - `ein`  (ct, nct)
            - `address`  (ct, nct)
            - `city`  (ct, nct)
            - `state`  (ct, nct)
            - `phone`  (ct, nct)
            - `mcc`  (ct, nct)
            - `owntype`  (ct, nct)
            - `ownerName`  (ct, nct)
            - `contactName`  (ct, nct)
            - `status`  (eq, ne)
            - `orgParentname`  (ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - `limitRecord` : max number of records for query (default="20", "0" or negative value for all)
            - `fromRecord` : initial record in query

            Example: `dbaname(ct)=hoa` returns all records with a `dbaname` containing "hoa"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/boarding/{jsonable_encoder(format)}/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_batch_details(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**

              - `settlementDate` (gt, ge, lt, le, eq, ne)
              - `depositDate` (gt, ge, lt, le, eq, ne)
              - `transId`  (ne, eq, ct, nct)
              - `gatewayTransId`  (ne, eq, ct, nct)
              - `method`   (in, nin, eq, ne)
              - `settledAmount`  (gt, ge, lt, le, eq, ne)
              - `operation`    (in, nin, eq, ne)
              - `source`   (in, nin, eq, ne)
              - `batchNumber`  (ct, nct, eq, ne)
              - `payaccountLastfour`   (nct, ct)
              - `payaccountType`   (ne, eq, in, nin)
              - `customerFirstname`   (ct, nct, eq, ne)
              - `customerLastname`    (ct, nct, eq, ne)
              - `customerName`   (ct, nct)
              - `customerId`  (eq, ne)
              - `customerNumber`  (ct, nct, eq, ne)
              - `customerCompanyname`    (ct, nct, eq, ne)
              - `customerAddress` (ct, nct, eq, ne)
              - `customerCity`    (ct, nct, eq, ne)
              - `customerZip` (ct, nct, eq, ne)
              - `customerState` (ct, nct, eq, ne)
              - `customerCountry` (ct, nct, eq, ne)
              - `customerPhone` (ct, nct, eq, ne)
              - `customerEmail` (ct, nct, eq, ne)
              - `customerShippingAddress` (ct, nct, eq, ne)
              - `customerShippingCity`    (ct, nct, eq, ne)
              - `customerShippingZip` (ct, nct, eq, ne)
              - `customerShippingState` (ct, nct, eq, ne)
              - `customerShippingCountry` (ct, nct, eq, ne)
              - `orgId`  (eq) *mandatory when entry=org*
              - `isHold` (eq, ne)
              - `paypointId`  (ne, eq)
              - `paypointLegal`  (ne, eq, ct, nct)
              - `paypointDba`  (ne, eq, ct, nct)
              - `orgName`  (ne, eq, ct, nct)
              - `batchId` (ct, nct, eq, neq)
              - `additional-xxx`  (ne, eq, ct, nct) where xxx is the additional field name

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `amount(gt)=20` return all records with amount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/batchDetails/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_batch_details_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**

              - `settlementDate` (gt, ge, lt, le, eq, ne)
              - `depositDate` (gt, ge, lt, le, eq, ne)
              - `transId`  (ne, eq, ct, nct)
              - `gatewayTransId`  (ne, eq, ct, nct)
              - `method`   (in, nin, eq, ne)
              - `settledAmount`  (gt, ge, lt, le, eq, ne)
              - `operation`    (in, nin, eq, ne)
              - `source`   (in, nin, eq, ne)
              - `batchNumber`  (ct, nct, eq, ne)
              - `payaccountLastfour`   (nct, ct)
              - `payaccountType`   (ne, eq, in, nin)
              - `customerFirstname`   (ct, nct, eq, ne)
              - `customerLastname`    (ct, nct, eq, ne)
              - `customerName`   (ct, nct)
              - `customerId`  (eq, ne)
              - `customerNumber`  (ct, nct, eq, ne)
              - `customerCompanyname`    (ct, nct, eq, ne)
              - `customerAddress` (ct, nct, eq, ne)
              - `customerCity`    (ct, nct, eq, ne)
              - `customerZip` (ct, nct, eq, ne)
              - `customerState` (ct, nct, eq, ne)
              - `customerCountry` (ct, nct, eq, ne)
              - `customerPhone` (ct, nct, eq, ne)
              - `customerEmail` (ct, nct, eq, ne)
              - `customerShippingAddress` (ct, nct, eq, ne)
              - `customerShippingCity`    (ct, nct, eq, ne)
              - `customerShippingZip` (ct, nct, eq, ne)
              - `customerShippingState` (ct, nct, eq, ne)
              - `customerShippingCountry` (ct, nct, eq, ne)
              - `orgId`  (eq) *mandatory when entry=org*
              - `isHold` (eq, ne)
              - `paypointId`  (ne, eq)
              - `paypointLegal`  (ne, eq, ct, nct)
              - `paypointDba`  (ne, eq, ct, nct)
              - `orgName`  (ne, eq, ct, nct)
              - `batchId` (ct, nct, eq, neq)
              - `additional-xxx`  (ne, eq, ct, nct) where xxx is the additional field name

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `amount(gt)=20` return all records with amount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/batchDetails/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_batches(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of batches for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `batchDate` (gt, ge, lt, le, eq, ne)
            - `batchNumber` (ne, eq)
            - `connectorName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `batchAmount` (gt, ge, lt, le, eq, ne)
            - `feeBatchAmount` (gt, ge, lt, le, eq, ne)
            - `netBatchAmount` (gt, ge, lt, le, eq, ne)
            - `releaseAmount` (gt, ge, lt, le, eq, ne)
            - `heldAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `paypointId` (ne, eq)
            - `externalPaypointID` (ct, nct, eq, ne)
            - `expectedDepositDate` (gt, ge, lt, le, eq, ne)
            - `batchRecords` (gt, ge, lt, le, eq, ne)
            - `transferId` (ne, eq)
            - `transferDate` (gt, ge, lt, le, eq, ne)
            - `grossAmount` (gt, ge, lt, le, eq, ne)
            - `chargeBackAmount` (gt, ge, lt, le, eq, ne)
            - `returnedAmount` (gt, ge, lt, le, eq, ne)
            - `billingFeeAmount` (gt, ge, lt, le, eq, ne)
            - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)
            - `netFundedAmount` (gt, ge, lt, le, eq, ne)
            - `adjustmentAmount` (gt, ge, lt, le, eq, ne)
            - `processor` (ne, eq, ct, nct)
            - `transferStatus` (ne, eq, in, nin)

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/batches/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_batches_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of batches for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>
            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `batchDate` (gt, ge, lt, le, eq, ne)
            - `batchNumber` (ne, eq)
            - `connectorName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `batchAmount` (gt, ge, lt, le, eq, ne)
            - `feeBatchAmount` (gt, ge, lt, le, eq, ne)
            - `netBatchAmount` (gt, ge, lt, le, eq, ne)
            - `releaseAmount` (gt, ge, lt, le, eq, ne)
            - `heldAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `paypointId` (ne, eq)
            - `externalPaypointID` (ct, nct, eq, ne)
            - `expectedDepositDate` (gt, ge, lt, le, eq, ne)
            - `batchRecords` (gt, ge, lt, le, eq, ne)
            - `transferId` (ne, eq)
            - `transferDate` (gt, ge, lt, le, eq, ne)
            - `grossAmount` (gt, ge, lt, le, eq, ne)
            - `chargeBackAmount` (gt, ge, lt, le, eq, ne)
            - `returnedAmount` (gt, ge, lt, le, eq, ne)
            - `billingFeeAmount` (gt, ge, lt, le, eq, ne)
            - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)
            - `netFundedAmount` (gt, ge, lt, le, eq, ne)
            - `adjustmentAmount` (gt, ge, lt, le, eq, ne)
            - `processor` (ne, eq, ct, nct)
            - `transferStatus` (ne, eq, in, nin)

            List of parameters accepted:
            - `limitRecord`: max number of records for query (default="20", "0" or negative value for all)
            - `fromRecord`: initial record in query
            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/batches/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_batches_out(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of money out batches for a paypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
              - `batchDate` (gt, ge, lt, le, eq, ne)
              - `batchNumber` (ne, eq)
              - `batchAmount` (gt, ge, lt, le, eq, ne)
              - `status` (in, nin, eq, ne)
              - `paypointLegal` (ne, eq, ct, nct)
              - `paypointDba` (ne, eq, ct, nct)
              - `orgName` (ne, eq, ct, nct, nin, in)
              - `paypointId` (ne, eq)
              - `externalPaypointID` (ct, nct, eq, ne)
            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/batchesOut/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_batches_out_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of money out batches for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
              - `batchDate` (gt, ge, lt, le, eq, ne)
              - `batchNumber` (ne, eq)
              - `batchAmount` (gt, ge, lt, le, eq, ne)
              - `status` (in, nin, eq, ne)
              - `paypointLegal` (ne, eq, ct, nct)
              - `paypointDba` (ne, eq, ct, nct)
              - `orgName` (ne, eq, ct, nct, nin, in)
              - `paypointId` (ne, eq)
              - `externalPaypointID` (ct, nct, eq, ne)
            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `batchAmount(gt)=20` returns all records with a `batchAmount` greater than 20.00"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/batchesOut/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_bills(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of bills for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `billNumber` (ct, nct, eq, ne)
            - `billDate` (gt, ge, lt, le, eq, ne)
            - `billDueDate` (gt, ge, lt, le, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: totalAmount(gt)=20  return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/bills/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_bills_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of bills for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `billNumber` (ct, nct, eq, ne)
            - `billDate` (gt, ge, lt, le, eq, ne)
            - `billDueDate` (gt, ge, lt, le, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: totalAmount(gt)=20  return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/bills/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_chargebacks(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of chargebacks and ACH returns for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `chargebackDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `reasonCode` (in, nin, eq, ne)
            - `reason` (ct, nct, eq, ne)
            - `caseNumber` (ct, nct, eq, ne)
            - `status` (in, nin, eq, ne)
            - `accountType` (in, nin, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/chargebacks/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_chargebacks_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of chargebacks and ACH returns for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `chargebackDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `reasonCode` (in, nin, eq, ne)
            - `reason` (ct, nct, eq, ne)
            - `caseNumber` (ct, nct, eq, ne)
            - `status` (in, nin, eq, ne)
            - `accountType` (in, nin, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/chargebacks/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_customers(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of customers for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**
            - `createdDate` (gt, ge, lt, le, eq, ne)
            - `customernumber` (ne, eq, ct, nct)
            - `firstname` (ne, eq, ct, nct)
            - `lastname` (ne, eq, ct, nct)
            - `name` (ct, nct)
            - `address` (ne, eq, ct, nct)
            - `city` (ne, eq, ct, nct)
            - `country` (ne, eq, ct, nct)
            - `zip` (ne, eq, ct, nct)
            - `state` (ne, eq, ct, nct)
            - `shippingaddress` (ne, eq, ct, nct)
            - `shippingcity` (ne, eq, ct, nct)
            - `shippingcountry` (ne, eq, ct, nct)
            - `shippingzip` (ne, eq, ct, nct)
            - `shippingstate` (ne, eq, ct, nct)
            - `phone` (ne, eq, ct, nct)
            - `email` (ne, eq, ct, nct)
            - `company` (ne, eq, ct, nct)
            - `username` (ne, eq, ct, nct)
            - `balance` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            **List of comparison accepted - enclosed between parentheses:**
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            **List of parameters accepted:**
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            **Example:**
            balance(gt)=20 return all records with balance greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/customers/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_customers_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Exports a list of customers for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            **List of field names accepted:**
            - `createdDate` (gt, ge, lt, le, eq, ne)
            - `customernumber` (ne, eq, ct, nct)
            - `firstname` (ne, eq, ct, nct)
            - `lastname` (ne, eq, ct, nct)
            - `name` (ct, nct)
            - `address` (ne, eq, ct, nct)
            - `city` (ne, eq, ct, nct)
            - `country` (ne, eq, ct, nct)
            - `zip` (ne, eq, ct, nct)
            - `state` (ne, eq, ct, nct)
            - `shippingaddress` (ne, eq, ct, nct)
            - `shippingcity` (ne, eq, ct, nct)
            - `shippingcountry` (ne, eq, ct, nct)
            - `shippingzip` (ne, eq, ct, nct)
            - `shippingstate` (ne, eq, ct, nct)
            - `phone` (ne, eq, ct, nct)
            - `email` (ne, eq, ct, nct)
            - `company` (ne, eq, ct, nct)
            - `username` (ne, eq, ct, nct)
            - `balance` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            **List of comparison accepted - enclosed between parentheses:**
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            **List of parameters accepted:**
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            **Example:**
            balance(gt)=20 return all records with balance greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/customers/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_invoices(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export list of invoices for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
             - `invoiceDate` (gt, ge, lt, le, eq, ne)
             - `dueDate` (gt, ge, lt, le, eq, ne)
             - `sentDate` (gt, ge, lt, le, eq, ne)
             - `frequency`  (in, nin,ne, eq)
             - `invoiceType`   (eq, ne)
             - `payTerms`   (in, nin, eq, ne)
             - `paypointId`  (ne, eq)
             - `totalAmount`  (gt, ge, lt, le, eq, ne)
             - `paidAmount`  (gt, ge, lt, le, eq, ne)
             - `status`   (in, nin, eq, ne)
             - `invoiceNumber`   (ct, nct, eq, ne)
             - `purchaseOrder`   (ct, nct, eq, ne)
             - `itemProductCode` (ct, nct)
             - `itemDescription` (ct, nct)
             - `customerFirstname`   (ct, nct, eq, ne)
             - `customerLastname`    (ct, nct, eq, ne)
             - `customerName`   (ct, nct)
             - `customerId`  (eq, ne)
             - `customerNumber`  (ct, nct, eq, ne)
             - `customerCompanyname`    (ct, nct, eq, ne)
             - `customerAddress` (ct, nct, eq, ne)
             - `customerCity`    (ct, nct, eq, ne)
             - `customerZip` (ct, nct, eq, ne)
             - `customerState` (ct, nct, eq, ne)
             - `customerCountry` (ct, nct, eq, ne)
             - `customerPhone` (ct, nct, eq, ne)
             - `customerEmail` (ct, nct, eq, ne)
             - `customerShippingAddress` (ct, nct, eq, ne)
             - `customerShippingCity` (ct, nct, eq, ne)
             - `customerShippingZip` (ct, nct, eq, ne)
             - `customerShippingState` (ct, nct, eq, ne)
             - `customerShippingCountry` (ct, nct, eq, ne)
             - `orgId`  (eq)
             - `paylinkId`  (ne, eq)
             - `paypointLegal`  (ne, eq, ct, nct)
             - `paypointDba`  (ne, eq, ct, nct)
             - `orgName`  (ne, eq, ct, nct)
             - `additional-xxx`  (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
             - eq or empty => equal
             - gt => greater than
             - ge => greater or equal
             - lt => less than
             - le => less or equal
             - ne => not equal
             - ct => contains
             - nct => not contains
             - in => inside array
             - nin => not inside array

            List of parameters accepted:
             - `limitRecord` : max number of records for query (default="20", "0" or negative value for all)
             - `fromRecord` : initial record in query

            Example: `totalAmount(gt)=20` returns all records with `totalAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/invoices/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_invoices_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of invoices for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
             - `invoiceDate` (gt, ge, lt, le, eq, ne)
             - `dueDate` (gt, ge, lt, le, eq, ne)
             - `sentDate` (gt, ge, lt, le, eq, ne)
             - `frequency` (in, nin,ne, eq)
             - `invoiceType` (eq, ne)
             - `payTerms` (in, nin, eq, ne)
             - `paypointId` (ne, eq)
             - `totalAmount` (gt, ge, lt, le, eq, ne)
             - `paidAmount` (gt, ge, lt, le, eq, ne)
             - `status` (in, nin, eq, ne)
             - `invoiceNumber` (ct, nct, eq, ne)
             - `purchaseOrder` (ct, nct, eq, ne)
             - `itemProductCode` (ct, nct)
             - `itemDescription` (ct, nct)
             - `customerFirstname` (ct, nct, eq, ne)
             - `customerLastname` (ct, nct, eq, ne)
             - `customerName` (ct, nct)
             - `customerId` (eq, ne)
             - `customerNumber` (ct, nct, eq, ne)
             - `customerCompanyname` (ct, nct, eq, ne)
             - `customerAddress` (ct, nct, eq, ne)
             - `customerCity` (ct, nct, eq, ne)
             - `customerZip` (ct, nct, eq, ne)
             - `customerState` (ct, nct, eq, ne)
             - `customerCountry` (ct, nct, eq, ne)
             - `customerPhone` (ct, nct, eq, ne)
             - `customerEmail` (ct, nct, eq, ne)
             - `customerShippingAddress` (ct, nct, eq, ne)
             - `customerShippingCity` (ct, nct, eq, ne)
             - `customerShippingZip` (ct, nct, eq, ne)
             - `customerShippingState` (ct, nct, eq, ne)
             - `customerShippingCountry` (ct, nct, eq, ne)
             - `orgId` (eq)
             - `paylinkId` (ne, eq)
             - `paypointLegal` (ne, eq, ct, nct)
             - `paypointDba` (ne, eq, ct, nct)
             - `orgName` (ne, eq, ct, nct)
             - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
             - eq or empty => equal
             - gt => greater than
             - ge => greater or equal
             - lt => less than
             - le => less or equal
             - ne => not equal
             - ct => contains
             - nct => not contains
             - in => inside array
             - nin => not inside array

            List of parameters accepted:
             - limitRecord : max number of records for query (default="20", "0" or negative value for all)
             - fromRecord : initial record in query

            Example: totalAmount(gt)=20  return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/invoices/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_organizations(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of child organizations (suborganizations) for a parent organization.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `name` (ct, nct, eq, ne)
            - `type` (ne, eq)
            - `contactName` (ct, nct, eq, ne)
            - `contactTitle` (ct, nct, eq, ne)
            - `contactEmail` (ct, nct, eq, ne)
            - `contactPhone` (ct, nct, eq, ne)
            - `city` (ct, nct, eq, ne)
            - `state` (in, nin, eq, ne)
            - `address` (ct, nct, eq, ne)
            - `country` (ct, nct, eq, ne)
            - `zip` (ct, nct, eq, ne)
            - `hasBilling` any value greater than zero is taken as TRUE otherwise is FALSE
            - `hasResidual` any value greater than zero is taken as TRUE otherwise is FALSE

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: name(ct)=hoa  return all records where name contains "hoa"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/organizations/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_payout(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of payouts and their statuses for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `billNumber` (ct, nct)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: totalAmount(gt)=20 return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/payouts/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_payout_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of payouts and their details for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `status` (in, nin, eq, ne)
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `billNumber` (ct, nct)
            - `vendorNumber` (ct, nct, eq, ne)
            - `vendorName` (ct, nct, eq, ne)
            - `paymentMethod` (ct, nct, eq, ne)
            - `paymentId` (ct, nct, eq, ne)
            - `paymentgroup` (ct, nct, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: totalAmount(gt)=20 return all records with totalAmount greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/payouts/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_paypoints(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of paypoints in an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `createdAt` (gt, ge, lt, le, eq, ne)
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `dbaname` (ct, nct)
            - `legalname` (ct, nct)
            - `ein` (ct, nct)
            - `address` (ct, nct)
            - `city` (ct, nct)
            - `state` (ct, nct)
            - `phone` (ct, nct)
            - `mcc` (ct, nct)
            - `owntype` (ct, nct)
            - `ownerName` (ct, nct)
            - `contactName` (ct, nct)
            - `orgParentname` (ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `dbaname(ct)=hoa` returns all records with `dbaname` containing "hoa"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/paypoints/{jsonable_encoder(format)}/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_settlements(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of settled transactions for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `settlementDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `settledAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `batchNumber` (ct, nct, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `settledAmount(gt)=20` returns all records with a `settledAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/settlements/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_settlements_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of settled transactions for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `settlementDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `settledAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `batchNumber` (ct, nct, eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq) *mandatory when entry=org*
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord: max number of records for query (default="20", "0" or negative value for all)
            - fromRecord: initial record in query

            Example: `settledAmount(gt)=20` returns all records with a `settledAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/settlements/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_subscriptions(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of subscriptions for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `endDate` (gt, ge, lt, le, eq, ne)
            - `nextDate` (gt, ge, lt, le, eq, ne)
            - `frequency` (in, nin, ne, eq)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `untilcancelled` (eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/subscriptions/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_subscriptions_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of subscriptions for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `startDate` (gt, ge, lt, le, eq, ne)
            - `endDate` (gt, ge, lt, le, eq, ne)
            - `nextDate` (gt, ge, lt, le, eq, ne)
            - `frequency` (in, nin, ne, eq)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `status` (in, nin, eq, ne)
            - `untilcancelled` (eq, ne)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `orgId` (eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/subscriptions/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_transactions(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of transactions for an entrypoint in a file in XLXS or CSV format. Use filters to limit results. If you don't specify a date range in the request, the last two months of data are returned.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `orderId` (ne, eq)
            - `idTrans` (ne, eq)
            - `orgId` (ne, eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `settlementStatus` (in, nin, eq, ne)
            - `batchNumber` (nct, ct)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/transactions/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_transactions_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of transactions for an org in a file in XLSX or CSV format. Use filters to limit results. If you don't specify a date range in the request, the last two months of data are returned.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `transactionDate` (gt, ge, lt, le, eq, ne)
            - `transId` (ne, eq, ct, nct)
            - `gatewayTransId` (ne, eq, ct, nct)
            - `orderId` (ne, eq)
            - `idTrans` (ne, eq)
            - `orgId` (ne, eq)
            - `paypointId` (ne, eq)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)
            - `method` (in, nin, eq, ne)
            - `totalAmount` (gt, ge, lt, le, eq, ne)
            - `netAmount` (gt, ge, lt, le, eq, ne)
            - `feeAmount` (gt, ge, lt, le, eq, ne)
            - `operation` (in, nin, eq, ne)
            - `source` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `settlementStatus` (in, nin, eq, ne)
            - `batchNumber` (nct, ct)
            - `payaccountLastfour` (nct, ct)
            - `payaccountType` (ne, eq, in, nin)
            - `customerFirstname` (ct, nct, eq, ne)
            - `customerLastname` (ct, nct, eq, ne)
            - `customerName` (ct, nct)
            - `customerId` (eq, ne)
            - `customerNumber` (ct, nct, eq, ne)
            - `customerCompanyname` (ct, nct, eq, ne)
            - `customerAddress` (ct, nct, eq, ne)
            - `customerCity` (ct, nct, eq, ne)
            - `customerZip` (ct, nct, eq, ne)
            - `customerState` (ct, nct, eq, ne)
            - `customerCountry` (ct, nct, eq, ne)
            - `customerPhone` (ct, nct, eq, ne)
            - `customerEmail` (ct, nct, eq, ne)
            - `customerShippingAddress` (ct, nct, eq, ne)
            - `customerShippingCity` (ct, nct, eq, ne)
            - `customerShippingZip` (ct, nct, eq, ne)
            - `customerShippingState` (ct, nct, eq, ne)
            - `customerShippingCountry` (ct, nct, eq, ne)
            - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array
            - nin => not inside array

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/transactions/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_transfer_details(
        self,
        entry: str,
        format: ExportFormat1,
        transfer_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        sort_by: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of transfer details for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        transfer_id : int
            Transfer identifier.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:

              - `grossAmount` (gt, ge, lt, le, eq, ne)

              - `chargeBackAmount` (gt, ge, lt, le, eq, ne)

              - `returnedAmount` (gt, ge, lt, le, eq, ne)

              - `billingFeeAmount` (gt, ge, lt, le, eq, ne)

              - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)

              - `netFundedAmount` (gt, ge, lt, le, eq, ne)

              - `adjustmentAmount` (gt, ge, lt, le, eq, ne)

              - `transactionId` (eq, ne, in, nin)

              - `category` (eq, ne, ct, nct)

              - `type` (eq, ne, in, nin)

              - `method` (eq, ne, in, nin)

        sort_by : typing.Optional[str]
            The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/transferDetails/{jsonable_encoder(format)}/{jsonable_encoder(entry)}/{jsonable_encoder(transfer_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
                "sortBy": sort_by,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_transfers(
        self,
        entry: str,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        sort_by: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Get a list of transfers for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
              - `transferDate` (gt, ge, lt, le, eq, ne)

              - `grossAmount` (gt, ge, lt, le, eq, ne)

              - `chargeBackAmount` (gt, ge, lt, le, eq, ne)

              - `returnedAmount` (gt, ge, lt, le, eq, ne)

              - `billingFeeAmount` (gt, ge, lt, le, eq, ne)

              - `thirdPartyPaidAmount` (gt, ge, lt, le, eq, ne)

              - `netFundedAmount` (gt, ge, lt, le, eq, ne)

              - `adjustmentAmount` (gt, ge, lt, le, eq, ne)

              - `processor` (ne, eq, ct, nct)

              - `transferStatus` (ne, eq, in, nin)

              - `batchNumber` (ne, eq, ct, nct)

              - `batchId` (ne, eq, in, nin)

        sort_by : typing.Optional[str]
            The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/transfers/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
                "sortBy": sort_by,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_vendors(
        self,
        entry: str,
        format: ExportFormat1,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of vendors for an entrypoint. Use filters to limit results.

        Parameters
        ----------
        entry : str
            The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)

        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `method` (in, nin, eq, ne)
            - `enrollmentStatus` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `name` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `phone` (ct, nct, eq, ne)
            - `email` (ct, nct, eq, ne)
            - `address` (ct, nct, eq, ne)
            - `city` (ct, nct, eq, ne)
            - `state` (ct, nct, eq, ne)
            - `country` (ct, nct, eq, ne)
            - `zip` (ct, nct, eq, ne)
            - `mcc` (ct, nct, eq, ne)
            - `locationCode` (ct, nct, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/vendors/{jsonable_encoder(format)}/{jsonable_encoder(entry)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

    async def export_vendors_org(
        self,
        format: ExportFormat1,
        org_id: int,
        *,
        columns_export: typing.Optional[str] = None,
        from_record: typing.Optional[int] = None,
        limit_record: typing.Optional[int] = None,
        parameters: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncHttpResponse[File]:
        """
        Export a list of vendors for an organization. Use filters to limit results.

        Parameters
        ----------
        format : ExportFormat1
            Format for the export, either XLSX or CSV.

        org_id : int
            The numeric identifier for organization, assigned by Payabli.

        columns_export : typing.Optional[str]

        from_record : typing.Optional[int]
            The number of records to skip before starting to collect the result set.

        limit_record : typing.Optional[int]
            The number of records to return for the query. The maximum is 30,000 records. When this parameter isn't sent, the API returns up to 25,000 records.

        parameters : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Collection of field names, conditions, and values used to filter the query.

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help.

            List of field names accepted:
            - `method` (in, nin, eq, ne)
            - `enrollmentStatus` (in, nin, eq, ne)
            - `status` (in, nin, eq, ne)
            - `vendorNumber` (ct, nct, eq, ne)
            - `name` (ct, nct, eq, ne)
            - `ein` (ct, nct, eq, ne)
            - `phone` (ct, nct, eq, ne)
            - `email` (ct, nct, eq, ne)
            - `address` (ct, nct, eq, ne)
            - `city` (ct, nct, eq, ne)
            - `state` (ct, nct, eq, ne)
            - `country` (ct, nct, eq, ne)
            - `zip` (ct, nct, eq, ne)
            - `mcc` (ct, nct, eq, ne)
            - `locationCode` (ct, nct, eq, ne)
            - `paypointLegal` (ne, eq, ct, nct)
            - `paypointDba` (ne, eq, ct, nct)
            - `orgName` (ne, eq, ct, nct)

            List of comparison accepted - enclosed between parentheses:
            - eq or empty => equal
            - gt => greater than
            - ge => greater or equal
            - lt => less than
            - le => less or equal
            - ne => not equal
            - ct => contains
            - nct => not contains
            - in => inside array separated by "|"
            - nin => not inside array separated by "|"

            List of parameters accepted:
            - limitRecord : max number of records for query (default="20", "0" or negative value for all)
            - fromRecord : initial record in query

            Example: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[File]
            Success
        """
        _response = await self._client_wrapper.httpx_client.request(
            f"Export/vendors/{jsonable_encoder(format)}/org/{jsonable_encoder(org_id)}",
            method="GET",
            params={
                "columnsExport": columns_export,
                "fromRecord": from_record,
                "limitRecord": limit_record,
                "parameters": parameters,
            },
            request_options=request_options,
        )
        try:
            if 200 <= _response.status_code < 300:
                _data = typing.cast(
                    File,
                    parse_obj_as(
                        type_=File,  # type: ignore
                        object_=_response.json(),
                    ),
                )
                return AsyncHttpResponse(response=_response, data=_data)
            if _response.status_code == 400:
                raise BadRequestError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 401:
                raise UnauthorizedError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 500:
                raise InternalServerError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        typing.Optional[typing.Any],
                        parse_obj_as(
                            type_=typing.Optional[typing.Any],  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            if _response.status_code == 503:
                raise ServiceUnavailableError(
                    headers=dict(_response.headers),
                    body=typing.cast(
                        PayabliApiResponse,
                        parse_obj_as(
                            type_=PayabliApiResponse,  # type: ignore
                            object_=_response.json(),
                        ),
                    ),
                )
            _response_json = _response.json()
        except JSONDecodeError:
            raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
        raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
