Skip to content

Commit 0bd9133

Browse files
Added transaction_type to TransactionPartnerUser
1 parent f76cac8 commit 0bd9133

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

telebot/types.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10551,6 +10551,11 @@ class TransactionPartnerUser(TransactionPartner):
1055110551
:param type: Type of the transaction partner, always “user”
1055210552
:type type: :obj:`str`
1055310553

10554+
:param transaction_type: Type of the transaction, currently one of “invoice_payment” for payments via invoices,
10555+
“paid_media_payment” for payments for paid media, “gift_purchase” for gifts sent by the bot, “premium_purchase” for Telegram Premium subscriptions
10556+
gifted by the bot, “business_account_transfer” for direct transfers from managed business accounts
10557+
:type transaction_type: :obj:`str`
10558+
1055410559
:param user: Information about the user
1055510560
:type user: :class:`User`
1055610561

@@ -10577,7 +10582,8 @@ class TransactionPartnerUser(TransactionPartner):
1057710582
"""
1057810583

1057910584
def __init__(self, type, user, affiliate=None, invoice_payload=None, paid_media: Optional[List[PaidMedia]] = None,
10580-
subscription_period=None, gift: Optional[Gift] = None, premium_subscription_duration: Optional[int] = None, **kwargs):
10585+
subscription_period=None, gift: Optional[Gift] = None, premium_subscription_duration: Optional[int] = None,
10586+
transaction_type: Optional[str] = None, **kwargs):
1058110587
self.type: str = type
1058210588
self.user: User = user
1058310589
self.affiliate: Optional[AffiliateInfo] = affiliate
@@ -10586,6 +10592,7 @@ def __init__(self, type, user, affiliate=None, invoice_payload=None, paid_media:
1058610592
self.subscription_period: Optional[int] = subscription_period
1058710593
self.gift: Optional[Gift] = gift
1058810594
self.premium_subscription_duration: Optional[int] = premium_subscription_duration
10595+
self.transaction_type: Optional[str] = transaction_type
1058910596

1059010597
@classmethod
1059110598
def de_json(cls, json_string):

0 commit comments

Comments
 (0)