Class: Kombo::Models::Shared::TimeOffBalance
- Inherits:
-
Object
- Object
- Kombo::Models::Shared::TimeOffBalance
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kombo/models/shared/time_off_balance.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id:, employee_id:, type_id:, changed_at:, remote_id: nil, balance: nil, balance_unit: nil, remote_deleted_at: nil, used: nil, used_unit: nil) ⇒ TimeOffBalance
constructor
A new instance of TimeOffBalance.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(id:, employee_id:, type_id:, changed_at:, remote_id: nil, balance: nil, balance_unit: nil, remote_deleted_at: nil, used: nil, used_unit: nil) ⇒ TimeOffBalance
Returns a new instance of TimeOffBalance.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/kombo/models/shared/time_off_balance.rb', line 39 def initialize(id:, employee_id:, type_id:, changed_at:, remote_id: nil, balance: nil, balance_unit: nil, remote_deleted_at: nil, used: nil, used_unit: nil) @id = id @employee_id = employee_id @type_id = type_id @changed_at = changed_at @remote_id = remote_id @balance = balance @balance_unit = balance_unit @remote_deleted_at = remote_deleted_at @used = used @used_unit = used_unit end |
Instance Method Details
#==(other) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/kombo/models/shared/time_off_balance.rb', line 53 def ==(other) return false unless other.is_a? self.class return false unless @id == other.id return false unless @employee_id == other.employee_id return false unless @type_id == other.type_id return false unless @changed_at == other.changed_at return false unless @remote_id == other.remote_id return false unless @balance == other.balance return false unless @balance_unit == other.balance_unit return false unless @remote_deleted_at == other.remote_deleted_at return false unless @used == other.used return false unless @used_unit == other.used_unit true end |