o
    L)j%                    @   s  d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZmZ d d	lmZmZmZmZmZ d d
l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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/m0Z0 d dl1m2Z2 d dl3m4Z4 d dl5m6Z7 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 G dd  d ed  e	d  ed  ZFd!S )"    )Decimal)CreateableAPIResource)ExpandableField)
ListObject)ListableAPIResource)StripeObjectUntypedStripeObject)UpdateableAPIResource)class_method_variantsanitize_id)ClassVarListOptionalcastoverload)LiteralUnpackTYPE_CHECKING)Account)Coupon)Customer)Discount)Invoice)LineItem)PaymentIntent)PaymentLink)PromotionCode)SetupIntent)ShippingRate)Subscription)TaxId)TaxRate)SessionCreateParams)SessionExpireParams)SessionListLineItemsParams)SessionListParams)SessionModifyParams)SessionRetrieveParamsc                   @   s6	  e Zd ZU dZdZeed  ed< G dd deZ	G dd deZ
G dd	 d	eZG d
d deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG d d! d!eZG d"d# d#eZG d$d% d%eZG d&d' d'eZG d(d) d)eZG d*d+ d+eZG d,d- d-eZG d.d/ d/eZG d0d1 d1eZG d2d3 d3eZ G d4d5 d5eZ!G d6d7 d7eZ"G d8d9 d9eZ#G d:d; d;eZ$e%e	 ed<< 	 e%e
 ed=< 	 e%e& ed>< 	 e%e' ed?< 	 e%e' ed@< 	 eedA< e%edB  edC< 	 e%e edD< e%e( edE< 	 e%e( edF< 	 e%e( edG< 	 e%e edH< 	 e%e edI< 	 e%e edJ< 	 e'edK< 	 e%e( edL< 	 e%e edM< 	 e)e edN< 	 eedO< e%e*dP  edQ< 	 e%e( edR< 	 e%edS  edT< 	 e%e edU< 	 e%e( edV< 	 e%e)e  edW< 	 e%e)e(  edX< 	 e'edY< 	 e(edZ< 	 e%e( ed[< 	 e%e*d\  ed]< 	 e%e ed^< 	 e%e+d_  ed`< 	 e&eda< 	 e%edb  edc< 	 e%e edd< 	 e%e,e(  ede< 	 edf edg< 	 e%e edh< ed edi< 	 e%e)e  edj< 	 e%edk  edl< 	 e%e*dm  edn< 	 e%e*do  edp< 	 e%edS  edq< 	 e%e edr< 	 e%e eds< 	 e)e( edt< 	 edu edv< 	 e%e edw< 	 e%e edx< e%e edy< e%e( edz< 	 e%ed{  ed|< 	 e%e( ed}< 	 e%e ed~< 	 e%e*d  ed< 	 e%e ed< 	 e%e  ed< 	 e)e! ed< 	 e%ed  ed< 	 e%ed  ed< 	 e%e*d  ed< 	 e%e( ed< 	 e%e" ed< e%e# ed< 	 e%ed  ed< 	 e%e( ed< 	 e%e$ ed< 	 e-de.d dd fddZ/e-de.d dd fddZ0e-de(de.d dd fddZ1e2e3de(de.d dd fddZ4e2de.d dd fddZ4e5dde.d dd fddZ4e-de(de.d dd fddZ6e2e3de(de.d dd fddZ7e2de.d dd fddZ7e5dde.d dd fddZ7e-de.d de+d  fddZ8e-de.d de+d  fddZ9e-de(de.d de+d_ fddZ:e2e3de(de.d de+d_ fddZ;e2de.d de+d_ fddZ;e5dde.d de+d_ fddZ;e-de(de.d de+d_ fddZ<e2e3de(de.d de+d_ fddZ=e2de.d de+d_ fddZ=e5dde.d de+d_ fddZ=e-dZe(de.d dd fddZ>e-dZe(de.d dd fddZ?e-dZe(de.d dd fddÄZ@e-dZe(de.d dd fddńZAi d<e	d=e
dAedDedHedIedJedMedNedOedUedWed^eddedhedjedreeeeeeee e!e"e#e$dƜZBdS )Sessiona>  
    A Checkout Session represents your customer's session as they pay for
    one-time purchases or subscriptions through [Checkout](https://docs.stripe.com/payments/checkout)
    or [Payment Links](https://docs.stripe.com/payments/payment-links). We recommend creating a
    new Session each time your customer attempts to pay.

    Once payment is successful, the Checkout Session will contain a reference
    to the [Customer](https://docs.stripe.com/api/customers), and either the successful
    [PaymentIntent](https://docs.stripe.com/api/payment_intents) or an active
    [Subscription](https://docs.stripe.com/api/subscriptions).

    You can create a Checkout Session on your server and redirect to its URL
    to begin Checkout.

    Related guide: [Checkout quickstart](https://docs.stripe.com/checkout/quickstart)
    zcheckout.sessionOBJECT_NAMEc                   @      e Zd ZU eed< dS )zSession.AdaptivePricingenabledN__name__
__module____qualname__bool__annotations__ r2   r2   }/var/www/html/finance-dev.cargoinsureonline.com/_shared/backend-venv/lib/python3.10/site-packages/stripe/checkout/_session.pyAdaptivePricingG      
 r4   c                   @   s4   e Zd ZU G dd deZee ed< 	 deiZdS )zSession.AfterExpirationc                   @   s<   e Zd ZU eed< 	 eed< 	 ee ed< 	 ee ed< dS )z Session.AfterExpiration.Recoveryallow_promotion_codesr+   
expires_aturlN)r-   r.   r/   r0   r1   r   intstrr2   r2   r2   r3   RecoveryN   s   
 r;   recoveryN)r-   r.   r/   r   r;   r   r1   _inner_class_typesr2   r2   r2   r3   AfterExpirationM   s
   
 r>   c                   @   s^   e Zd ZU G dd deZeed< 	 ee ed< 	 ee ed< 	 ee	d  ed< 	 deiZ
dS )	zSession.AutomaticTaxc                   @   ,   e Zd ZU eed  ed< 	 ed ed< dS )zSession.AutomaticTax.Liabilityr   accountr@   selftypeNr-   r.   r/   r   r   r1   r   r2   r2   r2   r3   	Liabilityi   
   
 rE   r+   	liabilityprovider)completefailedrequires_location_inputsstatusN)r-   r.   r/   r   rE   r0   r1   r   r:   r   r=   r2   r2   r2   r3   AutomaticTaxh   s   
 
rM   c                   @   s   e Zd ZU G dd deZG dd deZeed< 	 ed ed< 	 eed< 	 eed	< 	 eed
< 	 e	e ed< 	 e	e ed< 	 eedZ
dS )zSession.BrandingSettingsc                   @   6   e Zd ZU ee ed< 	 ed ed< 	 ee ed< dS )zSession.BrandingSettings.IconfilerO   r8   rC   r8   Nr-   r.   r/   r   r:   r1   r   r2   r2   r2   r3   Icon      
 rR   c                   @   rN   )zSession.BrandingSettings.LogorO   rP   rC   r8   NrQ   r2   r2   r2   r3   Logo   rS   rT   background_color)pillrectangularroundedborder_stylebutton_colordisplay_namefont_familyiconlogo)r]   r^   N)r-   r.   r/   r   rR   rT   r:   r1   r   r   r=   r2   r2   r2   r3   BrandingSettings   s$   
 r_   c                   @   sP   e Zd ZU G dd deZee ed< 	 ee ed< 	 ee ed< 	 deiZdS )zSession.CollectedInformationc                   @   s8   e Zd ZU G dd deZeed< eed< 	 deiZdS )z,Session.CollectedInformation.ShippingDetailsc                   @   `   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< dS )z4Session.CollectedInformation.ShippingDetails.Addresscitycountryline1line2postal_codestateNr-   r.   r/   r   r:   r1   r2   r2   r2   r3   Address      
 rh   addressnameN)r-   r.   r/   r   rh   r1   r:   r=   r2   r2   r2   r3   ShippingDetails   s   
 rl   business_nameindividual_nameshipping_detailsN)	r-   r.   r/   r   rl   r   r:   r1   r=   r2   r2   r2   r3   CollectedInformation   s   
 "rp   c                   @   0   e Zd ZU eed  ed< 	 eed  ed< dS )zSession.Consent)opt_inopt_out
promotionsacceptedterms_of_serviceNr-   r.   r/   r   r   r1   r2   r2   r2   r3   Consent   s
   
 rx   c                   @   sX   e Zd ZU G dd deZee ed< 	 eed  ed< 	 eed  ed< 	 deiZdS )	zSession.ConsentCollectionc                   @      e Zd ZU ed ed< dS )z5Session.ConsentCollection.PaymentMethodReuseAgreement)autohiddenpositionNr-   r.   r/   r   r1   r2   r2   r2   r3   PaymentMethodReuseAgreement      
 r~   payment_method_reuse_agreement)rz   nonert   )r   requiredrv   N)	r-   r.   r/   r   r~   r   r1   r   r=   r2   r2   r2   r3   ConsentCollection   s   
 r   c                   @   s>   e Zd ZU eed< 	 eed< 	 eed< 	 eed< 	 ddiZdS )zSession.CurrencyConversionamount_subtotalamount_totalfx_ratesource_currencydecimal_stringN)r-   r.   r/   r9   r1   r   r:   _field_encodingsr2   r2   r2   r3   CurrencyConversion  s   
 r   c                   @   s   e Zd ZU G dd deZG dd deZG dd deZG dd deZee e	d	< e
