Skip to content

Commit 9090806

Browse files
authored
Bump braintree to 4.36.* (python#14192)
1 parent ee696d5 commit 9090806

24 files changed

+147
-51
lines changed

stubs/braintree/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "4.35.*"
1+
version = "4.36.*"
22
upstream_repository = "https://github.com/braintree/braintree_python"

stubs/braintree/braintree/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ from braintree.local_payment_reversed import LocalPaymentReversed as LocalPaymen
4646
from braintree.merchant import Merchant as Merchant
4747
from braintree.merchant_account import MerchantAccount as MerchantAccount
4848
from braintree.merchant_account_gateway import MerchantAccountGateway as MerchantAccountGateway
49+
from braintree.monetary_amount import MonetaryAmount as MonetaryAmount
4950
from braintree.oauth_access_revocation import OAuthAccessRevocation as OAuthAccessRevocation
5051
from braintree.partner_merchant import PartnerMerchant as PartnerMerchant
5152
from braintree.payment_facilitator import PaymentFacilitator as PaymentFacilitator

stubs/braintree/braintree/credit_card.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ class CreditCard(Resource):
5959
Prepaid: type[CardTypeIndicator]
6060
ProductId: type[CardTypeIndicator]
6161
PrepaidReloadable: type[CardTypeIndicator]
62+
Business: type[CardTypeIndicator]
63+
Consumer: type[CardTypeIndicator]
64+
Corporate: type[CardTypeIndicator]
65+
Purchase: type[CardTypeIndicator]
6266
@staticmethod
6367
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
6468
@staticmethod

stubs/braintree/braintree/customer_session_gateway.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class CustomerSessionGateway:
1313
self, update_customer_session_input: UpdateCustomerSessionInput
1414
) -> SuccessfulResult | ErrorResult: ...
1515
def get_customer_recommendations(
16-
self, customer_recommendations_input: CustomerRecommendationsInput
16+
self, get_customer_recommendations_input: CustomerRecommendationsInput
1717
) -> SuccessfulResult | ErrorResult: ...

stubs/braintree/braintree/graphql/__init__.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ from braintree.graphql.inputs import (
33
CreateCustomerSessionInput as CreateCustomerSessionInput,
44
CustomerRecommendationsInput as CustomerRecommendationsInput,
55
CustomerSessionInput as CustomerSessionInput,
6+
MonetaryAmountInput as MonetaryAmountInput,
7+
PayPalPayeeInput as PayPalPayeeInput,
8+
PayPalPurchaseUnitInput as PayPalPurchaseUnitInput,
69
PhoneInput as PhoneInput,
710
UpdateCustomerSessionInput as UpdateCustomerSessionInput,
811
)
912
from braintree.graphql.types import (
1013
CustomerRecommendationsPayload as CustomerRecommendationsPayload,
1114
PaymentOptions as PaymentOptions,
15+
PaymentRecommendation as PaymentRecommendation,
1216
)
1317
from braintree.graphql.unions import CustomerRecommendations as CustomerRecommendations
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from braintree.graphql.inputs.create_customer_session_input import CreateCustomerSessionInput as CreateCustomerSessionInput
22
from braintree.graphql.inputs.customer_recommendations_input import CustomerRecommendationsInput as CustomerRecommendationsInput
33
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput as CustomerSessionInput
4+
from braintree.graphql.inputs.monetary_amount_input import MonetaryAmountInput as MonetaryAmountInput
5+
from braintree.graphql.inputs.paypal_payee_input import PayPalPayeeInput as PayPalPayeeInput
6+
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput as PayPalPurchaseUnitInput
47
from braintree.graphql.inputs.phone_input import PhoneInput as PhoneInput
58
from braintree.graphql.inputs.update_customer_session_input import UpdateCustomerSessionInput as UpdateCustomerSessionInput
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from _typeshed import Incomplete
2+
from typing_extensions import Self
23

34
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
5+
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput
46

57
class CreateCustomerSessionInput:
68
def __init__(
@@ -9,15 +11,17 @@ class CreateCustomerSessionInput:
911
session_id: str | None = None,
1012
customer: CustomerSessionInput | None = None,
1113
domain: str | None = None,
14+
purchase_units: list[PayPalPurchaseUnitInput] | None = None,
1215
) -> None: ...
13-
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
16+
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
1417
@staticmethod
15-
def builder(): ...
18+
def builder() -> Builder: ...
1619

