Class: BotFramework::ReceiptCard
- Defined in:
- lib/bot_framework/models/receipt_card.rb
Instance Attribute Summary collapse
-
#buttons ⇒ Object
Set of actions applicable to the current card.
-
#facts ⇒ Object
Array of Fact Objects Array of key-value pairs.
-
#items ⇒ Object
Array of Receipt Items.
-
#tap ⇒ Object
This action will be activated when user taps on the card.
-
#tax ⇒ Object
Total amount of TAX paid(or should be paid).
-
#title ⇒ Object
Title of the card.
-
#total ⇒ Object
Total amount of money paid (or should be paid).
-
#vat ⇒ Object
Total amount of VAT paid(or should be paid).
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ReceiptCard
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 = {}) ⇒ ReceiptCard
Initializes the object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/bot_framework/models/receipt_card.rb', line 43 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) if attributes.key?(:items) if (value = attributes[:items]).is_a?(Array) self.items = value end end if attributes.key?(:facts) if (value = attributes[:facts]).is_a?(Array) self.facts = value end end self.tap = attributes[:tap] if attributes.key?(:tap) self.total = attributes[:total] if attributes.key?(:total) self.tax = attributes[:tax] if attributes.key?(:tax) self.vat = attributes[:vat] if attributes.key?(:vat) if attributes.key?(:buttons) if (value = attributes[:buttons]).is_a?(Array) self. = value end end end |
Instance Attribute Details
#buttons ⇒ Object
Set of actions applicable to the current card
25 26 27 |
# File 'lib/bot_framework/models/receipt_card.rb', line 25 def @buttons end |
#facts ⇒ Object
Array of Fact Objects Array of key-value pairs.
10 11 12 |
# File 'lib/bot_framework/models/receipt_card.rb', line 10 def facts @facts end |
#items ⇒ Object
Array of Receipt Items
7 8 9 |
# File 'lib/bot_framework/models/receipt_card.rb', line 7 def items @items end |
#tap ⇒ Object
This action will be activated when user taps on the card
13 14 15 |
# File 'lib/bot_framework/models/receipt_card.rb', line 13 def tap @tap end |
#tax ⇒ Object
Total amount of TAX paid(or should be paid)
19 20 21 |
# File 'lib/bot_framework/models/receipt_card.rb', line 19 def tax @tax end |
#title ⇒ Object
Title of the card
4 5 6 |
# File 'lib/bot_framework/models/receipt_card.rb', line 4 def title @title end |
#total ⇒ Object
Total amount of money paid (or should be paid)
16 17 18 |
# File 'lib/bot_framework/models/receipt_card.rb', line 16 def total @total end |
#vat ⇒ Object
Total amount of VAT paid(or should be paid)
22 23 24 |
# File 'lib/bot_framework/models/receipt_card.rb', line 22 def vat @vat end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bot_framework/models/receipt_card.rb', line 28 def self.swagger_types { title: :String, items: :'Array<ReceiptItem>', facts: :'Array<Fact>', tap: :CardAction, total: :String, tax: :String, vat: :String, buttons: :'Array<CardAction>' } end |