Class: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning

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

Overview

def initialize: (Hash | FinchAPI::BaseModel) -> void

Defined Under Namespace

Modules: Type Classes: Attributes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata: nil) ⇒ Earning

Returns a new instance of Earning.

Parameters:

  • metadata (Hash{Symbol=>Object}) (defaults to: nil)


8
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 8

def initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil, **) = super

Instance Attribute Details

#amountInteger?

The earnings amount in cents.

Returns:

  • (Integer, nil)


158
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 158

optional :amount, Integer, nil?: true

#attributesFinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes?



163
164
165
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 163

optional :attributes,
-> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes },
nil?: true

#currencyString?

The earnings currency code.

Returns:

  • (String, nil)


171
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 171

optional :currency, String, nil?: true

#hoursFloat?

The number of hours associated with this earning. (For salaried employees, this

could be hours per pay period, `0` or `null`, depending on the provider).

Returns:

  • (Float, nil)


178
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 178

optional :hours, Float, nil?: true

#metadata=(value) ⇒ Hash{Symbol=>Object} (writeonly)

Returns:

  • (Hash{Symbol=>Object})


2
3
4
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 2

def metadata=(value)
  @metadata = value
end

#nameString?

The exact name of the deduction from the pay statement.

Returns:

  • (String, nil)


184
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 184

optional :name, String, nil?: true

#typeSymbol, ...

The type of earning.



190
191
192
# File 'lib/finch-api/models/sandbox/payment_create_params.rb', line 190

optional :type,
enum: -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type },
nil?: true