Class: GustoEmbedded::Models::Shared::GarnishmentRequest

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

Overview

Request body for creating a garnishment.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(amount:, court_ordered:, description: nil, active: true, garnishment_type: nil, recurring: false, deduct_as_percentage: false, total_amount: nil, child_support: nil, times: nil, annual_maximum: nil, pay_period_maximum: nil) ⇒ GarnishmentRequest

Returns a new instance of GarnishmentRequest.



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

def initialize(amount:, court_ordered:, description: nil, active: true, garnishment_type: nil, recurring: false, deduct_as_percentage: false, total_amount: nil, child_support: nil, times: nil, annual_maximum: nil, pay_period_maximum: nil)
  @amount = amount
  @court_ordered = court_ordered
  @description = description
  @active = active
  @garnishment_type = garnishment_type
  @recurring = recurring
  @deduct_as_percentage = deduct_as_percentage
  @total_amount = total_amount
  @child_support = child_support
  @times = times
  @annual_maximum = annual_maximum
  @pay_period_maximum = pay_period_maximum
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/garnishment_request.rb', line 57

def ==(other)
  return false unless other.is_a? self.class
  return false unless @amount == other.amount
  return false unless @court_ordered == other.court_ordered
  return false unless @description == other.description
  return false unless @active == other.active
  return false unless @garnishment_type == other.garnishment_type
  return false unless @recurring == other.recurring
  return false unless @deduct_as_percentage == other.deduct_as_percentage
  return false unless @total_amount == other.total_amount
  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 @pay_period_maximum == other.pay_period_maximum
  true
end