Package org.drinkless.tdlib

# Class TdApi.Invoice

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Invoice

Enclosing class:
  `TdApi`

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `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.
  `String`
  `recurringPaymentTermsOfServiceUrl`
  An HTTP URL with terms of service for recurring payments.
  `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.
  `int`
  `subscriptionPeriod`
  The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.
  `long[]`
  `suggestedTipAmounts`
  Suggested amounts of tip in the smallest units of the currency.
  `String`
  `termsOfServiceUrl`
  An HTTP URL with terms of service for non-recurring payments.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Invoice()`
  Product invoice.
  `Invoice(String currency, TdApi.LabeledPricePart[] priceParts, int subscriptionPeriod, long maxTipAmount, long[] suggestedTipAmounts, String recurringPaymentTermsOfServiceUrl, String termsOfServiceUrl, 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
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

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

  `clone, equals, finalize, getClass, hashCode, 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.

  - ### subscriptionPeriod

    public int subscriptionPeriod
    The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.

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

  - ### recurringPaymentTermsOfServiceUrl

    public String recurringPaymentTermsOfServiceUrl
    An HTTP URL with terms of service for recurring payments. If non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay.

  - ### termsOfServiceUrl

    public String termsOfServiceUrl
    An HTTP URL with terms of service for non-recurring payments. If non-empty, then the user must accept the terms of service before allowed to pay.

  - ### 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
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Invoice

    public Invoice()
    Product invoice.

  - ### Invoice

    public Invoice(String currency, TdApi.LabeledPricePart[] priceParts, int subscriptionPeriod, long maxTipAmount, long[] suggestedTipAmounts, String recurringPaymentTermsOfServiceUrl, String termsOfServiceUrl, boolean isTest, boolean needName, boolean needPhoneNumber, boolean needEmailAddress, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailAddressToProvider, boolean isFlexible)
    Product invoice.
    Parameters:
      `currency` - ISO 4217 currency code.
      `priceParts` - A list of objects used to calculate the total price of the product.
      `subscriptionPeriod` - The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.
      `maxTipAmount` - The maximum allowed amount of tip in the smallest units of the currency.
      `suggestedTipAmounts` - Suggested amounts of tip in the smallest units of the currency.
      `recurringPaymentTermsOfServiceUrl` - An HTTP URL with terms of service for recurring payments. If non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay.
      `termsOfServiceUrl` - An HTTP URL with terms of service for non-recurring payments. If non-empty, then the user must accept the terms of service before allowed to pay.
      `isTest` - True, if the payment is a test payment.
      `needName` - True, if the user's name is needed for payment.
      `needPhoneNumber` - True, if the user's phone number is needed for payment.
      `needEmailAddress` - True, if the user's email address is needed for payment.
      `needShippingAddress` - True, if the user's shipping address is needed for payment.
      `sendPhoneNumberToProvider` - True, if the user's phone number will be sent to the provider.
      `sendEmailAddressToProvider` - True, if the user's email address will be sent to the provider.
      `isFlexible` - True, if the total price depends on the shipping method.

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