Class: FinchAPI::Models::Income

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/finch-api/models/income.rb

Defined Under Namespace

Modules: Unit

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(amount: nil, currency: nil, effective_date: nil, unit: nil) ⇒ Income

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: nil)
  • currency (String, nil) (defaults to: nil)
  • effective_date (String, nil) (defaults to: nil)
  • unit (Symbol, FinchAPI::Models::Income::Unit, nil) (defaults to: nil)


10
# File 'lib/finch-api/models/income.rb', line 10

def initialize(amount: nil, currency: nil, effective_date: nil, unit: nil, **) = super

Instance Attribute Details

#amountInteger?

The income amount in cents.

Returns:

  • (Integer, nil)


10
# File 'lib/finch-api/models/income.rb', line 10

optional :amount, Integer, nil?: true

#currencyString?

The currency code.

Returns:

  • (String, nil)


16
# File 'lib/finch-api/models/income.rb', line 16

optional :currency, String, nil?: true

#effective_dateString?

The date the income amount went into effect.

Returns:

  • (String, nil)


22
# File 'lib/finch-api/models/income.rb', line 22

optional :effective_date, String, 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

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