Class InputInvoiceMessageContent

java.lang.Object
io.github.natanimn.telebof.types.input.InputInvoiceMessageContent
All Implemented Interfaces:
InputMessageContent, Serializable

public class InputInvoiceMessageContent extends Object implements InputMessageContent
Represents the content of an invoice message to be sent as the result of an inline query.
Since:
3 March 2025
See Also:
  • Constructor Details

  • Method Details

    • setProviderToken

      public InputInvoiceMessageContent setProviderToken(String providerToken)
      Parameters:
      providerToken - Payment provider token
      Returns:
      this
    • setProviderData

      public InputInvoiceMessageContent setProviderData(String providerData)
      Parameters:
      providerData - Data about the invoice, which will be shared with the payment provider.
      Returns:
      this
    • setPhotoUrl

      public InputInvoiceMessageContent setPhotoUrl(String photoUrl)
      Parameters:
      photoUrl - URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
      Returns:
      this
    • setPhotoSize

      public InputInvoiceMessageContent setPhotoSize(Integer photoSize)
      Parameters:
      photoSize - Photo size in bytes
      Returns:
      this
    • setPhotoWidth

      public InputInvoiceMessageContent setPhotoWidth(Integer photoWidth)
      Parameters:
      photoWidth - Photo width
      Returns:
      this
    • setPhotoHeight

      public InputInvoiceMessageContent setPhotoHeight(Integer photoHeight)
      Parameters:
      photoHeight - Photo height
      Returns:
      this
    • setMaxTipAmount

      public InputInvoiceMessageContent setMaxTipAmount(Integer maxTipAmount)
      Parameters:
      maxTipAmount - The maximum accepted amount for tips in the smallest units of the currency. Defaults to 0. Not supported for payments in Telegram Stars.
      Returns:
      this
    • setSuggestedTipAmounts

      public InputInvoiceMessageContent setSuggestedTipAmounts(List<Integer> suggestedTipAmounts)
      Parameters:
      suggestedTipAmounts - Array of suggested amounts of tip in the smallest units of the currency. At most 4 suggested tip amounts can be specified.
      Returns:
      this
    • setNeedName

      public InputInvoiceMessageContent setNeedName(Boolean needName)
      Parameters:
      needName - Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.
      Returns:
      this
    • setNeedPhoneNumber

      public InputInvoiceMessageContent setNeedPhoneNumber(Boolean needPhoneNumber)
      Parameters:
      needPhoneNumber - Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.
      Returns:
      this
    • setNeedEmail

      public InputInvoiceMessageContent setNeedEmail(Boolean needEmail)
      Parameters:
      needEmail - Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.
      Returns:
      this
    • setNeedShippingAddress

      public InputInvoiceMessageContent setNeedShippingAddress(Boolean needShippingAddress)
      Parameters:
      needShippingAddress - Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.
      Returns:
      this
    • setSendPhoneNumberToProvider

      public InputInvoiceMessageContent setSendPhoneNumberToProvider(Boolean sendPhoneNumberToProvider)
      Parameters:
      sendPhoneNumberToProvider - Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.
      Returns:
      this
    • setSendEmailToProvider

      public InputInvoiceMessageContent setSendEmailToProvider(Boolean sendEmailToProvider)
      Parameters:
      sendEmailToProvider - Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.
      Returns:
      this
    • setFlexible

      public InputInvoiceMessageContent setFlexible(Boolean flexible)
      Parameters:
      flexible - Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.
      Returns:
      this