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 |
| require_premium | Bool | Optional | This gift can only be bought by users with a Premium subscription. |
| limited_per_user | Bool | Optional | If set, the maximum number of gifts of this type that can be owned by a single user is limited and specified in per_user_total, and the remaining slots for the current user in per_user_remains. |
| peer_color_available | Bool | Optional | |
| 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. |
| availability_resale | long | Optional | The total number of (upgraded to collectibles) gifts of this type currently on resale |
| 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 | The number of Telegram Stars the user can pay to convert the gift into a collectible gift ». |
| resell_min_stars | long | Optional | The minimum price in Stars for gifts of this type currently on resale. |
| title | string | Optional | Title of the gift |
| released_by | Peer | Optional | This gift was released by the specified peer. |
| per_user_total | int | Optional | Maximum number of gifts of this type that can be owned by any user. |
| per_user_remains | int | Optional | Remaining number of gifts of this type that can be owned by the current user. |
| locked_until_date | int | Optional | If set, the specified gift possibly cannot be sent until the specified date, see here » for the full flow. |
Type: StarGift
Example:
$starGift = ['_' => 'starGift', 'limited' => Bool, 'sold_out' => Bool, 'birthday' => Bool, 'require_premium' => Bool, 'limited_per_user' => Bool, 'peer_color_available' => Bool, 'id' => long, 'sticker' => Document, 'stars' => long, 'availability_remains' => int, 'availability_total' => int, 'availability_resale' => long, 'convert_stars' => long, 'first_sale_date' => int, 'last_sale_date' => int, 'upgrade_stars' => long, 'resell_min_stars' => long, 'title' => 'string', 'released_by' => Peer, 'per_user_total' => int, 'per_user_remains' => int, 'locked_until_date' => int];