# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.foundation.collections

class PaymentCanMakePaymentResultStatus(enum.IntEnum):
    UNKNOWN = 0
    YES = 1
    NO = 2
    NOT_ALLOWED = 3
    USER_NOT_SIGNED_IN = 4
    SPECIFIED_PAYMENT_METHOD_IDS_NOT_SUPPORTED = 5
    NO_QUALIFYING_CARD_ON_FILE = 6

class PaymentOptionPresence(enum.IntEnum):
    NONE = 0
    OPTIONAL = 1
    REQUIRED = 2

class PaymentRequestChangeKind(enum.IntEnum):
    SHIPPING_OPTION = 0
    SHIPPING_ADDRESS = 1

class PaymentRequestCompletionStatus(enum.IntEnum):
    SUCCEEDED = 0
    FAILED = 1
    UNKNOWN = 2

class PaymentRequestStatus(enum.IntEnum):
    SUCCEEDED = 0
    FAILED = 1
    CANCELED = 2

class PaymentShippingType(enum.IntEnum):
    SHIPPING = 0
    DELIVERY = 1
    PICKUP = 2

Self = typing.TypeVar('Self')

class PaymentAddress(winsdk.system.Object):
    sorting_code: str
    region: str
    recipient: str
    postal_code: str
    phone_number: str
    organization: str
    language_code: str
    dependent_locality: str
    country: str
    city: str
    address_lines: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    properties: typing.Optional[winsdk.windows.foundation.collections.ValueSet]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentAddress: ...
    def __new__(cls: typing.Type[PaymentAddress]) -> PaymentAddress:...

class PaymentCanMakePaymentResult(winsdk.system.Object):
    status: PaymentCanMakePaymentResultStatus
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentCanMakePaymentResult: ...
    def __new__(cls: typing.Type[PaymentCanMakePaymentResult], value: PaymentCanMakePaymentResultStatus) -> PaymentCanMakePaymentResult:...

class PaymentCurrencyAmount(winsdk.system.Object):
    value: str
    currency_system: str
    currency: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentCurrencyAmount: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentCurrencyAmount], value: str, currency: str) -> PaymentCurrencyAmount:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentCurrencyAmount], value: str, currency: str, currency_system: str) -> PaymentCurrencyAmount:...

class PaymentDetails(winsdk.system.Object):
    total: typing.Optional[PaymentItem]
    shipping_options: typing.Optional[winsdk.windows.foundation.collections.IVectorView[PaymentShippingOption]]
    modifiers: typing.Optional[winsdk.windows.foundation.collections.IVectorView[PaymentDetailsModifier]]
    display_items: typing.Optional[winsdk.windows.foundation.collections.IVectorView[PaymentItem]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentDetails: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentDetails], total: typing.Optional[PaymentItem]) -> PaymentDetails:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentDetails], total: typing.Optional[PaymentItem], display_items: typing.Iterable[PaymentItem]) -> PaymentDetails:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentDetails]) -> PaymentDetails:...

class PaymentDetailsModifier(winsdk.system.Object):
    additional_display_items: typing.Optional[winsdk.windows.foundation.collections.IVectorView[PaymentItem]]
    json_data: str
    supported_method_ids: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    total: typing.Optional[PaymentItem]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentDetailsModifier: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentDetailsModifier], supported_method_ids: typing.Iterable[str], total: typing.Optional[PaymentItem]) -> PaymentDetailsModifier:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentDetailsModifier], supported_method_ids: typing.Iterable[str], total: typing.Optional[PaymentItem], additional_display_items: typing.Iterable[PaymentItem]) -> PaymentDetailsModifier:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentDetailsModifier], supported_method_ids: typing.Iterable[str], total: typing.Optional[PaymentItem], additional_display_items: typing.Iterable[PaymentItem], json_data: str) -> PaymentDetailsModifier:...

class PaymentItem(winsdk.system.Object):
    pending: winsdk.system.Boolean
    label: str
    amount: typing.Optional[PaymentCurrencyAmount]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentItem: ...
    def __new__(cls: typing.Type[PaymentItem], label: str, amount: typing.Optional[PaymentCurrencyAmount]) -> PaymentItem:...

class PaymentMediator(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentMediator: ...
    def __new__(cls: typing.Type[PaymentMediator]) -> PaymentMediator:...
    def can_make_payment_async(self, payment_request: typing.Optional[PaymentRequest], /) -> winsdk.windows.foundation.IAsyncOperation[PaymentCanMakePaymentResult]: ...
    def get_supported_method_ids_async(self) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVectorView[str]]: ...
    @typing.overload
    def submit_payment_request_async(self, payment_request: typing.Optional[PaymentRequest], /) -> winsdk.windows.foundation.IAsyncOperation[PaymentRequestSubmitResult]: ...
    @typing.overload
    def submit_payment_request_async(self, payment_request: typing.Optional[PaymentRequest], change_handler: typing.Optional[PaymentRequestChangedHandler], /) -> winsdk.windows.foundation.IAsyncOperation[PaymentRequestSubmitResult]: ...

