FILE / ScuroNeko/Laniakea
tgapi/stars_types.go
Исходный файл и его история в репозитории.
33 lines
1.5 KiB
Go
33 lines
1.5 KiB
Go
package tgapi
|
|
|
|
// StarTransaction describes a Telegram Star transaction.
|
|
// Since: Bot API 7.5
|
|
// See https://core.telegram.org/bots/api#startransaction
|
|
type StarTransaction struct {
|
|
// 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.
|
|
ID string `json:"id"`
|
|
// Amount Integer amount of Telegram Stars transferred by the transaction
|
|
Amount int `json:"amount"`
|
|
// NanostarAmount Optional. The number of 1/1000000000 shares of Telegram Stars transferred by the
|
|
// transaction; from 0 to 999999999
|
|
NanostarAmount int `json:"nanostar_amount,omitempty"`
|
|
// Date Date the transaction was created in Unix time
|
|
Date int `json:"date"`
|
|
// 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 map[string]any `json:"source,omitempty"`
|
|
// Receiver Optional. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for
|
|
// a withdrawal). Only for outgoing transactions.
|
|
Receiver map[string]any `json:"receiver,omitempty"`
|
|
}
|
|
|
|
// StarTransactions contains a list of Telegram Star transactions.
|
|
// Since: Bot API 7.5
|
|
// See https://core.telegram.org/bots/api#startransactions
|
|
type StarTransactions struct {
|
|
// Transactions The list of transactions
|
|
Transactions []StarTransaction `json:"transactions"`
|
|
}
|