Module tdlight.api

Class TdApi.MessageInvoice

Enclosing class:
TdApi

public static final class TdApi.MessageInvoice extends TdApi.MessageContent
A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
  • Field Details

    • title

      public String title
      Product title.
    • description

      public TdApi.FormattedText description
      Product description.
    • photo

      public TdApi.Photo photo
      Product photo; may be null.
    • currency

      public String currency
      Currency for the product price.
    • totalAmount

      public long totalAmount
      Product total price in the smallest units of the currency.
    • startParameter

      public String startParameter
      Unique invoice bot startParameter to be passed to getInternalLink.
    • isTest

      public boolean isTest
      True, if the invoice is a test invoice.
    • needShippingAddress

      public boolean needShippingAddress
      True, if the shipping address must be specified.
    • receiptMessageId

      public long receiptMessageId
      The identifier of the message with the receipt, after the product has been purchased.
    • extendedMedia

      public TdApi.MessageExtendedMedia extendedMedia
      Extended media attached to the invoice; may be null.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • MessageInvoice

      public MessageInvoice()
      A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
    • MessageInvoice

      public MessageInvoice(String title, TdApi.FormattedText description, TdApi.Photo photo, String currency, long totalAmount, String startParameter, boolean isTest, boolean needShippingAddress, long receiptMessageId, TdApi.MessageExtendedMedia extendedMedia)
      A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
      Parameters:
      title - Product title.
      description - Product description.
      photo - Product photo; may be null.
      currency - Currency for the product price.
      totalAmount - Product total price in the smallest units of the currency.
      startParameter - Unique invoice bot startParameter to be passed to getInternalLink.
      isTest - True, if the invoice is a test invoice.
      needShippingAddress - True, if the shipping address must be specified.
      receiptMessageId - The identifier of the message with the receipt, after the product has been purchased.
      extendedMedia - Extended media attached to the invoice; may be null.
    • MessageInvoice

      public MessageInvoice(DataInput input) throws IOException
      A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
      Parameters:
      input - Serialized input
      Throws:
      IOException - the deserialization failed
  • 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.Object
      Returns:
      this.CONSTRUCTOR
    • serialize

      public void serialize(DataOutput output) throws IOException
      Serialize the TDLib class
      Specified by:
      serialize in class TdApi.Object
      Parameters:
      output - output data stream
      Throws:
      IOException - the serialization failed
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object