
    Ai                       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 d d
lmZ d dlmZ d dlmZmZ d dlmZmZmZmZmZmZm Z m!Z!m"Z" d dl#m$Z$m%Z%m&Z&m'Z' e'rd dl(m)Z) d dl*m+Z+ d dl,m-Z- d dl.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7 d dl8m9Z9 d dl:m;Z; d dl<m=Z= d dl>m?Z? d dl@mAZA d dlBmCZC d dlDmEZE d dlFmGZG d dlHmIZI d d lJmKZK d d!lLmMZM d d"lNmOZO d d#lPmQZQ d d$lRmSZS d d%lTmUZU d d&lVmWZW d d'lXmYZY d d(lZm[Z[ d d)l\m]Z] d d*l^m_Z_ d d+l`maZa d d,lbmcZc d d-ldmeZe d d.lfmgZg d d/lhmiZi d d0ljmkZk d d1llmmZm d d2lnmoZo d d3lpmqZq d d4lrmsZs d d5ltmuZu d d6lvmwZw d d7lxmyZy  ed8       ed9       ed:       ed;       G d< d=ed=   ed=   e	d=   ed=   ed=                                     Zzezezj                  _|        y>)?    )CreateableAPIResource)DeletableAPIResource)ExpandableField)
ListObject)ListableAPIResource)nested_resource_class_methods)SearchResultObject)SearchableAPIResource)StripeObject)APIResourceTestHelpers)UpdateableAPIResource)class_method_variantsanitize_id)	AsyncIteratorClassVarDictIteratorListOptionalUnioncastoverload)LiteralTypeUnpackTYPE_CHECKING)Account)BankAccount)Card)CashBalance)CustomerBalanceTransaction)CustomerCashBalanceTransaction)Discount)FundingInstructions)PaymentMethod)Source)Subscription)TaxId)&CustomerCreateBalanceTransactionParams)'CustomerCreateFundingInstructionsParams)CustomerCreateParams)CustomerCreateSourceParams)CustomerCreateTaxIdParams)CustomerDeleteDiscountParams)CustomerDeleteParams)CustomerDeleteSourceParams)CustomerDeleteTaxIdParams)CustomerFundCashBalanceParams)%CustomerListBalanceTransactionsParams))CustomerListCashBalanceTransactionsParams)CustomerListParams) CustomerListPaymentMethodsParams)CustomerListSourcesParams)CustomerListTaxIdsParams)&CustomerModifyBalanceTransactionParams)CustomerModifyCashBalanceParams)CustomerModifyParams)CustomerModifySourceParams)(CustomerRetrieveBalanceTransactionParams)!CustomerRetrieveCashBalanceParams),CustomerRetrieveCashBalanceTransactionParams)CustomerRetrieveParams)#CustomerRetrievePaymentMethodParams)CustomerRetrieveSourceParams)CustomerRetrieveTaxIdParams)CustomerSearchParams)	TestClockbalance_transactioncash_balance_transactionsourcetax_idc            
          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 G d
 de      Zee	   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 eed<   	 ee   ed<   	 eeed         ed<   	 eed      ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 ee   ed<   	 eed<   	 ee   ed<   	 eeeef      ed<   	 ee   ed<   	 ee
   ed <   eed!<   	 eeeef      ed"<   	 ee   ed#<   	 ee   ed$<   	 ed   ed%<   	 ee   ed&<   	 eee      ed'<   	 ee   ed(<   	 eeed         ed)<   	 eed*      ed+<   	 ee   ed,<   eed-      ed.<   	 eed/      ed0<   	 eed1      ed2<   	 ed3ed4   d5d fd6       Zed3ed4   d5d fd7       Zeded3ed8   d5d9fd:       Zeeded3ed8   d5d9fd;              Zed3ed8   d5d9fd<       Z ed=      d3ed8   d5d9fd>       Zeded3ed8   d5d9fd?       Zeeded3ed8   d5d9fd@              Z ed3ed8   d5d9fdA       Z  edB      d3ed8   d5d9fdC       Z edDed3edE   d5d fdF       Z!eedDed3edE   d5d fdG              Z"ed3edE   d5d fdH       Z" edI      d3edE   d5d fdJ       Z"edDed3edE   d5d fdK       Z#eedDed3edE   d5d fdL              Z$ed3edE   d5d fdM       Z$ edN      d3edE   d5d fdO       Z$eded3edP   d5dfdQ       Z%eeded3edP   d5dfdR              Z&ed3edP   d5dfdS       Z& edT      d3edP   d5dfdU       Z&eded3edP   d5dfdV       Z'eeded3edP   d5dfdW              Z(ed3edP   d5dfdX       Z( edY      d3edP   d5dfdZ       Z(ed3ed[   d5ed    fd\       Z)ed3ed[   d5ed    fd]       Z*eded3ed^   d5ed_   fd`       Z+eeded3ed^   d5ed_   fda              Z,ed3ed^   d5ed_   fdb       Z, edc      d3ed^   d5ed_   fdd       Z,eded3ed^   d5ed_   fde       Z-eeded3ed^   d5ed_   fdf              Z.ed3ed^   d5ed_   fdg       Z. edh      d3ed^   d5ed_   fdi       Z.eded3edj   d5d fdk       Z/eded3edj   d5d fdl       Z0eded3edm   d5d fdn       Z1eded3edm   d5d fdo       Z2ededped3edq   d5d_fdr       Z3eededped3edq   d5d_fds              Z4edped3edq   d5d_fdt       Z4 edu      dped3edq   d5d_fdv       Z4ededped3edq   d5d_fdw       Z5eededped3edq   d5d_fdx              Z6edped3edq   d5d_fdy       Z6 edz      dped3edq   d5d_fd{       Z6ed|ed}   d5e7d    fd~       Z8ed|ed}   d5e7d    fd       Z9ed|ed}   d5e:d    fd       Z;ed|ed}   d5e<d    fd       Z=eded3ed   d5ed   fd       Z>eded3ed   d5ed   fd       Z?eded3ed   d5dfd       Z@eded3ed   d5dfd       ZAededed3ed   d5dfd       ZBededed3ed   d5dfd       ZCededed3ed   d5dfd       ZDededed3ed   d5dfd       ZEeded3ed   d5ed   fd       ZFeded3ed   d5ed   fd       ZGededed3ed   d5dfd       ZHededed3ed   d5dfd       ZIeded3ed   d5eed      fd       ZJeded3ed   d5eed      fd       ZKeded3ed   d5ed   fd       ZLeded3ed   d5ed   fd       ZMededed3ed   d5ed   fd       ZNededed3ed   d5ed   fd       ZOededed3ed   d5ed   fd       ZPededed3ed   d5ed   fd       ZQededed3ed   d5ed   fd       ZRededed3ed   d5ed   fd       ZSeded3ed   d5d/fd       ZTeded3ed   d5d/fd       ZUededed3ed   d5d/fd       ZVededed3ed   d5d/fd       ZWededed3ed   d5d/fd       ZXededed3ed   d5d/fd       ZYeded3ed   d5ed/   fd       ZZeded3ed   d5ed/   fd       Z[eded3ed   d5dfd       Z\eded3ed   d5dfd       Z]eded3ed   d5dfd       Z^eded3ed   d5dfd       Z_ G d de`d          Zaebd        Zce	e