e	d
< 	 ee	d< ee e	d< ee	d< 	 ee e	d< ed e	d< 	 eeeedZdS )zSession.CustomFieldc                   @   sP   e Zd ZU G dd deZee ed< 	 ee ed< 	 ee ed< 	 deiZ	dS )zSession.CustomField.Dropdownc                   @       e Zd ZU eed< 	 eed< dS )z#Session.CustomField.Dropdown.OptionlabelvalueNr-   r.   r/   r:   r1   r2   r2   r2   r3   Option.  
   
 r   default_valueoptionsr   N)
r-   r.   r/   r   r   r   r:   r1   r   r=   r2   r2   r2   r3   Dropdown-  s   
 
r   c                   @   s(   e Zd ZU ee ed< 	 ed ed< dS )zSession.CustomField.LabelcustomrC   NrQ   r2   r2   r2   r3   LabelF  
   
 r   c                   @   D   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )zSession.CustomField.Numericr   maximum_lengthminimum_lengthr   Nr-   r.   r/   r   r:   r1   r9   r2   r2   r2   r3   NumericP     
 r   c                   @   r   )zSession.CustomField.Textr   r   r   r   Nr   r2   r2   r2   r3   Textb  r   r   dropdownkeyr   numericoptionaltext)r   r   r   rC   )r   r   r   r   N)r-   r.   r/   r   r   r   r   r   r   r1   r:   r0   r   r=   r2   r2   r2   r3   CustomField,  s(   
 

r   c                   @   s   e Zd ZU G dd deZG dd deZG dd deZG dd deZee e	d	< 	 ee e	d
< 	 ee e	d< 	 ee e	d< 	 eeeedZ
dS )zSession.CustomTextc                   @   r*   )zSession.CustomText.AfterSubmitmessageNr   r2   r2   r2   r3   AfterSubmit  r5   r   c                   @   r*   )z"Session.CustomText.ShippingAddressr   Nr   r2   r2   r2   r3   ShippingAddress  r5   r   c                   @   r*   )zSession.CustomText.Submitr   Nr   r2   r2   r2   r3   Submit  r5   r   c                   @   r*   )z+Session.CustomText.TermsOfServiceAcceptancer   Nr   r2   r2   r2   r3   TermsOfServiceAcceptance  r5   r   after_submitshipping_addresssubmitterms_of_service_acceptance)r   r   r   r   N)r-   r.   r/   r   r   r   r   r   r   r1   r=   r2   r2   r2   r3   
CustomText  s$   
 
