Class: Messenger::Elements::Item

Inherits:
Components::Element show all
Defined in:
lib/messenger/components/elements/receipt/item.rb

Instance Method Summary collapse

Methods inherited from Components::Element

#build

Constructor Details

#initialize(title:, subtitle: nil, quantity: nil, price: nil, currency: nil, image_url: nil) ⇒ Item

Returns a new instance of Item.



6
7
8
9
10
11
12
13
# File 'lib/messenger/components/elements/receipt/item.rb', line 6

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