Class: Teams::Api::TaskModuleTaskInfo
- Inherits:
-
Object
- Object
- Teams::Api::TaskModuleTaskInfo
- Defined in:
- lib/teams/api/task_module.rb
Overview
Dialog (task module) content definition: either a card dialog (card:) or a webpage dialog (url:). height/width take "small"/"medium"/"large" or pixel integers.
Instance Method Summary collapse
-
#initialize(title: nil, height: nil, width: nil, url: nil, card: nil, fallback_url: nil, completion_bot_id: nil) ⇒ TaskModuleTaskInfo
constructor
A new instance of TaskModuleTaskInfo.
- #to_h ⇒ Object
Constructor Details
#initialize(title: nil, height: nil, width: nil, url: nil, card: nil, fallback_url: nil, completion_bot_id: nil) ⇒ TaskModuleTaskInfo
Returns a new instance of TaskModuleTaskInfo.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/teams/api/task_module.rb', line 9 def initialize(title: nil, height: nil, width: nil, url: nil, card: nil, fallback_url: nil, completion_bot_id: nil) @title = title @height = height @width = width @url = url @card = card @fallback_url = fallback_url @completion_bot_id = completion_bot_id end |
Instance Method Details
#to_h ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/teams/api/task_module.rb', line 20 def to_h body = {} body["title"] = @title if @title body["height"] = @height if @height body["width"] = @width if @width body["url"] = @url if @url body["card"] = (@card) if @card body["fallbackUrl"] = @fallback_url if @fallback_url body["completionBotId"] = @completion_bot_id if @completion_bot_id body end |