Module valolyticspy.dtos.valorant_api.contract

Expand source code
from pydantic import BaseModel
from typing import List, Optional

class Reward(BaseModel):
    """
    Represents a reward in the Valorant API.

    Attributes:
        type (str): The type of the reward.
        uuid (str): The unique identifier of the reward.
        amount (int): The amount of the reward.
        isHighlighted (bool): Indicates whether the reward is highlighted or not.
    """
    type: str
    uuid: str
    amount: int
    isHighlighted: bool

class Level(BaseModel):
    """
    Represents a level in the Valorant API.

    Attributes:
        reward (Reward): The reward associated with the level.
        xp (int): The amount of XP required to reach the level.
        vpCost (int): The cost in Valorant Points (VP) to purchase the level.
        isPurchasableWithVP (bool): Indicates whether the level is purchasable with VP.
        doughCost (int): The cost in dough to purchase the level.
        isPurchasableWithDough (bool): Indicates whether the level is purchasable with dough.
    """
    reward: Reward
    xp: int
    vpCost: int
    isPurchasableWithVP: bool
    doughCost: int
    isPurchasableWithDough: bool

class Chapter(BaseModel):
    """
    Represents a chapter in a game.

    Attributes:
        isEpilogue (bool): Indicates whether the chapter is an epilogue.
        levels (List[Level]): A list of levels in the chapter.
        freeRewards (Optional[List[Reward]]): An optional list of free rewards available in the chapter.
    """
    isEpilogue: bool
    levels: List[Level]
    freeRewards: Optional[List[Reward]] = None

class Content(BaseModel):
    """
    Represents the content information.

    Attributes:
        relationType (Optional[str]): The relation type.
        relationUuid (Optional[str]): The relation UUID.
        chapters (List[Chapter]): The list of chapters.
        premiumRewardScheduleUuid (Optional[str]): The premium reward schedule UUID.
        premiumVPCost (int): The premium VP cost.
    """
    relationType: Optional[str] = None
    relationUuid: Optional[str] = None
    chapters: List[Chapter]
    premiumRewardScheduleUuid: Optional[str] = None
    premiumVPCost: int

class Contract(BaseModel):
    """
    Represents a contract in the Valorant API.

    Attributes:
        uuid (str): The UUID of the contract.
        displayName (str): The display name of the contract.
        displayIcon (str, optional): The display icon of the contract. Defaults to None.
        shipIt (bool): Indicates whether the contract is ready to be shipped.
        useLevelVPCostOverride (bool): Indicates whether the contract uses a level VP cost override.
        levelVPCostOverride (int): The level VP cost override of the contract.
        freeRewardScheduleUuid (str): The UUID of the free reward schedule associated with the contract.
        content (Content): The content of the contract.
        assetPath (str): The asset path of the contract.
    """
    uuid: str
    displayName: str
    displayIcon: Optional[str] = None
    shipIt: bool
    useLevelVPCostOverride: bool
    levelVPCostOverride: int
    freeRewardScheduleUuid: str
    content: Content
    assetPath: str

Classes

class Chapter (**data: Any)

Represents a chapter in a game.

Attributes

isEpilogue : bool
Indicates whether the chapter is an epilogue.
levels : List[Level]
A list of levels in the chapter.
freeRewards : Optional[List[Reward]]
An optional list of free rewards available in the chapter.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Expand source code
class Chapter(BaseModel):
    """
    Represents a chapter in a game.

    Attributes:
        isEpilogue (bool): Indicates whether the chapter is an epilogue.
        levels (List[Level]): A list of levels in the chapter.
        freeRewards (Optional[List[Reward]]): An optional list of free rewards available in the chapter.
    """
    isEpilogue: bool
    levels: List[Level]
    freeRewards: Optional[List[Reward]] = None

Ancestors

  • pydantic.main.BaseModel

Class variables

var freeRewards : Optional[List[Reward]]
var isEpilogue : bool
var levels : List[Level]
var model_computed_fields
var model_config
var model_fields
class Content (**data: Any)

Represents the content information.

Attributes

relationType : Optional[str]
The relation type.
relationUuid : Optional[str]
The relation UUID.
chapters : List[Chapter]
The list of chapters.
premiumRewardScheduleUuid : Optional[str]
The premium reward schedule UUID.
premiumVPCost : int
The premium VP cost.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Expand source code
class Content(BaseModel):
    """
    Represents the content information.

    Attributes:
        relationType (Optional[str]): The relation type.
        relationUuid (Optional[str]): The relation UUID.
        chapters (List[Chapter]): The list of chapters.
        premiumRewardScheduleUuid (Optional[str]): The premium reward schedule UUID.
        premiumVPCost (int): The premium VP cost.
    """
    relationType: Optional[str] = None
    relationUuid: Optional[str] = None
    chapters: List[Chapter]
    premiumRewardScheduleUuid: Optional[str] = None
    premiumVPCost: int

