"""GrassInfo Class.""" from typing import Any from video.constants import header class GrassInfo: """GrassInfo Class.""" def __init__( self, grass_account_type: str | None, grass_account_id: str | None, orchard_user_id: str | None, ) -> None: """Init GrassInfo Class.""" self.grass_account_type = grass_account_type self.grass_account_id = grass_account_id self.orchard_user_id = orchard_user_id def to_dict(self) -> dict[str, Any]: """Create a dict representation of GrassInfo.""" return { "grass_account_type": self.grass_account_type, "grass_account_id": self.grass_account_id, "orchard_user_id": self.orchard_user_id, } def get_grass_headers(self) -> dict[str, str]: """Get grass headers.""" grass_headers: dict[str, str] = {} if self.grass_account_type: grass_headers[header.GRASS_ACCOUNT_TYPE] = self.grass_account_type if self.grass_account_id: grass_headers[header.GRASS_ACCOUNT_ID] = self.grass_account_id if self.orchard_user_id: grass_headers[header.ORCHARD_USER_ID] = self.orchard_user_id return grass_headers