
    Chٹ                         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	  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Jr  S S	KJrJrJrJrJr  \(       a  S S
KJr  S SKJr  S SK J!r!  S SK"J#r#   " S S\S   \S   5      r$g)    )ExpandableField)
ListObject)ListableAPIResource)RequestOptions)StripeObject)UpdateableAPIResource)class_method_variantsanitize_id)ClassVarDictListOptionalcastoverload)LiteralNotRequired	TypedDictUnpackTYPE_CHECKING)BalanceTransaction)Charge)File)PaymentIntentc                      \ 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"\5      r " S# S$\5      r\\S%'    \S&   \S''    \S(   \S)'    \\S*'    \\S+'    \\S,      \S-'    \
\S.'   \\S/'   \\S0'    \ \S1'    \ \S2'    \!\\4   \S3'    \"\   \S4'    \S   \S5'    \"\S6      \S7'    \"\   \S8'   \\S9'    \S:   \S;'    \#S\S<\$S=   S>S 4S? j5       r%\&\'S\S<\$S=   S>S 4S@ j5       5       r(\&S<\$S=   S>S 4SA j5       r(\)" SB5      S<\$S=   S>S 4SC j5       r(\#S\S<\$S=   S>S 4SD j5       r*\&\'S\S<\$S=   S>S 4SE j5       5       r+\&S<\$S=   S>S 4SF j5       r+\)" SG5      S<\$S=   S>S 4SH j5       r+\#S<\$SI   S>\,S    4SJ j5       r-\#S<\$SI   S>\,S    4SK j5       r.\#S0\S<\$SL   S>S 4SM j5       r/\#S0\S<\$SL   S>S 4SN j5       r0\#S0\S<\$SO   S>S 4SP j5       r1\#S0\S<\$SO   S>S 4SQ j5       r2\
\\SR.r3SSr4gT)UDispute   a  
A dispute occurs when a customer questions your charge with their card issuer.
When this happens, you have the opportunity to respond to the dispute with
evidence that shows that the charge is legitimate.

Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
disputeOBJECT_NAMEc                   Z   \ rS rSr%  " S S\5      r\\   \S'    \\   \S'    \\	S      \S'    \\   \S'    \\   \S	'    \\	S      \S
'    \\   \S'    \\   \S'    \\   \S'    \\	S      \S'    \\	S      \S'    \\   \S'    \\   \S'    \\S'   \\   \S'    \\	S      \S'    \\	S      \S'    \\   \S'    \\   \S'    \\   \S'    \\	S      \S'    \\   \S'    \\   \S'    \\   \S'    \\	S      \S'    \\   \S'    \\	S      \S'    \\   \S '    S\0r
S!rg")#Dispute.Evidence'   c                   l    \ rS rSr%  " S S\5      r " S S\5      r\\   \S'   \\   \S'   \\S.r	S	r
g
)!Dispute.Evidence.EnhancedEvidence(   c                   p    \ rS rSr%  " S S\5      r " S S\5      r\\   \S'    \	\   \S'    \\S.r
S	rg
)9Dispute.Evidence.EnhancedEvidence.VisaCompellingEvidence3)   c                       \ rS rSr%  " S S\5      r\\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\	S	      \S
'    \\   \S'    \\   \S'    S\0r
Srg)MDispute.Evidence.EnhancedEvidence.VisaCompellingEvidence3.DisputedTransaction*   c                       \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg	)
]Dispute.Evidence.EnhancedEvidence.VisaCompellingEvidence3.DisputedTransaction.ShippingAddress+   citycountryline1line2postal_codestate N__name__
__module____qualname____firstlineno__r   str__annotations____static_attributes__r4       R/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/stripe/_dispute.pyShippingAddressr,   +   f    &sm+ "*#.  (},  (}, &.c]2  (},r=   r?   customer_account_idcustomer_device_fingerprintcustomer_device_idcustomer_email_addresscustomer_purchase_ipmerchandiseservicesmerchandise_or_servicesproduct_descriptionshipping_addressr4   N)r6   r7   r8   r9   r   r?   r   r:   r;   r   _inner_class_typesr<   r4   r=   r>   DisputedTransactionr)   *   s    , 4 *2#6 2:#> )15 -5SM9 +33-7 .6 9:.  *2#6 '/&?? +=o)N&r=   rM   c                       \ rS rSr%  " S S\5      r\\S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S	'    \\   \S
'    \\   \S'    S\0r	Sr
g)TDispute.Evidence.EnhancedEvidence.VisaCompellingEvidence3.PriorUndisputedTransactioni   c                       \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg	)
dDispute.Evidence.EnhancedEvidence.VisaCompellingEvidence3.PriorUndisputedTransaction.ShippingAddressj   r.   r/   r0   r1   r2   r3   r4   Nr5   r4   r=   r>   r?   rR   j   r@   r=   r?   chargerA   rB   rC   rD   rE   rJ   rK   r4   N)r6   r7   r8   r9   r   r?   r:   r;   r   rL   r<   r4   r=   r>   PriorUndisputedTransactionrO   i   s    , 4  K *2#6 2:#> )15 -5SM9 +33-7 *2#6 '/&?? +=o)N&r=   rU   disputed_transactionprior_undisputed_transactions)rV   rW   r4   N)r6   r7   r8   r9   r   rM   rU   r   r;   r   rL   r<   r4   r=   r>   VisaCompellingEvidence3r&   )   sW    =O, =O~;O ;Oz '//B&CC 044N/OO -@5O&"r=   rX   c                        \ rS rSr% \\S'   Srg)0Dispute.Evidence.EnhancedEvidence.VisaCompliance   fee_acknowledgedr4   N)r6   r7   r8   r9   boolr;   r<   r4   r=   r>   VisaCompliancerZ      s    "&&r=   r^   visa_compelling_evidence_3visa_compliancer_   r`   r4   Nr6   r7   r8   r9   r   rX   r^   r   r;   rL   r<   r4   r=   r>   EnhancedEvidencer#   (   sD    H, HT  )11H(II%n55.E#1"r=   rc   access_activity_logbilling_addressr   cancellation_policycancellation_policy_disclosurecancellation_rebuttalcustomer_communicationrD   customer_namerE   customer_signatureduplicate_charge_documentationduplicate_charge_explanationduplicate_charge_idenhanced_evidencerJ   receiptrefund_policyrefund_policy_disclosurerefund_refusal_explanationservice_dateservice_documentationrK   shipping_carriershipping_dateshipping_documentationshipping_tracking_numberuncategorized_fileuncategorized_textr4   N)r6   r7   r8   r9   r   rc   r   r:   r;   r   rL   r<   r4   r=   r>   Evidencer    '   s&   V	| V	p &c]*	 "#&	 &of&=>>	 )15	  (},	 !))@ AA	 !)-	  }$	 'sm+	 %_V%<==	 )11H(II	 '/sm3	 &c]*	 ,+%c]*	 /&122	   788	 #+3-/	 %-SM1	 sm#	  ((?@@	 #3-'	 #3-'	  }$	 !))@ AA	 #+3-/	 %_V%<==	 %SM)	 23CDr=   r|   c                   t    \ rS rSr%  " S S\5      r\\   \S'    \\S'   \	\S'    \	\S'    \\S'    S\0r
S	rg
)Dispute.EvidenceDetailsi/  c                   l    \ rS rSr%  " S S\5      r " S S\5      r\\   \S'   \\   \S'   \\S.r	S	r
g
)+Dispute.EvidenceDetails.EnhancedEligibilityi0  c                   >    \ rS rSr% \\S      \S'    \S   \S'   Srg)CDispute.EvidenceDetails.EnhancedEligibility.VisaCompellingEvidence3i1  )missing_customer_identifiers(missing_disputed_transaction_descriptionmissing_merchandise_or_services0missing_prior_undisputed_transaction_description%missing_prior_undisputed_transactionsrequired_actions)not_qualified	qualifiedrequires_actionstatusr4   N)r6   r7   r8   r9   r   r   r;   r<   r4   r=   r>   rX   r   1  s9    "&A#   C r=   rX   c                   &    \ rS rSr% \S   \S'   Srg):Dispute.EvidenceDetails.EnhancedEligibility.VisaComplianceiE  )r\   requires_fee_acknowledgementr   r4   N)r6   r7   r8   r9   r   r;   r<   r4   r=   r>   r^   r   E  s    F r=   r^   r_   r`   ra   r4   Nrb   r4   r=   r>   EnhancedEligibilityr   0  sA    , (  )11H(II%n55.E#1"r=   r   due_byenhanced_eligibilityhas_evidencepast_duesubmission_countr4   N)r6   r7   r8   r9   r   r   r   intr;   r]   rL   r<   r4   r=   r>   EvidenceDetailsr~   /  sZ    "	, "	H 	 21	 	 	 56IJr=   r   c                       \ rS rSr%  " S S\5      r " S S\5      r " S S\5      r " S S	\5      r\	\   \
S
'   \	\   \
S'   \	\   \
S'   \	\   \
S'   \S   \
S'    \\\\S.rSrg)Dispute.PaymentMethodDetailsig  c                   ,    \ rS rSr% \\S      \S'   Srg)&Dispute.PaymentMethodDetails.AmazonPayih  )
chargebackclaimdispute_typer4   N)r6   r7   r8   r9   r   r   r;   r<   r4   r=   r>   	AmazonPayr   h  s    "7+@#ABBr=   r   c                   D    \ rS rSr% \\S'    \S   \S'    \\   \S'   Srg)!Dispute.PaymentMethodDetails.Cardin  brand)blockr   
complianceinquiry
resolution	case_typenetwork_reason_coder4   N)	r6   r7   r8   r9   r:   r;   r   r   r<   r4   r=   r>   Cardr   n  s4    J L  "*#.r=   r   c                   &    \ rS rSr% \\   \S'   Srg)#Dispute.PaymentMethodDetails.Klarnai~  reason_coder4   Nr5   r4   r=   r>   Klarnar   ~  s    !#&r=   r   c                   8    \ rS rSr% \\   \S'    \\   \S'   Srg)#Dispute.PaymentMethodDetails.Paypali  case_idr   r4   Nr5   r4   r=   r>   Paypalr     s"    c]" "#&r=   r   
amazon_paycardklarnapaypal)r   r   r   r   typer4   N)r6   r7   r8   r9   r   r   r   r   r   r   r;   r   rL   r<   r4   r=   r>   PaymentMethodDetailsr   g  s    	 		< 	 	\ 		\ 	 Y''tn    >??	 $	
r=   r   c                   ,    \ rS rSr% \\\      \S'   Srg)Dispute.CloseParamsi  expandr4   N	r6   r7   r8   r9   r   r   r:   r;   r<   r4   r=   r>   CloseParamsr         DI&&	r=   r   c                       \ rS rSr% \\   \S'    \S   \S'    \\   \S'    \\\      \S'    \\   \S'    \\   \S'    \\   \S	'   S
r	g)Dispute.ListParamsi  rT   zDispute.ListParamsCreated|intcreatedending_beforer   limitpayment_intentstarting_afterr4   N)
r6   r7   r8   r9   r   r:   r;   r   r   r<   r4   r=   r>   
ListParamsr     s    C  	 <==	 #3''	 DI&&	 3	 $C((	 $C((	r=   r   c                   \    \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg)Dispute.ListParamsCreatedi  gtgteltlter4   N)r6   r7   r8   r9   r   r   r;   r<   r4   r=   r>   ListParamsCreatedr     sH    	 	 	 	r=   r   c                   b    \ rS rSr% \S   \S'    \\\      \S'    \S   \S'    \\   \S'   Sr	g	)
Dispute.ModifyParamsi  Dispute.ModifyParamsEvidenceevidencer   zLiteral['']|Dict[str, str]metadatasubmitr4   N)
r6   r7   r8   r9   r   r;   r   r:   r]   r<   r4   r=   r>   ModifyParamsr     sN    <==	 DI&&	 :;;	 D!!	r=   r   c                      \ rS rSr% \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S	'    \\   \S
'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \S   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'    \\   \S'   Srg )!r   i  rd   re   rf   rg   rh   ri   rD   rj   rE   rk   rl   rm   rn   z8Literal['']|Dispute.ModifyParamsEvidenceEnhancedEvidencero   rJ   rp   rq   rr   rs   rt   ru   rK   rv   rw   rx   ry   rz   r{   r4   N)r6   r7   r8   r9   r   r:   r;   r<   r4   r=   r>   ModifyParamsEvidenceDispute.ModifyParamsEvidence  s   (--	 %S))	 )--	 )4C(88	  +3//	 !,C 00	 !,C 00	 #3''	 *#..	 (,,	 )4C(88	 '2#&66	 )--	 'F
 	
	 )--	 S!!	 #3''	 #.c"22	 %0$44	 "#&&	  +3//	 &c**	 &c**	 #3''	 !,C 00	 #.c"22	 (,,	 (,,	r=   r   c                   8    \ rS rSr% \S   \S'    \S   \S'   Srg),Dispute.ModifyParamsEvidenceEnhancedEvidenceiY  CDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3r_   :Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompliancer`   r4   Nr6   r7   r8   r9   r   r;   r<   r4   r=   r>   $ModifyParamsEvidenceEnhancedEvidencer   Y  s.    $/Q%
 	
	 %H
 	
	r=   r   c                   >    \ rS rSr% \S   \S'    \\S      \S'   Srg)r   ig  VDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionrV   ]Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionrW   r4   N)r6   r7   r8   r9   r   r;   r   r<   r4   r=   r>   ;ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3CDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3g  s8     *d
 	
	 (3o(
 	

	r=   r   c                       \ rS rSr% \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'    \\S      \S	'    \S   \S
'    \S   \S'   Srg)r   iy  Literal['']|strrA   rB   rC   rD   rE   rF   rI   rJ   eDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddressrK   r4   N)r6   r7   r8   r9   r   r;   r   r<   r4   r=   r>   NModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionVDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactiony  s     )):;;	 &11B%CC	 ((9::	 !,,= >>	 **;<<	 "--."
 	
	 )):;;	 &s
 	
	r=   r   c                       \ rS rSr% \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'   S	rg
)r   i  r   r.   r/   r0   r1   r2   r3   r4   Nr   r4   r=   r>   ]ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddresseDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress  t     +,,	 .//	 ,--	 ,--	 !!233	 ,--	r=   r   c                       \ rS rSr% \\S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S	'    \S
   \S'   Srg)r   i  rT   r   rA   rB   rC   rD   rE   rJ   lDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddressrK   r4   N)r6   r7   r8   r9   r:   r;   r   r<   r4   r=   r>   UModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction]Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction  s     	 )):;;	 &11B%CC	 ((9::	 !,,= >>	 **;<<	 )):;;	 &z
 	
	r=   r   c                       \ rS rSr% \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'    \S   \S'   S	rg
)r   i  r   r.   r/   r0   r1   r2   r3   r4   Nr   r4   r=   r>   dModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddresslDispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress  r   r=   r   c                   &    \ rS rSr% \\   \S'   Srg)r   i  r\   r4   N)r6   r7   r8   r9   r   r]   r;   r<   r4   r=   r>   2ModifyParamsEvidenceEnhancedEvidenceVisaCompliance:Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompliance  s    %d++	r=   r   c                   ,    \ rS rSr% \\\      \S'   Srg)Dispute.RetrieveParamsi  r   r4   Nr   r4   r=   r>   RetrieveParamsr     r   r=   r   amountr   balance_transactionsr   rT   r   currencyra   enhanced_eligibility_typesr   evidence_detailsidis_charge_refundablelivemoder   r   objectr   r   payment_method_detailsreason)lostneeds_responseunder_reviewwarning_closedwarning_needs_responsewarning_under_reviewwonr   paramsr   returnc                 d    [        SU R                  SSR                  [        U5      S9US95      $ )  
Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
r   post/v1/disputes/{dispute}/closer   r
  )r   _static_requestformatr
   clsr   r
  s      r>   
