# 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 .card_acceptance_element import CardAcceptanceElement
from .card_fee_section import CardFeeSection
from .card_flat_section import CardFlatSection
from .card_icp_section import CardIcpSection
from .card_pass_through_section import CardPassThroughSection
from .template_element import TemplateElement
from .visible import Visible


class CardService(UniversalBaseModel):
    batch_cutoff_time: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="batchCutoffTime")
    ] = pydantic.Field(default=None)
    """
    Controls how to present the `batchCutoffTime` field on the application. If this field isn't sent, batch cut off time defaults to 5 ET.
    """

    card_acceptance: typing_extensions.Annotated[
        typing.Optional[CardAcceptanceElement], FieldMetadata(alias="cardAcceptance")
    ] = None
    card_fees: typing_extensions.Annotated[typing.Optional[CardFeeSection], FieldMetadata(alias="cardFees")] = None
    card_flat: typing_extensions.Annotated[typing.Optional[CardFlatSection], FieldMetadata(alias="cardFlat")] = None
    card_flat_amountx_auth: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardFlat_amountxAuth")
    ] = None
    card_flat_high_pay_range: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardFlat_highPayRange")
    ] = None
    card_flat_low_pay_range: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardFlat_lowPayRange")
    ] = None
    card_flat_percentx_auth: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardFlat_percentxAuth")
    ] = None
    card_icp: typing_extensions.Annotated[typing.Optional[CardIcpSection], FieldMetadata(alias="cardICP")] = None
    card_icp_amountx_auth: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardICP_amountxAuth")
    ] = None
    card_icp_high_pay_range: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardICP_highPayRange")
    ] = None
    card_icp_low_pay_range: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardICP_lowPayRange")
    ] = None
    card_icp_percentx_auth: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardICP_percentxAuth")
    ] = None
    card_pass_through: typing_extensions.Annotated[
        typing.Optional[CardPassThroughSection], FieldMetadata(alias="cardPassThrough")
    ] = None
    card_pass_through_amount_recurring: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardPassThrough_amountRecurring")
    ] = None
    card_pass_through_amountx_auth: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardPassThrough_amountxAuth")
    ] = None
    card_pass_through_high_pay_range: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardPassThrough_highPayRange")
    ] = None
    card_pass_through_low_pay_range: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardPassThrough_lowPayRange")
    ] = None
    card_pass_through_percent_recurring: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardPassThrough_percentRecurring")
    ] = None
    card_pass_through_percentx_auth: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="cardPassThrough_percentxAuth")
    ] = None
    discount_frequency: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="discountFrequency")
    ] = None
    funding_rollup: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="fundingRollup")
    ] = None
    gateway: typing.Optional[TemplateElement] = None
    pass_through_cost: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="passThroughCost")
    ] = None
    pdf_template_id: typing_extensions.Annotated[
        typing.Optional[TemplateElement], FieldMetadata(alias="pdfTemplateId")
    ] = None
    pricing_plan: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="pricingPlan")] = None
    pricing_type: typing_extensions.Annotated[typing.Optional[TemplateElement], FieldMetadata(alias="pricingType")] = (
        None
    )
    processor: typing.Optional[TemplateElement] = None
    provider: typing.Optional[TemplateElement] = None
    tier_name: typing_extensions.Annotated[typing.Optional[TemplateElement], FieldMetadata(alias="tierName")] = None
    visible: typing.Optional[Visible] = 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
