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

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.additional_data import AdditionalData
from ..types.address_addtl_nullable import AddressAddtlNullable
from ..types.address_nullable import AddressNullable
from ..types.billing_data import BillingData
from ..types.contacts_field import ContactsField
from ..types.email import Email
from ..types.location_code import LocationCode
from ..types.mcc import Mcc
from ..types.payabli_api_response_vendors import PayabliApiResponseVendors
from ..types.payee_name import PayeeName
from ..types.remit_email import RemitEmail
from ..types.remitaddress_1 import Remitaddress1
from ..types.remitaddress_2 import Remitaddress2
from ..types.remitcity import Remitcity
from ..types.remitcountry import Remitcountry
from ..types.remitstate import Remitstate
from ..types.remitzip import Remitzip
from ..types.vendor_ein import VendorEin
from ..types.vendor_name_1 import VendorName1
from ..types.vendor_name_2 import VendorName2
from ..types.vendor_number import VendorNumber
from ..types.vendor_payment_method_string import VendorPaymentMethodString
from ..types.vendor_phone import VendorPhone
from ..types.vendor_query_record import VendorQueryRecord
from ..types.vendorstatus import Vendorstatus
from .raw_client import AsyncRawVendorClient, RawVendorClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class VendorClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawVendorClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawVendorClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawVendorClient
        """
        return self._raw_client

    def add_vendor(
        self,
        entry: str,
        *,
        vendor_number: typing.Optional[VendorNumber] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        address_1: typing.Optional[AddressNullable] = OMIT,
        address_2: typing.Optional[AddressAddtlNullable] = OMIT,
        billing_data: typing.Optional[BillingData] = OMIT,
        city: typing.Optional[str] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        country: typing.Optional[str] = OMIT,
        custom_field_1: typing.Optional[str] = OMIT,
        custom_field_2: typing.Optional[str] = OMIT,
        customer_vendor_account: typing.Optional[str] = OMIT,
        ein: typing.Optional[VendorEin] = OMIT,
        email: typing.Optional[Email] = OMIT,
        internal_reference_id: typing.Optional[int] = OMIT,
        location_code: typing.Optional[LocationCode] = OMIT,
        mcc: typing.Optional[Mcc] = OMIT,
        name_1: typing.Optional[VendorName1] = OMIT,
        name_2: typing.Optional[VendorName2] = OMIT,
        payee_name_1: typing.Optional[PayeeName] = OMIT,
        payee_name_2: typing.Optional[PayeeName] = OMIT,
        payment_method: typing.Optional[VendorPaymentMethodString] = OMIT,
        phone: typing.Optional[VendorPhone] = OMIT,
        remit_address_1: typing.Optional[Remitaddress1] = OMIT,
        remit_address_2: typing.Optional[Remitaddress2] = OMIT,
        remit_city: typing.Optional[Remitcity] = OMIT,
        remit_country: typing.Optional[Remitcountry] = OMIT,
        remit_email: typing.Optional[RemitEmail] = OMIT,
        remit_state: typing.Optional[Remitstate] = OMIT,
        remit_zip: typing.Optional[Remitzip] = OMIT,
        state: typing.Optional[str] = OMIT,
        vendor_status: typing.Optional[Vendorstatus] = OMIT,
        zip: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseVendors:
        """
        Creates a vendor in an entrypoint.

        Parameters
        ----------
        entry : str
            Entrypoint identifier.

        vendor_number : typing.Optional[VendorNumber]

        additional_data : typing.Optional[AdditionalData]

        address_1 : typing.Optional[AddressNullable]
            Vendor's address

        address_2 : typing.Optional[AddressAddtlNullable]
            Additional line for vendor's address.

        billing_data : typing.Optional[BillingData]
            Object containing vendor's bank information.

        city : typing.Optional[str]
            Vendor's city.

        contacts : typing.Optional[ContactsField]
            Array of objects describing the vendor's contacts.

        country : typing.Optional[str]
            Vendor's country.

        custom_field_1 : typing.Optional[str]
            Custom field 1 for vendor

        custom_field_2 : typing.Optional[str]
            Custom field 2 for vendor

        customer_vendor_account : typing.Optional[str]
            Account number of paypoint in the vendor side.

        ein : typing.Optional[VendorEin]

        email : typing.Optional[Email]
            Vendor's email address. Required for vCard.

        internal_reference_id : typing.Optional[int]
            Internal identifier for global vendor account.

        location_code : typing.Optional[LocationCode]

        mcc : typing.Optional[Mcc]

        name_1 : typing.Optional[VendorName1]

        name_2 : typing.Optional[VendorName2]

        payee_name_1 : typing.Optional[PayeeName]

        payee_name_2 : typing.Optional[PayeeName]

        payment_method : typing.Optional[VendorPaymentMethodString]

        phone : typing.Optional[VendorPhone]

        remit_address_1 : typing.Optional[Remitaddress1]

        remit_address_2 : typing.Optional[Remitaddress2]

        remit_city : typing.Optional[Remitcity]

        remit_country : typing.Optional[Remitcountry]

        remit_email : typing.Optional[RemitEmail]

        remit_state : typing.Optional[Remitstate]

        remit_zip : typing.Optional[Remitzip]

        state : typing.Optional[str]
            Vendor's state. Must be a 2 character state code.

        vendor_status : typing.Optional[Vendorstatus]

        zip : typing.Optional[str]
            Vendor's zip code.

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

        Returns
        -------
        PayabliApiResponseVendors
            Success

        Examples
        --------
        from payabli import BillingData, Contacts, payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.vendor.add_vendor(
            entry="8cfec329267",
            vendor_number="1234",
            name_1="Herman's Coatings and Masonry",
            name_2="<string>",
            ein="12-3456789",
            phone="5555555555",
            email="example@email.com",
            address_1="123 Ocean Drive",
            address_2="Suite 400",
            city="Miami",
            state="FL",
            zip="33139",
            country="US",
            mcc="7777",
            location_code="MIA123",
            contacts=[
                Contacts(
                    contact_name="Herman Martinez",
                    contact_email="example@email.com",
                    contact_title="Owner",
                    contact_phone="3055550000",
                )
            ],
            billing_data=BillingData(
                id=123,
                bank_name="Country Bank",
                routing_account="123123123",
                account_number="123123123",
                type_account="Checking",
                bank_account_holder_name="Gruzya Adventure Outfitters LLC",
                bank_account_holder_type="Business",
                bank_account_function=0,
            ),
            payment_method="managed",
            vendor_status=1,
            remit_address_1="123 Walnut Street",
            remit_address_2="Suite 900",
            remit_city="Miami",
            remit_state="FL",
            remit_zip="31113",
            remit_country="US",
            payee_name_1="<string>",
            payee_name_2="<string>",
            customer_vendor_account="A-37622",
            internal_reference_id=123,
        )
        """
        _response = self._raw_client.add_vendor(
            entry,
            vendor_number=vendor_number,
            additional_data=additional_data,
            address_1=address_1,
            address_2=address_2,
            billing_data=billing_data,
            city=city,
            contacts=contacts,
            country=country,
            custom_field_1=custom_field_1,
            custom_field_2=custom_field_2,
            customer_vendor_account=customer_vendor_account,
            ein=ein,
            email=email,
            internal_reference_id=internal_reference_id,
            location_code=location_code,
            mcc=mcc,
            name_1=name_1,
            name_2=name_2,
            payee_name_1=payee_name_1,
            payee_name_2=payee_name_2,
            payment_method=payment_method,
            phone=phone,
            remit_address_1=remit_address_1,
            remit_address_2=remit_address_2,
            remit_city=remit_city,
            remit_country=remit_country,
            remit_email=remit_email,
            remit_state=remit_state,
            remit_zip=remit_zip,
            state=state,
            vendor_status=vendor_status,
            zip=zip,
            request_options=request_options,
        )
        return _response.data

    def delete_vendor(
        self, id_vendor: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PayabliApiResponseVendors:
        """
        Delete a vendor.

        Parameters
        ----------
        id_vendor : int
            Vendor ID.

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

        Returns
        -------
        PayabliApiResponseVendors
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.vendor.delete_vendor(
            id_vendor=1,
        )
        """
        _response = self._raw_client.delete_vendor(id_vendor, request_options=request_options)
        return _response.data

    def edit_vendor(
        self,
        id_vendor: int,
        *,
        vendor_number: typing.Optional[VendorNumber] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        address_1: typing.Optional[AddressNullable] = OMIT,
        address_2: typing.Optional[AddressAddtlNullable] = OMIT,
        billing_data: typing.Optional[BillingData] = OMIT,
        city: typing.Optional[str] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        country: typing.Optional[str] = OMIT,
        custom_field_1: typing.Optional[str] = OMIT,
        custom_field_2: typing.Optional[str] = OMIT,
        customer_vendor_account: typing.Optional[str] = OMIT,
        ein: typing.Optional[VendorEin] = OMIT,
        email: typing.Optional[Email] = OMIT,
        internal_reference_id: typing.Optional[int] = OMIT,
        location_code: typing.Optional[LocationCode] = OMIT,
        mcc: typing.Optional[Mcc] = OMIT,
        name_1: typing.Optional[VendorName1] = OMIT,
        name_2: typing.Optional[VendorName2] = OMIT,
        payee_name_1: typing.Optional[PayeeName] = OMIT,
        payee_name_2: typing.Optional[PayeeName] = OMIT,
        payment_method: typing.Optional[VendorPaymentMethodString] = OMIT,
        phone: typing.Optional[VendorPhone] = OMIT,
        remit_address_1: typing.Optional[Remitaddress1] = OMIT,
        remit_address_2: typing.Optional[Remitaddress2] = OMIT,
        remit_city: typing.Optional[Remitcity] = OMIT,
        remit_country: typing.Optional[Remitcountry] = OMIT,
        remit_email: typing.Optional[RemitEmail] = OMIT,
        remit_state: typing.Optional[Remitstate] = OMIT,
        remit_zip: typing.Optional[Remitzip] = OMIT,
        state: typing.Optional[str] = OMIT,
        vendor_status: typing.Optional[Vendorstatus] = OMIT,
        zip: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseVendors:
        """
        Updates a vendor's information. Send only the fields you need to update.

        Parameters
        ----------
        id_vendor : int
            Vendor ID.

        vendor_number : typing.Optional[VendorNumber]

        additional_data : typing.Optional[AdditionalData]

        address_1 : typing.Optional[AddressNullable]
            Vendor's address

        address_2 : typing.Optional[AddressAddtlNullable]
            Additional line for vendor's address.

        billing_data : typing.Optional[BillingData]
            Object containing vendor's bank information.

        city : typing.Optional[str]
            Vendor's city.

        contacts : typing.Optional[ContactsField]
            Array of objects describing the vendor's contacts.

        country : typing.Optional[str]
            Vendor's country.

        custom_field_1 : typing.Optional[str]
            Custom field 1 for vendor

        custom_field_2 : typing.Optional[str]
            Custom field 2 for vendor

        customer_vendor_account : typing.Optional[str]
            Account number of paypoint in the vendor side.

        ein : typing.Optional[VendorEin]

        email : typing.Optional[Email]
            Vendor's email address. Required for vCard.

        internal_reference_id : typing.Optional[int]
            Internal identifier for global vendor account.

        location_code : typing.Optional[LocationCode]

        mcc : typing.Optional[Mcc]

        name_1 : typing.Optional[VendorName1]

        name_2 : typing.Optional[VendorName2]

        payee_name_1 : typing.Optional[PayeeName]

        payee_name_2 : typing.Optional[PayeeName]

        payment_method : typing.Optional[VendorPaymentMethodString]

        phone : typing.Optional[VendorPhone]

        remit_address_1 : typing.Optional[Remitaddress1]

        remit_address_2 : typing.Optional[Remitaddress2]

        remit_city : typing.Optional[Remitcity]

        remit_country : typing.Optional[Remitcountry]

        remit_email : typing.Optional[RemitEmail]

        remit_state : typing.Optional[Remitstate]

        remit_zip : typing.Optional[Remitzip]

        state : typing.Optional[str]
            Vendor's state. Must be a 2 character state code.

        vendor_status : typing.Optional[Vendorstatus]

        zip : typing.Optional[str]
            Vendor's zip code.

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

        Returns
        -------
        PayabliApiResponseVendors
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.vendor.edit_vendor(
            id_vendor=1,
            name_1="Theodore's Janitorial",
        )
        """
        _response = self._raw_client.edit_vendor(
            id_vendor,
            vendor_number=vendor_number,
            additional_data=additional_data,
            address_1=address_1,
            address_2=address_2,
            billing_data=billing_data,
            city=city,
            contacts=contacts,
            country=country,
            custom_field_1=custom_field_1,
            custom_field_2=custom_field_2,
            customer_vendor_account=customer_vendor_account,
            ein=ein,
            email=email,
            internal_reference_id=internal_reference_id,
            location_code=location_code,
            mcc=mcc,
            name_1=name_1,
            name_2=name_2,
            payee_name_1=payee_name_1,
            payee_name_2=payee_name_2,
            payment_method=payment_method,
            phone=phone,
            remit_address_1=remit_address_1,
            remit_address_2=remit_address_2,
            remit_city=remit_city,
            remit_country=remit_country,
            remit_email=remit_email,
            remit_state=remit_state,
            remit_zip=remit_zip,
            state=state,
            vendor_status=vendor_status,
            zip=zip,
            request_options=request_options,
        )
        return _response.data

    def get_vendor(
        self, id_vendor: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> VendorQueryRecord:
        """
        Retrieves a vendor's details.

        Parameters
        ----------
        id_vendor : int
            Vendor ID.

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

        Returns
        -------
        VendorQueryRecord
            Success

        Examples
        --------
        from payabli import payabli

        client = payabli(
            api_key="YOUR_API_KEY",
        )
        client.vendor.get_vendor(
            id_vendor=1,
        )
        """
        _response = self._raw_client.get_vendor(id_vendor, request_options=request_options)
        return _response.data


class AsyncVendorClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawVendorClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawVendorClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawVendorClient
        """
        return self._raw_client

    async def add_vendor(
        self,
        entry: str,
        *,
        vendor_number: typing.Optional[VendorNumber] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        address_1: typing.Optional[AddressNullable] = OMIT,
        address_2: typing.Optional[AddressAddtlNullable] = OMIT,
        billing_data: typing.Optional[BillingData] = OMIT,
        city: typing.Optional[str] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        country: typing.Optional[str] = OMIT,
        custom_field_1: typing.Optional[str] = OMIT,
        custom_field_2: typing.Optional[str] = OMIT,
        customer_vendor_account: typing.Optional[str] = OMIT,
        ein: typing.Optional[VendorEin] = OMIT,
        email: typing.Optional[Email] = OMIT,
        internal_reference_id: typing.Optional[int] = OMIT,
        location_code: typing.Optional[LocationCode] = OMIT,
        mcc: typing.Optional[Mcc] = OMIT,
        name_1: typing.Optional[VendorName1] = OMIT,
        name_2: typing.Optional[VendorName2] = OMIT,
        payee_name_1: typing.Optional[PayeeName] = OMIT,
        payee_name_2: typing.Optional[PayeeName] = OMIT,
        payment_method: typing.Optional[VendorPaymentMethodString] = OMIT,
        phone: typing.Optional[VendorPhone] = OMIT,
        remit_address_1: typing.Optional[Remitaddress1] = OMIT,
        remit_address_2: typing.Optional[Remitaddress2] = OMIT,
        remit_city: typing.Optional[Remitcity] = OMIT,
        remit_country: typing.Optional[Remitcountry] = OMIT,
        remit_email: typing.Optional[RemitEmail] = OMIT,
        remit_state: typing.Optional[Remitstate] = OMIT,
        remit_zip: typing.Optional[Remitzip] = OMIT,
        state: typing.Optional[str] = OMIT,
        vendor_status: typing.Optional[Vendorstatus] = OMIT,
        zip: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseVendors:
        """
        Creates a vendor in an entrypoint.

        Parameters
        ----------
        entry : str
            Entrypoint identifier.

        vendor_number : typing.Optional[VendorNumber]

        additional_data : typing.Optional[AdditionalData]

        address_1 : typing.Optional[AddressNullable]
            Vendor's address

        address_2 : typing.Optional[AddressAddtlNullable]
            Additional line for vendor's address.

        billing_data : typing.Optional[BillingData]
            Object containing vendor's bank information.

        city : typing.Optional[str]
            Vendor's city.

        contacts : typing.Optional[ContactsField]
            Array of objects describing the vendor's contacts.

        country : typing.Optional[str]
            Vendor's country.

        custom_field_1 : typing.Optional[str]
            Custom field 1 for vendor

        custom_field_2 : typing.Optional[str]
            Custom field 2 for vendor

        customer_vendor_account : typing.Optional[str]
            Account number of paypoint in the vendor side.

        ein : typing.Optional[VendorEin]

        email : typing.Optional[Email]
            Vendor's email address. Required for vCard.

        internal_reference_id : typing.Optional[int]
            Internal identifier for global vendor account.

        location_code : typing.Optional[LocationCode]

        mcc : typing.Optional[Mcc]

        name_1 : typing.Optional[VendorName1]

        name_2 : typing.Optional[VendorName2]

        payee_name_1 : typing.Optional[PayeeName]

        payee_name_2 : typing.Optional[PayeeName]

        payment_method : typing.Optional[VendorPaymentMethodString]

        phone : typing.Optional[VendorPhone]

        remit_address_1 : typing.Optional[Remitaddress1]

        remit_address_2 : typing.Optional[Remitaddress2]

        remit_city : typing.Optional[Remitcity]

        remit_country : typing.Optional[Remitcountry]

        remit_email : typing.Optional[RemitEmail]

        remit_state : typing.Optional[Remitstate]

        remit_zip : typing.Optional[Remitzip]

        state : typing.Optional[str]
            Vendor's state. Must be a 2 character state code.

        vendor_status : typing.Optional[Vendorstatus]

        zip : typing.Optional[str]
            Vendor's zip code.

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

        Returns
        -------
        PayabliApiResponseVendors
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli, BillingData, Contacts

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.vendor.add_vendor(
                entry="8cfec329267",
                vendor_number="1234",
                name_1="Herman's Coatings and Masonry",
                name_2="<string>",
                ein="12-3456789",
                phone="5555555555",
                email="example@email.com",
                address_1="123 Ocean Drive",
                address_2="Suite 400",
                city="Miami",
                state="FL",
                zip="33139",
                country="US",
                mcc="7777",
                location_code="MIA123",
                contacts=[
                    Contacts(
                        contact_name="Herman Martinez",
                        contact_email="example@email.com",
                        contact_title="Owner",
                        contact_phone="3055550000",
                    )
                ],
                billing_data=BillingData(
                    id=123,
                    bank_name="Country Bank",
                    routing_account="123123123",
                    account_number="123123123",
                    type_account="Checking",
                    bank_account_holder_name="Gruzya Adventure Outfitters LLC",
                    bank_account_holder_type="Business",
                    bank_account_function=0,
                ),
                payment_method="managed",
                vendor_status=1,
                remit_address_1="123 Walnut Street",
                remit_address_2="Suite 900",
                remit_city="Miami",
                remit_state="FL",
                remit_zip="31113",
                remit_country="US",
                payee_name_1="<string>",
                payee_name_2="<string>",
                customer_vendor_account="A-37622",
                internal_reference_id=123,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.add_vendor(
            entry,
            vendor_number=vendor_number,
            additional_data=additional_data,
            address_1=address_1,
            address_2=address_2,
            billing_data=billing_data,
            city=city,
            contacts=contacts,
            country=country,
            custom_field_1=custom_field_1,
            custom_field_2=custom_field_2,
            customer_vendor_account=customer_vendor_account,
            ein=ein,
            email=email,
            internal_reference_id=internal_reference_id,
            location_code=location_code,
            mcc=mcc,
            name_1=name_1,
            name_2=name_2,
            payee_name_1=payee_name_1,
            payee_name_2=payee_name_2,
            payment_method=payment_method,
            phone=phone,
            remit_address_1=remit_address_1,
            remit_address_2=remit_address_2,
            remit_city=remit_city,
            remit_country=remit_country,
            remit_email=remit_email,
            remit_state=remit_state,
            remit_zip=remit_zip,
            state=state,
            vendor_status=vendor_status,
            zip=zip,
            request_options=request_options,
        )
        return _response.data

    async def delete_vendor(
        self, id_vendor: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PayabliApiResponseVendors:
        """
        Delete a vendor.

        Parameters
        ----------
        id_vendor : int
            Vendor ID.

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

        Returns
        -------
        PayabliApiResponseVendors
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.vendor.delete_vendor(
                id_vendor=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete_vendor(id_vendor, request_options=request_options)
        return _response.data

    async def edit_vendor(
        self,
        id_vendor: int,
        *,
        vendor_number: typing.Optional[VendorNumber] = OMIT,
        additional_data: typing.Optional[AdditionalData] = OMIT,
        address_1: typing.Optional[AddressNullable] = OMIT,
        address_2: typing.Optional[AddressAddtlNullable] = OMIT,
        billing_data: typing.Optional[BillingData] = OMIT,
        city: typing.Optional[str] = OMIT,
        contacts: typing.Optional[ContactsField] = OMIT,
        country: typing.Optional[str] = OMIT,
        custom_field_1: typing.Optional[str] = OMIT,
        custom_field_2: typing.Optional[str] = OMIT,
        customer_vendor_account: typing.Optional[str] = OMIT,
        ein: typing.Optional[VendorEin] = OMIT,
        email: typing.Optional[Email] = OMIT,
        internal_reference_id: typing.Optional[int] = OMIT,
        location_code: typing.Optional[LocationCode] = OMIT,
        mcc: typing.Optional[Mcc] = OMIT,
        name_1: typing.Optional[VendorName1] = OMIT,
        name_2: typing.Optional[VendorName2] = OMIT,
        payee_name_1: typing.Optional[PayeeName] = OMIT,
        payee_name_2: typing.Optional[PayeeName] = OMIT,
        payment_method: typing.Optional[VendorPaymentMethodString] = OMIT,
        phone: typing.Optional[VendorPhone] = OMIT,
        remit_address_1: typing.Optional[Remitaddress1] = OMIT,
        remit_address_2: typing.Optional[Remitaddress2] = OMIT,
        remit_city: typing.Optional[Remitcity] = OMIT,
        remit_country: typing.Optional[Remitcountry] = OMIT,
        remit_email: typing.Optional[RemitEmail] = OMIT,
        remit_state: typing.Optional[Remitstate] = OMIT,
        remit_zip: typing.Optional[Remitzip] = OMIT,
        state: typing.Optional[str] = OMIT,
        vendor_status: typing.Optional[Vendorstatus] = OMIT,
        zip: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PayabliApiResponseVendors:
        """
        Updates a vendor's information. Send only the fields you need to update.

        Parameters
        ----------
        id_vendor : int
            Vendor ID.

        vendor_number : typing.Optional[VendorNumber]

        additional_data : typing.Optional[AdditionalData]

        address_1 : typing.Optional[AddressNullable]
            Vendor's address

        address_2 : typing.Optional[AddressAddtlNullable]
            Additional line for vendor's address.

        billing_data : typing.Optional[BillingData]
            Object containing vendor's bank information.

        city : typing.Optional[str]
            Vendor's city.

        contacts : typing.Optional[ContactsField]
            Array of objects describing the vendor's contacts.

        country : typing.Optional[str]
            Vendor's country.

        custom_field_1 : typing.Optional[str]
            Custom field 1 for vendor

        custom_field_2 : typing.Optional[str]
            Custom field 2 for vendor

        customer_vendor_account : typing.Optional[str]
            Account number of paypoint in the vendor side.

        ein : typing.Optional[VendorEin]

        email : typing.Optional[Email]
            Vendor's email address. Required for vCard.

        internal_reference_id : typing.Optional[int]
            Internal identifier for global vendor account.

        location_code : typing.Optional[LocationCode]

        mcc : typing.Optional[Mcc]

        name_1 : typing.Optional[VendorName1]

        name_2 : typing.Optional[VendorName2]

        payee_name_1 : typing.Optional[PayeeName]

        payee_name_2 : typing.Optional[PayeeName]

        payment_method : typing.Optional[VendorPaymentMethodString]

        phone : typing.Optional[VendorPhone]

        remit_address_1 : typing.Optional[Remitaddress1]

        remit_address_2 : typing.Optional[Remitaddress2]

        remit_city : typing.Optional[Remitcity]

        remit_country : typing.Optional[Remitcountry]

        remit_email : typing.Optional[RemitEmail]

        remit_state : typing.Optional[Remitstate]

        remit_zip : typing.Optional[Remitzip]

        state : typing.Optional[str]
            Vendor's state. Must be a 2 character state code.

        vendor_status : typing.Optional[Vendorstatus]

        zip : typing.Optional[str]
            Vendor's zip code.

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

        Returns
        -------
        PayabliApiResponseVendors
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.vendor.edit_vendor(
                id_vendor=1,
                name_1="Theodore's Janitorial",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_vendor(
            id_vendor,
            vendor_number=vendor_number,
            additional_data=additional_data,
            address_1=address_1,
            address_2=address_2,
            billing_data=billing_data,
            city=city,
            contacts=contacts,
            country=country,
            custom_field_1=custom_field_1,
            custom_field_2=custom_field_2,
            customer_vendor_account=customer_vendor_account,
            ein=ein,
            email=email,
            internal_reference_id=internal_reference_id,
            location_code=location_code,
            mcc=mcc,
            name_1=name_1,
            name_2=name_2,
            payee_name_1=payee_name_1,
            payee_name_2=payee_name_2,
            payment_method=payment_method,
            phone=phone,
            remit_address_1=remit_address_1,
            remit_address_2=remit_address_2,
            remit_city=remit_city,
            remit_country=remit_country,
            remit_email=remit_email,
            remit_state=remit_state,
            remit_zip=remit_zip,
            state=state,
            vendor_status=vendor_status,
            zip=zip,
            request_options=request_options,
        )
        return _response.data

    async def get_vendor(
        self, id_vendor: int, *, request_options: typing.Optional[RequestOptions] = None
    ) -> VendorQueryRecord:
        """
        Retrieves a vendor's details.

        Parameters
        ----------
        id_vendor : int
            Vendor ID.

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

        Returns
        -------
        VendorQueryRecord
            Success

        Examples
        --------
        import asyncio

        from payabli import Asyncpayabli

        client = Asyncpayabli(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.vendor.get_vendor(
                id_vendor=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_vendor(id_vendor, request_options=request_options)
        return _response.data
