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
Author:
Natanim
See Also:
  • Field Details

    • title

      private final String title
    • description

      private final String description
    • payload

      private final String payload
    • currency

      private final String currency
    • prices

      private final List<LabeledPrice> prices
    • providerToken

      @SerializedName("provider_token") private String providerToken
    • providerData

      @SerializedName("provider_data") private String providerData
    • photoUrl

      @SerializedName("photo_url") private String photoUrl
    • photoSize

      @SerializedName("photo_size") private Integer photoSize
    • photoWidth

      @SerializedName("photo_width") private Integer photoWidth
    • photoHeight

      @SerializedName("photo_height") private Integer photoHeight
    • maxTipAmount

      @SerializedName("max_tip_amount") private Integer maxTipAmount
    • suggestedTipAmounts

      @SerializedName("suggested_tip_amounts") private List<Integer> suggestedTipAmounts
    • needName

      @SerializedName("need_name") private Boolean needName
    • needPhoneNumber

      @SerializedName("need_phone_number") private Boolean needPhoneNumber
    • needEmail

      @SerializedName("need_email") private Boolean needEmail
    • needShippingAddress

      @SerializedName("need_shipping_address") private Boolean needShippingAddress
    • sendPhoneNumberToProvider

      @SerializedName("send_phone_number_to_provider") private Boolean sendPhoneNumberToProvider
    • sendEmailToProvider

      @SerializedName("send_email_to_provider") private Boolean sendEmailToProvider
    • isFlexible

      @SerializedName("is_flexible") private Boolean isFlexible
  • 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