
    jof]                        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 d dlmZ d d	lmZmZ d d
lmZ d dlmZmZmZmZmZmZmZ d dlmZmZm Z  e rd dl!m"Z"  G d ded         ed         e          Z#dS )    )Account)Customer)DeletableAPIResource)InvalidRequestError)ExpandableField)RequestOptions)StripeObject)UpdateableAPIResource)class_method_variantsanitize_id)VerifyMixin)ClassVarDictListOptionalUnioncastoverload)LiteralUnpackTYPE_CHECKING)Cardc            	          e Zd ZU dZdZeed                  ed<    G d de          Z	 G d de          Z
 G d d	e          Zeed
                  ed<   	 ee         ed<   	 ee         ed<   	 ee         ed<   	 eeed                           ed<   	 ee         ed<   	 eed<   	 eed<   	 eed                  ed<   	 ee         ed<   	 ee         ed<   	 ee	         ed<   	 eed<   	 eed<   	 eeeef                  ed<   	 ed         ed<   	 ee
         ed<   	 ee         ed<   	 eed<   	 eed                   ed!<   	 ed"ed#ed$         d%ed&         fd'            Zeed"ed#ed$         d%ed&         fd(                        Zed#ed$         d%ed&         fd)            Z ed*          d#ed$         d%ed&         fd+            Zed"ed#ed$         d%ed&         fd,            Zeed"ed#ed$         d%ed&         fd-                        Zed#ed$         d%ed&         fd.            Z ed/          d#ed$         d%ed&         fd0            Zd1 Zed2             Zed3             Ze	e
d4Z d5S )6BankAccounta  
    These bank accounts are payment methods on `Customer` objects.

    On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
    destinations on `Account` objects for connected accounts.
    They can be bank accounts or debit cards as well, and are documented in the links above.

    Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
    bank_accountOBJECT_NAMEc                       e Zd ZU  G d de          Zeee                  ed<   	 eee                  ed<   	 eee                  ed<   	 eee                  ed<   	 deiZ	dS )BankAccount.FutureRequirementsc                   >    e Zd ZU ed         ed<   	 eed<   	 eed<   dS )$BankAccount.FutureRequirements.ErrorY&invalid_address_city_state_postal_code$invalid_address_highway_contract_boxinvalid_address_private_mailboxinvalid_business_profile_name(invalid_business_profile_name_denylistedinvalid_company_name_denylistedinvalid_dob_age_over_maximuminvalid_dob_age_under_18invalid_dob_age_under_minimum"invalid_product_description_length%invalid_product_description_url_matchinvalid_representative_country.invalid_statement_descriptor_business_mismatch'invalid_statement_descriptor_denylisted#invalid_statement_descriptor_length.invalid_statement_descriptor_prefix_denylisted,invalid_statement_descriptor_prefix_mismatchinvalid_street_addressinvalid_tax_idinvalid_tax_id_formatinvalid_tos_acceptanceinvalid_url_denylistedinvalid_url_formatinvalid_url_length!invalid_url_web_presence_detected1invalid_url_website_business_information_mismatchinvalid_url_website_empty invalid_url_website_inaccessible+invalid_url_website_inaccessible_geoblocked3invalid_url_website_inaccessible_password_protectedinvalid_url_website_incomplete2invalid_url_website_incomplete_cancellation_policy7invalid_url_website_incomplete_customer_service_details1invalid_url_website_incomplete_legal_restrictions,invalid_url_website_incomplete_refund_policy,invalid_url_website_incomplete_return_policy3invalid_url_website_incomplete_terms_and_conditions1invalid_url_website_incomplete_under_constructioninvalid_url_website_otherinvalid_value_otherverification_directors_mismatch&verification_document_address_mismatch%verification_document_address_missingverification_document_corrupt+verification_document_country_not_supported(verification_document_directors_mismatch"verification_document_dob_mismatch$verification_document_duplicate_typeverification_document_expired!verification_document_failed_copy&verification_document_failed_greyscale"verification_document_failed_other&verification_document_failed_test_mode verification_document_fraudulent(verification_document_id_number_mismatch'verification_document_id_number_missing verification_document_incompleteverification_document_invalid2verification_document_issue_or_expiry_date_missing!verification_document_manipulated"verification_document_missing_back#verification_document_missing_front#verification_document_name_mismatch"verification_document_name_missing*verification_document_nationality_mismatch"verification_document_not_readable verification_document_not_signed"verification_document_not_uploaded$verification_document_photo_mismatchverification_document_too_large(verification_document_type_not_supported!verification_extraneous_directors!verification_failed_address_match'verification_failed_business_iec_number"verification_failed_document_match#verification_failed_id_number_match"verification_failed_keyed_identityverification_failed_keyed_matchverification_failed_name_matchverification_failed_other,verification_failed_representative_authority'verification_failed_residential_address verification_failed_tax_id_match%verification_failed_tax_id_not_issuedverification_missing_directorsverification_missing_executivesverification_missing_owners;verification_requires_additional_memorandum_of_associations6verification_requires_additional_proof_of_registrationcodereasonrequirementN__name__
__module____qualname__r   __annotations__str     N/var/www/html/Alfredo/env/lib/python3.11/site-packages/stripe/_bank_account.pyErrorr    &   \         XJZ Z Z Zv KKK  r   r   currently_dueerrorspast_duepending_verificationN
r   r   r   r	   r   r   r   r   r   _inner_class_typesr   r   r   FutureRequirementsr   %            f	 f	 f	 f	 f	L f	 f	 f	P  S	****	 e%%%%	 49%%%%	 'tCy1111	 '.r   r   c                       e Zd ZU  G d de          Zeee                  ed<   	 eee                  ed<   	 eee                  ed<   	 eee                  ed<   	 deiZ	dS )BankAccount.Requirementsc                   >    e Zd ZU ed         ed<   	 eed<   	 eed<   dS )BankAccount.Requirements.Errorr!   r{   r|   r}   Nr~   r   r   r   r   r      r   r   r   r   r   r   r   Nr   r   r   r   Requirementsr      r   r   r   c                       e Zd ZdS )BankAccount.DeleteParamsN)r   r   r   r   r   r   DeleteParamsr     s        r   r   r   accountaccount_holder_nameaccount_holder_typeaccount_type)instantstandardavailable_payout_methods	bank_namecountrycurrencyr   customerdefault_for_currencyfingerprintfuture_requirementsidlast4metadataobjectrequirementsrouting_numberstatusTdeletedsidparamsr   returnr   r   c                     |                                  dt          |          }t          t          d         |                     d||                    S )J
        Delete a specified external account for a given account.
        /r   deleter   )	class_urlr   r   r   _static_requestclsr   r   urls       r   _cls_deletezBankAccount._cls_deleteq  sa     +c*:*:*:;'(    
 
 	
