peyk.platforms.telegram.types.transaction_partner_user¶
Classes
|
Describes a transaction with a user. |
- class peyk.platforms.telegram.types.transaction_partner_user.TransactionPartnerUser(transaction_type: str, user: User, type: str = 'user', affiliate: AffiliateInfo | None = None, invoice_payload: str | None = None, subscription_period: int | None = None, paid_media: List[PaidMediaLivePhoto | PaidMediaPhoto | PaidMediaPreview | PaidMediaVideo] | None = None, paid_media_payload: str | None = None, gift: Gift | None = None, premium_subscription_duration: int | None = None)[source]¶
Bases:
objectDescribes a transaction with a user.
- Variables:
type (str) – Type of the transaction partner, always ‘user’
transaction_type (str) – Type of the transaction, currently one of ‘invoice_payment’ for payments via invoices, ‘paid_media_payment’ for payments for paid media, ‘gift_purchase’ for gifts sent by the bot, ‘premium_purchase’ for Telegram Premium subscriptions gifted by the bot, ‘business_account_transfer’ for direct transfers from managed business accounts
user (peyk.platforms.telegram.types.user.User) – Information about the user
affiliate (peyk.platforms.telegram.types.affiliate_info.AffiliateInfo | None) – Information about the affiliate that received a commission via this transaction. Can be available only for ‘invoice_payment’ and ‘paid_media_payment’ transactions.
invoice_payload (str | None) – Bot-specified invoice payload. Can be available only for ‘invoice_payment’ transactions.
subscription_period (int | None) – The duration of the paid subscription. Can be available only for ‘invoice_payment’ transactions.
paid_media (List[peyk.platforms.telegram.types.paid_media_live_photo.PaidMediaLivePhoto | peyk.platforms.telegram.types.paid_media_photo.PaidMediaPhoto | peyk.platforms.telegram.types.paid_media_preview.PaidMediaPreview | peyk.platforms.telegram.types.paid_media_video.PaidMediaVideo] | None) – Information about the paid media bought by the user; for ‘paid_media_payment’ transactions only
paid_media_payload (str | None) – Bot-specified paid media payload. Can be available only for ‘paid_media_payment’ transactions.
gift (peyk.platforms.telegram.types.gift.Gift | None) – The gift sent to the user by the bot; for ‘gift_purchase’ transactions only
premium_subscription_duration (int | None) – Number of months the gifted Telegram Premium subscription will be active for; for ‘premium_purchase’ transactions only
- transaction_type: str¶
- type: str = 'user'¶
- affiliate: AffiliateInfo | None = None¶
- invoice_payload: str | None = None¶
- subscription_period: int | None = None¶
- paid_media: List[PaidMediaLivePhoto | PaidMediaPhoto | PaidMediaPreview | PaidMediaVideo] | None = None¶
- paid_media_payload: str | None = None¶
- classmethod from_dict(data: dict | None) TransactionPartnerUser | None[source]¶
Provides the from dict operation for the Telegram integration.
- Parameters:
data – Value used by this operation.
- Returns:
Result produced by the operation.