o
    iq                      @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ erLd dl	m
Z
 d dlmZ d dlmZ d dlmZ d d	lmZ d d
lmZ d dlmZ d dlmZ G dd deZdS )    )StripeService)sanitize_id)Optionalcast)TYPE_CHECKING)
ListObject)Person)RequestOptions)AccountPersonCreateParams)AccountPersonDeleteParams)AccountPersonListParams)AccountPersonRetrieveParams)AccountPersonUpdateParamsc                   @   s  e Zd Z		d#dededed ded dd	f
d
dZ		d#dededed ded dd	f
ddZ		d#dededed ded dd	f
ddZ		d#dededed ded dd	f
ddZ		d#dededed ded dd	f
ddZ			d#dededed ded dd	f
ddZ
		d#deded ded ddfddZ		d#deded ded ddfddZ		d#deded ded dd	fdd Z		d#deded ded dd	fd!d"ZdS )$AccountPersonServiceNaccountpersonparamsr   optionsr	   returnr   c              	   C   ,   t d| jddjt|t|dd||dS )A  
        Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.
        r   delete'/v1/accounts/{account}/persons/{person}r   r   apibase_addressr   r   r   _requestformatr   selfr   r   r   r    r"   ~/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_account_person_service.pyr         
zAccountPersonService.deletec              	      4   t d| jddjt|t|dd||dI dH S )r   r   r   r   r   r   r   Nr   _request_asyncr   r   r    r"   r"   r#   delete_async6      

z!AccountPersonService.delete_asyncr   c              	   C   r   )/
        Retrieves an existing person.
        r   getr   r   r   r   r   r    r"   r"   r#   retrieveN   r$   zAccountPersonService.retrievec              	      r%   )r*   r   r+   r   r   r   r   Nr&   r    r"   r"   r#   retrieve_asyncf   r)   z#AccountPersonService.retrieve_asyncr   c              	   C   r   )-
        Updates an existing person.
        r   postr   r   r   r   r   r    r"   r"   r#   update~   r$   zAccountPersonService.updatec              	      r%   )r.   r   r/   r   r   r   r   Nr&   r    r"   r"   r#   update_async   r)   z!AccountPersonService.update_asyncr   ListObject[Person]c              	   C   &   t d| jddjt|dd||dS )
        Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
        r2   r+   /v1/accounts/{account}/personsr   r   r   r   r!   r   r   r   r"   r"   r#   list      	zAccountPersonService.listc              	      .   t d| jddjt|dd||dI dH S )r4   r2   r+   r5   r6   r   r   Nr&   r7   r"   r"   r#   
list_async      	
zAccountPersonService.list_asyncr
   c              	   C   r3   )'
        Creates a new person.
        r   r/   r5   r6   r   r   r   r7   r"   r"   r#   create   r9   zAccountPersonService.createc              	      r:   )r=   r   r/   r5   r6   r   r   Nr&   r7   r"   r"   r#   create_async   r<   z!AccountPersonService.create_async)NN)__name__
__module____qualname__strr   r   r(   r,   r-   r0   r1   r8   r;   r>   r?   r"   r"   r"   r#   r      s    








r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._list_objectr   stripe._personr   stripe._request_optionsr	   +stripe.params._account_person_create_paramsr
   +stripe.params._account_person_delete_paramsr   )stripe.params._account_person_list_paramsr   -stripe.params._account_person_retrieve_paramsr   +stripe.params._account_person_update_paramsr   r   r"   r"   r"   r#   <module>   s   