Skip to content

Commit ccc47c0

Browse files
authored
stubtest-complete & Bump braintree to 4.28.* (#11678)
1 parent b0218af commit ccc47c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+387
-6
lines changed

stubs/braintree/METADATA.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
version = "4.25.*"
1+
version = "4.28.*"
22
upstream_repository = "https://github.com/braintree/braintree_python"
3-
partial_stub = true
4-
5-
[tool.stubtest]
6-
ignore_missing_stub = true

stubs/braintree/braintree/address.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Address(Resource):
1313
Ground: str
1414
Electronic: str
1515
ShipToStore: str
16+
PickupInStore: str
1617

1718
@staticmethod
1819
def create(params: Incomplete | None = None): ...

stubs/braintree/braintree/android_pay_card.pyi

+6
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ class AndroidPayCard(Resource):
1212
def last_4(self): ...
1313
@property
1414
def card_type(self): ...
15+
@staticmethod
16+
def signature(): ...
17+
@staticmethod
18+
def card_signature(): ...
19+
@staticmethod
20+
def network_token_signature(): ...

stubs/braintree/braintree/apple_pay_card.pyi

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ class ApplePayCard(Resource):
1313
def __init__(self, gateway, attributes) -> None: ...
1414
@property
1515
def expiration_date(self): ...
16+
@staticmethod
17+
def signature(): ...

stubs/braintree/braintree/credit_card.pyi

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from _typeshed import Incomplete
2+
from enum import Enum
23
from typing import Any
34

45
from braintree.address import Address as Address
@@ -36,6 +37,14 @@ class CreditCard(Resource):
3637
No: str
3738
Unknown: str
3839

40+
class DebitNetwork(Enum):
41+
Accel = "ACCEL"
42+
Maestro = "MAESTRO"
43+
Nyce = "NYCE"
44+
Pulse = "PULSE"
45+
Star = "STAR"
46+
Star_Access = "STAR_ACCESS"
47+
3948
Commercial: Any
4049
DurbinRegulated: Any
4150
Debit: Any

stubs/braintree/braintree/dispute.pyi

+12-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ from braintree.transaction_details import TransactionDetails as TransactionDetai
1212
class Dispute(AttributeGetter):
1313
class Status:
1414
Accepted: str
15+
AutoAccepted: str
1516
Disputed: str
1617
Expired: str
18+
Lost: str
1719
Open: str
20+
UnderReview: str
1821
Won: str
19-
Lost: str
2022

2123
class Reason:
2224
CancelledRecurringTransaction: str
@@ -41,6 +43,15 @@ class Dispute(AttributeGetter):
4143
Standard: str
4244
NotProtected: str
4345

46+
class PreDisputeProgram:
47+
NONE: str
48+
VisaRdr: str
49+
50+
class ProtectionLevel:
51+
EffortlessCBP: str
52+
StandardCBP: str
53+
NoProtection: str
54+
4455
@staticmethod
4556
def accept(id): ...
4657
@staticmethod

stubs/braintree/braintree/dispute_search.pyi

+2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ class DisputeSearch:
77
amount_won: Any
88
case_number: Any
99
chargeback_protection_level: Any
10+
protection_level: Any
1011
customer_id: Any
1112
disbursement_date: Any
1213
effective_date: Any
1314
id: Any
1415
kind: Any
1516
merchant_account_id: Any
17+
pre_dispute_program: Any
1618
reason: Any
1719
reason_code: Any
1820
received_date: Any
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.resource import Resource as Resource
4+
from braintree.venmo_profile_data import VenmoProfileData as VenmoProfileData
5+
6+
class EnrichedCustomerData(Resource):
7+
profile_data: Incomplete
8+
def __init__(self, gateway, attributes) -> None: ...

stubs/braintree/braintree/error_codes.pyi

+13
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class ErrorCodes:
5353
InvalidToken: str
5454
PrivateKeyMismatch: str
5555
KeyMismatchStoringCertificate: str
56+
CustomerIdIsInvalid: str
57+
BillingAddressFormatIsInvalid: str
5658

5759
class AuthorizationFingerprint:
5860
MissingFingerprint: str
@@ -67,8 +69,10 @@ class ErrorCodes:
6769
MakeDefaultRequiresCustomerId: str
6870
VerifyCardRequiresCustomerId: str
6971
FailOnDuplicatePaymentMethodRequiresCustomerId: str
72+
InvalidDomainFormat: str
7073
CustomerDoesNotExist: str
7174
ProxyMerchantDoesNotExist: str
75+
TooManyDomains: str
7276
UnsupportedVersion: str
7377
MerchantAccountDoesNotExist: str
7478

@@ -410,6 +414,11 @@ class ErrorCodes:
410414
IBANIsRequired: str
411415
AccountHolderNameIsRequired: str
412416

417+
class SepaDirectDebitAccount:
418+
SepaDebitAccountPaymentMethodMandateTypeIsNotSupported: str
419+
SepaDebitAccountPaymentMethodCustomerIdIsInvalid: str
420+
SepaDebitAccountPaymentMethodCustomerIdIsRequired: str
421+
413422
class Subscription:
414423
BillingDayOfMonthCannotBeUpdated: str
415424
BillingDayOfMonthIsInvalid: str
@@ -737,6 +746,10 @@ class ErrorCodes:
737746
TotalAmountIsRequired: str
738747
TotalAmountIsTooLarge: str
739748
TotalAmountMustBeGreaterThanZero: str
749+
UPCCodeIsMissing: str
750+
UPCCodeIsTooLong: str
751+
UPCTypeIsInvalid: str
752+
UPCTypeIsMissing: str
740753
UnitAmountFormatIsInvalid: str
741754
UnitAmountIsRequired: str
742755
UnitAmountIsTooLarge: str
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from braintree.exceptions.braintree_error import BraintreeError
2+
3+
class TestOperationPerformedInProductionError(BraintreeError): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from braintree.attribute_getter import AttributeGetter as AttributeGetter
2+
from braintree.montary_amount import MontaryAmount as MontaryAmount
3+
4+
class ExchangeRateQuote(AttributeGetter):
5+
def __init__(self, attributes) -> None: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.error_result import ErrorResult as ErrorResult
4+
from braintree.exchange_rate_quote_payload import ExchangeRateQuotePayload as ExchangeRateQuotePayload
5+
from braintree.successful_result import SuccessfulResult as SuccessfulResult
6+
7+
class ExchangeRateQuoteGateway:
8+
gateway: Incomplete
9+
config: Incomplete
10+
graphql_client: Incomplete
11+
def __init__(self, gateway, graphql_client: Incomplete | None = None) -> None: ...
12+
exchange_rate_quote_payload: Incomplete
13+
def generate(self, request): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.attribute_getter import AttributeGetter as AttributeGetter
4+
5+
class ExchangeRateQuoteInput(AttributeGetter):
6+
parent: Incomplete
7+
def __init__(self, parent, attributes) -> None: ...
8+
def done(self): ...
9+
def to_graphql_variables(self): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.exchange_rate_quote import ExchangeRateQuote as ExchangeRateQuote
4+
from braintree.montary_amount import MontaryAmount as MontaryAmount
5+
6+
class ExchangeRateQuotePayload:
7+
quotes: Incomplete
8+
def __init__(self, data) -> None: ...
9+
def get_quotes(self): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.exchange_rate_quote_input import ExchangeRateQuoteInput as ExchangeRateQuoteInput
4+
5+
class ExchangeRateQuoteRequest:
6+
quotes: Incomplete
7+
def __init__(self) -> None: ...
8+
def add_exchange_rate_quote_input(self, attributes): ...
9+
def to_graphql_variables(self): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from braintree.attribute_getter import AttributeGetter as AttributeGetter
2+
3+
class LiabilityShift(AttributeGetter): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from braintree.resource import Resource as Resource
2+
3+
class LocalPaymentExpired(Resource):
4+
def __init__(self, gateway, attributes) -> None: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.resource import Resource as Resource
4+
from braintree.transaction import Transaction as Transaction
5+
6+
class LocalPaymentFunded(Resource):
7+
transaction: Incomplete
8+
def __init__(self, gateway, attributes) -> None: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from braintree.address import Address as Address
2+
from braintree.resource import Resource as Resource
3+
4+
class MetaCheckoutCard(Resource):
5+
def __init__(self, gateway, attributes) -> None: ...
6+
@property
7+
def expiration_date(self): ...
8+
@property
9+
def masked_number(self): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from braintree.address import Address as Address
2+
from braintree.resource import Resource as Resource
3+
4+
class MetaCheckoutToken(Resource):
5+
def __init__(self, gateway, attributes) -> None: ...
6+
@property
7+
def expiration_date(self): ...
8+
@property
9+
def masked_number(self): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.attribute_getter import AttributeGetter as AttributeGetter
4+
5+
class MontaryAmount(AttributeGetter):
6+
value: Incomplete
7+
def __init__(self, attributes) -> None: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.attribute_getter import AttributeGetter as AttributeGetter
4+
5+
class PackageDetails(AttributeGetter):
6+
detail_list: Incomplete
7+
def __init__(self, attributes) -> None: ...

stubs/braintree/braintree/payment_instrument_type.pyi

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
class PaymentInstrumentType:
2+
MetaCheckoutCard: str
3+
MetaCheckoutToken: str
24
PayPalAccount: str
35
PayPalHere: str
6+
SepaDirectDebitAccount: str
47
EuropeBankAccount: str
58
CreditCard: str
69
ApplePayCard: str
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.enriched_customer_data import EnrichedCustomerData as EnrichedCustomerData
4+
from braintree.payment_method_parser import parse_payment_method as parse_payment_method
5+
from braintree.resource import Resource as Resource
6+
7+
class PaymentMethodCustomerDataUpdatedMetadata(Resource):
8+
payment_method: Incomplete
9+
enriched_customer_data: Incomplete
10+
def __init__(self, gateway, attributes) -> None: ...

stubs/braintree/braintree/plan.pyi

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Incomplete
12
from typing import Any
23

34
from braintree.add_on import AddOn as AddOn
@@ -13,3 +14,13 @@ class Plan(Resource):
1314
def __init__(self, gateway, attributes) -> None: ...
1415
@staticmethod
1516
def all(): ...
17+
@staticmethod
18+
def create(params: Incomplete | None = None): ...
19+
@staticmethod
20+
def find(subscription_id): ...
21+
@staticmethod
22+
def update(subscription_id, params: Incomplete | None = None): ...
23+
@staticmethod
24+
def create_signature(): ...
25+
@staticmethod
26+
def update_signature(): ...

stubs/braintree/braintree/plan_gateway.pyi

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Incomplete
12
from typing import Any
23

34
from braintree.error_result import ErrorResult as ErrorResult
@@ -12,3 +13,6 @@ class PlanGateway:
1213
config: Any
1314
def __init__(self, gateway) -> None: ...
1415
def all(self): ...
16+
def create(self, params: Incomplete | None = None): ...
17+
def find(self, plan_id): ...
18+
def update(self, plan_id, params: Incomplete | None = None): ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.configuration import Configuration as Configuration
4+
from braintree.resource import Resource as Resource
5+
6+
class SepaDirectDebitAccount(Resource):
7+
@staticmethod
8+
def find(sepa_direct_debit_account_token): ...
9+
@staticmethod
10+
def delete(sepa_direct_debit_account_token): ...
11+
subscriptions: Incomplete
12+
def __init__(self, gateway, attributes) -> None: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from _typeshed import Incomplete
2+
3+
from braintree.error_result import ErrorResult as ErrorResult
4+
from braintree.exceptions.not_found_error import NotFoundError as NotFoundError
5+
from braintree.resource import Resource as Resource
6+
from braintree.sepa_direct_debit_account import SepaDirectDebitAccount as SepaDirectDebitAccount
7+
from braintree.successful_result import SuccessfulResult as SuccessfulResult
8+
9+
class SepaDirectDebitAccountGateway:
10+
gateway: Incomplete
11+
config: Incomplete
12+
def __init__(self, gateway) -> None: ...
13+
def find(self, sepa_direct_debit_account_token): ...
14+
def delete(self, sepa_direct_debit_account_token): ...

stubs/braintree/braintree/test/__init__.pyi

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class AuthenticationIds:
2+
ThreeDSecureVisaFullAuthentication: str
3+
ThreeDSecureVisaLookupTimeout: str
4+
ThreeDSecureVisaFailedSignature: str
5+
ThreeDSecureVisaFailedAuthentication: str
6+
ThreeDSecureVisaAttemptsNonParticipating: str
7+
ThreeDSecureVisaNoteEnrolled: str
8+
ThreeDSecureVisaUnavailable: str
9+
ThreeDSecureVisaMPILookupError: str
10+
ThreeDSecureVisaMPIAuthenticateError: str
11+
ThreeDSecureVisaAuthenticationUnavailable: str
12+
ThreeDSecureVisaBypassedAuthentication: str
13+
ThreeDSecureTwoVisaSuccessfulFrictionlessAuthentication: str
14+
ThreeDSecureTwoVisaSuccessfulStepUpAuthentication: str
15+
ThreeDSecureTwoVisaErrorOnLookup: str
16+
ThreeDSecureTwoVisaTimeoutOnLookup: str
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class CreditCardDefaults:
2+
CountryOfIssuance: str
3+
IssuingBank: str
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
class CreditCardNumbers:
2+
class CardTypeIndicators:
3+
Commercial: str
4+
DurbinRegulated: str
5+
Debit: str
6+
Healthcare: str
7+
Payroll: str
8+
Prepaid: str
9+
IssuingBank: str
10+
CountryOfIssuance: str
11+
No: str
12+
Unknown: str
13+
14+
Maestro: str
15+
MasterCard: str
16+
MasterCardInternational: str
17+
Visa: str
18+
VisaInternational: str
19+
VisaPrepaid: str
20+
Discover: str
21+
Elo: str
22+
Hiper: str
23+
Hipercard: str
24+
Amex: str
25+
26+
class FailsSandboxVerification:
27+
AmEx: str
28+
Discover: str
29+
MasterCard: str
30+
Visa: str
31+
32+
class AmexPayWithPoints:
33+
Success: str
34+
IneligibleCard: str
35+
InsufficientPoints: str
36+
37+
class Disputes:
38+
Chargeback: str

0 commit comments

Comments
 (0)