Class: SBF::Client::Fund::YearlyTotals

Inherits:
BaseEntity
  • Object
show all
Defined in:
lib/stbaldricks/entities/fund.rb

Constant Summary

Constants inherited from BaseEntity

BaseEntity::ELSE

Instance Attribute Summary collapse

Attributes inherited from BaseEntity

#errors

Instance Method Summary collapse

Methods inherited from BaseEntity

allow_instantiation?, attr_accessor, attr_reader, attr_writer, collection_attributes, defined_attributes, #destroyed?, #dirty_data, entity_attr_accessor, entity_attr_reader, entity_attr_writer, entity_attributes, entity_collection_attr_accessor, entity_collection_attr_reader, entity_collection_attr_writer, #error, inherited, #initialize, #keys_hash, #model_name, multitype_attr_accessor, multitype_attr_reader, multitype_attr_writer, multitype_collection_attr_accessor, multitype_collection_attr_reader, multitype_collection_attr_writer, #not_provided_attributes, optional_attributes, #persisted?, #reload!, #reload_recursive, #rollback!, #to_json, #to_partial

Methods included from EntityResponseConcern

#add_errors, #data, #error?, #errors?, #errors_http_code=, #http_code, #success?

Constructor Details

This class inherits a constructor from SBF::Client::BaseEntity

Instance Attribute Details

#amount_raisedObject (readonly)

Returns the value of attribute amount_raised.



41
42
43
# File 'lib/stbaldricks/entities/fund.rb', line 41

def amount_raised
  @amount_raised
end

#eventsObject (readonly)

Returns the value of attribute events.



40
41
42
# File 'lib/stbaldricks/entities/fund.rb', line 40

def events
  @events
end

#fundraisersObject (readonly)

Returns the value of attribute fundraisers.



35
36
37
# File 'lib/stbaldricks/entities/fund.rb', line 35

def fundraisers
  @fundraisers
end

#non_shaveesObject (readonly)

Returns the value of attribute non_shavees.



38
39
40
# File 'lib/stbaldricks/entities/fund.rb', line 38

def non_shavees
  @non_shavees
end

#participantsObject (readonly)

Returns the value of attribute participants.



36
37
38
# File 'lib/stbaldricks/entities/fund.rb', line 36

def participants
  @participants
end

#shaveesObject (readonly)

Returns the value of attribute shavees.



37
38
39
# File 'lib/stbaldricks/entities/fund.rb', line 37

def shavees
  @shavees
end

#teamsObject (readonly)

Returns the value of attribute teams.



39
40
41
# File 'lib/stbaldricks/entities/fund.rb', line 39

def teams
  @teams
end

#yearObject (readonly)

Returns the value of attribute year.



34
35
36
# File 'lib/stbaldricks/entities/fund.rb', line 34

def year
  @year
end

Instance Method Details

#to_hashObject



43
44
45
46
47
# File 'lib/stbaldricks/entities/fund.rb', line 43

def to_hash
  {}.tap do |hsh|
    self.class.defined_attributes.each { |name| hsh[name] = send(name.to_sym) unless name.to_sym == :year }
  end
end