Class: Messenger::Elements::Item
- Inherits:
-
Object
- Object
- Messenger::Elements::Item
- Includes:
- Components::Element
- Defined in:
- lib/messenger/components/elements/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(title:, subtitle: nil, quantity: nil, price: nil, currency: nil, image_url: nil) ⇒ Item
constructor
A new instance of Item.
Methods included from Components::Element
Constructor Details
#initialize(title:, subtitle: nil, quantity: nil, price: nil, currency: nil, image_url: nil) ⇒ Item
Returns a new instance of Item.
10 11 12 13 14 15 16 17 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 10 def initialize(title:, subtitle: nil, quantity: nil, price: nil, currency: nil, image_url: nil) @title = title @subtitle = subtitle @quantity = quantity @price = price @currency = currency @image_url = image_url end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 8 def currency @currency end |
#image_url ⇒ Object
Returns the value of attribute image_url.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 8 def image_url @image_url end |
#price ⇒ Object
Returns the value of attribute price.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 8 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 8 def quantity @quantity end |
#subtitle ⇒ Object
Returns the value of attribute subtitle.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 8 def subtitle @subtitle end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/item.rb', line 8 def title @title end |