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
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionSendInvoice(@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) Creates an instance of aSendInvoicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowPaidBroadcastrecord component.@NotNull StringchatId()Returns the value of thechatIdrecord component.@NotNull Stringcurrency()Returns the value of thecurrencyrecord component.@NotNull StringReturns the value of thedescriptionrecord component.longReturns the value of thedirectMessagesTopicIdrecord component.booleanReturns the value of thedisableNotificationrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisFlexiblerecord component.intReturns the value of themaxTipAmountrecord component.Returns the value of themessageEffectIdrecord component.intReturns the value of themessageThreadIdrecord component.booleanReturns the value of theneedEmailrecord component.booleanneedName()Returns the value of theneedNamerecord component.booleanReturns the value of theneedPhoneNumberrecord component.booleanReturns the value of theneedShippingAddressrecord component.static @NotNull lombok.BuilderofBuilder(String chatId, String title, String description, String payload, String currency, LabeledPrice[] prices) @NotNull Stringpayload()Returns the value of thepayloadrecord component.intReturns the value of thephotoHeightrecord component.intReturns the value of thephotoSizerecord component.photoUrl()Returns the value of thephotoUrlrecord component.intReturns the value of thephotoWidthrecord component.@NotNull LabeledPrice[]prices()Returns the value of thepricesrecord component.booleanReturns the value of theprotectContentrecord component.Returns the value of theproviderDatarecord component.Returns the value of theproviderTokenrecord component.Returns the value of thereplyMarkuprecord component.Returns the value of thereplyParametersrecord component.booleanReturns the value of thesendEmailToProviderrecord component.booleanReturns the value of thesendPhoneNumberToProviderrecord component.Returns the value of thestartParameterrecord component.@Nullable SuggestedPostParametersReturns the value of thesuggestedPostParametersrecord component.int[]Returns the value of thesuggestedTipAmountsrecord component.@NotNull Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.teleight.teleightbots.api.ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializableMethods inherited from interface org.teleight.teleightbots.api.ApiMethodMessage
deserializeResponse
-
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 aSendInvoicerecord class.- Parameters:
chatId- the value for thechatIdrecord componentmessageThreadId- the value for themessageThreadIdrecord componentdirectMessagesTopicId- the value for thedirectMessagesTopicIdrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentpayload- the value for thepayloadrecord componentproviderToken- the value for theproviderTokenrecord componentcurrency- the value for thecurrencyrecord componentprices- the value for thepricesrecord componentmaxTipAmount- the value for themaxTipAmountrecord componentsuggestedTipAmounts- the value for thesuggestedTipAmountsrecord componentstartParameter- the value for thestartParameterrecord componentproviderData- the value for theproviderDatarecord componentphotoUrl- the value for thephotoUrlrecord componentphotoSize- the value for thephotoSizerecord componentphotoWidth- the value for thephotoWidthrecord componentphotoHeight- the value for thephotoHeightrecord componentneedName- the value for theneedNamerecord componentneedPhoneNumber- the value for theneedPhoneNumberrecord componentneedEmail- the value for theneedEmailrecord componentneedShippingAddress- the value for theneedShippingAddressrecord componentsendPhoneNumberToProvider- the value for thesendPhoneNumberToProviderrecord componentsendEmailToProvider- the value for thesendEmailToProviderrecord componentisFlexible- the value for theisFlexiblerecord componentdisableNotification- the value for thedisableNotificationrecord componentprotectContent- the value for theprotectContentrecord componentallowPaidBroadcast- the value for theallowPaidBroadcastrecord componentmessageEffectId- the value for themessageEffectIdrecord componentsuggestedPostParameters- the value for thesuggestedPostParametersrecord componentreplyParameters- the value for thereplyParametersrecord componentreplyMarkup- the value for thereplyMarkuprecord component
-
-
Method Details
-
ofBuilder
-
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<Message>- Returns:
- the endpoint URL
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
chatId
Returns the value of thechatIdrecord component.- Returns:
- the value of the
chatIdrecord component
-
messageThreadId
public int messageThreadId()Returns the value of themessageThreadIdrecord component.- Returns:
- the value of the
messageThreadIdrecord component
-
directMessagesTopicId
public long directMessagesTopicId()Returns the value of thedirectMessagesTopicIdrecord component.- Returns:
- the value of the
directMessagesTopicIdrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
providerToken
Returns the value of theproviderTokenrecord component.- Returns:
- the value of the
providerTokenrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
prices
Returns the value of thepricesrecord component.- Returns:
- the value of the
pricesrecord component
-
maxTipAmount
public int maxTipAmount()Returns the value of themaxTipAmountrecord component.- Returns:
- the value of the
maxTipAmountrecord component
-
suggestedTipAmounts
public int[] suggestedTipAmounts()Returns the value of thesuggestedTipAmountsrecord component.- Returns:
- the value of the
suggestedTipAmountsrecord component
-
startParameter
Returns the value of thestartParameterrecord component.- Returns:
- the value of the
startParameterrecord component
-
providerData
Returns the value of theproviderDatarecord component.- Returns:
- the value of the
providerDatarecord component
-
photoUrl
Returns the value of thephotoUrlrecord component.- Returns:
- the value of the
photoUrlrecord component
-
photoSize
public int photoSize()Returns the value of thephotoSizerecord component.- Returns:
- the value of the
photoSizerecord component
-
photoWidth
public int photoWidth()Returns the value of thephotoWidthrecord component.- Returns:
- the value of the
photoWidthrecord component
-
photoHeight
public int photoHeight()Returns the value of thephotoHeightrecord component.- Returns:
- the value of the
photoHeightrecord component
-
needName
public boolean needName()Returns the value of theneedNamerecord component.- Returns:
- the value of the
needNamerecord component
-
needPhoneNumber
public boolean needPhoneNumber()Returns the value of theneedPhoneNumberrecord component.- Returns:
- the value of the
needPhoneNumberrecord component
-
needEmail
public boolean needEmail()Returns the value of theneedEmailrecord component.- Returns:
- the value of the
needEmailrecord component
-
needShippingAddress
public boolean needShippingAddress()Returns the value of theneedShippingAddressrecord component.- Returns:
- the value of the
needShippingAddressrecord component
-
sendPhoneNumberToProvider
public boolean sendPhoneNumberToProvider()Returns the value of thesendPhoneNumberToProviderrecord component.- Returns:
- the value of the
sendPhoneNumberToProviderrecord component
-
sendEmailToProvider
public boolean sendEmailToProvider()Returns the value of thesendEmailToProviderrecord component.- Returns:
- the value of the
sendEmailToProviderrecord component
-
isFlexible
public boolean isFlexible()Returns the value of theisFlexiblerecord component.- Returns:
- the value of the
isFlexiblerecord component
-
disableNotification
public boolean disableNotification()Returns the value of thedisableNotificationrecord component.- Returns:
- the value of the
disableNotificationrecord component
-
protectContent
public boolean protectContent()Returns the value of theprotectContentrecord component.- Returns:
- the value of the
protectContentrecord component
-
allowPaidBroadcast
public boolean allowPaidBroadcast()Returns the value of theallowPaidBroadcastrecord component.- Returns:
- the value of the
allowPaidBroadcastrecord component
-
messageEffectId
Returns the value of themessageEffectIdrecord component.- Returns:
- the value of the
messageEffectIdrecord component
-
suggestedPostParameters
Returns the value of thesuggestedPostParametersrecord component.- Returns:
- the value of the
suggestedPostParametersrecord component
-
replyParameters
Returns the value of thereplyParametersrecord component.- Returns:
- the value of the
replyParametersrecord component
-
replyMarkup
Returns the value of thereplyMarkuprecord component.- Returns:
- the value of the
replyMarkuprecord component
-