Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d1f09d

Browse files
authored
Tighten the return type in braintree.PaymentMethod.find() (#14916)
1 parentc72a3e9 commit0d1f09d

File tree

2 files changed

+60
-3
lines changed

2 files changed

+60
-3
lines changed

‎stubs/braintree/braintree/payment_method.pyi‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,43 @@
11
from_typeshedimportIncomplete
22

3+
frombraintree.amex_express_checkout_cardimportAmexExpressCheckoutCard
4+
frombraintree.android_pay_cardimportAndroidPayCard
5+
frombraintree.apple_pay_cardimportApplePayCard
6+
frombraintree.credit_cardimportCreditCard
37
frombraintree.error_resultimportErrorResult
8+
frombraintree.europe_bank_accountimportEuropeBankAccount
9+
frombraintree.masterpass_cardimportMasterpassCard
10+
frombraintree.paypal_accountimportPayPalAccount
411
frombraintree.resourceimportResource
12+
frombraintree.samsung_pay_cardimportSamsungPayCard
13+
frombraintree.sepa_direct_debit_accountimportSepaDirectDebitAccount
514
frombraintree.successful_resultimportSuccessfulResult
15+
frombraintree.unknown_payment_methodimportUnknownPaymentMethod
16+
frombraintree.us_bank_accountimportUsBankAccount
17+
frombraintree.venmo_accountimportVenmoAccount
18+
frombraintree.visa_checkout_cardimportVisaCheckoutCard
619

720
classPaymentMethod(Resource):
821
@staticmethod
922
defcreate(params:dict[str,Incomplete]|None=None)->SuccessfulResult|ErrorResult: ...
1023
@staticmethod
11-
deffind(payment_method_token:str)->Resource: ...
24+
deffind(
25+
payment_method_token:str,
26+
)-> (
27+
AndroidPayCard
28+
|ApplePayCard
29+
|EuropeBankAccount
30+
|CreditCard
31+
|PayPalAccount
32+
|UsBankAccount
33+
|VenmoAccount
34+
|VisaCheckoutCard
35+
|AmexExpressCheckoutCard
36+
|SepaDirectDebitAccount
37+
|MasterpassCard
38+
|SamsungPayCard
39+
|UnknownPaymentMethod
40+
): ...
1241
@staticmethod
1342
defupdate(payment_method_token:str,params)->SuccessfulResult|ErrorResult: ...
1443
@staticmethod

‎stubs/braintree/braintree/payment_method_gateway.pyi‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
from_typeshedimportIncomplete
22

3+
frombraintree.amex_express_checkout_cardimportAmexExpressCheckoutCard
4+
frombraintree.android_pay_cardimportAndroidPayCard
5+
frombraintree.apple_pay_cardimportApplePayCard
6+
frombraintree.credit_cardimportCreditCard
37
frombraintree.error_resultimportErrorResult
4-
frombraintree.resourceimportResource
8+
frombraintree.europe_bank_accountimportEuropeBankAccount
9+
frombraintree.masterpass_cardimportMasterpassCard
10+
frombraintree.paypal_accountimportPayPalAccount
11+
frombraintree.samsung_pay_cardimportSamsungPayCard
12+
frombraintree.sepa_direct_debit_accountimportSepaDirectDebitAccount
513
frombraintree.successful_resultimportSuccessfulResult
14+
frombraintree.unknown_payment_methodimportUnknownPaymentMethod
15+
frombraintree.us_bank_accountimportUsBankAccount
16+
frombraintree.venmo_accountimportVenmoAccount
17+
frombraintree.visa_checkout_cardimportVisaCheckoutCard
618

719
classPaymentMethodGateway:
820
gateway:Incomplete
921
config:Incomplete
1022
def__init__(self,gateway)->None: ...
1123
defcreate(self,params:dict[str,Incomplete]|None=None)->SuccessfulResult|ErrorResult: ...
12-
deffind(self,payment_method_token:str)->Resource: ...
24+
deffind(
25+
self,payment_method_token:str
26+
)-> (
27+
AndroidPayCard
28+
|ApplePayCard
29+
|EuropeBankAccount
30+
|CreditCard
31+
|PayPalAccount
32+
|UsBankAccount
33+
|VenmoAccount
34+
|VisaCheckoutCard
35+
|AmexExpressCheckoutCard
36+
|SepaDirectDebitAccount
37+
|MasterpassCard
38+
|SamsungPayCard
39+
|UnknownPaymentMethod
40+
): ...
1341
defupdate(self,payment_method_token:str,params)->SuccessfulResult|ErrorResult: ...
1442
defdelete(self,payment_method_token:str,options=None)->SuccessfulResult: ...
1543
options:dict[str,Incomplete]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp