Class: Fb::Messenger::Template::ReceiptItem
- Inherits:
-
Object
- Object
- Fb::Messenger::Template::ReceiptItem
- Defined in:
- lib/fb/messenger/templates/receipt_item.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#price ⇒ Object
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#subtitle ⇒ Object
Returns the value of attribute subtitle.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ReceiptItem
constructor
A new instance of ReceiptItem.
- #template ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ ReceiptItem
Returns a new instance of ReceiptItem.
8 9 10 11 12 13 14 15 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 8 def initialize(opts = {}) @title = opts[:title] @subtitle = opts[:subtitle] @quantity = opts[:quantity] @price = opts[:price] @currency = opts[:currency] @image_url = opts[:image_url] end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
6 7 8 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 6 def currency @currency end |
#image_url ⇒ Object
Returns the value of attribute image_url.
6 7 8 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 6 def image_url @image_url end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 6 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
5 6 7 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 5 def quantity @quantity end |
#subtitle ⇒ Object
Returns the value of attribute subtitle.
5 6 7 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 5 def subtitle @subtitle end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 5 def title @title end |
Instance Method Details
#template ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fb/messenger/templates/receipt_item.rb', line 17 def template { title: title, subtitle: subtitle, quantity: quantity, price: price, currency: currency, image_url: image_url } end |