r   c                   @   s   e Zd ZU G dd deZG dd deZee ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 ee ed	< 	 ee ed
< 	 ee	d  ed< 	 ee
e  ed< 	 eedZdS )zSession.CustomerDetailsc                   @   r`   )zSession.CustomerDetails.Addressra   rb   rc   rd   re   rf   Nrg   r2   r2   r2   r3   rh     ri   rh   c                   @   s(   e Zd ZU ed ed< 	 ee ed< dS )zSession.CustomerDetails.TaxId)u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fo_vatgb_vatge_vatgi_tingn_nifhk_brhr_oibhu_tinid_npwpil_vatin_gstis_vatit_cfjp_cnjp_rnjp_trnke_pinkg_tinkh_tinkr_brnkz_binla_tinli_uidli_vatlk_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pl_nippy_ruc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_tinrC   r   N)r-   r.   r/   r   r1   r   r:   r2   r2   r2   r3   r      s   
 wr    rj   rm   emailrn   rk   phone)exemptr   reverse
tax_exempttax_ids)rj   r(  N)r-   r.   r/   r   rh   r    r   r1   r:   r   r   r=   r2   r2   r2   r3   CustomerDetails  s*   
  r)  c                   @   rq   )zSession.Discountr   couponr   promotion_codeN)r-   r.   r/   r   r   r1   r2   r2   r2   r3   r   y  
   
 r   c                   @   s8   e Zd ZU G dd deZeed< 	 eed< deiZdS )zSession.InvoiceCreationc                   @   s   e Zd ZU G dd deZG dd deZG dd deZeee	d   e
d< 	 eee  e
d	< 	 ee e
d
< 	 ee e
d< 	 ee e
d< 	 eee  e
d< 	 ee e
d< 	 eeedZdS )z#Session.InvoiceCreation.InvoiceDatac                   @   r   )z/Session.InvoiceCreation.InvoiceData.CustomFieldrk   r   Nr   r2   r2   r2   r3   r     r   r   c                   @   r?   )z*Session.InvoiceCreation.InvoiceData.Issuerr   r@   rA   rC   NrD   r2   r2   r2   r3   Issuer  rF   r-  c                   @   s(   e Zd ZU ee ed< 	 ee ed< dS )z4Session.InvoiceCreation.InvoiceData.RenderingOptionsamount_tax_displaytemplateNrg   r2   r2   r2   r3   RenderingOptions  r   r0  TaxIdResourceaccount_tax_idscustom_fieldsdescriptionfooterissuermetadatarendering_options)r3  r6  r8  N)r-   r.   r/   r   r   r-  r0  r   r   r   r1   r:   r   r=   r2   r2   r2   r3   InvoiceData  s,   
 



r9  r+   invoice_dataN)r-   r.   r/   r   r9  r0   r1   r=   r2   r2   r2   r3   InvoiceCreation  s   
 Ar;  c                   @   r*   )zSession.ManagedPaymentsr+   Nr,   r2   r2   r2   r3   ManagedPayments  r5   r<  c                   @   sP   e Zd ZU G dd deZG dd deZee ed< ee ed< eedZdS )	zSession.NameCollectionc                   @   r   )zSession.NameCollection.Businessr+   r   Nr,   r2   r2   r2   r3   Business  r   r=  c                   @   r   )z!Session.NameCollection.Individualr+   r   Nr,   r2   r2   r2   r3   
Individual  r   r>  business
individual)r?  r@  N)	r-   r.   r/   r   r=  r>  r   r1   r=   r2   r2   r2   r3   NameCollection  s   
 

rA  c                   @   sB   e Zd ZU G dd deZee ed< eed< eed< deiZ	dS )zSession.OptionalItemc                   @   s2   e Zd ZU eed< 	 ee ed< 	 ee ed< dS )z'Session.OptionalItem.AdjustableQuantityr+   maximumminimumN)r-   r.   r/   r0   r1   r   r9   r2   r2   r2   r3   AdjustableQuantity  s   
 rD  adjustable_quantitypricequantityN)
r-   r.   r/   r   rD  r   r1   r:   r9   r=   r2   r2   r2   r3   OptionalItem  s   
 rH  c                   @   s$   e Zd ZU eed< 	 ee ed< dS )z)Session.PaymentMethodConfigurationDetailsidparentN)r-   r.   r/   r:   r1   r   r2   r2   r2   r3   !PaymentMethodConfigurationDetails  
   
 rK  c                   @   s  e Zd ZU G dd deZG dd deZG dd deZG dd deZG d	d
 d
eZG dd deZ	G dd deZ
G dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZG d%d& d&eZG d'd( d(eZG d)d* d*eZG d+d, d,eZG d-d. d.eZG d/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZG d7d8 d8eZG d9d: d:eZ G d;d< d<eZ!G d=d> d>eZ"G d?d@ d@eZ#G dAdB dBeZ$G dCdD dDeZ%G dEdF dFeZ&G dGdH dHeZ'G dIdJ dJeZ(G dKdL dLeZ)G dMdN dNeZ*G dOdP dPeZ+G dQdR dReZ,G dSdT dTeZ-G dUdV dVeZ.G dWdX dXeZ/e0e e1dY< e0e e1dZ< e0e e1d[< e0e e1d\< e0e e1d]< e0e	 e1d^< e0e
 e1d_< e0e e1d`< e0e e1da< e0e e1db< e0e e1dc< e0e e1dd< e0e e1de< e0e e1df< e0e e1dg< e0e e1dh< e0e e1di< e0e e1dj< e0e e1dk< e0e e1dl< e0e e1dm< e0e e1dn< e0e e1do< e0e e1dp< e0e e1dq< e0e e1dr< e0e e1ds< e0e e1dt< e0e  e1du< e0e! e1dv< e0e" e1dw< e0e# e1dx< e0e$ e1dy< e0e% e1dz< e0e& e1d{< e0e' e1d|< e0e( e1d}< e0e) e1d~< e0e* e1d< e0e+ e1d< e0e, e1d< e0e- e1d< e0e. e1d< e0e/ e1d< i dYedZed[ed\ed]ed^e	d_e
