class Hamilton::Types::TransactionPartnerUser

Overview

Describes a transaction with a user.

Included Modules

Defined in:

types/transaction_partner.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 affiliate : Hamilton::Types::AffiliateInfo | Nil #

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


def affiliate=(affiliate : Hamilton::Types::AffiliateInfo | Nil) #

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


def gift : Hamilton::Types::Gift | Nil #

The gift sent to the user by the bot; for “gift_purchase” transactions only.


def gift=(gift : Hamilton::Types::Gift | Nil) #

The gift sent to the user by the bot; for “gift_purchase” transactions only.


def invoice_payload : String | Nil #

Bot-specified invoice payload. Can be available only for “invoice_payment” transactions.


def invoice_payload=(invoice_payload : String | Nil) #

Bot-specified invoice payload. Can be available only for “invoice_payment” transactions.


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 premium_subscription_duration : Int32 | Nil #

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


def premium_subscription_duration=(premium_subscription_duration : Int32 | Nil) #

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


def subscription_period : Int32 | Nil #

The duration of the paid subscription. Can be available only for “invoice_payment” transactions.


def subscription_period=(subscription_period : Int32 | Nil) #

The duration of the paid subscription. Can be available only for “invoice_payment” transactions.


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.


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.


def type : String #

Type of the transaction partner, always "user".


def type=(type : String) #

Type of the transaction partner, always "user".


Information about the user.


def user=(user : Hamilton::Types::User) #

Information about the user.