
    (g`                         S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	J
r
  S SKJrJrJrJrJr  S SKJrJrJrJrJr  \(       a  S SKJr   " S	 S
\S
   5      rg)    )CreateableAPIResource)
ListObject)RequestOptions)StripeObject)class_method_variantsanitize_id)ClassVarListOptionalcastoverload)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)CalculationLineItemc            	       j   \ rS rSr% SrSr\\S      \S'    " S S\	5      r
 " S S\	5      r " S	 S
\	5      r " S S\	5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r\\S!'    \\S"'    \\   \S#'    \
\S$'   \\   \S%'    \\   \S&'    \\S'      \S('    \\S)'    \S   \S*'    \\   \S+'    \\   \S,'    \\S-'    \\S.'    \\   \S/'    \\S0'    \ S1\!S2   S3S 4S4 j5       r"\ S1\!S2   S3S 4S5 j5       r#\ S6\S1\!S7   S3\S'   4S8 j5       r$\%\&S6\S1\!S7   S3\S'   4S9 j5       5       r'\%S1\!S7   S3\S'   4S: j5       r'\(" S;5      S1\!S7   S3\S'   4S< j5       r'\ S6\S1\!S7   S3\S'   4S= j5       r)\%\&S6\S1\!S7   S3\S'   4S> j5       5       r*\%S1\!S7   S3\S'   4S? j5       r*\(" S@5      S1\!S7   S3\S'   4SA j5       r*\ S&\S1\!SB   S3S 4SC j5       r+\ S&\S1\!SB   S3S 4SD j5       r,\
\\\SE.r-SFr.gG)HCalculation   z
A Tax Calculation allows you to calculate the tax to collect from your customer.

Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom)
ztax.calculationOBJECT_NAMEc                       \ rS rSr%  " S S\5      r " S S\5      r\\   \S'    \\	S      \S'    \\
   \S	'    \\   \S
'    \	S   \S'    \\S.rSrg)Calculation.CustomerDetails   c                   z    \ rS rSr% \\   \S'    \\S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg	)
#Calculation.CustomerDetails.Address   citycountryline1line2postal_codestate N__name__
__module____qualname____firstlineno__r   str__annotations____static_attributes__r$       \C:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\stripe/tax/_calculation.pyAddressr      a    3- L C=  C=  "#& C= r-   r/   c                   2    \ rS rSr% \S   \S'    \\S'   Srg)!Calculation.CustomerDetails.TaxId9   )ead_nrtae_trnal_tinam_tinao_tinar_cuitau_abnau_arnba_tinbb_tinbg_uicbh_vat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cn_tinco_nitcr_tinde_stndo_rcnec_ruceg_tines_cif
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kh_tinkr_brnkz_bin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unknownus_einuy_rucuz_tinuz_vatve_rifvn_tinza_vatzm_tinzw_tintypevaluer$   Nr&   r'   r(   r)   r   r+   r*   r,   r$   r-   r.   TaxIdr2   9   s)    df fN Jr-   r   addressbillingshippingaddress_source
ip_addresstax_idscustomer_exemptnonereverse_chargetaxability_override)r   r   r$   N)r&   r'   r(   r)   r   r/   r   r   r+   r   r*   r
   _inner_class_typesr,   r$   r-   r.   CustomerDetailsr      s    	l 	4n	L n	` '""	 !)>!?@@	 SM!	 e	 %7
 	
	 *1UCr-   r   c                   >    \ rS rSr%  " S S\5      r\\S'   S\0rSrg)Calculation.ShipFromDetails   c                   z    \ rS rSr% \\   \S'    \\S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg	)
#Calculation.ShipFromDetails.Address   r   r   r    r!   r"   r#   r$   Nr%   r$   r-   r.   r/   r      r0   r-   r/   r   r$   N)	r&   r'   r(   r)   r   r/   r+   r   r,   r$   r-   r.   ShipFromDetailsr      s!    	l 	4 '1r-   r   c                       \ rS rSr%  " S S\5      r\\S'    \\S'    \\	   \S'    \
S   \S'    \\\      \S	'    \	\S
'    S	\0rSrg)Calculation.ShippingCost   c                       \ rS rSr%  " S S\5      r " S S\5      r\\S'    \\S'   \	S   \S	'    \
\   \S
'    \	S   \S'    \\S'    \\S.rSrg)%Calculation.ShippingCost.TaxBreakdown   c                   P    \ rS rSr% \\S'    \\S'    \S   \S'    \\   \S'   Srg)	2Calculation.ShippingCost.TaxBreakdown.Jurisdiction   r   display_name)r   r   countydistrictr#   levelr#   r$   N)	r&   r'   r(   r)   r*   r+   r   r   r,   r$   r-   r.   Jurisdictionr      sA     "! D   }$r-   r   c                   >    \ rS rSr% \\S'    \\S'    \S   \S'   Srg)4Calculation.ShippingCost.TaxBreakdown.TaxRateDetails   r   percentage_decimalamusement_taxcommunications_taxgsthstigstjct	lease_taxpstqstretail_delivery_feerst	sales_taxservice_taxvattax_typer$   N)r&   r'   r(   r)   r*   r+   r   r,   r$   r-   r.   TaxRateDetailsr      s3    !! %(' "  r-   r   amountjurisdiction)destinationoriginsourcingtax_rate_detailsr   not_collectingnot_subject_to_taxnot_supportedportion_product_exemptportion_reduced_ratedportion_standard_ratedproduct_exemptproduct_exempt_holidayproportionally_ratedreduced_ratedr   standard_ratedtaxable_basis_reduced
zero_ratedtaxability_reasontaxable_amount)r   r   r$   N)r&   r'   r(   r)   r   r   r   intr+   r   r   r   r,   r$   r-   r.   TaxBreakdownr      s    | ( : K '&566 '~66  '  "   !-$2"r-   r   r   
amount_taxshipping_rate	exclusive	inclusivetax_behaviortax_breakdowntax_coder$   N)r&   r'   r(   r)   r   r   r   r+   r   r*   r   r
   r   r,   r$   r-   r.   ShippingCostr      s}    Z	< Z	x 	 	  }$	 677	  \ 233	 	 .|<r-   r   c                   t    \ rS rSr%  " S S\5      r\\S'    \\S'    \\S'   \	S   \S'    \\S	'    S\0r
