Class: FinchAPI::Models::Income

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/finch_api/models/income.rb

Defined Under Namespace

Modules: Unit

Instance Attribute 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(amount: , currency: , effective_date: , unit: ) ⇒ Object

Some parameter documentations has been truncated, see FinchAPI::Models::Income for more details.

The employee’s income as reported by the provider. This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns.

Parameters:

  • amount (Integer, nil) (defaults to: )

    The income amount in cents.

  • currency (String, nil) (defaults to: )

    The currency code.

  • effective_date (Date, nil) (defaults to: )

    The date the income amount went into effect.

  • unit (Symbol, FinchAPI::Models::Income::Unit, nil) (defaults to: )

    The income unit of payment. Options: ‘yearly`, `quarterly`, `monthly`, `semi_mon



# File 'lib/finch_api/models/income.rb', line 31

Instance Attribute Details

#amountInteger?

The income amount in cents.

Returns:

  • (Integer, nil)


10
# File 'lib/finch_api/models/income.rb', line 10

required :amount, Integer, nil?: true

#currencyString?

The currency code.

Returns:

  • (String, nil)


16
# File 'lib/finch_api/models/income.rb', line 16

required :currency, String, nil?: true

#effective_dateDate?

The date the income amount went into effect.

Returns:

  • (Date, nil)


22
# File 'lib/finch_api/models/income.rb', line 22

required :effective_date, Date, nil?: true

#unitSymbol, ...

The income unit of payment. Options: ‘yearly`, `quarterly`, `monthly`, `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.

Returns:



29
# File 'lib/finch_api/models/income.rb', line 29

required :unit, enum: -> { FinchAPI::Income::Unit }, nil?: true