Package org.drinkless.tdlib

# Class TdApi.SendGiftPurchaseOffer

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.Ok>
org.drinkless.tdlib.TdApi.SendGiftPurchaseOffer

Enclosing class:
  `TdApi`

public static class TdApi.SendGiftPurchaseOffer extends TdApi.Function<TdApi.Ok>
Sends an offer to purchase an upgraded gift.

Returns `Ok`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `int`
  `duration`
  Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200.
  `String`
  `giftName`
  Name of the upgraded gift.
  `TdApi.MessageSender`
  `ownerId`
  Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
  `long`
  `paidMessageStarCount`
  The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoingPaidMessageStarCount for users and 0 otherwise.
  `TdApi.GiftResalePrice`
  `price`
  The price that the user agreed to pay for the gift.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SendGiftPurchaseOffer()`
  Default constructor for a function, which sends an offer to purchase an upgraded gift.
  `SendGiftPurchaseOffer(TdApi.MessageSender ownerId, String giftName, TdApi.GiftResalePrice price, int duration, long paidMessageStarCount)`
  Creates a function, which sends an offer to purchase an upgraded gift.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ownerId

    public TdApi.MessageSender ownerId
    Identifier of the user or the channel chat that currently owns the gift and will receive the offer.

  - ### giftName

    public String giftName
    Name of the upgraded gift.

  - ### price

    public TdApi.GiftResalePrice price
    The price that the user agreed to pay for the gift.

  - ### duration

    public int duration
    Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.

  - ### paidMessageStarCount

    public long paidMessageStarCount
    The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoingPaidMessageStarCount for users and 0 otherwise.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SendGiftPurchaseOffer

    public SendGiftPurchaseOffer()
    Default constructor for a function, which sends an offer to purchase an upgraded gift.

    Returns `Ok`

  - ### SendGiftPurchaseOffer

    public SendGiftPurchaseOffer(TdApi.MessageSender ownerId, String giftName, TdApi.GiftResalePrice price, int duration, long paidMessageStarCount)
    Creates a function, which sends an offer to purchase an upgraded gift.

    Returns `Ok`

    Parameters:
      `ownerId` - Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
      `giftName` - Name of the upgraded gift.
      `price` - The price that the user agreed to pay for the gift.
      `duration` - Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
      `paidMessageStarCount` - The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoingPaidMessageStarCount for users and 0 otherwise.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.Ok>`
    Returns:
      this.CONSTRUCTOR