use of com.google.api.services.actions_fulfillment.v2.model.DeliveryAddressValueSpecAddressOptions in project dialogflow-transactions-java by actions-on-google.
the class TransactionsApp method deliveryAddress.
// Asks for a delivery address to associate with the transaction
@ForIntent("Delivery Address")
public ActionResponse deliveryAddress(ActionRequest request) {
ResourceBundle rb = ResourceBundle.getBundle("resources", request.getLocale());
// Create options containing reason for asking for delivery address
DeliveryAddressValueSpecAddressOptions addressOptions = new DeliveryAddressValueSpecAddressOptions().setReason(rb.getString("reason"));
return getResponseBuilder(request).add("Placeholder for delivery address text").add(new DeliveryAddress().setAddressOptions(addressOptions)).build();
}
Aggregations