Class: Square::Connect::Discount

Inherits:
Object
  • Object
show all
Defined in:
lib/square/connect/discount.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_moneyObject

Returns the value of attribute applied_money.



4
5
6
# File 'lib/square/connect/discount.rb', line 4

def applied_money
  @applied_money
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/square/connect/discount.rb', line 4

def name
  @name
end