d`edaedbedceddedeedfedgedhediei djedkedledmednedoedpedqedredsedtedue dve!dwe"dxe#dye$dze%e&e'e(e)e*e+e,e-e.e/d
Z2dS )zSession.PaymentMethodOptionsc                   @   sv   e Zd ZU G dd deZeed  ed< 	 ee ed< eed  ed< 	 ee ed< 	 eed	  ed
< 	 deiZ	dS )z&Session.PaymentMethodOptions.AcssDebitc                   @   sb   e Zd ZU ee ed< 	 eeed   ed< 	 ee ed< 	 eed  ed< 	 eed  ed< d	S )
z5Session.PaymentMethodOptions.AcssDebit.MandateOptionscustom_mandate_url)invoicesubscriptiondefault_forinterval_description)combinedintervalsporadicpayment_schedule)r?  personaltransaction_typeN)r-   r.   r/   r   r:   r1   r   r   r2   r2   r2   r3   MandateOptions  s   
 rX  )cadusdcurrencymandate_optionsr   off_session
on_sessionsetup_future_usagetarget_date)	automaticinstantmicrodepositsverification_methodN)
r-   r.   r/   r   rX  r   r   r1   r:   r=   r2   r2   r2   r3   	AcssDebit
  s    
 	rf  c                   @   rq   )z#Session.PaymentMethodOptions.Affirmmanualcapture_methodr   r`  Nrw   r2   r2   r2   r3   Affirm@  r,  ri  c                   @   rq   )z-Session.PaymentMethodOptions.AfterpayClearpayrg  rh  r   r`  Nrw   r2   r2   r2   r3   AfterpayClearpayP  r,  rj  c                   @      e Zd ZU eed  ed< dS )z#Session.PaymentMethodOptions.Alipayr   r`  Nrw   r2   r2   r2   r3   Alipay`     
 rl  c                   @   rk  )z!Session.PaymentMethodOptions.Almarg  rh  Nrw   r2   r2   r2   r3   Almal  rm  rn  c                   @   rq   )z&Session.PaymentMethodOptions.AmazonPayrg  rh  r   r^  r`  Nrw   r2   r2   r2   r3   	AmazonPayr  r,  rp  c                   @   s,   e Zd ZU eed  ed< 	 ee ed< dS )z(Session.PaymentMethodOptions.AuBecsDebitr   r`  ra  Nr-   r.   r/   r   r   r1   r:   r2   r2   r2   r3   AuBecsDebit  s
   
 	rr  c                   @   R   e Zd ZU G dd deZee ed< eed  ed< 	 ee ed< 	 deiZ	dS )z&Session.PaymentMethodOptions.BacsDebitc                   @      e Zd ZU ee ed< dS )z5Session.PaymentMethodOptions.BacsDebit.MandateOptionsreference_prefixNrg   r2   r2   r2   r3   rX    r   rX  r\  r]  r`  ra  N
r-   r.   r/   r   rX  r   r1   r   r:   r=   r2   r2   r2   r3   	BacsDebit     
 	rw  c                   @   rk  )z'Session.PaymentMethodOptions.Bancontactr   r`  Nrw   r2   r2   r2   r3   
Bancontact  rm  ry  c                   @   rk  )z#Session.PaymentMethodOptions.Billierg  rh  Nrw   r2   r2   r2   r3   Billie  rm  rz  c                   @   (   e Zd ZU eed< 	 eed  ed< dS )z#Session.PaymentMethodOptions.Boletoexpires_after_daysr]  r`  Nr-   r.   r/   r9   r1   r   r   r2   r2   r2   r3   Boleto  s   
 r~  c                   @   s   e Zd ZU G dd deZG dd deZeed  ed< 	 ee ed< eed  ed	< 	 eed  ed
< 	 eed  ed< 	 eed  ed< 	 ed ed< 	 ee ed< eed  ed< 	 ee	 ed< 	 ee	 ed< 	 eedZ
dS )z!Session.PaymentMethodOptions.Cardc                   @   rt  )z.Session.PaymentMethodOptions.Card.Installmentsr+   N)r-   r.   r/   r   r0   r1   r2   r2   r2   r3   Installments  r   r  c                   @   "   e Zd ZU eeed   ed< dS )z.Session.PaymentMethodOptions.Card.Restrictions)american_expressdiscover_global_network
mastercardvisabrands_blockedNr-   r.   r/   r   r   r   r1   r2   r2   r2   r3   Restrictions  s   
 
