Constructor: starGift
Represents a star gift, see here » for more info.
Attributes:
Name | Type | Required | Description |
---|---|---|---|
limited | Bool | Optional | Whether this is a limited-supply gift. |
sold_out | Bool | Optional | Whether this gift sold out and cannot be bought anymore. |
birthday | Bool | Optional | Whether this is a birthday-themed gift |
id | long | Yes | Identifier of the gift |
sticker | Document | Optional | Sticker that represents the gift. |
stars | long | Yes | Price of the gift in Telegram Stars. |
availability_remains | int | Optional | For limited-supply gifts: the remaining number of gifts that may be bought. |
availability_total | int | Optional | For limited-supply gifts: the total number of gifts that was available in the initial supply. |
convert_stars | long | Yes | The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars . |
first_sale_date | int | Optional | For sold out gifts only: when was the gift first bought. |
last_sale_date | int | Optional | For sold out gifts only: when was the gift last bought. |
upgrade_stars | long | Optional |
Type: StarGift
Example:
$starGift = ['_' => 'starGift', 'limited' => Bool, 'sold_out' => Bool, 'birthday' => Bool, 'id' => long, 'sticker' => Document, 'stars' => long, 'availability_remains' => int, 'availability_total' => int, 'convert_stars' => long, 'first_sale_date' => int, 'last_sale_date' => int, 'upgrade_stars' => long];