S
rg)Calculation.TaxBreakdowniV  c                       \ rS rSr%  " S S\5      r\\   \S'    \\   \S'    \\S'    \\	S      \S'    \\   \S	'    \\	S
      \S'    S\0r
Srg)'Calculation.TaxBreakdown.TaxRateDetailsiW  c                   ,    \ rS rSr% \\S'    \\S'   Srg)2Calculation.TaxBreakdown.TaxRateDetails.FlatAmountiX  r   currencyr$   N)r&   r'   r(   r)   r   r+   r*   r,   r$   r-   r.   
FlatAmountr   X  s     r-   r   r   flat_amountr   )r   
percentage	rate_typer#   r   r   r$   N)r&   r'   r(   r)   r   r   r   r*   r+   r   r   r,   r$   r-   r.   r   r   W  s    \  c]" "*-- !$#  (C DEE C=   $ #0!<r-   r   r   r   r   r   r   r   r$   N)r&   r'   r(   r)   r   r   r   r+   boolr   r   r,   r$   r-   r.   r   r   V  s`    4	=\ 4	=l 	 	 )("
 	
"	 	 1.Ar-   r   c                       \ rS rSr% \\S'    \\   \S'    \S   \S'    \\\      \S'    \S   \S'    \S	   \S
'    \S   \S'    \\   \S'   Sr	g)Calculation.CreateParamsi  r   customer'Calculation.CreateParamsCustomerDetailscustomer_detailsexpand Calculation.CreateParamsLineItem
line_items'Calculation.CreateParamsShipFromDetailsship_from_details$Calculation.CreateParamsShippingCostshipping_costtax_dater$   N)
r&   r'   r(   r)   r*   r+   r   r
   r   r,   r$   r-   r.   CreateParamsr    s    	 c""	 &5
 	
	 DI&&	 ;<<	 '5
 	
	 ##IJJ	 c""	r-   r  c                       \ rS rSr% \S   \S'    \\S      \S'    \\   \S'    \\S      \S'    \\S	      \S
