Skip to content

stubtest-complete & Bump braintree to 4.28.* #11678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions stubs/braintree/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
version = "4.25.*"
version = "4.28.*"
upstream_repository = "https://github.com/braintree/braintree_python"
partial_stub = true

[tool.stubtest]
ignore_missing_stub = true
1 change: 1 addition & 0 deletions stubs/braintree/braintree/address.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Address(Resource):
Ground: str
Electronic: str
ShipToStore: str
PickupInStore: str

@staticmethod
def create(params: Incomplete | None = None): ...
Expand Down
6 changes: 6 additions & 0 deletions stubs/braintree/braintree/android_pay_card.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ class AndroidPayCard(Resource):
def last_4(self): ...
@property
def card_type(self): ...
@staticmethod
def signature(): ...
@staticmethod
def card_signature(): ...
@staticmethod
def network_token_signature(): ...
2 changes: 2 additions & 0 deletions stubs/braintree/braintree/apple_pay_card.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ class ApplePayCard(Resource):
def __init__(self, gateway, attributes) -> None: ...
@property
def expiration_date(self): ...
@staticmethod
def signature(): ...
9 changes: 9 additions & 0 deletions stubs/braintree/braintree/credit_card.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from _typeshed import Incomplete
from enum import Enum
from typing import Any

from braintree.address import Address as Address
Expand Down Expand Up @@ -36,6 +37,14 @@ class CreditCard(Resource):
No: str
Unknown: str

class DebitNetwork(Enum):
Accel = "ACCEL"
Maestro = "MAESTRO"
Nyce = "NYCE"
Pulse = "PULSE"
Star = "STAR"
Star_Access = "STAR_ACCESS"

Commercial: Any
DurbinRegulated: Any
Debit: Any
Expand Down
13 changes: 12 additions & 1 deletion stubs/braintree/braintree/dispute.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ from braintree.transaction_details import TransactionDetails as TransactionDetai
class Dispute(AttributeGetter):
class Status:
Accepted: str
AutoAccepted: str
Disputed: str
Expired: str
Lost: str
Open: str
UnderReview: str
Won: str
Lost: str

class Reason:
CancelledRecurringTransaction: str
Expand All @@ -41,6 +43,15 @@ class Dispute(AttributeGetter):
Standard: str
NotProtected: str

class PreDisputeProgram:
NONE: str
VisaRdr: str

class ProtectionLevel:
EffortlessCBP: str
StandardCBP: str
NoProtection: str

@staticmethod
def accept(id): ...
@staticmethod
Expand Down
2 changes: 2 additions & 0 deletions stubs/braintree/braintree/dispute_search.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ class DisputeSearch:
amount_won: Any
case_number: Any
chargeback_protection_level: Any
protection_level: Any
customer_id: Any
disbursement_date: Any
effective_date: Any
id: Any
kind: Any
merchant_account_id: Any
pre_dispute_program: Any
reason: Any
reason_code: Any
received_date: Any
Expand Down
8 changes: 8 additions & 0 deletions stubs/braintree/braintree/enriched_customer_data.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from _typeshed import Incomplete

from braintree.resource import Resource as Resource
from braintree.venmo_profile_data import VenmoProfileData as VenmoProfileData

class EnrichedCustomerData(Resource):
profile_data: Incomplete
def __init__(self, gateway, attributes) -> None: ...
13 changes: 13 additions & 0 deletions stubs/braintree/braintree/error_codes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class ErrorCodes:
InvalidToken: str
PrivateKeyMismatch: str
KeyMismatchStoringCertificate: str
CustomerIdIsInvalid: str
BillingAddressFormatIsInvalid: str

class AuthorizationFingerprint:
MissingFingerprint: str
Expand All @@ -67,8 +69,10 @@ class ErrorCodes:
MakeDefaultRequiresCustomerId: str
VerifyCardRequiresCustomerId: str
FailOnDuplicatePaymentMethodRequiresCustomerId: str
InvalidDomainFormat: str
CustomerDoesNotExist: str
ProxyMerchantDoesNotExist: str
TooManyDomains: str
UnsupportedVersion: str
MerchantAccountDoesNotExist: str

Expand Down Expand Up @@ -410,6 +414,11 @@ class ErrorCodes:
IBANIsRequired: str
AccountHolderNameIsRequired: str

class SepaDirectDebitAccount:
SepaDebitAccountPaymentMethodMandateTypeIsNotSupported: str
SepaDebitAccountPaymentMethodCustomerIdIsInvalid: str
SepaDebitAccountPaymentMethodCustomerIdIsRequired: str

class Subscription:
BillingDayOfMonthCannotBeUpdated: str
BillingDayOfMonthIsInvalid: str
Expand Down Expand Up @@ -737,6 +746,10 @@ class ErrorCodes:
TotalAmountIsRequired: str
TotalAmountIsTooLarge: str
TotalAmountMustBeGreaterThanZero: str
UPCCodeIsMissing: str
UPCCodeIsTooLong: str
UPCTypeIsInvalid: str
UPCTypeIsMissing: str
UnitAmountFormatIsInvalid: str
UnitAmountIsRequired: str
UnitAmountIsTooLarge: str
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from braintree.exceptions.braintree_error import BraintreeError

