Record Class SendInvoice

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.SendInvoice
All Implemented Interfaces:
ApiMethod<Message>, ApiMethodMessage

public record SendInvoice(@NotNull String chatId, int messageThreadId, long directMessagesTopicId, @NotNull String title, @NotNull String description, @NotNull String payload, String providerToken, @NotNull String currency, @NotNull LabeledPrice[] prices, int maxTipAmount, int[] suggestedTipAmounts, String startParameter, String providerData, String photoUrl, int photoSize, int photoWidth, int photoHeight, boolean needName, boolean needPhoneNumber, boolean needEmail, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailToProvider, boolean isFlexible, boolean disableNotification, boolean protectContent, boolean allowPaidBroadcast, String messageEffectId, @Nullable SuggestedPostParameters suggestedPostParameters, ReplyParameters replyParameters, InlineKeyboardMarkup replyMarkup) extends Record implements ApiMethodMessage
  • Constructor Details

    • SendInvoice

      public SendInvoice(@NotNull @NotNull String chatId, int messageThreadId, long directMessagesTopicId, @NotNull @NotNull String title, @NotNull @NotNull String description, @NotNull @NotNull String payload, String providerToken, @NotNull @NotNull String currency, @NotNull @NotNull LabeledPrice[] prices, int maxTipAmount, int[] suggestedTipAmounts, String startParameter, String providerData, String photoUrl, int photoSize, int photoWidth, int photoHeight, boolean needName, boolean needPhoneNumber, boolean needEmail, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailToProvider, boolean isFlexible, boolean disableNotification, boolean protectContent, boolean allowPaidBroadcast, String messageEffectId, @Nullable @Nullable SuggestedPostParameters suggestedPostParameters, ReplyParameters replyParameters, InlineKeyboardMarkup replyMarkup)
      Creates an instance of a SendInvoice record class.
      Parameters:
      chatId - the value for the chatId record component
      messageThreadId - the value for the messageThreadId record component
      directMessagesTopicId - the value for the directMessagesTopicId record component
      title - the value for the title record component
      description - the value for the description record component
      payload - the value for the payload record component
      providerToken - the value for the providerToken record component
      currency - the value for the currency record component
      prices - the value for the prices record component
      maxTipAmount - the value for the maxTipAmount record component
      suggestedTipAmounts - the value for the suggestedTipAmounts record component
      startParameter - the value for the startParameter record component
      providerData - the value for the providerData record component
      photoUrl - the value for the photoUrl record component
      photoSize - the value for the photoSize record component
      photoWidth - the value for the photoWidth record component
      photoHeight - the value for the photoHeight record component
      needName - the value for the needName record component
      needPhoneNumber - the value for the needPhoneNumber record component
      needEmail - the value for the needEmail record component
      needShippingAddress - the value for the needShippingAddress record component
      sendPhoneNumberToProvider - the value for the sendPhoneNumberToProvider record component
      sendEmailToProvider - the value for the sendEmailToProvider record component
      isFlexible - the value for the isFlexible record component
      disableNotification - the value for the disableNotification record component
      protectContent - the value for the protectContent record component
      allowPaidBroadcast - the value for the allowPaidBroadcast record component
      messageEffectId - the value for the messageEffectId record component
      suggestedPostParameters - the value for the suggestedPostParameters record component
      replyParameters - the value for the replyParameters record component
      replyMarkup - the value for the replyMarkup record component
  • Method Details

    • ofBuilder

      @NotNull public static @NotNull lombok.Builder ofBuilder(String chatId, String title, String description, String payload, String currency, LabeledPrice[] prices)
    • getEndpointURL

      @NotNull public @NotNull String getEndpointURL()
      Description copied from interface: ApiMethod
      Returns the endpoint URL for the Telegram Bot API method.
      Specified by:
      getEndpointURL in interface ApiMethod<Message>
      Returns:
      the endpoint URL
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • chatId

      @NotNull public @NotNull String chatId()
      Returns the value of the chatId record component.
      Returns:
      the value of the chatId record component
    • messageThreadId

      public int messageThreadId()
      Returns the value of the messageThreadId record component.
      Returns:
      the value of the messageThreadId record component
    • directMessagesTopicId

      public long directMessagesTopicId()
      Returns the value of the directMessagesTopicId record component.
      Returns:
      the value of the directMessagesTopicId record component
    • title

      @NotNull public @NotNull String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • description

      @NotNull public @NotNull String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • payload

      @NotNull public @NotNull String payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component
    • providerToken

      public String providerToken()
      Returns the value of the providerToken record component.
      Returns:
      the value of the providerToken record component
    • currency

      @NotNull public @NotNull String currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • prices

      @NotNull public @NotNull LabeledPrice[] prices()
      Returns the value of the prices record component.
      Returns:
      the value of the prices record component
    • maxTipAmount

      public int maxTipAmount()
      Returns the value of the maxTipAmount record component.
      Returns:
      the value of the maxTipAmount record component
    • suggestedTipAmounts

      public int[] suggestedTipAmounts()
      Returns the value of the suggestedTipAmounts record component.
      Returns:
      the value of the suggestedTipAmounts record component
    • startParameter

      public String startParameter()
      Returns the value of the startParameter record component.
      Returns:
      the value of the startParameter record component
    • providerData

      public String providerData()
      Returns the value of the providerData record component.
      Returns:
      the value of the providerData record component
    • photoUrl

      public String photoUrl()
      Returns the value of the photoUrl record component.
      Returns:
      the value of the photoUrl record component
    • photoSize

      public int photoSize()
      Returns the value of the photoSize record component.
      Returns:
      the value of the photoSize record component
    • photoWidth

      public int photoWidth()
      Returns the value of the photoWidth record component.
      Returns:
      the value of the photoWidth record component
    • photoHeight

      public int photoHeight()
      Returns the value of the photoHeight record component.
      Returns:
      the value of the photoHeight record component
    • needName

      public boolean needName()
      Returns the value of the needName record component.
      Returns:
      the value of the needName record component
    • needPhoneNumber

      public boolean needPhoneNumber()
      Returns the value of the needPhoneNumber record component.
      Returns:
      the value of the needPhoneNumber record component
    • needEmail

      public boolean needEmail()
      Returns the value of the needEmail record component.
      Returns:
      the value of the needEmail record component
    • needShippingAddress

      public boolean needShippingAddress()
      Returns the value of the needShippingAddress record component.
      Returns:
      the value of the needShippingAddress record component
    • sendPhoneNumberToProvider

      public boolean sendPhoneNumberToProvider()
      Returns the value of the sendPhoneNumberToProvider record component.
      Returns:
      the value of the sendPhoneNumberToProvider record component
    • sendEmailToProvider

      public boolean sendEmailToProvider()
      Returns the value of the sendEmailToProvider record component.
      Returns:
      the value of the sendEmailToProvider record component
    • isFlexible

      public boolean isFlexible()
      Returns the value of the isFlexible record component.
      Returns:
      the value of the isFlexible record component
    • disableNotification

      public boolean disableNotification()
      Returns the value of the disableNotification record component.
      Returns:
      the value of the disableNotification record component
    • protectContent

      public boolean protectContent()
      Returns the value of the protectContent record component.
      Returns:
      the value of the protectContent record component
    • allowPaidBroadcast

      public boolean allowPaidBroadcast()
      Returns the value of the allowPaidBroadcast record component.
      Returns:
      the value of the allowPaidBroadcast record component
    • messageEffectId

      public String messageEffectId()
      Returns the value of the messageEffectId record component.
      Returns:
      the value of the messageEffectId record component
    • suggestedPostParameters

      @Nullable public @Nullable SuggestedPostParameters suggestedPostParameters()
      Returns the value of the suggestedPostParameters record component.
      Returns:
      the value of the suggestedPostParameters record component
    • replyParameters

      public ReplyParameters replyParameters()
      Returns the value of the replyParameters record component.
      Returns:
      the value of the replyParameters record component
    • replyMarkup

      public InlineKeyboardMarkup replyMarkup()
      Returns the value of the replyMarkup record component.
      Returns:
      the value of the replyMarkup record component