
    HUh?:                     ~    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
)    )RequestOptions)StripeService)sanitize_id)Calculation)CalculationLineItemService)DictListcast)LiteralNotRequired	TypedDictc            	       P    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i i fdedddedefdZi i fdedddedefdZi fdddedefdZi fdddedefdZ xZS )CalculationServicec                 X    t         |   |       t        | j                        | _        y )N)super__init__r   
_requestor
line_items)self	requestor	__class__s     _/var/www/html/Ryun_Seer/newvenv/lib/python3.12/site-packages/stripe/tax/_calculation_service.pyr   zCalculationService.__init__   s     #4T__E    c                       e Zd ZU eed<   	 ee   ed<   	 ed   ed<   	 eee      ed<   	 ed   ed<   	 ed   ed	<   	 ed
   ed<   	 ee   ed<   y)CalculationService.CreateParamscurrencycustomer.CalculationService.CreateParamsCustomerDetailscustomer_detailsexpand'CalculationService.CreateParamsLineItemr   .CalculationService.CreateParamsShipFromDetailsship_from_details+CalculationService.CreateParamsShippingCostshipping_costtax_dateN)__name__
__module____qualname__str__annotations__r   r	   int r   r   CreateParamsr      s    	 c""	 &<
 	
	 DI&&	 BCC	 '<
 	
	 #9
 	
	 c""	r   r.   c                   x    e Zd ZU ed   ed<   	 eed      ed<   	 ee   ed<   	 eed      ed<   	 eed      ed	<   y
)r   5CalculationService.CreateParamsCustomerDetailsAddressaddress)billingshippingaddress_source
ip_address3CalculationService.CreateParamsCustomerDetailsTaxIdtax_ids)customer_exemptnonereverse_chargetaxability_overrideN)r'   r(   r)   r   r+   r   r*   r	   r-   r   r   CreateParamsCustomerDetailsz.CalculationService.CreateParamsCustomerDetails;   s{    C
 	
	 $G,A$BCC	  $$	 FG
 	
	 )?@
 	
	r   r<   c                   r    e Zd ZU ed   ed<   	 eed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y)	r0   Literal['']|strcitycountryline1line2postal_codestateNr'   r(   r)   r   r+   r*   r-   r   r   "CreateParamsCustomerDetailsAddressz5CalculationService.CreateParamsCustomerDetailsAddressW   k    +,,	 	 ,--	 ,--	 !!233	 ,--	r   rF   c                   *    e Zd ZU ed   ed<   	 eed<   y)r6   )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typevalueN)r'   r(   r)   r   r+   r*   r-   r   r    CreateParamsCustomerDetailsTaxIdz3CalculationService.CreateParamsCustomerDetailsTaxIdq   s)    mo
 o	
`	 
	r   r   c                       e Zd ZU eed<   	 eeeef      ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   	 eed      ed<   	 ee   ed<   y	)
r!   amountmetadataproductquantity	reference	exclusive	inclusivetax_behaviortax_codeN)	r'   r(   r)   r,   r+   r   r   r*   r   r-   r   r   CreateParamsLineItemz'CalculationService.CreateParamsLineItem   s    	 d38n--	 S!!	 c""	 s##	 "'*B"CDD	 c""	r   r   c                       e Zd ZU ded<   y)r"   5CalculationService.CreateParamsShipFromDetailsAddressr1   N)r'   r(   r)   r+   r-   r   r   CreateParamsShipFromDetailsz.CalculationService.CreateParamsShipFromDetails	  s    HH	r   r   c                   r    e Zd ZU ed   ed<   	 eed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   	 ed   ed<   y)	r   r>   r?   r@   rA   rB   rC   rD   NrE   r-   r   r   "CreateParamsShipFromDetailsAddressz5CalculationService.CreateParamsShipFromDetailsAddress  rG   r   r   c                   Z    e Zd ZU ee   ed<   	 ee   ed<   	 eed      ed<   	 ee   ed<   y)r$   r   shipping_rater   r   r   N)r'   r(   r)   r   r,   r+   r*   r   r-   r   r   CreateParamsShippingCostz+CalculationService.CreateParamsShippingCost)  sN    C  	 #3''	 "'*B"CDD	 c""	r   r   c                   $    e Zd ZU eee      ed<   y)!CalculationService.RetrieveParamsr    N)r'   r(   r)   r   r	   r*   r+   r-   r   r   RetrieveParamsr   ;  s    DI&&	r   r   calculationparamsr   optionsreturnc                 |    t        t        | j                  ddj                  t	        |            d||            S )X
        Retrieves a Tax Calculation object, if the calculation hasn't expired.
        get"/v1/tax/calculations/{calculation}r   apibase_addressr   r   )r
   r   _requestformatr   r   r   r   r   s       r   retrievezCalculationService.retrieveA  sN     MM4;; +K 8 <  #  
 	
r   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r   r   r   r   r   r   N)r
   r   _request_asyncr   r   r   s       r   retrieve_asyncz!CalculationService.retrieve_asyncW  s^      %%4;; +K 8 <  # &  
 	
s   =A
A
 	A
r   c           
      J    t        t        | j                  ddd||            S )Y
        Calculates tax based on the input and returns a Tax Calculation object.
        post/v1/tax/calculationsr   r   )r
   r   r   r   r   r   s      r   createzCalculationService.createm  s4     MM&"  	
 		
r   c           
      f   K   t        t        | j                  ddd||       d{         S 7 w)r   r   r   r   r   N)r
   r   r   r   s      r   create_asynczCalculationService.create_async  sD      %%&" &  	
 		
s   $1/
	1)r'   r(   r)   r   r   r.   r<   rF   r   r   r   r   r   r   r*   r   r   r   r   r   r   __classcell__)r   s   @r   r   r      s+   F&y &Pi 8Y 4w9 wry >i Y 49 $  79"$	

 4
  	

 

2 79"$	

 4
  	

 

2 #%
1
  
 
	
, #%
1
  
 
	
r   r   N)stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   stripe.tax._calculationr   )stripe.tax._calculation_line_item_servicer   typingr   r	   r
   typing_extensionsr   r   r   r   r-   r   r   <module>r      s4    3 0 $ / $ # = =C
 C
r   