Class: ShelbyArena::PersonListReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/person_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 = {}) ⇒ PersonListReader

Constructor.



6
7
8
9
10
11
12
13
# File 'lib/readers/person_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 = 'person/list'
end

Instance Method Details

#valid_fieldsObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/readers/person_list_reader.rb', line 15

def valid_fields
  %W(Address 
     altID 
     areaId 
     birthdate 
     email 
     giftID 
     loginID 
     firstName 
     lastName 
     personID 
     phone 
     profileID 
     onlyConnected 
     searchDistance 
     latitude 
     longitude 
     campusID 
     includeInactive 
     memberStatus 
     attributeID 
     attributeIntValue 
     attributeVarcharValue 
     attributeDateTimeValue 
     attributeDecimalValue 
     name).sort
end