Bump braintree to 4.33.* (#13511)

This commit is contained in:
Danny Yang
2025-02-18 10:38:37 -05:00
committed by GitHub
parent 4050dd42ef
commit d547f025b5
18 changed files with 186 additions and 1 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
version = "4.32.*"
version = "4.33.*"
upstream_repository = "https://github.com/braintree/braintree_python"
@@ -0,0 +1,17 @@
from _typeshed import Incomplete
from braintree.error_result import ErrorResult
from braintree.graphql import CreateCustomerSessionInput, CustomerRecommendationsInput, UpdateCustomerSessionInput
from braintree.successful_result import SuccessfulResult
class CustomerSessionGateway:
gateway: Incomplete
graphql_client: Incomplete
def __init__(self, gateway) -> None: ...
def create_customer_session(self, customer_session_input: CreateCustomerSessionInput) -> SuccessfulResult | ErrorResult: ...
def update_customer_session(
self, update_customer_session_input: UpdateCustomerSessionInput
) -> SuccessfulResult | ErrorResult: ...
def get_customer_recommendations(
self, customer_recommendations_input: CustomerRecommendationsInput
) -> SuccessfulResult | ErrorResult: ...
@@ -0,0 +1,13 @@
from braintree.graphql.enums import Recommendations as Recommendations, RecommendedPaymentOption as RecommendedPaymentOption
from braintree.graphql.inputs import (
CreateCustomerSessionInput as CreateCustomerSessionInput,
CustomerRecommendationsInput as CustomerRecommendationsInput,
CustomerSessionInput as CustomerSessionInput,
PhoneInput as PhoneInput,
UpdateCustomerSessionInput as UpdateCustomerSessionInput,
)
from braintree.graphql.types import (
CustomerRecommendationsPayload as CustomerRecommendationsPayload,
PaymentOptions as PaymentOptions,
)
from braintree.graphql.unions import CustomerRecommendations as CustomerRecommendations
@@ -0,0 +1,2 @@
from braintree.graphql.enums.recommendations import Recommendations as Recommendations
from braintree.graphql.enums.recommended_payment_option import RecommendedPaymentOption as RecommendedPaymentOption
@@ -0,0 +1,4 @@
from enum import Enum
class Recommendations(Enum):
PAYMENT_RECOMMENDATIONS = "PAYMENT_RECOMMENDATIONS"
@@ -0,0 +1,5 @@
from enum import Enum
class RecommendedPaymentOption(Enum):
PAYPAL = "PAYPAL"
VENMO = "VENMO"
@@ -0,0 +1,5 @@
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.phone_input import PhoneInput as PhoneInput
from braintree.graphql.inputs.update_customer_session_input import UpdateCustomerSessionInput as UpdateCustomerSessionInput
@@ -0,0 +1,23 @@
from _typeshed import Incomplete
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
class CreateCustomerSessionInput:
def __init__(
self,
merchant_account_id: str | None = None,
session_id: str | None = None,
customer: CustomerSessionInput | None = None,
domain: str | None = None,
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
@staticmethod
def 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): ...
@@ -0,0 +1,22 @@
from _typeshed import Incomplete
from braintree.graphql.enums.recommendations import Recommendations
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
class CustomerRecommendationsInput:
def __init__(
self,
session_id: str,
recommendations: list[Recommendations],
merchant_account_id: str | None = None,
customer: CustomerSessionInput | None = None,
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
@staticmethod
def builder(session_id: str, recommendations: list[Recommendations]): ...
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): ...
@@ -0,0 +1,27 @@
from _typeshed import Incomplete
from braintree.graphql.inputs.phone_input import PhoneInput
class CustomerSessionInput:
def __init__(
self,
email: str | None = None,
phone: PhoneInput | 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]: ...
@staticmethod
def 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): ...
@@ -0,0 +1,14 @@
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): ...
@staticmethod
def 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): ...
@@ -0,0 +1,17 @@
from _typeshed import Incomplete
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
class UpdateCustomerSessionInput:
def __init__(
self, session_id: str, merchant_account_id: str | None = None, customer: CustomerSessionInput | None = None
) -> None: ...
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
@staticmethod
def builder(session_id: str): ...
class Builder:
def __init__(self, session_id: str) -> None: ...
def merchant_account_id(self, merchant_account_id): ...
def customer(self, customer): ...
def build(self): ...
@@ -0,0 +1,4 @@
from braintree.graphql.types.customer_recommendations_payload import (
CustomerRecommendationsPayload as CustomerRecommendationsPayload,
)
from braintree.graphql.types.payment_options import PaymentOptions as PaymentOptions
@@ -0,0 +1,8 @@
from _typeshed import Incomplete
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: ...
@@ -0,0 +1,8 @@
from _typeshed import Incomplete
from braintree.graphql.enums import RecommendedPaymentOption
class PaymentOptions:
payment_option: Incomplete
recommended_priority: Incomplete
def __init__(self, payment_option: RecommendedPaymentOption, recommended_priority: int) -> None: ...
@@ -0,0 +1 @@
from braintree.graphql.unions.customer_recommendations import CustomerRecommendations as CustomerRecommendations
@@ -0,0 +1,7 @@
from _typeshed import Incomplete
from braintree.graphql.types.payment_options import PaymentOptions
class CustomerRecommendations:
payment_options: Incomplete
def __init__(self, payment_options: list[PaymentOptions]) -> None: ...
@@ -1,10 +1,18 @@
from _typeshed import Incomplete
from typing import TypedDict
from braintree.util.http import Http
class _ValidationErrors(TypedDict):
errors: Incomplete
class GraphQLClient(Http):
@staticmethod
def raise_exception_for_graphql_error(response) -> None: ...
graphql_headers: dict[str, str]
def __init__(self, config: Incomplete | None = None, environment: Incomplete | None = None) -> None: ...
def query(self, definition, variables: Incomplete | None = None, operation_name: Incomplete | None = None): ...
@staticmethod
def get_validation_errors(response) -> _ValidationErrors | None: ...
@staticmethod
def get_validation_error_code(error) -> Incomplete | None: ...