eedZdy)Customera&  
    This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information,
    and track payments that belong to the same customer.
    customerOBJECT_NAMEc                   x    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)Customer.Addresscitycountryline1line2postal_codestateN__name__
__module____qualname__r   str__annotations__     C/var/www/html/immo/lib/python3.12/site-packages/stripe/_customer.pyAddressrO      sf    sm	 #	 }	 }	 c]"	 }	r]   r_   c                       e Zd ZU  G d de      Z G d de      Zeee      ed<   	 ee	d      ed<   	 ee
   ed<   	 ee   ed	<   	 eed
Zy)Customer.InvoiceSettingsc                   $    e Zd ZU eed<   	 eed<   y)$Customer.InvoiceSettings.CustomFieldnamevalueN)rW   rX   rY   rZ   r[   r\   r]   r^   CustomFieldrc      s    I Jr]   rf   c                   0    e Zd ZU ee   ed<   	 ee   ed<   y))Customer.InvoiceSettings.RenderingOptionsamount_tax_displaytemplateNrV   r\   r]   r^   RenderingOptionsrh      s"     (- sm#r]   rk   custom_fieldsr%   default_payment_methodfooterrendering_options)rl   ro   N)rW   rX   rY   r   rf   rk   r   r   r[   r   rZ   _inner_class_typesr\   r]   r^   InvoiceSettingsra      s|    	, 		| 	  [ 122	 !))I JJ	 	 $$455	 )!1
r]   rq   c                       e Zd ZU  G d de      Zee   ed<   ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 deiZy)	Customer.Shippingc                   x    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)Customer.Shipping.AddressrP   rQ   rR   rS   rT   rU   NrV   r\   r]   r^   r_   ru      sf    3- c]" C=  C=  "#& C= r]   r_   addresscarrierrd   phonetracking_numberN)	rW   rX   rY   r   r_   r   r[   rZ   rp   r\   r]   r^   Shippingrs      sj    	l 	4 '""#	 sm	 }	 "#&	 (1r]   rz   c                   t    e Zd ZU  G d de      Zed   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 deiZ	y	)
Customer.Taxc                   <    e Zd ZU eed<   	 ed   ed<   	 ee   ed<   y)Customer.Tax.LocationrQ   )billing_address
ip_addresspayment_methodshipping_destinationrH   rU   N)rW   rX   rY   rZ   r[   r   r   r\   r]   r^   Locationr~      s6    L (  C= r]   r   )failednot_collecting	supportedunrecognized_locationautomatic_taxr   location)anrokavalaraspherestripeproviderN)
rW   rX   rY   r   r   r   r[   r   rZ   rp   r\   r]   r^   Taxr|      sh    	| 	& L
 	
	 SM!	 8$$	 @AA	 )(3r]   r   rv   balancebusiness_namer    cash_balancecreatedcurrencyr   r   r   r&   default_sourceTdeleted