'   Sr	g)r  i  .Calculation.CreateParamsCustomerDetailsAddressr   r   r   r   ,Calculation.CreateParamsCustomerDetailsTaxIdr   r   r   r$   N)
r&   r'   r(   r)   r   r+   r   r*   r
   r,   r$   r-   r.   CreateParamsCustomerDetails'Calculation.CreateParamsCustomerDetails  sw    MNN	 $G,A$BCC	  $$	 ?@
 	
	 )?@
 	
	r-   r  c                   z    \ rS rSr% \S   \S'    \\S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'   S	rg
)r  i  Literal['']|strr   r   r    r!   r"   r#   r$   Nr&   r'   r(   r)   r   r+   r*   r,   r$   r-   r.   "CreateParamsCustomerDetailsAddress.Calculation.CreateParamsCustomerDetailsAddress  k    +,,	 	 ,--	 ,--	 !!233	 ,--	r-   r  c                   2    \ rS rSr% \S   \S'    \\S'   Srg)r  i
  )dr4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   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   r   r   r$   Nr   r$   r-   r.    CreateParamsCustomerDetailsTaxId,Calculation.CreateParamsCustomerDetailsTaxId
  s)    ce
 e	
L	 
	r-   r  c                       \ rS rSr% \\S'    \\   \S'    \\   \S'    \\   \S'    \\S      \S'    \\   \S'   S	r	g
)r  iy  r   productquantity	referencer   r   r   r$   N)
r&   r'   r(   r)   r   r+   r   r*   r   r,   r$   r-   r.   CreateParamsLineItem Calculation.CreateParamsLineItemy  sl    	 S!!	 c""	 s##	 "'*B"CDD	 c""	r-   r"  c                        \ rS rSr% S\S'   Srg)r
  i  .Calculation.CreateParamsShipFromDetailsAddressr   r$   N)r&   r'   r(   r)   r+   r,   r$   r-   r.   CreateParamsShipFromDetails'Calculation.CreateParamsShipFromDetails  s    AA	r-   r&  c                   z    \ rS rSr% \S   \S'    \\S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'   S	rg
)r%  i  r  r   r   r    r!   r"   r#   r$   Nr  r$   r-   r.   "CreateParamsShipFromDetailsAddress.Calculation.CreateParamsShipFromDetailsAddress  r  r-   r)  c                   b    \ rS rSr% \\   \S'    \\   \S'    \\S      \S'    \\   \S'   Sr	g)	r  i  r   r   r   r   r   r$   N)
r&   r'   r(   r)   r   r   r+   r*   r   r,   r$   r-   r.   CreateParamsShippingCost$Calculation.CreateParamsShippingCost  sN    C  	 #3''	 "'*B"CDD	 c""	r-   r,  c                   b    \ rS rSr% \\   \S'    \\\      \S'    \\   \S'    \\   \S'   Sr	g)Calculation.ListLineItemsParamsi  ending_beforer  limitstarting_afterr$   N)
r&   r'   r(   r)   r   r*   r+   r
   r   r,   r$   r-   r.   ListLineItemsParamsr/    sL    "3''	 DI&&	 3	 $C((	r-   r3  c                   ,    \ rS rSr% \\\      \S'   Srg)Calculation.RetrieveParamsi  r  r$   N)	r&   r'   r(   r)   r   r
   r*   r+   r,   r$   r-   r.   RetrieveParamsr5    s    DI&&	r-   r6  amount_totalr   r  r  
expires_atidr   r	  livemodeobjectr  r  tax_amount_exclusivetax_amount_inclusiver   r  paramsr  returnc           	      T    [        SU R                  SU R                  5       US95      $ )I
Calculates tax based on the input and returns a Tax Calculation object.
r   postr>  )r   _static_request	class_urlclsr>  s     r.   createCalculation.create  s6        
 	
