Package org.drinkless.tdlib

# Class TdApi.SetAuthenticationPremiumPurchaseTransaction

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.Ok>
org.drinkless.tdlib.TdApi.SetAuthenticationPremiumPurchaseTransaction

Enclosing class:
  `TdApi`

public static class TdApi.SetAuthenticationPremiumPurchaseTransaction extends TdApi.Function<TdApi.Ok>
Informs server about an in-store purchase of Telegram Premium before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.

Returns `Ok`

- ## 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`
  `amount`
  Paid amount, in the smallest units of the currency.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `String`
  `currency`
  ISO 4217 currency code of the payment currency.
  `boolean`
  `isRestore`
  Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
  `int`
  `premiumDayCount`
  The number of days for which the Telegram Premium subscription will be granted.
  `TdApi.StoreTransaction`
  `transaction`
  Information about the transaction.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SetAuthenticationPremiumPurchaseTransaction()`
  Default constructor for a function, which informs server about an in-store purchase of Telegram Premium before authorization.
  `SetAuthenticationPremiumPurchaseTransaction(TdApi.StoreTransaction transaction, boolean isRestore, int premiumDayCount, String currency, long amount)`
  Creates a function, which informs server about an in-store purchase of Telegram Premium before authorization.

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

  - ### transaction

    public TdApi.StoreTransaction transaction
    Information about the transaction.

  - ### isRestore

    public boolean isRestore
    Pass true if this is a restore of a Telegram Premium purchase; only for App Store.

  - ### premiumDayCount

    public int premiumDayCount
    The number of days for which the Telegram Premium subscription will be granted.

  - ### currency

    public String currency
    ISO 4217 currency code of the payment currency.

  - ### amount

    public long amount
    Paid amount, in the smallest units of the currency.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### SetAuthenticationPremiumPurchaseTransaction

    public SetAuthenticationPremiumPurchaseTransaction()
    Default constructor for a function, which informs server about an in-store purchase of Telegram Premium before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.

    Returns `Ok`

  - ### SetAuthenticationPremiumPurchaseTransaction

    public SetAuthenticationPremiumPurchaseTransaction(TdApi.StoreTransaction transaction, boolean isRestore, int premiumDayCount, String currency, long amount)
    Creates a function, which informs server about an in-store purchase of Telegram Premium before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.

    Returns `Ok`

    Parameters:
      `transaction` - Information about the transaction.
      `isRestore` - Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
      `premiumDayCount` - The number of days for which the Telegram Premium subscription will be granted.
      `currency` - ISO 4217 currency code of the payment currency.
      `amount` - Paid amount, in the smallest units of the currency.

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