class PaymentMerchantInfo(winsdk.system.Object):
    package_full_name: str
    uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentMerchantInfo: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentMerchantInfo], uri: typing.Optional[winsdk.windows.foundation.Uri]) -> PaymentMerchantInfo:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentMerchantInfo]) -> PaymentMerchantInfo:...

class PaymentMethodData(winsdk.system.Object):
    json_data: str
    supported_method_ids: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentMethodData: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentMethodData], supported_method_ids: typing.Iterable[str]) -> PaymentMethodData:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentMethodData], supported_method_ids: typing.Iterable[str], json_data: str) -> PaymentMethodData:...

class PaymentOptions(winsdk.system.Object):
    shipping_type: PaymentShippingType
    request_shipping: winsdk.system.Boolean
    request_payer_phone_number: PaymentOptionPresence
    request_payer_name: PaymentOptionPresence
    request_payer_email: PaymentOptionPresence
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentOptions: ...
    def __new__(cls: typing.Type[PaymentOptions]) -> PaymentOptions:...

class PaymentRequest(winsdk.system.Object):
    details: typing.Optional[PaymentDetails]
    merchant_info: typing.Optional[PaymentMerchantInfo]
    method_data: typing.Optional[winsdk.windows.foundation.collections.IVectorView[PaymentMethodData]]
    options: typing.Optional[PaymentOptions]
    id: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentRequest: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentRequest], details: typing.Optional[PaymentDetails], method_data: typing.Iterable[PaymentMethodData], merchant_info: typing.Optional[PaymentMerchantInfo], options: typing.Optional[PaymentOptions], id: str) -> PaymentRequest:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentRequest], details: typing.Optional[PaymentDetails], method_data: typing.Iterable[PaymentMethodData]) -> PaymentRequest:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentRequest], details: typing.Optional[PaymentDetails], method_data: typing.Iterable[PaymentMethodData], merchant_info: typing.Optional[PaymentMerchantInfo]) -> PaymentRequest:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentRequest], details: typing.Optional[PaymentDetails], method_data: typing.Iterable[PaymentMethodData], merchant_info: typing.Optional[PaymentMerchantInfo], options: typing.Optional[PaymentOptions]) -> PaymentRequest:...

class PaymentRequestChangedArgs(winsdk.system.Object):
    change_kind: PaymentRequestChangeKind
    selected_shipping_option: typing.Optional[PaymentShippingOption]
    shipping_address: typing.Optional[PaymentAddress]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentRequestChangedArgs: ...
    def acknowledge(self, change_result: typing.Optional[PaymentRequestChangedResult], /) -> None: ...

class PaymentRequestChangedResult(winsdk.system.Object):
    updated_payment_details: typing.Optional[PaymentDetails]
    message: str
    change_accepted_by_merchant: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentRequestChangedResult: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentRequestChangedResult], change_accepted_by_merchant: winsdk.system.Boolean) -> PaymentRequestChangedResult:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentRequestChangedResult], change_accepted_by_merchant: winsdk.system.Boolean, updated_payment_details: typing.Optional[PaymentDetails]) -> PaymentRequestChangedResult:...

class PaymentRequestSubmitResult(winsdk.system.Object):
    response: typing.Optional[PaymentResponse]
    status: PaymentRequestStatus
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentRequestSubmitResult: ...

class PaymentResponse(winsdk.system.Object):
    payer_email: str
    payer_name: str
    payer_phone_number: str
    payment_token: typing.Optional[PaymentToken]
    shipping_address: typing.Optional[PaymentAddress]
    shipping_option: typing.Optional[PaymentShippingOption]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentResponse: ...
    def complete_async(self, status: PaymentRequestCompletionStatus, /) -> winsdk.windows.foundation.IAsyncAction: ...

class PaymentShippingOption(winsdk.system.Object):
    tag: str
    label: str
    is_selected: winsdk.system.Boolean
    amount: typing.Optional[PaymentCurrencyAmount]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentShippingOption: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentShippingOption], label: str, amount: typing.Optional[PaymentCurrencyAmount]) -> PaymentShippingOption:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentShippingOption], label: str, amount: typing.Optional[PaymentCurrencyAmount], selected: winsdk.system.Boolean) -> PaymentShippingOption:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentShippingOption], label: str, amount: typing.Optional[PaymentCurrencyAmount], selected: winsdk.system.Boolean, tag: str) -> PaymentShippingOption:...

class PaymentToken(winsdk.system.Object):
    json_details: str
    payment_method_id: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PaymentToken: ...
    @typing.overload
    def __new__(cls: typing.Type[PaymentToken], payment_method_id: str) -> PaymentToken:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentToken], payment_method_id: str, json_details: str) -> PaymentToken:...

PaymentRequestChangedHandler = typing.Callable[[typing.Optional[PaymentRequest], typing.Optional[PaymentRequestChangedArgs]], None]

