Class: Messenger::Elements::Order

Inherits:
Object
  • Object
show all
Includes:
Components::Element
Defined in:
lib/messenger/components/elements/receipt/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Components::Element

#build, #build_elements

Constructor Details

#initialize(order_number:, currency:, payment_method:, timestamp: nil, order_url: nil) ⇒ Order

Returns a new instance of Order.



10
11
12
13
14
15
16
# File 'lib/messenger/components/elements/receipt/order.rb', line 10

def initialize(order_number:, currency:, payment_method:, timestamp: nil, order_url: nil)
  @order_number   = order_number
  @currency       = currency
  @payment_method = payment_method
  @timestamp      = timestamp
  @order_url      = order_url
end

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



8
9
10
# File 'lib/messenger/components/elements/receipt/order.rb', line 8

def currency
  @currency
end

#order_numberObject

Returns the value of attribute order_number.



8
9
10
# File 'lib/messenger/components/elements/receipt/order.rb', line 8

def order_number
  @order_number
end

#order_urlObject

Returns the value of attribute order_url.



8
9
10
# File 'lib/messenger/components/elements/receipt/order.rb', line 8

def order_url
  @order_url
end

#payment_methodObject

Returns the value of attribute payment_method.



8
9
10
# File 'lib/messenger/components/elements/receipt/order.rb', line 8

def payment_method
  @payment_method
end

#timestampObject

Returns the value of attribute timestamp.



8
9
10
# File 'lib/messenger/components/elements/receipt/order.rb', line 8

def timestamp
  @timestamp
end