
    h                         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 d dlmZ d dlmZ d dlmZmZmZ d dl m!Z!m"Z"m#Z#  G d de      Z$y)    )Customer)!CustomerBalanceTransactionService)CustomerCashBalanceService)%CustomerCashBalanceTransactionService)"CustomerFundingInstructionsService)CustomerPaymentMethodService)CustomerPaymentSourceService)CustomerTaxIdService)Discount)
ListObject)RequestOptions)SearchResultObject)StripeService)sanitize_id)DictListcast)LiteralNotRequired	TypedDictc            	           e Zd Z fdZ G d de      Z G d de      Z G d de      Z G d d	e      Z G d
 de      Z	 G d de      Z
 G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d  d!e      Z G d" d#e      Z G d$ d%e      Z G d& d'e      Z G d( d)e      Z G d* d+e      Z G d, d-e      Z G d. d/e      Z G d0 d1e      Z G d2 d3e      Z G d4 d5e      Z G d6 d7e      Zi i fd8e d9d:d;e!d<e"fd=Z#i i fd8e d9d:d;e!d<e"fd>Z$i i fd8e d9d?d;e!d<e"fd@Z%i i fd8e d9d?d;e!d<e"fdAZ&i i fd8e d9dBd;e!d<e"fdCZ'i i fd8e d9dBd;e!d<e"fdDZ(i i fd8e d9dEd;e!d<e)fdFZ*i i fd8e d9dEd;e!d<e)fdGZ+i i fd9dHd;e!d<e,e"   fdIZ-i i fd9dHd;e!d<e,e"   fdJZ.i i fd9dKd;e!d<e"fdLZ/i i fd9dKd;e!d<e"fdMZ0i fd9dNd;e!d<e1e"   fdOZ2i fd9dNd;e!d<e1e"   fdPZ3 xZ4S )QCustomerServicec                    t         |   |       t        | j                        | _        t        | j                        | _        t        | j                        | _        t        | j                        | _
        t        | j                        | _        t        | j                        | _        t        | j                        | _        y )N)super__init__r   
_requestorcash_balancer   balance_transactionsr   cash_balance_transactionsr	   payment_sourcesr
   tax_idsr   payment_methodsr   funding_instructions)self	requestor	__class__s     X/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/stripe/_customer_service.pyr   zCustomerService.__init__    s    #6tG$EOO%
! *OOO*
&  <DOOL+DOO<;DOOL$FOO%
!    c                      e Zd ZU ed   ed<   	 ee   ed<   	 ed   ed<   	 ee   ed<   	 ee   ed<   	 eee      ed<   	 ee   ed	<   	 ed
   ed<   	 ed   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   ee   ed<   	 eee      ed<   	 ed   ed<   	 ee   ed<   ed   ed<   	 ed   ed<   	 eed      ed<   	 ee   ed<   	 ee   ed<   y)CustomerService.CreateParamsz/Literal['']|CustomerService.CreateParamsAddressaddressbalance'CustomerService.CreateParamsCashBalancer   descriptionemailexpandinvoice_prefix+CustomerService.CreateParamsInvoiceSettingsinvoice_settingsLiteral['']|Dict[str, str]metadatanamenext_invoice_sequencepayment_methodphonepreferred_localesz0Literal['']|CustomerService.CreateParamsShippingshippingsourceCustomerService.CreateParamsTaxtax0Literal['']|Literal['exempt', 'none', 'reverse']
