public class AirlineItineraryTemplateBuilder extends FlightInfoBuilderDelegator
messageBuildergetRecipienteventKind, getAudioMessage, getFileMessage, getImageMessage, getLocationMessage, getVideoMessage, safeGetMessage, safeGetPostbackPayload, safeGetQuickReplyPayload, safeGetRecipient, safeGetRecipientId, safeGetSender, safeGetSenderId, validatepublic AirlineItineraryTemplateBuilder setTax(BigDecimal tax)
tax - the tax amount.public AirlineItineraryTemplateBuilder setBasePrice(BigDecimal basePrice)
basePrice - the base price.public AirlineItineraryTemplateBuilder addPassengerInfo(String passengerId, String name, String ticketNumber)
PassengerInfo object to this template. This field is
mandatory for this template. There must be at least one element.passengerId - the passenger ID. It can't be empty.name - the passenger name. It can't be empty.ticketNumber - the ticket number. This field is optional.public AirlineItineraryTemplateBuilder addPassengerInfo(String passengerId, String name)
PassengerInfo object to this template. This field is
mandatory for this template. There must be at least one element.passengerId - the passenger ID. It can't be empty.name - the passenger name. It can't be empty.public AirlineItineraryTemplateBuilder addPassengerInfo(PassengerInfo passengerInfo)
PassengerInfo object to this template. This field is
mandatory for this template. There must be at least one element.passengerInfo - the passenger infopublic PassengerSegmentInfoBuilder addPassengerSegmentInfo(String segmentId, String passengerId, String seat, String seatType)
PassengerSegmentInfo object to this template. This field
is mandatory for this template. There must be at least one element.segmentId - used to identify a flight segment. It can't be empty and must
be unique within the itinerary.passengerId - the passengerId of PassengerInfo object. It can't be
empty and it must match an actual passenger.seat - the seat number for the passenger. It can't be empty.seatType - the seat type for the passenger (e.g. Economy comfort). It
can't be empty.public AirlineItineraryTemplateBuilder addPassengerSegmentInfo(PassengerSegmentInfo segmentInfo)
PassengerSegmentInfo object to this template. This field
is mandatory for this template. There must be at least one element.segmentInfo - the segment info to add.public AirlineItineraryTemplateBuilder addPriceInfo(String title, BigDecimal amount)
PriceInfo object to this template. This field is optional.
There can be at most 4 price info objects per template.title - the price info title. It can't be empty.amount - the price amount.public AirlineItineraryTemplateBuilder addPriceInfo(String title, BigDecimal amount, String currency)
PriceInfo object to this template. This field is optional.
There can be at most 4 price info objects per template.title - the price info title. It can't be empty.amount - the price amount.currency - the pricing currency. This field is optional. Currency must be
a three digit ISO-4217-3 code in format [A-Z]{3}. For more
information see Facebook's currency supportpublic AirlineItineraryTemplateBuilder addPriceInfo(PriceInfo priceInfo)
PriceInfo object to this template. This field is optional.
There can be at most 4 price info objects per template.priceInfo - the price info object to add.public FlightInfoExtendedBuilder addFlightInfo(String flightNumber, String connectionId, String segmentId, TravelClass travelClass)
FlightInfoExtended object to this template. This object is
mandatory and can't be null for Airline templates. There can be multiple
flight info object but there must be at least one.flightNumber - the flight number. It can't be empty.connectionId - the connection ID, used to group together segments. It can't
be empty.segmentId - the segment ID. It must match the segment ID.travelClass - the travel class. It can't be null.FlightInfoExtended object.public AirlineItineraryTemplateBuilder addFlightInfo(FlightInfoExtended flightInfo)
FlightInfoExtended object to this template. This object is
mandatory and can't be null for Airline templates. There can be multiple
flight info object but there must be at least one.flightInfo - the flight info to add.public AirlineItineraryTemplateBuilder setThemeColor(String themeColor)
themeColor - the color for this template. The Color must be a valid RGB
color in the format #RRGGBB.public AirlineItineraryTemplateBuilder addQuickReply(String title, String payload)
QuickReply to the current object.title - the quick reply button label. It can't be empty.payload - the payload sent back when the button is pressed. It can't be
empty.public AirlineItineraryTemplateBuilder addQuickReply(QuickReply reply)
QuickReply to the current object.reply - a quick reply object.public FbBotMillResponse build(MessageEnvelope envelope)
FbBotMillResponse that the bot should return. The
template builders, like this, delegate an
AttachmentMessageBuilder to build the message.envelope - a MessageEnvelope object representing the incoming
message.FbBotMillResponse of this bot.public String toString()
toString in class FlightInfoBuilderDelegatorCopyright © 2017 BotMill. All rights reserved.