Class: GustoEmbedded::Models::Shared::EmbeddedTimeOffRequestPreview
- Inherits:
-
Object
- Object
- GustoEmbedded::Models::Shared::EmbeddedTimeOffRequestPreview
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/gusto_embedded/models/shared/embedded_time_off_request_preview.rb
Overview
Preview of the balance impact for a time off request before it is created or updated.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(this_request_hours:, other_requested_hours:, allow_negative_balance:, unlimited:, balance_hours: nil, remaining_balance_hours: nil) ⇒ EmbeddedTimeOffRequestPreview
constructor
A new instance of EmbeddedTimeOffRequestPreview.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(this_request_hours:, other_requested_hours:, allow_negative_balance:, unlimited:, balance_hours: nil, remaining_balance_hours: nil) ⇒ EmbeddedTimeOffRequestPreview
Returns a new instance of EmbeddedTimeOffRequestPreview.
29 30 31 32 33 34 35 36 |
# File 'lib/gusto_embedded/models/shared/embedded_time_off_request_preview.rb', line 29 def initialize(this_request_hours:, other_requested_hours:, allow_negative_balance:, unlimited:, balance_hours: nil, remaining_balance_hours: nil) @this_request_hours = this_request_hours @other_requested_hours = other_requested_hours @allow_negative_balance = allow_negative_balance @unlimited = unlimited @balance_hours = balance_hours @remaining_balance_hours = remaining_balance_hours end |
Instance Method Details
#==(other) ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/gusto_embedded/models/shared/embedded_time_off_request_preview.rb', line 39 def ==(other) return false unless other.is_a? self.class return false unless @this_request_hours == other.this_request_hours return false unless @other_requested_hours == other.other_requested_hours return false unless @allow_negative_balance == other.allow_negative_balance return false unless @unlimited == other.unlimited return false unless @balance_hours == other.balance_hours return false unless @remaining_balance_hours == other.remaining_balance_hours true end |