class Tourmaline::TransactionPartnerUser

Overview

Describes a transaction with a user.

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.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) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def 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.


[View source]
def 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.


[View source]
def gift : Tourmaline::Gift | Nil #

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


[View source]
def gift=(gift : Tourmaline::Gift | Nil) #

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


[View source]
def invoice_payload : String | Nil #

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


[View source]
def invoice_payload=(invoice_payload : String | Nil) #

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


[View source]
def premium_subscription_duration : Int32 | Int64 | Nil #

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


[View source]
def 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


[View source]
def subscription_period : Int32 | Int64 | Nil #

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


[View source]
def subscription_period=(subscription_period : Int32 | Int64 | Nil) #

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


[View source]
def 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


[View source]
def 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


[View source]
def type : String #

Type of the transaction partner, always "user"


[View source]
def type=(type : String) #

Type of the transaction partner, always "user"


[View source]
def user : Tourmaline::User #

Information about the user


[View source]
def user=(user : Tourmaline::User) #

Information about the user


[View source]