Webhooks Types¶
Типы данных для работы с webhooks.
Webhook¶
- class aioyookassa.types.webhooks.Webhook(*, id: str, event: str, url: str)[source]¶
Bases:
BaseModelWebhook object
Contains information about a subscription to a single event.
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].
WebhooksList¶
- class aioyookassa.types.webhooks.WebhooksList(*, items: List[Webhook] | None = None)[source]¶
Bases:
BaseModelList of webhooks
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].
WebhookEvent¶
Enum для типов событий webhook.
- class aioyookassa.types.enum.WebhookEvent(*values)[source]¶
Bases:
StrEnumWebhook event types
More detailed documentation: https://yookassa.ru/developers/api#webhook_object
WebhookNotification¶
Модель для входящих webhook-уведомлений от YooKassa.
- class aioyookassa.types.webhook_notification.WebhookNotification(*, type: Literal['notification'], event: str, object: dict)[source]¶
Bases:
BaseModelWebhook notification from YooKassa.
Contains information about an event that occurred in YooKassa. The object field contains the actual event data (Payment, Refund, Payout, etc.) which should be parsed based on the event type.
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].