Module tdlight.api
Package it.tdlight.jni

# Class TdApi.MessageInvoice

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.MessageContent
it.tdlight.jni.TdApi.MessageInvoice

Enclosing class:
  TdApi

public static final class TdApi.MessageInvoice extends TdApi.MessageContent
A message with an invoice from a bot.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
`String`
`currency`
Currency for the product price.
`String`
`description`
Product description.
`boolean`
`isTest`
True, if the invoice is a test invoice.
`boolean`
`needShippingAddress`
True, if the shipping address must be specified.
`TdApi.Photo`
`photo`
Product photo; may be null.
`long`
`receiptMessageId`
The identifier of the message with the receipt, after the product has been purchased.
`String`
`startParameter`
Unique invoice bot startParameter.
`String`
`title`
Product title.
`long`
`totalAmount`
Product total price in the smallest units of the currency.

## Constructor Summary

Constructors
Constructor
Description
`MessageInvoice()`
A message with an invoice from a bot.
`MessageInvoice(DataInput input)`
A message with an invoice from a bot.
`MessageInvoice(String title, String description, TdApi.Photo photo, String currency, long totalAmount, String startParameter, boolean isTest, boolean needShippingAddress, long receiptMessageId)`
A message with an invoice from a bot.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

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

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

## Field Details

### title

public String title
Product title.

### description

public String 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 share an invoice use the URL https://t.me/{botUsername}?start={startParameter}.

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

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### MessageInvoice

public MessageInvoice()
A message with an invoice from a bot.

### MessageInvoice

public MessageInvoice(String title, String description, TdApi.Photo photo, String currency, long totalAmount, String startParameter, boolean isTest, boolean needShippingAddress, long receiptMessageId)
A message with an invoice from a bot.

Parameters:
  `title` - String Product title.
  `description` - String Product description.
  `photo` - Photo Product photo; may be null.
  `currency` - String Currency for the product price.
  `totalAmount` - long Product total price in the smallest units of the currency.
  `startParameter` - String Unique invoice bot startParameter. To share an invoice use the URL https://t.me/{botUsername}?start={startParameter}.
  `isTest` - boolean True, if the invoice is a test invoice.
  `needShippingAddress` - boolean True, if the shipping address must be specified.
  `receiptMessageId` - long The identifier of the message with the receipt, after the product has been purchased.

### MessageInvoice

public MessageInvoice(DataInput input) throws IOException
A message with an invoice from a bot.

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`