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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .application_details_external_square_product import ApplicationDetailsExternalSquareProduct
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ApplicationDetails(UncheckedBaseModel):
    """
    Details about the application that took the payment.
    """

    square_product: typing.Optional[ApplicationDetailsExternalSquareProduct] = pydantic.Field(default=None)
    """
    The Square product, such as Square Point of Sale (POS), 
    Square Invoices, or Square Virtual Terminal.
    See [ExternalSquareProduct](#type-externalsquareproduct) for possible values
    """

    application_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The Square ID assigned to the application used to take the payment. 
    Application developers can use this information to identify payments that 
    their application processed. 
    For example, if a developer uses a custom application to process payments, 
    this field contains the application ID from the Developer Dashboard. 
    If a seller uses a [Square App Marketplace](https://developer.squareup.com/docs/app-marketplace) 
    application to process payments, the field contains the corresponding application ID.
    """

    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
