# 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 .method_element_settings_apple_pay_button_style import MethodElementSettingsApplePayButtonStyle
from .method_element_settings_apple_pay_button_type import MethodElementSettingsApplePayButtonType
from .method_element_settings_apple_pay_language import MethodElementSettingsApplePayLanguage


class MethodElementSettingsApplePay(UniversalBaseModel):
    button_style: typing_extensions.Annotated[
        typing.Optional[MethodElementSettingsApplePayButtonStyle], FieldMetadata(alias="buttonStyle")
    ] = pydantic.Field(default=None)
    """
    The Apple Pay button style. See [Apple Pay Button Style](/developers/developer-guides/hosted-payment-page-apple-pay#param-applepay-button-style) for more information.
    """

    button_type: typing_extensions.Annotated[
        typing.Optional[MethodElementSettingsApplePayButtonType], FieldMetadata(alias="buttonType")
    ] = pydantic.Field(default=None)
    """
    The text on Apple Pay button. See [Apple Pay Button Type](/developers/developer-guides/hosted-payment-page-apple-pay#param-applepay-button-type) for more information.
    """

    language: typing.Optional[MethodElementSettingsApplePayLanguage] = pydantic.Field(default=None)
    """
    The Apple Pay button locale. See [Apple Pay Button Language](/developers/developer-guides/hosted-payment-page-apple-pay#param-applepay-language) for more information.
    """

    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
