Package org.drinkless.tdlib

# Class TdApi.AddOffer

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.Message>
org.drinkless.tdlib.TdApi.AddOffer

Enclosing class:
  `TdApi`

public static class TdApi.AddOffer extends TdApi.Function<TdApi.Message>
Sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post. Returns the sent message.

Returns `Message`

- ## 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
  `long`
  `chatId`
  Identifier of the channel direct messages chat.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `messageId`
  Identifier of the message in the chat which will be sent as suggested post.
  `TdApi.MessageSendOptions`
  `options`
  Options to be used to send the message.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddOffer()`
  Default constructor for a function, which sends a suggested post based on a previously sent message in a channel direct messages chat.
  `AddOffer(long chatId, long messageId, TdApi.MessageSendOptions options)`
  Creates a function, which sends a suggested post based on a previously sent message in a channel direct messages chat.

- ## 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

  - ### chatId

    public long chatId
    Identifier of the channel direct messages chat.

  - ### messageId

    public long messageId
    Identifier of the message in the chat which will be sent as suggested post. Use messageProperties.canAddOffer to check whether an offer can be added or messageProperties.canEditSuggestedPostInfo to check whether price or time of sending of the post can be changed.

  - ### options

    public TdApi.MessageSendOptions options
    Options to be used to send the message. New information about the suggested post must always be specified.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### AddOffer

    public AddOffer()
    Default constructor for a function, which sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post. Returns the sent message.

    Returns `Message`

  - ### AddOffer

    public AddOffer(long chatId, long messageId, TdApi.MessageSendOptions options)
    Creates a function, which sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post. Returns the sent message.

    Returns `Message`

    Parameters:
      `chatId` - Identifier of the channel direct messages chat.
      `messageId` - Identifier of the message in the chat which will be sent as suggested post. Use messageProperties.canAddOffer to check whether an offer can be added or messageProperties.canEditSuggestedPostInfo to check whether price or time of sending of the post can be changed.
      `options` - Options to be used to send the message. New information about the suggested post must always be specified.

- ## 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.Message>`
    Returns:
      this.CONSTRUCTOR