Class: BotFramework::ReceiptItem
- Defined in:
- lib/bot_framework/models/receipt_item.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
Image.
-
#price ⇒ Object
Amount with currency.
-
#quantity ⇒ Object
Number of items of given kind.
-
#subtitle ⇒ Object
Subtitle appears just below Title field, differs from Title in font styling only.
-
#tap ⇒ Object
This action will be activated when user taps on the Item bubble.
-
#text ⇒ Object
Text field appears just below subtitle, differs from Subtitle in font styling only.
-
#title ⇒ Object
Title of the Card.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ReceiptItem
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 = {}) ⇒ ReceiptItem
Initializes the object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/bot_framework/models/receipt_item.rb', line 39 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.title = attributes[:title] if attributes.key?(:title) self.subtitle = attributes[:subtitle] if attributes.key?(:subtitle) self.text = attributes[:text] if attributes.key?(:text) self.image = attributes[:image] if attributes.key?(:image) self.price = attributes[:price] if attributes.key?(:price) self.quantity = attributes[:quantity] if attributes.key?(:quantity) self.tap = attributes[:tap] if attributes.key?(:tap) end |
Instance Attribute Details
#image ⇒ Object
Image
13 14 15 |
# File 'lib/bot_framework/models/receipt_item.rb', line 13 def image @image end |
#price ⇒ Object
Amount with currency
16 17 18 |
# File 'lib/bot_framework/models/receipt_item.rb', line 16 def price @price end |
#quantity ⇒ Object
Number of items of given kind
19 20 21 |
# File 'lib/bot_framework/models/receipt_item.rb', line 19 def quantity @quantity end |
#subtitle ⇒ Object
Subtitle appears just below Title field, differs from Title in font styling only
7 8 9 |
# File 'lib/bot_framework/models/receipt_item.rb', line 7 def subtitle @subtitle end |
#tap ⇒ Object
This action will be activated when user taps on the Item bubble.
22 23 24 |
# File 'lib/bot_framework/models/receipt_item.rb', line 22 def tap @tap end |
#text ⇒ Object
Text field appears just below subtitle, differs from Subtitle in font styling only
10 11 12 |
# File 'lib/bot_framework/models/receipt_item.rb', line 10 def text @text end |
#title ⇒ Object
Title of the Card
4 5 6 |
# File 'lib/bot_framework/models/receipt_item.rb', line 4 def title @title end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/bot_framework/models/receipt_item.rb', line 25 def self.swagger_types { title: :String, subtitle: :String, text: :String, image: :CardImage, price: :String, quantity: :String, tap: :CardAction } end |