class TestOperationPerformedInProductionError(BraintreeError): ...
5 changes: 5 additions & 0 deletions stubs/braintree/braintree/exchange_rate_quote.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from braintree.attribute_getter import AttributeGetter as AttributeGetter
from braintree.montary_amount import MontaryAmount as MontaryAmount

class ExchangeRateQuote(AttributeGetter):
def __init__(self, attributes) -> None: ...
13 changes: 13 additions & 0 deletions stubs/braintree/braintree/exchange_rate_quote_gateway.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from _typeshed import Incomplete

from braintree.error_result import ErrorResult as ErrorResult
from braintree.exchange_rate_quote_payload import ExchangeRateQuotePayload as ExchangeRateQuotePayload
from braintree.successful_result import SuccessfulResult as SuccessfulResult

class ExchangeRateQuoteGateway:
gateway: Incomplete
config: Incomplete
graphql_client: Incomplete
def __init__(self, gateway, graphql_client: Incomplete | None = None) -> None: ...
exchange_rate_quote_payload: Incomplete
def generate(self, request): ...
9 changes: 9 additions & 0 deletions stubs/braintree/braintree/exchange_rate_quote_input.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from _typeshed import Incomplete

from braintree.attribute_getter import AttributeGetter as AttributeGetter

class ExchangeRateQuoteInput(AttributeGetter):
parent: Incomplete
def __init__(self, parent, attributes) -> None: ...
def done(self): ...
def to_graphql_variables(self): ...
9 changes: 9 additions & 0 deletions stubs/braintree/braintree/exchange_rate_quote_payload.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from _typeshed import Incomplete

from braintree.exchange_rate_quote import ExchangeRateQuote as ExchangeRateQuote
from braintree.montary_amount import MontaryAmount as MontaryAmount

class ExchangeRateQuotePayload:
quotes: Incomplete
def __init__(self, data) -> None: ...
def get_quotes(self): ...
9 changes: 9 additions & 0 deletions stubs/braintree/braintree/exchange_rate_quote_request.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from _typeshed import Incomplete

from braintree.exchange_rate_quote_input import ExchangeRateQuoteInput as ExchangeRateQuoteInput

class ExchangeRateQuoteRequest:
quotes: Incomplete
def __init__(self) -> None: ...
def add_exchange_rate_quote_input(self, attributes): ...
def to_graphql_variables(self): ...
3 changes: 3 additions & 0 deletions stubs/braintree/braintree/liability_shift.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from braintree.attribute_getter import AttributeGetter as AttributeGetter

class LiabilityShift(AttributeGetter): ...
4 changes: 4 additions & 0 deletions stubs/braintree/braintree/local_payment_expired.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from braintree.resource import Resource as Resource

class LocalPaymentExpired(Resource):
def __init__(self, gateway, attributes) -> None: ...
8 changes: 8 additions & 0 deletions stubs/braintree/braintree/local_payment_funded.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from _typeshed import Incomplete

from braintree.resource import Resource as Resource
from braintree.transaction import Transaction as Transaction

class LocalPaymentFunded(Resource):
transaction: Incomplete
def __init__(self, gateway, attributes) -> None: ...
9 changes: 9 additions & 0 deletions stubs/braintree/braintree/meta_checkout_card.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from braintree.address import Address as Address
from braintree.resource import Resource as Resource

class MetaCheckoutCard(Resource):
def __init__(self, gateway, attributes) -> None: ...
@property
def expiration_date(self): ...
@property
def masked_number(self): ...
9 changes: 9 additions & 0 deletions stubs/braintree/braintree/meta_checkout_token.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from braintree.address import Address as Address
from braintree.resource import Resource as Resource

class MetaCheckoutToken(Resource):
def __init__(self, gateway, attributes) -> None: ...
@property
def expiration_date(self): ...
@property
def masked_number(self): ...
7 changes: 7 additions & 0 deletions stubs/braintree/braintree/montary_amount.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from _typeshed import Incomplete

from braintree.attribute_getter import AttributeGetter as AttributeGetter

class MontaryAmount(AttributeGetter):
value: Incomplete
def __init__(self, attributes) -> None: ...
7 changes: 7 additions & 0 deletions stubs/braintree/braintree/package_details.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from _typeshed import Incomplete

from braintree.attribute_getter import AttributeGetter as AttributeGetter

class PackageDetails(AttributeGetter):
detail_list: Incomplete
def __init__(self, attributes) -> None: ...
3 changes: 3 additions & 0 deletions stubs/braintree/braintree/payment_instrument_type.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class PaymentInstrumentType:
MetaCheckoutCard: str
MetaCheckoutToken: str
PayPalAccount: str
PayPalHere: str
SepaDirectDebitAccount: str
EuropeBankAccount: str
CreditCard: str
ApplePayCard: str
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from _typeshed import Incomplete

