class BotFramework::ReceiptCard

Attributes

buttons[RW]

Set of actions applicable to the current card

facts[RW]

Array of Fact Objects Array of key-value pairs.

items[RW]

Array of Receipt Items

tap[RW]

This action will be activated when user taps on the card

tax[RW]

Total amount of TAX paid(or should be paid)

title[RW]

Title of the card

total[RW]

Total amount of money paid (or should be paid)

vat[RW]

Total amount of VAT paid(or should be paid)

Public Class Methods

new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# 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.buttons = value
    end
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# 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