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

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(amount: , currency: , hours: , name: , type: , attributes: nil) ⇒ Object

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

Parameters:

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

    The earnings amount in cents.

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

    The earnings currency code.

  • hours (Float, nil) (defaults to: )

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

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

    The exact name of the deduction from the pay statement.

  • type (Symbol, FinchAPI::Models::HRIS::PayStatement::Earning::Type, nil) (defaults to: )

    The type of earning.

  • attributes (FinchAPI::Models::HRIS::PayStatement::Earning::Attributes, nil) (defaults to: nil)


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
205
# 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]
  required :amount, Integer, nil?: true

  # @!attribute currency
  #   The earnings currency code.
  #
  #   @return [String, nil]
  required :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]
  required :hours, Float, nil?: true

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

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

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

  # @!method initialize(amount:, currency:, hours:, name:, type:, attributes: nil)
  #   Some parameter documentations has been truncated, see
  #   {FinchAPI::Models::HRIS::PayStatement::Earning} for more details.
  #
  #   @param amount [Integer, nil] The earnings amount in cents.
  #
  #   @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::Models::HRIS::PayStatement::Earning::Type, nil] The type of earning.
  #
  #   @param attributes [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes, nil]

  # The type of earning.
  #
  # @see FinchAPI::Models::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

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

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

    # @see FinchAPI::Models::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}]
      required :metadata,
               FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true]

      # @!method initialize(metadata:)
      #   Some parameter documentations has been truncated, see
      #   {FinchAPI::Models::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
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

required :amount, Integer, nil?: true

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



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

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

#currencyString?

The earnings currency code.

Returns:

  • (String, nil)


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

required :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)


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

required :hours, Float, nil?: true

#nameString?

The exact name of the deduction from the pay statement.

Returns:

  • (String, nil)


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

required :name, String, nil?: true

#typeSymbol, ...

The type of earning.



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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