Skip to content

Commit ccc47c0

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

43 files changed

Lines changed: 387 additions & 6 deletions

Some content is hidden

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

stubs/braintree/METADATA.toml

Lines changed: 1 addition & 5 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
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

Lines changed: 12 additions & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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
Lines changed: 8 additions & 0 deletions
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

Lines changed: 13 additions & 0 deletions
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
Lines changed: 3 additions & 0 deletions
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): ...

0 commit comments

Comments
 (0)