Class: VitableConnect::Models::Employee::Deduction

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/vitable_connect/models/employee.rb

Defined Under Namespace

Modules: Frequency, TaxClassification

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(benefit_name:, deduction_amount_in_cents:, deduction_category:, frequency:, period_end_date:, period_start_date:, tax_classification:) ⇒ Object

Some parameter documentations has been truncated, see VitableConnect::Models::Employee::Deduction for more details.

Parameters:



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/vitable_connect/models/employee.rb', line 171

class Deduction < VitableConnect::Internal::Type::BaseModel
  # @!attribute benefit_name
  #   Name of the benefit plan
  #
  #   @return [String]
  required :benefit_name, String

  # @!attribute deduction_amount_in_cents
  #   Employee deduction amount in cents
  #
  #   @return [Integer]
  required :deduction_amount_in_cents, Integer

  # @!attribute deduction_category
  #   Deduction category (reserved for future use)
  #
  #   @return [String, nil]
  required :deduction_category, String, nil?: true

  # @!attribute frequency
  #   - `weekly` - Weekly
  #   - `bi_weekly` - Bi Weekly
  #   - `semi_monthly` - Semi Monthly
  #   - `monthly` - Monthly
  #
  #   @return [Symbol, VitableConnect::Models::Employee::Deduction::Frequency]
  required :frequency, enum: -> { VitableConnect::Employee::Deduction::Frequency }

  # @!attribute period_end_date
  #   Period end date (YYYY-MM-DD)
  #
  #   @return [Date]
  required :period_end_date, Date

  # @!attribute period_start_date
  #   Period start date (YYYY-MM-DD)
  #
  #   @return [Date]
  required :period_start_date, Date

  # @!attribute tax_classification
  #   - `Unknown` - Unknown
  #   - `Pre-tax` - Pre Tax
  #   - `Post-tax` - Post Tax
  #
  #   @return [Symbol, VitableConnect::Models::Employee::Deduction::TaxClassification]
  required :tax_classification, enum: -> { VitableConnect::Employee::Deduction::TaxClassification }

  # @!method initialize(benefit_name:, deduction_amount_in_cents:, deduction_category:, frequency:, period_end_date:, period_start_date:, tax_classification:)
  #   Some parameter documentations has been truncated, see
  #   {VitableConnect::Models::Employee::Deduction} for more details.
  #
  #   @param benefit_name [String] Name of the benefit plan
  #
  #   @param deduction_amount_in_cents [Integer] Employee deduction amount in cents
  #
  #   @param deduction_category [String, nil] Deduction category (reserved for future use)
  #
  #   @param frequency [Symbol, VitableConnect::Models::Employee::Deduction::Frequency] - `weekly` - Weekly
  #
  #   @param period_end_date [Date] Period end date (YYYY-MM-DD)
  #
  #   @param period_start_date [Date] Period start date (YYYY-MM-DD)
  #
  #   @param tax_classification [Symbol, VitableConnect::Models::Employee::Deduction::TaxClassification] - `Unknown` - Unknown

  # - `weekly` - Weekly
  # - `bi_weekly` - Bi Weekly
  # - `semi_monthly` - Semi Monthly
  # - `monthly` - Monthly
  #
  # @see VitableConnect::Models::Employee::Deduction#frequency
  module Frequency
    extend VitableConnect::Internal::Type::Enum

    WEEKLY = :weekly
    BI_WEEKLY = :bi_weekly
    SEMI_MONTHLY = :semi_monthly
    MONTHLY = :monthly

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # - `Unknown` - Unknown
  # - `Pre-tax` - Pre Tax
  # - `Post-tax` - Post Tax
  #
  # @see VitableConnect::Models::Employee::Deduction#tax_classification
  module TaxClassification
    extend VitableConnect::Internal::Type::Enum

    UNKNOWN = :Unknown
    PRE_TAX = :"Pre-tax"
    POST_TAX = :"Post-tax"

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#benefit_nameString

Name of the benefit plan

Returns:

  • (String)


176
# File 'lib/vitable_connect/models/employee.rb', line 176

required :benefit_name, String

#deduction_amount_in_centsInteger

Employee deduction amount in cents

Returns:

  • (Integer)


182
# File 'lib/vitable_connect/models/employee.rb', line 182

required :deduction_amount_in_cents, Integer

#deduction_categoryString?

Deduction category (reserved for future use)

Returns:

  • (String, nil)


188
# File 'lib/vitable_connect/models/employee.rb', line 188

required :deduction_category, String, nil?: true

#frequencySymbol, VitableConnect::Models::Employee::Deduction::Frequency

  • ‘weekly` - Weekly

  • ‘bi_weekly` - Bi Weekly

  • ‘semi_monthly` - Semi Monthly

  • ‘monthly` - Monthly



197
# File 'lib/vitable_connect/models/employee.rb', line 197

required :frequency, enum: -> { VitableConnect::Employee::Deduction::Frequency }

#period_end_dateDate

Period end date (YYYY-MM-DD)

Returns:

  • (Date)


203
# File 'lib/vitable_connect/models/employee.rb', line 203

required :period_end_date, Date

#period_start_dateDate

Period start date (YYYY-MM-DD)

Returns:

  • (Date)


209
# File 'lib/vitable_connect/models/employee.rb', line 209

required :period_start_date, Date

#tax_classificationSymbol, VitableConnect::Models::Employee::Deduction::TaxClassification

  • ‘Unknown` - Unknown

  • ‘Pre-tax` - Pre Tax

  • ‘Post-tax` - Post Tax



217
# File 'lib/vitable_connect/models/employee.rb', line 217

required :tax_classification, enum: -> { VitableConnect::Employee::Deduction::TaxClassification }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vitable_connect/models/employee.rb', line 251