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

from ..core.unchecked_base_model import UncheckedBaseModel
from .device_attributes_device_type import DeviceAttributesDeviceType
import pydantic
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class DeviceAttributes(UncheckedBaseModel):
    type: DeviceAttributesDeviceType = pydantic.Field(default="TERMINAL")
    """
    The device type.
    See [DeviceType](#type-devicetype) for possible values
    """

    manufacturer: str = pydantic.Field()
    """
    The maker of the device.
    """

    model: typing.Optional[str] = pydantic.Field(default=None)
    """
    The specific model of the device.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    A seller-specified name for the device.
    """

    manufacturers_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The manufacturer-supplied identifier for the device (where available). In many cases,
    this identifier will be a serial number.
    """

    updated_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    The RFC 3339-formatted value of the most recent update to the device information.
    (Could represent any field update on the device.)
    """

    version: typing.Optional[str] = pydantic.Field(default=None)
    """
    The current version of software installed on the device.
    """

    merchant_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    The merchant_token identifying the merchant controlling the device.
    """

    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