1720
class Builder:
1821
def __init__(self) -> None: ...
19-
def merchant_account_id(self, merchant_account_id: str): ...
20-
def session_id(self, session_id: str): ...
21-
def customer(self, customer: str): ...
22-
def domain(self, domain: str): ...
23-
def build(self): ...
22+
def merchant_account_id(self, merchant_account_id: str) -> Self: ...
23+
def session_id(self, session_id: str) -> Self: ...
24+
def customer(self, customer: CustomerSessionInput) -> Self: ...
25+
def purchase_units(self, purchase_units: list[PayPalPurchaseUnitInput]) -> Self: ...
26+
def domain(self, domain: str) -> Self: ...
27+
def build(self) -> CreateCustomerSessionInput: ...
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
from _typeshed import Incomplete
2+
from typing_extensions import Self
23

3-
from braintree.graphql.enums.recommendations import Recommendations
44
from braintree.graphql.inputs.customer_session_input import CustomerSessionInput
5+
from braintree.graphql.inputs.paypal_purchase_unit_input import PayPalPurchaseUnitInput
56

67
class CustomerRecommendationsInput:
78
def __init__(
89
self,
910
session_id: str,
10-
recommendations: list[Recommendations],
1111
merchant_account_id: str | None = None,
12+
purchase_units: list[PayPalPurchaseUnitInput] | None = None,
13+
domain: str | None = None,
1214
customer: CustomerSessionInput | None = None,
1315
) -> None: ...
14-
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
16+
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
1517
@staticmethod
16-
def builder(session_id: str, recommendations: list[Recommendations]): ...
18+
def builder() -> Builder: ...
1719

1820
class Builder:
19-
def __init__(self, session_id: str, recommendations: list[Recommendations]) -> None: ...
20-
def merchant_account_id(self, merchant_account_id: str): ...
21-
def customer(self, customer: CustomerSessionInput): ...
22-
def build(self): ...
21+
def __init__(self) -> None: ...
22+
def session_id(self, session_id: str) -> Self: ...
23+
def merchant_account_id(self, merchant_account_id: str) -> Self: ...
24+
def customer(self, customer: CustomerSessionInput) -> Self: ...
25+
def purchase_units(self, purchase_units: list[PayPalPurchaseUnitInput]) -> Self: ...
26+
def domain(self, domain: str) -> Self: ...
27+
def build(self) -> CustomerRecommendationsInput: ...
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
from _typeshed import Incomplete
2+
from typing_extensions import Self
23

34
from braintree.graphql.inputs.phone_input import PhoneInput
45

56
class CustomerSessionInput:
67
def __init__(
78
self,
89
email: str | None = None,
10+
hashed_email: str | None = None,
911
phone: PhoneInput | None = None,
12+
hashed_phone_number: str | None = None,
1013
device_fingerprint_id: str | None = None,
1114
paypal_app_installed: bool | None = None,
1215
venmo_app_installed: bool | None = None,
1316
user_agent: str | None = None,
1417
) -> None: ...
15-
def to_graphql_variables(self) -> dict[Incomplete, Incomplete]: ...
18+
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
1619
@staticmethod
17-
def builder(): ...
20+
def builder() -> Builder: ...
1821

1922
class Builder:
2023
def __init__(self) -> None: ...
21-
def email(self, email: str): ...
22-
def phone(self, phone: PhoneInput): ...
23-
def device_fingerprint_id(self, device_fingerprint_id: str): ...
24-
def paypal_app_installed(self, paypal_app_installed: bool): ...
25-
def venmo_app_installed(self, venmo_app_installed: bool): ...
26-
def user_agent(self, user_agent: str): ...
27-
def build(self): ...
24+
def email(self, email: str) -> Self: ...
25+
def hashed_email(self, hashed_email: str) -> Self: ...
26+
def phone(self, phone: PhoneInput) -> Self: ...
27+
def hashed_phone_number(self, hashed_phone_number: str) -> Self: ...
28+
def device_fingerprint_id(self, device_fingerprint_id: str) -> Self: ...
29+
def paypal_app_installed(self, paypal_app_installed: bool) -> Self: ...
30+
def venmo_app_installed(self, venmo_app_installed: bool) -> Self: ...
31+
def user_agent(self, user_agent: str) -> Self: ...
32+
def build(self) -> CustomerSessionInput: ...
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from _typeshed import Incomplete
2+
from decimal import Decimal
3+
4+
class MonetaryAmountInput:
5+
def __init__(self, value: Decimal | None = None, currency_code: str | None = None) -> None: ...
6+
def to_graphql_variables(self) -> dict[str, Incomplete]: ...

0 commit comments

Comments
 (0)