Class: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField

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

Defined Under Namespace

Modules: Value

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(name: nil, value: nil) ⇒ Object

Parameters:

  • name (String, nil) (defaults to: nil)
  • value (String, Array<Object>, Object, Float, Boolean, nil) (defaults to: nil)


189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/finch_api/models/hris/employment_data.rb', line 189

class CustomField < FinchAPI::Internal::Type::BaseModel
  # @!attribute name
  #
  #   @return [String, nil]
  optional :name, String, nil?: true

  # @!attribute value
  #
  #   @return [String, Array<Object>, Object, Float, Boolean, nil]
  optional :value,
           union: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value },
           nil?: true

  # @!method initialize(name: nil, value: nil)
  #   @param name [String, nil]
  #   @param value [String, Array<Object>, Object, Float, Boolean, nil]

  # @see FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField#value
  module Value
    extend FinchAPI::Internal::Type::Union

    variant String

    variant -> {
      FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::UnionMember1Array
    }

    variant FinchAPI::Internal::Type::Unknown

    variant Float

    variant FinchAPI::Internal::Type::Boolean

    # @!method self.variants
    #   @return [Array(String, Array<Object>, Object, Float, Boolean)]

    define_sorbet_constant!(:Variants) do
      T.type_alias { T.nilable(T.any(String, T::Array[T.anything], T.anything, Float, T::Boolean)) }
    end

    # @type [FinchAPI::Internal::Type::Converter]
    UnionMember1Array = FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown]
  end
end

Instance Attribute Details

#nameString?

Returns:

  • (String, nil)


193
# File 'lib/finch_api/models/hris/employment_data.rb', line 193

optional :name, String, nil?: true

#valueString, ...

Returns:

  • (String, Array<Object>, Object, Float, Boolean, nil)


198
199
200
# File 'lib/finch_api/models/hris/employment_data.rb', line 198

optional :value,
union: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value },
nil?: true