Module tdlight.api
Package it.tdlight.jni

# Class TdApi.PremiumGiftCodePaymentOption

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

Enclosing class:
  TdApi

public static final class TdApi.PremiumGiftCodePaymentOption extends TdApi.Object
Describes an option for creating Telegram Premium gift codes.

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`amount`
The amount to pay, in the smallest units of the currency.
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`String`
`currency`
ISO 4217 currency code for Telegram Premium gift code payment.
`int`
`monthCount`
Number of months the Telegram Premium subscription will be active.
`String`
`storeProductId`
Identifier of the store product associated with the option; may be empty if none.
`int`
`storeProductQuantity`
Number of times the store product must be paid.
`int`
`userCount`
Number of users which will be able to activate the gift codes.

## Constructor Summary

Constructors
Constructor
Description
`PremiumGiftCodePaymentOption()`
Describes an option for creating Telegram Premium gift codes.
`PremiumGiftCodePaymentOption(DataInput input)`
Describes an option for creating Telegram Premium gift codes.
`PremiumGiftCodePaymentOption(String currency, long amount, int userCount, int monthCount, String storeProductId, int storeProductQuantity)`
Describes an option for creating Telegram Premium gift codes.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

### 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 for Telegram Premium gift code payment.

### amount

public long amount
The amount to pay, in the smallest units of the currency.

### userCount

public int userCount
Number of users which will be able to activate the gift codes.

### monthCount

public int monthCount
Number of months the Telegram Premium subscription will be active.

### storeProductId

public String storeProductId
Identifier of the store product associated with the option; may be empty if none.

### storeProductQuantity

public int storeProductQuantity
Number of times the store product must be paid.

### CONSTRUCTOR

public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.

See Also:
  - Constant Field Values

## Constructor Details

### PremiumGiftCodePaymentOption

public PremiumGiftCodePaymentOption()
Describes an option for creating Telegram Premium gift codes.

### PremiumGiftCodePaymentOption

public PremiumGiftCodePaymentOption(String currency, long amount, int userCount, int monthCount, String storeProductId, int storeProductQuantity)
Describes an option for creating Telegram Premium gift codes.

Parameters:
  `currency` - ISO 4217 currency code for Telegram Premium gift code payment.
  `amount` - The amount to pay, in the smallest units of the currency.
  `userCount` - Number of users which will be able to activate the gift codes.
  `monthCount` - Number of months the Telegram Premium subscription will be active.
  `storeProductId` - Identifier of the store product associated with the option; may be empty if none.
  `storeProductQuantity` - Number of times the store product must be paid.

### PremiumGiftCodePaymentOption

public PremiumGiftCodePaymentOption(DataInput input) throws IOException
Describes an option for creating Telegram Premium gift codes.

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`