public class AnswerPreCheckoutQuery extends BotApiMethod<Boolean>
Modifier and Type | Field and Description |
---|---|
static String |
PATH |
METHOD_FIELD
OBJECT_MAPPER
Constructor and Description |
---|
AnswerPreCheckoutQuery()
Creates an empty answer pre-checkout query
|
AnswerPreCheckoutQuery(String preCheckoutQueryId,
Boolean ok)
Creates an answer pre-checkout query with mandatory parameters
|
Modifier and Type | Method and Description |
---|---|
Boolean |
deserializeResponse(String answer)
Deserialize a json answer to the response type to a method
|
String |
getErrorMessage() |
String |
getMethod()
Getter for method path (that is the same as method name)
|
Boolean |
getOk() |
String |
getPreCheckoutQueryId() |
AnswerPreCheckoutQuery |
setErrorMessage(String errorMessage) |
AnswerPreCheckoutQuery |
setOk(Boolean ok) |
AnswerPreCheckoutQuery |
setPreCheckoutQueryId(String preCheckoutQueryId) |
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public AnswerPreCheckoutQuery()
public AnswerPreCheckoutQuery(String preCheckoutQueryId, Boolean ok)
preCheckoutQueryId
- Unique identifier for the query to be answeredok
- Specify True if delivery to the specified address is possible and False if there are any problemspublic String getPreCheckoutQueryId()
public AnswerPreCheckoutQuery setPreCheckoutQueryId(String preCheckoutQueryId)
public Boolean getOk()
public AnswerPreCheckoutQuery setOk(Boolean ok)
public String getErrorMessage()
public AnswerPreCheckoutQuery setErrorMessage(String errorMessage)
public void validate() throws TelegramApiValidationException
Validable
TelegramApiValidationException
- If any mandatory field is emptypublic String getMethod()
BotApiMethod
getMethod
in class BotApiMethod<Boolean>
public Boolean deserializeResponse(String answer) throws TelegramApiRequestException
PartialBotApiMethod
deserializeResponse
in class PartialBotApiMethod<Boolean>
answer
- Json answer receivedTelegramApiRequestException
Copyright © 2017. All rights reserved.