Class: GustoEmbedded::Models::Shared::Garnishment
- Inherits:
-
Object
- Object
- GustoEmbedded::Models::Shared::Garnishment
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/gusto_embedded/models/shared/garnishment.rb
Overview
Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(uuid:, version: nil, employee_uuid: nil, amount: nil, description: nil, court_ordered: nil, active: true, recurring: false, deduct_as_percentage: false, garnishment_type: nil, child_support: nil, times: nil, annual_maximum: nil, total_amount: nil, pay_period_maximum: nil) ⇒ Garnishment
constructor
A new instance of Garnishment.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(uuid:, version: nil, employee_uuid: nil, amount: nil, description: nil, court_ordered: nil, active: true, recurring: false, deduct_as_percentage: false, garnishment_type: nil, child_support: nil, times: nil, annual_maximum: nil, total_amount: nil, pay_period_maximum: nil) ⇒ Garnishment
Returns a new instance of Garnishment.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/gusto_embedded/models/shared/garnishment.rb', line 47 def initialize(uuid:, version: nil, employee_uuid: nil, amount: nil, description: nil, court_ordered: nil, active: true, recurring: false, deduct_as_percentage: false, garnishment_type: nil, child_support: nil, times: nil, annual_maximum: nil, total_amount: nil, pay_period_maximum: nil) @uuid = uuid @version = version @employee_uuid = employee_uuid @amount = amount @description = description @court_ordered = court_ordered @active = active @recurring = recurring @deduct_as_percentage = deduct_as_percentage @garnishment_type = garnishment_type @child_support = child_support @times = times @annual_maximum = annual_maximum @total_amount = total_amount @pay_period_maximum = pay_period_maximum end |
Instance Method Details
#==(other) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/gusto_embedded/models/shared/garnishment.rb', line 66 def ==(other) return false unless other.is_a? self.class return false unless @uuid == other.uuid return false unless @version == other.version return false unless @employee_uuid == other.employee_uuid return false unless @amount == other.amount return false unless @description == other.description return false unless @court_ordered == other.court_ordered return false unless @active == other.active return false unless @recurring == other.recurring return false unless @deduct_as_percentage == other.deduct_as_percentage return false unless @garnishment_type == other.garnishment_type return false unless @child_support == other.child_support return false unless @times == other.times return false unless @annual_maximum == other.annual_maximum return false unless @total_amount == other.total_amount return false unless @pay_period_maximum == other.pay_period_maximum true end |