Class CreateInvoiceLink
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<T>
-
- org.telegram.telegrambots.meta.api.methods.BotApiMethod<Message>
-
- org.telegram.telegrambots.meta.api.methods.invoices.CreateInvoiceLink
-
- All Implemented Interfaces:
Validable
public class CreateInvoiceLink extends BotApiMethod<Message>
- Version:
- 6.1 Use this method to create a link for an invoice. On success, the created link is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static StringCURRENCY_FIELDstatic StringDESCRIPTION_FIELDstatic StringIS_FLEXIBLE_FIELDstatic StringMAXTIPAMOUNT_FIELDstatic StringNEED_EMAIL_FIELDstatic StringNEED_NAME_FIELDstatic StringNEED_PHONE_NUMBER_FIELDstatic StringNEED_SHIPPING_ADDRESS_FIELDstatic StringPATHstatic StringPAYLOAD_FIELDstatic StringPHOTO_HEIGHT_FIELDstatic StringPHOTO_SIZE_FIELDstatic StringPHOTO_URL_FIELDstatic StringPHOTO_WIDTH_FIELDstatic StringPRICES_FIELDstatic StringPROVIDER_DATA_FIELDstatic StringPROVIDER_TOKEN_FIELDstatic StringSEND_EMAIL_TO_PROVIDER_FIELDstatic StringSEND_PHONE_NUMBER_TO_PROVIDER_FIELDstatic StringSUGGESTEDTIPAMOUNTS_FIELDstatic StringTITLE_FIELD-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.BotApiMethod
METHOD_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description CreateInvoiceLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessagedeserializeResponse(String answer)Deserialize a json answer to the response type to a methodStringgetMethod()Getter for method path (that is the same as method name)voidvalidate()Validates that mandatory fields are filled and optional objects-
Methods inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
TITLE_FIELD
public static final String TITLE_FIELD
- See Also:
- Constant Field Values
-
DESCRIPTION_FIELD
public static final String DESCRIPTION_FIELD
- See Also:
- Constant Field Values
-
PAYLOAD_FIELD
public static final String PAYLOAD_FIELD
- See Also:
- Constant Field Values
-
PROVIDER_TOKEN_FIELD
public static final String PROVIDER_TOKEN_FIELD
- See Also:
- Constant Field Values
-
CURRENCY_FIELD
public static final String CURRENCY_FIELD
- See Also:
- Constant Field Values
-
PRICES_FIELD
public static final String PRICES_FIELD
- See Also:
- Constant Field Values
-
MAXTIPAMOUNT_FIELD
public static final String MAXTIPAMOUNT_FIELD
- See Also:
- Constant Field Values
-
SUGGESTEDTIPAMOUNTS_FIELD
public static final String SUGGESTEDTIPAMOUNTS_FIELD
- See Also:
- Constant Field Values
-
PROVIDER_DATA_FIELD
public static final String PROVIDER_DATA_FIELD
- See Also:
- Constant Field Values
-
PHOTO_URL_FIELD
public static final String PHOTO_URL_FIELD
- See Also:
- Constant Field Values
-
PHOTO_SIZE_FIELD
public static final String PHOTO_SIZE_FIELD
- See Also:
- Constant Field Values
-
PHOTO_WIDTH_FIELD
public static final String PHOTO_WIDTH_FIELD
- See Also:
- Constant Field Values
-
PHOTO_HEIGHT_FIELD
public static final String PHOTO_HEIGHT_FIELD
- See Also:
- Constant Field Values
-
NEED_NAME_FIELD
public static final String NEED_NAME_FIELD
- See Also:
- Constant Field Values
-
NEED_PHONE_NUMBER_FIELD
public static final String NEED_PHONE_NUMBER_FIELD
- See Also:
- Constant Field Values
-
NEED_EMAIL_FIELD
public static final String NEED_EMAIL_FIELD
- See Also:
- Constant Field Values
-
NEED_SHIPPING_ADDRESS_FIELD
public static final String NEED_SHIPPING_ADDRESS_FIELD
- See Also:
- Constant Field Values
-
SEND_PHONE_NUMBER_TO_PROVIDER_FIELD
public static final String SEND_PHONE_NUMBER_TO_PROVIDER_FIELD
- See Also:
- Constant Field Values
-
SEND_EMAIL_TO_PROVIDER_FIELD
public static final String SEND_EMAIL_TO_PROVIDER_FIELD
- See Also:
- Constant Field Values
-
IS_FLEXIBLE_FIELD
public static final String IS_FLEXIBLE_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMethod
public String getMethod()
Description copied from class:BotApiMethodGetter for method path (that is the same as method name)- Specified by:
getMethodin classBotApiMethod<Message>- Returns:
- Method path
-
deserializeResponse
public Message deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<Message>- Parameters:
answer- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-