Ancestors

  • pydantic.main.BaseModel

Class variables

var chapters : List[Chapter]
var model_computed_fields
var model_config
var model_fields
var premiumRewardScheduleUuid : Optional[str]
var premiumVPCost : int
var relationType : Optional[str]
var relationUuid : Optional[str]
class Contract (**data: Any)

Represents a contract in the Valorant API.

Attributes

uuid : str
The UUID of the contract.
displayName : str
The display name of the contract.
displayIcon : str, optional
The display icon of the contract. Defaults to None.
shipIt : bool
Indicates whether the contract is ready to be shipped.
useLevelVPCostOverride : bool
Indicates whether the contract uses a level VP cost override.
levelVPCostOverride : int
The level VP cost override of the contract.
freeRewardScheduleUuid : str
The UUID of the free reward schedule associated with the contract.
content : Content
The content of the contract.
assetPath : str
The asset path of the contract.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Expand source code
class Contract(BaseModel):
    """
    Represents a contract in the Valorant API.

    Attributes:
        uuid (str): The UUID of the contract.
        displayName (str): The display name of the contract.
        displayIcon (str, optional): The display icon of the contract. Defaults to None.
        shipIt (bool): Indicates whether the contract is ready to be shipped.
        useLevelVPCostOverride (bool): Indicates whether the contract uses a level VP cost override.
        levelVPCostOverride (int): The level VP cost override of the contract.
        freeRewardScheduleUuid (str): The UUID of the free reward schedule associated with the contract.
        content (Content): The content of the contract.
        assetPath (str): The asset path of the contract.
    """
    uuid: str
    displayName: str
    displayIcon: Optional[str] = None
    shipIt: bool
    useLevelVPCostOverride: bool
    levelVPCostOverride: int
    freeRewardScheduleUuid: str
    content: Content
    assetPath: str

Ancestors

  • pydantic.main.BaseModel

Class variables

var assetPath : str
var contentContent
var displayIcon : Optional[str]
var displayName : str
var freeRewardScheduleUuid : str
var levelVPCostOverride : int
var model_computed_fields
var model_config
var model_fields
var shipIt : bool
var useLevelVPCostOverride : bool
var uuid : str
class Level (**data: Any)

Represents a level in the Valorant API.

Attributes

reward : Reward
The reward associated with the level.
xp : int
The amount of XP required to reach the level.
vpCost : int
The cost in Valorant Points (VP) to purchase the level.
isPurchasableWithVP : bool
Indicates whether the level is purchasable with VP.
doughCost : int
The cost in dough to purchase the level.
isPurchasableWithDough : bool
Indicates whether the level is purchasable with dough.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Expand source code
class Level(BaseModel):
    """
    Represents a level in the Valorant API.

    Attributes:
        reward (Reward): The reward associated with the level.
        xp (int): The amount of XP required to reach the level.
        vpCost (int): The cost in Valorant Points (VP) to purchase the level.
        isPurchasableWithVP (bool): Indicates whether the level is purchasable with VP.
        doughCost (int): The cost in dough to purchase the level.
        isPurchasableWithDough (bool): Indicates whether the level is purchasable with dough.
    """
    reward: Reward
    xp: int
    vpCost: int
    isPurchasableWithVP: bool
    doughCost: int
    isPurchasableWithDough: bool

Ancestors

  • pydantic.main.BaseModel

Class variables

var doughCost : int
var isPurchasableWithDough : bool
var isPurchasableWithVP : bool
var model_computed_fields
var model_config
var model_fields
var rewardReward
var vpCost : int
var xp : int
class Reward (**data: Any)

Represents a reward in the Valorant API.

Attributes

type : str
The type of the reward.
uuid : str
The unique identifier of the reward.
amount : int
The amount of the reward.
isHighlighted : bool
Indicates whether the reward is highlighted or not.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Expand source code
class Reward(BaseModel):
    """
    Represents a reward in the Valorant API.

    Attributes:
        type (str): The type of the reward.
        uuid (str): The unique identifier of the reward.
        amount (int): The amount of the reward.
        isHighlighted (bool): Indicates whether the reward is highlighted or not.
    """
    type: str
    uuid: str
    amount: int
    isHighlighted: bool

Ancestors

  • pydantic.main.BaseModel

Class variables

var amount : int
var isHighlighted : bool
var model_computed_fields
var model_config
var model_fields
var type : str
var uuid : str