Class: ShelbyArena::ContributionListReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/contribution_list_reader.rb

Instance Attribute Summary

Attributes inherited from ApiReader

#headers

Instance Method Summary collapse

Methods inherited from ApiReader

#load_data

Constructor Details

#initialize(options = {}) ⇒ ContributionListReader

Constructor.



6
7
8
9
10
11
12
13
# File 'lib/readers/contribution_list_reader.rb', line 6

def initialize(options = {})
  # page = options[:page] || 1
  # per_page = options[:per_page] || 100

  @url_data_params = {}
  valid_fields.each { |field| @url_data_params[field] = options[ShelbyArena::attr_underscore(field).to_sym] unless options[ShelbyArena::attr_underscore(field).to_sym].nil? }
  @url_data_path = 'contribution/list'
end

Instance Method Details

#valid_fieldsObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/readers/contribution_list_reader.rb', line 15

def valid_fields
  %W(Active
     CanPledge
     EndDate
     FundId
     FundName
     OnlineName
     StartDate
     TaxDeductible).sort
end