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

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
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(_winrt.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: _winrt.Object) -> PaymentAddress: ...
    def __new__(cls: typing.Type[PaymentAddress]) -> PaymentAddress:...

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

class PaymentCurrencyAmount(_winrt.Object):
    value: str
    currency_system: str
    currency: str
    @staticmethod
    def _from(obj: _winrt.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(_winrt.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: _winrt.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(_winrt.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: _winrt.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(_winrt.Object):
    pending: _winrt.Boolean
    label: str
    amount: typing.Optional[PaymentCurrencyAmount]
    @staticmethod
    def _from(obj: _winrt.Object) -> PaymentItem: ...
    def __new__(cls: typing.Type[PaymentItem], label: str, amount: typing.Optional[PaymentCurrencyAmount]) -> PaymentItem:...

class PaymentMediator(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.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(_winrt.Object):
    package_full_name: str
    uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: _winrt.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(_winrt.Object):
    json_data: str
    supported_method_ids: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    @staticmethod
    def _from(obj: _winrt.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(_winrt.Object):
    shipping_type: PaymentShippingType
    request_shipping: _winrt.Boolean
    request_payer_phone_number: PaymentOptionPresence
    request_payer_name: PaymentOptionPresence
    request_payer_email: PaymentOptionPresence
    @staticmethod
    def _from(obj: _winrt.Object) -> PaymentOptions: ...
    def __new__(cls: typing.Type[PaymentOptions]) -> PaymentOptions:...

class PaymentRequest(_winrt.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: _winrt.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(_winrt.Object):
    change_kind: PaymentRequestChangeKind
    selected_shipping_option: typing.Optional[PaymentShippingOption]
    shipping_address: typing.Optional[PaymentAddress]
    @staticmethod
    def _from(obj: _winrt.Object) -> PaymentRequestChangedArgs: ...
    def acknowledge(self, change_result: typing.Optional[PaymentRequestChangedResult]) -> None: ...

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

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

class PaymentResponse(_winrt.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: _winrt.Object) -> PaymentResponse: ...
    def complete_async(self, status: PaymentRequestCompletionStatus) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class PaymentShippingOption(_winrt.Object):
    tag: str
    label: str
    is_selected: _winrt.Boolean
    amount: typing.Optional[PaymentCurrencyAmount]
    @staticmethod
    def _from(obj: _winrt.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: _winrt.Boolean) -> PaymentShippingOption:...
    @typing.overload
    def __new__(cls: typing.Type[PaymentShippingOption], label: str, amount: typing.Optional[PaymentCurrencyAmount], selected: _winrt.Boolean, tag: str) -> PaymentShippingOption:...

class PaymentToken(_winrt.Object):
    json_details: str
    payment_method_id: str
    @staticmethod
    def _from(obj: _winrt.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]