from braintree.enriched_customer_data import EnrichedCustomerData as EnrichedCustomerData
from braintree.payment_method_parser import parse_payment_method as parse_payment_method
from braintree.resource import Resource as Resource

class PaymentMethodCustomerDataUpdatedMetadata(Resource):
payment_method: Incomplete
enriched_customer_data: Incomplete
def __init__(self, gateway, attributes) -> None: ...
11 changes: 11 additions & 0 deletions stubs/braintree/braintree/plan.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any

from braintree.add_on import AddOn as AddOn
Expand All @@ -13,3 +14,13 @@ class Plan(Resource):
def __init__(self, gateway, attributes) -> None: ...
@staticmethod
def all(): ...
@staticmethod
def create(params: Incomplete | None = None): ...
@staticmethod
def find(subscription_id): ...
@staticmethod
def update(subscription_id, params: Incomplete | None = None): ...
@staticmethod
def create_signature(): ...
@staticmethod
def update_signature(): ...
4 changes: 4 additions & 0 deletions stubs/braintree/braintree/plan_gateway.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any

from braintree.error_result import ErrorResult as ErrorResult
Expand All @@ -12,3 +13,6 @@ class PlanGateway:
config: Any
def __init__(self, gateway) -> None: ...
def all(self): ...
def create(self, params: Incomplete | None = None): ...
def find(self, plan_id): ...
def update(self, plan_id, params: Incomplete | None = None): ...
12 changes: 12 additions & 0 deletions stubs/braintree/braintree/sepa_direct_debit_account.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from _typeshed import Incomplete

from braintree.configuration import Configuration as Configuration
from braintree.resource import Resource as Resource

class SepaDirectDebitAccount(Resource):
@staticmethod
def find(sepa_direct_debit_account_token): ...
@staticmethod
def delete(sepa_direct_debit_account_token): ...
subscriptions: Incomplete
def __init__(self, gateway, attributes) -> None: ...
14 changes: 14 additions & 0 deletions stubs/braintree/braintree/sepa_direct_debit_account_gateway.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from _typeshed import Incomplete

from braintree.error_result import ErrorResult as ErrorResult
from braintree.exceptions.not_found_error import NotFoundError as NotFoundError
from braintree.resource import Resource as Resource
from braintree.sepa_direct_debit_account import SepaDirectDebitAccount as SepaDirectDebitAccount
from braintree.successful_result import SuccessfulResult as SuccessfulResult

class SepaDirectDebitAccountGateway:
gateway: Incomplete
config: Incomplete
def __init__(self, gateway) -> None: ...
def find(self, sepa_direct_debit_account_token): ...
def delete(self, sepa_direct_debit_account_token): ...
Empty file.
16 changes: 16 additions & 0 deletions stubs/braintree/braintree/test/authentication_ids.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class AuthenticationIds:
ThreeDSecureVisaFullAuthentication: str
ThreeDSecureVisaLookupTimeout: str
ThreeDSecureVisaFailedSignature: str
ThreeDSecureVisaFailedAuthentication: str
ThreeDSecureVisaAttemptsNonParticipating: str
ThreeDSecureVisaNoteEnrolled: str
ThreeDSecureVisaUnavailable: str
ThreeDSecureVisaMPILookupError: str
ThreeDSecureVisaMPIAuthenticateError: str
ThreeDSecureVisaAuthenticationUnavailable: str
ThreeDSecureVisaBypassedAuthentication: str
ThreeDSecureTwoVisaSuccessfulFrictionlessAuthentication: str
ThreeDSecureTwoVisaSuccessfulStepUpAuthentication: str
ThreeDSecureTwoVisaErrorOnLookup: str
ThreeDSecureTwoVisaTimeoutOnLookup: str
3 changes: 3 additions & 0 deletions stubs/braintree/braintree/test/credit_card_defaults.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class CreditCardDefaults:
CountryOfIssuance: str
IssuingBank: str
38 changes: 38 additions & 0 deletions stubs/braintree/braintree/test/credit_card_numbers.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
class CreditCardNumbers:
class CardTypeIndicators:
Commercial: str
DurbinRegulated: str
Debit: str
Healthcare: str
Payroll: str
Prepaid: str
IssuingBank: str
CountryOfIssuance: str
No: str
Unknown: str

Maestro: str
MasterCard: str
MasterCardInternational: str
Visa: str
VisaInternational: str
VisaPrepaid: str
Discover: str
Elo: str
Hiper: str
Hipercard: str
Amex: str

class FailsSandboxVerification:
AmEx: str
Discover: str
MasterCard: str
Visa: str

class AmexPayWithPoints:
Success: str
IneligibleCard: str
InsufficientPoints: str

class Disputes:
Chargeback: str
Loading