class TandaCLI::Types::Shift

Included Modules

Defined in:

tanda_cli/types/shift.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module TandaCLI::Utils::Mixins::PrettyTimes::PrettyDate

pretty_date : String pretty_date

Instance methods inherited from module TandaCLI::Utils::Mixins::PrettyTimes::PrettyMaybeFinish

pretty_finish_time : String | Nil pretty_finish_time

Instance methods inherited from module TandaCLI::Utils::Mixins::PrettyTimes::PrettyMaybeStart

pretty_start_time : String | Nil pretty_start_time

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.from_array(response : HTTP::Client::Response, client : API::Client) : API::Result(Array(self)) #

Parse shifts and any associated leave requests


[View source]

Instance Method Detail

def breaks : Array(ShiftBreak) #

[View source]
def date : Time #

[View source]
def day_of_week : Time::DayOfWeek #

[View source]
def finish_time : Time | Nil #

[View source]
def id : Int32 #

[View source]
def leave_request : Types::LeaveRequest | Nil #

[View source]
def leave_request_id : Int32 | Nil #

[View source]
def nilable_notes : Array(Types::Note) | Nil #

[View source]
def notes : Array(Types::Note) #

[View source]
def ongoing? : Bool #

[View source]
def ongoing_break? : Bool #

[View source]
def ongoing_without_break? : Bool #

[View source]
def set_leave_request!(leave_request : Types::LeaveRequest) #

[View source]
def start_time : Time | Nil #

[View source]
def status : Status #

[View source]
def time_worked : Time::Span | Nil #

[View source]
def user_id : Int32 #

[View source]
def valid_breaks : Array(ShiftBreak) #

[View source]
def visible? : Bool #

[View source]
def worked_so_far : Time::Span | Nil #

[View source]