Class: SBF::Client::FullEvent

Inherits:
Event show all
Extended by:
Forwardable
Defined in:
lib/stbaldricks/entities/event.rb

Constant Summary

Constants inherited from TopLevelEntity

TopLevelEntity::DEFAULT_CLASS_ACTIONS, TopLevelEntity::DEFAULT_CRUD_ACTIONS, TopLevelEntity::DEFAULT_ENDPOINT, TopLevelEntity::DEFAULT_INSTANCE_ACTIONS

Constants inherited from BaseEntity

BaseEntity::ELSE

Instance Attribute Summary collapse

Attributes inherited from BaseEntity

#errors

Instance Method Summary collapse

Methods inherited from Event

#keys_hash, #update

Methods included from VenueConcern

#venue_address

Methods included from FundraisingPageConcern

#fundraising_page_url

Methods included from EventYearConcern

#event_year

Methods included from DonationRecipientConcern

#donation_recipient_url

Methods included from Entities::Cacheable

#cache_id, included

Methods inherited from TopLevelEntity

_endpoint, action, actions, blacklist_action, class_action, define_endpoint, endpoint, #endpoint, instance_action

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_hash, #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

#created_atObject (readonly)

Returns the value of attribute created_at.



186
187
188
# File 'lib/stbaldricks/entities/event.rb', line 186

def created_at
  @created_at
end

#dateObject

Returns the value of attribute date.



169
170
171
# File 'lib/stbaldricks/entities/event.rb', line 169

def date
  @date
end

#display_nameObject (readonly)

Returns the value of attribute display_name.



163
164
165
# File 'lib/stbaldricks/entities/event.rb', line 163

def display_name
  @display_name
end

#end_timeObject

Returns the value of attribute end_time.



170
171
172
# File 'lib/stbaldricks/entities/event.rb', line 170

def end_time
  @end_time
end

#event_titleObject

Returns the value of attribute event_title.



164
165
166
# File 'lib/stbaldricks/entities/event.rb', line 164

def event_title
  @event_title
end

#fund_relationship_typeObject

Returns the value of attribute fund_relationship_type.



197
198
199
# File 'lib/stbaldricks/entities/event.rb', line 197

def fund_relationship_type
  @fund_relationship_type
end

#fundraising_goalObject

Returns the value of attribute fundraising_goal.



173
174
175
# File 'lib/stbaldricks/entities/event.rb', line 173

def fundraising_goal
  @fundraising_goal
end

#fundraising_messageObject

Returns the value of attribute fundraising_message.



173
174
175
# File 'lib/stbaldricks/entities/event.rb', line 173

def fundraising_message
  @fundraising_message
end

#how_createdObject

Returns the value of attribute how_created.



188
189
190
# File 'lib/stbaldricks/entities/event.rb', line 188

def how_created
  @how_created
end

#idObject

Returns the value of attribute id.



161
162
163
# File 'lib/stbaldricks/entities/event.rb', line 161

def id
  @id
end

#is_date_confirmedObject

Returns the value of attribute is_date_confirmed.



169
170
171
# File 'lib/stbaldricks/entities/event.rb', line 169

def is_date_confirmed
  @is_date_confirmed
end

#is_open_for_fast_registrationObject

Returns the value of attribute is_open_for_fast_registration.



171
172
173
# File 'lib/stbaldricks/entities/event.rb', line 171

def is_open_for_fast_registration
  @is_open_for_fast_registration
end

#is_open_for_registrationObject

Returns the value of attribute is_open_for_registration.



171
172
173
# File 'lib/stbaldricks/entities/event.rb', line 171

def is_open_for_registration
  @is_open_for_registration
end

#is_privateObject

Returns the value of attribute is_private.



168
169
170
# File 'lib/stbaldricks/entities/event.rb', line 168

def is_private
  @is_private
end

#is_time_confirmedObject

Returns the value of attribute is_time_confirmed.



170
171
172
# File 'lib/stbaldricks/entities/event.rb', line 170

def is_time_confirmed
  @is_time_confirmed
end

#modified_atObject (readonly)

Returns the value of attribute modified_at.



186
187
188
# File 'lib/stbaldricks/entities/event.rb', line 186

def modified_at
  @modified_at
end

#modified_byObject

Returns the value of attribute modified_by.



187
188
189
# File 'lib/stbaldricks/entities/event.rb', line 187

def modified_by
  @modified_by
end

#offline_donation_formObject

Returns the value of attribute offline_donation_form.



172
173
174
# File 'lib/stbaldricks/entities/event.rb', line 172

def offline_donation_form
  @offline_donation_form
end

#offline_donation_uuidObject

Returns the value of attribute offline_donation_uuid.



172
173
174
# File 'lib/stbaldricks/entities/event.rb', line 172

def offline_donation_uuid
  @offline_donation_uuid
end

#promotional_codeObject

Returns the value of attribute promotional_code.



189
190
191
# File 'lib/stbaldricks/entities/event.rb', line 189

def promotional_code
  @promotional_code
end

#start_timeObject

Returns the value of attribute start_time.



170
171
172
# File 'lib/stbaldricks/entities/event.rb', line 170

def start_time
  @start_time
end

#statusObject

Returns the value of attribute status.



162
163
164
# File 'lib/stbaldricks/entities/event.rb', line 162

def status
  @status
end

#sub_typeObject

Returns the value of attribute sub_type.



167
168
169
# File 'lib/stbaldricks/entities/event.rb', line 167

def sub_type
  @sub_type
end

#typeObject

Returns the value of attribute type.



165
166
167
# File 'lib/stbaldricks/entities/event.rb', line 165

def type
  @type
end

#type_otherObject

Returns the value of attribute type_other.



166
167
168
# File 'lib/stbaldricks/entities/event.rb', line 166

def type_other
  @type_other
end

#yearObject

Returns the value of attribute year.



161
162
163
# File 'lib/stbaldricks/entities/event.rb', line 161

def year
  @year
end

Instance Method Details

#active?Boolean

Returns:



199
200
201
# File 'lib/stbaldricks/entities/event.rb', line 199

def active?
  status == SBF::Client::Event::Status::ACTIVE
end

#open_for_fast_registration?Boolean

Returns:



216
217
218
# File 'lib/stbaldricks/entities/event.rb', line 216

def open_for_fast_registration?
  is_open_for_fast_registration
end

#open_for_registration?Boolean

Returns:



212
213
214
# File 'lib/stbaldricks/entities/event.rb', line 212

def open_for_registration?
  is_open_for_registration
end

#past?Boolean

Returns:



220
221
222
223
224
# File 'lib/stbaldricks/entities/event.rb', line 220

def past?
  Date.today > Date.parse(date)
rescue
  nil
end

#venue_virtual?Boolean

Returns:



203
204
205
206
# File 'lib/stbaldricks/entities/event.rb', line 203

def venue_virtual?
  [SBF::Client::Event::Venue::Location::Type::VIRTUAL,
   SBF::Client::Event::Venue::Location::Type::HYBRID].include? venue.location.type
end

#virtual?Boolean

Returns:



208
209
210
# File 'lib/stbaldricks/entities/event.rb', line 208

def virtual?
  (id == 1) && (sub_type == SBF::Client::Event::SubType::VIRTUAL)
end