Class ShippingOption
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.objects.payments.ShippingOption
-
- All Implemented Interfaces:
Serializable,BotApiObject,InputBotApiObject,Validable
public class ShippingOption extends Object implements InputBotApiObject, Validable
- Version:
- 1.0 This object represents one shipping option.
- Author:
- Ruben Bermudez
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShippingOption()Creates an empty shipping optionShippingOption(String id, String title, List<LabeledPrice> prices)Creates a shipping option with mandatory fields
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()List<LabeledPrice>getPrices()StringgetTitle()ShippingOptionsetId(String id)ShippingOptionsetPrices(List<LabeledPrice> prices)ShippingOptionsetTitle(String title)StringtoString()voidvalidate()Validates that mandatory fields are filled and optional objects
-
-
-
Constructor Detail
-
ShippingOption
public ShippingOption()
Creates an empty shipping option
-
ShippingOption
public ShippingOption(String id, String title, List<LabeledPrice> prices)
Creates a shipping option with mandatory fields- Parameters:
id- Shipping option identifiertitle- Option titleprices- List of price portions
-
-
Method Detail
-
getId
public String getId()
-
setId
public ShippingOption setId(String id)
-
getTitle
public String getTitle()
-
setTitle
public ShippingOption setTitle(String title)
-
getPrices
public List<LabeledPrice> getPrices()
-
setPrices
public ShippingOption setPrices(List<LabeledPrice> prices)
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Specified by:
validatein interfaceValidable- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-