Class: Booker::V4::Models::LocationDaySchedule

Inherits:
Model
  • Object
show all
Defined in:
lib/booker/v4/models/location_day_schedule.rb

Constant Summary

Constants inherited from Model

Model::CONSTANTIZE_MODULE

Constants inherited from Model

Model::CONSTANTIZE_MODULE

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Concerns::DateTimeConcern

#time_from_booker_datetime, #time_to_booker_datetime, #timezone_from_booker_offset!, #timezone_from_booker_timezone, #to_wday

Methods inherited from Model

constantize, from_list, #initialize, #to_hash, #to_json

Constructor Details

This class inherits a constructor from Booker::Model

Instance Attribute Details

#EndTimeObject

Returns the value of attribute EndTime.



5
6
7
# File 'lib/booker/v4/models/location_day_schedule.rb', line 5

def EndTime
  @EndTime
end

#StartTimeObject

Returns the value of attribute StartTime.



5
6
7
# File 'lib/booker/v4/models/location_day_schedule.rb', line 5

def StartTime
  @StartTime
end

#WeekdayObject

Returns the value of attribute Weekday.



5
6
7
# File 'lib/booker/v4/models/location_day_schedule.rb', line 5

def Weekday
  @Weekday
end

Class Method Details

.from_hash(hash) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/booker/v4/models/location_day_schedule.rb', line 9

def self.from_hash(hash)
  model = super
  model.Weekday = to_wday(model.Weekday)
  strftime_format = '%T'
  model.StartTime = model.StartTime.try(:strftime, strftime_format)
  model.EndTime = model.EndTime.try(:strftime, strftime_format)
  model
end