mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-08 22:36:18 +08:00
Improve braintree (#13862)
This commit is contained in:
@@ -7,6 +7,7 @@ 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.blik_alias import BlikAlias as BlikAlias
|
||||
from braintree.braintree_gateway import BraintreeGateway as BraintreeGateway
|
||||
from braintree.client_token import ClientToken as ClientToken
|
||||
from braintree.configuration import Configuration as Configuration
|
||||
@@ -32,11 +33,14 @@ from braintree.dispute import Dispute as Dispute
|
||||
from braintree.dispute_search import DisputeSearch as DisputeSearch
|
||||
from braintree.document_upload import DocumentUpload as DocumentUpload
|
||||
from braintree.document_upload_gateway import DocumentUploadGateway as DocumentUploadGateway
|
||||
from braintree.enriched_customer_data import EnrichedCustomerData as EnrichedCustomerData
|
||||
from braintree.environment import Environment as Environment
|
||||
from braintree.error_codes import ErrorCodes as ErrorCodes
|
||||
from braintree.error_result import ErrorResult as ErrorResult
|
||||
from braintree.errors import Errors as Errors
|
||||
from braintree.europe_bank_account import EuropeBankAccount as EuropeBankAccount
|
||||
from braintree.graphql import *
|
||||
from braintree.liability_shift import LiabilityShift as LiabilityShift
|
||||
from braintree.local_payment_completed import LocalPaymentCompleted as LocalPaymentCompleted
|
||||
from braintree.local_payment_reversed import LocalPaymentReversed as LocalPaymentReversed
|
||||
from braintree.merchant import Merchant as Merchant
|
||||
@@ -46,6 +50,9 @@ from braintree.oauth_access_revocation import OAuthAccessRevocation as OAuthAcce
|
||||
from braintree.partner_merchant import PartnerMerchant as PartnerMerchant
|
||||
from braintree.payment_instrument_type import PaymentInstrumentType as PaymentInstrumentType
|
||||
from braintree.payment_method import PaymentMethod as PaymentMethod
|
||||
from braintree.payment_method_customer_data_updated_metadata import (
|
||||
PaymentMethodCustomerDataUpdatedMetadata as PaymentMethodCustomerDataUpdatedMetadata,
|
||||
)
|
||||
from braintree.payment_method_nonce import PaymentMethodNonce as PaymentMethodNonce
|
||||
from braintree.payment_method_parser import parse_payment_method as parse_payment_method
|
||||
from braintree.paypal_account import PayPalAccount as PayPalAccount
|
||||
@@ -57,6 +64,7 @@ from braintree.resource_collection import ResourceCollection as ResourceCollecti
|
||||
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.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
|
||||
from braintree.status_event import StatusEvent as StatusEvent
|
||||
@@ -77,6 +85,7 @@ from braintree.unknown_payment_method import UnknownPaymentMethod as UnknownPaym
|
||||
from braintree.us_bank_account import UsBankAccount as UsBankAccount
|
||||
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
|
||||
from braintree.version import Version as Version
|
||||
from braintree.webhook_notification import WebhookNotification as WebhookNotification
|
||||
from braintree.webhook_notification_gateway import WebhookNotificationGateway as WebhookNotificationGateway
|
||||
|
||||
@@ -2,4 +2,4 @@ from braintree.modification import Modification
|
||||
|
||||
class AddOn(Modification):
|
||||
@staticmethod
|
||||
def all(): ...
|
||||
def all() -> list[AddOn]: ...
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.add_on import AddOn
|
||||
|
||||
class AddOnGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def all(self): ...
|
||||
def all(self) -> list[AddOn]: ...
|
||||
|
||||
@@ -14,14 +14,14 @@ class Address(Resource):
|
||||
PickupInStore: Final = "pickup_in_store"
|
||||
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params: dict[str, Incomplete] | None = None): ...
|
||||
@staticmethod
|
||||
def delete(customer_id, address_id): ...
|
||||
def delete(customer_id: str, address_id: str): ...
|
||||
@staticmethod
|
||||
def find(customer_id, address_id): ...
|
||||
def find(customer_id: str, address_id: str): ...
|
||||
@staticmethod
|
||||
def update(customer_id, address_id, params: Incomplete | None = None): ...
|
||||
def update(customer_id: str, address_id: str, params: dict[str, Incomplete] | None = None): ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def create_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
@staticmethod
|
||||
def update_signature(): ...
|
||||
def update_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.address import Address
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class AddressGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def delete(self, customer_id, address_id): ...
|
||||
def find(self, customer_id, address_id): ...
|
||||
def update(self, customer_id, address_id, params: Incomplete | None = None): ...
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def delete(self, customer_id: str, address_id: str) -> SuccessfulResult: ...
|
||||
def find(self, customer_id: str, address_id: str) -> Address: ...
|
||||
def update(
|
||||
self, customer_id: str, address_id: str, params: dict[str, Incomplete] | None = None
|
||||
) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -14,8 +14,8 @@ class AndroidPayCard(Resource):
|
||||
@property
|
||||
def card_type(self): ...
|
||||
@staticmethod
|
||||
def signature(): ...
|
||||
def signature() -> list[str | dict[str, list[str]]]: ...
|
||||
@staticmethod
|
||||
def card_signature(): ...
|
||||
def card_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
@staticmethod
|
||||
def network_token_signature(): ...
|
||||
def network_token_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
|
||||
@@ -16,4 +16,4 @@ class ApplePayCard(Resource):
|
||||
@property
|
||||
def expiration_date(self): ...
|
||||
@staticmethod
|
||||
def signature(): ...
|
||||
def signature() -> list[str | dict[str, list[str]]]: ...
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class ApplePayGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def register_domain(self, domain): ...
|
||||
def unregister_domain(self, domain): ...
|
||||
def register_domain(self, domain: str) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def unregister_domain(self, domain: str) -> SuccessfulResult: ...
|
||||
def registered_domains(self): ...
|
||||
|
||||
@@ -4,4 +4,4 @@ class ClientToken:
|
||||
@staticmethod
|
||||
def generate(params: Incomplete | None = None, gateway: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
def generate_signature(): ...
|
||||
def generate_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
|
||||
@@ -1,45 +1,69 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.braintree_gateway import BraintreeGateway
|
||||
from braintree.util.graphql_client import GraphQLClient
|
||||
from braintree.util.http import Http
|
||||
|
||||
class Configuration:
|
||||
@staticmethod
|
||||
def configure(environment, merchant_id, public_key, private_key, **kwargs) -> None: ...
|
||||
def configure(
|
||||
environment,
|
||||
merchant_id: str,
|
||||
public_key: str,
|
||||
private_key: str,
|
||||
*,
|
||||
http_strategy: Incomplete | None = None,
|
||||
timeout: int = 60,
|
||||
wrap_http_exceptions: bool = False,
|
||||
) -> None: ...
|
||||
@staticmethod
|
||||
def for_partner(environment, partner_id, public_key, private_key, **kwargs): ...
|
||||
def for_partner(
|
||||
environment,
|
||||
partner_id: str,
|
||||
public_key: str,
|
||||
private_key: str,
|
||||
*,
|
||||
http_strategy: Incomplete | None = None,
|
||||
timeout: int = 60,
|
||||
wrap_http_exceptions: bool = False,
|
||||
) -> Configuration: ...
|
||||
@staticmethod
|
||||
def gateway(): ...
|
||||
def gateway() -> BraintreeGateway: ...
|
||||
@staticmethod
|
||||
def instantiate(): ...
|
||||
def instantiate() -> Configuration: ...
|
||||
@staticmethod
|
||||
def api_version(): ...
|
||||
def api_version() -> str: ...
|
||||
@staticmethod
|
||||
def graphql_api_version(): ...
|
||||
def graphql_api_version() -> str: ...
|
||||
environment: Incomplete
|
||||
merchant_id: Incomplete
|
||||
public_key: Incomplete
|
||||
private_key: Incomplete
|
||||
client_id: Incomplete
|
||||
client_secret: Incomplete
|
||||
access_token: Incomplete
|
||||
timeout: Incomplete
|
||||
wrap_http_exceptions: Incomplete
|
||||
merchant_id: str | None
|
||||
public_key: str | None
|
||||
private_key: str | None
|
||||
client_id: str | None
|
||||
client_secret: str | None
|
||||
access_token: str | None
|
||||
timeout: int
|
||||
wrap_http_exceptions: bool
|
||||
def __init__(
|
||||
self,
|
||||
environment: Incomplete | None = None,
|
||||
merchant_id: Incomplete | None = None,
|
||||
public_key: Incomplete | None = None,
|
||||
private_key: Incomplete | None = None,
|
||||
client_id: Incomplete | None = None,
|
||||
client_secret: Incomplete | None = None,
|
||||
access_token: Incomplete | None = None,
|
||||
merchant_id: str | None = None,
|
||||
public_key: str | None = None,
|
||||
private_key: str | None = None,
|
||||
client_id: str | None = None,
|
||||
client_secret: str | None = None,
|
||||
access_token: str | None = None,
|
||||
*args,
|
||||
**kwargs,
|
||||
timeout: int = 60,
|
||||
wrap_http_exceptions: bool = False,
|
||||
http_strategy: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def base_merchant_path(self): ...
|
||||
def base_url(self): ...
|
||||
def graphql_base_url(self): ...
|
||||
def http(self): ...
|
||||
def graphql_client(self): ...
|
||||
def base_merchant_path(self) -> str: ...
|
||||
def base_url(self) -> str: ...
|
||||
def graphql_base_url(self) -> str: ...
|
||||
def http(self) -> Http: ...
|
||||
def graphql_client(self) -> GraphQLClient: ...
|
||||
def http_strategy(self): ...
|
||||
def has_client_credentials(self): ...
|
||||
def has_client_credentials(self) -> bool: ...
|
||||
def assert_has_client_credentials(self) -> None: ...
|
||||
def has_access_token(self): ...
|
||||
def has_access_token(self) -> bool: ...
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
from _typeshed import Incomplete
|
||||
from braintree.environment import Environment
|
||||
|
||||
class CredentialsParser:
|
||||
client_id: Incomplete
|
||||
client_secret: Incomplete
|
||||
access_token: Incomplete
|
||||
client_id: str | None
|
||||
client_secret: str | None
|
||||
access_token: str | None
|
||||
environment: Environment | None
|
||||
merchant_id: str
|
||||
def __init__(
|
||||
self, client_id: Incomplete | None = None, client_secret: Incomplete | None = None, access_token: Incomplete | None = None
|
||||
self, client_id: str | None = None, client_secret: str | None = None, access_token: str | None = None
|
||||
) -> None: ...
|
||||
environment: Incomplete
|
||||
def parse_client_credentials(self) -> None: ...
|
||||
merchant_id: Incomplete
|
||||
def parse_access_token(self) -> None: ...
|
||||
def get_environment(self, credential): ...
|
||||
def get_merchant_id(self, credential): ...
|
||||
def get_environment(self, credential: str) -> Environment | None: ...
|
||||
def get_merchant_id(self, credential: str) -> str: ...
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
from _typeshed import Incomplete
|
||||
from datetime import date, datetime
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
from typing import Final, Literal
|
||||
|
||||
from braintree.address import Address
|
||||
from braintree.credit_card_verification import CreditCardVerification
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.subscription import Subscription
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class CreditCard(Resource):
|
||||
class CardType:
|
||||
@@ -56,31 +60,33 @@ class CreditCard(Resource):
|
||||
ProductId: type[CardTypeIndicator]
|
||||
PrepaidReloadable: type[CardTypeIndicator]
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def update(credit_card_token, params: Incomplete | None = None): ...
|
||||
def update(credit_card_token: str, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def delete(credit_card_token): ...
|
||||
def delete(credit_card_token: str) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def expired(): ...
|
||||
def expired() -> ResourceCollection: ...
|
||||
@staticmethod
|
||||
def expiring_between(start_date, end_date): ...
|
||||
def expiring_between(start_date: date | datetime, end_date: date | datetime) -> ResourceCollection: ...
|
||||
@staticmethod
|
||||
def find(credit_card_token): ...
|
||||
def find(credit_card_token: str) -> CreditCard: ...
|
||||
@staticmethod
|
||||
def from_nonce(nonce): ...
|
||||
def from_nonce(nonce: str) -> CreditCard: ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def create_signature() -> list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str]]]]]: ...
|
||||
@staticmethod
|
||||
def update_signature(): ...
|
||||
def update_signature() -> list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str]]]]]: ...
|
||||
@staticmethod
|
||||
def signature(type): ...
|
||||
def signature(
|
||||
type: Literal["create", "update", "update_via_customer"],
|
||||
) -> list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str]]]]]: ...
|
||||
is_expired = expired
|
||||
billing_address: Address | None
|
||||
subscriptions: list[Subscription]
|
||||
verification: CreditCardVerification
|
||||
def __init__(self, gateway, attributes): ...
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@property
|
||||
def expiration_date(self): ...
|
||||
def expiration_date(self) -> str | None: ...
|
||||
@property
|
||||
def masked_number(self): ...
|
||||
def masked_number(self) -> str: ...
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, Unused
|
||||
from datetime import date, datetime
|
||||
from typing import NoReturn
|
||||
|
||||
from braintree.credit_card import CreditCard
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class CreditCardGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def delete(self, credit_card_token): ...
|
||||
def expired(self): ...
|
||||
def expiring_between(self, start_date, end_date): ...
|
||||
def find(self, credit_card_token): ...
|
||||
def forward(self, credit_card_token, receiving_merchant_id) -> None: ...
|
||||
def from_nonce(self, nonce): ...
|
||||
def update(self, credit_card_token, params: Incomplete | None = None): ...
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def delete(self, credit_card_token: str) -> SuccessfulResult: ...
|
||||
def expired(self) -> ResourceCollection: ...
|
||||
def expiring_between(self, start_date: date | datetime, end_date: date | datetime) -> ResourceCollection: ...
|
||||
def find(self, credit_card_token: str) -> CreditCard: ...
|
||||
def forward(self, credit_card_token: Unused, receiving_merchant_id: Unused) -> NoReturn: ...
|
||||
def from_nonce(self, nonce: str) -> CreditCard: ...
|
||||
def update(
|
||||
self, credit_card_token: str, params: dict[str, Incomplete] | None = None
|
||||
) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -3,7 +3,10 @@ from decimal import Decimal
|
||||
from typing import Final
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.risk_data import RiskData
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.three_d_secure_info import ThreeDSecureInfo
|
||||
|
||||
class CreditCardVerification(AttributeGetter):
|
||||
@@ -23,11 +26,11 @@ class CreditCardVerification(AttributeGetter):
|
||||
three_d_secure_info: ThreeDSecureInfo | None
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@staticmethod
|
||||
def find(verification_id): ...
|
||||
def find(verification_id: str) -> CreditCardVerification: ...
|
||||
@staticmethod
|
||||
def search(*query): ...
|
||||
def search(*query) -> ResourceCollection: ...
|
||||
@staticmethod
|
||||
def create(params): ...
|
||||
def create(params) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def __eq__(self, other): ...
|
||||
def create_signature() -> list[dict[str, list[str | dict[str, list[str]]]] | dict[str, list[str]] | str]: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.credit_card_verification import CreditCardVerification
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class CreditCardVerificationGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def find(self, verification_id): ...
|
||||
def search(self, *query): ...
|
||||
def create(self, params): ...
|
||||
def find(self, verification_id: str) -> CreditCardVerification: ...
|
||||
def search(self, *query) -> ResourceCollection: ...
|
||||
def create(self, params: dict[str, Incomplete] | None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -5,32 +5,51 @@ from braintree.amex_express_checkout_card import AmexExpressCheckoutCard
|
||||
from braintree.android_pay_card import AndroidPayCard
|
||||
from braintree.apple_pay_card import ApplePayCard
|
||||
from braintree.credit_card import CreditCard
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.europe_bank_account import EuropeBankAccount
|
||||
from braintree.masterpass_card import MasterpassCard
|
||||
from braintree.paypal_account import PayPalAccount
|
||||
from braintree.resource import Resource
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.samsung_pay_card import SamsungPayCard
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.us_bank_account import UsBankAccount
|
||||
from braintree.venmo_account import VenmoAccount
|
||||
from braintree.visa_checkout_card import VisaCheckoutCard
|
||||
|
||||
class Customer(Resource):
|
||||
@staticmethod
|
||||
def all(): ...
|
||||
def all() -> ResourceCollection: ...
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def delete(customer_id): ...
|
||||
def delete(customer_id: str) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def find(customer_id, association_filter_id: Incomplete | None = None): ...
|
||||
def find(customer_id: str, association_filter_id: str | None = None) -> Customer: ...
|
||||
@staticmethod
|
||||
def search(*query): ...
|
||||
def search(*query) -> ResourceCollection: ...
|
||||
@staticmethod
|
||||
def update(customer_id, params: Incomplete | None = None): ...
|
||||
def update(customer_id: str, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def create_signature() -> (
|
||||
list[
|
||||
str
|
||||
| dict[str, list[str]]
|
||||
| dict[str, list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str]]]]]]
|
||||
| dict[str, list[str | dict[str, list[str]]]]
|
||||
| dict[str, list[dict[str, list[str | dict[str, list[str | dict[str, list[str]]]]]]]]
|
||||
]
|
||||
): ...
|
||||
@staticmethod
|
||||
def update_signature(): ...
|
||||
def update_signature() -> (
|
||||
list[
|
||||
str
|
||||
| dict[str, list[str]]
|
||||
| dict[str, list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str]]]]]]
|
||||
| dict[str, list[str | dict[str, list[str]]]]
|
||||
| dict[str, list[dict[str, list[str | dict[str, list[str | dict[str, list[str]]]]]]]]
|
||||
]
|
||||
): ...
|
||||
payment_methods: list[Resource]
|
||||
credit_cards: list[CreditCard]
|
||||
addresses: list[Address]
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.customer import Customer
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class CustomerGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def all(self): ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def delete(self, customer_id): ...
|
||||
def find(self, customer_id, association_filter_id: Incomplete | None = None): ...
|
||||
def search(self, *query): ...
|
||||
def update(self, customer_id, params: Incomplete | None = None): ...
|
||||
def all(self) -> ResourceCollection: ...
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def delete(self, customer_id: str) -> SuccessfulResult: ...
|
||||
def find(self, customer_id: str, association_filter_id: str | None = None) -> Customer: ...
|
||||
def search(self, *query) -> ResourceCollection: ...
|
||||
def update(self, customer_id: str, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -13,5 +13,5 @@ class Disbursement(Resource):
|
||||
merchant_account: MerchantAccount
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
def transactions(self): ...
|
||||
def is_credit(self): ...
|
||||
def is_debit(self): ...
|
||||
def is_credit(self) -> bool: ...
|
||||
def is_debit(self) -> bool: ...
|
||||
|
||||
@@ -7,4 +7,4 @@ class DisbursementDetail(AttributeGetter):
|
||||
settlement_currency_exchange_rate: Decimal | None
|
||||
def __init__(self, attributes) -> None: ...
|
||||
@property
|
||||
def is_valid(self): ...
|
||||
def is_valid(self) -> bool: ...
|
||||
|
||||
@@ -2,4 +2,4 @@ from braintree.modification import Modification
|
||||
|
||||
class Discount(Modification):
|
||||
@staticmethod
|
||||
def all(): ...
|
||||
def all() -> list[Discount]: ...
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.discount import Discount
|
||||
|
||||
class DiscountGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def all(self): ...
|
||||
def all(self) -> list[Discount]: ...
|
||||
|
||||
@@ -4,6 +4,8 @@ from typing import Final
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
from braintree.dispute_details import DisputeEvidence, DisputePayPalMessage, DisputeStatusHistory
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.transaction_details import TransactionDetails
|
||||
|
||||
class Dispute(AttributeGetter):
|
||||
@@ -50,19 +52,19 @@ class Dispute(AttributeGetter):
|
||||
NoProtection: Final = "No Protection"
|
||||
|
||||
@staticmethod
|
||||
def accept(id): ...
|
||||
def accept(id: str) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def add_file_evidence(dispute_id, document_upload_id): ...
|
||||
def add_file_evidence(dispute_id: str, document_upload_id) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def add_text_evidence(id, content_or_request): ...
|
||||
def add_text_evidence(id: str, content_or_request) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def finalize(id): ...
|
||||
def finalize(id: str) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def find(id): ...
|
||||
def find(id: str) -> Dispute: ...
|
||||
@staticmethod
|
||||
def remove_evidence(id, evidence_id): ...
|
||||
def remove_evidence(id: str, evidence_id: str) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def search(*query): ...
|
||||
def search(*query) -> SuccessfulResult: ...
|
||||
amount: Decimal | None
|
||||
amount_disputed: Decimal | None
|
||||
amount_won: Decimal | None
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
|
||||
class DisputeEvidence(AttributeGetter):
|
||||
def __init__(self, attributes) -> None: ...
|
||||
def __init__(self, attributes: dict[str, Any] | None) -> None: ...
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
|
||||
class DisputePayPalMessage(AttributeGetter):
|
||||
def __init__(self, attributes) -> None: ...
|
||||
def __init__(self, attributes: dict[str, Any] | None) -> None: ...
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
|
||||
class DisputeStatusHistory(AttributeGetter):
|
||||
def __init__(self, attributes) -> None: ...
|
||||
def __init__(self, attributes: dict[str, Any] | None) -> None: ...
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.dispute import Dispute
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class DisputeGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def accept(self, dispute_id): ...
|
||||
def add_file_evidence(self, dispute_id, document_upload_id_or_request): ...
|
||||
def add_text_evidence(self, dispute_id, content_or_request): ...
|
||||
def finalize(self, dispute_id): ...
|
||||
def find(self, dispute_id): ...
|
||||
def remove_evidence(self, dispute_id, evidence_id): ...
|
||||
def accept(self, dispute_id: str) -> SuccessfulResult | ErrorResult: ...
|
||||
def add_file_evidence(self, dispute_id: str, document_upload_id_or_request) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def add_text_evidence(self, dispute_id: str, content_or_request) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def finalize(self, dispute_id: str) -> SuccessfulResult | ErrorResult: ...
|
||||
def find(self, dispute_id: str) -> Dispute: ...
|
||||
def remove_evidence(self, dispute_id: str, evidence_id: int) -> SuccessfulResult | ErrorResult: ...
|
||||
search_criteria: dict[Incomplete, Incomplete]
|
||||
def search(self, *query): ...
|
||||
def search(self, *query) -> SuccessfulResult: ...
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Final
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class DocumentUpload(Resource):
|
||||
class Kind:
|
||||
EvidenceDocument: Final = "evidence_document"
|
||||
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def create_signature() -> list[str]: ...
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class DocumentUploadGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Literal
|
||||
|
||||
from braintree.credit_card_verification import CreditCardVerification
|
||||
from braintree.errors import Errors
|
||||
@@ -14,6 +15,6 @@ class ErrorResult:
|
||||
transaction: Transaction
|
||||
subscription: Subscription
|
||||
merchant_account: Plan
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
def __init__(self, gateway, attributes: dict[str, Incomplete]) -> None: ...
|
||||
@property
|
||||
def is_success(self): ...
|
||||
def is_success(self) -> Literal[False]: ...
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.validation_error import ValidationError
|
||||
from braintree.validation_error_collection import ValidationErrorCollection
|
||||
|
||||
class Errors:
|
||||
errors: ValidationErrorCollection
|
||||
size = errors.deep_size
|
||||
def __init__(self, data) -> None: ...
|
||||
def __init__(self, data: dict[str, Incomplete]) -> None: ...
|
||||
@property
|
||||
def deep_errors(self): ...
|
||||
def for_object(self, key): ...
|
||||
def deep_errors(self) -> list[ValidationError]: ...
|
||||
def for_object(self, key: str) -> ValidationErrorCollection: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
@@ -8,4 +8,4 @@ class EuropeBankAccount(Resource):
|
||||
Consumer: Final = "consumer"
|
||||
|
||||
@staticmethod
|
||||
def signature(): ...
|
||||
def signature() -> list[str]: ...
|
||||
|
||||
@@ -8,6 +8,9 @@ from braintree.exceptions.not_found_error import NotFoundError as NotFoundError
|
||||
from braintree.exceptions.request_timeout_error import RequestTimeoutError as RequestTimeoutError
|
||||
from braintree.exceptions.server_error import ServerError as ServerError
|
||||
from braintree.exceptions.service_unavailable_error import ServiceUnavailableError as ServiceUnavailableError
|
||||
from braintree.exceptions.test_operation_performed_in_production_error import (
|
||||
TestOperationPerformedInProductionError as TestOperationPerformedInProductionError,
|
||||
)
|
||||
from braintree.exceptions.too_many_requests_error import TooManyRequestsError as TooManyRequestsError
|
||||
from braintree.exceptions.unexpected_error import UnexpectedError as UnexpectedError
|
||||
from braintree.exceptions.upgrade_required_error import UpgradeRequiredError as UpgradeRequiredError
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.exchange_rate_quote_payload import ExchangeRateQuotePayload
|
||||
from braintree.successful_result import 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): ...
|
||||
exchange_rate_quote_payload: ExchangeRateQuotePayload
|
||||
def generate(self, request) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -6,4 +6,4 @@ class ExchangeRateQuoteInput(AttributeGetter):
|
||||
parent: Incomplete
|
||||
def __init__(self, parent, attributes) -> None: ...
|
||||
def done(self): ...
|
||||
def to_graphql_variables(self): ...
|
||||
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Mapping
|
||||
|
||||
from braintree.exchange_rate_quote import ExchangeRateQuote
|
||||
|
||||
class ExchangeRateQuotePayload:
|
||||
quotes: Incomplete
|
||||
def __init__(self, data) -> None: ...
|
||||
def get_quotes(self): ...
|
||||
quotes: list[ExchangeRateQuote]
|
||||
def __init__(self, data: Mapping[str, Incomplete]) -> None: ...
|
||||
def get_quotes(self) -> list[ExchangeRateQuote]: ...
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.exchange_rate_quote_input import ExchangeRateQuoteInput
|
||||
|
||||
class ExchangeRateQuoteRequest:
|
||||
quotes: Incomplete
|
||||
quotes: list[ExchangeRateQuoteInput]
|
||||
def __init__(self) -> None: ...
|
||||
def add_exchange_rate_quote_input(self, attributes): ...
|
||||
def to_graphql_variables(self): ...
|
||||
def add_exchange_rate_quote_input(self, attributes) -> ExchangeRateQuoteInput: ...
|
||||
def to_graphql_variables(self) -> dict[str, Incomplete]: ...
|
||||
|
||||
@@ -7,6 +7,6 @@ class MasterpassCard(Resource):
|
||||
subscriptions: list[Subscription]
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@property
|
||||
def expiration_date(self): ...
|
||||
def expiration_date(self) -> str: ...
|
||||
@property
|
||||
def masked_number(self): ...
|
||||
def masked_number(self) -> str: ...
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.merchant_account import MerchantAccount
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class MerchantAccountGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def update(self, merchant_account_id, params: Incomplete | None = None): ...
|
||||
def find(self, merchant_account_id): ...
|
||||
def create_for_currency(self, params: Incomplete | None = None): ...
|
||||
def all(self): ...
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def update(
|
||||
self, merchant_account_id: str, params: dict[str, Incomplete] | None = None
|
||||
) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def find(self, merchant_account_id: str) -> MerchantAccount: ...
|
||||
def create_for_currency(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def all(self) -> SuccessfulResult: ...
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class MerchantGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params): ...
|
||||
def create(self, params: dict[str, Incomplete] | None) -> SuccessfulResult | ErrorResult: ...
|
||||
|
||||
@@ -3,6 +3,6 @@ from braintree.resource import Resource
|
||||
class MetaCheckoutCard(Resource):
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@property
|
||||
def expiration_date(self): ...
|
||||
def expiration_date(self) -> str | None: ...
|
||||
@property
|
||||
def masked_number(self): ...
|
||||
def masked_number(self) -> str: ...
|
||||
|
||||
@@ -3,6 +3,6 @@ from braintree.resource import Resource
|
||||
class MetaCheckoutToken(Resource):
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@property
|
||||
def expiration_date(self): ...
|
||||
def expiration_date(self) -> str | None: ...
|
||||
@property
|
||||
def masked_number(self): ...
|
||||
def masked_number(self) -> str: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from decimal import Decimal
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
|
||||
class MontaryAmount(AttributeGetter):
|
||||
value: Incomplete
|
||||
value: Decimal
|
||||
def __init__(self, attributes) -> None: ...
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class OAuthGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create_token_from_code(self, params): ...
|
||||
def create_token_from_refresh_token(self, params): ...
|
||||
def revoke_access_token(self, access_token): ...
|
||||
def connect_url(self, raw_params): ...
|
||||
def create_token_from_code(self, params: dict[str, Incomplete]) -> SuccessfulResult | ErrorResult: ...
|
||||
def create_token_from_refresh_token(self, params: dict[str, Incomplete]) -> SuccessfulResult | ErrorResult: ...
|
||||
def revoke_access_token(self, access_token: str) -> type[SuccessfulResult] | ErrorResult: ...
|
||||
def connect_url(self, raw_params: dict[str, Incomplete]) -> str: ...
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class PaymentMethod(Resource):
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def find(payment_method_token): ...
|
||||
def find(payment_method_token: str) -> Resource: ...
|
||||
@staticmethod
|
||||
def update(payment_method_token, params): ...
|
||||
def update(payment_method_token: str, params) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def delete(payment_method_token, options: Incomplete | None = None): ...
|
||||
def delete(payment_method_token: str, options: Incomplete | None = None) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def create_signature(): ...
|
||||
def create_signature() -> (
|
||||
list[
|
||||
str
|
||||
| dict[str, list[str | dict[str, list[str]]]]
|
||||
| dict[str, list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str | dict[str, list[str]]]]]]]]
|
||||
| dict[str, list[str]]
|
||||
]
|
||||
): ...
|
||||
@staticmethod
|
||||
def signature(type): ...
|
||||
def signature(
|
||||
type: str,
|
||||
) -> list[
|
||||
str
|
||||
| dict[str, list[str | dict[str, list[str]]]]
|
||||
| dict[str, list[str | dict[str, list[str]] | dict[str, list[str | dict[str, list[str | dict[str, list[str]]]]]]]]
|
||||
| dict[str, list[str]]
|
||||
]: ...
|
||||
@staticmethod
|
||||
def update_signature(): ...
|
||||
def update_signature() -> list[str | dict[str, list[str | dict[str, list[str]]]] | dict[str, list[str]]]: ...
|
||||
@staticmethod
|
||||
def delete_signature(): ...
|
||||
def delete_signature() -> list[str]: ...
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class PaymentMethodGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, params: Incomplete | None = None): ...
|
||||
def find(self, payment_method_token): ...
|
||||
def update(self, payment_method_token, params): ...
|
||||
def delete(self, payment_method_token, options: Incomplete | None = None): ...
|
||||
def create(self, params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
def find(self, payment_method_token: str) -> Resource: ...
|
||||
def update(self, payment_method_token: str, params) -> SuccessfulResult | ErrorResult: ...
|
||||
def delete(self, payment_method_token: str, options: Incomplete | None = None) -> SuccessfulResult: ...
|
||||
options: dict[str, Incomplete]
|
||||
def grant(self, payment_method_token, options: Incomplete | None = None): ...
|
||||
def revoke(self, payment_method_token): ...
|
||||
def grant(self, payment_method_token: str, options: Incomplete | None = None) -> SuccessfulResult | ErrorResult: ...
|
||||
def revoke(self, payment_method_token: str) -> SuccessfulResult | ErrorResult: ...
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.bin_data import BinData
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.three_d_secure_info import ThreeDSecureInfo
|
||||
|
||||
class PaymentMethodNonce(Resource):
|
||||
@staticmethod
|
||||
def create(payment_method_token, params={}): ...
|
||||
def create(payment_method_token: str, params={}) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def find(payment_method_nonce): ...
|
||||
def find(payment_method_nonce: str) -> PaymentMethodNonce: ...
|
||||
three_d_secure_info: ThreeDSecureInfo | None
|
||||
authentication_insight: Incomplete
|
||||
bin_data: BinData
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.payment_method_nonce import PaymentMethodNonce
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class PaymentMethodNonceGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def create(self, payment_method_token, params=...): ...
|
||||
def find(self, payment_method_nonce): ...
|
||||
def create(self, payment_method_token: str, params=...) -> SuccessfulResult | ErrorResult: ...
|
||||
def find(self, payment_method_nonce: str) -> PaymentMethodNonce: ...
|
||||
|
||||
@@ -1 +1,31 @@
|
||||
def parse_payment_method(gateway, attributes): ...
|
||||
from braintree.amex_express_checkout_card import AmexExpressCheckoutCard
|
||||
from braintree.android_pay_card import AndroidPayCard
|
||||
from braintree.apple_pay_card import ApplePayCard
|
||||
from braintree.credit_card import CreditCard
|
||||
from braintree.europe_bank_account import EuropeBankAccount
|
||||
from braintree.masterpass_card import MasterpassCard
|
||||
from braintree.paypal_account import PayPalAccount
|
||||
from braintree.samsung_pay_card import SamsungPayCard
|
||||
from braintree.sepa_direct_debit_account import SepaDirectDebitAccount
|
||||
from braintree.unknown_payment_method import UnknownPaymentMethod
|
||||
from braintree.us_bank_account import UsBankAccount
|
||||
from braintree.venmo_account import VenmoAccount
|
||||
from braintree.visa_checkout_card import VisaCheckoutCard
|
||||
|
||||
def parse_payment_method(
|
||||
gateway, attributes
|
||||
) -> (
|
||||
PayPalAccount
|
||||
| CreditCard
|
||||
| EuropeBankAccount
|
||||
| ApplePayCard
|
||||
| AndroidPayCard
|
||||
| AmexExpressCheckoutCard
|
||||
| SepaDirectDebitAccount
|
||||
| VenmoAccount
|
||||
| UsBankAccount
|
||||
| VisaCheckoutCard
|
||||
| MasterpassCard
|
||||
| SamsungPayCard
|
||||
| UnknownPaymentMethod
|
||||
): ...
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.subscription import Subscription
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class PayPalAccount(Resource):
|
||||
@staticmethod
|
||||
def find(paypal_account_token): ...
|
||||
def find(paypal_account_token: str) -> PayPalAccount | None: ...
|
||||
@staticmethod
|
||||
def delete(paypal_account_token): ...
|
||||
def delete(paypal_account_token: str) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def update(paypal_account_token, params: Incomplete | None = None): ...
|
||||
def update(paypal_account_token: str, params: Incomplete | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def signature(): ...
|
||||
def signature() -> list[str | dict[str, list[str]]]: ...
|
||||
subscriptions: list[Subscription]
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.paypal_account import PayPalAccount
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class PayPalAccountGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def find(self, paypal_account_token): ...
|
||||
def delete(self, paypal_account_token): ...
|
||||
def update(self, paypal_account_token, params: Incomplete | None = None): ...
|
||||
def find(self, paypal_account_token: str) -> PayPalAccount | None: ...
|
||||
def delete(self, paypal_account_token: str) -> SuccessfulResult: ...
|
||||
def update(self, paypal_account_token: str, params: Incomplete | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class PayPalPaymentResource(Resource):
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@staticmethod
|
||||
def update(request): ...
|
||||
def update(request) -> SuccessfulResult | ErrorResult: ...
|
||||
@staticmethod
|
||||
def update_signature() -> list[Incomplete]: ...
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from typing import Literal
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
|
||||
class SuccessfulResult(AttributeGetter):
|
||||
@property
|
||||
def is_success(self): ...
|
||||
def is_success(self) -> Literal[True]: ...
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.transaction_line_item import TransactionLineItem
|
||||
|
||||
class TransactionLineItemGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def find_all(self, transaction_id): ...
|
||||
def find_all(self, transaction_id: str) -> list[TransactionLineItem]: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from braintree.resource import Resource
|
||||
|
||||
class UnknownPaymentMethod(Resource):
|
||||
def image_url(self): ...
|
||||
def image_url(self) -> str: ...
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
from braintree.ach_mandate import AchMandate
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource import Resource
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.us_bank_account_verification import UsBankAccountVerification
|
||||
|
||||
class UsBankAccount(Resource):
|
||||
@staticmethod
|
||||
def find(token): ...
|
||||
def find(token: str) -> UsBankAccount | None: ...
|
||||
@staticmethod
|
||||
def sale(token, transactionRequest): ...
|
||||
def sale(token: str, transactionRequest) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def signature(): ...
|
||||
def signature() -> list[str]: ...
|
||||
ach_mandate: AchMandate | None
|
||||
verifications: list[UsBankAccountVerification]
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.us_bank_account import UsBankAccount
|
||||
|
||||
class UsBankAccountGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def find(self, us_bank_account_token): ...
|
||||
def find(self, us_bank_account_token: str) -> UsBankAccount | None: ...
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from typing import Final
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.us_bank_account import UsBankAccount
|
||||
|
||||
class UsBankAccountVerification(AttributeGetter):
|
||||
@@ -24,9 +27,9 @@ class UsBankAccountVerification(AttributeGetter):
|
||||
us_bank_account: UsBankAccount | None
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@staticmethod
|
||||
def confirm_micro_transfer_amounts(verification_id, amounts): ...
|
||||
def confirm_micro_transfer_amounts(verification_id: str, amounts) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def find(verification_id): ...
|
||||
def find(verification_id: str) -> UsBankAccountVerification: ...
|
||||
@staticmethod
|
||||
def search(*query): ...
|
||||
def __eq__(self, other): ...
|
||||
def search(*query) -> ResourceCollection: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.resource_collection import ResourceCollection
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
from braintree.us_bank_account_verification import UsBankAccountVerification
|
||||
|
||||
class UsBankAccountVerificationGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def confirm_micro_transfer_amounts(self, verification_id, amounts): ...
|
||||
def find(self, verification_id): ...
|
||||
def search(self, *query): ...
|
||||
def confirm_micro_transfer_amounts(self, verification_id: str, amounts) -> SuccessfulResult | ErrorResult | None: ...
|
||||
def find(self, verification_id: str) -> UsBankAccountVerification: ...
|
||||
def search(self, *query) -> ResourceCollection: ...
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
class Constants:
|
||||
@staticmethod
|
||||
def get_all_constant_values_from_class(klass): ...
|
||||
def get_all_enum_values(enum_class): ...
|
||||
def get_all_constant_values_from_class(klass: object) -> list[Any]: ... # Any taken from klass.__dict__
|
||||
def get_all_enum_values(enum_class) -> list[Incomplete]: ...
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Iterable
|
||||
from typing import Literal, overload
|
||||
|
||||
text_type = str
|
||||
|
||||
class Crypto:
|
||||
@staticmethod
|
||||
def sha1_hmac_hash(secret_key, content): ...
|
||||
def sha1_hmac_hash(secret_key: str | ReadableBuffer, content: str | ReadableBuffer | None) -> str: ...
|
||||
@staticmethod
|
||||
def sha256_hmac_hash(secret_key, content): ...
|
||||
def sha256_hmac_hash(secret_key: str | ReadableBuffer, content: str | ReadableBuffer | None) -> str: ...
|
||||
@overload
|
||||
@staticmethod
|
||||
def secure_compare(left, right): ...
|
||||
def secure_compare(left: None, right: Iterable[str | bytes | bytearray]) -> Literal[False]: ...
|
||||
@overload
|
||||
@staticmethod
|
||||
def secure_compare(left: Iterable[str | bytes | bytearray], right: None) -> Literal[False]: ...
|
||||
@overload
|
||||
@staticmethod
|
||||
def secure_compare(left: None, right: None) -> Literal[False]: ...
|
||||
@overload
|
||||
@staticmethod
|
||||
def secure_compare(left: Iterable[str | bytes | bytearray], right: Iterable[str | bytes | bytearray]) -> bool: ...
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
def parse_datetime(timestamp): ...
|
||||
from datetime import datetime
|
||||
|
||||
def parse_datetime(timestamp: str) -> datetime: ...
|
||||
|
||||
@@ -1,10 +1,27 @@
|
||||
from _typeshed import Incomplete
|
||||
import datetime
|
||||
import decimal
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
integer_types = int
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
|
||||
_XMLValue: TypeAlias = (
|
||||
str
|
||||
| bytes
|
||||
| int
|
||||
| bool
|
||||
| decimal.Decimal
|
||||
| Iterable[_XMLValue]
|
||||
| Mapping[str, _XMLValue]
|
||||
| datetime.datetime
|
||||
| datetime.date
|
||||
| None
|
||||
)
|
||||
_XML: TypeAlias = Mapping[str, _XMLValue]
|
||||
|
||||
class Generator:
|
||||
dict: dict[Incomplete, Incomplete]
|
||||
def __init__(self, dict) -> None: ...
|
||||
def generate(self): ...
|
||||
dict: _XML
|
||||
def __init__(self, dict: _XML) -> None: ...
|
||||
def generate(self) -> str: ...
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
from typing import TypedDict
|
||||
|
||||
from braintree.configuration import Configuration
|
||||
from braintree.environment import Environment
|
||||
from braintree.util.http import Http
|
||||
|
||||
class _Extension(TypedDict):
|
||||
errorClass: Incomplete
|
||||
legacyCode: int | None
|
||||
|
||||
class _Error(TypedDict):
|
||||
attribute: str | None
|
||||
code: int | None
|
||||
message: str | None
|
||||
extensions: _Extension | None
|
||||
|
||||
class _ValidationErrors(TypedDict):
|
||||
errors: Incomplete
|
||||
errors: Iterable[_Error]
|
||||
|
||||
class _Response(TypedDict):
|
||||
errors: Iterable[_Error] | None
|
||||
|
||||
class GraphQLClient(Http):
|
||||
@staticmethod
|
||||
def raise_exception_for_graphql_error(response) -> None: ...
|
||||
def raise_exception_for_graphql_error(response: _Response) -> None: ...
|
||||
graphql_headers: dict[str, str]
|
||||
def __init__(self, config: Incomplete | None = None, environment: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, config: Configuration | None = None, environment: Environment | 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: ...
|
||||
def get_validation_error_code(error: _Error) -> int | None: ...
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Final
|
||||
|
||||
from braintree.configuration import Configuration
|
||||
from braintree.environment import Environment
|
||||
|
||||
class Http:
|
||||
class ContentType:
|
||||
Xml: Final = "application/xml"
|
||||
@@ -8,16 +11,18 @@ class Http:
|
||||
Json: Final = "application/json"
|
||||
|
||||
@staticmethod
|
||||
def is_error_status(status): ...
|
||||
def is_error_status(status: int) -> bool: ...
|
||||
@staticmethod
|
||||
def raise_exception_from_status(status, message: Incomplete | None = None) -> None: ...
|
||||
config: Incomplete
|
||||
environment: Incomplete
|
||||
def __init__(self, config, environment: Incomplete | None = None) -> None: ...
|
||||
def post(self, path, params: Incomplete | None = None): ...
|
||||
def delete(self, path): ...
|
||||
def get(self, path): ...
|
||||
def put(self, path, params: Incomplete | None = None): ...
|
||||
def post_multipart(self, path, files, params: Incomplete | None = None): ...
|
||||
def http_do(self, http_verb, path, headers, request_body): ...
|
||||
def handle_exception(self, exception) -> None: ...
|
||||
def raise_exception_from_status(status: int, message: str | None = None) -> None: ...
|
||||
config: Configuration
|
||||
environment: Environment
|
||||
def __init__(self, config: Configuration, environment: Environment | None = None) -> None: ...
|
||||
def post(self, path: str, params: dict[str, Incomplete] | None = None): ...
|
||||
def delete(self, path: str): ...
|
||||
def get(self, path: str): ...
|
||||
def put(self, path: str, params: dict[str, Incomplete] | None = None): ...
|
||||
def post_multipart(self, path: str, files, params: dict[str, Incomplete] | None = None): ...
|
||||
def http_do(
|
||||
self, http_verb: str, path: str, headers: dict[str, Incomplete], request_body: str | tuple[str, Incomplete] | None
|
||||
) -> list[int | str]: ...
|
||||
def handle_exception(self, exception: IOError) -> None: ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from xml.dom.minidom import Document
|
||||
|
||||
from .generator import _XML
|
||||
|
||||
binary_type = bytes
|
||||
|
||||
class Parser:
|
||||
doc: Document
|
||||
def __init__(self, xml) -> None: ...
|
||||
def parse(self): ...
|
||||
def __init__(self, xml: str | bytes) -> None: ...
|
||||
def parse(self) -> _XML: ...
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .generator import _XML
|
||||
|
||||
class XmlUtil:
|
||||
@staticmethod
|
||||
def xml_from_dict(dict): ...
|
||||
def xml_from_dict(dict: _XML) -> str: ...
|
||||
@staticmethod
|
||||
def dict_from_xml(xml): ...
|
||||
def dict_from_xml(xml: str | bytes) -> _XML: ...
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing_extensions import Self
|
||||
|
||||
from braintree.validation_error import ValidationError
|
||||
|
||||
class ValidationErrorCollection:
|
||||
data: dict[str, Incomplete]
|
||||
def __init__(self, data: Incomplete | None = None) -> None: ...
|
||||
def __init__(self, data: dict[str, Incomplete] | None = None) -> None: ...
|
||||
@property
|
||||
def deep_errors(self): ...
|
||||
def for_index(self, index): ...
|
||||
def for_object(self, nested_key): ...
|
||||
def on(self, attribute): ...
|
||||
def deep_errors(self) -> list[ValidationError]: ...
|
||||
def for_index(self, index: int | str) -> Self: ...
|
||||
def for_object(self, nested_key: str) -> Self: ...
|
||||
def on(self, attribute: str) -> list[ValidationError]: ...
|
||||
@property
|
||||
def deep_size(self): ...
|
||||
def deep_size(self) -> int: ...
|
||||
@property
|
||||
def errors(self): ...
|
||||
def errors(self) -> list[ValidationError]: ...
|
||||
@property
|
||||
def size(self): ...
|
||||
def __getitem__(self, index): ...
|
||||
def size(self) -> int: ...
|
||||
def __getitem__(self, index: int) -> ValidationError: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
@@ -9,6 +9,6 @@ class VisaCheckoutCard(Resource):
|
||||
verification: CreditCardVerification
|
||||
def __init__(self, gateway, attributes): ...
|
||||
@property
|
||||
def expiration_date(self): ...
|
||||
def expiration_date(self) -> str: ...
|
||||
@property
|
||||
def masked_number(self): ...
|
||||
def masked_number(self) -> str: ...
|
||||
|
||||
@@ -68,9 +68,9 @@ class WebhookNotification(Resource):
|
||||
TransactionSettlementDeclined: Final = "transaction_settlement_declined"
|
||||
|
||||
@staticmethod
|
||||
def parse(signature, payload): ...
|
||||
def parse(signature: str, payload: str) -> WebhookNotification: ...
|
||||
@staticmethod
|
||||
def verify(challenge): ...
|
||||
def verify(challenge: str) -> str: ...
|
||||
source_merchant_id: Incomplete
|
||||
subscription: Subscription
|
||||
merchant_account: MerchantAccount
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.webhook_notification import WebhookNotification
|
||||
|
||||
text_type = str
|
||||
|
||||
class WebhookNotificationGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def parse(self, signature, payload): ...
|
||||
def verify(self, challenge): ...
|
||||
def parse(self, signature: str, payload: str) -> WebhookNotification: ...
|
||||
def verify(self, challenge: str) -> str: ...
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class WebhookTesting:
|
||||
@staticmethod
|
||||
def sample_notification(kind, id, source_merchant_id: Incomplete | None = None): ...
|
||||
def sample_notification(kind: str, id: str, source_merchant_id: str | None = None) -> dict[str, str | bytes]: ...
|
||||
|
||||
@@ -4,4 +4,4 @@ class WebhookTestingGateway:
|
||||
gateway: Incomplete
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def sample_notification(self, kind, id, source_merchant_id: Incomplete | None = None): ...
|
||||
def sample_notification(self, kind: str, id: str, source_merchant_id: str | None = None) -> dict[str, str | bytes]: ...
|
||||
|
||||
Reference in New Issue
Block a user