peyk.platforms.bale.types.labeled_price

Classes

LabeledPrice(label, amount)

A portion of the price for goods or services.

class peyk.platforms.bale.types.labeled_price.LabeledPrice(label: str, amount: int)[source]

Bases: object

A portion of the price for goods or services.

label: str
amount: int
classmethod from_dict(data: dict | None) LabeledPrice | None[source]

Parse raw Bale data into LabeledPrice.

Parameters:

data (Optional[dict]) – Raw API object or None.

Returns:

Parsed object or None.

Return type:

Optional[LabeledPrice]

Raises:

KeyError – If a required raw field is missing.

classmethod list_from_result(data: List[dict] | None) List[LabeledPrice] | None[source]

Parse raw Bale data into LabeledPrice.

Parameters:

data (Optional[dict]) – Raw API object or None.

Returns:

Parsed object or None.

Return type:

Optional[LabeledPrice]

Raises:

KeyError – If a required raw field is missing.