Class: GustoEmbedded::Models::Shared::TimeOffPolicyRequest

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

Overview

Request body for creating a time off policy

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(name:, policy_type:, accrual_method:, paid_out_on_termination: nil, complete: nil, accrual_rate: nil, accrual_rate_unit: nil, accrual_waiting_period_days: nil, carryover_limit_hours: nil, max_accrual_hours_per_year: nil, max_hours: nil, policy_reset_date: nil) ⇒ TimeOffPolicyRequest

Returns a new instance of TimeOffPolicyRequest.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/gusto_embedded/models/shared/time_off_policy_request.rb', line 41

def initialize(name:, policy_type:, accrual_method:, paid_out_on_termination: nil, complete: nil, accrual_rate: nil, accrual_rate_unit: nil, accrual_waiting_period_days: nil, carryover_limit_hours: nil, max_accrual_hours_per_year: nil, max_hours: nil, policy_reset_date: nil)
  @name = name
  @policy_type = policy_type
  @accrual_method = accrual_method
  @paid_out_on_termination = paid_out_on_termination
  @complete = complete
  @accrual_rate = accrual_rate
  @accrual_rate_unit = accrual_rate_unit
  @accrual_waiting_period_days = accrual_waiting_period_days
  @carryover_limit_hours = carryover_limit_hours
  @max_accrual_hours_per_year = max_accrual_hours_per_year
  @max_hours = max_hours
  @policy_reset_date = policy_reset_date
end

Instance Method Details

#==(other) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/gusto_embedded/models/shared/time_off_policy_request.rb', line 57

def ==(other)
  return false unless other.is_a? self.class
  return false unless @name == other.name
  return false unless @policy_type == other.policy_type
  return false unless @accrual_method == other.accrual_method
  return false unless @paid_out_on_termination == other.paid_out_on_termination
  return false unless @complete == other.complete
  return false unless @accrual_rate == other.accrual_rate
  return false unless @accrual_rate_unit == other.accrual_rate_unit
  return false unless @accrual_waiting_period_days == other.accrual_waiting_period_days
  return false unless @carryover_limit_hours == other.carryover_limit_hours
  return false unless @max_accrual_hours_per_year == other.max_accrual_hours_per_year
  return false unless @max_hours == other.max_hours
  return false unless @policy_reset_date == other.policy_reset_date
  true
end