delinquentdescriptionr#   discountemailidindividual_nameinvoice_credit_balanceinvoice_prefixinvoice_settingslivemodemetadatard   next_invoice_sequenceobjectrx   preferred_localesshippingsourcesr'   subscriptionstax)exemptnonereverse
tax_exemptr(   tax_idsrE   
test_clockparamsr+   returnc                 Z    t        d| j                  d| j                         |            S )0
        Creates a new customer object.
        rK   postr   )r   _static_request	class_urlclsr   s     r^   createzCustomer.create  s6    
    
 	
r]   c                 v   K   t        d| j                  d| j                         |       d{         S 7 w)r   rK   r   r   N)r   _static_request_asyncr   r   s     r^   create_asynczCustomer.create_async  sD      ++ ,  
 	
s   ,97
	9r*   r$   c                 p    t        d| j                  ddj                  t        |            |            S )  
        Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
        funding instructions will be created. If funding instructions have already been created for a given customer, the same
        funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
        r$   r   -/v1/customers/{customer}/funding_instructionsrL   r   r   r   formatr   r   rL   r   s      r^    _cls_create_funding_instructionsz)Customer._cls_create_funding_instructions  sK     !?FF(2 G     	
 		
r]   c                      yr   Nr\   rL   r   s     r^   create_funding_instructionsz$Customer.create_funding_instructions  s     	r]   c                      yr   r\   selfr   s     r^   r   z$Customer.create_funding_instructions       	r]   r   c                     t        d| j                  ddj                  t        | j	                  d                  |            S )r   r$   r   r   r   r   r   r   _requestr   r   getr   s     r^   r   z$Customer.create_funding_instructions  sQ     !MM?FF($8 G    	
 		
r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)r   r$   r   r   r   r   Nr   r   r   r   r   s      r^   &_cls_create_funding_instructions_asyncz/Customer._cls_create_funding_instructions_async  sY      !++?FF(2 G   ,  	
 		
   7AA
	Ac                    K   ywr   r\   r   s     r^   !create_funding_instructions_asyncz*Customer.create_funding_instructions_async  s      	   c                    K   ywr   r\   r   s     r^   r   z*Customer.create_funding_instructions_async&        	r   r   c                    K   t        d| j                  ddj                  t        | j	                  d                  |       d{         S 7 w)r   r$   r   r   r   r   r   Nr   _request_asyncr   r   r   r   s     r^   r   z*Customer.create_funding_instructions_async1  sa      !%%?FF($8 G   &  	
 		
   AAA
		Asidr/   c                 z    | j                         dt        |      }t        d| j                  d||            S )
        Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
        /rK   deleter   r   r   r   r   r   r   r   urls       r^   _cls_deletezCustomer._cls_deleteE  sE     +c*:;   
 	
r]   c                      yr   Nr\   r   r   s     r^   r   zCustomer.deleteV       	r]   c                      yr   r\   r   s     r^   r   zCustomer.delete`  s    
 	r]   r   c                 F    | j                  d| j                         |      S )r   r   r   )_request_and_refreshinstance_urlr   s     r^   r   zCustomer.deleteg  s.     (( ) 
 	
r]   c                    K   | j                         dt        |      }t        d| j                  d||       d{         S 7 w)r   r   rK   r   r   Nr   r   r   r   r   s       r^   _cls_delete_asynczCustomer._cls_delete_asynct  sS      +c*:;++ ,  
 	
   <A	A
	A	c                    K   ywr   r\   r   s     r^   delete_asynczCustomer.delete_async        	r   c                    K   ywr   r\   r   s     r^   r   zCustomer.delete_async        	r   r   c                 b   K   | j                  d| j                         |       d{   S 7 w)r   r   r   N)_request_and_refresh_asyncr   r   s     r^   r   zCustomer.delete_async  s<      44 5 
 
 	
 
s   &/-/r.   c                 p    t        d| j                  ddj                  t        |            |            S )G
        Removes the currently applied discount on a customer.
        r#   r   !/v1/customers/{customer}/discountr   r   r   r   s      r^   _cls_delete_discountzCustomer._cls_delete_discount  sJ     3::(2 ;     	
 		
r]   c                      yr   Nr\   r   s     r^   delete_discountzCustomer.delete_discount  r   r]   c                      yr   r\   r   s     r^   r  zCustomer.delete_discount       	r]   r   c                     t        d| j                  ddj                  t        | j	                  d                  |            S )r   r#   r   r   r   r   r   r   r   s     r^   r  zCustomer.delete_discount  sP     MM3::($8 ;    	
 		
r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)r   r#   r   r   r   r   Nr   r   s      r^   _cls_delete_discount_asyncz#Customer._cls_delete_discount_async  sX      ++3::(2 ;   ,  	
 		
r   c                    K   ywr   r\   r   s     r^   delete_discount_asynczCustomer.delete_discount_async  r   r   c                    K   ywr   r\   r   s     r^   r  zCustomer.delete_discount_async  r   r   r  c                    K   t        d| j                  ddj                  t        | j	                  d                  |       d{         S 7 w)r   r#   r   r   r   r   r   Nr   r   s     r^   r  zCustomer.delete_discount_async  s`      %%3::($8 ;   &  	
 		
r   r5   c                     | j                  d| j                         |      }t        |t              s!t	        dt        |      j                  z        |S )
        Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
        r   r   %Expected list object from API, got %s)r   r   
