Class: ShelbyArena::Response::ContributionFund

Inherits:
Base
  • Object
show all
Defined in:
lib/shelby_arena/response/contribution_fund.rb

Constant Summary collapse

MAP =
{
  id: 'ContributionFundId',
  contribution_id: 'ContributionId',
  amount: 'Amount',
  fund: 'Fund',
  fund_id: 'FundId'
}.freeze

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#date_parse, #format, format, #format_list, format_list, #initialize, #to_boolean, #to_h

Constructor Details

This class inherits a constructor from ShelbyArena::Response::Base

Instance Method Details

#format_single(data) ⇒ Object



12
13
14
15
16
17
# File 'lib/shelby_arena/response/contribution_fund.rb', line 12

def format_single(data)
  response = to_h(MAP, data)
  response[:fund] = Fund.format(response[:fund])
  response[:amount] = response[:amount].to_f
  response
end