Class: Glass::TimelineItem::MenuItems
- Inherits:
-
Object
- Object
- Glass::TimelineItem::MenuItems
- Defined in:
- lib/glass/timeline/timeline_item.rb
Defined Under Namespace
Classes: Values
Constant Summary collapse
- REPLY =
"REPLY"- REPLY_ALL =
"REPLY_ALL"- DELETE =
"DELETE"- SHARE =
"SHARE"- READ_ALOUD =
"READ_ALOUD"- VOICE_CALL =
"VOICE_CALL"- NAVIGATE =
"NAVIGATE"- TOGGLE_PINNED =
"TOOGLE_PINNED"- CUSTOM =
"CUSTOM"
Instance Attribute Summary collapse
-
#actions ⇒ Object
Controls the behavior when the user picks the menu option.
-
#id ⇒ Object
The ID for this menu item.
-
#removeWhenSelected ⇒ Object
If set to true on a CUSTOM menu item, that item will be removed from the menu after it is selected.
-
#values ⇒ Object
For CUSTOM items, a list of values controlling the appearance of the menu item in each of its states.
Instance Attribute Details
#actions ⇒ Object
Controls the behavior when the user picks the menu option. Allowed values are: CUSTOM - Custom action set by the service. When the user selects this menuItem, the API triggers a notification to your callbackUrl with the userActions.type set to CUSTOM and the userActions.payload set to the ID of this menu item. This is the default value. Built-in actions:
REPLY - Initiate a reply to the timeline item using the voice recording UI. The creator attribute must be set in the timeline item for this to be available.
REPLY_ALL - Same behavior as REPLY. The original timeline item's recipients will be added to the reply item.
DELETE - Delete the timeline item.
SHARE - Share the timeline item with the available contacts.
READ_ALOUD - Read the timeline item's speakableText aloud; if this field is not set, read the text field; if none of those fields are set, this item is ignored.
VOICE_CALL - Initiate a phone call using the timeline item's creator.phone_number attribute as recipient.
NAVIGATE - Navigate to the timeline item's location.
TOGGLE_PINNED - Toggle the isPinned state of the timeline item.
298 299 300 |
# File 'lib/glass/timeline/timeline_item.rb', line 298 def actions @actions end |
#id ⇒ Object
The ID for this menu item. This is generated by the application and is treated as an opaque token.
282 283 284 |
# File 'lib/glass/timeline/timeline_item.rb', line 282 def id @id end |
#removeWhenSelected ⇒ Object
If set to true on a CUSTOM menu item, that item will be removed from the menu after it is selected.
308 309 310 |
# File 'lib/glass/timeline/timeline_item.rb', line 308 def removeWhenSelected @removeWhenSelected end |
#values ⇒ Object
For CUSTOM items, a list of values controlling the appearance of the menu item in each of its states. A value for the DEFAULT state must be provided. If the PENDING or CONFIRMED states are missing, they will not be shown.
304 305 306 |
# File 'lib/glass/timeline/timeline_item.rb', line 304 def values @values end |