# coding: utf-8

"""
    elepay API リファレンス

    elepay APIはRESTをベースに構成された決済APIです。支払い処理、返金処理など、決済に関わる運用における様々なことができます。  # noqa: E501

    The version of the OpenAPI document: 1.2.0
    Contact: support@elestyle.jp
    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 elepay import schemas  # noqa: F401


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

    Do not edit the class manually.

    支払いオブジェクト
    """


    class MetaOapg:
        
        class properties:
            id = schemas.StrSchema
            appId = schemas.StrSchema
            object = schemas.StrSchema
            liveMode = schemas.BoolSchema
            amount = schemas.IntSchema
            authorizeAmount = schemas.IntSchema
            currency = schemas.StrSchema
            authorize = schemas.BoolSchema
        
            @staticmethod
            def paymentMethod() -> typing.Type['PaymentMethodType']:
                return PaymentMethodType
        
            @staticmethod
            def resource() -> typing.Type['ResourceType']:
                return ResourceType
            orderNo = schemas.StrSchema
            description = schemas.StrSchema
            
            
            class extra(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.StrSchema
                
                def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[MetaOapg.additional_properties, str, ],
                ) -> 'extra':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class metadata(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.StrSchema
                
                def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[MetaOapg.additional_properties, str, ],
                ) -> 'metadata':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                        **kwargs,
                    )
        
            @staticmethod
            def cardInfo() -> typing.Type['CardInfo']:
                return CardInfo
            voucherNo = schemas.StrSchema
            clientIp = schemas.StrSchema
            paid = schemas.BoolSchema
            refunded = schemas.BoolSchema
            disputed = schemas.BoolSchema
        
            @staticmethod
            def refunds() -> typing.Type['RefundsDto']:
                return RefundsDto
        
            @staticmethod
            def status() -> typing.Type['ChargeStatusType']:
                return ChargeStatusType
            codeContent = schemas.StrSchema
            credential = schemas.StrSchema
            paidTime = schemas.Int64Schema
            refundTime = schemas.Int64Schema
            expiryTime = schemas.Int64Schema
            settleTime = schemas.Int64Schema
            createTime = schemas.Int64Schema
            __annotations__ = {
                "id": id,
                "appId": appId,
                "object": object,
                "liveMode": liveMode,
                "amount": amount,
                "authorizeAmount": authorizeAmount,
                "currency": currency,
                "authorize": authorize,
                "paymentMethod": paymentMethod,
                "resource": resource,
                "orderNo": orderNo,
                "description": description,
                "extra": extra,
                "metadata": metadata,
                "cardInfo": cardInfo,
                "voucherNo": voucherNo,
                "clientIp": clientIp,
                "paid": paid,
                "refunded": refunded,
                "disputed": disputed,
                "refunds": refunds,
                "status": status,
                "codeContent": codeContent,
                "credential": credential,
                "paidTime": paidTime,
                "refundTime": refundTime,
                "expiryTime": expiryTime,
                "settleTime": settleTime,
                "createTime": createTime,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["object"]) -> MetaOapg.properties.object: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["liveMode"]) -> MetaOapg.properties.liveMode: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["authorizeAmount"]) -> MetaOapg.properties.authorizeAmount: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["currency"]) -> MetaOapg.properties.currency: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["authorize"]) -> MetaOapg.properties.authorize: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["paymentMethod"]) -> 'PaymentMethodType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["resource"]) -> 'ResourceType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["orderNo"]) -> MetaOapg.properties.orderNo: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["extra"]) -> MetaOapg.properties.extra: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cardInfo"]) -> 'CardInfo': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["voucherNo"]) -> MetaOapg.properties.voucherNo: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["clientIp"]) -> MetaOapg.properties.clientIp: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["paid"]) -> MetaOapg.properties.paid: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["refunded"]) -> MetaOapg.properties.refunded: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["disputed"]) -> MetaOapg.properties.disputed: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["refunds"]) -> 'RefundsDto': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ChargeStatusType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["codeContent"]) -> MetaOapg.properties.codeContent: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["credential"]) -> MetaOapg.properties.credential: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["paidTime"]) -> MetaOapg.properties.paidTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["refundTime"]) -> MetaOapg.properties.refundTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expiryTime"]) -> MetaOapg.properties.expiryTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["settleTime"]) -> MetaOapg.properties.settleTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createTime"]) -> MetaOapg.properties.createTime: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "appId", "object", "liveMode", "amount", "authorizeAmount", "currency", "authorize", "paymentMethod", "resource", "orderNo", "description", "extra", "metadata", "cardInfo", "voucherNo", "clientIp", "paid", "refunded", "disputed", "refunds", "status", "codeContent", "credential", "paidTime", "refundTime", "expiryTime", "settleTime", "createTime", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["object"]) -> typing.Union[MetaOapg.properties.object, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["liveMode"]) -> typing.Union[MetaOapg.properties.liveMode, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> typing.Union[MetaOapg.properties.amount, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["authorizeAmount"]) -> typing.Union[MetaOapg.properties.authorizeAmount, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["currency"]) -> typing.Union[MetaOapg.properties.currency, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["authorize"]) -> typing.Union[MetaOapg.properties.authorize, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["paymentMethod"]) -> typing.Union['PaymentMethodType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> typing.Union['ResourceType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["orderNo"]) -> typing.Union[MetaOapg.properties.orderNo, 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["extra"]) -> typing.Union[MetaOapg.properties.extra, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cardInfo"]) -> typing.Union['CardInfo', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["voucherNo"]) -> typing.Union[MetaOapg.properties.voucherNo, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["clientIp"]) -> typing.Union[MetaOapg.properties.clientIp, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["paid"]) -> typing.Union[MetaOapg.properties.paid, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["refunded"]) -> typing.Union[MetaOapg.properties.refunded, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["disputed"]) -> typing.Union[MetaOapg.properties.disputed, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["refunds"]) -> typing.Union['RefundsDto', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['ChargeStatusType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["codeContent"]) -> typing.Union[MetaOapg.properties.codeContent, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["credential"]) -> typing.Union[MetaOapg.properties.credential, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["paidTime"]) -> typing.Union[MetaOapg.properties.paidTime, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["refundTime"]) -> typing.Union[MetaOapg.properties.refundTime, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expiryTime"]) -> typing.Union[MetaOapg.properties.expiryTime, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["settleTime"]) -> typing.Union[MetaOapg.properties.settleTime, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createTime"]) -> typing.Union[MetaOapg.properties.createTime, 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", "appId", "object", "liveMode", "amount", "authorizeAmount", "currency", "authorize", "paymentMethod", "resource", "orderNo", "description", "extra", "metadata", "cardInfo", "voucherNo", "clientIp", "paid", "refunded", "disputed", "refunds", "status", "codeContent", "credential", "paidTime", "refundTime", "expiryTime", "settleTime", "createTime", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
        appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset,
        object: typing.Union[MetaOapg.properties.object, str, schemas.Unset] = schemas.unset,
        liveMode: typing.Union[MetaOapg.properties.liveMode, bool, schemas.Unset] = schemas.unset,
        amount: typing.Union[MetaOapg.properties.amount, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        authorizeAmount: typing.Union[MetaOapg.properties.authorizeAmount, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        currency: typing.Union[MetaOapg.properties.currency, str, schemas.Unset] = schemas.unset,
        authorize: typing.Union[MetaOapg.properties.authorize, bool, schemas.Unset] = schemas.unset,
        paymentMethod: typing.Union['PaymentMethodType', schemas.Unset] = schemas.unset,
        resource: typing.Union['ResourceType', schemas.Unset] = schemas.unset,
        orderNo: typing.Union[MetaOapg.properties.orderNo, str, schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        extra: typing.Union[MetaOapg.properties.extra, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        cardInfo: typing.Union['CardInfo', schemas.Unset] = schemas.unset,
        voucherNo: typing.Union[MetaOapg.properties.voucherNo, str, schemas.Unset] = schemas.unset,
        clientIp: typing.Union[MetaOapg.properties.clientIp, str, schemas.Unset] = schemas.unset,
        paid: typing.Union[MetaOapg.properties.paid, bool, schemas.Unset] = schemas.unset,
        refunded: typing.Union[MetaOapg.properties.refunded, bool, schemas.Unset] = schemas.unset,
        disputed: typing.Union[MetaOapg.properties.disputed, bool, schemas.Unset] = schemas.unset,
        refunds: typing.Union['RefundsDto', schemas.Unset] = schemas.unset,
        status: typing.Union['ChargeStatusType', schemas.Unset] = schemas.unset,
        codeContent: typing.Union[MetaOapg.properties.codeContent, str, schemas.Unset] = schemas.unset,
        credential: typing.Union[MetaOapg.properties.credential, str, schemas.Unset] = schemas.unset,
        paidTime: typing.Union[MetaOapg.properties.paidTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        refundTime: typing.Union[MetaOapg.properties.refundTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        expiryTime: typing.Union[MetaOapg.properties.expiryTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        settleTime: typing.Union[MetaOapg.properties.settleTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        createTime: typing.Union[MetaOapg.properties.createTime, decimal.Decimal, int, 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],
    ) -> 'ChargeDto':
        return super().__new__(
            cls,
            *args,
            id=id,
            appId=appId,
            object=object,
            liveMode=liveMode,
            amount=amount,
            authorizeAmount=authorizeAmount,
            currency=currency,
            authorize=authorize,
            paymentMethod=paymentMethod,
            resource=resource,
            orderNo=orderNo,
            description=description,
            extra=extra,
            metadata=metadata,
            cardInfo=cardInfo,
            voucherNo=voucherNo,
            clientIp=clientIp,
            paid=paid,
            refunded=refunded,
            disputed=disputed,
            refunds=refunds,
            status=status,
            codeContent=codeContent,
            credential=credential,
            paidTime=paidTime,
            refundTime=refundTime,
            expiryTime=expiryTime,
            settleTime=settleTime,
            createTime=createTime,
            _configuration=_configuration,
            **kwargs,
        )

from elepay.model.card_info import CardInfo
from elepay.model.charge_status_type import ChargeStatusType
from elepay.model.payment_method_type import PaymentMethodType
from elepay.model.refunds_dto import RefundsDto
from elepay.model.resource_type import ResourceType
