Class: StackOne::Models::Shared::TimeOff
- Inherits:
-
Object
- Object
- StackOne::Models::Shared::TimeOff
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/stack_one/models/shared/timeoff.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(approver_id: nil, comment: nil, created_at: nil, duration: nil, employee_id: nil, end_date: nil, end_half_day: nil, id: nil, policy: nil, reason: nil, remote_approver_id: nil, remote_employee_id: nil, remote_id: nil, remote_time_off_policy_id: nil, start_date: nil, start_half_day: nil, status: nil, time_off_policy_id: nil, type: nil, updated_at: nil) ⇒ TimeOff
constructor
A new instance of TimeOff.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(approver_id: nil, comment: nil, created_at: nil, duration: nil, employee_id: nil, end_date: nil, end_half_day: nil, id: nil, policy: nil, reason: nil, remote_approver_id: nil, remote_employee_id: nil, remote_id: nil, remote_time_off_policy_id: nil, start_date: nil, start_half_day: nil, status: nil, time_off_policy_id: nil, type: nil, updated_at: nil) ⇒ TimeOff
Returns a new instance of TimeOff.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/stack_one/models/shared/timeoff.rb', line 59 def initialize(approver_id: nil, comment: nil, created_at: nil, duration: nil, employee_id: nil, end_date: nil, end_half_day: nil, id: nil, policy: nil, reason: nil, remote_approver_id: nil, remote_employee_id: nil, remote_id: nil, remote_time_off_policy_id: nil, start_date: nil, start_half_day: nil, status: nil, time_off_policy_id: nil, type: nil, updated_at: nil) @approver_id = approver_id @comment = comment @created_at = created_at @duration = duration @employee_id = employee_id @end_date = end_date @end_half_day = end_half_day @id = id @policy = policy @reason = reason @remote_approver_id = remote_approver_id @remote_employee_id = remote_employee_id @remote_id = remote_id @remote_time_off_policy_id = remote_time_off_policy_id @start_date = start_date @start_half_day = start_half_day @status = status @time_off_policy_id = time_off_policy_id @type = type @updated_at = updated_at end |
Instance Method Details
#==(other) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/stack_one/models/shared/timeoff.rb', line 83 def ==(other) return false unless other.is_a? self.class return false unless @approver_id == other.approver_id return false unless @comment == other.comment return false unless @created_at == other.created_at return false unless @duration == other.duration return false unless @employee_id == other.employee_id return false unless @end_date == other.end_date return false unless @end_half_day == other.end_half_day return false unless @id == other.id return false unless @policy == other.policy return false unless @reason == other.reason return false unless @remote_approver_id == other.remote_approver_id return false unless @remote_employee_id == other.remote_employee_id return false unless @remote_id == other.remote_id return false unless @remote_time_off_policy_id == other.remote_time_off_policy_id return false unless @start_date == other.start_date return false unless @start_half_day == other.start_half_day return false unless @status == other.status return false unless @time_off_policy_id == other.time_off_policy_id return false unless @type == other.type return false unless @updated_at == other.updated_at true end |