Class: Square::Connect::SettlementEntry
- Inherits:
-
Object
- Object
- Square::Connect::SettlementEntry
- Defined in:
- lib/square/connect/settlement_entry.rb
Instance Attribute Summary collapse
-
#amount_money ⇒ Object
Returns the value of attribute amount_money.
-
#fee_money ⇒ Object
Returns the value of attribute fee_money.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SettlementEntry
constructor
A new instance of SettlementEntry.
Constructor Details
#initialize(attributes = {}) ⇒ SettlementEntry
Returns a new instance of SettlementEntry.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/square/connect/settlement_entry.rb', line 6 def initialize(attributes = {}) self.type = attributes[:type] self.payment = if attributes[:payment_id] Payment.new attributes[:payment_id] end [ :amount_money, :fee_money ].each do |money_key| if attributes[money_key] self.send "#{money_key}=", Money.new(attributes[money_key]) end end end |
Instance Attribute Details
#amount_money ⇒ Object
Returns the value of attribute amount_money.
4 5 6 |
# File 'lib/square/connect/settlement_entry.rb', line 4 def amount_money @amount_money end |
#fee_money ⇒ Object
Returns the value of attribute fee_money.
4 5 6 |
# File 'lib/square/connect/settlement_entry.rb', line 4 def fee_money @fee_money end |
#payment ⇒ Object
Returns the value of attribute payment.
4 5 6 |
# File 'lib/square/connect/settlement_entry.rb', line 4 def payment @payment end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/square/connect/settlement_entry.rb', line 4 def type @type end |