isinstancer   	TypeErrortyperW   r   r   results      r^   listzCustomer.list  s]     $$MMO % 

 &*-7<((* 
 r]   c                    K   | j                  d| j                         |       d{   }t        |t              s!t	        dt        |      j                  z        |S 7 7w)r  r   r   Nr  )r   r   r  r   r  r  rW   r  s      r^   
list_asynczCustomer.list_async'  sk      00MMO 1 
 

 &*-7<((* 
 
s   &A"A 8A"r6   r%   c                 ~    t        t        d   | j                  ddj                  t	        |            |            S )G
        Returns a list of PaymentMethods for a given Customer
        r%   r   (/v1/customers/{customer}/payment_methodsr   r   r   r   r   r   r   r   s      r^   _cls_list_payment_methodsz"Customer._cls_list_payment_methods;  sP     ':AA(2 B     	
 		
r]   c                      yr  Nr\   r   s     r^   list_payment_methodszCustomer.list_payment_methodsO  r   r]   c                      yr  r\   r   s     r^   r  zCustomer.list_payment_methodsY  r  r]   r  c                     t        t        d   | j                  ddj                  t	        | j                  d                  |            S )r  r%   r   r  r   r   r   )r   r   r   r   r   r   r   s     r^   r  zCustomer.list_payment_methodsb  sV     'MM:AA($8 B    	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |            |       d{         S 7 w)r  r%   r   r  r   r   Nr   r   r   r   r   r   s      r^   _cls_list_payment_methods_asyncz(Customer._cls_list_payment_methods_asynct  s^      '++:AA(2 B   ,  	
 		
   >A A	
	Ac                    K   ywr  r\   r   s     r^   list_payment_methods_asyncz#Customer.list_payment_methods_async  r   r   c                    K   ywr  r\   r   s     r^   r%  z#Customer.list_payment_methods_async  r   r   r"  c                    K   t        t        d   | j                  ddj                  t	        | j                  d                  |       d{         S 7 w)r  r%   r   r  r   r   r   N)r   r   r   r   r   r   r   s     r^   r%  z#Customer.list_payment_methods_async  sf      '%%:AA($8 B   &  	
 		
s   AAA
	Ar;   c                 z    | j                         dt        |      }t        d| j                  d||            S )w  
        Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.

        This request accepts mostly the same arguments as the customer creation call.
        r   rK   r   r   r   r   r   r   r   s       r^   modifyzCustomer.modify  sD     +b/:   
 	
r]   c                    K   | j                         dt        |      }t        d| j                  d||       d{         S 7 w)r)  r   rK   r   r   Nr   r*  s       r^   modify_asynczCustomer.modify_async  sR      +b/:++ ,  
 	
r   r@   c                 8     | |fi |}|j                          |S ).
        Retrieves a Customer object.
        )refreshr   r   r   instances       r^   retrievezCustomer.retrieve  s$     r$V$r]   c                 T   K    | |fi |}|j                          d{    |S 7 w)r/  N)refresh_asyncr1  s       r^   retrieve_asynczCustomer.retrieve_async  s3      r$V$$$&&& 	's   (&(r   rA   c                     t        d| j                  ddj                  t        |      t        |            |            S )H
        Retrieves a PaymentMethod object for a given Customer.
        r%   r   9/v1/customers/{customer}/payment_methods/{payment_method}rL   r   r   r   r   rL   r   r   s       r^   _cls_retrieve_payment_methodz%Customer._cls_retrieve_payment_method  sS     KRR(2#.~#> S     

 
	
r]   c                      yr8  Nr\   rL   r   r   s      r^   retrieve_payment_methodz Customer.retrieve_payment_method  s     	r]   c                      yr>  r\   r   r   r   s      r^   r@  z Customer.retrieve_payment_method  r   r]   r<  c                     t        d| j                  ddj                  t        | j	                  d            t        |            |            S )r8  r%   r   r9  r   r:  r   r   rB  s      r^   r@  z Customer.retrieve_payment_method  sY     MMKRR($8#.~#> S    

 
	
r]   c                    K   t        d| j                  ddj                  t        |      t        |            |       d{         S 7 w)r8  r%   r   r9  r:  r   Nr   r;  s       r^   "_cls_retrieve_payment_method_asyncz+Customer._cls_retrieve_payment_method_async+  sa      ++KRR(2#.~#> S   ,  

 
	
   AAA
	Ac                    K   ywr>  r\   r?  s      r^   retrieve_payment_method_asyncz&Customer.retrieve_payment_method_asyncA  s      	r   c                    K   ywr>  r\   rB  s      r^   rH  z&Customer.retrieve_payment_method_asyncM  r   r   rE  c                    K   t        d| j                  ddj                  t        | j	                  d            t        |            |       d{         S 7 w)r8  r%   r   r9  r   r:  r   Nr   rB  s      r^   rH  z&Customer.retrieve_payment_method_asyncX  si      %%KRR($8#.~#> S   &  

 
	
s   AAA
	AkwargsrD   c                 *     | j                   |ddi|S )  
        Search for customers you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
        Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
        conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
        to an hour behind during outages. Search functionality is not available to merchants in India.
        
