class ShiftNote::ScheduleThisWeek
The schedule for this week.
Attributes
cost[R]
The cost is simply hours * rate. @return [Float] the amount of pay the employee will receive
end_date[R]
@return [Time] the end date of the schedule.
hours[R]
@return [Float] the total hours this employee is working this schedule
raw[R]
@return [JSON] the raw data returned by ShiftNote
.
schedule[R]
@return [ShiftNote::DaysOfWeekShifts] the schedule for this week
shifts[R]
@return [Float] the amount of shifts this person has this week.
start_date[R]
@return [Time] the start date of the schedule.
Public Class Methods
new(data)
click to toggle source
# File lib/shiftnote/schedule_this_week.rb, line 3 def initialize(data) @raw = data @start_date = Time.parse(data['StartDate']) @end_date = Time.parse(data['EndDate']) @hours = data['Hours'] @cost = data['Cost'] @shifts = data['Shifts'] @schedule = ShiftNote::DaysOfWeekShifts.new(data['DaysOfWeekShifts']) end