r-   c           	      p   #    [        SU R                  SU R                  5       US9I Sh  vN 5      $  N7f)rA  r   rB  rC  N)r   _static_request_asyncrE  rF  s     r.   create_asyncCalculation.create_async(  sC      ++ ,  
 	
s   )64
	6calculationr/  c                 r    [        [        S   U R                  SSR                  [	        U5      S9US95      $ )c
Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
r   get-/v1/tax/calculations/{calculation}/line_itemsrN  rC  )r   r   rD  formatr   rG  rN  r>  s      r.   _cls_list_line_items Calculation._cls_list_line_items8  sQ     ,-?FF +K 8 G     	
 		
r-   c                     grP  Nr$   rN  r>  s     r.   list_line_itemsCalculation.list_line_itemsL  s     	r-   c                     grY  r$   selfr>  s     r.   r[  r\  V  s     	r-   rV  c                     [        [        S   U R                  SSR                  [	        U R                  S5      5      S9US95      $ )rP  r   rQ  rR  r9  rS  rC  )r   r   _requestrT  r   rQ  r^  s     r.   r[  r\  _  sW     ,-MM?FF +DHHTN ; G    	
 		
r-   c                    #    [        [        S   U R                  SSR                  [	        U5      S9US9I Sh  vN 5      $  N7f)rP  r   rQ  rR  rS  rC  N)r   r   rK  rT  r   rU  s      r.   _cls_list_line_items_async&Calculation._cls_list_line_items_asyncq  s^      ,-++?FF +K 8 G   ,  	
 		
s   8AA
	Ac                    #    g7frY  r$   rZ  s     r.   list_line_items_async!Calculation.list_line_items_async  s
      	   c                    #    g7frY  r$   r^  s     r.   rf  rg    s
      	rh  rc  c                    #    [        [        S   U R                  SSR                  [	        U R                  S5      5      S9US9I Sh  vN 5      $  N7f)rP  r   rQ  rR  r9  rS  rC  N)r   r   _request_asyncrT  r   rQ  r^  s     r.   rf  rg    sf      ,-%%?FF +DHHTN ; G   &  	
 		
s   AA	A

	Ar5  c                 8    U " U40 UD6nUR                  5         U$ )H
Retrieves a Tax Calculation object, if the calculation hasn't expired.
)refreshrG  r9  r>  instances       r.   retrieveCalculation.retrieve  s$     r$V$r-   c                 T   #    U " U40 UD6nUR                  5       I Sh  vN   U$  N7f)rm  N)refresh_asyncro  s       r.   retrieve_asyncCalculation.retrieve_async  s2      r$V$$$&&& 	's   (&()r  r  r  r   r$   N)/r&   r'   r(   r)   __doc__r   r	   r   r+   r   r   r   r   r   r   r  r   r  r  r  r"  r&  r)  r,  r3  r6  r   r*   r   r   r  r
   classmethodr   rH  rL  rV  r   staticmethodr[  r   rc  rf  rq  ru  r   r,   r$   r-   r.   r   r      sO    9JK'"345IaD, aDF2, 2<u=| u=nXB| XBt$~ $Li 4Y 4m9 m^y 6i Y 49 $n $   M sm &% 	 $9:;; N %&&  00 L))   %% M 
89
	
 
 
89
	
 
 

 :;
 
)	*	
 
& $*+L$M	)	*   @A	)	*  01
@A
	)	*
 2
" 

 :;
 
)	*	
 
& $*+L$M	)	*   @A	)	*  67
@A
	)	*
 8
"  &'C D	   &'C D	  ,,%%	r-   r   N)stripe._createable_api_resourcer   stripe._list_objectr   stripe._request_optionsr   stripe._stripe_objectr   stripe._utilr   r   typingr	   r
   r   r   r   typing_extensionsr   r   r   r   r   !stripe.tax._calculation_line_itemr   r   r$   r-   r.   <module>r     sC    B * 2 . : ; ;  Ep'6 pr-   