class

Tourmaline::TransactionPartnerUser

Inherits JSON::Serializable < Reference < Object

Describes a transaction with a user.

Constructors

new(type : String, transaction_type : String, user : Tourmaline::User, affiliate : Tourmaline::AffiliateInfo | Nil = nil, invoice_payload : String | Nil = nil, subscription_period : Int32 | Int64 | Nil = nil, paid_media : Array(Tourmaline::PaidMedia) = [] of Tourmaline::PaidMedia, paid_media_payload : String | Nil = nil, gift : Tourmaline::Gift | Nil = nil, premium_subscription_duration : Int32 | Int64 | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

affiliate

Optional. Information about the affiliate that received a commission via this transaction. Can be available only for "invoice_payment" and "paid_media_payment" transactions.

Source
affiliate=(affiliate : Tourmaline::AffiliateInfo | Nil)

Optional. Information about the affiliate that received a commission via this transaction. Can be available only for "invoice_payment" and "paid_media_payment" transactions.

Source
gift

Optional. The gift sent to the user by the bot; for "gift_purchase" transactions only

Source
gift=(gift : Tourmaline::Gift | Nil)

Optional. The gift sent to the user by the bot; for "gift_purchase" transactions only

Source
invoice_payload

Optional. Bot-specified invoice payload. Can be available only for "invoice_payment" transactions.

Source
invoice_payload=(invoice_payload : String | Nil)

Optional. Bot-specified invoice payload. Can be available only for "invoice_payment" transactions.

Source
premium_subscription_duration

Optional. Number of months the gifted Telegram Premium subscription will be active for; for "premium_purchase" transactions only

Source
premium_subscription_duration=(premium_subscription_duration : Int32 | Int64 | Nil)

Optional. Number of months the gifted Telegram Premium subscription will be active for; for "premium_purchase" transactions only

Source
subscription_period

Optional. The duration of the paid subscription. Can be available only for "invoice_payment" transactions.

Source
subscription_period=(subscription_period : Int32 | Int64 | Nil)

Optional. The duration of the paid subscription. Can be available only for "invoice_payment" transactions.

Source
transaction_type

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

Source
transaction_type=(transaction_type : String)

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

Source
type

Type of the transaction partner, always "user"

Source
type=(type : String)

Type of the transaction partner, always "user"

Source
user

Information about the user

Source
user=(user : Tourmaline::User)

Information about the user

Source