# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from ...types.customer_id import CustomerId
from ...types.method_reference_id import MethodReferenceId
from ...types.result_code import ResultCode
from ...types.resulttext import Resulttext


class AddMethodResponseResponseData(UniversalBaseModel):
    reference_id: typing_extensions.Annotated[
        typing.Optional[MethodReferenceId],
        FieldMetadata(alias="referenceId"),
        pydantic.Field(
            alias="referenceId",
            description="Stored method identifier in Payabli platform. This ID is used to manage the stored method.",
        ),
    ] = None
    result_code: typing_extensions.Annotated[
        typing.Optional[ResultCode], FieldMetadata(alias="resultCode"), pydantic.Field(alias="resultCode")
    ] = None
    result_text: typing_extensions.Annotated[
        typing.Optional[Resulttext], FieldMetadata(alias="resultText"), pydantic.Field(alias="resultText")
    ] = None
    customer_id: typing_extensions.Annotated[
        typing.Optional[CustomerId],
        FieldMetadata(alias="customerId"),
        pydantic.Field(
            alias="customerId",
            description="Internal unique ID of customer owner of the stored method.  \n\nReturns `0` if the method wasn't assigned to an existing customer or no customer was created.\"",
        ),
    ] = None
    method_reference_id: typing_extensions.Annotated[
        typing.Optional[MethodReferenceId],
        FieldMetadata(alias="methodReferenceId"),
        pydantic.Field(alias="methodReferenceId"),
    ] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
