From 98c789f2729c2e264fc68c9a90f3a0d09f4b16c0 Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Tue, 18 Jun 2024 22:19:18 +0300 Subject: [PATCH] Update date type in RevenueWithdrawalStateSucceeded --- .butcher/types/RevenueWithdrawalStateSucceeded/replace.yml | 5 +++++ aiogram/types/revenue_withdrawal_state_succeeded.py | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .butcher/types/RevenueWithdrawalStateSucceeded/replace.yml diff --git a/.butcher/types/RevenueWithdrawalStateSucceeded/replace.yml b/.butcher/types/RevenueWithdrawalStateSucceeded/replace.yml new file mode 100644 index 00000000..80c48d76 --- /dev/null +++ b/.butcher/types/RevenueWithdrawalStateSucceeded/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: DateTime diff --git a/aiogram/types/revenue_withdrawal_state_succeeded.py b/aiogram/types/revenue_withdrawal_state_succeeded.py index 886e7ab8..48d45f10 100644 --- a/aiogram/types/revenue_withdrawal_state_succeeded.py +++ b/aiogram/types/revenue_withdrawal_state_succeeded.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Literal from ..enums import RevenueWithdrawalStateType +from .custom import DateTime from .revenue_withdrawal_state import RevenueWithdrawalState @@ -15,7 +16,7 @@ class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState): type: Literal[RevenueWithdrawalStateType.SUCCEEDED] = RevenueWithdrawalStateType.SUCCEEDED """Type of the state, always 'succeeded'""" - date: int + date: DateTime """Date the withdrawal was completed in Unix time""" url: str """An HTTPS URL that can be used to see transaction details""" @@ -30,7 +31,7 @@ class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState): type: Literal[ RevenueWithdrawalStateType.SUCCEEDED ] = RevenueWithdrawalStateType.SUCCEEDED, - date: int, + date: DateTime, url: str, **__pydantic_kwargs: Any, ) -> None: