Deals Types

Типы данных для работы с безопасными сделками.

Deal

class aioyookassa.types.deals.Deal(*, type: str = 'safe_deal', id: str, fee_moment: FeeMoment, description: str | None = None, balance: Money, payout_balance: Money, status: DealStatus, created_at: datetime, expires_at: datetime, metadata: dict | None = None, test: bool)[source]

Bases: BaseModel

Deal object for Safe Deal API

Contains all information about a deal, current at the moment. It is created when a deal is created and comes in response to any request related to deals.

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.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

DealsList

class aioyookassa.types.deals.DealsList(*, items: List[Deal] | None = None, next_cursor: str | None = None)[source]

Bases: BaseModel

List of deals

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.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].