class ShiftNote::Employee

An employee.

Attributes

id[R]

@return [Integer] the ID of the employee

Public Class Methods

new(id: nil) click to toggle source
# File lib/shiftnote/employee.rb, line 3
def initialize(id: nil)
  @id = id
end

Public Instance Methods

delete(convert_shifts = false) click to toggle source

Deletes this employee Quote from the site

This employee may have scheduled shifts.
You can choose to have these assigned shifts converted to house shifts if they are on a published schedule, and template shifts if they are on a draft schedule.
If [false], you will have to manually reassign or delete any shifts assigned to this employee.
true

will convert assigned shifts to house and template shifts.

@param convert_shifts [true, false] whether to convert these shifts

# File lib/shiftnote/employee.rb, line 17
def delete(convert_shifts = false)
  cooki = cookie
  puts cooki
  data = {
    'EmployeeID' => @id,
    'ConvertShifts' => convert_shifts,
    '_' => Time.now.to_i * 1000
  }
end