Class: Google::Apis::ChatV1::CardAction

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/chat_v1/classes.rb,
generated/google/apis/chat_v1/representations.rb,
generated/google/apis/chat_v1/representations.rb

Overview

A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CardAction

Returns a new instance of CardAction.



291
292
293
# File 'generated/google/apis/chat_v1/classes.rb', line 291

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#action_labelString

The label used to be displayed in the action menu item. Corresponds to the JSON property actionLabel

Returns:

  • (String)


284
285
286
# File 'generated/google/apis/chat_v1/classes.rb', line 284

def action_label
  @action_label
end

#on_clickGoogle::Apis::ChatV1::OnClick

An onclick action (e.g. open a link). Corresponds to the JSON property onClick



289
290
291
# File 'generated/google/apis/chat_v1/classes.rb', line 289

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



296
297
298
299
# File 'generated/google/apis/chat_v1/classes.rb', line 296

def update!(**args)
  @action_label = args[:action_label] if args.key?(:action_label)
  @on_click = args[:on_click] if args.key?(:on_click)
end