tax_exempt&CustomerService.CreateParamsTaxIdDatumtax_id_data
test_clockvalidateN	__name__
__module____qualname__r   __annotations__intstrr   bool r(   r'   CreateParamsr*   0   s   NOO	 S!!	 ""KLL	 !%%	 3	 DI&&	 $C((	 &9
 	
	 :;;	 #	  +3//	 $C((3	 'tCy11	 >
 	
	 C  :;;	  >
 	
	 !9:
 	
	  $$	 d##r(   rN   c                   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)#CustomerService.CreateParamsAddresscitycountryline1line2postal_codestateNrF   rG   rH   r   rK   rI   rM   r(   r'   CreateParamsAddressrP      l    #	 S!!	 3	 3	 !%%	 3	r(   rX   c                       e Zd ZU ed   ed<   y)r-   /CustomerService.CreateParamsCashBalanceSettingssettingsNrF   rG   rH   r   rI   rM   r(   r'   CreateParamsCashBalancez'CustomerService.CreateParamsCashBalance       =
 	
	r(   r^   c                   $    e Zd ZU eed      ed<   y)r[   	automaticmanualmerchant_defaultreconciliation_modeNrF   rG   rH   r   r   rI   rM   r(   r'   CreateParamsCashBalanceSettingsz/CustomerService.CreateParamsCashBalanceSettings       (=>
 	
	r(   rg   c                   T    e Zd ZU ed   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   y)r2   zHLiteral['']|List[CustomerService.CreateParamsInvoiceSettingsCustomField]custom_fieldsdefault_payment_methodfooterzGLiteral['']|CustomerService.CreateParamsInvoiceSettingsRenderingOptionsrendering_optionsNrF   rG   rH   r   rI   rK   rM   r(   r'   CreateParamsInvoiceSettingsz+CustomerService.CreateParamsInvoiceSettings   R    "V
 	
	 !,C 00	 C  	 'U
 	
	r(   ro   c                   $    e Zd ZU eed<   	 eed<   y)6CustomerService.CreateParamsInvoiceSettingsCustomFieldr6   valueNrF   rG   rH   rK   rI   rM   r(   r'   &CreateParamsInvoiceSettingsCustomFieldrr          		 
	r(   ru   c                   0    e Zd ZU ed   ed<   	 ee   ed<   y);CustomerService.CreateParamsInvoiceSettingsRenderingOptions;Literal['']|Literal['exclude_tax', 'include_inclusive_tax']amount_tax_displaytemplateNrn   rM   r(   r'   +CreateParamsInvoiceSettingsRenderingOptionsrx      )    'I
 	
	 c""	r(   r|   c                   6    e Zd ZU ded<   	 eed<   	 ee   ed<   y)$CustomerService.CreateParamsShipping+CustomerService.CreateParamsShippingAddressr+   r6   r9   NrF   rG   rH   rI   rK   r   rM   r(   r'   CreateParamsShippingr      +    >>	 		 3	r(   r   c                   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)r   rQ   rR   rS   rT   rU   rV   NrW   rM   r(   r'   CreateParamsShippingAddressz+CustomerService.CreateParamsShippingAddress   rY   r(   r   c                   6    e Zd ZU ed   ed<   	 eed      ed<   y)r=   Literal['']|str
ip_address)deferredimmediatelyvalidate_locationNrF   rG   rH   r   rI   r   rM   r(   r'   CreateParamsTaxzCustomerService.CreateParamsTax  s+     122	 'w/H'IJJ	r(   r   c                   *    e Zd ZU ed   ed<   	 eed<   y)rA   )nad_nrtae_trnal_tinam_tinao_tinar_cuitau_abnau_arnaw_tinaz_tinba_tinbb_tinbd_binbf_ifubg_uicbh_vatbj_ifubo_tinbr_cnpjbr_cpfbs_tinby_tinca_bn
ca_gst_hst	ca_pst_bc	ca_pst_mb	ca_pst_skca_qstcd_nifch_uidch_vatcl_tincm_niucn_tinco_nitcr_tincv_nifde_stndo_rcnec_ruceg_tines_cifet_tin
eu_oss_vateu_vatgb_vatge_vatgn_nifhk_brhr_oibhu_tinid_npwpil_vatin_gstis_vatjp_cnjp_rnjp_trnke_pinkg_tinkh_tinkr_brnkz_binla_tinli_uidli_vatma_vatmd_vatme_pibmk_vatmr_nifmx_rfcmy_frpmy_itnmy_sstng_tinno_vatno_voecnp_pannz_gstom_vatpe_rucph_tinro_tinrs_pibru_innru_kppsa_vatsg_gstsg_uensi_tinsn_nineasr_finsv_nitth_vattj_tintr_tintw_vattz_vatua_vatug_tinus_einuy_rucuz_tinuz_vatve_rifvn_tinza_vatzm_tinzw_tintypers   N)rF   rG   rH   r   rI   rK   rM   r(   r'   CreateParamsTaxIdDatumz&CustomerService.CreateParamsTaxIdDatum  s)    mo
 o	
`	 
	r(   r   c                       e Zd Zy)$CustomerService.DeleteDiscountParamsNrF   rG   rH   rM   r(   r'   DeleteDiscountParamsr         r(   r  c                       e Zd Zy)CustomerService.DeleteParamsNr  rM   r(   r'   DeleteParamsr    r  r(   r  c                       e Zd ZU ed   ed<   	 ee   ed<   	 ee   ed<   	 eee      ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y	)
CustomerService.ListParamsz%CustomerService.ListParamsCreated|intcreatedr/   ending_beforer0   limitstarting_afterrC   N)rF   rG   rH   r   rI   rK   r   rJ   rM   r(   r'   
ListParamsr    s    DEE	 3	 #3''	 DI&&	 3	 $C((	  $$	r(   r  c                   T    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)!CustomerService.ListParamsCreatedgtgteltlteN)rF   rG   rH   r   rJ   rI   rM   r(   r'   ListParamsCreatedr    sH    	 	 	 	r(   r  c                   $    e Zd ZU eee      ed<   y)CustomerService.RetrieveParamsr0   N)rF   rG   rH   r   r   rK   rI   rM   r(   r'   RetrieveParamsr    s    DI&&	r(   r  c                   T    e Zd ZU eee      ed<   	 ee   ed<   	 ee   ed<   	 eed<   y)CustomerService.SearchParamsr0   r  pagequeryN)rF   rG   rH   r   r   rK   rI   rJ   rM   r(   r'   SearchParamsr    sF    DI&&	 3	 #	 
	r(   r  c                   l   e Zd ZU ed   ed<   	 ee   ed<   	 ed   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 eee      ed	<   	 ee   ed
<   	 ed   ed<   	 ed   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 eee      ed<   	 ed   ed<   	 ee   ed<   ed   ed<   	 ed   ed<   	 ee   ed<   y)CustomerService.UpdateParamsz/Literal['']|CustomerService.UpdateParamsAddressr+   r,   'CustomerService.UpdateParamsCashBalancer   default_sourcer.   r/   r0   r1   +CustomerService.UpdateParamsInvoiceSettingsr3   r4   r5   r6   r7   r9   r:   z0Literal['']|CustomerService.UpdateParamsShippingr;   r<   CustomerService.UpdateParamsTaxr>   r?   r@   rD   NrE   rM   r(   r'   UpdateParamsr    se   NOO	 S!!	 ""KLL	 $C((	 !%%	 3	 DI&&	 $C((	 &9
 	
	 :;;	 #	  +3//	 3	 'tCy11	 >
 	
	 C  :;;	  >
 	
	 d##r(   r#  c                   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)#CustomerService.UpdateParamsAddressrQ   rR   rS   rT   rU   rV   NrW   rM   r(   r'   UpdateParamsAddressr%  '  rY   r(   r&  c                       e Zd ZU ed   ed<   y)r  /CustomerService.UpdateParamsCashBalanceSettingsr\   Nr]   rM   r(   r'   UpdateParamsCashBalancez'CustomerService.UpdateParamsCashBalanceA  r_   r(   r)  c                   $    e Zd ZU eed      ed<   y)r(  ra   re   Nrf   rM   r(   r'   UpdateParamsCashBalanceSettingsz/CustomerService.UpdateParamsCashBalanceSettingsJ  rh   r(   r+  c                   T    e Zd ZU ed   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   y)r!  zHLiteral['']|List[CustomerService.UpdateParamsInvoiceSettingsCustomField]rj   rk   rl   zGLiteral['']|CustomerService.UpdateParamsInvoiceSettingsRenderingOptionsrm   Nrn   rM   r(   r'   UpdateParamsInvoiceSettingsz+CustomerService.UpdateParamsInvoiceSettingsR  rp   r(   r-  c                   $    e Zd ZU eed<   	 eed<   y)6CustomerService.UpdateParamsInvoiceSettingsCustomFieldr6   rs   Nrt   rM   r(   r'   &UpdateParamsInvoiceSettingsCustomFieldr/  h  rv   r(   r0  c                   0    e Zd ZU ed   ed<   	 ee   ed<   y);CustomerService.UpdateParamsInvoiceSettingsRenderingOptionsry   rz   r{   Nrn   rM   r(   r'   +UpdateParamsInvoiceSettingsRenderingOptionsr2  r  r}   r(   r3  c                   6    e Zd ZU ded<   	 eed<   	 ee   ed<   y)$CustomerService.UpdateParamsShipping+CustomerService.UpdateParamsShippingAddressr+   r6   r9   Nr   rM   r(   r'   UpdateParamsShippingr5  ~  r   r(   r7  c                   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)r6  rQ   rR   rS   rT   rU   rV   NrW   rM   r(   r'   UpdateParamsShippingAddressz+CustomerService.UpdateParamsShippingAddress  rY   r(   r9  c                   6    e Zd ZU ed   ed<   	 eed      ed<   y)r"  r   r   )autor   r   r   Nr   rM   r(   r'   UpdateParamsTaxzCustomerService.UpdateParamsTax  s0     122	 '56
 	
	r(   r<  customerparamsr  optionsreturnc                 |    t        t        | j                  ddj                  t	        |            d||            S )
        Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
        delete/v1/customers/{customer}r=  apibase_addressr>  r?  r   r   _requestformatr   r$   r=  r>  r?  s       r'   rC  zCustomerService.delete  sN     MM*11(2 2  #  
 	
r(   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rB  rC  rD  rE  rF  rG  Nr   r   _request_asyncrK  r   rL  s       r'   delete_asynczCustomerService.delete_async  s^      %%*11(2 2  # &  
 	
   =A
A
 	A
r  c                 |    t        t        | j                  ddj                  t	        |            d||            S ).
        Retrieves a Customer object.
        getrD  rE  rF  rG  rI  rL  s       r'   retrievezCustomerService.retrieve  sN     MM*11(2 2  #  
 	
r(   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rS  rT  rD  rE  rF  rG  NrN  rL  s       r'   retrieve_asynczCustomerService.retrieve_async  s^      %%*11(2 2  # &  
 	
rQ  r  c                 |    t        t        | j                  ddj                  t	        |            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.
        postrD  rE  rF  rG  rI  rL  s       r'   updatezCustomerService.update
  sN     MM*11(2 2  #  
 	
r(   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rY  rZ  rD  rE  rF  rG  NrN  rL  s       r'   update_asynczCustomerService.update_async"  s^      %%*11(2 2  # &  
 	
rQ  r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )G
        Removes the currently applied discount on a customer.
        rC  !/v1/customers/{customer}/discountrE  rF  rG  )r   r   rJ  rK  r   rL  s       r'   delete_discountzCustomerService.delete_discount:  sN     MM3::(2 ;  #  
 	
r(   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r_  rC  r`  rE  rF  rG  N)r   r   rO  rK  r   rL  s       r'   delete_discount_asyncz%CustomerService.delete_discount_asyncP  s^      %%3::(2 ;  # &  
 	
rQ  r  c           
      X    t        t        t           | j                  ddd||            S )
        Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
        rT  /v1/customersrF  rG  )r   r   r   rJ  r$   r>  r?  s      r'   listzCustomerService.listf  s9     x MM"  	
 		
r(   c           
      t   K   t        t        t           | j                  ddd||       d{         S 7 w)re  rT  rf  rF  rG  N)r   r   r   rO  rg  s      r'   
list_asynczCustomerService.list_asyncy  sI      x %%" &  	
 		
   +86
	8r*   c           
      J    t        t        | j                  ddd||            S )0
        Creates a new customer object.
        rZ  rf  rF  rG  )r   r   rJ  rg  s      r'   createzCustomerService.create  s4     MM"  	
 		
r(   c           
      f   K   t        t        | j                  ddd||       d{         S 7 w)rm  rZ  rf  rF  rG  N)r   r   rO  rg  s      r'   create_asynczCustomerService.create_async  sD      %%" &  	
 		
s   $1/
	1r  c           
      X    t        t        t           | j                  ddd||            S )  
        Search for customers you've previously created using Stripe's [Search Query Language](https://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.
        rT  /v1/customers/searchrF  rG  )r   r   r   rJ  rg  s      r'   searchzCustomerService.search  s9     x(MM&"  	
 		
r(   c           
      t   K   t        t        t           | j                  ddd||       d{         S 7 w)rr  rT  rs  rF  rG  N)r   r   r   rO  rg  s      r'   search_asynczCustomerService.search_async  sI      x(%%&" &  	
 		
rk  )5rF   rG   rH   r   r   rN   rX   r^   rg   ro   ru   r|   r   r   r   r   r  r  r  r  r  r  r#  r&  r)  r+  r-  r0  r3  r7  r9  r<  rK   r   r   rC  rP  rU  rW  r[  r]  r   ra  rc  r   rh  rj  rn  rp  r   rt  rv  __classcell__)r&   s   @r'   r   r      s   
 S$y S$ji 4) ) i , 
