Class: Messenger::Elements::Summary
- Inherits:
-
Object
- Object
- Messenger::Elements::Summary
- Includes:
- Components::Element
- Defined in:
- lib/messenger/components/elements/receipt/summary.rb
Instance Attribute Summary collapse
-
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
-
#subtotal ⇒ Object
Returns the value of attribute subtotal.
-
#total_cost ⇒ Object
Returns the value of attribute total_cost.
-
#total_tax ⇒ Object
Returns the value of attribute total_tax.
Instance Method Summary collapse
-
#initialize(subtotal: nil, shipping_cost: nil, total_tax: nil, total_cost:) ⇒ Summary
constructor
A new instance of Summary.
Methods included from Components::Element
Constructor Details
#initialize(subtotal: nil, shipping_cost: nil, total_tax: nil, total_cost:) ⇒ Summary
Returns a new instance of Summary.
10 11 12 13 14 15 |
# File 'lib/messenger/components/elements/receipt/summary.rb', line 10 def initialize(subtotal: nil, shipping_cost: nil, total_tax: nil, total_cost:) @subtotal = subtotal @shipping_cost = shipping_cost @total_tax = total_tax @total_cost = total_cost end |
Instance Attribute Details
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/summary.rb', line 8 def shipping_cost @shipping_cost end |
#subtotal ⇒ Object
Returns the value of attribute subtotal.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/summary.rb', line 8 def subtotal @subtotal end |
#total_cost ⇒ Object
Returns the value of attribute total_cost.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/summary.rb', line 8 def total_cost @total_cost end |
#total_tax ⇒ Object
Returns the value of attribute total_tax.
8 9 10 |
# File 'lib/messenger/components/elements/receipt/summary.rb', line 8 def total_tax @total_tax end |