class Hamilton::Types::StarTransaction

Overview

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.

Included Modules

Defined in:

types/star_transaction.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def amount : Int32 #

Integer amount of Telegram Stars transferred by the transaction.


def amount=(amount : Int32) #

Integer amount of Telegram Stars transferred by the transaction.


def date : Int32 #

Date the transaction was created in Unix time.


def date=(date : Int32) #

Date the transaction was created in Unix time.


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


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


def nanostar_amount : Int32 | Nil #

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


def nanostar_amount=(nanostar_amount : Int32 | Nil) #

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


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def receiver : Hamilton::Types::TransactionPartner | Nil #

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


def receiver=(receiver : Hamilton::Types::TransactionPartner | Nil) #

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


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


def source=(source : Hamilton::Types::TransactionPartner | Nil) #

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