Sha256: 487462146b5aa933ab1ccf6fee3ea27d8a1c78cc58bbf1f4ea1ebf46eb5bbd72

Contents?: true

Size: 719 Bytes

Versions: 5

Compression:

Stored size: 719 Bytes

Contents

module ShelbyArena
  module Response
    class Fund < Base
      MAP = {
        id: 'FundId',
        active: 'Active',
        name: 'FundName',
        online_name: 'OnlineName',
        description: 'FundDescription',
        is_tax_deductible: 'TaxDeductible',
        start_date: 'StartDate',
        end_date: 'EndDate'
      }.freeze

      def format_single(data)
        response = to_h(MAP, data)
        response[:active] = to_boolean(response[:active])
        response[:is_tax_deductible] = to_boolean(response[:is_tax_deductible])
        response[:start_date] = date_parse(response[:start_date])
        response[:end_date] = date_parse(response[:end_date])
        response
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shelby_arena-0.0.8 lib/shelby_arena/response/fund.rb
shelby_arena-0.0.7 lib/shelby_arena/response/fund.rb
shelby_arena-0.0.6 lib/shelby_arena/response/fund.rb
shelby_arena-0.0.5 lib/shelby_arena/response/fund.rb
shelby_arena-0.0.4 lib/shelby_arena/response/fund.rb