i 
y i 4) w wry y Y <I $ y $P$y P$di 4) ) i , 
i 
y i 4
) 
 24"$	

 /
  	

 

2 24"$	

 /
  	

 

2 46"$	

 1
  	

 

2 46"$	

 1
  	

 

2 24"$	

 /
  	

 

6 24"$	

 /
  	

 

6 :<"$	

 7
  	

 

2 :<"$	

 7
  	

 

0 02"$
,
  
 
H		
* 02"$
,
  
 
H		
* 24"$
.
  
 
	
* 24"$
.
  
 
	
, #%
.
  
 
H	%	
2 #%
.
  
 
H	%	
r(   r   N)%stripe._customerr   ,stripe._customer_balance_transaction_servicer   %stripe._customer_cash_balance_servicer   1stripe._customer_cash_balance_transaction_servicer   -stripe._customer_funding_instructions_servicer   'stripe._customer_payment_method_servicer   'stripe._customer_payment_source_servicer	   stripe._customer_tax_id_servicer
   stripe._discountr   stripe._list_objectr   stripe._request_optionsr   stripe._search_result_objectr   stripe._stripe_servicer   stripe._utilr   typingr   r   r   typing_extensionsr   r   r   r   rM   r(   r'   <module>r     s[    & M A % * 2 ; 0 $ # # = =}
m }
r(   