r  rg  rh  installments)if_availableneverrequest_extended_authorization!request_incremental_authorizationrequest_multicapturerequest_overcapture)anyrb  	challengerequest_three_d_securerestrictionsr]  r`   statement_descriptor_suffix_kana!statement_descriptor_suffix_kanji)r  r  N)r-   r.   r/   r   r  r  r   r   r1   r:   r=   r2   r2   r2   r3   Card  s@   
 	
r  c                   @   rq   )z$Session.PaymentMethodOptions.Cashapprg  rh  r   r`  Nrw   r2   r2   r2   r3   Cashapp  r,  r  c                   @   sV   e Zd ZU G dd deZee ed< eed  ed< 	 eed  ed< 	 deiZdS )z,Session.PaymentMethodOptions.CustomerBalancec                   @   sZ   e Zd ZU G dd deZee ed< eeed   ed< 	 eed  ed< 	 deiZ	dS )	z9Session.PaymentMethodOptions.CustomerBalance.BankTransferc                   @   ry   )zHSession.PaymentMethodOptions.CustomerBalance.BankTransfer.EuBankTransfer)BEDEESFRIENLrb   Nr}   r2   r2   r2   r3   EuBankTransfer/  r   r  eu_bank_transfer)abaibansepa	sort_codespeiswiftzenginrequested_address_types)r  gb_bank_transferjp_bank_transfermx_bank_transferus_bank_transferrC   N)
r-   r.   r/   r   r  r   r1   r   r   r=   r2   r2   r2   r3   BankTransfer.  s$   
 	r  bank_transferfunding_typer   r`  N)	r-   r.   r/   r   r  r   r1   r   r=   r2   r2   r2   r3   CustomerBalance-  s   
 (	r  c                   @   rk  )z Session.PaymentMethodOptions.Epsr   r`  Nrw   r2   r2   r2   r3   Epsg  rm  r  c                   @   rk  )z Session.PaymentMethodOptions.Fpxr   r`  Nrw   r2   r2   r2   r3   Fpxs  rm  r  c                   @   rk  )z$Session.PaymentMethodOptions.Giropayr   r`  Nrw   r2   r2   r2   r3   Giropay  rm  r  c                   @   rk  )z$Session.PaymentMethodOptions.Grabpayr   r`  Nrw   r2   r2   r2   r3   Grabpay  rm  r  c                   @   rk  )z"Session.PaymentMethodOptions.Idealr   r`  Nrw   r2   r2   r2   r3   Ideal  rm  r  c                   @   rq   )z%Session.PaymentMethodOptions.KakaoPayrg  rh  ro  r`  Nrw   r2   r2   r2   r3   KakaoPay  r,  r  c                   @   rq   )z#Session.PaymentMethodOptions.Klarnarg  rh  r]  r`  Nrw   r2   r2   r2   r3   Klarna  s   
 r  c                   @   s,   e Zd ZU ee ed< 	 eed  ed< dS )z$Session.PaymentMethodOptions.Konbinir|  r   r`  N)r-   r.   r/   r   r9   r1   r   r2   r2   r2   r3   Konbini  s
   
 r  c                   @   rq   )z#Session.PaymentMethodOptions.KrCardrg  rh  ro  r`  Nrw   r2   r2   r2   r3   KrCard  r,  r  c                   @   rq   )z!Session.PaymentMethodOptions.Linkrg  rh  ro  r`  Nrw   r2   r2   r2   r3   Link  r,  r  c                   @   rq   )z&Session.PaymentMethodOptions.Mobilepayrg  rh  r   r`  Nrw   r2   r2   r2   r3   	Mobilepay  r,  r  c                   @   rk  )z'Session.PaymentMethodOptions.Multibancor   r`  Nrw   r2   r2   r2   r3   
Multibanco  rm  r  c                   @   rq   )z%Session.PaymentMethodOptions.NaverPayrg  rh  ro  r`  Nrw   r2   r2   r2   r3   NaverPay  r,  r  c                   @   r{  )z!Session.PaymentMethodOptions.Oxxor|  r   r`  Nr}  r2   r2   r2   r3   Oxxo!  s
   
 r  c                   @   rk  )z Session.PaymentMethodOptions.P24r   r`  Nrw   r2   r2   r2   r3   P241  rm  r  c                   @   rk  )z"Session.PaymentMethodOptions.Paycorg  rh  Nrw   r2   r2   r2   r3   Payco=  rm  r  c                   @   rk  )z#Session.PaymentMethodOptions.Paynowr   r`  Nrw   r2   r2   r2   r3   PaynowC  rm  r  c                   @   sL   e Zd ZU eed  ed< 	 ee ed< 	 ee ed< 	 eed  ed< dS )z#Session.PaymentMethodOptions.Paypalrg  rh  preferred_locale	referencero  r`  Nrq  r2   r2   r2   r3   PaypalO  s   
 r  c                   @   D   e Zd ZU G dd deZee ed< eed  ed< 	 deiZdS )z"Session.PaymentMethodOptions.Paytoc                   @   sz   e Zd ZU ee ed< 	 eed  ed< 	 ee ed< 	 eed  ed< 	 ee ed< 	 eed  ed	< 	 ee ed
