diff --git a/stubs/braintree/METADATA.toml b/stubs/braintree/METADATA.toml index de87e7be2fbb..30cdf466ba3a 100644 --- a/stubs/braintree/METADATA.toml +++ b/stubs/braintree/METADATA.toml @@ -1,2 +1,2 @@ -version = "4.38.*" +version = "4.39.*" upstream_repository = "https://github.com/braintree/braintree_python" diff --git a/stubs/braintree/braintree/__init__.pyi b/stubs/braintree/braintree/__init__.pyi index 081f8b489f52..4eb6dc7c19bb 100644 --- a/stubs/braintree/braintree/__init__.pyi +++ b/stubs/braintree/braintree/__init__.pyi @@ -7,6 +7,13 @@ from braintree.amex_express_checkout_card import AmexExpressCheckoutCard as Amex from braintree.android_pay_card import AndroidPayCard as AndroidPayCard from braintree.apple_pay_card import ApplePayCard as ApplePayCard from braintree.apple_pay_gateway import ApplePayGateway as ApplePayGateway +from braintree.bank_account_instant_verification_gateway import ( + BankAccountInstantVerificationGateway as BankAccountInstantVerificationGateway, +) +from braintree.bank_account_instant_verification_jwt import BankAccountInstantVerificationJwt as BankAccountInstantVerificationJwt +from braintree.bank_account_instant_verification_jwt_request import ( + BankAccountInstantVerificationJwtRequest as BankAccountInstantVerificationJwtRequest, +) from braintree.blik_alias import BlikAlias as BlikAlias from braintree.braintree_gateway import BraintreeGateway as BraintreeGateway from braintree.client_token import ClientToken as ClientToken @@ -62,10 +69,12 @@ from braintree.paypal_payment_resource import PayPalPaymentResource as PayPalPay from braintree.plan import Plan as Plan from braintree.plan_gateway import PlanGateway as PlanGateway from braintree.processor_response_types import ProcessorResponseTypes as ProcessorResponseTypes +from braintree.receiver import Receiver as Receiver from braintree.resource_collection import ResourceCollection as ResourceCollection from braintree.risk_data import RiskData as RiskData from braintree.samsung_pay_card import SamsungPayCard as SamsungPayCard from braintree.search import Search as Search +from braintree.sender import Sender as Sender from braintree.sepa_direct_debit_account import SepaDirectDebitAccount as SepaDirectDebitAccount from braintree.settlement_batch_summary import SettlementBatchSummary as SettlementBatchSummary from braintree.signature_service import SignatureService as SignatureService @@ -84,9 +93,11 @@ from braintree.transaction_details import TransactionDetails as TransactionDetai from braintree.transaction_gateway import TransactionGateway as TransactionGateway from braintree.transaction_line_item import TransactionLineItem as TransactionLineItem from braintree.transaction_search import TransactionSearch as TransactionSearch +from braintree.transaction_us_bank_account_request import TransactionUsBankAccountRequest as TransactionUsBankAccountRequest from braintree.transfer import Transfer as Transfer from braintree.unknown_payment_method import UnknownPaymentMethod as UnknownPaymentMethod from braintree.us_bank_account import UsBankAccount as UsBankAccount +from braintree.us_bank_account_verification import UsBankAccountVerification as UsBankAccountVerification from braintree.validation_error_collection import ValidationErrorCollection as ValidationErrorCollection from braintree.venmo_account import VenmoAccount as VenmoAccount from braintree.venmo_profile_data import VenmoProfileData as VenmoProfileData diff --git a/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi b/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi new file mode 100644 index 000000000000..989bc822c03a --- /dev/null +++ b/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi @@ -0,0 +1,13 @@ +from _typeshed import Incomplete +from typing import Final + +from braintree.error_result import ErrorResult +from braintree.successful_result import SuccessfulResult + +class BankAccountInstantVerificationGateway: + gateway: Incomplete + config: Incomplete + graphql_client: Incomplete + CREATE_JWT_MUTATION: Final[str] + def __init__(self, gateway) -> None: ... + def create_jwt(self, request) -> SuccessfulResult | ErrorResult: ... diff --git a/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi b/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi new file mode 100644 index 000000000000..4bbed78f9e93 --- /dev/null +++ b/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi @@ -0,0 +1,8 @@ +from braintree.attribute_getter import AttributeGetter + +class BankAccountInstantVerificationJwt(AttributeGetter): + def __init__(self, jwt) -> None: ... + @property + def jwt(self): ... + @jwt.setter + def jwt(self, value) -> None: ... diff --git a/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi b/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi new file mode 100644 index 000000000000..43ae31462e5a --- /dev/null +++ b/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi @@ -0,0 +1,18 @@ +from typing import TypedDict, type_check_only +from typing_extensions import Self + +@type_check_only +class _ParamsDict(TypedDict, total=False): + businessName: str + returnUrl: str + cancelUrl: str + +class BankAccountInstantVerificationJwtRequest: + def __init__(self) -> None: ... + def business_name(self, business_name: str) -> Self: ... + def return_url(self, return_url: str) -> Self: ... + def cancel_url(self, cancel_url: str) -> Self: ... + def get_business_name(self) -> str: ... + def get_return_url(self) -> str: ... + def get_cancel_url(self) -> str: ... + def to_graphql_variables(self) -> _ParamsDict: ... diff --git a/stubs/braintree/braintree/braintree_gateway.pyi b/stubs/braintree/braintree/braintree_gateway.pyi index c80300a7ec4c..fc857c95133e 100644 --- a/stubs/braintree/braintree/braintree_gateway.pyi +++ b/stubs/braintree/braintree/braintree_gateway.pyi @@ -1,8 +1,7 @@ -from _typeshed import Incomplete - from braintree.add_on_gateway import AddOnGateway from braintree.address_gateway import AddressGateway from braintree.apple_pay_gateway import ApplePayGateway +from braintree.bank_account_instant_verification_gateway import BankAccountInstantVerificationGateway from braintree.client_token_gateway import ClientTokenGateway from braintree.configuration import Configuration from braintree.credit_card_gateway import CreditCardGateway @@ -28,6 +27,7 @@ from braintree.transaction_gateway import TransactionGateway from braintree.transaction_line_item_gateway import TransactionLineItemGateway from braintree.us_bank_account_gateway import UsBankAccountGateway from braintree.us_bank_account_verification_gateway import UsBankAccountVerificationGateway +from braintree.util.graphql_client import GraphQLClient from braintree.webhook_notification_gateway import WebhookNotificationGateway from braintree.webhook_testing_gateway import WebhookTestingGateway @@ -36,6 +36,7 @@ class BraintreeGateway: add_on: AddOnGateway address: AddressGateway apple_pay: ApplePayGateway + bank_account_instant_verification: BankAccountInstantVerificationGateway client_token: ClientTokenGateway credit_card: CreditCardGateway customer: CustomerGateway @@ -43,7 +44,7 @@ class BraintreeGateway: dispute: DisputeGateway document_upload: DocumentUploadGateway exchange_rate_quote: ExchangeRateQuoteGateway - graphql_client: Incomplete + graphql_client: GraphQLClient merchant: MerchantGateway merchant_account: MerchantAccountGateway oauth: OAuthGateway diff --git a/stubs/braintree/braintree/error_codes.pyi b/stubs/braintree/braintree/error_codes.pyi index 401746560cb1..154bf9051b00 100644 --- a/stubs/braintree/braintree/error_codes.pyi +++ b/stubs/braintree/braintree/error_codes.pyi @@ -572,6 +572,8 @@ class ErrorCodes: TransactionIsNotEligibleForAdjustment: Final = "915219" TransactionMustBeInStateAuthorized: Final = "915218" TransactionSourceIsInvalid: Final = "915133" + TransferTypeIsInvalid: Final = "97501" + TransferDetailsAreRequired: Final = "97510" TypeIsInvalid: Final = "91523" TypeIsRequired: Final = "91524" UnsupportedVoiceAuthorization: Final = "91539" diff --git a/stubs/braintree/braintree/receiver.pyi b/stubs/braintree/braintree/receiver.pyi new file mode 100644 index 000000000000..8c78f46a560a --- /dev/null +++ b/stubs/braintree/braintree/receiver.pyi @@ -0,0 +1,6 @@ +from typing import Any + +from braintree.attribute_getter import AttributeGetter + +class Receiver(AttributeGetter): + def __init__(self, attributes: dict[str, Any] | None) -> None: ... diff --git a/stubs/braintree/braintree/sender.pyi b/stubs/braintree/braintree/sender.pyi new file mode 100644 index 000000000000..5cd107b52b32 --- /dev/null +++ b/stubs/braintree/braintree/sender.pyi @@ -0,0 +1,6 @@ +from typing import Any + +from braintree.attribute_getter import AttributeGetter + +class Sender(AttributeGetter): + def __init__(self, attributes: dict[str, Any] | None) -> None: ... diff --git a/stubs/braintree/braintree/transaction_us_bank_account_request.pyi b/stubs/braintree/braintree/transaction_us_bank_account_request.pyi new file mode 100644 index 000000000000..4f9e2991c728 --- /dev/null +++ b/stubs/braintree/braintree/transaction_us_bank_account_request.pyi @@ -0,0 +1,17 @@ +from _typeshed import Incomplete +from datetime import datetime +from typing import TypedDict, type_check_only +from typing_extensions import Self + +@type_check_only +class _ParamsDict(TypedDict, total=False): + ach_mandate_text: str + ach_mandate_accepted_at: str + +class TransactionUsBankAccountRequest: + parent: Incomplete + def __init__(self, parent) -> None: ... + def ach_mandate_text(self, ach_mandate_text: str) -> Self: ... + def ach_mandate_accepted_at(self, ach_mandate_accepted_at: str | datetime) -> Self: ... + def done(self): ... + def to_param_dict(self) -> _ParamsDict: ... diff --git a/stubs/braintree/braintree/transfer.pyi b/stubs/braintree/braintree/transfer.pyi index 2146adaea6b7..ac730e9345dd 100644 --- a/stubs/braintree/braintree/transfer.pyi +++ b/stubs/braintree/braintree/transfer.pyi @@ -1,4 +1,8 @@ from braintree.attribute_getter import AttributeGetter +from braintree.receiver import Receiver +from braintree.sender import Sender class Transfer(AttributeGetter): + sender: Sender + receiver: Receiver def __init__(self, attributes) -> None: ... diff --git a/stubs/braintree/braintree/us_bank_account_verification.pyi b/stubs/braintree/braintree/us_bank_account_verification.pyi index 506fb48a7aae..92e90486795c 100644 --- a/stubs/braintree/braintree/us_bank_account_verification.pyi +++ b/stubs/braintree/braintree/us_bank_account_verification.pyi @@ -18,6 +18,7 @@ class UsBankAccountVerification(AttributeGetter): class VerificationMethod: NetworkCheck: Final = "network_check" IndependentCheck: Final = "independent_check" + InstantVerificationAccountValidation: Final = "instant_verification_account_validation" TokenizedCheck: Final = "tokenized_check" MicroTransfers: Final = "micro_transfers"