mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Annotate braintree's Address and AddressGateway classes (#14927)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
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 Address(Resource):
|
||||
class ShippingMethod:
|
||||
@@ -14,13 +16,15 @@ class Address(Resource):
|
||||
PickupInStore: Final = "pickup_in_store"
|
||||
|
||||
@staticmethod
|
||||
def create(params: dict[str, Incomplete] | None = None): ...
|
||||
def create(params: dict[str, Incomplete] | None = None) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def delete(customer_id: str, address_id: str): ...
|
||||
def delete(customer_id: str, address_id: str) -> SuccessfulResult: ...
|
||||
@staticmethod
|
||||
def find(customer_id: str, address_id: str): ...
|
||||
def find(customer_id: str, address_id: str) -> Address: ...
|
||||
@staticmethod
|
||||
def update(customer_id: str, address_id: str, params: dict[str, Incomplete] | None = None): ...
|
||||
def update(
|
||||
customer_id: str, address_id: str, params: dict[str, Incomplete] | None = None
|
||||
) -> SuccessfulResult | ErrorResult | None: ...
|
||||
@staticmethod
|
||||
def create_signature() -> list[str | dict[str, list[str]]]: ...
|
||||
@staticmethod
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.address import Address
|
||||
from braintree.braintree_gateway import BraintreeGateway
|
||||
from braintree.error_result import ErrorResult
|
||||
from braintree.successful_result import SuccessfulResult
|
||||
|
||||
class AddressGateway:
|
||||
gateway: Incomplete
|
||||
gateway: BraintreeGateway
|
||||
config: Incomplete
|
||||
def __init__(self, gateway) -> None: ...
|
||||
def __init__(self, gateway: BraintreeGateway) -> 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: ...
|
||||
|
||||
Reference in New Issue
Block a user