Class: StackOne::Models::Shared::TimeOffBalances

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/stack_one/models/shared/timeoffbalances.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(balance_expiry_date: nil, balance_start_date: nil, balance_unit: nil, current_balance: nil, employee_id: nil, id: nil, initial_balance: nil, is_unlimited: nil, policy: nil, policy_id: nil, remote_employee_id: nil, remote_id: nil, remote_policy_id: nil, updated_at: nil) ⇒ TimeOffBalances

Returns a new instance of TimeOffBalances.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/stack_one/models/shared/timeoffbalances.rb', line 45

def initialize(balance_expiry_date: nil, balance_start_date: nil, balance_unit: nil, current_balance: nil, employee_id: nil, id: nil, initial_balance: nil, is_unlimited: nil, policy: nil, policy_id: nil, remote_employee_id: nil, remote_id: nil, remote_policy_id: nil, updated_at: nil)
  @balance_expiry_date = balance_expiry_date
  @balance_start_date = balance_start_date
  @balance_unit = balance_unit
  @current_balance = current_balance
  @employee_id = employee_id
  @id = id
  @initial_balance = initial_balance
  @is_unlimited = is_unlimited
  @policy = policy
  @policy_id = policy_id
  @remote_employee_id = remote_employee_id
  @remote_id = remote_id
  @remote_policy_id = remote_policy_id
  @updated_at = updated_at
end

Instance Method Details

#==(other) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/stack_one/models/shared/timeoffbalances.rb', line 63

def ==(other)
  return false unless other.is_a? self.class
  return false unless @balance_expiry_date == other.balance_expiry_date
  return false unless @balance_start_date == other.balance_start_date
  return false unless @balance_unit == other.balance_unit
  return false unless @current_balance == other.current_balance
  return false unless @employee_id == other.employee_id
  return false unless @id == other.id
  return false unless @initial_balance == other.initial_balance
  return false unless @is_unlimited == other.is_unlimited
  return false unless @policy == other.policy
  return false unless @policy_id == other.policy_id
  return false unless @remote_employee_id == other.remote_employee_id
  return false unless @remote_id == other.remote_id
  return false unless @remote_policy_id == other.remote_policy_id
  return false unless @updated_at == other.updated_at
  true
end