public class AnswerShippingQuery extends BotApiMethod<Boolean>
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH |
METHOD_FIELDOBJECT_MAPPER| Constructor and Description |
|---|
AnswerShippingQuery()
Creates an empty answer shipping query
|
AnswerShippingQuery(String shippingQueryId,
Boolean ok)
Creates an answer shipping 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() |
List<ShippingOption> |
getShippingOptions() |
String |
getShippingQueryId() |
AnswerShippingQuery |
setErrorMessage(String errorMessage) |
AnswerShippingQuery |
setOk(Boolean ok) |
AnswerShippingQuery |
setShippingOptions(List<ShippingOption> shippingOptions) |
AnswerShippingQuery |
setShippingQueryId(String shippingQueryId) |
String |
toString() |
void |
validate()
Validates that mandatory fields are filled and optional objects
|
public static final String PATH
public AnswerShippingQuery()
public AnswerShippingQuery(String shippingQueryId, Boolean ok)
shippingQueryId - 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 getShippingQueryId()
public AnswerShippingQuery setShippingQueryId(String shippingQueryId)
public Boolean getOk()
public AnswerShippingQuery setOk(Boolean ok)
public List<ShippingOption> getShippingOptions()
public AnswerShippingQuery setShippingOptions(List<ShippingOption> shippingOptions)
public String getErrorMessage()
public AnswerShippingQuery setErrorMessage(String errorMessage)
public void validate()
throws TelegramApiValidationException
ValidableTelegramApiValidationException - If any mandatory field is emptypublic String getMethod()
BotApiMethodgetMethod in class BotApiMethod<Boolean>public Boolean deserializeResponse(String answer) throws TelegramApiRequestException
PartialBotApiMethoddeserializeResponse in class PartialBotApiMethod<Boolean>answer - Json answer receivedTelegramApiRequestExceptionCopyright © 2019. All rights reserved.