Bump braintree to 4.36.* (#14192)

This commit is contained in:
Semyon Moroz
2025-05-30 15:01:28 +00:00
committed by GitHub
parent ee696d5303
commit 909080620e
24 changed files with 147 additions and 51 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
version = "4.35.*"
version = "4.36.*"
upstream_repository = "https://github.com/braintree/braintree_python"
+1
View File
@@ -46,6 +46,7 @@ from braintree.local_payment_reversed import LocalPaymentReversed as LocalPaymen
from braintree.merchant import Merchant as Merchant
from braintree.merchant_account import MerchantAccount as MerchantAccount
from braintree.merchant_account_gateway import MerchantAccountGateway as MerchantAccountGateway
from braintree.monetary_amount import MonetaryAmount as MonetaryAmount
from braintree.oauth_access_revocation import OAuthAccessRevocation as OAuthAccessRevocation
from braintree.partner_merchant import PartnerMerchant as PartnerMerchant
from braintree.payment_facilitator import PaymentFacilitator as PaymentFacilitator
@@ -59,6 +59,10 @@ class CreditCard(Resource):
Prepaid: type[CardTypeIndicator]
ProductId: type[CardTypeIndicator]
PrepaidReloadable: type[CardTypeIndicator]
Business: type[CardTypeIndicator]
Consumer: type[CardTypeIndicator]
Corporate: type[CardTypeIndicator]
Purchase: type[CardTypeIndicator]
@staticmethod
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
@staticmethod
@@ -13,5 +13,5 @@ class CustomerSessionGateway:
self, update_customer_session_input: UpdateCustomerSessionInput
) -> SuccessfulResult | ErrorResult: ...
def get_customer_recommendations(
self, customer_recommendations_input: CustomerRecommendationsInput
self, get_customer_recommendations_input: CustomerRecommendationsInput
) -> SuccessfulResult | ErrorResult: ...
@@ -3,11 +3,15 @@ from braintree.graphql.inputs import (
CreateCustomerSessionInput as CreateCustomerSessionInput,
CustomerRecommendationsInput as CustomerRecommendationsInput,
CustomerSessionInput as CustomerSessionInput,
MonetaryAmountInput as MonetaryAmountInput,
PayPalPayeeInput as PayPalPayeeInput,
PayPalPurchaseUnitInput as PayPalPurchaseUnitInput,
PhoneInput as PhoneInput,
UpdateCustomerSessionInput as UpdateCustomerSessionInput,
)
from braintree.graphql.types import (
CustomerRecommendationsPayload as CustomerRecommendationsPayload,
PaymentOptions as PaymentOptions,
PaymentRecommendation as PaymentRecommendation,
)
from braintree.graphql.unions import CustomerRecommendations as CustomerRecommendations
@@ -1,5 +1,8 @@
from braintree.graphql.inputs.create_customer_session_input import CreateCustomerSessionInput as CreateCustomerSessionInput
from braintree.graphql.inputs.customer_recommendations_input import CustomerRecommendationsInput as CustomerRecommendationsInput
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput as CustomerSessionInput
from braintree.graphql.inputs.monetary_amount_input import MonetaryAmountInput as MonetaryAmountInput
from braintree.graphql.inputs.paypal_payee_input import PayPalPayeeInput as PayPalPayeeInput
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput as PayPalPurchaseUnitInput
from braintree.graphql.inputs.phone_input import PhoneInput as PhoneInput
from braintree.graphql.inputs.update_customer_session_input import UpdateCustomerSessionInput as UpdateCustomerSessionInput
@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from typing_extensions import Self
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput
class CreateCustomerSessionInput:
def __init__(
@@ -9,15 +11,17 @@ class CreateCustomerSessionInput:
session_id: str | None = None,
customer: CustomerSessionInput | None = None,
domain: str | None = None,
purchase_units: list[PayPalPurchaseUnitInput] | None = None,
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder(): ...
def builder() -> Builder: ...
class Builder:
def __init__(self) -> None: ...
def merchant_account_id(self, merchant_account_id: str): ...
def session_id(self, session_id: str): ...
def customer(self, customer: str): ...
def domain(self, domain: str): ...
def build(self): ...
def merchant_account_id(self, merchant_account_id: str) -> Self: ...
def session_id(self, session_id: str) -> Self: ...
def customer(self, customer: CustomerSessionInput) -> Self: ...
def purchase_units(self, purchase_units: list[PayPalPurchaseUnitInput]) -> Self: ...
def domain(self, domain: str) -> Self: ...
def build(self) -> CreateCustomerSessionInput: ...
@@ -1,22 +1,27 @@
from _typeshed import Incomplete
from typing_extensions import Self
from braintree.graphql.enums.recommendations import Recommendations
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput
class CustomerRecommendationsInput:
def __init__(
self,
session_id: str,
recommendations: list[Recommendations],
merchant_account_id: str | None = None,
purchase_units: list[PayPalPurchaseUnitInput] | None = None,
domain: str | None = None,
customer: CustomerSessionInput | None = None,
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder(session_id: str, recommendations: list[Recommendations]): ...
def builder() -> Builder: ...
class Builder:
def __init__(self, session_id: str, recommendations: list[Recommendations]) -> None: ...
def merchant_account_id(self, merchant_account_id: str): ...
def customer(self, customer: CustomerSessionInput): ...
def build(self): ...
def __init__(self) -> None: ...
def session_id(self, session_id: str) -> Self: ...
def merchant_account_id(self, merchant_account_id: str) -> Self: ...
def customer(self, customer: CustomerSessionInput) -> Self: ...
def purchase_units(self, purchase_units: list[PayPalPurchaseUnitInput]) -> Self: ...
def domain(self, domain: str) -> Self: ...
def build(self) -> CustomerRecommendationsInput: ...
@@ -1,4 +1,5 @@
from _typeshed import Incomplete
from typing_extensions import Self
from braintree.graphql.inputs.phone_input import PhoneInput
@@ -6,22 +7,26 @@ class CustomerSessionInput:
def __init__(
self,
email: str | None = None,
hashed_email: str | None = None,
phone: PhoneInput | None = None,
hashed_phone_number: str | None = None,
device_fingerprint_id: str | None = None,
paypal_app_installed: bool | None = None,
venmo_app_installed: bool | None = None,
user_agent: str | None = None,
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder(): ...
def builder() -> Builder: ...
class Builder:
def __init__(self) -> None: ...
def email(self, email: str): ...
def phone(self, phone: PhoneInput): ...
def device_fingerprint_id(self, device_fingerprint_id: str): ...
def paypal_app_installed(self, paypal_app_installed: bool): ...
def venmo_app_installed(self, venmo_app_installed: bool): ...
def user_agent(self, user_agent: str): ...
def build(self): ...
def email(self, email: str) -> Self: ...
def hashed_email(self, hashed_email: str) -> Self: ...
def phone(self, phone: PhoneInput) -> Self: ...
def hashed_phone_number(self, hashed_phone_number: str) -> Self: ...
def device_fingerprint_id(self, device_fingerprint_id: str) -> Self: ...
def paypal_app_installed(self, paypal_app_installed: bool) -> Self: ...
def venmo_app_installed(self, venmo_app_installed: bool) -> Self: ...
def user_agent(self, user_agent: str) -> Self: ...
def build(self) -> CustomerSessionInput: ...
@@ -0,0 +1,6 @@
from _typeshed import Incomplete
from decimal import Decimal
class MonetaryAmountInput:
def __init__(self, value: Decimal | None = None, currency_code: str | None = None) -> None: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@@ -0,0 +1,14 @@
from _typeshed import Incomplete
from typing_extensions import Self
class PayPalPayeeInput:
def __init__(self, email_address: str | None = None, client_id: str | None = None) -> None: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder() -> Builder: ...
class Builder:
def __init__(self) -> None: ...
def email_address(self, email_address: str) -> Self: ...
def client_id(self, client_id: str) -> Self: ...
def build(self) -> PayPalPayeeInput: ...
@@ -0,0 +1,16 @@
from _typeshed import Incomplete
from typing_extensions import Self
from braintree.graphql.inputs.monetary_amount_input import MonetaryAmountInput
from braintree.graphql.inputs.paypal_payee_input import PayPalPayeeInput
class PayPalPurchaseUnitInput:
def __init__(self, amount: MonetaryAmountInput | None = None, payee: PayPalPayeeInput | None = None) -> None: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder(amount: MonetaryAmountInput) -> Builder: ...
class Builder:
def __init__(self, amount: MonetaryAmountInput) -> None: ...
def payee(self, payee: PayPalPayeeInput) -> Self: ...
def build(self) -> PayPalPurchaseUnitInput: ...
@@ -1,14 +1,17 @@
from _typeshed import Incomplete
from typing_extensions import Self
class PhoneInput:
def __init__(
self, country_phone_code: str | None = None, phone_number: str | None = None, extension_number: str | None = None
) -> None: ...
def to_graphql_variables(self): ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder(): ...
def builder() -> Builder: ...
class Builder:
def __init__(self) -> None: ...
def country_phone_code(self, country_phone_code: str): ...
def phone_number(self, phone_number: str): ...
def extension_number(self, extension_number: str): ...
def build(self): ...
def country_phone_code(self, country_phone_code: str) -> Self: ...
def phone_number(self, phone_number: str) -> Self: ...
def extension_number(self, extension_number: str) -> Self: ...
def build(self) -> PhoneInput: ...
@@ -1,17 +1,24 @@
from _typeshed import Incomplete
from typing_extensions import Self
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput
class UpdateCustomerSessionInput:
def __init__(
self, session_id: str, merchant_account_id: str | None = None, customer: CustomerSessionInput | None = None
self,
session_id: str,
customer: CustomerSessionInput | None = None,
merchant_account_id: str | None = None,
purchase_units: list[PayPalPurchaseUnitInput] | None = None,
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
@staticmethod
def builder(session_id: str): ...
def builder(session_id: str) -> Builder: ...
class Builder:
def __init__(self, session_id: str) -> None: ...
def merchant_account_id(self, merchant_account_id): ...
def customer(self, customer): ...
def build(self): ...
def merchant_account_id(self, merchant_account_id: str) -> Self: ...
def customer(self, customer: CustomerSessionInput) -> Self: ...
def purchase_units(self, purchase_units: list[PayPalPurchaseUnitInput]) -> Self: ...
def build(self) -> UpdateCustomerSessionInput: ...
@@ -2,3 +2,4 @@ from braintree.graphql.types.customer_recommendations_payload import (
CustomerRecommendationsPayload as CustomerRecommendationsPayload,
)
from braintree.graphql.types.payment_options import PaymentOptions as PaymentOptions
from braintree.graphql.types.payment_recommendation import PaymentRecommendation as PaymentRecommendation
@@ -1,8 +1,13 @@
from _typeshed import Incomplete
from typing import Any
from braintree.graphql.unions.customer_recommendations import CustomerRecommendations
class CustomerRecommendationsPayload:
is_in_paypal_network: Incomplete
recommendations: Incomplete
def __init__(self, is_in_paypal_network: bool, recommendations: CustomerRecommendations) -> None: ...
is_in_paypal_network: bool | None
recommendations: CustomerRecommendations | None
def __init__(
self,
is_in_paypal_network: bool | None = None,
recommendations: CustomerRecommendations | None = None,
response: dict[str, Any] | None = None,
): ...
@@ -1,8 +1,6 @@
from _typeshed import Incomplete
from braintree.graphql.enums import RecommendedPaymentOption
class PaymentOptions:
payment_option: Incomplete
recommended_priority: Incomplete
payment_option: RecommendedPaymentOption
recommended_priority: int
def __init__(self, payment_option: RecommendedPaymentOption, recommended_priority: int) -> None: ...
@@ -0,0 +1,6 @@
from braintree.graphql.enums import RecommendedPaymentOption
class PaymentRecommendation:
payment_option: RecommendedPaymentOption
recommended_priority: int
def __init__(self, payment_option: RecommendedPaymentOption, recommended_priority: int) -> None: ...
@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from braintree.graphql.types.payment_options import PaymentOptions
from braintree.graphql.types.payment_recommendation import PaymentRecommendation
class CustomerRecommendations:
payment_options: Incomplete
def __init__(self, payment_options: list[PaymentOptions]) -> None: ...
payment_options: list[PaymentOptions]
payment_recommendations: list[PaymentRecommendation]
def __init__(self, payment_recommendations: list[PaymentRecommendation] | None = None) -> None: ...
@@ -2,6 +2,6 @@ from decimal import Decimal
from braintree.attribute_getter import AttributeGetter
class MontaryAmount(AttributeGetter):
class MonetaryAmount(AttributeGetter):
value: Decimal
def __init__(self, attributes) -> None: ...
@@ -2,13 +2,17 @@ from typing import Final
class CreditCardNumbers:
class CardTypeIndicators:
Business: Final = "4229989800000003"
Commercial: Final = "4111111111131010"
Consumer: Final = "4229989700000004"
Corporate: Final = "4229989100000000"
DurbinRegulated: Final = "4111161010101010"
Debit: Final = "4117101010101010"
Healthcare: Final = "4111111510101010"
Payroll: Final = "4111111114101010"
Prepaid: Final = "4111111111111210"
PrepaidReloadable: Final = "4229989900000002"
Purchase: Final = "4229989500000006"
IssuingBank: Final = "4111111141010101"
CountryOfIssuance: Final = "4111111111121102"
No: Final = "4111111111310101"
@@ -56,7 +56,10 @@ class Nonces:
ThreeDSecureVisaUnavailable: Final = "fake-three-d-secure-visa-unavailable-nonce"
Transactable: Final = "fake-valid-nonce"
TransactableAmEx: Final = "fake-valid-amex-nonce"
TransactableBusiness: Final = "fake-valid-business-nonce"
TransactableCommercial: Final = "fake-valid-commercial-nonce"
TransactableConsumer: Final = "fake-valid-consumer-nonce"
TransactableCorporate: Final = "fake-valid-corporate-nonce"
TransactableCountryOfIssuanceCAD: Final = "fake-valid-country-of-issuance-cad-nonce"
TransactableCountryOfIssuanceUSA: Final = "fake-valid-country-of-issuance-usa-nonce"
TransactableDebit: Final = "fake-valid-debit-nonce"
@@ -73,6 +76,7 @@ class Nonces:
TransactablePinlessDebitVisa: Final = "fake-pinless-debit-visa-nonce"
TransactablePrepaid: Final = "fake-valid-prepaid-nonce"
TransactablePrepaidReloadable: Final = "fake-valid-prepaid-reloadable-nonce"
TransactablePurchase: Final = "fake-valid-purchase-nonce"
TransactableUnknownIndicators: Final = "fake-valid-unknown-indicators-nonce"
TransactableVisa: Final = "fake-valid-visa-nonce"
VenmoAccount: Final = "fake-venmo-account-nonce"
@@ -1,5 +1,6 @@
from braintree.util.constants import Constants as Constants
from braintree.util.crypto import Crypto as Crypto
from braintree.util.experimental import Experimental as Experimental
from braintree.util.generator import Generator as Generator
from braintree.util.graphql_client import GraphQLClient as GraphQLClient
from braintree.util.http import Http as Http
@@ -0,0 +1,5 @@
from typing import TypeVar
_T = TypeVar("_T")
def Experimental(cls: _T) -> _T: ...