Class: Square::Connect::Discount
- Inherits:
-
Object
- Object
- Square::Connect::Discount
- Defined in:
- lib/square/connect/discount.rb
Instance Attribute Summary collapse
-
#applied_money ⇒ Object
Returns the value of attribute applied_money.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Discount
constructor
A new instance of Discount.
Constructor Details
#initialize(attributes = {}) ⇒ Discount
Returns a new instance of Discount.
6 7 8 9 10 11 12 |
# File 'lib/square/connect/discount.rb', line 6 def initialize(attributes = {}) raise self.name = attributes[:name] self.applied_money = if attributes[:applied_money] Money.new attributes[:applied_money] end end |
Instance Attribute Details
#applied_money ⇒ Object
Returns the value of attribute applied_money.
4 5 6 |
# File 'lib/square/connect/discount.rb', line 4 def applied_money @applied_money end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/square/connect/discount.rb', line 4 def name @name end |