Class: BotFramework::CardAction
- Defined in:
- lib/bot_framework/models/card_action.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
URL Picture which will appear on the button, next to text label.
-
#title ⇒ Object
Text description which appear on the button.
-
#type ⇒ Object
Defines the type of action implemented by this button.
-
#value ⇒ Object
Supplementary parameter for action.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CardAction
constructor
Initializes the object.
Methods inherited from Base
#==, #_deserialize, #_to_hash, #as_json, attr_accessor, attribute_map, #attributes, #attributes_hash, #build_from_hash, #compact_attributes_hash, #eql?, #hash, #list_invalid_properties, #to_body, #to_hash, #to_json, #to_s, #valid?
Constructor Details
#initialize(attributes = {}) ⇒ CardAction
Initializes the object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/bot_framework/models/card_action.rb', line 28 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.type = attributes[:type] if attributes.key?(:type) self.title = attributes[:title] if attributes.key?(:title) self.image = attributes[:image] if attributes.key?(:image) self.value = attributes[:value] if attributes.key?(:value) end |
Instance Attribute Details
#image ⇒ Object
URL Picture which will appear on the button, next to text label.
10 11 12 |
# File 'lib/bot_framework/models/card_action.rb', line 10 def image @image end |
#title ⇒ Object
Text description which appear on the button.
7 8 9 |
# File 'lib/bot_framework/models/card_action.rb', line 7 def title @title end |
#type ⇒ Object
Defines the type of action implemented by this button.
4 5 6 |
# File 'lib/bot_framework/models/card_action.rb', line 4 def type @type end |
#value ⇒ Object
Supplementary parameter for action. Content of this property depends on the ActionType
13 14 15 |
# File 'lib/bot_framework/models/card_action.rb', line 13 def value @value end |
Class Method Details
.swagger_types ⇒ Object
Attribute mapping from ruby-style variable name to JSON key. Attribute type mapping.
17 18 19 20 21 22 23 24 |
# File 'lib/bot_framework/models/card_action.rb', line 17 def self.swagger_types { type: :String, title: :String, image: :String, value: :String } end |