search_url/v1/customers/search)_searchr   argsrK  s      r^   searchzCustomer.searchm  s      s{{tN&<NvNNr]   c                 F   K    | j                   |ddi| d{   S 7 w)rM  rN  rO  N)_search_asyncrQ  s      r^   search_asynczCustomer.search_asyncy  s:      'S&&04
-
8>
 
 	
 
s   !!c                 B     | j                   |i |j                         S N)rS  auto_paging_iterrQ  s      r^   search_auto_paging_iterz Customer.search_auto_paging_iter  s#     szz4*6*;;==r]   c                 ^   K    | j                   |i | d {   j                         S 7 wrX  )rV  rY  rQ  s      r^   search_auto_paging_iter_asyncz&Customer.search_auto_paging_iter_async  s/      'c&&777IIKK7s   -+-r3   r!   c                 ~    t        t        d   | j                  ddj                  t	        |            |            S )
        Returns a list of transactions that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance).
        r!   r   -/v1/customers/{customer}/balance_transactionsr   r   r  r   s      r^   list_balance_transactionsz"Customer.list_balance_transactions  sQ     34?FF(2 G     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |            |       d{         S 7 w)r^  r!   r   r_  r   r   Nr!  r   s      r^   list_balance_transactions_asyncz(Customer.list_balance_transactions_async  s_      34++?FF(2 G   ,  	
 		
r#  r)   c                 p    t        d| j                  ddj                  t        |            |            S )
        Creates an immutable transaction that updates the customer's credit [balance](https://docs.stripe.com/docs/billing/customer/balance).
        r!   r   r_  r   r   r   r   s      r^   create_balance_transactionz#Customer.create_balance_transaction  sK     (?FF(2 G     	
 		
r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)rd  r!   r   r_  r   r   Nr   r   s      r^    create_balance_transaction_asyncz)Customer.create_balance_transaction_async  sY      (++?FF(2 G   ,  	
 		
r   transactionr=   c                     t        d| j                  ddj                  t        |      t        |            |            S )
        Retrieves a specific customer balance transaction that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance).
        r!   r   ;/v1/customers/{customer}/balance_transactions/{transaction}rL   rh  r   r   r   rL   rh  r   s       r^   retrieve_balance_transactionz%Customer.retrieve_balance_transaction  sS     (MTT(2 +K 8 U     

 
	
r]   c                    K   t        d| j                  ddj                  t        |      t        |            |       d{         S 7 w)rj  r!   r   rk  rl  r   Nr   rm  s       r^   "retrieve_balance_transaction_asyncz+Customer.retrieve_balance_transaction_async  sa      (++MTT(2 +K 8 U   ,  

 
	
rF  r9   c                     t        d| j                  ddj                  t        |      t        |            |            S )x
        Most credit balance transaction fields are immutable, but you may update its description and metadata.
        r!   r   rk  rl  r   r   rm  s       r^   modify_balance_transactionz#Customer.modify_balance_transaction  sS     (MTT(2 +K 8 U     

 
	
r]   c                    K   t        d| j                  ddj                  t        |      t        |            |       d{         S 7 w)rr  r!   r   rk  rl  r   Nr   rm  s       r^    modify_balance_transaction_asyncz)Customer.modify_balance_transaction_async%  sa      (++MTT(2 +K 8 U   ,  

 
	
rF  r4   r"   c                 ~    t        t        d   | j                  ddj                  t	        |            |            S )
        Returns a list of transactions that modified the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance).
        r"   r   2/v1/customers/{customer}/cash_balance_transactionsr   r   r  r   s      r^   list_cash_balance_transactionsz'Customer.list_cash_balance_transactions;  sQ     78DKK(2 L     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |            |       d{         S 7 w)rw  r"   r   rx  r   r   Nr!  r   s      r^   $list_cash_balance_transactions_asyncz-Customer.list_cash_balance_transactions_asyncO  s_      78++DKK(2 L   ,  	
 		
r#  r?   c                     t        d| j                  ddj                  t        |      t        |            |            S )
        Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance).
        r"   r   @/v1/customers/{customer}/cash_balance_transactions/{transaction}rl  r   r   rm  s       r^   !retrieve_cash_balance_transactionz*Customer.retrieve_cash_balance_transactionc  sS     ,RYY(2 +K 8 Z     

 
	
r]   c                    K   t        d| j                  ddj                  t        |      t        |            |       d{         S 7 w)r}  r"   r   r~  rl  r   Nr   rm  s       r^   'retrieve_cash_balance_transaction_asyncz0Customer.retrieve_cash_balance_transaction_asyncy  sa      ,++RYY(2 +K 8 Z   ,  

 
	