< dS )z1Session.PaymentMethodOptions.Payto.MandateOptionsamountfixedrB  amount_typeend_date)adhocannualdailyfortnightlymonthly	quarterlysemi_annualweeklyrU  payments_per_period)dependant_support
governmentloanmortgageotherpensionrV  retailsalarytaxutilitypurpose
start_dateNr-   r.   r/   r   r9   r1   r   r:   r2   r2   r2   r3   rX  h  s.   
 rX  r\  ro  r`  N	r-   r.   r/   r   rX  r   r1   r   r=   r2   r2   r2   r3   Paytog  s   
 7	r  c                   @   sd   e Zd ZU G dd deZeed  ed< 	 ee ed< 	 ee ed< eed  ed< 	 deiZ	d	S )
z Session.PaymentMethodOptions.Pixc                   @   s   e Zd ZU ee ed< 	 eed  ed< 	 eed  ed< 	 ee ed< 	 ee ed< 	 eed  ed	< 	 ee ed
< 	 ee ed< dS )z/Session.PaymentMethodOptions.Pix.MandateOptionsr  alwaysr  amount_includes_iofr  r  r[  r  )
halfyearlyr  r  r  yearlyrU  r  r  Nr  r2   r2   r2   r3   rX    s*   
 	rX  r  r  expires_after_secondsr\  ro  r`  N)
r-   r.   r/   r   rX  r   r   r1   r9   r=   r2   r2   r2   r3   Pix  s   
 *	r  c                   @   rq   )z'Session.PaymentMethodOptions.RevolutPayrg  rh  ro  r`  Nrw   r2   r2   r2   r3   
RevolutPay  r,  r  c                   @   rk  )z'Session.PaymentMethodOptions.SamsungPayrg  rh  Nrw   r2   r2   r2   r3   
SamsungPay  rm  r  c                   @   rk  )z%Session.PaymentMethodOptions.Satispayrg  rh  Nrw   r2   r2   r2   r3   Satispay  rm  r  c                   @   rk  )z%Session.PaymentMethodOptions.Scalapayrg  rh  Nrw   r2   r2   r2   r3   Scalapay  rm  r  c                   @   rs  )z&Session.PaymentMethodOptions.SepaDebitc                   @   rt  )z5Session.PaymentMethodOptions.SepaDebit.MandateOptionsru  Nrg   r2   r2   r2   r3   rX    r   rX  r\  r]  r`  ra  Nrv  r2   r2   r2   r3   	SepaDebit  rx  r  c                   @   rk  )z#Session.PaymentMethodOptions.Sofortr   r`  Nrw   r2   r2   r2   r3   Sofort(  rm  r  c                   @   rt  )z"Session.PaymentMethodOptions.Swishr  Nrg   r2   r2   r2   r3   Swish4  r   r  c                   @   rk  )z"Session.PaymentMethodOptions.Twintro  r`  Nrw   r2   r2   r2   r3   Twint:  rm  r  c                   @   r  )z Session.PaymentMethodOptions.Upic                   @   sH   e Zd ZU ee ed< 	 eed  ed< 	 ee ed< 	 ee ed< dS )z/Session.PaymentMethodOptions.Upi.MandateOptionsr  r  r  r4  r  Nr  r2   r2   r2   r3   rX  G  s   
 rX  r\  r]  r`  Nr  r2   r2   r2   r3   UpiF  s   
 	r  c                   @   sd   e Zd ZU G dd deZee ed< eed  ed< 	 ee ed< 	 eed  ed< 	 deiZ	d	S )
z*Session.PaymentMethodOptions.UsBankAccountc                   @   sl   e Zd ZU G dd deZee ed< eeed   ed< 	 eeed   ed< 	 ee	 ed< 	 deiZ
d	S )
z?Session.PaymentMethodOptions.UsBankAccount.FinancialConnectionsc                   @   r  )zGSession.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters)checkingsavingsaccount_subcategoriesNr  r2   r2   r2   r3   Filtersj  s
   
 
r  filters)balances	ownershippayment_methodtransactionspermissions)r  r  r  prefetch
return_urlN)r-   r.   r/   r   r  r   r1   r   r   r:   r=   r2   r2   r2   r3   FinancialConnectionsi  s$   
 

