public class ReplyFactory extends Object
FbBotMillResponse.| Modifier and Type | Method and Description |
|---|---|
static AirlineBoardingPassTemplateBuilder |
addAirlineBoardingPassTemplate(String introMessage,
String locale)
Adds an Airline Boarding Pass Template to the response.
|
static AirlineCheckinTemplateBuilder |
addAirlineCheckinTemplate(String introMessage,
String locale,
String pnrNumber,
String checkinUrl)
Adds an Airline Checkin Template to the response.
|
static AirlineFlightUpdateTemplateBuilder |
addAirlineFlightUpdateTemplate(String introMessage,
String locale,
String pnrNumber,
UpdateType updateType)
Adds an Airline Flight Update Template to the response.
|
static AirlineItineraryTemplateBuilder |
addAirlineItineraryTemplate(String introMessage,
String locale,
String pnrNumber,
BigDecimal totalPrice,
String currency)
Adds an Airline Itinerary Template to the response.
|
static ReceiptTemplateBuilder |
addAirlineItineraryTemplate(String recipientName,
String orderNumber,
String currency,
String paymentMethod)
Adds a Receipt Template to the response.
|
static AttachmentMessageBuilder |
addAudioAttachment(String url)
Adds an audio attachment to the response.
|
static ButtonTemplateBuilder |
addButtonTemplate(String message)
Adds a Button Template to the response.
|
static AttachmentMessageBuilder |
addFileAttachment(String url)
Adds a file attachment to the response.
|
static GenericTemplateBuilder |
addGenericTemplate()
Adds a Generic Template to the response.
|
static AttachmentMessageBuilder |
addImageAttachment(String url)
Adds an image attachment to the response.
|
static ListTemplateBuilder |
addListTemplate()
Adds a List Template to the response.
|
static ReceiptTemplateBuilder |
addReceiptTemplate(String recipientName,
String orderNumber,
String currency,
String paymentMethod)
Adds a Receipt Template to the response.
|
static TextMessageBuilder |
addTextMessageOnly(String message)
Creates a response which contains only a text message.
|
static ActionResponseBuilder |
addTypingAction(TypingAction action)
Adds a
TypingAction to the response. |
static AttachmentMessageBuilder |
addVideoAttachment(String url)
Adds a video attachment to the response.
|
static AttachmentMessageBuilder |
getReusableAudioAttachment(String attachmentId)
Get the reusable audio attachment
|
static AttachmentMessageBuilder |
getReusableFileAttachment(String attachmentId)
Get the reusable file attachment
|
static AttachmentMessageBuilder |
getReusableImageAttachment(String attachmentId)
Get the reusable image attachment
|
static AttachmentMessageBuilder |
getReusableVideoAttachment(String attachmentId)
Get the reusable video attachment
|
String |
toString() |
public static ActionResponseBuilder addTypingAction(TypingAction action)
TypingAction to the response.action - the action to add. Can't be null.public static ButtonTemplateBuilder addButtonTemplate(String message)
message - the message of the Button Template.public static GenericTemplateBuilder addGenericTemplate()
public static ListTemplateBuilder addListTemplate()
public static TextMessageBuilder addTextMessageOnly(String message)
message - the message to create.public static AttachmentMessageBuilder addImageAttachment(String url)
url - the url of the image to attach.public static AttachmentMessageBuilder getReusableImageAttachment(String attachmentId)
attachmentId - the attachment id generated by the upload apipublic static AttachmentMessageBuilder addAudioAttachment(String url)
url - the url of the audio to attach.public static AttachmentMessageBuilder getReusableAudioAttachment(String attachmentId)
attachmentId - the attachment id generated by the upload apipublic static AttachmentMessageBuilder addVideoAttachment(String url)
url - the url of the video to attach.public static AttachmentMessageBuilder getReusableVideoAttachment(String attachmentId)
attachmentId - the attachment id generated by the upload apipublic static AttachmentMessageBuilder addFileAttachment(String url)
url - the url of the file to attach.public static AttachmentMessageBuilder getReusableFileAttachment(String attachmentId)
attachmentId - the attachment id generated by the upload apipublic static ReceiptTemplateBuilder addAirlineItineraryTemplate(String recipientName, String orderNumber, String currency, String paymentMethod)
recipientName - the recipient's name.orderNumber - the order number.Must be unique for each user.currency - the currency for the price. It can't be empty. The currency
must be a three digit ISO-4217-3 code in format [A-Z]{3}. For
more information see Facebook's currency supportpaymentMethod - the payment method details. This can be a custom string. ex:
"Visa 1234". You may insert an arbitrary string here but we
recommend providing enough information for the person to
decipher which payment method and account they used (e.g., the
name of the payment method and partial account number).public static AirlineItineraryTemplateBuilder addAirlineItineraryTemplate(String introMessage, String locale, String pnrNumber, BigDecimal totalPrice, String currency)
introMessage - the message to send before the template. It can't be empty.locale - the current locale. It can't be empty and must be in format
[a-z]{2}_[A-Z]{2}. Locale must be in format [a-z]{2}_[A-Z]{2}.
For more information see Facebook's locale support.pnrNumber - the Passenger Name Record number (Booking Number). It can't be
empty.totalPrice - the total price of the itinerary.currency - the currency for the price. It can't be empty. The currency
must be a three digit ISO-4217-3 code in format [A-Z]{3}. For
more information see Facebook's currency supportpublic static AirlineCheckinTemplateBuilder addAirlineCheckinTemplate(String introMessage, String locale, String pnrNumber, String checkinUrl)
introMessage - the message to send before the template. It can't be empty.locale - the current locale. It can't be empty and must be in format
[a-z]{2}_[A-Z]{2}. Locale must be in format [a-z]{2}_[A-Z]{2}.
For more information see Facebook's locale support.pnrNumber - the Passenger Name Record number (Booking Number). It can't be
empty.checkinUrl - the url for the checkin. It can't be empty.public static AirlineBoardingPassTemplateBuilder addAirlineBoardingPassTemplate(String introMessage, String locale)
introMessage - the message to send before the template. It can't be empty.locale - the current locale. It can't be empty and must be in format
[a-z]{2}_[A-Z]{2}. Locale must be in format [a-z]{2}_[A-Z]{2}.
For more information see Facebook's locale support.public static AirlineFlightUpdateTemplateBuilder addAirlineFlightUpdateTemplate(String introMessage, String locale, String pnrNumber, UpdateType updateType)
introMessage - the message to send before the template. It can't be empty.locale - the current locale. It can't be empty and must be in format
[a-z]{2}_[A-Z]{2}. Locale must be in format [a-z]{2}_[A-Z]{2}.
For more information see Facebook's locale support.pnrNumber - the Passenger Name Record number (Booking Number). It can't be
empty.updateType - an UpdateType object that represents the kind of
status update of the flight. It can't be null.public static ReceiptTemplateBuilder addReceiptTemplate(String recipientName, String orderNumber, String currency, String paymentMethod)
recipientName - the recipient name. It can't be empty.orderNumber - the order number. It can't be empty and it must be unique for
each user.currency - the currency for order. It can't be empty.paymentMethod - the payment method details. This can be a custom string. ex:
"Visa 1234". You may insert an arbitrary string here but we
recommend providing enough information for the person to
decipher which payment method and account they used (e.g., the
name of the payment method and partial account number). It
can't be empty.Copyright © 2017 BotMill. All rights reserved.