Module tdlight.api
Package it.tdlight.jni

# Class TdApi.Invoice

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Invoice

Enclosing class:
  TdApi

public static final class TdApi.Invoice extends TdApi.Object
Product invoice.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
`String`
`currency`
ISO 4217 currency code.
`boolean`
`isFlexible`
True, if the total price depends on the shipping method.
`boolean`
`isTest`
True, if the payment is a test payment.
`long`
`maxTipAmount`
The maximum allowed amount of tip in the smallest units of the currency.
`boolean`
`needEmailAddress`
True, if the user's email address is needed for payment.
`boolean`
`needName`
True, if the user's name is needed for payment.
`boolean`
`needPhoneNumber`
True, if the user's phone number is needed for payment.
`boolean`
`needShippingAddress`
True, if the user's shipping address is needed for payment.
`TdApi.LabeledPricePart[]`
`priceParts`
A list of objects used to calculate the total price of the product.
`boolean`
`sendEmailAddressToProvider`
True, if the user's email address will be sent to the provider.
`boolean`
`sendPhoneNumberToProvider`
True, if the user's phone number will be sent to the provider.
`long[]`
`suggestedTipAmounts`
Suggested amounts of tip in the smallest units of the currency.

## Constructor Summary

Constructors
Constructor
Description
`Invoice()`
Product invoice.
`Invoice(DataInput input)`
Product invoice.
`Invoice(String currency, TdApi.LabeledPricePart[] priceParts, long maxTipAmount, long[] suggestedTipAmounts, boolean isTest, boolean needName, boolean needPhoneNumber, boolean needEmailAddress, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailAddressToProvider, boolean isFlexible)`
Product invoice.

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

### currency

public String currency
ISO 4217 currency code.

### priceParts

public TdApi.LabeledPricePart[] priceParts
A list of objects used to calculate the total price of the product.

### maxTipAmount

public long maxTipAmount
The maximum allowed amount of tip in the smallest units of the currency.

### suggestedTipAmounts

public long[] suggestedTipAmounts
Suggested amounts of tip in the smallest units of the currency.

### isTest

public boolean isTest
True, if the payment is a test payment.

### needName

public boolean needName
True, if the user's name is needed for payment.

### needPhoneNumber

public boolean needPhoneNumber
True, if the user's phone number is needed for payment.

### needEmailAddress

public boolean needEmailAddress
True, if the user's email address is needed for payment.

### needShippingAddress

public boolean needShippingAddress
True, if the user's shipping address is needed for payment.

### sendPhoneNumberToProvider

public boolean sendPhoneNumberToProvider
True, if the user's phone number will be sent to the provider.

### sendEmailAddressToProvider

public boolean sendEmailAddressToProvider
True, if the user's email address will be sent to the provider.

### isFlexible

public boolean isFlexible
True, if the total price depends on the shipping method.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### Invoice

public Invoice()
Product invoice.

### Invoice

public Invoice(String currency, TdApi.LabeledPricePart[] priceParts, long maxTipAmount, long[] suggestedTipAmounts, boolean isTest, boolean needName, boolean needPhoneNumber, boolean needEmailAddress, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailAddressToProvider, boolean isFlexible)
Product invoice.

Parameters:
  `currency` - String ISO 4217 currency code.
  `priceParts` - LabeledPricePart[] A list of objects used to calculate the total price of the product.
  `maxTipAmount` - long The maximum allowed amount of tip in the smallest units of the currency.
  `suggestedTipAmounts` - long[] Suggested amounts of tip in the smallest units of the currency.
  `isTest` - boolean True, if the payment is a test payment.
  `needName` - boolean True, if the user's name is needed for payment.
  `needPhoneNumber` - boolean True, if the user's phone number is needed for payment.
  `needEmailAddress` - boolean True, if the user's email address is needed for payment.
  `needShippingAddress` - boolean True, if the user's shipping address is needed for payment.
  `sendPhoneNumberToProvider` - boolean True, if the user's phone number will be sent to the provider.
  `sendEmailAddressToProvider` - boolean True, if the user's email address will be sent to the provider.
  `isFlexible` - boolean True, if the total price depends on the shipping method.

### Invoice

public Invoice(DataInput input) throws IOException
Product invoice.

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`