class

Tourmaline::StarTransaction

Inherits JSON::Serializable < Reference < Object

Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.

Constructors

new(id : String, amount : Int32 | Int64, date : Time, nanostar_amount : Int32 | Int64 | Nil = nil, source : Tourmaline::TransactionPartner | Nil = nil, receiver : Tourmaline::TransactionPartner | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

amount

Integer amount of Telegram Stars transferred by the transaction

Source
amount=(amount : Int32 | Int64)

Integer amount of Telegram Stars transferred by the transaction

Source
date

Date the transaction was created in Unix time

Source
date=(date : Time)

Date the transaction was created in Unix time

Source
id

Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.

Source
id=(id : String)

Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.

Source
nanostar_amount

Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999

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

Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999

Source
receiver

Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions

Source
receiver=(receiver : Tourmaline::TransactionPartner | Nil)

Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions

Source
source

Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions

Source
source=(source : Tourmaline::TransactionPartner | Nil)

Optional. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions

Source