r   c                     dS r   Nr   r   r   s     r   r   zBankAccount.delete  s	     	r   c                     dS r   r   selfr   s     r   r   zBankAccount.delete  s	     	r   r   c                 V    |                      d|                                 |          S )r   r   r   )_request_and_refreshinstance_urlr   s     r   r   zBankAccount.delete  s6     (( ) 
 
 	
r   c                    K   |                                  dt          |          }t          t          d         |                     d||           d{V           S )r   r   r   r   r   N)r   r   r   r   _static_request_asyncr   s       r   _cls_delete_asynczBankAccount._cls_delete_async  s       +c*:*:*:;'(++ ,        
 
 	
r   c                 
   K   dS r   r   r   s     r   delete_asynczBankAccount.delete_async  s       	r   c                 
   K   dS r   r   r   s     r   r   zBankAccount.delete_async  s       	r   r   c                 f   K   |                      d|                                 |           d{V S )r   r   r   N)_request_and_refresh_asyncr   r   s     r   r   zBankAccount.delete_async  sX       44 5 
 
 
 
 
 
 
 
 	
r   c                    | j         }t          |          }t          | d          rL| j        }t	          j                    }|J t          |t                    r|j         }t          |          }d}not          | d          rL| j        }t          j                    }|J t          |t                    r|j         }t          |          }d}nt          d|z  d          |d|d|d|S )Nr   sourcesr   external_accountszWCould not determine whether bank_account_id %s is attached to a customer or an account.r   r   )
r   r   hasattrr   r   r   
isinstancer   r   r   )r   tokenextnr   base
owner_extn
class_baser   s           r   r   zBankAccount.instance_url  s   5!!4$$ 	}H%''D'''(H-- '#;$X..J"JJT9%% 	lG$&&D&&&'7++ %!*$W--J,JJ &8:?@   !%jjj***ddCCr   c                      t          d          )Na`  Can't modify a bank account without a customer or account ID. Use stripe.Customer.modify_source('customer_id', 'bank_account_id', ...) (see https://stripe.com/docs/api/customer_bank_accounts/update) or stripe.Account.modify_external_account('customer_id', 'bank_account_id', ...) (see https://stripe.com/docs/api/external_account_bank_accounts/update).NotImplementedError)r   r   r   s      r   modifyzBankAccount.modify  s    !W
 
 	
r   c                      t          d          )Na_  Can't retrieve a bank account without a customer or account ID. Use stripe.customer.retrieve_source('customer_id', 'bank_account_id') (see https://stripe.com/docs/api/customer_bank_accounts/retrieve) or stripe.Account.retrieve_external_account('account_id', 'bank_account_id') (see https://stripe.com/docs/api/external_account_bank_accounts/retrieve).r   )r   r   r   s      r   retrievezBankAccount.retrieve  s    !Y
 
 	
r   )r   r   N)!r   r   r   __doc__r   r   r   r   r	   r   r   r   r   r   r   r   r   boolr   classmethodr   r   r   r   staticmethodr   r   r   r   r   r   r   r   r   r   r   r   r      s'        
  6DK'.12CCCy/ y/ y/ y/ y/\ y/ y/ y/vy/ y/ y/ y/ y/| y/ y/ y/v    ~    oi01111 "#&&& "#&&& 3- 'tG4I,J'KLLLL } LLL MMM z23333 #4.((( # ""45555 	GGG JJJ tCH~&&&& N#### <(((( SM!!! KKK
 gdm$$$$ 

!'(B!C
	$	%
 
 
 [
  "#=>	$	%   \ X 9:	$	%   X -((

9:

	$	%

 

 

 )(

 

!'(B!C
	$	%
 
 
 [
  "#=>	$	%   \ X 9:	$	%   X -..

9:

	$	%

 

 

 /.

D D D@ 
 
 [
 
 
 [
  2$ r   r   N)$stripe._accountr   stripe._customerr   stripe._deletable_api_resourcer   stripe._errorr   stripe._expandable_fieldr   stripe._request_optionsr   stripe._stripe_objectr	   stripe._updateable_api_resourcer
   stripe._utilr   r   stripe._verify_mixinr   typingr   r   r   r   r   r   r   typing_extensionsr   r   r   stripe._cardr   r   r   r   r   <module>r      s~   $ # # # # # % % % % % % ? ? ? ? ? ? - - - - - - 4 4 4 4 4 4 2 2 2 2 2 2 . . . . . . A A A A A A : : : : : : : : , , , , , , H H H H H H H H H H H H H H H H H H < < < < < < < < < < "!!!!!!v v v v v'-(v v v v vr   