# coding: utf-8

"""
    Generated by: https://openapi-generator.tech
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from circle import schemas  # noqa: F401


class FiatPayment(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Status information of the related payment. This property is only present on refund or cancel items.
    """


    class MetaOapg:
        required = {
            "amount",
            "merchantId",
            "id",
            "source",
            "type",
            "status",
        }
        
        class properties:
            id = schemas.UUIDSchema
            
            
            class type(
                schemas.EnumBase,
                schemas.StrSchema
            ):
                
                @schemas.classproperty
                def PAYMENT(cls):
                    return cls("payment")
            merchantId = schemas.UUIDSchema
        
            @staticmethod
            def amount() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
        
            @staticmethod
            def source() -> typing.Type['SourceResponse']:
                return SourceResponse
        
            @staticmethod
            def status() -> typing.Type['PaymentStatus']:
                return PaymentStatus
        
            @staticmethod
            def merchantWalletId() -> typing.Type['MerchantWalletId']:
                return MerchantWalletId
        
            @staticmethod
            def fromAmount() -> typing.Type['FiatMoney']:
                return FiatMoney
            
            
            class description(
                schemas.EnumBase,
                schemas.StrSchema
            ):
                
                @schemas.classproperty
                def PAYMENT(cls):
                    return cls("Payment")
            captured = schemas.BoolSchema
        
            @staticmethod
            def captureAmount() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            captureDate = schemas.StrSchema
        
            @staticmethod
            def requiredAction() -> typing.Type['RequiredAction']:
                return RequiredAction
        
            @staticmethod
            def cancel() -> typing.Type['PaymentInfoCancel']:
                return PaymentInfoCancel
            
            
            class refunds(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['PaymentInfoPaymentAndRefund']:
                        return PaymentInfoPaymentAndRefund
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['PaymentInfoPaymentAndRefund'], typing.List['PaymentInfoPaymentAndRefund']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'refunds':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'PaymentInfoPaymentAndRefund':
                    return super().__getitem__(i)
        
            @staticmethod
            def fees() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            channel = schemas.UUIDSchema
            createDate = schemas.StrSchema
            updateDate = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "type": type,
                "merchantId": merchantId,
                "amount": amount,
                "source": source,
                "status": status,
                "merchantWalletId": merchantWalletId,
                "fromAmount": fromAmount,
                "description": description,
                "captured": captured,
                "captureAmount": captureAmount,
                "captureDate": captureDate,
                "requiredAction": requiredAction,
                "cancel": cancel,
                "refunds": refunds,
                "fees": fees,
                "channel": channel,
                "createDate": createDate,
                "updateDate": updateDate,
            }
    
    amount: 'FiatMoneyUsd'
    merchantId: MetaOapg.properties.merchantId
    id: MetaOapg.properties.id
    source: 'SourceResponse'
    type: MetaOapg.properties.type
    status: 'PaymentStatus'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["merchantId"]) -> MetaOapg.properties.merchantId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'SourceResponse': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'PaymentStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["merchantWalletId"]) -> 'MerchantWalletId': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fromAmount"]) -> 'FiatMoney': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["captured"]) -> MetaOapg.properties.captured: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["captureAmount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["captureDate"]) -> MetaOapg.properties.captureDate: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["requiredAction"]) -> 'RequiredAction': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> 'PaymentInfoCancel': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["refunds"]) -> MetaOapg.properties.refunds: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fees"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["channel"]) -> MetaOapg.properties.channel: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createDate"]) -> MetaOapg.properties.createDate: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "merchantId", "amount", "source", "status", "merchantWalletId", "fromAmount", "description", "captured", "captureAmount", "captureDate", "requiredAction", "cancel", "refunds", "fees", "channel", "createDate", "updateDate", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["merchantId"]) -> MetaOapg.properties.merchantId: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> 'SourceResponse': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'PaymentStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["merchantWalletId"]) -> typing.Union['MerchantWalletId', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fromAmount"]) -> typing.Union['FiatMoney', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["captured"]) -> typing.Union[MetaOapg.properties.captured, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["captureAmount"]) -> typing.Union['FiatMoneyUsd', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["captureDate"]) -> typing.Union[MetaOapg.properties.captureDate, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["requiredAction"]) -> typing.Union['RequiredAction', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> typing.Union['PaymentInfoCancel', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["refunds"]) -> typing.Union[MetaOapg.properties.refunds, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fees"]) -> typing.Union['FiatMoneyUsd', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["channel"]) -> typing.Union[MetaOapg.properties.channel, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createDate"]) -> typing.Union[MetaOapg.properties.createDate, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["updateDate"]) -> typing.Union[MetaOapg.properties.updateDate, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "type", "merchantId", "amount", "source", "status", "merchantWalletId", "fromAmount", "description", "captured", "captureAmount", "captureDate", "requiredAction", "cancel", "refunds", "fees", "channel", "createDate", "updateDate", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        amount: 'FiatMoneyUsd',
        merchantId: typing.Union[MetaOapg.properties.merchantId, str, uuid.UUID, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        source: 'SourceResponse',
        type: typing.Union[MetaOapg.properties.type, str, ],
        status: 'PaymentStatus',
        merchantWalletId: typing.Union['MerchantWalletId', schemas.Unset] = schemas.unset,
        fromAmount: typing.Union['FiatMoney', schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        captured: typing.Union[MetaOapg.properties.captured, bool, schemas.Unset] = schemas.unset,
        captureAmount: typing.Union['FiatMoneyUsd', schemas.Unset] = schemas.unset,
        captureDate: typing.Union[MetaOapg.properties.captureDate, str, schemas.Unset] = schemas.unset,
        requiredAction: typing.Union['RequiredAction', schemas.Unset] = schemas.unset,
        cancel: typing.Union['PaymentInfoCancel', schemas.Unset] = schemas.unset,
        refunds: typing.Union[MetaOapg.properties.refunds, list, tuple, schemas.Unset] = schemas.unset,
        fees: typing.Union['FiatMoneyUsd', schemas.Unset] = schemas.unset,
        channel: typing.Union[MetaOapg.properties.channel, str, uuid.UUID, schemas.Unset] = schemas.unset,
        createDate: typing.Union[MetaOapg.properties.createDate, str, schemas.Unset] = schemas.unset,
        updateDate: typing.Union[MetaOapg.properties.updateDate, str, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'FiatPayment':
        return super().__new__(
            cls,
            *_args,
            amount=amount,
            merchantId=merchantId,
            id=id,
            source=source,
            type=type,
            status=status,
            merchantWalletId=merchantWalletId,
            fromAmount=fromAmount,
            description=description,
            captured=captured,
            captureAmount=captureAmount,
            captureDate=captureDate,
            requiredAction=requiredAction,
            cancel=cancel,
            refunds=refunds,
            fees=fees,
            channel=channel,
            createDate=createDate,
            updateDate=updateDate,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.fiat_money import FiatMoney
from circle.model.fiat_money_usd import FiatMoneyUsd
from circle.model.merchant_wallet_id import MerchantWalletId
from circle.model.payment_info_cancel import PaymentInfoCancel
from circle.model.payment_info_payment_and_refund import PaymentInfoPaymentAndRefund
from circle.model.payment_status import PaymentStatus
from circle.model.required_action import RequiredAction
from circle.model.source_response import SourceResponse
