# 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):
    customer_id: typing_extensions.Annotated[typing.Optional[CustomerId], FieldMetadata(alias="CustomerId")] = (
        pydantic.Field(default=None)
    )
    """
    Internal unique ID of customer owner of the stored method.  
    
    Returns `0` if the method wasn't assigned to an existing customer or no customer was created."
    """

    method_reference_id: typing_extensions.Annotated[
        typing.Optional[MethodReferenceId], FieldMetadata(alias="methodReferenceId")
    ] = None
    reference_id: typing_extensions.Annotated[
        typing.Optional[MethodReferenceId], FieldMetadata(alias="ReferenceId")
    ] = pydantic.Field(default=None)
    """
    Stored method identifier in Payabli platform. This ID is used to manage the stored method.
    """

    result_code: typing_extensions.Annotated[typing.Optional[ResultCode], FieldMetadata(alias="ResultCode")] = None
    result_text: typing_extensions.Annotated[typing.Optional[Resulttext], FieldMetadata(alias="ResultText")] = 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
