Class: FinchAPI::Models::HRIS::PayStatement::Earning

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

Defined Under Namespace

Modules: Type Classes: Attributes

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_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!

Constructor Details

#initialize(metadata: nil) ⇒ Object

Some parameter documentations has been truncated, see HRIS::PayStatement::Earning::Attributes::Metadata for more details.

Parameters:

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

    The metadata to be attached to the entity by existing rules. It is a key-value p



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
# File 'lib/finch_api/models/hris/pay_statement.rb', line 99

class Earning < FinchAPI::Internal::Type::BaseModel
  # @!attribute amount
  #   The earnings amount in cents.
  #
  #   @return [Integer, nil]
  optional :amount, Integer, nil?: true

  # @!attribute attributes
  #
  #   @return [FinchAPI::HRIS::PayStatement::Earning::Attributes, nil]
  optional :attributes, -> { FinchAPI::HRIS::PayStatement::Earning::Attributes }, nil?: true

  # @!attribute currency
  #   The earnings currency code.
  #
  #   @return [String, nil]
  optional :currency, String, nil?: true

  # @!attribute hours
  #   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).
  #
  #   @return [Float, nil]
  optional :hours, Float, nil?: true

  # @!attribute name
  #   The exact name of the deduction from the pay statement.
  #
  #   @return [String, nil]
  optional :name, String, nil?: true

  # @!attribute type
  #   The type of earning.
  #
  #   @return [Symbol, FinchAPI::HRIS::PayStatement::Earning::Type, nil]
  optional :type, enum: -> { FinchAPI::HRIS::PayStatement::Earning::Type }, nil?: true

  # @!method initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil)
  #   Some parameter documentations has been truncated, see
  #   {FinchAPI::HRIS::PayStatement::Earning} for more details.
  #
  #   @param amount [Integer, nil] The earnings amount in cents.
  #
  #   @param attributes [FinchAPI::HRIS::PayStatement::Earning::Attributes, nil]
  #
  #   @param currency [String, nil] The earnings currency code.
  #
  #   @param hours [Float, nil] The number of hours associated with this earning. (For salaried employees, this
  #
  #   @param name [String, nil] The exact name of the deduction from the pay statement.
  #
  #   @param type [Symbol, FinchAPI::HRIS::PayStatement::Earning::Type, nil] The type of earning.

  # @see FinchAPI::HRIS::PayStatement::Earning#attributes
  class Attributes < FinchAPI::Internal::Type::BaseModel
    # @!attribute metadata
    #
    #   @return [FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata, nil]
    optional :metadata, -> { FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata }

    # @!method initialize(metadata: nil)
    #   @param metadata [FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata]

    # @see FinchAPI::HRIS::PayStatement::Earning::Attributes#metadata
    class Metadata < FinchAPI::Internal::Type::BaseModel
      # @!attribute metadata
      #   The metadata to be attached to the entity by existing rules. It is a key-value
      #   pairs where the values can be of any type (string, number, boolean, object,
      #   array, etc.).
      #
      #   @return [Hash{Symbol=>Object, nil}, nil]
      optional :metadata,
               FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true]

      # @!method initialize(metadata: nil)
      #   Some parameter documentations has been truncated, see
      #   {FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata} for more details.
      #
      #   @param metadata [Hash{Symbol=>Object, nil}] The metadata to be attached to the entity by existing rules. It is a key-value p
    end
  end

  # The type of earning.
  #
  # @see FinchAPI::HRIS::PayStatement::Earning#type
  module Type
    extend FinchAPI::Internal::Type::Enum

    SALARY = :salary
    WAGE = :wage
    REIMBURSEMENT = :reimbursement
    OVERTIME = :overtime
    SEVERANCE = :severance
    DOUBLE_OVERTIME = :double_overtime
    PTO = :pto
    SICK = :sick
    BONUS = :bonus
    COMMISSION = :commission
    TIPS = :tips
    TYPE_1099 = :"1099"
    OTHER = :other

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

Instance Attribute Details

#amountInteger?

The earnings amount in cents.

Returns:

  • (Integer, nil)


104
# File 'lib/finch_api/models/hris/pay_statement.rb', line 104

optional :amount, Integer, nil?: true

#attributesFinchAPI::HRIS::PayStatement::Earning::Attributes?

Returns:

  • (FinchAPI::HRIS::PayStatement::Earning::Attributes, nil)


109
# File 'lib/finch_api/models/hris/pay_statement.rb', line 109

optional :attributes, -> { FinchAPI::HRIS::PayStatement::Earning::Attributes }, nil?: true

#currencyString?

The earnings currency code.

Returns:

  • (String, nil)


115
# File 'lib/finch_api/models/hris/pay_statement.rb', line 115

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)


122
# File 'lib/finch_api/models/hris/pay_statement.rb', line 122

optional :hours, Float, nil?: true

#nameString?

The exact name of the deduction from the pay statement.

Returns:

  • (String, nil)


128
# File 'lib/finch_api/models/hris/pay_statement.rb', line 128

optional :name, String, nil?: true

#typeSymbol, ...

The type of earning.

Returns:

  • (Symbol, FinchAPI::HRIS::PayStatement::Earning::Type, nil)


134
# File 'lib/finch_api/models/hris/pay_statement.rb', line 134

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