rF  r7   c                     t        t        t        d      | j                  ddj	                  t        |            |            S )8
        List sources for a specified customer.
        r   r    /v1/customers/{customer}/sourcesr   r   )r   r   r   r   r   r   r   s      r^   list_sourceszCustomer.list_sources  sU     uGHI299(2 :     	
 		
r]   c                    K   t        t        t        d      | j                  ddj	                  t        |            |       d{         S 7 w)r  r   r   r  r   r   N)r   r   r   r   r   r   r   s      r^   list_sources_asynczCustomer.list_sources_async  sc      uGHI++299(2 :   ,  	
 		
s   AAA
	Ar,   c                 ~    t        t        d   | j                  ddj                  t	        |            |            S )  
        When you create a new credit card, you must specify a customer or recipient on which to create it.

        If the card's owner has no default card, then the new card will become the default.
        However, if the owner already has a default, then it will not change.
        To change the default, you should [update the customer](https://docs.stripe.com/docs/api#update_customer) to have a new default_source.
        r   r   r  r   r   r   r   r   r   r   r   s      r^   create_sourcezCustomer.create_source  sP     <=299(2 :     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |            |       d{         S 7 w)r  r   r   r  r   r   Nr   r   r   r   r   r   s      r^   create_source_asynczCustomer.create_source_async  s^      <=++299(2 :   ,  	
 		
r#  rB   c                     t        t        d   | j                  ddj                  t	        |      t	        |            |            S )C
        Retrieve a specified source for a given customer.
        r   r   %/v1/customers/{customer}/sources/{id}rL   r   r   r  r   rL   r   r   s       r^   retrieve_sourcezCustomer.retrieve_source  sV     <=7>>(2{2 ?     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |      t	        |            |       d{         S 7 w)r  r   r   r  r  r   Nr  r  s       r^   retrieve_source_asynczCustomer.retrieve_source_async  sd      <=++7>>(2{2 ?   ,  	
 		
   AA
A
	Ar<   c                     t        t        d   | j                  ddj                  t	        |      t	        |            |            S )A
        Update a specified source for a given customer.
        r   r   r  r  r   r  r  s       r^   modify_sourcezCustomer.modify_source	  sV     <=7>>(2{2 ?     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |      t	        |            |       d{         S 7 w)r  r   r   r  r  r   Nr  r  s       r^   modify_source_asynczCustomer.modify_source_async  sd      <=++7>>(2{2 ?   ,  	
 		
r  r0   c                     t        t        d   | j                  ddj                  t	        |      t	        |            |            S )A
        Delete a specified source for a given customer.
        r   r   r  r  r   r  r  s       r^   delete_sourcezCustomer.delete_source3  sV     <=7>>(2{2 ?     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |      t	        |            |       d{         S 7 w)r  r   r   r  r  r   Nr  r  s       r^   delete_source_asynczCustomer.delete_source_asyncH  sd      <=++7>>(2{2 ?   ,  	
 		
r  r-   c                 p    t        d| j                  ddj                  t        |            |            S )=
        Creates a new tax_id object for a customer.
        r(   r    /v1/customers/{customer}/tax_idsr   r   r   r   s      r^   create_tax_idzCustomer.create_tax_id]  sJ     299(2 :     	
 		
r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)r  r(   r   r  r   r   Nr   r   s      r^   create_tax_id_asynczCustomer.create_tax_id_asynco  sX      ++299(2 :   ,  	
 		
r   rC   c                     t        d| j                  ddj                  t        |      t        |            |            S )H
        Retrieves the tax_id object with the given identifier.
        r(   r   %/v1/customers/{customer}/tax_ids/{id}r  r   r   r  s       r^   retrieve_tax_idzCustomer.retrieve_tax_id  sP     7>>(2{2 ?     	
 		
r]   c                    K   t        d| j                  ddj                  t        |      t        |            |       d{         S 7 w)r  r(   r   r  r  r   Nr   r  s       r^   retrieve_tax_id_asynczCustomer.retrieve_tax_id_async  s^      ++7>>(2{2 ?   ,  	
 		
rF  r1   c                     t        d| j                  ddj                  t        |      t        |            |            S )4
        Deletes an existing tax_id object.
        r(   r   r  r  r   r   r  s       r^   delete_tax_idzCustomer.delete_tax_id  sP     7>>(2{2 ?     	
 		
r]   c                    K   t        d| j                  ddj                  t        |      t        |            |       d{         S 7 w)r  r(   r   r  r  r   Nr   r  s       r^   delete_tax_id_asynczCustomer.delete_tax_id_async  s^      ++7>>(2{2 ?   ,  	
 		
rF  r8   c                 ~    t        t        d   | j                  ddj                  t	        |            |            S );
        Returns a list of tax IDs for a customer.
        r(   r   r  r   r   r  r   s      r^   list_tax_idszCustomer.list_tax_ids  sO     w299(2 :     	
 		
r]   c                    K   t        t        d   | j                  ddj                  t	        |            |       d{         S 7 w)r  r(   r   r  r   r   Nr!  r   s      r^   list_tax_ids_asynczCustomer.list_tax_ids_async  s]      w++299(2 :   ,  	
 		
r#  r>   c                 p    t        d| j                  ddj                  t        |            |            S )6
        Retrieves a customer's cash balance.
        r    r   %/v1/customers/{customer}/cash_balancer   r   r   r   s      r^   retrieve_cash_balancezCustomer.retrieve_cash_balance  sJ     7>>(2 ?     	
 		
r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)r  r    r   r  r   r   Nr   r   s      r^   retrieve_cash_balance_asyncz$Customer.retrieve_cash_balance_async  sX      ++7>>(2 ?   ,  	
 		
r   r:   c                 p    t        d| j                  ddj                  t        |            |            S )D
        Changes the settings on a customer's cash balance.
        r    r   r  r   r   r   r   s      r^   modify_cash_balancezCustomer.modify_cash_balance!  sJ     7>>(2 ?     	
 		
r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)r  r    r   r  r   r   Nr   r   s      r^   modify_cash_balance_asyncz"Customer.modify_cash_balance_async3  sX      ++7>>(2 ?   ,  	
 		
r   c                   Z   e Zd ZU ed   ed<   ededed   ddfd       Ze	e
deded   ddfd	              Ze	ded   ddfd
       Z ed      ded   ddfd       Zededed   ddfd       Ze	e
deded   ddfd              Ze	ded   ddfd       Z ed      ded   ddfd       Zy)Customer.TestHelpersrK   _resource_clsrL   r   r2   r   r"   c                 p    t        d| j                  ddj                  t        |            |            S )C
            Create an incoming testmode bank transfer
            r"   r   7/v1/test_helpers/customers/{customer}/fund_cash_balancer   r   r   r   s      r^   _cls_fund_cash_balancez+Customer.TestHelpers._cls_fund_cash_balanceH  sK     0##MTT!,X!6 U  " $ 	 	r]   c                      yr  Nr\   r   s     r^   fund_cash_balancez&Customer.TestHelpers.fund_cash_balance\  s     r]   c                      yr  r\   r   s     r^   r  z&Customer.TestHelpers.fund_cash_balancef  s     r]   r  c                     t        d| j                  j                  ddj                  t	        | j                  j                  d                  |            S )r  r"   r   r  r   r   r   )r   resourcer   r   r   r   r   s     r^   r  z&Customer.TestHelpers.fund_cash_balanceo  s^     0&&MTT!,T]]->->t-D!E U  " ' 	 	r]   c                    K   t        d| j                  ddj                  t        |            |       d{         S 7 w)r  r"   r   r  r   r   Nr   r   s      r^   _cls_fund_cash_balance_asyncz1Customer.TestHelpers._cls_fund_cash_balance_async  sY      0//MTT!,X!6 U  " 0  	 	r   c                    K   ywr  r\   r   s     r^   fund_cash_balance_asyncz,Customer.TestHelpers.fund_cash_balance_async  s      r   c                    K   ywr  r\   r   s     r^   r  z,Customer.TestHelpers.fund_cash_balance_async  s      r   r  c                    K   t        d| j                  j                  ddj                  t	        | j                  j                  d                  |       d{         S 7 w)r  r"   r   r  r   r   r   N)r   r  r   r   r   r   r   s     r^   r  z,Customer.TestHelpers.fund_cash_balance_async  sl      0mm22MTT!,T]]->->t-D!E U  " 3  	 	s   AA'A%
	A'N)rW   rX   rY   r   r[   classmethodrZ   r   r  r   staticmethodr  r   r  r  r\   r]   r^   TestHelpersr  E  s   J''			 <=	 .		 
	& 
			%+,K%L	-	 
 
	 
	"#BC	-	 
	 
6	7	"#BC	-	 
8	" 
		 <=	 .		 
	& 
			%+,K%L	-	 
 
	 
	"#BC	-	 
	 
<	=	"#BC	-	 
>	r]   r  c                 $    | j                  |       S rX  )r  )r   s    r^   test_helperszCustomer.test_helpers  s    %%r]   )rv   r   r   r   N)erW   rX   rY   __doc__rM   r   r   r[   r   r_   rq   rz   r   r   intrZ   r   r   boolr   r   r   r  r   r   r   r   r   r  r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r"  r%  r+  r-  r3  r6  r<  r@  rE  rH  r	   rS  rV  r   rZ  r   r\  r`  rb  re  rg  rn  rp  rs  ru  ry  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  propertyr  rp   r\   r]   r^   rK   rK   v   s   
 2<K'*-.;, 4(
, (
T,2< ,2\&4l &4P g c] C=  =)) L sm HIJ 
 gdm$$  # z"" C= 	G c]" %T#s(^44 SM! //N tCH~&& 3- $C=( J C=  S	** x   5CDE  J~677 
#!<=>> j)** 566 
f%;< 
 
 
 
45
	
 
 

 BC
 
	
 
* 		BC	 
	  	 HI	  <=
HI
	
 >
& 

 BC
 
	
 
* 		BC	 
	  	 HI	  BC
HI
	
 D
& 

!'(>!?
	
 
  "#9:	   v&<= *   -(

56

	

 )

 

!'(>!?
	
 
  "#9:	   56	  -.

56

	

 /

 

&,-K&L
	
 
" !'(F!G	   =>	  01
=>
	
 2
" 

&,-K&L
	
 
" !'(F!G	   =>	  67
=>
	
 8
" 23	J	 & 23	J	 & 

 ;<
 
O	$	
 
& !'(J!K	O	$   AB	O	$  56
AB
	O	$
 7
" 

 ;<
 
O	$	
 
& !'(J!K	O	$   AB	O	$  ;<
AB
	O	$
 =
" 

 &'= >
	
 
$ 

 &'= >
	
 
$  &'? @	   &'? @	  

 
 >?	

 

 
*  >? 
	    >? 
	  89

 >?
 
	
 :
( 

 
 >?	

 

 
*  >? 
	    >? 
	  >?

 >?
 
	
 @
( 	O$%;<	O	J	'	O 	O 
$%;<
	J	'
 
 >$%;<>	*	> >
 L$%;<L	z	"L L
 

 @A
 
0	1	
 
& 

 @A
 
0	1	
 
& 

 AB
 
&	
 
& 

 AB
 
&	
 
& 

 
 CD	

 
&
 
* 

 
 CD	

 
&
 
* 

 
 AB	

 
&
 
* 

 
 AB	

 
&
 
* 

 DE
 
4	5	
 
& 

 DE
 
4	5	
 
& 

 
 GH	

 
*
 
* 

 
 GH	

 
*
 
* 

&,-H&I
	EDE	F
 
" 

&,-H&I
	EDE	F
 
" 

&,-I&J
	9	:
 
* 

&,-I&J
	9	:
 
* 

 
 78	

 
9	:
 
( 

 
 78	

 
9	:
 
( 

 
 56	

 
9	:
 
( 

 
 56	

 
9	:
 
( 

 
 56	

 
9	:
 
( 

 
 56	

 
9	:
 
( 

&,-H&I
	
 
" 

&,-H&I
	
 
" 

 
 67	

 

 
( 

 
 67	

 

 
( 

 
 45	

 

 
( 

 
 45	

 

 
( 

&,-G&H
	G	
 
" 

&,-G&H
	G	
 
" 

 <=
 
	
 
& 

 <=
 
	
 
& 

&,-N&O
	
 
" 

&,-N&O
	
 
"s,Z8 sj & & +	r]   rK   N)}stripe._createable_api_resourcer   stripe._deletable_api_resourcer   stripe._expandable_fieldr   stripe._list_objectr   stripe._listable_api_resourcer   %stripe._nested_resource_class_methodsr   stripe._search_result_objectr	   stripe._searchable_api_resourcer
   stripe._stripe_objectr   stripe._test_helpersr   stripe._updateable_api_resourcer   stripe._utilr   r   typingr   r   r   r   r   r   r   r   r   typing_extensionsr   r   r   r   stripe._accountr   stripe._bank_accountr   stripe._cardr   stripe._cash_balancer    $stripe._customer_balance_transactionr!   )stripe._customer_cash_balance_transactionr"   stripe._discountr#   stripe._funding_instructionsr$   stripe._payment_methodr%   stripe._sourcer&   stripe._subscriptionr'   stripe._tax_idr(   9stripe.params._customer_create_balance_transaction_paramsr)   :stripe.params._customer_create_funding_instructions_paramsr*   %stripe.params._customer_create_paramsr+   ,stripe.params._customer_create_source_paramsr,   ,stripe.params._customer_create_tax_id_paramsr-   .stripe.params._customer_delete_discount_paramsr.   %stripe.params._customer_delete_paramsr/   ,stripe.params._customer_delete_source_paramsr0   ,stripe.params._customer_delete_tax_id_paramsr1   0stripe.params._customer_fund_cash_balance_paramsr2   8stripe.params._customer_list_balance_transactions_paramsr3   =stripe.params._customer_list_cash_balance_transactions_paramsr4   #stripe.params._customer_list_paramsr5   3stripe.params._customer_list_payment_methods_paramsr6   +stripe.params._customer_list_sources_paramsr7   +stripe.params._customer_list_tax_ids_paramsr8   9stripe.params._customer_modify_balance_transaction_paramsr9   2stripe.params._customer_modify_cash_balance_paramsr:   %stripe.params._customer_modify_paramsr;   ,stripe.params._customer_modify_source_paramsr<   ;stripe.params._customer_retrieve_balance_transaction_paramsr=   4stripe.params._customer_retrieve_cash_balance_paramsr>   @stripe.params._customer_retrieve_cash_balance_transaction_paramsr?   'stripe.params._customer_retrieve_paramsr@   6stripe.params._customer_retrieve_payment_method_paramsrA   .stripe.params._customer_retrieve_source_paramsrB   .stripe.params._customer_retrieve_tax_id_paramsrC   %stripe.params._customer_search_paramsrD   stripe.test_helpers._test_clockrE   rK   r  r  r\   r]   r^   <module>r     s   B ? 4 * = O ; A . 7 A :
 
 
 C B'0!0O *@4%1$ K K G K O K9 459:x(x(I*%$
#*%*%I ) ) ; 6IX: &.   "r]   