AI-generated Key Takeaways
-
UniversalActionResponseBuilder is used to build UniversalActionResponse objects.
-
The
build()method validates and creates the UniversalActionResponse. -
The
displayAddOnCards()method allows you to show the add-on with specified cards. -
The
setOpenLink()method sets the URL that opens when a universal action is chosen.
A builder for the Universal
objects.
Methods
| Method | Return type | Brief description |
|---|---|---|
Universal
|
Builds the current universal action response and validates it. | |
Universal
|
Displays the add-on with the specified cards. | |
Universal
|
Sets the URL to open when the universal action is selected. |
Detailed documentation
build()
Builds the current universal action response and validates it.
Return
Universal
— A validated UniversalActionResponse.
Throws
Error
— if the constructed universal action response isn't valid.
display
Add
On
Cards(cardObjects)
Displays the add-on with the specified cards.
Parameters
| Name | Type | Description |
|---|---|---|
card
|
Object[]
|
An array of Card
s to display. |
Return
Universal
— This object, for chaining.
set
Open
Link(openLink)
Sets the URL to open when the universal action is selected.
Parameters
| Name | Type | Description |
|---|---|---|
open
|
Open
|
The link object to use. |
Return
Universal
— This object, for chaining.