r  financial_connectionsr]  r`  ra  )rb  rc  re  N)
r-   r.   r/   r   r  r   r1   r   r:   r=   r2   r2   r2   r3   UsBankAccounth  s   
 #	r  
acss_debitaffirmafterpay_clearpayalipayalma
amazon_payau_becs_debit
bacs_debit
bancontactbillieboletocardcashappcustomer_balanceepsfpxgiropaygrabpayideal	kakao_payklarnakonbinikr_cardlink	mobilepay
multibanco	naver_payoxxop24paycopaynowpaypalpaytopixrevolut_paysamsung_paysatispayscalapay
sepa_debitsofortswishtwintupius_bank_account)
r"  r#  r$  r%  r&  r'  r(  r)  r*  r+  N)3r-   r.   r/   r   rf  ri  rj  rl  rn  rp  rr  rw  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  r  r  r   r1   r=   r2   r2   r2   r3   PaymentMethodOptions	  sR  
 6M:E@"=	
 !"#r,  c                   @   rk  )zSession.Permissions)client_onlyserver_onlyupdate_shipping_detailsNrw   r2   r2   r2   r3   Permissions   s
   
 r0  c                   @   r*   )zSession.PhoneNumberCollectionr+   Nr,   r2   r2   r2   r3   PhoneNumberCollection  r5   r1  c                   @   s    e Zd ZU eed< 	 eed< dS )zSession.PresentmentDetailspresentment_amountpresentment_currencyN)r-   r.   r/   r9   r1   r:   r2   r2   r2   r3   PresentmentDetails  r   r4  c                   @   sF   e Zd ZU eeed   ed< 	 eed  ed< 	 eed  ed< dS )z!Session.SavedPaymentMethodOptions)r  limitedunspecifiedallow_redisplay_filters)disabledr+   payment_method_removepayment_method_saveNr  r2   r2   r2   r3   SavedPaymentMethodOptions  s   
 
r;  c                   @   rk  )z!Session.ShippingAddressCollection)ACADAEAFAGAIALAMAOAQARATAUAWAXAZBABBBDr  BFBGBHBIBJBLBMBNBOBQBRBSBTBVBWBYBZCACDCFCGCHCICKCLCMCNCOCRCVCWCYCZr  DJDKDMDODZECEEEGEHERr  ETFIFJFKFOr  GAGBGDGEGFGGGHGIGLGMGNGPGQGRGSGTGUGWGYHKHNHRHTHUIDr  ILIMINIOIQISITJEJMJOJPKEKGKHKIKMKNKRKWKYKZLALBLCLILKLRLSLTLULVLYMAMCMDMEMFMGMKMLMMMNMOMQMRMSMTMUMVMWMXMYMZNANCNENGNIr  NONPNRNUNZOMPAPEPFPGPHPKPLPMPNPRPSPTPYQARERORSRURWSASBSCSDSESGSHSISJSKSLSMSNSOSRSSSTSVSXSZTATCTDTFTGTHTJTKTLTMTNTOTRTTTVTWTZUAUGUSUYUZVAVCVEVGVNVUWFWSXKYEYTZAZMZWZZallowed_countriesN)r-   r.   r/   r   r   r1   r2   r2   r2   r3   ShippingAddressCollection,  s   
  sr%  c                   @   sh   e Zd ZU G dd deZeed< 	 eed< 	 eed< 	 eed  ed< 	 ee	e  ed< 	 deiZ
d	S )
zSession.ShippingCostc                   @   @   e Zd ZU eed< 	 ded< 	 eed  ed< 	 ee ed< dS )zSession.ShippingCost.Taxr  r!   ratecustomer_exempt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_ratedreverse_chargestandard_ratedtaxable_basis_reduced
zero_ratedtaxability_reasontaxable_amountNr}  r2   r2   r2   r3   Tax%     
 r:  r   
amount_taxr   r   shipping_ratetaxesN)r-   r.   r/   r   r:  r9   r1   r   r   r   r=   r2   r2   r2   r3   ShippingCost$  s   
 &r?  c                   @   $   e Zd ZU eed< 	 ed ed< dS )zSession.ShippingOptionshipping_amountr   r=  N)r-   r.   r/   r9   r1   r   r2   r2   r2   r3   ShippingOptiona  rL  rB  c                   @   r@  )zSession.TaxIdCollectionr+   )if_supportedr  r   N)r-   r.   r/   r0   r1   r   r2   r2   r2   r3   TaxIdCollectionk  rL  rD  c                   @   sT   e Zd ZU G dd deZeed< 	 ee ed< 	 eed< 	 ee ed< deiZdS )zSession.TotalDetailsc                   @   sT   e Zd ZU G dd deZG dd deZee ed< 	 ee ed< 	 eedZdS )	zSession.TotalDetails.Breakdownc                   @   s    e Zd ZU eed< 	 ded< dS )z'Session.TotalDetails.Breakdown.Discountr  DiscountResourcediscountN)r-   r.   r/   r9   r1   r2   r2   r2   r3   r   w  r   r   c                   @   r&  )z"Session.TotalDetails.Breakdown.Taxr  r!   r'  r(  r8  r9  Nr}  r2   r2   r2   r3   r:    r;  r:  	discountsr>  )rG  r>  N)	r-   r.   r/   r   r   r:  r   r1   r=   r2   r2   r2   r3   	Breakdownv  s   
 &rH  amount_discountamount_shippingr<  	breakdownN)	r-   r.   r/   r   rH  r9   r1   r   r=   r2   r2   r2   r3   TotalDetailsu  s   
 >rL  c                   @   s2   e Zd ZU G dd deZee ed< deiZdS )zSession.WalletOptionsc                   @   rk  )zSession.WalletOptions.Link)rz   r  displayNrw   r2   r2   r2   r3   r    rm  r  r  N)r-   r.   r/   r   r  r   r1   r=   r2   r2   r2   r3   WalletOptions  s   
 rN  adaptive_pricingafter_expirationr6   r   r   automatic_tax)rz   r   billing_address_collectionbranding_settings
cancel_urlclient_reference_idclient_secretcollected_informationconsentconsent_collectioncreatedr[  currency_conversionr3  custom_textr   customercustomer_account)r  if_requiredcustomer_creationcustomer_detailscustomer_emailrG  excluded_payment_method_typesr7   rI  integration_identifierr   rN  invoice_creationr   
line_itemslivemode))rz   bgcsdadeelenzen-GBeszes-419etfifilfrzfr-CAhrhurI  itjakoltlvmsmtnbnlplptzpt-BRroruskslsvthtrvizhzzh-HKzzh-TWlocalemanaged_paymentsr7  )paymentsetuprO  modename_collectionobjectoptional_items)
mobile_appweborigin_contextr   payment_intentr   payment_linkpayment_method_collection$payment_method_configuration_detailspayment_method_optionspayment_method_types)no_payment_requiredpaidunpaidpayment_statusr  phone_number_collectionpresentment_detailsrecovered_from)r  r_  r  redirect_on_completionr  saved_payment_method_optionsr   setup_intentshipping_address_collectionshipping_costshipping_options)rI   expiredopenrL   )rz   bookdonatepay	subscribesubmit_typer   rO  success_urltax_id_collectiontotal_details)elementsembedded_pageformhosted_pageui_moder8   wallet_optionsparamsr"   returnc                 K   s   t d| jd|  |dS )4
        Creates a Checkout Session object.
        r(   postr  )r   _static_request	class_urlclsr  r2   r2   r3   create
  s   zSession.createc                    s"   t d| jd|  |dI dH S )r  r(   r  r  N)r   _static_request_asyncr  r  r2   r2   r3   create_async
  s   
zSession.create_asyncsessionr#   c                 K   s"   t d| jddjt|d|dS )  
        A Checkout Session can be expired when it is in one of these statuses: open

        After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
        r(   r  &/v1/checkout/sessions/{session}/expirer  r  )r   r  formatr   r  r  r  r2   r2   r3   _cls_expire,
  s   	zSession._cls_expirec                 K      dS r  Nr2   r  r  r2   r2   r3   expire@
  s   
zSession.expirec                 K   r  r  r2   rB   r  r2   r2   r3   r  L
     r  c              	   K   s*   t d| jddjt| jdd|dS )r  r(   r  r  rI  r  r  )r   _requestr  r   _datagetr  r2   r2   r3   r  U
  s   	c                    s*   t d| jddjt|d|dI dH S )r  r(   r  r  r  r  N)r   r  r  r   r  r2   r2   r3   _cls_expire_asynci
  s   	
zSession._cls_expire_asyncc                       dS r  r2   r  r2   r2   r3   expire_async}
  s   
zSession.expire_asyncc                    r  r  r2   r  r2   r2   r3   r  
  s   	r  c              	      s2   t d| jddjt| jdd|dI dH S )r  r(   r  r  rI  r  r  N)r   _request_asyncr  r   r  r  r  r2   r2   r3   r  
  s   	
r%   c                 K   s4   | j d|  |d}t|tstdt|j |S )6
        Returns a list of Checkout Sessions.
        r  r  %Expected list object from API, got %s)r  r  
isinstancer   	TypeErrorrC   r-   r  r  resultr2   r2   r3   list
  s   
zSession.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )r  r  r  Nr  )r  r  r  r   r  rC   r-   r  r2   r2   r3   
list_async
  s   
zSession.list_asyncr$   c                 K   s&   t td | jddjt|d|dS )
        When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        r   r  */v1/checkout/sessions/{session}/line_itemsr  r  )r   r   r  r  r   r  r2   r2   r3   _cls_list_line_items
  s   zSession._cls_list_line_itemsc                 K   r  r  Nr2   r  r2   r2   r3   list_line_items
  s   zSession.list_line_itemsc                 K   r  r  r2   r  r2   r2   r3   r  
  r  r  c              	   K   s.   t td | jddjt| jdd|dS )r  r   r  r  rI  r  r  )r   r   r  r  r   r  r  r  r2   r2   r3   r  
  s   c                    s.   t td | jddjt|d|dI dH S )r  r   r  r  r  r  N)r   r   r  r  r   r  r2   r2   r3   _cls_list_line_items_async  s   
z"Session._cls_list_line_items_asyncc                    r  r  r2   r  r2   r2   r3   list_line_items_async  s   zSession.list_line_items_asyncc                    r  r  r2   r  r2   r2   r3   r  #  s   r  c              	      s6   t td | jddjt| jdd|dI dH S )r  r   r  r  rI  r  r  N)r   r   r  r  r   r  r  r  r2   r2   r3   r  ,  s   
r&   c                 K   s*   d|   t|f }td| jd||dS )
        Updates a Checkout Session object.

        Related guide: [Dynamically update a Checkout Session](https://docs.stripe.com/payments/advanced/dynamic-updates)
        %s/%sr(   r  r  )r  r   r   r  r  rI  r  r8   r2   r2   r3   modify>  s   	zSession.modifyc                    s2   d|   t|f }td| jd||dI dH S )r  r  r(   r  r  N)r  r   r   r  r  r2   r2   r3   modify_asyncQ  s   	
zSession.modify_asyncr'   c                 K   s   | |fi |}|   |S )6
        Retrieves a Checkout Session object.
        )refreshr  rI  r  instancer2   r2   r3   retrieved  s   zSession.retrievec                    s$   | |fi |}|  I dH  |S )r  N)refresh_asyncr  r2   r2   r3   retrieve_asynco  s   zSession.retrieve_async)r  r  r  r  r  r  r  r  r  r  r  N)Cr-   r.   r/   __doc__r)   r   r   r1   r   r4   r>   rM   r_   rp   rx   r   r   r   r   r)  r   r;  r<  rA  rH  rK  r,  r0  r1  r4  r;  r%  r?  rB  rD  rL  rN  r   r0   r9   r:   r   r   r   r   classmethodr   r  r  r  r   staticmethodr  r
   r  r  r  r  r  r  r  r  r  r  r  r  r=   r2   r2   r2   r3   r(   /   s  
 ;1_0 ?
I
       ~
 y=

N
-




	
r(   N)Gdecimalr   stripe._createable_api_resourcer   stripe._expandable_fieldr   stripe._list_objectr   stripe._listable_api_resourcer   stripe._stripe_objectr   r   stripe._updateable_api_resourcer	   stripe._utilr
   r   typingr   r   r   r   r   typing_extensionsr   r   r   stripe._accountr   stripe._couponr   stripe._customerr   stripe._discountr   rE  stripe._invoicer   stripe._line_itemr   stripe._payment_intentr   stripe._payment_linkr   stripe._promotion_coder   stripe._setup_intentr   stripe._shipping_rater   stripe._subscriptionr   stripe._tax_idr    r1  stripe._tax_rater!   -stripe.params.checkout._session_create_paramsr"   -stripe.params.checkout._session_expire_paramsr#   6stripe.params.checkout._session_list_line_items_paramsr$   +stripe.params.checkout._session_list_paramsr%   -stripe.params.checkout._session_modify_paramsr&   /stripe.params.checkout._session_retrieve_paramsr'   r(   r2   r2   r2   r3   <module>   sH   