_cls_closeDispute._cls_closeU  sJ     .55'0 6     	
 		
r=   c                     gr  Nr4   r   r
  s     r>   closeDispute.closei  s     	r=   c                     gr  r4   selfr
  s     r>   r  r  u  s     	r=   r  c                     [        SU R                  SSR                  [        U R	                  S5      5      S9US95      $ )r  r   r  r  r   r  r  )r   _requestr  r
   getr  s     r>   r  r  ~  sP     MM.55'7 6    	
 		
r=   c                    #    [        SU R                  SSR                  [        U5      S9US9I Sh  vN 5      $  N7f)r  r   r  r  r  r  N)r   _static_request_asyncr  r
   r  s      r>   _cls_close_asyncDispute._cls_close_async  sW      ++.55'0 6   ,  	
 		
s   1><
	>c                    #    g7fr  r4   r  s     r>   close_asyncDispute.close_async  s
      	   c                    #    g7fr  r4   r  s     r>   r(  r)    s
      	r*  r%  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)r  r   r  r  r   r  r  N)r   _request_asyncr  r
   r"  r  s     r>   r(  r)    s_      %%.55'7 6   &  	
 		
s   A AA
	Ar   c                     U R                  SU R                  5       US9n[        U[        5      (       d!  [	        S[        U5      R                  -  5      eU$ )"
Returns a list of your disputes.
r"  r  %Expected list object from API, got %s)r  	class_url
isinstancer   	TypeErrorr   r6   r  r
  results      r>   listDispute.list  s`     $$MMO % 

 &*--7<((* 
 r=   c                    #    U R                  SU R                  5       US9I Sh  vN n[        U[        5      (       d!  [	        S[        U5      R                  -  5      eU$  N<7f)r/  r"  r  Nr0  )r$  r1  r2  r   r3  r   r6   r4  s      r>   
list_asyncDispute.list_async  sm      00MMO 1 
 

 &*--7<((* 
 
s   #A$A"=A$r   c           	      x    U R                  5       < S[        U5      < 3n[        SU R                  SUUS95      $ );  
When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.

Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://docs.stripe.com/docs/disputes/categories).
/r   r  r  )r1  r
   r   r  r  r   r
  urls       r>   modifyDispute.modify  sD     +b/:   
 	
r=   c           	         #    U R                  5       < S[        U5      < 3n[        SU R                  SUUS9I Sh  vN 5      $  N7f)r<  r=  r   r  r  N)r1  r
   r   r$  r>  s       r>   modify_asyncDispute.modify_async  sQ      +b/:++ ,  
 	
s   ;AA
	Ar   c                 8    U " U40 UD6nUR                  5         U$ )*
Retrieves the dispute with the given ID.
)refreshr  r   r
  instances       r>   retrieveDispute.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)rF  N)refresh_asyncrH  s       r>   retrieve_asyncDispute.retrieve_async*  s2      r$V$$$&&& 	's   (&()r   r   r  r4   N)5r6   r7   r8   r9   __doc__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   classmethodr   r  r   staticmethodr  r	   r%  r(  r   r6  r9  r@  rC  rJ  rN  rL   r<   r4   r=   r>   r   r      s    1:K'),-9FE< FEP6K, 6Kp4
| 4
ln ^ <I $~ $ry rhy $&&P8$$L8Y   K 344 H%% L M !%?@!  %%G  N 38n "#& I __=>> %%9::K 	  

%+,A%B
	
 
&  &'< =	   f%:; 	   ,'
45
	
 (
& 

%+,A%B
	
 
&  &'< =	   45	  ,-
45
	
 .
& 23	I	 & 23	I	 & 

 &'= >
	
 
$ 

 &'= >
	
 
$  &'? @	   &'? @	  +"6r=   r   N)%stripe._expandable_fieldr   stripe._list_objectr   stripe._listable_api_resourcer   stripe._request_optionsr   stripe._stripe_objectr   stripe._updateable_api_resourcer   stripe._utilr	   r
   typingr   r   r   r   r   r   typing_extensionsr   r   r   r   r   stripe._balance_transactionr   stripe._charger   stripe._filer   stripe._payment_intentr   r   r4   r=   r>   <module>r`     sY    5 * = 2 . A : A A  >%!4_	"$9)$D_r=   