From 2b4021961b248f64cb9c5564b4199d0c840593fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 17 May 2025 21:52:16 +0000 Subject: [PATCH 01/27] chore(internal): version bump --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f9b19ca2..61d5822b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.18) + finch-api (0.1.0.pre.alpha.19) connection_pool GEM From 16ff9b32a68eecb17c5719b354de64fe788bedd4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 15:34:57 +0000 Subject: [PATCH 02/27] chore: whitespaces --- Steepfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Steepfile b/Steepfile index d7aebca1..528b48c3 100644 --- a/Steepfile +++ b/Steepfile @@ -7,7 +7,7 @@ target(:lib) do signature("sig") - YAML.safe_load_file("./manifest.yaml", symbolize_names: true) => { dependencies: } + YAML.safe_load_file("./manifest.yaml", symbolize_names: true) => {dependencies:} # currently these libraries lack the `*.rbs` annotations required by `steep` stdlibs = dependencies - %w[English etc net/http rbconfig set stringio] From 9a84b92df48e001ee28989703cbe8bdd9f461528 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 19:59:53 +0000 Subject: [PATCH 03/27] fix: correctly instantiate sorbet type aliases for enums and unions --- lib/finch_api/internal/type/array_of.rb | 8 +++ lib/finch_api/internal/type/base_model.rb | 7 +++ lib/finch_api/internal/type/boolean.rb | 8 +++ lib/finch_api/internal/type/enum.rb | 12 +++++ lib/finch_api/internal/type/file_input.rb | 7 +++ lib/finch_api/internal/type/hash_of.rb | 8 +++ lib/finch_api/internal/type/union.rb | 12 +++++ lib/finch_api/internal/type/unknown.rb | 8 +++ lib/finch_api/internal/util.rb | 45 +++++++++++++++++ lib/finch_api/models.rb | 49 ++++++++++++------- .../models/hris/document_retreive_response.rb | 4 -- lib/finch_api/models/hris/employment_data.rb | 10 ---- lib/finch_api/models/hris/individual.rb | 6 --- lib/finch_api/models/webhook_event.rb | 15 ------ rbi/finch_api/internal/type/array_of.rbi | 6 +++ rbi/finch_api/internal/type/base_model.rbi | 5 ++ rbi/finch_api/internal/type/boolean.rbi | 6 +++ rbi/finch_api/internal/type/enum.rbi | 5 ++ rbi/finch_api/internal/type/file_input.rbi | 5 ++ rbi/finch_api/internal/type/hash_of.rbi | 6 +++ rbi/finch_api/internal/type/union.rbi | 5 ++ rbi/finch_api/internal/type/unknown.rbi | 6 +++ rbi/finch_api/internal/util.rbi | 34 +++++++++++++ sig/finch_api/internal/type/array_of.rbs | 3 ++ sig/finch_api/internal/type/base_model.rbs | 2 + sig/finch_api/internal/type/boolean.rbs | 3 ++ sig/finch_api/internal/type/enum.rbs | 2 + sig/finch_api/internal/type/file_input.rbs | 2 + sig/finch_api/internal/type/hash_of.rbs | 3 ++ sig/finch_api/internal/type/union.rbs | 2 + sig/finch_api/internal/type/unknown.rbs | 3 ++ sig/finch_api/internal/util.rbs | 12 +++++ 32 files changed, 255 insertions(+), 54 deletions(-) diff --git a/lib/finch_api/internal/type/array_of.rb b/lib/finch_api/internal/type/array_of.rb index f789f438..dc92c492 100644 --- a/lib/finch_api/internal/type/array_of.rb +++ b/lib/finch_api/internal/type/array_of.rb @@ -12,6 +12,7 @@ module Type # Array of items of a given type. class ArrayOf include FinchAPI::Internal::Type::Converter + include FinchAPI::Internal::Util::SorbetRuntimeSupport private_class_method :new @@ -110,6 +111,13 @@ def dump(value, state:) end end + # @api private + # + # @return [Object] + def to_sorbet_type + T::Array[FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)] + end + # @api private # # @return [generic] diff --git a/lib/finch_api/internal/type/base_model.rb b/lib/finch_api/internal/type/base_model.rb index df96b3fa..b8fc7959 100644 --- a/lib/finch_api/internal/type/base_model.rb +++ b/lib/finch_api/internal/type/base_model.rb @@ -311,6 +311,13 @@ def dump(value, state:) acc end + + # @api private + # + # @return [Object] + def to_sorbet_type + self + end end class << self diff --git a/lib/finch_api/internal/type/boolean.rb b/lib/finch_api/internal/type/boolean.rb index 29b68a1d..aa924b9e 100644 --- a/lib/finch_api/internal/type/boolean.rb +++ b/lib/finch_api/internal/type/boolean.rb @@ -10,6 +10,7 @@ module Type # Ruby has no Boolean class; this is something for models to refer to. class Boolean extend FinchAPI::Internal::Type::Converter + extend FinchAPI::Internal::Util::SorbetRuntimeSupport private_class_method :new @@ -56,6 +57,13 @@ def coerce(value, state:) # @option state [Boolean] :can_retry # # @return [Boolean, Object] + + # @api private + # + # @return [Object] + def to_sorbet_type + T::Boolean + end end end end diff --git a/lib/finch_api/internal/type/enum.rb b/lib/finch_api/internal/type/enum.rb index b723326c..e6c25eab 100644 --- a/lib/finch_api/internal/type/enum.rb +++ b/lib/finch_api/internal/type/enum.rb @@ -112,6 +112,18 @@ def coerce(value, state:) # # @return [Symbol, Object] + # @api private + # + # @return [Object] + def to_sorbet_type + case values + in [] + T.noreturn + in [value, *_] + T.all(FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self) + end + end + # @api private # # @param depth [Integer] diff --git a/lib/finch_api/internal/type/file_input.rb b/lib/finch_api/internal/type/file_input.rb index 64f546da..a350a782 100644 --- a/lib/finch_api/internal/type/file_input.rb +++ b/lib/finch_api/internal/type/file_input.rb @@ -89,6 +89,13 @@ def dump(value, state:) value end + + # @api private + # + # @return [Object] + def to_sorbet_type + T.any(Pathname, StringIO, IO, String, FinchAPI::FilePart) + end end end end diff --git a/lib/finch_api/internal/type/hash_of.rb b/lib/finch_api/internal/type/hash_of.rb index 76d4cc95..69e71fd0 100644 --- a/lib/finch_api/internal/type/hash_of.rb +++ b/lib/finch_api/internal/type/hash_of.rb @@ -12,6 +12,7 @@ module Type # Hash of items of a given type. class HashOf include FinchAPI::Internal::Type::Converter + include FinchAPI::Internal::Util::SorbetRuntimeSupport private_class_method :new @@ -130,6 +131,13 @@ def dump(value, state:) end end + # @api private + # + # @return [Object] + def to_sorbet_type + T::Hash[FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)] + end + # @api private # # @return [generic] diff --git a/lib/finch_api/internal/type/union.rb b/lib/finch_api/internal/type/union.rb index 6b75e69b..7522476a 100644 --- a/lib/finch_api/internal/type/union.rb +++ b/lib/finch_api/internal/type/union.rb @@ -212,6 +212,18 @@ def dump(value, state:) super end + # @api private + # + # @return [Object] + def to_sorbet_type + case (v = variants) + in [] + T.noreturn + else + T.any(*v.map { FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }) + end + end + # rubocop:enable Style/CaseEquality # rubocop:enable Style/HashEachMethods diff --git a/lib/finch_api/internal/type/unknown.rb b/lib/finch_api/internal/type/unknown.rb index 8efc1e0f..330b96d5 100644 --- a/lib/finch_api/internal/type/unknown.rb +++ b/lib/finch_api/internal/type/unknown.rb @@ -10,6 +10,7 @@ module Type # When we don't know what to expect for the value. class Unknown extend FinchAPI::Internal::Type::Converter + extend FinchAPI::Internal::Util::SorbetRuntimeSupport # rubocop:disable Lint/UnusedMethodArgument @@ -58,6 +59,13 @@ def coerce(value, state:) # @option state [Boolean] :can_retry # # @return [Object] + + # @api private + # + # @return [Object] + def to_sorbet_type + T.anything + end end # rubocop:enable Lint/UnusedMethodArgument diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 01504163..5ce4aefb 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -9,6 +9,23 @@ module Util # @return [Float] def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC) + # @api private + # + # @param ns [Module, Class] + # + # @return [Enumerable] + def self.walk_namespaces(ns) + ns.constants(false).lazy.flat_map do + case (c = ns.const_get(_1, false)) + in Module | Class + walk_namespaces(c) + else + [] + end + end + .chain([ns]) + end + class << self # @api private # @@ -826,11 +843,39 @@ def const_missing(name) sorbet_runtime_constants.fetch(name).call end + # @api private + # + # @param name [Symbol] + # + # @return [Boolean] + def sorbet_constant_defined?(name) = sorbet_runtime_constants.key?(name) + # @api private # # @param name [Symbol] # @param blk [Proc] def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk) + + # @api private + # + # @return [Object] + def to_sorbet_type = raise NotImplementedError + + class << self + # @api private + # + # @param type [FinchAPI::Internal::Util::SorbetRuntimeSupport, Object] + # + # @return [Object] + def to_sorbet_type(type) + case type + in FinchAPI::Internal::Util::SorbetRuntimeSupport + type.to_sorbet_type + else + type + end + end + end end extend FinchAPI::Internal::Util::SorbetRuntimeSupport diff --git a/lib/finch_api/models.rb b/lib/finch_api/models.rb index 70bdd0f5..453eba3a 100644 --- a/lib/finch_api/models.rb +++ b/lib/finch_api/models.rb @@ -5,29 +5,40 @@ module FinchAPI cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, FinchAPI::Internal::AnyHash) } } end - [ - *FinchAPI::Internal::Type::Enum.included_modules, - *FinchAPI::Internal::Type::Union.included_modules - ].each do |cls| - cls.constants.each do |name| - case cls.const_get(name) - in true | false - cls.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, cls) } } - cls.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } } - in Integer - cls.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, cls) } } - cls.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } } - in Float - cls.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, cls) } } - cls.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } } - in Symbol - cls.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, cls) } } - cls.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } } - else + FinchAPI::Internal::Util.walk_namespaces(FinchAPI::Models).each do |mod| + case mod + in FinchAPI::Internal::Type::Enum | FinchAPI::Internal::Type::Union + mod.constants.each do |name| + case mod.const_get(name) + in true | false + mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } } + mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } } + in Integer + mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } } + mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } } + in Float + mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } } + mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } } + in Symbol + mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } } + mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } } + else + end end + else end end + FinchAPI::Internal::Util.walk_namespaces(FinchAPI::Models) + .lazy + .grep(FinchAPI::Internal::Type::Union) + .each do |mod| + const = :Variants + next if mod.sorbet_constant_defined?(const) + + mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } } + end + AccessTokenCreateParams = FinchAPI::Models::AccessTokenCreateParams AccountDisconnectParams = FinchAPI::Models::AccountDisconnectParams diff --git a/lib/finch_api/models/hris/document_retreive_response.rb b/lib/finch_api/models/hris/document_retreive_response.rb index 7c63e79b..8b657bd6 100644 --- a/lib/finch_api/models/hris/document_retreive_response.rb +++ b/lib/finch_api/models/hris/document_retreive_response.rb @@ -20,10 +20,6 @@ module DocumentRetreiveResponse # @!method self.variants # @return [Array(FinchAPI::HRIS::W42020, FinchAPI::HRIS::W42005)] - - define_sorbet_constant!(:Variants) do - T.type_alias { T.any(FinchAPI::HRIS::W42020, FinchAPI::HRIS::W42005) } - end end end end diff --git a/lib/finch_api/models/hris/employment_data.rb b/lib/finch_api/models/hris/employment_data.rb index 1f8e85e2..e5c5eae9 100644 --- a/lib/finch_api/models/hris/employment_data.rb +++ b/lib/finch_api/models/hris/employment_data.rb @@ -222,10 +222,6 @@ module Value # @!method self.variants # @return [Array(String, Array, 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 @@ -372,12 +368,6 @@ class BatchError < FinchAPI::Internal::Type::BaseModel # @!method self.variants # @return [Array(FinchAPI::HRIS::EmploymentData::UnionMember0, FinchAPI::HRIS::EmploymentData::BatchError)] - - define_sorbet_constant!(:Variants) do - T.type_alias do - T.any(FinchAPI::HRIS::EmploymentData::UnionMember0, FinchAPI::HRIS::EmploymentData::BatchError) - end - end end end end diff --git a/lib/finch_api/models/hris/individual.rb b/lib/finch_api/models/hris/individual.rb index fece92d1..1f32edba 100644 --- a/lib/finch_api/models/hris/individual.rb +++ b/lib/finch_api/models/hris/individual.rb @@ -250,12 +250,6 @@ class BatchError < FinchAPI::Internal::Type::BaseModel # @!method self.variants # @return [Array(FinchAPI::HRIS::Individual::UnionMember0, FinchAPI::HRIS::Individual::BatchError)] - - define_sorbet_constant!(:Variants) do - T.type_alias do - T.any(FinchAPI::HRIS::Individual::UnionMember0, FinchAPI::HRIS::Individual::BatchError) - end - end end end end diff --git a/lib/finch_api/models/webhook_event.rb b/lib/finch_api/models/webhook_event.rb index 981273f6..7273c7e9 100644 --- a/lib/finch_api/models/webhook_event.rb +++ b/lib/finch_api/models/webhook_event.rb @@ -25,21 +25,6 @@ module WebhookEvent # @!method self.variants # @return [Array(FinchAPI::AccountUpdateEvent, FinchAPI::CompanyEvent, FinchAPI::JobCompletionEvent, FinchAPI::DirectoryEvent, FinchAPI::EmploymentEvent, FinchAPI::IndividualEvent, FinchAPI::PaymentEvent, FinchAPI::PayStatementEvent)] - - define_sorbet_constant!(:Variants) do - T.type_alias do - T.any( - FinchAPI::AccountUpdateEvent, - FinchAPI::CompanyEvent, - FinchAPI::JobCompletionEvent, - FinchAPI::DirectoryEvent, - FinchAPI::EmploymentEvent, - FinchAPI::IndividualEvent, - FinchAPI::PaymentEvent, - FinchAPI::PayStatementEvent - ) - end - end end end end diff --git a/rbi/finch_api/internal/type/array_of.rbi b/rbi/finch_api/internal/type/array_of.rbi index 06bfd1ee..b389d5a2 100644 --- a/rbi/finch_api/internal/type/array_of.rbi +++ b/rbi/finch_api/internal/type/array_of.rbi @@ -8,6 +8,7 @@ module FinchAPI # Array of items of a given type. class ArrayOf include FinchAPI::Internal::Type::Converter + include FinchAPI::Internal::Util::SorbetRuntimeSupport abstract! @@ -63,6 +64,11 @@ module FinchAPI def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { returns(Elem) } protected def item_type diff --git a/rbi/finch_api/internal/type/base_model.rbi b/rbi/finch_api/internal/type/base_model.rbi index 96f27f17..7c1e691a 100644 --- a/rbi/finch_api/internal/type/base_model.rbi +++ b/rbi/finch_api/internal/type/base_model.rbi @@ -197,6 +197,11 @@ module FinchAPI end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end class << self diff --git a/rbi/finch_api/internal/type/boolean.rbi b/rbi/finch_api/internal/type/boolean.rbi index e07554c5..55044b98 100644 --- a/rbi/finch_api/internal/type/boolean.rbi +++ b/rbi/finch_api/internal/type/boolean.rbi @@ -8,6 +8,7 @@ module FinchAPI # Ruby has no Boolean class; this is something for models to refer to. class Boolean extend FinchAPI::Internal::Type::Converter + extend FinchAPI::Internal::Util::SorbetRuntimeSupport abstract! @@ -43,6 +44,11 @@ module FinchAPI end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end end end diff --git a/rbi/finch_api/internal/type/enum.rbi b/rbi/finch_api/internal/type/enum.rbi index 4852dc97..eca555e0 100644 --- a/rbi/finch_api/internal/type/enum.rbi +++ b/rbi/finch_api/internal/type/enum.rbi @@ -67,6 +67,11 @@ module FinchAPI def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { params(depth: Integer).returns(String) } def inspect(depth: 0) diff --git a/rbi/finch_api/internal/type/file_input.rbi b/rbi/finch_api/internal/type/file_input.rbi index ae0244c4..32cb307b 100644 --- a/rbi/finch_api/internal/type/file_input.rbi +++ b/rbi/finch_api/internal/type/file_input.rbi @@ -47,6 +47,11 @@ module FinchAPI end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end end end diff --git a/rbi/finch_api/internal/type/hash_of.rbi b/rbi/finch_api/internal/type/hash_of.rbi index e9cf964b..faedbac3 100644 --- a/rbi/finch_api/internal/type/hash_of.rbi +++ b/rbi/finch_api/internal/type/hash_of.rbi @@ -8,6 +8,7 @@ module FinchAPI # Hash of items of a given type. class HashOf include FinchAPI::Internal::Type::Converter + include FinchAPI::Internal::Util::SorbetRuntimeSupport abstract! @@ -63,6 +64,11 @@ module FinchAPI def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { returns(Elem) } protected def item_type diff --git a/rbi/finch_api/internal/type/union.rbi b/rbi/finch_api/internal/type/union.rbi index 86cacf70..d5f43cf4 100644 --- a/rbi/finch_api/internal/type/union.rbi +++ b/rbi/finch_api/internal/type/union.rbi @@ -101,6 +101,11 @@ module FinchAPI def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { params(depth: Integer).returns(String) } def inspect(depth: 0) diff --git a/rbi/finch_api/internal/type/unknown.rbi b/rbi/finch_api/internal/type/unknown.rbi index 8c971492..7048e573 100644 --- a/rbi/finch_api/internal/type/unknown.rbi +++ b/rbi/finch_api/internal/type/unknown.rbi @@ -8,6 +8,7 @@ module FinchAPI # When we don't know what to expect for the value. class Unknown extend FinchAPI::Internal::Type::Converter + extend FinchAPI::Internal::Util::SorbetRuntimeSupport abstract! @@ -43,6 +44,11 @@ module FinchAPI end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end end end diff --git a/rbi/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi index c3cc7577..1eaee20a 100644 --- a/rbi/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -11,6 +11,15 @@ module FinchAPI def self.monotonic_secs end + # @api private + sig do + params(ns: T.any(Module, T::Class[T.anything])).returns( + T::Enumerable[T.any(Module, T::Class[T.anything])] + ) + end + def self.walk_namespaces(ns) + end + class << self # @api private sig { returns(String) } @@ -441,10 +450,35 @@ module FinchAPI def const_missing(name) end + # @api private + sig { params(name: Symbol).returns(T::Boolean) } + def sorbet_constant_defined?(name) + end + # @api private sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void } def define_sorbet_constant!(name, &blk) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + + class << self + # @api private + sig do + params( + type: + T.any( + FinchAPI::Internal::Util::SorbetRuntimeSupport, + T.anything + ) + ).returns(T.anything) + end + def to_sorbet_type(type) + end + end end end end diff --git a/sig/finch_api/internal/type/array_of.rbs b/sig/finch_api/internal/type/array_of.rbs index c35944b7..3acc729d 100644 --- a/sig/finch_api/internal/type/array_of.rbs +++ b/sig/finch_api/internal/type/array_of.rbs @@ -3,6 +3,7 @@ module FinchAPI module Type class ArrayOf[Elem] include FinchAPI::Internal::Type::Converter + include FinchAPI::Internal::Util::SorbetRuntimeSupport def self.[]: ( ::Hash[Symbol, top] @@ -27,6 +28,8 @@ module FinchAPI state: FinchAPI::Internal::Type::Converter::dump_state ) -> (::Array[top] | top) + def to_sorbet_type: -> top + def item_type: -> Elem def nilable?: -> bool diff --git a/sig/finch_api/internal/type/base_model.rbs b/sig/finch_api/internal/type/base_model.rbs index 3e759953..b1e6a99f 100644 --- a/sig/finch_api/internal/type/base_model.rbs +++ b/sig/finch_api/internal/type/base_model.rbs @@ -68,6 +68,8 @@ module FinchAPI state: FinchAPI::Internal::Type::Converter::dump_state ) -> (::Hash[top, top] | top) + def self.to_sorbet_type: -> top + def self.recursively_to_h: ( FinchAPI::Internal::Type::BaseModel model, convert: bool diff --git a/sig/finch_api/internal/type/boolean.rbs b/sig/finch_api/internal/type/boolean.rbs index 3c740121..8575d5ce 100644 --- a/sig/finch_api/internal/type/boolean.rbs +++ b/sig/finch_api/internal/type/boolean.rbs @@ -3,6 +3,7 @@ module FinchAPI module Type class Boolean extend FinchAPI::Internal::Type::Converter + extend FinchAPI::Internal::Util::SorbetRuntimeSupport def self.===: (top other) -> bool @@ -17,6 +18,8 @@ module FinchAPI bool | top value, state: FinchAPI::Internal::Type::Converter::dump_state ) -> (bool | top) + + def self.to_sorbet_type: -> top end end end diff --git a/sig/finch_api/internal/type/enum.rbs b/sig/finch_api/internal/type/enum.rbs index 363980da..74e2037b 100644 --- a/sig/finch_api/internal/type/enum.rbs +++ b/sig/finch_api/internal/type/enum.rbs @@ -23,6 +23,8 @@ module FinchAPI state: FinchAPI::Internal::Type::Converter::dump_state ) -> (Symbol | top) + def to_sorbet_type: -> top + def inspect: (?depth: Integer) -> String end end diff --git a/sig/finch_api/internal/type/file_input.rbs b/sig/finch_api/internal/type/file_input.rbs index d653cbf9..9ac3b3a9 100644 --- a/sig/finch_api/internal/type/file_input.rbs +++ b/sig/finch_api/internal/type/file_input.rbs @@ -17,6 +17,8 @@ module FinchAPI Pathname | StringIO | IO | String | top value, state: FinchAPI::Internal::Type::Converter::dump_state ) -> (Pathname | StringIO | IO | String | top) + + def self.to_sorbet_type: -> top end end end diff --git a/sig/finch_api/internal/type/hash_of.rbs b/sig/finch_api/internal/type/hash_of.rbs index 88c30184..d5fbfb87 100644 --- a/sig/finch_api/internal/type/hash_of.rbs +++ b/sig/finch_api/internal/type/hash_of.rbs @@ -3,6 +3,7 @@ module FinchAPI module Type class HashOf[Elem] include FinchAPI::Internal::Type::Converter + include FinchAPI::Internal::Util::SorbetRuntimeSupport def self.[]: ( ::Hash[Symbol, top] @@ -27,6 +28,8 @@ module FinchAPI state: FinchAPI::Internal::Type::Converter::dump_state ) -> (::Hash[Symbol, top] | top) + def to_sorbet_type: -> top + def item_type: -> Elem def nilable?: -> bool diff --git a/sig/finch_api/internal/type/union.rbs b/sig/finch_api/internal/type/union.rbs index 1517c991..c8552a74 100644 --- a/sig/finch_api/internal/type/union.rbs +++ b/sig/finch_api/internal/type/union.rbs @@ -43,6 +43,8 @@ module FinchAPI state: FinchAPI::Internal::Type::Converter::dump_state ) -> top + def to_sorbet_type: -> top + def inspect: (?depth: Integer) -> String end end diff --git a/sig/finch_api/internal/type/unknown.rbs b/sig/finch_api/internal/type/unknown.rbs index e7ab6e48..34d6cc92 100644 --- a/sig/finch_api/internal/type/unknown.rbs +++ b/sig/finch_api/internal/type/unknown.rbs @@ -3,6 +3,7 @@ module FinchAPI module Type class Unknown extend FinchAPI::Internal::Type::Converter + extend FinchAPI::Internal::Util::SorbetRuntimeSupport def self.===: (top other) -> bool @@ -17,6 +18,8 @@ module FinchAPI top value, state: FinchAPI::Internal::Type::Converter::dump_state ) -> top + + def self.to_sorbet_type: -> top end end end diff --git a/sig/finch_api/internal/util.rbs b/sig/finch_api/internal/util.rbs index a2adf4fc..b577edac 100644 --- a/sig/finch_api/internal/util.rbs +++ b/sig/finch_api/internal/util.rbs @@ -5,6 +5,10 @@ module FinchAPI def self?.monotonic_secs: -> Float + def self?.walk_namespaces: ( + Module | Class ns + ) -> Enumerable[(Module | Class)] + def self?.arch: -> String def self?.os: -> String @@ -166,7 +170,15 @@ module FinchAPI def const_missing: (Symbol name) -> void + def sorbet_constant_defined?: (Symbol name) -> bool + def define_sorbet_constant!: (Symbol name) { -> top } -> void + + def to_sorbet_type: -> top + + def self.to_sorbet_type: ( + FinchAPI::Internal::Util::SorbetRuntimeSupport | top `type` + ) -> top end end end From 37cc1c27968a448e7bfef8527a0f3105b476de09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 20:13:56 +0000 Subject: [PATCH 04/27] chore: use sorbet union aliases where available --- rbi/finch_api/models/hris/employment_data.rbi | 24 +++---------------- .../models/hris/employment_data_response.rbi | 15 ++---------- .../models/hris/individual_response.rbi | 15 ++---------- rbi/finch_api/resources/hris/documents.rbi | 2 +- 4 files changed, 8 insertions(+), 48 deletions(-) diff --git a/rbi/finch_api/models/hris/employment_data.rbi b/rbi/finch_api/models/hris/employment_data.rbi index 18d2c3c8..3c9b139b 100644 --- a/rbi/finch_api/models/hris/employment_data.rbi +++ b/rbi/finch_api/models/hris/employment_data.rbi @@ -319,13 +319,7 @@ module FinchAPI sig do returns( T.nilable( - T.any( - String, - T::Array[T.anything], - T.anything, - Float, - T::Boolean - ) + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants ) ) end @@ -336,13 +330,7 @@ module FinchAPI name: T.nilable(String), value: T.nilable( - T.any( - String, - T::Array[T.anything], - T.anything, - Float, - T::Boolean - ) + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants ) ).returns(T.attached_class) end @@ -355,13 +343,7 @@ module FinchAPI name: T.nilable(String), value: T.nilable( - T.any( - String, - T::Array[T.anything], - T.anything, - Float, - T::Boolean - ) + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants ) } ) diff --git a/rbi/finch_api/models/hris/employment_data_response.rbi b/rbi/finch_api/models/hris/employment_data_response.rbi index b177eb88..2c30cbb3 100644 --- a/rbi/finch_api/models/hris/employment_data_response.rbi +++ b/rbi/finch_api/models/hris/employment_data_response.rbi @@ -12,14 +12,7 @@ module FinchAPI ) end - sig do - returns( - T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0, - FinchAPI::HRIS::EmploymentData::BatchError - ) - ) - end + sig { returns(FinchAPI::HRIS::EmploymentData::Variants) } attr_accessor :body sig { returns(Integer) } @@ -51,11 +44,7 @@ module FinchAPI sig do override.returns( { - body: - T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0, - FinchAPI::HRIS::EmploymentData::BatchError - ), + body: FinchAPI::HRIS::EmploymentData::Variants, code: Integer, individual_id: String } diff --git a/rbi/finch_api/models/hris/individual_response.rbi b/rbi/finch_api/models/hris/individual_response.rbi index f35bee8d..28d87f09 100644 --- a/rbi/finch_api/models/hris/individual_response.rbi +++ b/rbi/finch_api/models/hris/individual_response.rbi @@ -12,14 +12,7 @@ module FinchAPI ) end - sig do - returns( - T.any( - FinchAPI::HRIS::Individual::UnionMember0, - FinchAPI::HRIS::Individual::BatchError - ) - ) - end + sig { returns(FinchAPI::HRIS::Individual::Variants) } attr_accessor :body sig { returns(Integer) } @@ -45,11 +38,7 @@ module FinchAPI sig do override.returns( { - body: - T.any( - FinchAPI::HRIS::Individual::UnionMember0, - FinchAPI::HRIS::Individual::BatchError - ), + body: FinchAPI::HRIS::Individual::Variants, code: Integer, individual_id: String } diff --git a/rbi/finch_api/resources/hris/documents.rbi b/rbi/finch_api/resources/hris/documents.rbi index 5d9aca46..a953c5ba 100644 --- a/rbi/finch_api/resources/hris/documents.rbi +++ b/rbi/finch_api/resources/hris/documents.rbi @@ -36,7 +36,7 @@ module FinchAPI params( document_id: String, request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.any(FinchAPI::HRIS::W42020, FinchAPI::HRIS::W42005)) + ).returns(FinchAPI::Models::HRIS::DocumentRetreiveResponse::Variants) end def retreive( # The unique identifier of the document. From e0eb63695b803e35dd9e35a57cd0769a60db7bc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 22:00:23 +0000 Subject: [PATCH 05/27] chore: refine Yard and Sorbet types and ensure linting is turned on for examples --- Rakefile | 13 ++++++++----- lib/finch_api/internal.rb | 3 +++ rbi/finch_api/internal.rbi | 3 +++ sig/finch_api/internal.rbs | 2 ++ sorbet/config | 2 +- .../internal/sorbet_runtime_support_test.rb | 1 + 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index e1688e63..6a4bdd26 100644 --- a/Rakefile +++ b/Rakefile @@ -9,6 +9,7 @@ require "rake/clean" require "rubocop/rake_task" tapioca = "sorbet/tapioca" +examples = "examples" ignore_file = ".ignore" CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file) @@ -39,7 +40,7 @@ locale = {"LC_ALL" => "C.UTF-8"} desc("Lint `*.rb(i)`") multitask(:"lint:rubocop") do - find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0] + find = %w[find ./lib ./test ./rbi ./examples -type f -and ( -name *.rb -or -name *.rbi ) -print0] rubocop = %w[rubocop] rubocop += %w[--format github] if ENV.key?("CI") @@ -54,7 +55,7 @@ end desc("Format `*.rb`") multitask(:"format:rb") do # while `syntax_tree` is much faster than `rubocop`, `rubocop` is the only formatter with full syntax support - find = %w[find ./lib ./test -type f -and -name *.rb -print0] + find = %w[find ./lib ./test ./examples -type f -and -name *.rb -print0] fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --] sh("#{find.shelljoin} | #{fmt.shelljoin}") end @@ -117,12 +118,14 @@ multitask(:"typecheck:steep") do sh(*%w[steep check]) end +directory(examples) + desc("Typecheck `*.rbi`") -multitask(:"typecheck:sorbet") do - sh(*%w[srb typecheck]) +multitask("typecheck:sorbet": examples) do + sh(*%w[srb typecheck --dir], examples) end -file(tapioca) do +directory(tapioca) do sh(*%w[tapioca init]) end diff --git a/lib/finch_api/internal.rb b/lib/finch_api/internal.rb index 2fb38522..22548575 100644 --- a/lib/finch_api/internal.rb +++ b/lib/finch_api/internal.rb @@ -13,5 +13,8 @@ module Internal define_sorbet_constant!(:AnyHash) do T.type_alias { T::Hash[Symbol, T.anything] } end + define_sorbet_constant!(:FileInput) do + T.type_alias { T.any(Pathname, StringIO, IO, String, FinchAPI::FilePart) } + end end end diff --git a/rbi/finch_api/internal.rbi b/rbi/finch_api/internal.rbi index c6af6ce1..b03cff5d 100644 --- a/rbi/finch_api/internal.rbi +++ b/rbi/finch_api/internal.rbi @@ -8,6 +8,9 @@ module FinchAPI # this alias might be refined in the future. AnyHash = T.type_alias { T::Hash[Symbol, T.anything] } + FileInput = + T.type_alias { T.any(Pathname, StringIO, IO, String, FinchAPI::FilePart) } + OMIT = T.let(Object.new.freeze, T.anything) end end diff --git a/sig/finch_api/internal.rbs b/sig/finch_api/internal.rbs index 989f54a7..2d73568b 100644 --- a/sig/finch_api/internal.rbs +++ b/sig/finch_api/internal.rbs @@ -2,6 +2,8 @@ module FinchAPI module Internal extend FinchAPI::Internal::Util::SorbetRuntimeSupport + type file_input = Pathname | StringIO | IO | String | FinchAPI::FilePart + OMIT: Object end end diff --git a/sorbet/config b/sorbet/config index 538c1528..6fe84ed8 100644 --- a/sorbet/config +++ b/sorbet/config @@ -1,2 +1,2 @@ ---dir=rbi +--dir=rbi/ --ignore=test/ diff --git a/test/finch_api/internal/sorbet_runtime_support_test.rb b/test/finch_api/internal/sorbet_runtime_support_test.rb index 2815cf86..08d174bb 100644 --- a/test/finch_api/internal/sorbet_runtime_support_test.rb +++ b/test/finch_api/internal/sorbet_runtime_support_test.rb @@ -25,6 +25,7 @@ def test_nil_aliases err = FinchAPI::Internal::Util::SorbetRuntimeSupport::MissingSorbetRuntimeError assert_raises(err) { FinchAPI::Internal::AnyHash } + assert_raises(err) { FinchAPI::Internal::FileInput } assert_raises(err) { FinchAPI::Internal::Type::Converter::Input } assert_raises(err) { FinchAPI::Internal::Type::Converter::CoerceState } assert_raises(err) { FinchAPI::Internal::Type::Converter::DumpState } From 0c55f26abe131663cfe8e739b95154172d967085 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 15:13:17 +0000 Subject: [PATCH 06/27] chore(docs): grammar improvements --- README.md | 6 +++--- SECURITY.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6b40636d..2ed7ff5d 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ puts(page[:my_undocumented_property]) #### Undocumented request params -If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request as seen in examples above. +If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above. #### Undocumented endpoints @@ -188,7 +188,7 @@ response = client.request( ### Concurrency & connection pooling -The `FinchAPI::Client` instances are threadsafe, but only are fork-safe when there are no in-flight HTTP requests. +The `FinchAPI::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests. Each instance of `FinchAPI::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings. @@ -238,7 +238,7 @@ finch.hris.benefits.create( # … ) -# Literal values is also permissible: +# Literal values are also permissible: finch.hris.benefits.create( frequency: :one_time, # … diff --git a/SECURITY.md b/SECURITY.md index b6499508..1e432e1e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -16,11 +16,11 @@ before making any information public. ## Reporting Non-SDK Related Security Issues If you encounter security issues that are not directly related to SDKs but pertain to the services -or products provided by Finch please follow the respective company's security reporting guidelines. +or products provided by Finch, please follow the respective company's security reporting guidelines. ### Finch Terms and Policies -Please contact founders@tryfinch.com for any questions or concerns regarding security of our services. +Please contact founders@tryfinch.com for any questions or concerns regarding the security of our services. --- From 2f008175f0a18dc01a0c2b900c2e692f77b3a0ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 16:01:40 +0000 Subject: [PATCH 07/27] chore: force utf-8 locale via `RUBYOPT` when formatting --- Rakefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 6a4bdd26..8fae6bce 100644 --- a/Rakefile +++ b/Rakefile @@ -36,7 +36,7 @@ multitask(:test) do end xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --] -locale = {"LC_ALL" => "C.UTF-8"} +ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")} desc("Lint `*.rb(i)`") multitask(:"lint:rubocop") do @@ -64,7 +64,7 @@ desc("Format `*.rbi`") multitask(:"format:rbi") do find = %w[find ./rbi -type f -and -name *.rbi -print0] fmt = xargs + %w[stree write --] - sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}") + sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") end desc("Format `*.rbs`") @@ -100,7 +100,7 @@ multitask(:"format:rbs") do # transform class aliases to type aliases, which syntax tree has no trouble with sh("#{find.shelljoin} | #{pre.shelljoin}") # run syntax tree to format `*.rbs` files - sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}") do + sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") do success = _1 end # transform type aliases back to class aliases From 98866d5133c2afb76b141045f1361705f9bac94a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 01:23:15 +0000 Subject: [PATCH 08/27] chore: use fully qualified names for yard annotations and rbs aliases --- lib/finch_api/internal/individuals_page.rb | 2 +- lib/finch_api/internal/page.rb | 2 +- lib/finch_api/models/account_update_event.rb | 219 ++++++++-------- lib/finch_api/models/base_webhook_event.rb | 2 +- lib/finch_api/models/company_event.rb | 4 +- .../models/connect/session_new_params.rb | 18 +- .../connect/session_reauthenticate_params.rb | 4 +- .../models/create_access_token_response.rb | 14 +- lib/finch_api/models/directory_event.rb | 8 +- lib/finch_api/models/employment_event.rb | 8 +- .../models/hris/benefit_contribution.rb | 6 +- .../models/hris/benefit_create_params.rb | 22 +- .../hris/benefit_features_and_operations.rb | 30 +-- ...enefit_list_supported_benefits_response.rb | 4 +- .../hris/benefits/individual_benefit.rb | 22 +- .../benefits/individual_enroll_many_params.rb | 46 ++-- lib/finch_api/models/hris/benefits_support.rb | 48 ++-- lib/finch_api/models/hris/company.rb | 46 ++-- .../pay_statement_item/rule_create_params.rb | 22 +- .../company/pay_statement_item_list_params.rb | 4 +- lib/finch_api/models/hris/company_benefit.rb | 24 +- .../models/hris/document_list_params.rb | 4 +- .../models/hris/document_list_response.rb | 8 +- .../models/hris/document_response.rb | 8 +- .../models/hris/document_retreive_response.rb | 2 +- lib/finch_api/models/hris/employment_data.rb | 65 +++-- .../models/hris/employment_data_response.rb | 4 +- .../hris/employment_retrieve_many_params.rb | 7 +- lib/finch_api/models/hris/individual.rb | 40 +-- .../models/hris/individual_in_directory.rb | 12 +- .../models/hris/individual_response.rb | 4 +- .../hris/individual_retrieve_many_params.rb | 8 +- lib/finch_api/models/hris/pay_statement.rb | 120 ++++----- .../models/hris/pay_statement_response.rb | 4 +- .../hris/pay_statement_response_body.rb | 8 +- .../pay_statement_retrieve_many_params.rb | 4 +- lib/finch_api/models/hris/payment.rb | 30 +-- .../models/hris/support_per_benefit_type.rb | 8 +- .../models/hris/supported_benefit.rb | 18 +- lib/finch_api/models/hris/w42005.rb | 24 +- lib/finch_api/models/hris/w42020.rb | 20 +- lib/finch_api/models/income.rb | 10 +- lib/finch_api/models/individual_event.rb | 8 +- lib/finch_api/models/introspection.rb | 46 ++-- lib/finch_api/models/job_completion_event.rb | 8 +- .../models/jobs/automated_async_job.rb | 20 +- .../models/jobs/automated_create_params.rb | 8 +- .../models/jobs/automated_list_response.rb | 4 +- lib/finch_api/models/jobs/manual_async_job.rb | 6 +- .../models/operation_support_matrix.rb | 18 +- lib/finch_api/models/pay_statement_event.rb | 8 +- lib/finch_api/models/payment_event.rb | 8 +- lib/finch_api/models/provider.rb | 208 +++++++-------- .../models/sandbox/company_update_params.rb | 42 +-- .../models/sandbox/company_update_response.rb | 4 +- .../sandbox/connection_create_params.rb | 4 +- .../connections/account_create_params.rb | 4 +- .../connections/account_update_params.rb | 4 +- .../models/sandbox/directory_create_params.rb | 97 +++---- .../sandbox/employment_update_params.rb | 47 ++-- .../sandbox/employment_update_response.rb | 12 +- .../sandbox/individual_update_params.rb | 32 +-- .../sandbox/individual_update_response.rb | 4 +- .../models/sandbox/job_create_params.rb | 4 +- .../sandbox/jobs/sandbox_job_configuration.rb | 12 +- .../models/sandbox/payment_create_params.rb | 118 ++++----- lib/finch_api/models/webhook_event.rb | 2 +- lib/finch_api/resources/access_tokens.rb | 2 +- lib/finch_api/resources/account.rb | 4 +- lib/finch_api/resources/connect/sessions.rb | 8 +- lib/finch_api/resources/hris/benefits.rb | 14 +- .../resources/hris/benefits/individuals.rb | 8 +- lib/finch_api/resources/hris/company.rb | 2 +- .../hris/company/pay_statement_item.rb | 2 +- .../hris/company/pay_statement_item/rules.rb | 6 +- lib/finch_api/resources/hris/directory.rb | 2 +- lib/finch_api/resources/hris/documents.rb | 4 +- lib/finch_api/resources/hris/employments.rb | 4 +- lib/finch_api/resources/hris/individuals.rb | 6 +- .../resources/hris/pay_statements.rb | 4 +- lib/finch_api/resources/hris/payments.rb | 2 +- lib/finch_api/resources/jobs/automated.rb | 6 +- lib/finch_api/resources/jobs/manual.rb | 2 +- lib/finch_api/resources/providers.rb | 2 +- lib/finch_api/resources/sandbox/company.rb | 8 +- .../resources/sandbox/connections.rb | 2 +- .../resources/sandbox/connections/accounts.rb | 4 +- lib/finch_api/resources/sandbox/directory.rb | 2 +- lib/finch_api/resources/sandbox/employment.rb | 16 +- lib/finch_api/resources/sandbox/individual.rb | 10 +- lib/finch_api/resources/sandbox/jobs.rb | 2 +- .../resources/sandbox/jobs/configuration.rb | 8 +- lib/finch_api/resources/sandbox/payment.rb | 2 +- .../models/access_token_create_params.rbs | 8 + .../models/account_disconnect_params.rbs | 2 + .../models/account_introspect_params.rbs | 2 + sig/finch_api/models/account_update_event.rbs | 242 +++++++++++++++++- sig/finch_api/models/base_webhook_event.rbs | 6 + sig/finch_api/models/company_event.rbs | 17 +- .../models/connect/session_new_params.rbs | 34 ++- .../models/connect/session_new_response.rbs | 2 + .../connect/session_reauthenticate_params.rbs | 16 +- .../session_reauthenticate_response.rbs | 2 + .../models/create_access_token_response.rbs | 29 ++- sig/finch_api/models/directory_event.rbs | 19 +- sig/finch_api/models/disconnect_response.rbs | 2 + sig/finch_api/models/employment_event.rbs | 19 +- .../models/hris/benefit_contribution.rbs | 16 +- .../models/hris/benefit_create_params.rbs | 27 +- .../hris/benefit_features_and_operations.rbs | 39 ++- .../models/hris/benefit_list_params.rbs | 2 + ...benefit_list_supported_benefits_params.rbs | 2 + ...nefit_list_supported_benefits_response.rbs | 10 + .../models/hris/benefit_retrieve_params.rbs | 2 + .../models/hris/benefit_update_params.rbs | 5 + .../enrolled_individual_benefit_response.rbs | 2 + .../hris/benefits/individual_benefit.rbs | 22 +- .../individual_enroll_many_params.rbs | 65 +++-- .../individual_enrolled_ids_params.rbs | 2 + .../individual_enrolled_ids_response.rbs | 5 + ...dividual_retrieve_many_benefits_params.rbs | 5 + .../individual_unenroll_many_params.rbs | 5 + ...unenrolled_individual_benefit_response.rbs | 2 + .../models/hris/benefits_support.rbs | 15 ++ sig/finch_api/models/hris/company.rbs | 56 +++- .../pay_statement_item/rule_create_params.rbs | 29 ++- .../rule_create_response.rbs | 20 ++ .../pay_statement_item/rule_delete_params.rbs | 2 + .../rule_delete_response.rbs | 21 ++ .../pay_statement_item/rule_list_params.rbs | 2 + .../pay_statement_item/rule_list_response.rbs | 20 ++ .../pay_statement_item/rule_update_params.rbs | 5 + .../rule_update_response.rbs | 20 ++ .../pay_statement_item_list_params.rbs | 21 +- .../pay_statement_item_list_response.rbs | 13 + sig/finch_api/models/hris/company_benefit.rbs | 27 +- .../models/hris/company_retrieve_params.rbs | 2 + .../hris/create_company_benefits_response.rbs | 2 + .../directory_list_individuals_params.rbs | 6 + .../models/hris/directory_list_params.rbs | 6 + .../models/hris/document_list_params.rbs | 20 +- .../models/hris/document_list_response.rbs | 5 + .../models/hris/document_response.rbs | 20 +- .../models/hris/document_retreive_params.rbs | 2 + sig/finch_api/models/hris/employment_data.rbs | 76 ++++-- .../models/hris/employment_data_response.rbs | 6 + .../hris/employment_retrieve_many_params.rbs | 7 + sig/finch_api/models/hris/individual.rbs | 65 +++-- .../models/hris/individual_in_directory.rbs | 14 + .../models/hris/individual_response.rbs | 6 + .../hris/individual_retrieve_many_params.rbs | 10 + sig/finch_api/models/hris/pay_statement.rbs | 104 ++++++-- .../models/hris/pay_statement_response.rbs | 6 + .../hris/pay_statement_response_body.rbs | 5 + .../pay_statement_retrieve_many_params.rbs | 11 + sig/finch_api/models/hris/payment.rbs | 25 +- .../models/hris/payment_list_params.rbs | 6 + .../models/hris/support_per_benefit_type.rbs | 5 + .../models/hris/supported_benefit.rbs | 34 ++- .../hris/update_company_benefit_response.rbs | 2 + sig/finch_api/models/hris/w42005.rbs | 46 ++-- sig/finch_api/models/hris/w42020.rbs | 37 ++- sig/finch_api/models/income.rbs | 15 +- sig/finch_api/models/individual_event.rbs | 19 +- sig/finch_api/models/introspection.rbs | 65 ++++- sig/finch_api/models/job_completion_event.rbs | 19 +- .../models/jobs/automated_async_job.rbs | 30 ++- .../models/jobs/automated_create_params.rbs | 8 + .../models/jobs/automated_create_response.rbs | 7 + .../models/jobs/automated_list_params.rbs | 6 + .../models/jobs/automated_list_response.rbs | 18 ++ .../models/jobs/automated_retrieve_params.rbs | 2 + .../models/jobs/manual_async_job.rbs | 14 +- .../models/jobs/manual_retrieve_params.rbs | 2 + sig/finch_api/models/location.rbs | 11 + sig/finch_api/models/money.rbs | 2 + .../models/operation_support_matrix.rbs | 7 + sig/finch_api/models/paging.rbs | 2 + sig/finch_api/models/pay_statement_event.rbs | 19 +- sig/finch_api/models/payment_event.rbs | 19 +- .../models/payroll/pay_group_list_params.rbs | 6 + .../payroll/pay_group_list_response.rbs | 6 + .../payroll/pay_group_retrieve_params.rbs | 2 + .../payroll/pay_group_retrieve_response.rbs | 7 + sig/finch_api/models/provider.rbs | 233 ++++++++++++++++- sig/finch_api/models/provider_list_params.rbs | 2 + .../request_forwarding_forward_params.rbs | 9 + .../request_forwarding_forward_response.rbs | 15 ++ .../models/sandbox/company_update_params.rbs | 56 +++- .../sandbox/company_update_response.rbs | 31 +++ .../sandbox/connection_create_params.rbs | 8 + .../sandbox/connection_create_response.rbs | 11 + .../connections/account_create_params.rbs | 8 + .../connections/account_create_response.rbs | 10 + .../connections/account_update_params.rbs | 5 + .../connections/account_update_response.rbs | 9 + .../sandbox/directory_create_params.rbs | 112 ++++++-- .../sandbox/employment_update_params.rbs | 49 +++- .../sandbox/employment_update_response.rbs | 33 +++ .../sandbox/individual_update_params.rbs | 42 ++- .../sandbox/individual_update_response.rbs | 26 ++ .../models/sandbox/job_create_params.rbs | 5 + .../models/sandbox/job_create_response.rbs | 7 + .../jobs/configuration_retrieve_params.rbs | 2 + .../jobs/configuration_update_params.rbs | 2 + .../jobs/sandbox_job_configuration.rbs | 21 +- .../models/sandbox/payment_create_params.rbs | 111 ++++++-- .../sandbox/payment_create_response.rbs | 2 + sig/finch_api/resources/connect/sessions.rbs | 4 +- .../hris/company/pay_statement_item.rbs | 2 +- sig/finch_api/resources/hris/documents.rbs | 2 +- 211 files changed, 3037 insertions(+), 1279 deletions(-) diff --git a/lib/finch_api/internal/individuals_page.rb b/lib/finch_api/internal/individuals_page.rb index c6dbf9e8..7c08dedc 100644 --- a/lib/finch_api/internal/individuals_page.rb +++ b/lib/finch_api/internal/individuals_page.rb @@ -19,7 +19,7 @@ class IndividualsPage # @return [Array>, nil] attr_accessor :individuals - # @return [FinchAPI::Paging] + # @return [FinchAPI::Models::Paging] attr_accessor :paging # @return [Boolean] diff --git a/lib/finch_api/internal/page.rb b/lib/finch_api/internal/page.rb index d820d555..d830840a 100644 --- a/lib/finch_api/internal/page.rb +++ b/lib/finch_api/internal/page.rb @@ -19,7 +19,7 @@ class Page # @return [Array>, nil] attr_accessor :data - # @return [FinchAPI::Paging] + # @return [FinchAPI::Models::Paging] attr_accessor :paging # @return [Boolean] diff --git a/lib/finch_api/models/account_update_event.rb b/lib/finch_api/models/account_update_event.rb index a828bb45..d2bca9c3 100644 --- a/lib/finch_api/models/account_update_event.rb +++ b/lib/finch_api/models/account_update_event.rb @@ -5,46 +5,46 @@ module Models class AccountUpdateEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::AccountUpdateEvent::Data, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data, nil] optional :data, -> { FinchAPI::AccountUpdateEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::AccountUpdateEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::AccountUpdateEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::AccountUpdateEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::AccountUpdateEvent::Data] - # @param event_type [Symbol, FinchAPI::AccountUpdateEvent::EventType] + # @param data [FinchAPI::Models::AccountUpdateEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::AccountUpdateEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_method # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod] required :authentication_method, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod } # @!attribute status # - # @return [Symbol, FinchAPI::ConnectionStatusType] + # @return [Symbol, FinchAPI::Models::ConnectionStatusType] required :status, enum: -> { FinchAPI::ConnectionStatusType } # @!method initialize(authentication_method:, status:) - # @param authentication_method [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod] - # @param status [Symbol, FinchAPI::ConnectionStatusType] + # @param authentication_method [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod] + # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] - # @see FinchAPI::AccountUpdateEvent::Data#authentication_method + # @see FinchAPI::Models::AccountUpdateEvent::Data#authentication_method class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # @!attribute benefits_support # Each benefit type and their supported features. If the benefit type is not # supported, the property will be null # - # @return [FinchAPI::HRIS::BenefitsSupport, nil] + # @return [FinchAPI::Models::HRIS::BenefitsSupport, nil] optional :benefits_support, -> { FinchAPI::HRIS::BenefitsSupport }, nil?: true # @!attribute supported_fields # The supported data fields returned by our HR and payroll endpoints # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields, nil] optional :supported_fields, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields }, nil?: true @@ -52,30 +52,31 @@ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of authentication method. # - # @return [Symbol, FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::Type, nil] + # @return [Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type, nil] optional :type, enum: -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::Type } # @!method initialize(benefits_support: nil, supported_fields: nil, type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod} for more details. + # {FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod} for more + # details. # - # @param benefits_support [FinchAPI::HRIS::BenefitsSupport, nil] Each benefit type and their supported features. If the benefit type is not suppo + # @param benefits_support [FinchAPI::Models::HRIS::BenefitsSupport, nil] Each benefit type and their supported features. If the benefit type is not suppo # - # @param supported_fields [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints + # @param supported_fields [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints # - # @param type [Symbol, FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::Type] The type of authentication method. + # @param type [Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type] The type of authentication method. - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod#supported_fields + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod#supported_fields class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute company # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company, nil] optional :company, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company } # @!attribute directory # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory, nil] optional :directory, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory @@ -83,7 +84,7 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute employment # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment, nil] optional :employment, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment @@ -91,7 +92,7 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute individual # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual, nil] optional :individual, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual @@ -99,7 +100,7 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute pay_group # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup, nil] optional :pay_group, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup @@ -107,7 +108,7 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute pay_statement # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement, nil] optional :pay_statement, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement @@ -115,22 +116,22 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute payment # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment, nil] optional :payment, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment } # @!method initialize(company: nil, directory: nil, employment: nil, individual: nil, pay_group: nil, pay_statement: nil, payment: nil) # The supported data fields returned by our HR and payroll endpoints # - # @param company [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company] - # @param directory [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory] - # @param employment [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment] - # @param individual [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual] - # @param pay_group [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup] - # @param pay_statement [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement] - # @param payment [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment] - - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#company + # @param company [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company] + # @param directory [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory] + # @param employment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment] + # @param individual [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual] + # @param pay_group [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup] + # @param pay_statement [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement] + # @param payment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment] + + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#company class Company < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -139,7 +140,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute accounts # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts, nil] optional :accounts, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts @@ -147,7 +148,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute departments # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments, nil] optional :departments, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments @@ -160,7 +161,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute entity # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity, nil] optional :entity, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity @@ -173,7 +174,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute locations # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations, nil] optional :locations, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations @@ -191,16 +192,16 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!method initialize(id: nil, accounts: nil, departments: nil, ein: nil, entity: nil, legal_name: nil, locations: nil, primary_email: nil, primary_phone_number: nil) # @param id [Boolean] - # @param accounts [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts] - # @param departments [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments] + # @param accounts [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts] + # @param departments [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments] # @param ein [Boolean] - # @param entity [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity] + # @param entity [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity] # @param legal_name [Boolean] - # @param locations [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations] + # @param locations [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations] # @param primary_email [Boolean] # @param primary_phone_number [Boolean] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#accounts + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#accounts class Accounts < FinchAPI::Internal::Type::BaseModel # @!attribute account_name # @@ -235,7 +236,7 @@ class Accounts < FinchAPI::Internal::Type::BaseModel # @param routing_number [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#departments + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#departments class Departments < FinchAPI::Internal::Type::BaseModel # @!attribute name # @@ -244,7 +245,7 @@ class Departments < FinchAPI::Internal::Type::BaseModel # @!attribute parent # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] optional :parent, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent @@ -252,9 +253,9 @@ class Departments < FinchAPI::Internal::Type::BaseModel # @!method initialize(name: nil, parent: nil) # @param name [Boolean] - # @param parent [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent] + # @param parent [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments#parent + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments#parent class Parent < FinchAPI::Internal::Type::BaseModel # @!attribute name # @@ -266,7 +267,7 @@ class Parent < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#entity + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#entity class Entity < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # @@ -283,7 +284,7 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#locations + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#locations class Locations < FinchAPI::Internal::Type::BaseModel # @!attribute city # @@ -325,11 +326,11 @@ class Locations < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#directory + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#directory class Directory < FinchAPI::Internal::Type::BaseModel # @!attribute individuals # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] optional :individuals, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals @@ -337,17 +338,17 @@ class Directory < FinchAPI::Internal::Type::BaseModel # @!attribute paging # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging, nil] optional :paging, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging } # @!method initialize(individuals: nil, paging: nil) - # @param individuals [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals] - # @param paging [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging] + # @param individuals [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals] + # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory#individuals + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory#individuals class Individuals < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -376,7 +377,7 @@ class Individuals < FinchAPI::Internal::Type::BaseModel # @!attribute manager # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] optional :manager, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager @@ -393,10 +394,10 @@ class Individuals < FinchAPI::Internal::Type::BaseModel # @param first_name [Boolean] # @param is_active [Boolean] # @param last_name [Boolean] - # @param manager [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] + # @param manager [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] # @param middle_name [Boolean] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals#manager + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -408,7 +409,7 @@ class Manager < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory#paging + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory#paging class Paging < FinchAPI::Internal::Type::BaseModel # @!attribute count # @@ -426,7 +427,7 @@ class Paging < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#employment + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -445,7 +446,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute department # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department, nil] optional :department, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department @@ -453,7 +454,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute employment # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment, nil] optional :employment, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment @@ -476,7 +477,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute income # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income, nil] optional :income, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income @@ -499,7 +500,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute location # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location, nil] optional :location, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location @@ -507,7 +508,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute manager # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager, nil] optional :manager, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager @@ -532,22 +533,22 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @param id [Boolean] # @param class_code [Boolean] # @param custom_fields [Boolean] - # @param department [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department] - # @param employment [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment] + # @param department [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department] + # @param employment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment] # @param employment_status [Boolean] # @param end_date [Boolean] # @param first_name [Boolean] - # @param income [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income] + # @param income [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income] # @param income_history [Boolean] # @param is_active [Boolean] # @param last_name [Boolean] - # @param location [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location] - # @param manager [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager] + # @param location [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location] + # @param manager [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager] # @param middle_name [Boolean] # @param start_date [Boolean] # @param title [Boolean] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#department + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#department class Department < FinchAPI::Internal::Type::BaseModel # @!attribute name # @@ -558,7 +559,7 @@ class Department < FinchAPI::Internal::Type::BaseModel # @param name [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#employment + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # @@ -575,7 +576,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#income + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#income class Income < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -598,7 +599,7 @@ class Income < FinchAPI::Internal::Type::BaseModel # @param unit [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#location + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#location class Location < FinchAPI::Internal::Type::BaseModel # @!attribute city # @@ -639,7 +640,7 @@ class Location < FinchAPI::Internal::Type::BaseModel # @param state [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#manager + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -651,7 +652,7 @@ class Manager < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#individual + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#individual class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -665,7 +666,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute emails # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails, nil] optional :emails, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails @@ -703,7 +704,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute phone_numbers # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] optional :phone_numbers, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers @@ -716,7 +717,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute residence # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence, nil] optional :residence, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence @@ -730,19 +731,19 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!method initialize(id: nil, dob: nil, emails: nil, encrypted_ssn: nil, ethnicity: nil, first_name: nil, gender: nil, last_name: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, ssn: nil) # @param id [Boolean] # @param dob [Boolean] - # @param emails [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails] + # @param emails [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails] # @param encrypted_ssn [Boolean] # @param ethnicity [Boolean] # @param first_name [Boolean] # @param gender [Boolean] # @param last_name [Boolean] # @param middle_name [Boolean] - # @param phone_numbers [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] + # @param phone_numbers [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] # @param preferred_name [Boolean] - # @param residence [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence] + # @param residence [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence] # @param ssn [Boolean] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#emails + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#emails class Emails < FinchAPI::Internal::Type::BaseModel # @!attribute data # @@ -759,7 +760,7 @@ class Emails < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#phone_numbers + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#phone_numbers class PhoneNumbers < FinchAPI::Internal::Type::BaseModel # @!attribute data # @@ -776,7 +777,7 @@ class PhoneNumbers < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#residence + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#residence class Residence < FinchAPI::Internal::Type::BaseModel # @!attribute city # @@ -818,7 +819,7 @@ class Residence < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#pay_group + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#pay_group class PayGroup < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -847,11 +848,11 @@ class PayGroup < FinchAPI::Internal::Type::BaseModel # @param pay_frequencies [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#pay_statement + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#pay_statement class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute paging # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] optional :paging, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging @@ -859,17 +860,17 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute pay_statements # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] optional :pay_statements, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements } # @!method initialize(paging: nil, pay_statements: nil) - # @param paging [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # @param pay_statements [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] + # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging] + # @param pay_statements [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement#paging + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement#paging class Paging < FinchAPI::Internal::Type::BaseModel # @!attribute count # @@ -886,11 +887,11 @@ class Paging < FinchAPI::Internal::Type::BaseModel # @param offset [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement#pay_statements + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement#pay_statements class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute earnings # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] optional :earnings, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings @@ -898,7 +899,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute employee_deductions # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] optional :employee_deductions, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions @@ -906,7 +907,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute employer_contributions # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] optional :employer_contributions, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions @@ -934,7 +935,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute taxes # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] optional :taxes, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes @@ -951,18 +952,18 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel optional :type, FinchAPI::Internal::Type::Boolean # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) - # @param earnings [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] - # @param employee_deductions [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] - # @param employer_contributions [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] + # @param earnings [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] + # @param employee_deductions [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] + # @param employer_contributions [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] # @param gross_pay [Boolean] # @param individual_id [Boolean] # @param net_pay [Boolean] # @param payment_method [Boolean] - # @param taxes [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] + # @param taxes [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] # @param total_hours [Boolean] # @param type [Boolean] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#earnings + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#earnings class Earnings < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -991,7 +992,7 @@ class Earnings < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employee_deductions + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employee_deductions class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1026,7 +1027,7 @@ class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employer_contributions + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employer_contributions class EmployerContributions < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1049,7 +1050,7 @@ class EmployerContributions < FinchAPI::Internal::Type::BaseModel # @param name [Boolean] end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#taxes + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#taxes class Taxes < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1086,7 +1087,7 @@ class Taxes < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#payment + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#payment class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -1145,7 +1146,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute pay_period # - # @return [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] + # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] optional :pay_period, -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod @@ -1163,9 +1164,9 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @param pay_date [Boolean] # @param pay_frequencies [Boolean] # @param pay_group_ids [Boolean] - # @param pay_period [FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod] + # @param pay_period [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod] - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment#pay_period + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment#pay_period class PayPeriod < FinchAPI::Internal::Type::BaseModel # @!attribute end_date # @@ -1186,7 +1187,7 @@ class PayPeriod < FinchAPI::Internal::Type::BaseModel # The type of authentication method. # - # @see FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod#type + # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/base_webhook_event.rb b/lib/finch_api/models/base_webhook_event.rb index a9a05891..9f6ecab9 100644 --- a/lib/finch_api/models/base_webhook_event.rb +++ b/lib/finch_api/models/base_webhook_event.rb @@ -30,7 +30,7 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @!method initialize(account_id:, company_id:, connection_id: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::BaseWebhookEvent} for more details. + # {FinchAPI::Models::BaseWebhookEvent} for more details. # # @param account_id [String] [DEPRECATED] Unique Finch ID of the employer account used to make this connectio # diff --git a/lib/finch_api/models/company_event.rb b/lib/finch_api/models/company_event.rb index e38fe662..c24f2548 100644 --- a/lib/finch_api/models/company_event.rb +++ b/lib/finch_api/models/company_event.rb @@ -10,12 +10,12 @@ class CompanyEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute event_type # - # @return [Symbol, FinchAPI::CompanyEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::CompanyEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::CompanyEvent::EventType } # @!method initialize(data: nil, event_type: nil) # @param data [Hash{Symbol=>Object}, nil] - # @param event_type [Symbol, FinchAPI::CompanyEvent::EventType] + # @param event_type [Symbol, FinchAPI::Models::CompanyEvent::EventType] module EventType extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/connect/session_new_params.rb b/lib/finch_api/models/connect/session_new_params.rb index 2fc7b944..aa47195e 100644 --- a/lib/finch_api/models/connect/session_new_params.rb +++ b/lib/finch_api/models/connect/session_new_params.rb @@ -20,7 +20,7 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # @!attribute products # - # @return [Array] + # @return [Array] required :products, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionNewParams::Product] } @@ -31,7 +31,7 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # @!attribute integration # - # @return [FinchAPI::Connect::SessionNewParams::Integration, nil] + # @return [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] optional :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true # @!attribute manual @@ -53,7 +53,7 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # @!attribute sandbox # - # @return [Symbol, FinchAPI::Connect::SessionNewParams::Sandbox, nil] + # @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] optional :sandbox, enum: -> { FinchAPI::Connect::SessionNewParams::Sandbox }, nil?: true # @!method initialize(customer_id:, customer_name:, products:, customer_email: nil, integration: nil, manual: nil, minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, request_options: {}) @@ -64,11 +64,11 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # # @param customer_name [String] # - # @param products [Array] + # @param products [Array] # # @param customer_email [String, nil] # - # @param integration [FinchAPI::Connect::SessionNewParams::Integration, nil] + # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] # # @param manual [Boolean, nil] # @@ -76,7 +76,7 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # # @param redirect_uri [String, nil] # - # @param sandbox [Symbol, FinchAPI::Connect::SessionNewParams::Sandbox, nil] + # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] @@ -102,7 +102,7 @@ module Product class Integration < FinchAPI::Internal::Type::BaseModel # @!attribute auth_method # - # @return [Symbol, FinchAPI::Connect::SessionNewParams::Integration::AuthMethod, nil] + # @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] optional :auth_method, enum: -> { FinchAPI::Connect::SessionNewParams::Integration::AuthMethod }, nil?: true @@ -113,10 +113,10 @@ class Integration < FinchAPI::Internal::Type::BaseModel optional :provider, String, nil?: true # @!method initialize(auth_method: nil, provider: nil) - # @param auth_method [Symbol, FinchAPI::Connect::SessionNewParams::Integration::AuthMethod, nil] + # @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] # @param provider [String, nil] - # @see FinchAPI::Connect::SessionNewParams::Integration#auth_method + # @see FinchAPI::Models::Connect::SessionNewParams::Integration#auth_method module AuthMethod extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/connect/session_reauthenticate_params.rb b/lib/finch_api/models/connect/session_reauthenticate_params.rb index 0e885380..74638f5d 100644 --- a/lib/finch_api/models/connect/session_reauthenticate_params.rb +++ b/lib/finch_api/models/connect/session_reauthenticate_params.rb @@ -24,7 +24,7 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel # @!attribute products # The products to request access to (optional for reauthentication) # - # @return [Array, nil] + # @return [Array, nil] optional :products, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionReauthenticateParams::Product] @@ -45,7 +45,7 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel # # @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 # - # @param products [Array, nil] The products to request access to (optional for reauthentication) + # @param products [Array, nil] The products to request access to (optional for reauthentication) # # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed # diff --git a/lib/finch_api/models/create_access_token_response.rb b/lib/finch_api/models/create_access_token_response.rb index 1b4a3b5a..6e2093a7 100644 --- a/lib/finch_api/models/create_access_token_response.rb +++ b/lib/finch_api/models/create_access_token_response.rb @@ -22,7 +22,7 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @!attribute client_type # The type of application associated with a token. # - # @return [Symbol, FinchAPI::CreateAccessTokenResponse::ClientType] + # @return [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType] required :client_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ClientType } # @!attribute company_id @@ -46,7 +46,7 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # - `provider` - connection to an external provider # - `finch` - finch-generated data. # - # @return [Symbol, FinchAPI::CreateAccessTokenResponse::ConnectionType] + # @return [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] required :connection_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ConnectionType } # @!attribute products @@ -76,19 +76,19 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @!method initialize(access_token:, account_id:, client_type:, company_id:, connection_id:, connection_type:, products:, provider_id:, customer_id: nil, token_type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::CreateAccessTokenResponse} for more details. + # {FinchAPI::Models::CreateAccessTokenResponse} for more details. # # @param access_token [String] The access token for the connection. # # @param account_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this acco # - # @param client_type [Symbol, FinchAPI::CreateAccessTokenResponse::ClientType] The type of application associated with a token. + # @param client_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType] The type of application associated with a token. # # @param company_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this comp # # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`. # - # @param connection_type [Symbol, FinchAPI::CreateAccessTokenResponse::ConnectionType] The type of the connection associated with the token. + # @param connection_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] The type of the connection associated with the token. # # @param products [Array] An array of the authorized products associated with the `access_token`. # @@ -100,7 +100,7 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # The type of application associated with a token. # - # @see FinchAPI::CreateAccessTokenResponse#client_type + # @see FinchAPI::Models::CreateAccessTokenResponse#client_type module ClientType extend FinchAPI::Internal::Type::Enum @@ -117,7 +117,7 @@ module ClientType # - `provider` - connection to an external provider # - `finch` - finch-generated data. # - # @see FinchAPI::CreateAccessTokenResponse#connection_type + # @see FinchAPI::Models::CreateAccessTokenResponse#connection_type module ConnectionType extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/directory_event.rb b/lib/finch_api/models/directory_event.rb index ca759674..a006f2c9 100644 --- a/lib/finch_api/models/directory_event.rb +++ b/lib/finch_api/models/directory_event.rb @@ -5,17 +5,17 @@ module Models class DirectoryEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::DirectoryEvent::Data, nil] + # @return [FinchAPI::Models::DirectoryEvent::Data, nil] optional :data, -> { FinchAPI::DirectoryEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::DirectoryEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::DirectoryEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::DirectoryEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::DirectoryEvent::Data] - # @param event_type [Symbol, FinchAPI::DirectoryEvent::EventType] + # @param data [FinchAPI::Models::DirectoryEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::DirectoryEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id diff --git a/lib/finch_api/models/employment_event.rb b/lib/finch_api/models/employment_event.rb index 12f3aa87..d85bcde4 100644 --- a/lib/finch_api/models/employment_event.rb +++ b/lib/finch_api/models/employment_event.rb @@ -5,17 +5,17 @@ module Models class EmploymentEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::EmploymentEvent::Data, nil] + # @return [FinchAPI::Models::EmploymentEvent::Data, nil] optional :data, -> { FinchAPI::EmploymentEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::EmploymentEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::EmploymentEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::EmploymentEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::EmploymentEvent::Data] - # @param event_type [Symbol, FinchAPI::EmploymentEvent::EventType] + # @param data [FinchAPI::Models::EmploymentEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::EmploymentEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id diff --git a/lib/finch_api/models/hris/benefit_contribution.rb b/lib/finch_api/models/hris/benefit_contribution.rb index 65654a7c..fafb1cd7 100644 --- a/lib/finch_api/models/hris/benefit_contribution.rb +++ b/lib/finch_api/models/hris/benefit_contribution.rb @@ -13,17 +13,17 @@ class BenefitContribution < FinchAPI::Internal::Type::BaseModel # @!attribute type # Contribution type. # - # @return [Symbol, FinchAPI::HRIS::BenefitContribution::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitContribution::Type }, nil?: true # @!method initialize(amount: nil, type: nil) # @param amount [Integer, nil] Contribution amount in cents (if `fixed`) or basis points (if `percent`). # - # @param type [Symbol, FinchAPI::HRIS::BenefitContribution::Type, nil] Contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] Contribution type. # Contribution type. # - # @see FinchAPI::HRIS::BenefitContribution#type + # @see FinchAPI::Models::HRIS::BenefitContribution#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/benefit_create_params.rb b/lib/finch_api/models/hris/benefit_create_params.rb index ee01923d..1cf2f6fe 100644 --- a/lib/finch_api/models/hris/benefit_create_params.rb +++ b/lib/finch_api/models/hris/benefit_create_params.rb @@ -11,7 +11,7 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute company_contribution # The company match for this benefit. # - # @return [FinchAPI::HRIS::BenefitCreateParams::CompanyContribution, nil] + # @return [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] optional :company_contribution, -> { FinchAPI::HRIS::BenefitCreateParams::CompanyContribution }, nil?: true @@ -27,33 +27,33 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute frequency # The frequency of the benefit deduction/contribution. # - # @return [Symbol, FinchAPI::HRIS::BenefitFrequency, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] optional :frequency, enum: -> { FinchAPI::HRIS::BenefitFrequency }, nil?: true # @!attribute type # Type of benefit. # - # @return [Symbol, FinchAPI::HRIS::BenefitType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true # @!method initialize(company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::BenefitCreateParams} for more details. # - # @param company_contribution [FinchAPI::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit. + # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit. # # @param description [String] Name of the benefit as it appears in the provider and pay statements. Recommend # - # @param frequency [Symbol, FinchAPI::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!attribute tiers # - # @return [Array, nil] + # @return [Array, nil] optional :tiers, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier] @@ -61,14 +61,14 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type } # @!method initialize(tiers: nil, type: nil) # The company match for this benefit. # - # @param tiers [Array] - # @param type [Symbol, FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type] + # @param tiers [Array] + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type] class Tier < FinchAPI::Internal::Type::BaseModel # @!attribute match @@ -86,7 +86,7 @@ class Tier < FinchAPI::Internal::Type::BaseModel # @param threshold [Integer] end - # @see FinchAPI::HRIS::BenefitCreateParams::CompanyContribution#type + # @see FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/benefit_features_and_operations.rb b/lib/finch_api/models/hris/benefit_features_and_operations.rb index 5f08b15a..ddc22368 100644 --- a/lib/finch_api/models/hris/benefit_features_and_operations.rb +++ b/lib/finch_api/models/hris/benefit_features_and_operations.rb @@ -6,19 +6,19 @@ module HRIS class BenefitFeaturesAndOperations < FinchAPI::Internal::Type::BaseModel # @!attribute supported_features # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, nil] optional :supported_features, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures } # @!attribute supported_operations # - # @return [FinchAPI::HRIS::SupportPerBenefitType, nil] + # @return [FinchAPI::Models::HRIS::SupportPerBenefitType, nil] optional :supported_operations, -> { FinchAPI::HRIS::SupportPerBenefitType } # @!method initialize(supported_features: nil, supported_operations: nil) - # @param supported_features [FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures] - # @param supported_operations [FinchAPI::HRIS::SupportPerBenefitType] + # @param supported_features [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures] + # @param supported_operations [FinchAPI::Models::HRIS::SupportPerBenefitType] - # @see FinchAPI::HRIS::BenefitFeaturesAndOperations#supported_features + # @see FinchAPI::Models::HRIS::BenefitFeaturesAndOperations#supported_features class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # @!attribute annual_maximum # Whether the provider supports an annual maximum for this benefit. @@ -37,7 +37,7 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # Supported contribution types. An empty array indicates contributions are not # supported. # - # @return [Array, nil] + # @return [Array, nil] optional :company_contribution, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution, @@ -54,7 +54,7 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # Supported deduction types. An empty array indicates deductions are not # supported. # - # @return [Array, nil] + # @return [Array, nil] optional :employee_deduction, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction, @@ -65,7 +65,7 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # @!attribute frequencies # The list of frequencies supported by the provider for this benefit # - # @return [Array, nil] + # @return [Array, nil] optional :frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFrequency, nil?: true] @@ -75,7 +75,7 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # Whether the provider supports HSA contribution limits. Empty if this feature is # not supported for the benefit. This array only has values for HSA benefits. # - # @return [Array, nil] + # @return [Array, nil] optional :hsa_contribution_limit, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit, @@ -85,22 +85,22 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures} for more - # details. + # {FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures} for + # more details. # # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. # # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be # - # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup + # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup # # @param description [String, nil] # - # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported + # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported # - # @param frequencies [Array] The list of frequencies supported by the provider for this benefit + # @param frequencies [Array] The list of frequencies supported by the provider for this benefit # - # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is + # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is module CompanyContribution extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb b/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb index 54e42bf2..567744a3 100644 --- a/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb +++ b/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb @@ -44,7 +44,7 @@ class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel # @!attribute frequencies # The list of frequencies supported by the provider for this benefit # - # @return [Array, nil] + # @return [Array, nil] optional :frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFrequency, nil?: true] } @@ -71,7 +71,7 @@ class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel # # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported # - # @param frequencies [Array] The list of frequencies supported by the provider for this benefit + # @param frequencies [Array] The list of frequencies supported by the provider for this benefit # # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is diff --git a/lib/finch_api/models/hris/benefits/individual_benefit.rb b/lib/finch_api/models/hris/benefits/individual_benefit.rb index 26fc2ba4..4e090134 100644 --- a/lib/finch_api/models/hris/benefits/individual_benefit.rb +++ b/lib/finch_api/models/hris/benefits/individual_benefit.rb @@ -8,7 +8,7 @@ module Benefits class IndividualBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::HRIS::Benefits::IndividualBenefit::Body, nil] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body, nil] optional :body, -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body } # @!attribute code @@ -22,11 +22,11 @@ class IndividualBenefit < FinchAPI::Internal::Type::BaseModel optional :individual_id, String # @!method initialize(body: nil, code: nil, individual_id: nil) - # @param body [FinchAPI::HRIS::Benefits::IndividualBenefit::Body] + # @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body] # @param code [Integer] # @param individual_id [String] - # @see FinchAPI::HRIS::Benefits::IndividualBenefit#body + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit#body class Body < FinchAPI::Internal::Type::BaseModel # @!attribute annual_maximum # If the benefit supports annual maximum, the amount in cents for this individual. @@ -43,39 +43,39 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute company_contribution # - # @return [FinchAPI::HRIS::BenefitContribution, nil] + # @return [FinchAPI::Models::HRIS::BenefitContribution, nil] optional :company_contribution, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true # @!attribute employee_deduction # - # @return [FinchAPI::HRIS::BenefitContribution, nil] + # @return [FinchAPI::Models::HRIS::BenefitContribution, nil] optional :employee_deduction, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true # @!attribute hsa_contribution_limit # Type for HSA contribution limit if the benefit is a HSA. # - # @return [Symbol, FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] optional :hsa_contribution_limit, enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit }, nil?: true # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, employee_deduction: nil, hsa_contribution_limit: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::Benefits::IndividualBenefit::Body} for more details. + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body} for more details. # # @param annual_maximum [Integer, nil] If the benefit supports annual maximum, the amount in cents for this individual. # # @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled # - # @param company_contribution [FinchAPI::HRIS::BenefitContribution, nil] + # @param company_contribution [FinchAPI::Models::HRIS::BenefitContribution, nil] # - # @param employee_deduction [FinchAPI::HRIS::BenefitContribution, nil] + # @param employee_deduction [FinchAPI::Models::HRIS::BenefitContribution, nil] # - # @param hsa_contribution_limit [Symbol, FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] Type for HSA contribution limit if the benefit is a HSA. + # @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] Type for HSA contribution limit if the benefit is a HSA. # Type for HSA contribution limit if the benefit is a HSA. # - # @see FinchAPI::HRIS::Benefits::IndividualBenefit::Body#hsa_contribution_limit + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body#hsa_contribution_limit module HsaContributionLimit extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb b/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb index 651c1842..a41fee7b 100644 --- a/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb @@ -12,21 +12,21 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel # @!attribute individuals # Array of the individual_id to enroll and a configuration object. # - # @return [Array, nil] + # @return [Array, nil] optional :individuals, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] } # @!method initialize(individuals: nil, request_options: {}) - # @param individuals [Array] Array of the individual_id to enroll and a configuration object. + # @param individuals [Array] Array of the individual_id to enroll and a configuration object. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute configuration # - # @return [FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration, nil] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration, nil] optional :configuration, -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration } @@ -37,17 +37,17 @@ class Individual < FinchAPI::Internal::Type::BaseModel optional :individual_id, String # @!method initialize(configuration: nil, individual_id: nil) - # @param configuration [FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration] + # @param configuration [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration] # # @param individual_id [String] Finch id (uuidv4) for the individual to enroll - # @see FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual#configuration + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual#configuration class Configuration < FinchAPI::Internal::Type::BaseModel # @!attribute annual_contribution_limit # For HSA benefits only - whether the contribution limit is for an individual or # family # - # @return [Symbol, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit, nil] optional :annual_contribution_limit, enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit @@ -67,7 +67,7 @@ class Configuration < FinchAPI::Internal::Type::BaseModel # @!attribute company_contribution # - # @return [FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, nil] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, nil] optional :company_contribution, -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution @@ -81,7 +81,7 @@ class Configuration < FinchAPI::Internal::Type::BaseModel # @!attribute employee_deduction # - # @return [FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction, nil] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction, nil] optional :employee_deduction, -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction @@ -89,25 +89,25 @@ class Configuration < FinchAPI::Internal::Type::BaseModel # @!method initialize(annual_contribution_limit: nil, annual_maximum: nil, catch_up: nil, company_contribution: nil, effective_date: nil, employee_deduction: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration} + # {FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration} # for more details. # - # @param annual_contribution_limit [Symbol, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit] For HSA benefits only - whether the contribution limit is for an individual or f + # @param annual_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit] For HSA benefits only - whether the contribution limit is for an individual or f # # @param annual_maximum [Integer, nil] Maximum annual amount in cents # # @param catch_up [Boolean] For retirement benefits only - whether catch up contributions are enabled # - # @param company_contribution [FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution] + # @param company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution] # # @param effective_date [Date] The date the enrollment will take effect # - # @param employee_deduction [FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction] + # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction] # For HSA benefits only - whether the contribution limit is for an individual or # family # - # @see FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#annual_contribution_limit + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#annual_contribution_limit module AnnualContributionLimit extend FinchAPI::Internal::Type::Enum @@ -118,7 +118,7 @@ module AnnualContributionLimit # @return [Array] end - # @see FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#company_contribution + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#company_contribution class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Amount in cents for fixed type or basis points (1/100th of a percent) for @@ -129,7 +129,7 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type @@ -137,14 +137,14 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!method initialize(amount: nil, type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution} + # {FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution} # for more details. # # @param amount [Integer] Amount in cents for fixed type or basis points (1/100th of a percent) for percen # - # @param type [Symbol, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type] + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type] - # @see FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution#type + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution#type module Type extend FinchAPI::Internal::Type::Enum @@ -156,7 +156,7 @@ module Type end end - # @see FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#employee_deduction + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#employee_deduction class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Amount in cents for fixed type or basis points (1/100th of a percent) for @@ -167,7 +167,7 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type @@ -175,14 +175,14 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!method initialize(amount: nil, type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction} + # {FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction} # for more details. # # @param amount [Integer] Amount in cents for fixed type or basis points (1/100th of a percent) for percen # - # @param type [Symbol, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type] + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type] - # @see FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction#type + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/benefits_support.rb b/lib/finch_api/models/hris/benefits_support.rb index be897591..bfee5d68 100644 --- a/lib/finch_api/models/hris/benefits_support.rb +++ b/lib/finch_api/models/hris/benefits_support.rb @@ -6,80 +6,80 @@ module HRIS class BenefitsSupport < FinchAPI::Internal::Type::BaseModel # @!attribute commuter # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :commuter, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute custom_post_tax # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :custom_post_tax, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute custom_pre_tax # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :custom_pre_tax, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute fsa_dependent_care # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :fsa_dependent_care, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute fsa_medical # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :fsa_medical, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute hsa_post # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :hsa_post, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute hsa_pre # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :hsa_pre, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute s125_dental # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :s125_dental, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute s125_medical # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :s125_medical, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute s125_vision # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :s125_vision, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute simple # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :simple, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!attribute simple_ira # - # @return [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :simple_ira, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations }, nil?: true # @!method initialize(commuter: nil, custom_post_tax: nil, custom_pre_tax: nil, fsa_dependent_care: nil, fsa_medical: nil, hsa_post: nil, hsa_pre: nil, s125_dental: nil, s125_medical: nil, s125_vision: nil, simple: nil, simple_ira: nil) # Each benefit type and their supported features. If the benefit type is not # supported, the property will be null # - # @param commuter [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param custom_post_tax [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param custom_pre_tax [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param fsa_dependent_care [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param fsa_medical [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param hsa_post [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param hsa_pre [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param s125_dental [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param s125_medical [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param s125_vision [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param simple [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] - # @param simple_ira [FinchAPI::HRIS::BenefitFeaturesAndOperations, nil] + # @param commuter [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param custom_post_tax [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param custom_pre_tax [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param fsa_dependent_care [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param fsa_medical [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param hsa_post [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param hsa_pre [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param s125_dental [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param s125_medical [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param s125_vision [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param simple [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param simple_ira [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] end end end diff --git a/lib/finch_api/models/hris/company.rb b/lib/finch_api/models/hris/company.rb index 4f5f026e..4e3c5b53 100644 --- a/lib/finch_api/models/hris/company.rb +++ b/lib/finch_api/models/hris/company.rb @@ -14,7 +14,7 @@ class HRISCompany < FinchAPI::Internal::Type::BaseModel # @!attribute accounts # An array of bank account objects associated with the payroll/HRIS system. # - # @return [Array, nil] + # @return [Array, nil] required :accounts, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::HRISCompany::Account] }, nil?: true @@ -22,7 +22,7 @@ class HRISCompany < FinchAPI::Internal::Type::BaseModel # @!attribute departments # The array of company departments. # - # @return [Array, nil] + # @return [Array, nil] required :departments, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::HRISCompany::Department, nil?: true] @@ -38,7 +38,7 @@ class HRISCompany < FinchAPI::Internal::Type::BaseModel # @!attribute entity # The entity type object. # - # @return [FinchAPI::HRIS::HRISCompany::Entity, nil] + # @return [FinchAPI::Models::HRIS::HRISCompany::Entity, nil] required :entity, -> { FinchAPI::HRIS::HRISCompany::Entity }, nil?: true # @!attribute legal_name @@ -49,7 +49,7 @@ class HRISCompany < FinchAPI::Internal::Type::BaseModel # @!attribute locations # - # @return [Array, nil] + # @return [Array, nil] required :locations, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Location, nil?: true] @@ -71,21 +71,21 @@ class HRISCompany < FinchAPI::Internal::Type::BaseModel # @!method initialize(id:, accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::HRISCompany} for more details. + # {FinchAPI::Models::HRIS::HRISCompany} for more details. # # @param id [String] A stable Finch `id` (UUID v4) for the company. # - # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. # - # @param departments [Array, nil] The array of company departments. + # @param departments [Array, nil] The array of company departments. # # @param ein [String, nil] The employer identification number. # - # @param entity [FinchAPI::HRIS::HRISCompany::Entity, nil] The entity type object. + # @param entity [FinchAPI::Models::HRIS::HRISCompany::Entity, nil] The entity type object. # # @param legal_name [String, nil] The legal name of the company. # - # @param locations [Array, nil] + # @param locations [Array, nil] # # @param primary_email [String, nil] The email of the main administrator on the account. # @@ -107,7 +107,7 @@ class Account < FinchAPI::Internal::Type::BaseModel # @!attribute account_type # The type of bank account. # - # @return [Symbol, FinchAPI::HRIS::HRISCompany::Account::AccountType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType, nil] required :account_type, enum: -> { FinchAPI::HRIS::HRISCompany::Account::AccountType }, nil?: true # @!attribute institution_name @@ -125,13 +125,13 @@ class Account < FinchAPI::Internal::Type::BaseModel # @!method initialize(account_name:, account_number:, account_type:, institution_name:, routing_number:) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::HRISCompany::Account} for more details. + # {FinchAPI::Models::HRIS::HRISCompany::Account} for more details. # # @param account_name [String, nil] The name of the bank associated in the payroll/HRIS system. # # @param account_number [String, nil] 10-12 digit number to specify the bank account # - # @param account_type [Symbol, FinchAPI::HRIS::HRISCompany::Account::AccountType, nil] The type of bank account. + # @param account_type [Symbol, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType, nil] The type of bank account. # # @param institution_name [String, nil] Name of the banking institution. # @@ -139,7 +139,7 @@ class Account < FinchAPI::Internal::Type::BaseModel # The type of bank account. # - # @see FinchAPI::HRIS::HRISCompany::Account#account_type + # @see FinchAPI::Models::HRIS::HRISCompany::Account#account_type module AccountType extend FinchAPI::Internal::Type::Enum @@ -161,15 +161,15 @@ class Department < FinchAPI::Internal::Type::BaseModel # @!attribute parent # The parent department, if present. # - # @return [FinchAPI::HRIS::HRISCompany::Department::Parent, nil] + # @return [FinchAPI::Models::HRIS::HRISCompany::Department::Parent, nil] required :parent, -> { FinchAPI::HRIS::HRISCompany::Department::Parent }, nil?: true # @!method initialize(name:, parent:) # @param name [String, nil] The department name. # - # @param parent [FinchAPI::HRIS::HRISCompany::Department::Parent, nil] The parent department, if present. + # @param parent [FinchAPI::Models::HRIS::HRISCompany::Department::Parent, nil] The parent department, if present. - # @see FinchAPI::HRIS::HRISCompany::Department#parent + # @see FinchAPI::Models::HRIS::HRISCompany::Department#parent class Parent < FinchAPI::Internal::Type::BaseModel # @!attribute name # The parent department's name. @@ -184,30 +184,30 @@ class Parent < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::HRIS::HRISCompany#entity + # @see FinchAPI::Models::HRIS::HRISCompany#entity class Entity < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # The tax payer subtype of the company. # - # @return [Symbol, FinchAPI::HRIS::HRISCompany::Entity::Subtype, nil] + # @return [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype, nil] required :subtype, enum: -> { FinchAPI::HRIS::HRISCompany::Entity::Subtype }, nil?: true # @!attribute type # The tax payer type of the company. # - # @return [Symbol, FinchAPI::HRIS::HRISCompany::Entity::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Type, nil] required :type, enum: -> { FinchAPI::HRIS::HRISCompany::Entity::Type }, nil?: true # @!method initialize(subtype:, type:) # The entity type object. # - # @param subtype [Symbol, FinchAPI::HRIS::HRISCompany::Entity::Subtype, nil] The tax payer subtype of the company. + # @param subtype [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype, nil] The tax payer subtype of the company. # - # @param type [Symbol, FinchAPI::HRIS::HRISCompany::Entity::Type, nil] The tax payer type of the company. + # @param type [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Type, nil] The tax payer type of the company. # The tax payer subtype of the company. # - # @see FinchAPI::HRIS::HRISCompany::Entity#subtype + # @see FinchAPI::Models::HRIS::HRISCompany::Entity#subtype module Subtype extend FinchAPI::Internal::Type::Enum @@ -221,7 +221,7 @@ module Subtype # The tax payer type of the company. # - # @see FinchAPI::HRIS::HRISCompany::Entity#type + # @see FinchAPI::Models::HRIS::HRISCompany::Entity#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb index f49100c1..0eb0fe6b 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb @@ -13,7 +13,7 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # Specifies the fields to be applied when the condition is met. # - # @return [FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, nil] + # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, nil] optional :attributes, -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes @@ -21,7 +21,7 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute conditions # - # @return [Array, nil] + # @return [Array, nil] optional :conditions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] @@ -42,20 +42,20 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute entity_type # The entity type to which the rule is applied. # - # @return [Symbol, FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType, nil] optional :entity_type, enum: -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType } # @!method initialize(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) - # @param attributes [FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. # - # @param conditions [Array] + # @param conditions [Array] # # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. # # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. # - # @param entity_type [Symbol, FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] @@ -69,8 +69,8 @@ class Attributes < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes} for - # more details. + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes} + # for more details. # # Specifies the fields to be applied when the condition is met. # @@ -87,7 +87,7 @@ class Condition < FinchAPI::Internal::Type::BaseModel # @!attribute operator # The operator to be used in the rule. # - # @return [Symbol, FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator, nil] optional :operator, enum: -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator @@ -102,13 +102,13 @@ class Condition < FinchAPI::Internal::Type::BaseModel # @!method initialize(field: nil, operator: nil, value: nil) # @param field [String] The field to be checked in the rule. # - # @param operator [Symbol, FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] The operator to be used in the rule. + # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] The operator to be used in the rule. # # @param value [String] The value of the field to be checked in the rule. # The operator to be used in the rule. # - # @see FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition#operator + # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition#operator module Operator extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb b/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb index ae1a6c33..2f9971f0 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb @@ -13,7 +13,7 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel # Comma-delimited list of pay statement item categories to filter on. If empty, # defaults to all categories. # - # @return [Array, nil] + # @return [Array, nil] optional :categories, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::Company::PayStatementItemListParams::Category] @@ -49,7 +49,7 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::Company::PayStatementItemListParams} for more details. # - # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de + # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de # # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in # diff --git a/lib/finch_api/models/hris/company_benefit.rb b/lib/finch_api/models/hris/company_benefit.rb index 2889eb8b..e5062154 100644 --- a/lib/finch_api/models/hris/company_benefit.rb +++ b/lib/finch_api/models/hris/company_benefit.rb @@ -14,7 +14,7 @@ class CompanyBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute company_contribution # The company match for this benefit. # - # @return [FinchAPI::HRIS::CompanyBenefit::CompanyContribution, nil] + # @return [FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution, nil] required :company_contribution, -> { FinchAPI::HRIS::CompanyBenefit::CompanyContribution }, nil?: true # @!attribute description @@ -25,31 +25,31 @@ class CompanyBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute frequency # The frequency of the benefit deduction/contribution. # - # @return [Symbol, FinchAPI::HRIS::BenefitFrequency, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] required :frequency, enum: -> { FinchAPI::HRIS::BenefitFrequency }, nil?: true # @!attribute type # Type of benefit. # - # @return [Symbol, FinchAPI::HRIS::BenefitType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true # @!method initialize(benefit_id:, company_contribution:, description:, frequency:, type:) # @param benefit_id [String] The id of the benefit. # - # @param company_contribution [FinchAPI::HRIS::CompanyBenefit::CompanyContribution, nil] The company match for this benefit. + # @param company_contribution [FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution, nil] The company match for this benefit. # # @param description [String, nil] # - # @param frequency [Symbol, FinchAPI::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # @see FinchAPI::HRIS::CompanyBenefit#company_contribution + # @see FinchAPI::Models::HRIS::CompanyBenefit#company_contribution class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!attribute tiers # - # @return [Array, nil] + # @return [Array, nil] optional :tiers, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier] @@ -57,14 +57,14 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type } # @!method initialize(tiers: nil, type: nil) # The company match for this benefit. # - # @param tiers [Array] - # @param type [Symbol, FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type] + # @param tiers [Array] + # @param type [Symbol, FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type] class Tier < FinchAPI::Internal::Type::BaseModel # @!attribute match @@ -82,7 +82,7 @@ class Tier < FinchAPI::Internal::Type::BaseModel # @param threshold [Integer] end - # @see FinchAPI::HRIS::CompanyBenefit::CompanyContribution#type + # @see FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/document_list_params.rb b/lib/finch_api/models/hris/document_list_params.rb index dad9a92e..d3a6c129 100644 --- a/lib/finch_api/models/hris/document_list_params.rb +++ b/lib/finch_api/models/hris/document_list_params.rb @@ -31,7 +31,7 @@ class DocumentListParams < FinchAPI::Internal::Type::BaseModel # Comma-delimited list of document types to filter on. If empty, defaults to all # types # - # @return [Array, nil] + # @return [Array, nil] optional :types, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::DocumentListParams::Type] @@ -47,7 +47,7 @@ class DocumentListParams < FinchAPI::Internal::Type::BaseModel # # @param offset [Integer] Index to start from (defaults to 0) # - # @param types [Array] Comma-delimited list of document types to filter on. If empty, defaults to all t + # @param types [Array] Comma-delimited list of document types to filter on. If empty, defaults to all t # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/document_list_response.rb b/lib/finch_api/models/hris/document_list_response.rb index c38768ab..901c5264 100644 --- a/lib/finch_api/models/hris/document_list_response.rb +++ b/lib/finch_api/models/hris/document_list_response.rb @@ -7,17 +7,17 @@ module HRIS class DocumentListResponse < FinchAPI::Internal::Type::BaseModel # @!attribute documents # - # @return [Array] + # @return [Array] required :documents, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::DocumentResponse] } # @!attribute paging # - # @return [FinchAPI::Paging] + # @return [FinchAPI::Models::Paging] required :paging, -> { FinchAPI::Paging } # @!method initialize(documents:, paging:) - # @param documents [Array] - # @param paging [FinchAPI::Paging] + # @param documents [Array] + # @param paging [FinchAPI::Models::Paging] end end end diff --git a/lib/finch_api/models/hris/document_response.rb b/lib/finch_api/models/hris/document_response.rb index e0a68de4..8b26ca7c 100644 --- a/lib/finch_api/models/hris/document_response.rb +++ b/lib/finch_api/models/hris/document_response.rb @@ -20,7 +20,7 @@ class DocumentResponse < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of document. # - # @return [Symbol, FinchAPI::HRIS::DocumentResponse::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::DocumentResponse::Type } # @!attribute url @@ -38,13 +38,13 @@ class DocumentResponse < FinchAPI::Internal::Type::BaseModel # @!method initialize(id: nil, individual_id: nil, type: nil, url: nil, year: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::DocumentResponse} for more details. + # {FinchAPI::Models::HRIS::DocumentResponse} for more details. # # @param id [String] A stable Finch id for the document. # # @param individual_id [String, nil] The ID of the individual associated with the document. This will be null for emp # - # @param type [Symbol, FinchAPI::HRIS::DocumentResponse::Type] The type of document. + # @param type [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type] The type of document. # # @param url [String] A URL to access the document. Format: `https://api.tryfinch.com/employer/documen # @@ -52,7 +52,7 @@ class DocumentResponse < FinchAPI::Internal::Type::BaseModel # The type of document. # - # @see FinchAPI::HRIS::DocumentResponse#type + # @see FinchAPI::Models::HRIS::DocumentResponse#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/document_retreive_response.rb b/lib/finch_api/models/hris/document_retreive_response.rb index 8b657bd6..5a55260c 100644 --- a/lib/finch_api/models/hris/document_retreive_response.rb +++ b/lib/finch_api/models/hris/document_retreive_response.rb @@ -19,7 +19,7 @@ module DocumentRetreiveResponse variant :w4_2005, -> { FinchAPI::HRIS::W42005 } # @!method self.variants - # @return [Array(FinchAPI::HRIS::W42020, FinchAPI::HRIS::W42005)] + # @return [Array(FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005)] end end end diff --git a/lib/finch_api/models/hris/employment_data.rb b/lib/finch_api/models/hris/employment_data.rb index e5c5eae9..cfb040cc 100644 --- a/lib/finch_api/models/hris/employment_data.rb +++ b/lib/finch_api/models/hris/employment_data.rb @@ -28,7 +28,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # employer in the system. Custom fields are not currently supported for assisted # connections. # - # @return [Array, nil] + # @return [Array, nil] required :custom_fields, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField] @@ -38,20 +38,20 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute department # The department object. # - # @return [FinchAPI::HRIS::EmploymentData::UnionMember0::Department, nil] + # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Department, nil] required :department, -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Department }, nil?: true # @!attribute employment # The employment object. # - # @return [FinchAPI::HRIS::EmploymentData::UnionMember0::Employment, nil] + # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment, nil] required :employment, -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Employment }, nil?: true # @!attribute employment_status # The detailed employment status of the individual. Available options: `active`, # `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`. # - # @return [Symbol, FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::EmploymentStatus, nil] required :employment_status, enum: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus }, nil?: true @@ -86,13 +86,13 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute location # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] required :location, -> { FinchAPI::Location }, nil?: true # @!attribute manager # The manager object representing the manager of the individual within the org. # - # @return [FinchAPI::HRIS::EmploymentData::UnionMember0::Manager, nil] + # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Manager, nil] required :manager, -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Manager }, nil?: true # @!attribute middle_name @@ -125,13 +125,13 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. # - # @return [FinchAPI::Income, nil] + # @return [FinchAPI::Models::Income, nil] optional :income, -> { FinchAPI::Income }, nil?: true # @!attribute income_history # The array of income history. # - # @return [Array, nil] + # @return [Array, nil] optional :income_history, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Income, nil?: true] }, nil?: true @@ -144,19 +144,19 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!method initialize(id:, class_code:, custom_fields:, department:, employment:, employment_status:, end_date:, first_name:, is_active:, last_name:, latest_rehire_date:, location:, manager:, middle_name:, start_date:, title:, work_id:, income: nil, income_history: nil, source_id: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::EmploymentData::UnionMember0} for more details. + # {FinchAPI::Models::HRIS::EmploymentData::UnionMember0} for more details. # # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. # # @param class_code [String, nil] Worker's compensation classification code for this employee # - # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl # - # @param department [FinchAPI::HRIS::EmploymentData::UnionMember0::Department, nil] The department object. + # @param department [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Department, nil] The department object. # - # @param employment [FinchAPI::HRIS::EmploymentData::UnionMember0::Employment, nil] The employment object. + # @param employment [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment, nil] The employment object. # - # @param employment_status [Symbol, FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` + # @param employment_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` # # @param end_date [String, nil] # @@ -168,9 +168,9 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param latest_rehire_date [String, nil] # - # @param location [FinchAPI::Location, nil] + # @param location [FinchAPI::Models::Location, nil] # - # @param manager [FinchAPI::HRIS::EmploymentData::UnionMember0::Manager, nil] The manager object representing the manager of the individual within the org. + # @param manager [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Manager, nil] The manager object representing the manager of the individual within the org. # # @param middle_name [String, nil] The legal middle name of the individual. # @@ -180,9 +180,9 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param work_id [String, nil] This field is deprecated in favour of `source_id` # - # @param income [FinchAPI::Income, nil] The employee's income as reported by the provider. This may not always be annual + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # - # @param income_history [Array, nil] The array of income history. + # @param income_history [Array, nil] The array of income history. # # @param source_id [String, nil] The source system's unique employment identifier for this individual @@ -203,15 +203,13 @@ class CustomField < FinchAPI::Internal::Type::BaseModel # @param name [String, nil] # @param value [String, Array, Object, Float, Boolean, nil] - # @see FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField#value + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField#value module Value extend FinchAPI::Internal::Type::Union variant String - variant -> { - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::UnionMember1Array - } + variant -> { FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::Value::UnionMember1Array } variant FinchAPI::Internal::Type::Unknown @@ -227,7 +225,7 @@ module Value end end - # @see FinchAPI::HRIS::EmploymentData::UnionMember0#department + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#department class Department < FinchAPI::Internal::Type::BaseModel # @!attribute name # The name of the department associated with the individual. @@ -241,13 +239,13 @@ class Department < FinchAPI::Internal::Type::BaseModel # @param name [String, nil] The name of the department associated with the individual. end - # @see FinchAPI::HRIS::EmploymentData::UnionMember0#employment + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @return [Symbol, FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Subtype, nil] required :subtype, enum: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype }, nil?: true @@ -255,7 +253,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute type # The main employment type of the individual. # - # @return [Symbol, FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Type, nil] required :type, enum: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type @@ -264,18 +262,19 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!method initialize(subtype:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::EmploymentData::UnionMember0::Employment} for more details. + # {FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment} for more + # details. # # The employment object. # - # @param subtype [Symbol, FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim + # @param subtype [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim # - # @param type [Symbol, FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type, nil] The main employment type of the individual. + # @param type [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @see FinchAPI::HRIS::EmploymentData::UnionMember0::Employment#subtype + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment#subtype module Subtype extend FinchAPI::Internal::Type::Enum @@ -292,7 +291,7 @@ module Subtype # The main employment type of the individual. # - # @see FinchAPI::HRIS::EmploymentData::UnionMember0::Employment#type + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment#type module Type extend FinchAPI::Internal::Type::Enum @@ -307,7 +306,7 @@ module Type # The detailed employment status of the individual. Available options: `active`, # `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`. # - # @see FinchAPI::HRIS::EmploymentData::UnionMember0#employment_status + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#employment_status module EmploymentStatus extend FinchAPI::Internal::Type::Enum @@ -323,7 +322,7 @@ module EmploymentStatus # @return [Array] end - # @see FinchAPI::HRIS::EmploymentData::UnionMember0#manager + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. @@ -367,7 +366,7 @@ class BatchError < FinchAPI::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(FinchAPI::HRIS::EmploymentData::UnionMember0, FinchAPI::HRIS::EmploymentData::BatchError)] + # @return [Array(FinchAPI::Models::HRIS::EmploymentData::UnionMember0, FinchAPI::Models::HRIS::EmploymentData::BatchError)] end end end diff --git a/lib/finch_api/models/hris/employment_data_response.rb b/lib/finch_api/models/hris/employment_data_response.rb index 9f055e8b..c4138a04 100644 --- a/lib/finch_api/models/hris/employment_data_response.rb +++ b/lib/finch_api/models/hris/employment_data_response.rb @@ -7,7 +7,7 @@ module HRIS class EmploymentDataResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::HRIS::EmploymentData::UnionMember0, FinchAPI::HRIS::EmploymentData::BatchError] + # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0, FinchAPI::Models::HRIS::EmploymentData::BatchError] required :body, union: -> { FinchAPI::HRIS::EmploymentData } # @!attribute code @@ -22,7 +22,7 @@ class EmploymentDataResponse < FinchAPI::Internal::Type::BaseModel required :individual_id, String # @!method initialize(body:, code:, individual_id:) - # @param body [FinchAPI::HRIS::EmploymentData::UnionMember0, FinchAPI::HRIS::EmploymentData::BatchError] + # @param body [FinchAPI::Models::HRIS::EmploymentData::UnionMember0, FinchAPI::Models::HRIS::EmploymentData::BatchError] # # @param code [Integer] # diff --git a/lib/finch_api/models/hris/employment_retrieve_many_params.rb b/lib/finch_api/models/hris/employment_retrieve_many_params.rb index e0e8d950..39ec2494 100644 --- a/lib/finch_api/models/hris/employment_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/employment_retrieve_many_params.rb @@ -11,14 +11,14 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # @!attribute requests # The array of batch requests. # - # @return [Array] + # @return [Array] required :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] } # @!method initialize(requests:, request_options: {}) - # @param requests [Array] The array of batch requests. + # @param requests [Array] The array of batch requests. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] @@ -33,7 +33,8 @@ class Request < FinchAPI::Internal::Type::BaseModel # @!method initialize(individual_id:) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::EmploymentRetrieveManyParams::Request} for more details. + # {FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request} for more + # details. # # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company. There is no limi end diff --git a/lib/finch_api/models/hris/individual.rb b/lib/finch_api/models/hris/individual.rb index 1f32edba..c7b0014c 100644 --- a/lib/finch_api/models/hris/individual.rb +++ b/lib/finch_api/models/hris/individual.rb @@ -25,7 +25,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute ethnicity # The EEOC-defined ethnicity of the individual. # - # @return [Symbol, FinchAPI::HRIS::Individual::UnionMember0::Ethnicity, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity, nil] required :ethnicity, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::Ethnicity }, nil?: true # @!attribute first_name @@ -37,7 +37,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute gender # The gender of the individual. # - # @return [Symbol, FinchAPI::HRIS::Individual::UnionMember0::Gender, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender, nil] required :gender, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::Gender }, nil?: true # @!attribute last_name @@ -54,7 +54,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute phone_numbers # - # @return [Array, nil] + # @return [Array, nil] required :phone_numbers, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber, @@ -70,12 +70,12 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute residence # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] required :residence, -> { FinchAPI::Location }, nil?: true # @!attribute emails # - # @return [Array, nil] + # @return [Array, nil] optional :emails, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Individual::UnionMember0::Email] }, nil?: true @@ -99,29 +99,29 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!method initialize(id:, dob:, ethnicity:, first_name:, gender:, last_name:, middle_name:, phone_numbers:, preferred_name:, residence:, emails: nil, encrypted_ssn: nil, ssn: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::Individual::UnionMember0} for more details. + # {FinchAPI::Models::HRIS::Individual::UnionMember0} for more details. # # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. # # @param dob [String, nil] # - # @param ethnicity [Symbol, FinchAPI::HRIS::Individual::UnionMember0::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # @param ethnicity [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity, nil] The EEOC-defined ethnicity of the individual. # # @param first_name [String, nil] The legal first name of the individual. # - # @param gender [Symbol, FinchAPI::HRIS::Individual::UnionMember0::Gender, nil] The gender of the individual. + # @param gender [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender, nil] The gender of the individual. # # @param last_name [String, nil] The legal last name of the individual. # # @param middle_name [String, nil] The legal middle name of the individual. # - # @param phone_numbers [Array, nil] + # @param phone_numbers [Array, nil] # # @param preferred_name [String, nil] The preferred name of the individual. # - # @param residence [FinchAPI::Location, nil] + # @param residence [FinchAPI::Models::Location, nil] # - # @param emails [Array, nil] + # @param emails [Array, nil] # # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is # @@ -129,7 +129,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # The EEOC-defined ethnicity of the individual. # - # @see FinchAPI::HRIS::Individual::UnionMember0#ethnicity + # @see FinchAPI::Models::HRIS::Individual::UnionMember0#ethnicity module Ethnicity extend FinchAPI::Internal::Type::Enum @@ -148,7 +148,7 @@ module Ethnicity # The gender of the individual. # - # @see FinchAPI::HRIS::Individual::UnionMember0#gender + # @see FinchAPI::Models::HRIS::Individual::UnionMember0#gender module Gender extend FinchAPI::Internal::Type::Enum @@ -169,7 +169,7 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] required :type, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type @@ -178,9 +178,9 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!method initialize(data:, type:) # @param data [String, nil] - # @param type [Symbol, FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] + # @param type [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] - # @see FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber#type + # @see FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber#type module Type extend FinchAPI::Internal::Type::Enum @@ -200,14 +200,14 @@ class Email < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::HRIS::Individual::UnionMember0::Email::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type, nil] required :type, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::Email::Type }, nil?: true # @!method initialize(data:, type:) # @param data [String] - # @param type [Symbol, FinchAPI::HRIS::Individual::UnionMember0::Email::Type, nil] + # @param type [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type, nil] - # @see FinchAPI::HRIS::Individual::UnionMember0::Email#type + # @see FinchAPI::Models::HRIS::Individual::UnionMember0::Email#type module Type extend FinchAPI::Internal::Type::Enum @@ -249,7 +249,7 @@ class BatchError < FinchAPI::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(FinchAPI::HRIS::Individual::UnionMember0, FinchAPI::HRIS::Individual::BatchError)] + # @return [Array(FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError)] end end end diff --git a/lib/finch_api/models/hris/individual_in_directory.rb b/lib/finch_api/models/hris/individual_in_directory.rb index f6d7ccb8..701e5901 100644 --- a/lib/finch_api/models/hris/individual_in_directory.rb +++ b/lib/finch_api/models/hris/individual_in_directory.rb @@ -14,7 +14,7 @@ class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel # @!attribute department # The department object. # - # @return [FinchAPI::HRIS::IndividualInDirectory::Department, nil] + # @return [FinchAPI::Models::HRIS::IndividualInDirectory::Department, nil] required :department, -> { FinchAPI::HRIS::IndividualInDirectory::Department }, nil?: true # @!attribute first_name @@ -38,7 +38,7 @@ class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel # @!attribute manager # The manager object. # - # @return [FinchAPI::HRIS::IndividualInDirectory::Manager, nil] + # @return [FinchAPI::Models::HRIS::IndividualInDirectory::Manager, nil] required :manager, -> { FinchAPI::HRIS::IndividualInDirectory::Manager }, nil?: true # @!attribute middle_name @@ -50,7 +50,7 @@ class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel # @!method initialize(id:, department:, first_name:, is_active:, last_name:, manager:, middle_name:) # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. # - # @param department [FinchAPI::HRIS::IndividualInDirectory::Department, nil] The department object. + # @param department [FinchAPI::Models::HRIS::IndividualInDirectory::Department, nil] The department object. # # @param first_name [String, nil] The legal first name of the individual. # @@ -58,11 +58,11 @@ class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel # # @param last_name [String, nil] The legal last name of the individual. # - # @param manager [FinchAPI::HRIS::IndividualInDirectory::Manager, nil] The manager object. + # @param manager [FinchAPI::Models::HRIS::IndividualInDirectory::Manager, nil] The manager object. # # @param middle_name [String, nil] The legal middle name of the individual. - # @see FinchAPI::HRIS::IndividualInDirectory#department + # @see FinchAPI::Models::HRIS::IndividualInDirectory#department class Department < FinchAPI::Internal::Type::BaseModel # @!attribute name # The name of the department. @@ -76,7 +76,7 @@ class Department < FinchAPI::Internal::Type::BaseModel # @param name [String, nil] The name of the department. end - # @see FinchAPI::HRIS::IndividualInDirectory#manager + # @see FinchAPI::Models::HRIS::IndividualInDirectory#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. diff --git a/lib/finch_api/models/hris/individual_response.rb b/lib/finch_api/models/hris/individual_response.rb index d0f24d0b..98544bec 100644 --- a/lib/finch_api/models/hris/individual_response.rb +++ b/lib/finch_api/models/hris/individual_response.rb @@ -7,7 +7,7 @@ module HRIS class IndividualResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::HRIS::Individual::UnionMember0, FinchAPI::HRIS::Individual::BatchError] + # @return [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] required :body, union: -> { FinchAPI::HRIS::Individual } # @!attribute code @@ -21,7 +21,7 @@ class IndividualResponse < FinchAPI::Internal::Type::BaseModel required :individual_id, String # @!method initialize(body:, code:, individual_id:) - # @param body [FinchAPI::HRIS::Individual::UnionMember0, FinchAPI::HRIS::Individual::BatchError] + # @param body [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] # @param code [Integer] # @param individual_id [String] end diff --git a/lib/finch_api/models/hris/individual_retrieve_many_params.rb b/lib/finch_api/models/hris/individual_retrieve_many_params.rb index 6abe1edc..1f7b6fa4 100644 --- a/lib/finch_api/models/hris/individual_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/individual_retrieve_many_params.rb @@ -10,20 +10,20 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # @!attribute options # - # @return [FinchAPI::HRIS::IndividualRetrieveManyParams::Options, nil] + # @return [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] optional :options, -> { FinchAPI::HRIS::IndividualRetrieveManyParams::Options }, nil?: true # @!attribute requests # - # @return [Array, nil] + # @return [Array, nil] optional :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] } # @!method initialize(options: nil, requests: nil, request_options: {}) - # @param options [FinchAPI::HRIS::IndividualRetrieveManyParams::Options, nil] - # @param requests [Array] + # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] + # @param requests [Array] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Options < FinchAPI::Internal::Type::BaseModel diff --git a/lib/finch_api/models/hris/pay_statement.rb b/lib/finch_api/models/hris/pay_statement.rb index 7d44e315..6322be1a 100644 --- a/lib/finch_api/models/hris/pay_statement.rb +++ b/lib/finch_api/models/hris/pay_statement.rb @@ -7,7 +7,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute earnings # The array of earnings objects associated with this pay statement # - # @return [Array, nil] + # @return [Array, nil] optional :earnings, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Earning, nil?: true] }, nil?: true @@ -15,7 +15,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute employee_deductions # The array of deductions objects associated with this pay statement. # - # @return [Array, nil] + # @return [Array, nil] optional :employee_deductions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction, @@ -25,7 +25,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute employer_contributions # - # @return [Array, nil] + # @return [Array, nil] optional :employer_contributions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution, @@ -35,7 +35,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute gross_pay # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :gross_pay, -> { FinchAPI::Money }, nil?: true # @!attribute individual_id @@ -46,19 +46,19 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute net_pay # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :net_pay, -> { FinchAPI::Money }, nil?: true # @!attribute payment_method # The payment method. # - # @return [Symbol, FinchAPI::HRIS::PayStatement::PaymentMethod, nil] + # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] optional :payment_method, enum: -> { FinchAPI::HRIS::PayStatement::PaymentMethod }, nil?: true # @!attribute taxes # The array of taxes objects associated with this pay statement. # - # @return [Array, nil] + # @return [Array, nil] optional :taxes, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax, nil?: true] }, nil?: true @@ -72,29 +72,29 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of the payment associated with the pay statement. # - # @return [Symbol, FinchAPI::HRIS::PayStatement::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::PayStatement::Type }, nil?: true # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) - # @param earnings [Array, nil] The array of earnings objects associated with this pay statement + # @param earnings [Array, nil] The array of earnings objects associated with this pay statement # - # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. + # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. # - # @param employer_contributions [Array, nil] + # @param employer_contributions [Array, nil] # - # @param gross_pay [FinchAPI::Money, nil] + # @param gross_pay [FinchAPI::Models::Money, nil] # # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company # - # @param net_pay [FinchAPI::Money, nil] + # @param net_pay [FinchAPI::Models::Money, nil] # - # @param payment_method [Symbol, FinchAPI::HRIS::PayStatement::PaymentMethod, nil] The payment method. + # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] The payment method. # - # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. + # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. # # @param total_hours [Float, nil] The number of hours worked for this pay period # - # @param type [Symbol, FinchAPI::HRIS::PayStatement::Type, nil] The type of the payment associated with the pay statement. + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] The type of the payment associated with the pay statement. class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute amount @@ -105,7 +105,7 @@ class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::HRIS::PayStatement::Earning::Attributes, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes, nil] optional :attributes, -> { FinchAPI::HRIS::PayStatement::Earning::Attributes }, nil?: true # @!attribute currency @@ -130,16 +130,16 @@ class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of earning. # - # @return [Symbol, FinchAPI::HRIS::PayStatement::Earning::Type, nil] + # @return [Symbol, FinchAPI::Models::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. + # {FinchAPI::Models::HRIS::PayStatement::Earning} for more details. # # @param amount [Integer, nil] The earnings amount in cents. # - # @param attributes [FinchAPI::HRIS::PayStatement::Earning::Attributes, nil] + # @param attributes [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes, nil] # # @param currency [String, nil] The earnings currency code. # @@ -147,19 +147,19 @@ class Earning < FinchAPI::Internal::Type::BaseModel # # @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. + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Earning::Type, nil] The type of earning. - # @see FinchAPI::HRIS::PayStatement::Earning#attributes + # @see FinchAPI::Models::HRIS::PayStatement::Earning#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata, nil] + # @return [FinchAPI::Models::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] + # @param metadata [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata] - # @see FinchAPI::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 @@ -172,7 +172,8 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata} for more details. + # {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 @@ -180,7 +181,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # The type of earning. # - # @see FinchAPI::HRIS::PayStatement::Earning#type + # @see FinchAPI::Models::HRIS::PayStatement::Earning#type module Type extend FinchAPI::Internal::Type::Enum @@ -212,7 +213,7 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] optional :attributes, -> { FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes }, nil?: true # @!attribute currency @@ -236,13 +237,13 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute type # Type of benefit. # - # @return [Symbol, FinchAPI::HRIS::BenefitType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil) # @param amount [Integer, nil] The deduction amount in cents. # - # @param attributes [FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] + # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] # # @param currency [String, nil] The deduction currency. # @@ -250,19 +251,19 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # @see FinchAPI::HRIS::PayStatement::EmployeeDeduction#attributes + # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] + # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] - # @see FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes#metadata + # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::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 @@ -275,8 +276,8 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata} for more - # details. + # {FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::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 @@ -292,7 +293,7 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] optional :attributes, -> { FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes @@ -314,34 +315,34 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # @!attribute type # Type of benefit. # - # @return [Symbol, FinchAPI::HRIS::BenefitType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil) # @param amount [Integer, nil] The contribution amount in cents. # - # @param attributes [FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes, nil] + # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] # # @param currency [String, nil] The contribution currency. # # @param name [String, nil] The contribution name from the pay statement. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # @see FinchAPI::HRIS::PayStatement::EmployerContribution#attributes + # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] + # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] - # @see FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes#metadata + # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution::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 @@ -354,8 +355,8 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata} for - # more details. + # {FinchAPI::Models::HRIS::PayStatement::EmployerContribution::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 @@ -364,7 +365,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # The payment method. # - # @see FinchAPI::HRIS::PayStatement#payment_method + # @see FinchAPI::Models::HRIS::PayStatement#payment_method module PaymentMethod extend FinchAPI::Internal::Type::Enum @@ -385,7 +386,7 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::HRIS::PayStatement::Tax::Attributes, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] optional :attributes, -> { FinchAPI::HRIS::PayStatement::Tax::Attributes }, nil?: true # @!attribute currency @@ -409,13 +410,13 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of taxes. # - # @return [Symbol, FinchAPI::HRIS::PayStatement::Tax::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::PayStatement::Tax::Type }, nil?: true # @!method initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) # @param amount [Integer, nil] The tax amount in cents. # - # @param attributes [FinchAPI::HRIS::PayStatement::Tax::Attributes, nil] + # @param attributes [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] # # @param currency [String, nil] The currency code. # @@ -423,19 +424,19 @@ class Tax < FinchAPI::Internal::Type::BaseModel # # @param name [String, nil] The exact name of tax from the pay statement. # - # @param type [Symbol, FinchAPI::HRIS::PayStatement::Tax::Type, nil] The type of taxes. + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] The type of taxes. - # @see FinchAPI::HRIS::PayStatement::Tax#attributes + # @see FinchAPI::Models::HRIS::PayStatement::Tax#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata, nil] + # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata] + # @param metadata [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] - # @see FinchAPI::HRIS::PayStatement::Tax::Attributes#metadata + # @see FinchAPI::Models::HRIS::PayStatement::Tax::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 @@ -448,7 +449,8 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata} for more details. + # {FinchAPI::Models::HRIS::PayStatement::Tax::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 @@ -456,7 +458,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # The type of taxes. # - # @see FinchAPI::HRIS::PayStatement::Tax#type + # @see FinchAPI::Models::HRIS::PayStatement::Tax#type module Type extend FinchAPI::Internal::Type::Enum @@ -472,7 +474,7 @@ module Type # The type of the payment associated with the pay statement. # - # @see FinchAPI::HRIS::PayStatement#type + # @see FinchAPI::Models::HRIS::PayStatement#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/pay_statement_response.rb b/lib/finch_api/models/hris/pay_statement_response.rb index 7824a0dd..abebf178 100644 --- a/lib/finch_api/models/hris/pay_statement_response.rb +++ b/lib/finch_api/models/hris/pay_statement_response.rb @@ -7,7 +7,7 @@ module HRIS class PayStatementResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::HRIS::PayStatementResponseBody, nil] + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody, nil] optional :body, -> { FinchAPI::HRIS::PayStatementResponseBody } # @!attribute code @@ -21,7 +21,7 @@ class PayStatementResponse < FinchAPI::Internal::Type::BaseModel optional :payment_id, String # @!method initialize(body: nil, code: nil, payment_id: nil) - # @param body [FinchAPI::HRIS::PayStatementResponseBody] + # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody] # @param code [Integer] # @param payment_id [String] end diff --git a/lib/finch_api/models/hris/pay_statement_response_body.rb b/lib/finch_api/models/hris/pay_statement_response_body.rb index a4048715..c717b6d9 100644 --- a/lib/finch_api/models/hris/pay_statement_response_body.rb +++ b/lib/finch_api/models/hris/pay_statement_response_body.rb @@ -6,19 +6,19 @@ module HRIS class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel # @!attribute paging # - # @return [FinchAPI::Paging, nil] + # @return [FinchAPI::Models::Paging, nil] optional :paging, -> { FinchAPI::Paging } # @!attribute pay_statements # The array of pay statements for the current payment. # - # @return [Array, nil] + # @return [Array, nil] optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement] } # @!method initialize(paging: nil, pay_statements: nil) - # @param paging [FinchAPI::Paging] + # @param paging [FinchAPI::Models::Paging] # - # @param pay_statements [Array] The array of pay statements for the current payment. + # @param pay_statements [Array] The array of pay statements for the current payment. end end end diff --git a/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb b/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb index b7154eb0..86d8d47b 100644 --- a/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb @@ -11,14 +11,14 @@ class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # @!attribute requests # The array of batch requests. # - # @return [Array] + # @return [Array] required :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] } # @!method initialize(requests:, request_options: {}) - # @param requests [Array] The array of batch requests. + # @param requests [Array] The array of batch requests. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/payment.rb b/lib/finch_api/models/hris/payment.rb index e95d8923..cf37e273 100644 --- a/lib/finch_api/models/hris/payment.rb +++ b/lib/finch_api/models/hris/payment.rb @@ -13,7 +13,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute company_debit # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :company_debit, -> { FinchAPI::Money }, nil?: true # @!attribute debit_date @@ -23,17 +23,17 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute employee_taxes # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :employee_taxes, -> { FinchAPI::Money }, nil?: true # @!attribute employer_taxes # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :employer_taxes, -> { FinchAPI::Money }, nil?: true # @!attribute gross_pay # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :gross_pay, -> { FinchAPI::Money }, nil?: true # @!attribute individual_ids @@ -44,7 +44,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute net_pay # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :net_pay, -> { FinchAPI::Money }, nil?: true # @!attribute pay_date @@ -55,7 +55,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute pay_frequencies # List of pay frequencies associated with this payment. # - # @return [Array, nil] + # @return [Array, nil] optional :pay_frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::Payment::PayFrequency] }, nil?: true @@ -69,33 +69,33 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute pay_period # The pay period object. # - # @return [FinchAPI::HRIS::Payment::PayPeriod, nil] + # @return [FinchAPI::Models::HRIS::Payment::PayPeriod, nil] optional :pay_period, -> { FinchAPI::HRIS::Payment::PayPeriod }, nil?: true # @!method initialize(id: nil, company_debit: nil, debit_date: nil, employee_taxes: nil, employer_taxes: nil, gross_pay: nil, individual_ids: nil, net_pay: nil, pay_date: nil, pay_frequencies: nil, pay_group_ids: nil, pay_period: nil) # @param id [String] The unique id for the payment. # - # @param company_debit [FinchAPI::Money, nil] + # @param company_debit [FinchAPI::Models::Money, nil] # # @param debit_date [String, nil] # - # @param employee_taxes [FinchAPI::Money, nil] + # @param employee_taxes [FinchAPI::Models::Money, nil] # - # @param employer_taxes [FinchAPI::Money, nil] + # @param employer_taxes [FinchAPI::Models::Money, nil] # - # @param gross_pay [FinchAPI::Money, nil] + # @param gross_pay [FinchAPI::Models::Money, nil] # # @param individual_ids [Array, nil] Array of every individual on this payment. # - # @param net_pay [FinchAPI::Money, nil] + # @param net_pay [FinchAPI::Models::Money, nil] # # @param pay_date [String, nil] # - # @param pay_frequencies [Array, nil] List of pay frequencies associated with this payment. + # @param pay_frequencies [Array, nil] List of pay frequencies associated with this payment. # # @param pay_group_ids [Array, nil] Array of the Finch id (uuidv4) of every pay group associated with this payment. # - # @param pay_period [FinchAPI::HRIS::Payment::PayPeriod, nil] The pay period object. + # @param pay_period [FinchAPI::Models::HRIS::Payment::PayPeriod, nil] The pay period object. module PayFrequency extend FinchAPI::Internal::Type::Enum @@ -114,7 +114,7 @@ module PayFrequency # @return [Array] end - # @see FinchAPI::HRIS::Payment#pay_period + # @see FinchAPI::Models::HRIS::Payment#pay_period class PayPeriod < FinchAPI::Internal::Type::BaseModel # @!attribute end_date # diff --git a/lib/finch_api/models/hris/support_per_benefit_type.rb b/lib/finch_api/models/hris/support_per_benefit_type.rb index 53105f59..f82f187e 100644 --- a/lib/finch_api/models/hris/support_per_benefit_type.rb +++ b/lib/finch_api/models/hris/support_per_benefit_type.rb @@ -6,17 +6,17 @@ module HRIS class SupportPerBenefitType < FinchAPI::Internal::Type::BaseModel # @!attribute company_benefits # - # @return [FinchAPI::OperationSupportMatrix, nil] + # @return [FinchAPI::Models::OperationSupportMatrix, nil] optional :company_benefits, -> { FinchAPI::OperationSupportMatrix } # @!attribute individual_benefits # - # @return [FinchAPI::OperationSupportMatrix, nil] + # @return [FinchAPI::Models::OperationSupportMatrix, nil] optional :individual_benefits, -> { FinchAPI::OperationSupportMatrix } # @!method initialize(company_benefits: nil, individual_benefits: nil) - # @param company_benefits [FinchAPI::OperationSupportMatrix] - # @param individual_benefits [FinchAPI::OperationSupportMatrix] + # @param company_benefits [FinchAPI::Models::OperationSupportMatrix] + # @param individual_benefits [FinchAPI::Models::OperationSupportMatrix] end end end diff --git a/lib/finch_api/models/hris/supported_benefit.rb b/lib/finch_api/models/hris/supported_benefit.rb index b610b62d..0e3dbe98 100644 --- a/lib/finch_api/models/hris/supported_benefit.rb +++ b/lib/finch_api/models/hris/supported_benefit.rb @@ -21,7 +21,7 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel # Supported contribution types. An empty array indicates contributions are not # supported. # - # @return [Array, nil] + # @return [Array, nil] optional :company_contribution, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::SupportedBenefit::CompanyContribution, @@ -38,7 +38,7 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel # Supported deduction types. An empty array indicates deductions are not # supported. # - # @return [Array, nil] + # @return [Array, nil] optional :employee_deduction, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::SupportedBenefit::EmployeeDeduction, @@ -49,7 +49,7 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute frequencies # The list of frequencies supported by the provider for this benefit # - # @return [Array, nil] + # @return [Array, nil] optional :frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFrequency, nil?: true] } @@ -57,7 +57,7 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel # Whether the provider supports HSA contribution limits. Empty if this feature is # not supported for the benefit. This array only has values for HSA benefits. # - # @return [Array, nil] + # @return [Array, nil] optional :hsa_contribution_limit, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::SupportedBenefit::HsaContributionLimit, @@ -67,21 +67,21 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::SupportedBenefit} for more details. + # {FinchAPI::Models::HRIS::SupportedBenefit} for more details. # # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. # # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be # - # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup + # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup # # @param description [String, nil] # - # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported + # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported # - # @param frequencies [Array] The list of frequencies supported by the provider for this benefit + # @param frequencies [Array] The list of frequencies supported by the provider for this benefit # - # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is + # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is module CompanyContribution extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/w42005.rb b/lib/finch_api/models/hris/w42005.rb index 79f5aa99..8be50f9e 100644 --- a/lib/finch_api/models/hris/w42005.rb +++ b/lib/finch_api/models/hris/w42005.rb @@ -7,13 +7,13 @@ class W42005 < FinchAPI::Internal::Type::BaseModel # @!attribute data # Detailed information specific to the 2005 W4 form. # - # @return [FinchAPI::HRIS::W42005::Data, nil] + # @return [FinchAPI::Models::HRIS::W42005::Data, nil] optional :data, -> { FinchAPI::HRIS::W42005::Data } # @!attribute type # Specifies the form type, indicating that this document is a 2005 W4 form. # - # @return [Symbol, FinchAPI::HRIS::W42005::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::W42005::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::W42005::Type } # @!attribute year @@ -26,13 +26,13 @@ class W42005 < FinchAPI::Internal::Type::BaseModel # A 2005 version of the W-4 tax form containing information on an individual's # filing status, dependents, and withholding details. # - # @param data [FinchAPI::HRIS::W42005::Data] Detailed information specific to the 2005 W4 form. + # @param data [FinchAPI::Models::HRIS::W42005::Data] Detailed information specific to the 2005 W4 form. # - # @param type [Symbol, FinchAPI::HRIS::W42005::Type] Specifies the form type, indicating that this document is a 2005 W4 form. + # @param type [Symbol, FinchAPI::Models::HRIS::W42005::Type] Specifies the form type, indicating that this document is a 2005 W4 form. # # @param year [Float, nil] The tax year this W4 document applies to. - # @see FinchAPI::HRIS::W42005#data + # @see FinchAPI::Models::HRIS::W42005#data class Data < FinchAPI::Internal::Type::BaseModel # @!attribute additional_withholding # Additional withholding amount (in cents). @@ -43,13 +43,13 @@ class Data < FinchAPI::Internal::Type::BaseModel # @!attribute exemption # Indicates exemption status from federal tax withholding. # - # @return [Symbol, FinchAPI::HRIS::W42005::Data::Exemption, nil] + # @return [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption, nil] optional :exemption, enum: -> { FinchAPI::HRIS::W42005::Data::Exemption } # @!attribute filing_status # The individual's filing status for tax purposes. # - # @return [Symbol, FinchAPI::HRIS::W42005::Data::FilingStatus, nil] + # @return [Symbol, FinchAPI::Models::HRIS::W42005::Data::FilingStatus, nil] optional :filing_status, enum: -> { FinchAPI::HRIS::W42005::Data::FilingStatus }, nil?: true # @!attribute individual_id @@ -69,9 +69,9 @@ class Data < FinchAPI::Internal::Type::BaseModel # # @param additional_withholding [Integer, nil] Additional withholding amount (in cents). # - # @param exemption [Symbol, FinchAPI::HRIS::W42005::Data::Exemption] Indicates exemption status from federal tax withholding. + # @param exemption [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption] Indicates exemption status from federal tax withholding. # - # @param filing_status [Symbol, FinchAPI::HRIS::W42005::Data::FilingStatus, nil] The individual's filing status for tax purposes. + # @param filing_status [Symbol, FinchAPI::Models::HRIS::W42005::Data::FilingStatus, nil] The individual's filing status for tax purposes. # # @param individual_id [String] The unique identifier for the individual associated with this 2005 W4 form. # @@ -79,7 +79,7 @@ class Data < FinchAPI::Internal::Type::BaseModel # Indicates exemption status from federal tax withholding. # - # @see FinchAPI::HRIS::W42005::Data#exemption + # @see FinchAPI::Models::HRIS::W42005::Data#exemption module Exemption extend FinchAPI::Internal::Type::Enum @@ -92,7 +92,7 @@ module Exemption # The individual's filing status for tax purposes. # - # @see FinchAPI::HRIS::W42005::Data#filing_status + # @see FinchAPI::Models::HRIS::W42005::Data#filing_status module FilingStatus extend FinchAPI::Internal::Type::Enum @@ -107,7 +107,7 @@ module FilingStatus # Specifies the form type, indicating that this document is a 2005 W4 form. # - # @see FinchAPI::HRIS::W42005#type + # @see FinchAPI::Models::HRIS::W42005#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/hris/w42020.rb b/lib/finch_api/models/hris/w42020.rb index f4b014f4..e7eb2346 100644 --- a/lib/finch_api/models/hris/w42020.rb +++ b/lib/finch_api/models/hris/w42020.rb @@ -7,13 +7,13 @@ class W42020 < FinchAPI::Internal::Type::BaseModel # @!attribute data # Detailed information specific to the 2020 W4 form. # - # @return [FinchAPI::HRIS::W42020::Data, nil] + # @return [FinchAPI::Models::HRIS::W42020::Data, nil] optional :data, -> { FinchAPI::HRIS::W42020::Data } # @!attribute type # Specifies the form type, indicating that this document is a 2020 W4 form. # - # @return [Symbol, FinchAPI::HRIS::W42020::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::W42020::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::W42020::Type } # @!attribute year @@ -26,13 +26,13 @@ class W42020 < FinchAPI::Internal::Type::BaseModel # A 2020 version of the W-4 tax form containing information on an individual's # filing status, dependents, and withholding details. # - # @param data [FinchAPI::HRIS::W42020::Data] Detailed information specific to the 2020 W4 form. + # @param data [FinchAPI::Models::HRIS::W42020::Data] Detailed information specific to the 2020 W4 form. # - # @param type [Symbol, FinchAPI::HRIS::W42020::Type] Specifies the form type, indicating that this document is a 2020 W4 form. + # @param type [Symbol, FinchAPI::Models::HRIS::W42020::Type] Specifies the form type, indicating that this document is a 2020 W4 form. # # @param year [Float, nil] The tax year this W4 document applies to. - # @see FinchAPI::HRIS::W42020#data + # @see FinchAPI::Models::HRIS::W42020#data class Data < FinchAPI::Internal::Type::BaseModel # @!attribute amount_for_other_dependents # Amount claimed for dependents other than qualifying children under 17 (in @@ -62,7 +62,7 @@ class Data < FinchAPI::Internal::Type::BaseModel # @!attribute filing_status # The individual's filing status for tax purposes. # - # @return [Symbol, FinchAPI::HRIS::W42020::Data::FilingStatus, nil] + # @return [Symbol, FinchAPI::Models::HRIS::W42020::Data::FilingStatus, nil] optional :filing_status, enum: -> { FinchAPI::HRIS::W42020::Data::FilingStatus }, nil?: true # @!attribute individual_id @@ -85,7 +85,7 @@ class Data < FinchAPI::Internal::Type::BaseModel # @!method initialize(amount_for_other_dependents: nil, amount_for_qualifying_children_under_17: nil, deductions: nil, extra_withholding: nil, filing_status: nil, individual_id: nil, other_income: nil, total_claim_dependent_and_other_credits: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::HRIS::W42020::Data} for more details. + # {FinchAPI::Models::HRIS::W42020::Data} for more details. # # Detailed information specific to the 2020 W4 form. # @@ -97,7 +97,7 @@ class Data < FinchAPI::Internal::Type::BaseModel # # @param extra_withholding [Integer, nil] Additional withholding amount (in cents). # - # @param filing_status [Symbol, FinchAPI::HRIS::W42020::Data::FilingStatus, nil] The individual's filing status for tax purposes. + # @param filing_status [Symbol, FinchAPI::Models::HRIS::W42020::Data::FilingStatus, nil] The individual's filing status for tax purposes. # # @param individual_id [String] The unique identifier for the individual associated with this document. # @@ -107,7 +107,7 @@ class Data < FinchAPI::Internal::Type::BaseModel # The individual's filing status for tax purposes. # - # @see FinchAPI::HRIS::W42020::Data#filing_status + # @see FinchAPI::Models::HRIS::W42020::Data#filing_status module FilingStatus extend FinchAPI::Internal::Type::Enum @@ -123,7 +123,7 @@ module FilingStatus # Specifies the form type, indicating that this document is a 2020 W4 form. # - # @see FinchAPI::HRIS::W42020#type + # @see FinchAPI::Models::HRIS::W42020#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/income.rb b/lib/finch_api/models/income.rb index 044ba2ac..5ec443d2 100644 --- a/lib/finch_api/models/income.rb +++ b/lib/finch_api/models/income.rb @@ -25,12 +25,12 @@ class Income < FinchAPI::Internal::Type::BaseModel # The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, # `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`. # - # @return [Symbol, FinchAPI::Income::Unit, nil] + # @return [Symbol, FinchAPI::Models::Income::Unit, nil] required :unit, enum: -> { FinchAPI::Income::Unit }, nil?: true # @!method initialize(amount:, currency:, effective_date:, unit:) - # Some parameter documentations has been truncated, see {FinchAPI::Income} for - # more details. + # Some parameter documentations has been truncated, see {FinchAPI::Models::Income} + # for more details. # # 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, @@ -42,12 +42,12 @@ class Income < FinchAPI::Internal::Type::BaseModel # # @param effective_date [String, nil] The date the income amount went into effect. # - # @param unit [Symbol, FinchAPI::Income::Unit, nil] The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, `semi_mon + # @param unit [Symbol, FinchAPI::Models::Income::Unit, nil] The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, `semi_mon # The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, # `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`. # - # @see FinchAPI::Income#unit + # @see FinchAPI::Models::Income#unit module Unit extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/individual_event.rb b/lib/finch_api/models/individual_event.rb index 38fededd..9a764a58 100644 --- a/lib/finch_api/models/individual_event.rb +++ b/lib/finch_api/models/individual_event.rb @@ -5,17 +5,17 @@ module Models class IndividualEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::IndividualEvent::Data, nil] + # @return [FinchAPI::Models::IndividualEvent::Data, nil] optional :data, -> { FinchAPI::IndividualEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::IndividualEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::IndividualEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::IndividualEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::IndividualEvent::Data] - # @param event_type [Symbol, FinchAPI::IndividualEvent::EventType] + # @param data [FinchAPI::Models::IndividualEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::IndividualEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id diff --git a/lib/finch_api/models/introspection.rb b/lib/finch_api/models/introspection.rb index b4805cae..bd71e471 100644 --- a/lib/finch_api/models/introspection.rb +++ b/lib/finch_api/models/introspection.rb @@ -21,7 +21,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_methods # - # @return [Array] + # @return [Array] required :authentication_methods, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Introspection::AuthenticationMethod] } @@ -34,7 +34,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @!attribute client_type # The type of application associated with a token. # - # @return [Symbol, FinchAPI::Introspection::ClientType] + # @return [Symbol, FinchAPI::Models::Introspection::ClientType] required :client_type, enum: -> { FinchAPI::Introspection::ClientType } # @!attribute company_id @@ -54,7 +54,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @!attribute connection_status # - # @return [FinchAPI::Introspection::ConnectionStatus] + # @return [FinchAPI::Models::Introspection::ConnectionStatus] required :connection_status, -> { FinchAPI::Introspection::ConnectionStatus } # @!attribute connection_type @@ -63,7 +63,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # - `provider` - connection to an external provider # - `finch` - finch-generated data. # - # @return [Symbol, FinchAPI::Introspection::ConnectionType] + # @return [Symbol, FinchAPI::Models::Introspection::ConnectionType] required :connection_type, enum: -> { FinchAPI::Introspection::ConnectionType } # @!attribute customer_email @@ -123,26 +123,26 @@ class Introspection < FinchAPI::Internal::Type::BaseModel required :username, String # @!method initialize(id:, account_id:, authentication_methods:, client_id:, client_type:, company_id:, connection_id:, connection_status:, connection_type:, customer_email:, customer_id:, customer_name:, manual:, payroll_provider_id:, products:, provider_id:, username:) - # Some parameter documentations has been truncated, see {FinchAPI::Introspection} - # for more details. + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Introspection} for more details. # # @param id [String] The Finch UUID of the token being introspected. # # @param account_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins # - # @param authentication_methods [Array] + # @param authentication_methods [Array] # # @param client_id [String] The client ID of the application associated with the `access_token`. # - # @param client_type [Symbol, FinchAPI::Introspection::ClientType] The type of application associated with a token. + # @param client_type [Symbol, FinchAPI::Models::Introspection::ClientType] The type of application associated with a token. # # @param company_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins # # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`. # - # @param connection_status [FinchAPI::Introspection::ConnectionStatus] + # @param connection_status [FinchAPI::Models::Introspection::ConnectionStatus] # - # @param connection_type [Symbol, FinchAPI::Introspection::ConnectionType] The type of the connection associated with the token. + # @param connection_type [Symbol, FinchAPI::Models::Introspection::ConnectionType] The type of the connection associated with the token. # # @param customer_email [String, nil] The email of your customer you provided to Finch when a connect session was crea # @@ -163,7 +163,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # @!attribute connection_status # - # @return [FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus, nil] + # @return [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus, nil] optional :connection_status, -> { FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus } # @!attribute products @@ -175,17 +175,17 @@ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of authentication method. # - # @return [Symbol, FinchAPI::Introspection::AuthenticationMethod::Type, nil] + # @return [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type, nil] optional :type, enum: -> { FinchAPI::Introspection::AuthenticationMethod::Type } # @!method initialize(connection_status: nil, products: nil, type: nil) - # @param connection_status [FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus] + # @param connection_status [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus] # # @param products [Array] An array of the authorized products associated with the `access_token`. # - # @param type [Symbol, FinchAPI::Introspection::AuthenticationMethod::Type] The type of authentication method. + # @param type [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type] The type of authentication method. - # @see FinchAPI::Introspection::AuthenticationMethod#connection_status + # @see FinchAPI::Models::Introspection::AuthenticationMethod#connection_status class ConnectionStatus < FinchAPI::Internal::Type::BaseModel # @!attribute message # @@ -194,17 +194,17 @@ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel # @!attribute status # - # @return [Symbol, FinchAPI::ConnectionStatusType, nil] + # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil] optional :status, enum: -> { FinchAPI::ConnectionStatusType } # @!method initialize(message: nil, status: nil) # @param message [String] - # @param status [Symbol, FinchAPI::ConnectionStatusType] + # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] end # The type of authentication method. # - # @see FinchAPI::Introspection::AuthenticationMethod#type + # @see FinchAPI::Models::Introspection::AuthenticationMethod#type module Type extend FinchAPI::Internal::Type::Enum @@ -221,7 +221,7 @@ module Type # The type of application associated with a token. # - # @see FinchAPI::Introspection#client_type + # @see FinchAPI::Models::Introspection#client_type module ClientType extend FinchAPI::Internal::Type::Enum @@ -233,7 +233,7 @@ module ClientType # @return [Array] end - # @see FinchAPI::Introspection#connection_status + # @see FinchAPI::Models::Introspection#connection_status class ConnectionStatus < FinchAPI::Internal::Type::BaseModel # @!attribute last_successful_sync # The datetime when the connection was last successfully synced. @@ -248,7 +248,7 @@ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel # @!attribute status # - # @return [Symbol, FinchAPI::ConnectionStatusType, nil] + # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil] optional :status, enum: -> { FinchAPI::ConnectionStatusType } # @!method initialize(last_successful_sync: nil, message: nil, status: nil) @@ -256,7 +256,7 @@ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel # # @param message [String] # - # @param status [Symbol, FinchAPI::ConnectionStatusType] + # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] end # The type of the connection associated with the token. @@ -264,7 +264,7 @@ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel # - `provider` - connection to an external provider # - `finch` - finch-generated data. # - # @see FinchAPI::Introspection#connection_type + # @see FinchAPI::Models::Introspection#connection_type module ConnectionType extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/job_completion_event.rb b/lib/finch_api/models/job_completion_event.rb index 39ce0291..1ef8bf2a 100644 --- a/lib/finch_api/models/job_completion_event.rb +++ b/lib/finch_api/models/job_completion_event.rb @@ -5,17 +5,17 @@ module Models class JobCompletionEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::JobCompletionEvent::Data, nil] + # @return [FinchAPI::Models::JobCompletionEvent::Data, nil] optional :data, -> { FinchAPI::JobCompletionEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::JobCompletionEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::JobCompletionEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::JobCompletionEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::JobCompletionEvent::Data] - # @param event_type [Symbol, FinchAPI::JobCompletionEvent::EventType] + # @param data [FinchAPI::Models::JobCompletionEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::JobCompletionEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute job_id diff --git a/lib/finch_api/models/jobs/automated_async_job.rb b/lib/finch_api/models/jobs/automated_async_job.rb index 39bd779a..561cb133 100644 --- a/lib/finch_api/models/jobs/automated_async_job.rb +++ b/lib/finch_api/models/jobs/automated_async_job.rb @@ -34,7 +34,7 @@ class AutomatedAsyncJob < FinchAPI::Internal::Type::BaseModel # @!attribute params # The input parameters for the job. # - # @return [FinchAPI::Jobs::AutomatedAsyncJob::Params, nil] + # @return [FinchAPI::Models::Jobs::AutomatedAsyncJob::Params, nil] required :params, -> { FinchAPI::Jobs::AutomatedAsyncJob::Params }, nil?: true # @!attribute scheduled_at @@ -53,18 +53,18 @@ class AutomatedAsyncJob < FinchAPI::Internal::Type::BaseModel # @!attribute status # - # @return [Symbol, FinchAPI::Jobs::AutomatedAsyncJob::Status] + # @return [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status] required :status, enum: -> { FinchAPI::Jobs::AutomatedAsyncJob::Status } # @!attribute type # The type of automated job # - # @return [Symbol, FinchAPI::Jobs::AutomatedAsyncJob::Type] + # @return [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type] required :type, enum: -> { FinchAPI::Jobs::AutomatedAsyncJob::Type } # @!method initialize(completed_at:, created_at:, job_id:, job_url:, params:, scheduled_at:, started_at:, status:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Jobs::AutomatedAsyncJob} for more details. + # {FinchAPI::Models::Jobs::AutomatedAsyncJob} for more details. # # @param completed_at [Time, nil] The datetime the job completed. # @@ -74,17 +74,17 @@ class AutomatedAsyncJob < FinchAPI::Internal::Type::BaseModel # # @param job_url [String] The url that can be used to retrieve the job status # - # @param params [FinchAPI::Jobs::AutomatedAsyncJob::Params, nil] The input parameters for the job. + # @param params [FinchAPI::Models::Jobs::AutomatedAsyncJob::Params, nil] The input parameters for the job. # # @param scheduled_at [Time, nil] The datetime a job is scheduled to be run. For scheduled jobs, this datetime can # # @param started_at [Time, nil] The datetime a job entered into the job queue. # - # @param status [Symbol, FinchAPI::Jobs::AutomatedAsyncJob::Status] + # @param status [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status] # - # @param type [Symbol, FinchAPI::Jobs::AutomatedAsyncJob::Type] The type of automated job + # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type] The type of automated job - # @see FinchAPI::Jobs::AutomatedAsyncJob#params + # @see FinchAPI::Models::Jobs::AutomatedAsyncJob#params class Params < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id # The ID of the individual that the job was completed for. @@ -98,7 +98,7 @@ class Params < FinchAPI::Internal::Type::BaseModel # @param individual_id [String] The ID of the individual that the job was completed for. end - # @see FinchAPI::Jobs::AutomatedAsyncJob#status + # @see FinchAPI::Models::Jobs::AutomatedAsyncJob#status module Status extend FinchAPI::Internal::Type::Enum @@ -115,7 +115,7 @@ module Status # The type of automated job # - # @see FinchAPI::Jobs::AutomatedAsyncJob#type + # @see FinchAPI::Models::Jobs::AutomatedAsyncJob#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/jobs/automated_create_params.rb b/lib/finch_api/models/jobs/automated_create_params.rb index 568e6852..e1568c6a 100644 --- a/lib/finch_api/models/jobs/automated_create_params.rb +++ b/lib/finch_api/models/jobs/automated_create_params.rb @@ -11,18 +11,18 @@ class AutomatedCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of job to start. # - # @return [Symbol, FinchAPI::Jobs::AutomatedCreateParams::Type] + # @return [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] required :type, enum: -> { FinchAPI::Jobs::AutomatedCreateParams::Type } # @!attribute params # - # @return [FinchAPI::Jobs::AutomatedCreateParams::Params] + # @return [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] required :params, -> { FinchAPI::Jobs::AutomatedCreateParams::Params } # @!method initialize(type:, params:, request_options: {}) - # @param type [Symbol, FinchAPI::Jobs::AutomatedCreateParams::Type] The type of job to start. + # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] The type of job to start. # - # @param params [FinchAPI::Jobs::AutomatedCreateParams::Params] + # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/jobs/automated_list_response.rb b/lib/finch_api/models/jobs/automated_list_response.rb index 984291c6..58ce5004 100644 --- a/lib/finch_api/models/jobs/automated_list_response.rb +++ b/lib/finch_api/models/jobs/automated_list_response.rb @@ -7,7 +7,7 @@ module Jobs class AutomatedListResponse < FinchAPI::Internal::Type::BaseModel # @!attribute data # - # @return [Array] + # @return [Array] required :data, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Jobs::AutomatedAsyncJob] } # @!attribute meta @@ -16,7 +16,7 @@ class AutomatedListResponse < FinchAPI::Internal::Type::BaseModel required :meta, -> { FinchAPI::Models::Jobs::AutomatedListResponse::Meta } # @!method initialize(data:, meta:) - # @param data [Array] + # @param data [Array] # @param meta [FinchAPI::Models::Jobs::AutomatedListResponse::Meta] # @see FinchAPI::Models::Jobs::AutomatedListResponse#meta diff --git a/lib/finch_api/models/jobs/manual_async_job.rb b/lib/finch_api/models/jobs/manual_async_job.rb index b7bc7d1e..3de53151 100644 --- a/lib/finch_api/models/jobs/manual_async_job.rb +++ b/lib/finch_api/models/jobs/manual_async_job.rb @@ -18,7 +18,7 @@ class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel # @!attribute status # - # @return [Symbol, FinchAPI::Jobs::ManualAsyncJob::Status] + # @return [Symbol, FinchAPI::Models::Jobs::ManualAsyncJob::Status] required :status, enum: -> { FinchAPI::Jobs::ManualAsyncJob::Status } # @!method initialize(body:, job_id:, status:) @@ -26,9 +26,9 @@ class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel # # @param job_id [String] # - # @param status [Symbol, FinchAPI::Jobs::ManualAsyncJob::Status] + # @param status [Symbol, FinchAPI::Models::Jobs::ManualAsyncJob::Status] - # @see FinchAPI::Jobs::ManualAsyncJob#status + # @see FinchAPI::Models::Jobs::ManualAsyncJob#status module Status extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/operation_support_matrix.rb b/lib/finch_api/models/operation_support_matrix.rb index 973c1c6e..14b7cca3 100644 --- a/lib/finch_api/models/operation_support_matrix.rb +++ b/lib/finch_api/models/operation_support_matrix.rb @@ -12,7 +12,7 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # - `client_access_only`: This behavior is supported by the provider, but only # available to the client and not to Finch # - # @return [Symbol, FinchAPI::OperationSupport, nil] + # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :create, enum: -> { FinchAPI::OperationSupport } # @!attribute delete @@ -24,7 +24,7 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # - `client_access_only`: This behavior is supported by the provider, but only # available to the client and not to Finch # - # @return [Symbol, FinchAPI::OperationSupport, nil] + # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :delete, enum: -> { FinchAPI::OperationSupport } # @!attribute read @@ -36,7 +36,7 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # - `client_access_only`: This behavior is supported by the provider, but only # available to the client and not to Finch # - # @return [Symbol, FinchAPI::OperationSupport, nil] + # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :read, enum: -> { FinchAPI::OperationSupport } # @!attribute update @@ -48,20 +48,20 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # - `client_access_only`: This behavior is supported by the provider, but only # available to the client and not to Finch # - # @return [Symbol, FinchAPI::OperationSupport, nil] + # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :update, enum: -> { FinchAPI::OperationSupport } # @!method initialize(create: nil, delete: nil, read: nil, update: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::OperationSupportMatrix} for more details. + # {FinchAPI::Models::OperationSupportMatrix} for more details. # - # @param create [Symbol, FinchAPI::OperationSupport] - `supported`: This operation is supported by both the provider and Finch + # @param create [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch # - # @param delete [Symbol, FinchAPI::OperationSupport] - `supported`: This operation is supported by both the provider and Finch + # @param delete [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch # - # @param read [Symbol, FinchAPI::OperationSupport] - `supported`: This operation is supported by both the provider and Finch + # @param read [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch # - # @param update [Symbol, FinchAPI::OperationSupport] - `supported`: This operation is supported by both the provider and Finch + # @param update [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch end end end diff --git a/lib/finch_api/models/pay_statement_event.rb b/lib/finch_api/models/pay_statement_event.rb index 9a9e4296..e2656b72 100644 --- a/lib/finch_api/models/pay_statement_event.rb +++ b/lib/finch_api/models/pay_statement_event.rb @@ -5,17 +5,17 @@ module Models class PayStatementEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::PayStatementEvent::Data, nil] + # @return [FinchAPI::Models::PayStatementEvent::Data, nil] optional :data, -> { FinchAPI::PayStatementEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::PayStatementEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::PayStatementEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::PayStatementEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::PayStatementEvent::Data] - # @param event_type [Symbol, FinchAPI::PayStatementEvent::EventType] + # @param data [FinchAPI::Models::PayStatementEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::PayStatementEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id diff --git a/lib/finch_api/models/payment_event.rb b/lib/finch_api/models/payment_event.rb index 1f80f099..d66c6cab 100644 --- a/lib/finch_api/models/payment_event.rb +++ b/lib/finch_api/models/payment_event.rb @@ -5,17 +5,17 @@ module Models class PaymentEvent < FinchAPI::Models::BaseWebhookEvent # @!attribute data # - # @return [FinchAPI::PaymentEvent::Data, nil] + # @return [FinchAPI::Models::PaymentEvent::Data, nil] optional :data, -> { FinchAPI::PaymentEvent::Data } # @!attribute event_type # - # @return [Symbol, FinchAPI::PaymentEvent::EventType, nil] + # @return [Symbol, FinchAPI::Models::PaymentEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::PaymentEvent::EventType } # @!method initialize(data: nil, event_type: nil) - # @param data [FinchAPI::PaymentEvent::Data] - # @param event_type [Symbol, FinchAPI::PaymentEvent::EventType] + # @param data [FinchAPI::Models::PaymentEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::PaymentEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute pay_date diff --git a/lib/finch_api/models/provider.rb b/lib/finch_api/models/provider.rb index 10819aad..c7e0351a 100644 --- a/lib/finch_api/models/provider.rb +++ b/lib/finch_api/models/provider.rb @@ -13,7 +13,7 @@ class Provider < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_methods # The list of authentication methods supported by the provider. # - # @return [Array, nil] + # @return [Array, nil] optional :authentication_methods, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Provider::AuthenticationMethod] } @@ -68,12 +68,12 @@ class Provider < FinchAPI::Internal::Type::BaseModel optional :products, FinchAPI::Internal::Type::ArrayOf[String] # @!method initialize(id: nil, authentication_methods: nil, beta: nil, display_name: nil, icon: nil, logo: nil, manual: nil, mfa_required: nil, primary_color: nil, products: nil) - # Some parameter documentations has been truncated, see {FinchAPI::Provider} for - # more details. + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Provider} for more details. # # @param id [String] The id of the payroll provider used in Connect. # - # @param authentication_methods [Array] The list of authentication methods supported by the provider. + # @param authentication_methods [Array] The list of authentication methods supported by the provider. # # @param beta [Boolean] `true` if the integration is in a beta state, `false` otherwise # @@ -96,13 +96,13 @@ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # Each benefit type and their supported features. If the benefit type is not # supported, the property will be null # - # @return [FinchAPI::HRIS::BenefitsSupport, nil] + # @return [FinchAPI::Models::HRIS::BenefitsSupport, nil] optional :benefits_support, -> { FinchAPI::HRIS::BenefitsSupport }, nil?: true # @!attribute supported_fields # The supported data fields returned by our HR and payroll endpoints # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields, nil] optional :supported_fields, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields @@ -112,49 +112,49 @@ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of authentication method. # - # @return [Symbol, FinchAPI::Provider::AuthenticationMethod::Type, nil] + # @return [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type, nil] optional :type, enum: -> { FinchAPI::Provider::AuthenticationMethod::Type } # @!method initialize(benefits_support: nil, supported_fields: nil, type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Provider::AuthenticationMethod} for more details. + # {FinchAPI::Models::Provider::AuthenticationMethod} for more details. # - # @param benefits_support [FinchAPI::HRIS::BenefitsSupport, nil] Each benefit type and their supported features. If the benefit type is not suppo + # @param benefits_support [FinchAPI::Models::HRIS::BenefitsSupport, nil] Each benefit type and their supported features. If the benefit type is not suppo # - # @param supported_fields [FinchAPI::Provider::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints + # @param supported_fields [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints # - # @param type [Symbol, FinchAPI::Provider::AuthenticationMethod::Type] The type of authentication method. + # @param type [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type] The type of authentication method. - # @see FinchAPI::Provider::AuthenticationMethod#supported_fields + # @see FinchAPI::Models::Provider::AuthenticationMethod#supported_fields class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute company # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company, nil] optional :company, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company } # @!attribute directory # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory, nil] optional :directory, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory } # @!attribute employment # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment, nil] optional :employment, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment } # @!attribute individual # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual, nil] optional :individual, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual } # @!attribute pay_group # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayGroup, nil] optional :pay_group, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup } # @!attribute pay_statement # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement, nil] optional :pay_statement, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement @@ -162,21 +162,21 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute payment # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment, nil] optional :payment, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment } # @!method initialize(company: nil, directory: nil, employment: nil, individual: nil, pay_group: nil, pay_statement: nil, payment: nil) # The supported data fields returned by our HR and payroll endpoints # - # @param company [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company] - # @param directory [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory] - # @param employment [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment] - # @param individual [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual] - # @param pay_group [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup] - # @param pay_statement [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement] - # @param payment [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment] - - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#company + # @param company [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company] + # @param directory [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory] + # @param employment [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment] + # @param individual [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual] + # @param pay_group [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayGroup] + # @param pay_statement [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement] + # @param payment [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment] + + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#company class Company < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -185,7 +185,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute accounts # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, nil] optional :accounts, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts @@ -193,7 +193,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute departments # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments, nil] optional :departments, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments } @@ -204,7 +204,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute entity # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity, nil] optional :entity, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity @@ -217,7 +217,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute locations # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations, nil] optional :locations, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations @@ -235,16 +235,16 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!method initialize(id: nil, accounts: nil, departments: nil, ein: nil, entity: nil, legal_name: nil, locations: nil, primary_email: nil, primary_phone_number: nil) # @param id [Boolean] - # @param accounts [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts] - # @param departments [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments] + # @param accounts [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts] + # @param departments [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments] # @param ein [Boolean] - # @param entity [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity] + # @param entity [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity] # @param legal_name [Boolean] - # @param locations [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations] + # @param locations [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations] # @param primary_email [Boolean] # @param primary_phone_number [Boolean] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company#accounts + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#accounts class Accounts < FinchAPI::Internal::Type::BaseModel # @!attribute account_name # @@ -279,7 +279,7 @@ class Accounts < FinchAPI::Internal::Type::BaseModel # @param routing_number [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company#departments + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#departments class Departments < FinchAPI::Internal::Type::BaseModel # @!attribute name # @@ -288,7 +288,7 @@ class Departments < FinchAPI::Internal::Type::BaseModel # @!attribute parent # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] optional :parent, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent @@ -296,9 +296,9 @@ class Departments < FinchAPI::Internal::Type::BaseModel # @!method initialize(name: nil, parent: nil) # @param name [Boolean] - # @param parent [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent] + # @param parent [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments#parent + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments#parent class Parent < FinchAPI::Internal::Type::BaseModel # @!attribute name # @@ -310,7 +310,7 @@ class Parent < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company#entity + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#entity class Entity < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # @@ -327,7 +327,7 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company#locations + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#locations class Locations < FinchAPI::Internal::Type::BaseModel # @!attribute city # @@ -369,27 +369,27 @@ class Locations < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#directory + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#directory class Directory < FinchAPI::Internal::Type::BaseModel # @!attribute individuals # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] optional :individuals, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals } # @!attribute paging # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging, nil] optional :paging, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging } # @!method initialize(individuals: nil, paging: nil) - # @param individuals [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals] - # @param paging [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging] + # @param individuals [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals] + # @param paging [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory#individuals + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory#individuals class Individuals < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -418,7 +418,7 @@ class Individuals < FinchAPI::Internal::Type::BaseModel # @!attribute manager # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] optional :manager, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager @@ -435,10 +435,10 @@ class Individuals < FinchAPI::Internal::Type::BaseModel # @param first_name [Boolean] # @param is_active [Boolean] # @param last_name [Boolean] - # @param manager [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] + # @param manager [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] # @param middle_name [Boolean] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals#manager + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -450,7 +450,7 @@ class Manager < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory#paging + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory#paging class Paging < FinchAPI::Internal::Type::BaseModel # @!attribute count # @@ -468,7 +468,7 @@ class Paging < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#employment + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -487,13 +487,13 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute department # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Department, nil] optional :department, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department } # @!attribute employment # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, nil] optional :employment, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment } @@ -514,7 +514,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute income # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income, nil] optional :income, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income @@ -537,7 +537,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute location # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location, nil] optional :location, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location @@ -545,7 +545,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute manager # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, nil] optional :manager, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager @@ -570,22 +570,22 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @param id [Boolean] # @param class_code [Boolean] # @param custom_fields [Boolean] - # @param department [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department] - # @param employment [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment] + # @param department [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Department] + # @param employment [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Employment] # @param employment_status [Boolean] # @param end_date [Boolean] # @param first_name [Boolean] - # @param income [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income] + # @param income [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income] # @param income_history [Boolean] # @param is_active [Boolean] # @param last_name [Boolean] - # @param location [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location] - # @param manager [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager] + # @param location [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location] + # @param manager [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager] # @param middle_name [Boolean] # @param start_date [Boolean] # @param title [Boolean] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment#department + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#department class Department < FinchAPI::Internal::Type::BaseModel # @!attribute name # @@ -596,7 +596,7 @@ class Department < FinchAPI::Internal::Type::BaseModel # @param name [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment#employment + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # @@ -613,7 +613,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment#income + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#income class Income < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -636,7 +636,7 @@ class Income < FinchAPI::Internal::Type::BaseModel # @param unit [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment#location + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#location class Location < FinchAPI::Internal::Type::BaseModel # @!attribute city # @@ -677,7 +677,7 @@ class Location < FinchAPI::Internal::Type::BaseModel # @param state [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment#manager + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -689,7 +689,7 @@ class Manager < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#individual + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#individual class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -703,7 +703,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute emails # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, nil] optional :emails, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails @@ -741,7 +741,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute phone_numbers # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] optional :phone_numbers, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers @@ -754,7 +754,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute residence # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, nil] optional :residence, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence } @@ -766,19 +766,19 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!method initialize(id: nil, dob: nil, emails: nil, encrypted_ssn: nil, ethnicity: nil, first_name: nil, gender: nil, last_name: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, ssn: nil) # @param id [Boolean] # @param dob [Boolean] - # @param emails [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails] + # @param emails [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails] # @param encrypted_ssn [Boolean] # @param ethnicity [Boolean] # @param first_name [Boolean] # @param gender [Boolean] # @param last_name [Boolean] # @param middle_name [Boolean] - # @param phone_numbers [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] + # @param phone_numbers [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] # @param preferred_name [Boolean] - # @param residence [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence] + # @param residence [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence] # @param ssn [Boolean] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual#emails + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual#emails class Emails < FinchAPI::Internal::Type::BaseModel # @!attribute data # @@ -795,7 +795,7 @@ class Emails < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual#phone_numbers + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual#phone_numbers class PhoneNumbers < FinchAPI::Internal::Type::BaseModel # @!attribute data # @@ -812,7 +812,7 @@ class PhoneNumbers < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual#residence + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual#residence class Residence < FinchAPI::Internal::Type::BaseModel # @!attribute city # @@ -854,7 +854,7 @@ class Residence < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#pay_group + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#pay_group class PayGroup < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -883,11 +883,11 @@ class PayGroup < FinchAPI::Internal::Type::BaseModel # @param pay_frequencies [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#pay_statement + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#pay_statement class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute paging # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] optional :paging, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging @@ -895,17 +895,17 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute pay_statements # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] optional :pay_statements, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements } # @!method initialize(paging: nil, pay_statements: nil) - # @param paging [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # @param pay_statements [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] + # @param paging [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging] + # @param pay_statements [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement#paging + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement#paging class Paging < FinchAPI::Internal::Type::BaseModel # @!attribute count # @@ -922,11 +922,11 @@ class Paging < FinchAPI::Internal::Type::BaseModel # @param offset [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement#pay_statements + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement#pay_statements class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute earnings # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] optional :earnings, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings @@ -934,7 +934,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute employee_deductions # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] optional :employee_deductions, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions @@ -942,7 +942,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute employer_contributions # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] optional :employer_contributions, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions @@ -970,7 +970,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # @!attribute taxes # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] optional :taxes, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes @@ -987,18 +987,18 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel optional :type, FinchAPI::Internal::Type::Boolean # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) - # @param earnings [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] - # @param employee_deductions [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] - # @param employer_contributions [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] + # @param earnings [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] + # @param employee_deductions [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] + # @param employer_contributions [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] # @param gross_pay [Boolean] # @param individual_id [Boolean] # @param net_pay [Boolean] # @param payment_method [Boolean] - # @param taxes [FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] + # @param taxes [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] # @param total_hours [Boolean] # @param type [Boolean] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#earnings + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#earnings class Earnings < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1027,7 +1027,7 @@ class Earnings < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employee_deductions + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employee_deductions class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1062,7 +1062,7 @@ class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel # @param type [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employer_contributions + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employer_contributions class EmployerContributions < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1085,7 +1085,7 @@ class EmployerContributions < FinchAPI::Internal::Type::BaseModel # @param name [Boolean] end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#taxes + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#taxes class Taxes < FinchAPI::Internal::Type::BaseModel # @!attribute amount # @@ -1122,7 +1122,7 @@ class Taxes < FinchAPI::Internal::Type::BaseModel end end - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields#payment + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#payment class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute id # @@ -1181,7 +1181,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute pay_period # - # @return [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] + # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] optional :pay_period, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod @@ -1199,9 +1199,9 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @param pay_date [Boolean] # @param pay_frequencies [Boolean] # @param pay_group_ids [Boolean] - # @param pay_period [FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod] + # @param pay_period [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod] - # @see FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment#pay_period + # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment#pay_period class PayPeriod < FinchAPI::Internal::Type::BaseModel # @!attribute end_date # @@ -1222,7 +1222,7 @@ class PayPeriod < FinchAPI::Internal::Type::BaseModel # The type of authentication method. # - # @see FinchAPI::Provider::AuthenticationMethod#type + # @see FinchAPI::Models::Provider::AuthenticationMethod#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/sandbox/company_update_params.rb b/lib/finch_api/models/sandbox/company_update_params.rb index 6bd77474..aa2e5449 100644 --- a/lib/finch_api/models/sandbox/company_update_params.rb +++ b/lib/finch_api/models/sandbox/company_update_params.rb @@ -11,7 +11,7 @@ class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute accounts # An array of bank account objects associated with the payroll/HRIS system. # - # @return [Array, nil] + # @return [Array, nil] required :accounts, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::CompanyUpdateParams::Account] }, nil?: true @@ -19,7 +19,7 @@ class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute departments # The array of company departments. # - # @return [Array, nil] + # @return [Array, nil] required :departments, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::CompanyUpdateParams::Department, @@ -36,7 +36,7 @@ class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute entity # The entity type object. # - # @return [FinchAPI::Sandbox::CompanyUpdateParams::Entity, nil] + # @return [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] required :entity, -> { FinchAPI::Sandbox::CompanyUpdateParams::Entity }, nil?: true # @!attribute legal_name @@ -47,7 +47,7 @@ class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute locations # - # @return [Array, nil] + # @return [Array, nil] required :locations, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Location, nil?: true] @@ -71,17 +71,17 @@ class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::CompanyUpdateParams} for more details. # - # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. # - # @param departments [Array, nil] The array of company departments. + # @param departments [Array, nil] The array of company departments. # # @param ein [String, nil] The employer identification number. # - # @param entity [FinchAPI::Sandbox::CompanyUpdateParams::Entity, nil] The entity type object. + # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] The entity type object. # # @param legal_name [String, nil] The legal name of the company. # - # @param locations [Array, nil] + # @param locations [Array, nil] # # @param primary_email [String, nil] The email of the main administrator on the account. # @@ -105,7 +105,7 @@ class Account < FinchAPI::Internal::Type::BaseModel # @!attribute account_type # The type of bank account. # - # @return [Symbol, FinchAPI::Sandbox::CompanyUpdateParams::Account::AccountType, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType, nil] optional :account_type, enum: -> { FinchAPI::Sandbox::CompanyUpdateParams::Account::AccountType }, nil?: true @@ -125,13 +125,13 @@ class Account < FinchAPI::Internal::Type::BaseModel # @!method initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::CompanyUpdateParams::Account} for more details. + # {FinchAPI::Models::Sandbox::CompanyUpdateParams::Account} for more details. # # @param account_name [String, nil] The name of the bank associated in the payroll/HRIS system. # # @param account_number [String, nil] 10-12 digit number to specify the bank account # - # @param account_type [Symbol, FinchAPI::Sandbox::CompanyUpdateParams::Account::AccountType, nil] The type of bank account. + # @param account_type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType, nil] The type of bank account. # # @param institution_name [String, nil] Name of the banking institution. # @@ -139,7 +139,7 @@ class Account < FinchAPI::Internal::Type::BaseModel # The type of bank account. # - # @see FinchAPI::Sandbox::CompanyUpdateParams::Account#account_type + # @see FinchAPI::Models::Sandbox::CompanyUpdateParams::Account#account_type module AccountType extend FinchAPI::Internal::Type::Enum @@ -161,15 +161,15 @@ class Department < FinchAPI::Internal::Type::BaseModel # @!attribute parent # The parent department, if present. # - # @return [FinchAPI::Sandbox::CompanyUpdateParams::Department::Parent, nil] + # @return [FinchAPI::Models::Sandbox::CompanyUpdateParams::Department::Parent, nil] optional :parent, -> { FinchAPI::Sandbox::CompanyUpdateParams::Department::Parent }, nil?: true # @!method initialize(name: nil, parent: nil) # @param name [String, nil] The department name. # - # @param parent [FinchAPI::Sandbox::CompanyUpdateParams::Department::Parent, nil] The parent department, if present. + # @param parent [FinchAPI::Models::Sandbox::CompanyUpdateParams::Department::Parent, nil] The parent department, if present. - # @see FinchAPI::Sandbox::CompanyUpdateParams::Department#parent + # @see FinchAPI::Models::Sandbox::CompanyUpdateParams::Department#parent class Parent < FinchAPI::Internal::Type::BaseModel # @!attribute name # The parent department's name. @@ -188,25 +188,25 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # The tax payer subtype of the company. # - # @return [Symbol, FinchAPI::Sandbox::CompanyUpdateParams::Entity::Subtype, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype, nil] optional :subtype, enum: -> { FinchAPI::Sandbox::CompanyUpdateParams::Entity::Subtype }, nil?: true # @!attribute type # The tax payer type of the company. # - # @return [Symbol, FinchAPI::Sandbox::CompanyUpdateParams::Entity::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::CompanyUpdateParams::Entity::Type }, nil?: true # @!method initialize(subtype: nil, type: nil) # The entity type object. # - # @param subtype [Symbol, FinchAPI::Sandbox::CompanyUpdateParams::Entity::Subtype, nil] The tax payer subtype of the company. + # @param subtype [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype, nil] The tax payer subtype of the company. # - # @param type [Symbol, FinchAPI::Sandbox::CompanyUpdateParams::Entity::Type, nil] The tax payer type of the company. + # @param type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type, nil] The tax payer type of the company. # The tax payer subtype of the company. # - # @see FinchAPI::Sandbox::CompanyUpdateParams::Entity#subtype + # @see FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity#subtype module Subtype extend FinchAPI::Internal::Type::Enum @@ -220,7 +220,7 @@ module Subtype # The tax payer type of the company. # - # @see FinchAPI::Sandbox::CompanyUpdateParams::Entity#type + # @see FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/sandbox/company_update_response.rb b/lib/finch_api/models/sandbox/company_update_response.rb index f0a30c44..bfbc563b 100644 --- a/lib/finch_api/models/sandbox/company_update_response.rb +++ b/lib/finch_api/models/sandbox/company_update_response.rb @@ -41,7 +41,7 @@ class CompanyUpdateResponse < FinchAPI::Internal::Type::BaseModel # @!attribute locations # - # @return [Array, nil] + # @return [Array, nil] required :locations, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Location, nil?: true] @@ -75,7 +75,7 @@ class CompanyUpdateResponse < FinchAPI::Internal::Type::BaseModel # # @param legal_name [String, nil] The legal name of the company. # - # @param locations [Array, nil] + # @param locations [Array, nil] # # @param primary_email [String, nil] The email of the main administrator on the account. # diff --git a/lib/finch_api/models/sandbox/connection_create_params.rb b/lib/finch_api/models/sandbox/connection_create_params.rb index 9c431290..d2e22e01 100644 --- a/lib/finch_api/models/sandbox/connection_create_params.rb +++ b/lib/finch_api/models/sandbox/connection_create_params.rb @@ -16,7 +16,7 @@ class ConnectionCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_type # - # @return [Symbol, FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType, nil] optional :authentication_type, enum: -> { FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType @@ -41,7 +41,7 @@ class ConnectionCreateParams < FinchAPI::Internal::Type::BaseModel # # @param provider_id [String] The provider associated with the connection # - # @param authentication_type [Symbol, FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType] + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType] # # @param employee_size [Integer] Optional: the size of the employer to be created with this connection. Defaults # diff --git a/lib/finch_api/models/sandbox/connections/account_create_params.rb b/lib/finch_api/models/sandbox/connections/account_create_params.rb index bda504fe..3191bf5f 100644 --- a/lib/finch_api/models/sandbox/connections/account_create_params.rb +++ b/lib/finch_api/models/sandbox/connections/account_create_params.rb @@ -22,7 +22,7 @@ class AccountCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_type # - # @return [Symbol, FinchAPI::Sandbox::Connections::AccountCreateParams::AuthenticationType, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType, nil] optional :authentication_type, enum: -> { FinchAPI::Sandbox::Connections::AccountCreateParams::AuthenticationType } @@ -41,7 +41,7 @@ class AccountCreateParams < FinchAPI::Internal::Type::BaseModel # # @param provider_id [String] The provider associated with the `access_token` # - # @param authentication_type [Symbol, FinchAPI::Sandbox::Connections::AccountCreateParams::AuthenticationType] + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType] # # @param products [Array] Optional, defaults to Organization products (`company`, `directory`, `employment # diff --git a/lib/finch_api/models/sandbox/connections/account_update_params.rb b/lib/finch_api/models/sandbox/connections/account_update_params.rb index 273e6924..dea8bf09 100644 --- a/lib/finch_api/models/sandbox/connections/account_update_params.rb +++ b/lib/finch_api/models/sandbox/connections/account_update_params.rb @@ -11,11 +11,11 @@ class AccountUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute connection_status # - # @return [Symbol, FinchAPI::ConnectionStatusType, nil] + # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil] optional :connection_status, enum: -> { FinchAPI::ConnectionStatusType } # @!method initialize(connection_status: nil, request_options: {}) - # @param connection_status [Symbol, FinchAPI::ConnectionStatusType] + # @param connection_status [Symbol, FinchAPI::Models::ConnectionStatusType] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/sandbox/directory_create_params.rb b/lib/finch_api/models/sandbox/directory_create_params.rb index fd1ae460..bc57710e 100644 --- a/lib/finch_api/models/sandbox/directory_create_params.rb +++ b/lib/finch_api/models/sandbox/directory_create_params.rb @@ -12,7 +12,7 @@ class DirectoryCreateParams < FinchAPI::Internal::Type::BaseModel # Array of individuals to create. Takes all combined fields from `/individual` and # `/employment` endpoints. All fields are optional. # - # @return [Array, nil] + # @return [Array, nil] optional :body, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::DirectoryCreateParams::Body] @@ -22,7 +22,7 @@ class DirectoryCreateParams < FinchAPI::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::DirectoryCreateParams} for more details. # - # @param body [Array] Array of individuals to create. Takes all combined fields from `/individual` and + # @param body [Array] Array of individuals to create. Takes all combined fields from `/individual` and # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] @@ -38,7 +38,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # employer in the system. Custom fields are not currently supported for assisted # connections. # - # @return [Array, nil] + # @return [Array, nil] optional :custom_fields, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::DirectoryCreateParams::Body::CustomField] @@ -48,7 +48,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute department # The department object. # - # @return [FinchAPI::Sandbox::DirectoryCreateParams::Body::Department, nil] + # @return [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Department, nil] optional :department, -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Department }, nil?: true # @!attribute dob @@ -58,7 +58,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute emails # - # @return [Array, nil] + # @return [Array, nil] optional :emails, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::DirectoryCreateParams::Body::Email] @@ -68,14 +68,14 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute employment # The employment object. # - # @return [FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment, nil] + # @return [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment, nil] optional :employment, -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment }, nil?: true # @!attribute employment_status # The detailed employment status of the individual. Available options: `active`, # `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`. # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::EmploymentStatus, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus, nil] optional :employment_status, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::EmploymentStatus }, nil?: true @@ -96,7 +96,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute ethnicity # The EEOC-defined ethnicity of the individual. # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Ethnicity, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity, nil] optional :ethnicity, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Ethnicity @@ -112,7 +112,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute gender # The gender of the individual. # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Gender, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender, nil] optional :gender, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Gender }, nil?: true # @!attribute income @@ -120,13 +120,13 @@ class Body < FinchAPI::Internal::Type::BaseModel # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. # - # @return [FinchAPI::Income, nil] + # @return [FinchAPI::Models::Income, nil] optional :income, -> { FinchAPI::Income }, nil?: true # @!attribute income_history # The array of income history. # - # @return [Array, nil] + # @return [Array, nil] optional :income_history, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Income, nil?: true] }, nil?: true @@ -150,13 +150,13 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute location # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] optional :location, -> { FinchAPI::Location }, nil?: true # @!attribute manager # The manager object representing the manager of the individual within the org. # - # @return [FinchAPI::Sandbox::DirectoryCreateParams::Body::Manager, nil] + # @return [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Manager, nil] optional :manager, -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Manager }, nil?: true # @!attribute middle_name @@ -167,7 +167,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute phone_numbers # - # @return [Array, nil] + # @return [Array, nil] optional :phone_numbers, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber, @@ -183,7 +183,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!attribute residence # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] optional :residence, -> { FinchAPI::Location }, nil?: true # @!attribute source_id @@ -214,35 +214,35 @@ class Body < FinchAPI::Internal::Type::BaseModel # @!method initialize(class_code: nil, custom_fields: nil, department: nil, dob: nil, emails: nil, employment: nil, employment_status: nil, encrypted_ssn: nil, end_date: nil, ethnicity: nil, first_name: nil, gender: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, source_id: nil, ssn: nil, start_date: nil, title: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::DirectoryCreateParams::Body} for more details. + # {FinchAPI::Models::Sandbox::DirectoryCreateParams::Body} for more details. # # @param class_code [String, nil] Worker's compensation classification code for this employee # - # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl # - # @param department [FinchAPI::Sandbox::DirectoryCreateParams::Body::Department, nil] The department object. + # @param department [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Department, nil] The department object. # # @param dob [String, nil] # - # @param emails [Array, nil] + # @param emails [Array, nil] # - # @param employment [FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment, nil] The employment object. + # @param employment [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment, nil] The employment object. # - # @param employment_status [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` # # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is # # @param end_date [String, nil] # - # @param ethnicity [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity, nil] The EEOC-defined ethnicity of the individual. # # @param first_name [String, nil] The legal first name of the individual. # - # @param gender [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Gender, nil] The gender of the individual. + # @param gender [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender, nil] The gender of the individual. # - # @param income [FinchAPI::Income, nil] The employee's income as reported by the provider. This may not always be annual + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # - # @param income_history [Array, nil] The array of income history. + # @param income_history [Array, nil] The array of income history. # # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. # @@ -250,17 +250,17 @@ class Body < FinchAPI::Internal::Type::BaseModel # # @param latest_rehire_date [String, nil] # - # @param location [FinchAPI::Location, nil] + # @param location [FinchAPI::Models::Location, nil] # - # @param manager [FinchAPI::Sandbox::DirectoryCreateParams::Body::Manager, nil] The manager object representing the manager of the individual within the org. + # @param manager [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Manager, nil] The manager object representing the manager of the individual within the org. # # @param middle_name [String, nil] The legal middle name of the individual. # - # @param phone_numbers [Array, nil] + # @param phone_numbers [Array, nil] # # @param preferred_name [String, nil] The preferred name of the individual. # - # @param residence [FinchAPI::Location, nil] + # @param residence [FinchAPI::Models::Location, nil] # # @param source_id [String, nil] The source system's unique employment identifier for this individual # @@ -286,7 +286,7 @@ class CustomField < FinchAPI::Internal::Type::BaseModel # @param value [Object] end - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body#department + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#department class Department < FinchAPI::Internal::Type::BaseModel # @!attribute name # The name of the department associated with the individual. @@ -308,7 +308,7 @@ class Email < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::Type @@ -317,9 +317,9 @@ class Email < FinchAPI::Internal::Type::BaseModel # @!method initialize(data: nil, type: nil) # @param data [String] - # @param type [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body::Email#type + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email#type module Type extend FinchAPI::Internal::Type::Enum @@ -331,13 +331,13 @@ module Type end end - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body#employment + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::Subtype, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Subtype, nil] optional :subtype, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::Subtype }, nil?: true @@ -345,7 +345,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute type # The main employment type of the individual. # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::Type @@ -354,18 +354,19 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!method initialize(subtype: nil, type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment} for more details. + # {FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment} for more + # details. # # The employment object. # - # @param subtype [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim + # @param subtype [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim # - # @param type [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::Type, nil] The main employment type of the individual. + # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment#subtype + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment#subtype module Subtype extend FinchAPI::Internal::Type::Enum @@ -382,7 +383,7 @@ module Subtype # The main employment type of the individual. # - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment#type + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment#type module Type extend FinchAPI::Internal::Type::Enum @@ -397,7 +398,7 @@ module Type # The detailed employment status of the individual. Available options: `active`, # `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`. # - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body#employment_status + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#employment_status module EmploymentStatus extend FinchAPI::Internal::Type::Enum @@ -415,7 +416,7 @@ module EmploymentStatus # The EEOC-defined ethnicity of the individual. # - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body#ethnicity + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#ethnicity module Ethnicity extend FinchAPI::Internal::Type::Enum @@ -434,7 +435,7 @@ module Ethnicity # The gender of the individual. # - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body#gender + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#gender module Gender extend FinchAPI::Internal::Type::Enum @@ -447,7 +448,7 @@ module Gender # @return [Array] end - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body#manager + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. @@ -469,7 +470,7 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type @@ -478,9 +479,9 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!method initialize(data: nil, type: nil) # @param data [String, nil] - # @param type [Symbol, FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type, nil] - # @see FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber#type + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/sandbox/employment_update_params.rb b/lib/finch_api/models/sandbox/employment_update_params.rb index a2e32117..68ffc5a3 100644 --- a/lib/finch_api/models/sandbox/employment_update_params.rb +++ b/lib/finch_api/models/sandbox/employment_update_params.rb @@ -19,7 +19,7 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # employer in the system. Custom fields are not currently supported for assisted # connections. # - # @return [Array, nil] + # @return [Array, nil] optional :custom_fields, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::EmploymentUpdateParams::CustomField] @@ -29,20 +29,20 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute department # The department object. # - # @return [FinchAPI::Sandbox::EmploymentUpdateParams::Department, nil] + # @return [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] optional :department, -> { FinchAPI::Sandbox::EmploymentUpdateParams::Department }, nil?: true # @!attribute employment # The employment object. # - # @return [FinchAPI::Sandbox::EmploymentUpdateParams::Employment, nil] + # @return [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] optional :employment, -> { FinchAPI::Sandbox::EmploymentUpdateParams::Employment }, nil?: true # @!attribute employment_status # The detailed employment status of the individual. Available options: `active`, # `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`. # - # @return [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] optional :employment_status, enum: -> { FinchAPI::Sandbox::EmploymentUpdateParams::EmploymentStatus }, nil?: true @@ -63,13 +63,13 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. # - # @return [FinchAPI::Income, nil] + # @return [FinchAPI::Models::Income, nil] optional :income, -> { FinchAPI::Income }, nil?: true # @!attribute income_history # The array of income history. # - # @return [Array, nil] + # @return [Array, nil] optional :income_history, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Income, nil?: true] }, nil?: true @@ -93,13 +93,13 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute location # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] optional :location, -> { FinchAPI::Location }, nil?: true # @!attribute manager # The manager object representing the manager of the individual within the org. # - # @return [FinchAPI::Sandbox::EmploymentUpdateParams::Manager, nil] + # @return [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] optional :manager, -> { FinchAPI::Sandbox::EmploymentUpdateParams::Manager }, nil?: true # @!attribute middle_name @@ -131,21 +131,21 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # # @param class_code [String, nil] Worker's compensation classification code for this employee # - # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl # - # @param department [FinchAPI::Sandbox::EmploymentUpdateParams::Department, nil] The department object. + # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] The department object. # - # @param employment [FinchAPI::Sandbox::EmploymentUpdateParams::Employment, nil] The employment object. + # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] The employment object. # - # @param employment_status [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` # # @param end_date [String, nil] # # @param first_name [String, nil] The legal first name of the individual. # - # @param income [FinchAPI::Income, nil] The employee's income as reported by the provider. This may not always be annual + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # - # @param income_history [Array, nil] The array of income history. + # @param income_history [Array, nil] The array of income history. # # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. # @@ -153,9 +153,9 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # # @param latest_rehire_date [String, nil] # - # @param location [FinchAPI::Location, nil] + # @param location [FinchAPI::Models::Location, nil] # - # @param manager [FinchAPI::Sandbox::EmploymentUpdateParams::Manager, nil] The manager object representing the manager of the individual within the org. + # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] The manager object representing the manager of the individual within the org. # # @param middle_name [String, nil] The legal middle name of the individual. # @@ -201,7 +201,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @return [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::Employment::Subtype, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype, nil] optional :subtype, enum: -> { FinchAPI::Sandbox::EmploymentUpdateParams::Employment::Subtype @@ -211,23 +211,24 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute type # The main employment type of the individual. # - # @return [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::Employment::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::EmploymentUpdateParams::Employment::Type }, nil?: true # @!method initialize(subtype: nil, type: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::EmploymentUpdateParams::Employment} for more details. + # {FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment} for more + # details. # # The employment object. # - # @param subtype [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim + # @param subtype [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim # - # @param type [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::Employment::Type, nil] The main employment type of the individual. + # @param type [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @see FinchAPI::Sandbox::EmploymentUpdateParams::Employment#subtype + # @see FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment#subtype module Subtype extend FinchAPI::Internal::Type::Enum @@ -244,7 +245,7 @@ module Subtype # The main employment type of the individual. # - # @see FinchAPI::Sandbox::EmploymentUpdateParams::Employment#type + # @see FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/sandbox/employment_update_response.rb b/lib/finch_api/models/sandbox/employment_update_response.rb index 3a415425..991fa3f2 100644 --- a/lib/finch_api/models/sandbox/employment_update_response.rb +++ b/lib/finch_api/models/sandbox/employment_update_response.rb @@ -64,13 +64,13 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. # - # @return [FinchAPI::Income, nil] + # @return [FinchAPI::Models::Income, nil] optional :income, -> { FinchAPI::Income }, nil?: true # @!attribute income_history # The array of income history. # - # @return [Array, nil] + # @return [Array, nil] optional :income_history, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Income, nil?: true] }, nil?: true @@ -94,7 +94,7 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # @!attribute location # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] optional :location, -> { FinchAPI::Location }, nil?: true # @!attribute manager @@ -146,9 +146,9 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # # @param first_name [String, nil] The legal first name of the individual. # - # @param income [FinchAPI::Income, nil] The employee's income as reported by the provider. This may not always be annual + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # - # @param income_history [Array, nil] The array of income history. + # @param income_history [Array, nil] The array of income history. # # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. # @@ -156,7 +156,7 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # # @param latest_rehire_date [String, nil] # - # @param location [FinchAPI::Location, nil] + # @param location [FinchAPI::Models::Location, nil] # # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Manager, nil] The manager object representing the manager of the individual within the org. # diff --git a/lib/finch_api/models/sandbox/individual_update_params.rb b/lib/finch_api/models/sandbox/individual_update_params.rb index 1999744c..01a07c0d 100644 --- a/lib/finch_api/models/sandbox/individual_update_params.rb +++ b/lib/finch_api/models/sandbox/individual_update_params.rb @@ -15,7 +15,7 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute emails # - # @return [Array, nil] + # @return [Array, nil] optional :emails, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::IndividualUpdateParams::Email] }, nil?: true @@ -31,7 +31,7 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute ethnicity # The EEOC-defined ethnicity of the individual. # - # @return [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Ethnicity, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] optional :ethnicity, enum: -> { FinchAPI::Sandbox::IndividualUpdateParams::Ethnicity }, nil?: true # @!attribute first_name @@ -43,7 +43,7 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute gender # The gender of the individual. # - # @return [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Gender, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] optional :gender, enum: -> { FinchAPI::Sandbox::IndividualUpdateParams::Gender }, nil?: true # @!attribute last_name @@ -60,7 +60,7 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute phone_numbers # - # @return [Array, nil] + # @return [Array, nil] optional :phone_numbers, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber, @@ -76,7 +76,7 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @!attribute residence # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] optional :residence, -> { FinchAPI::Location }, nil?: true # @!attribute ssn @@ -94,25 +94,25 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # # @param dob [String, nil] # - # @param emails [Array, nil] + # @param emails [Array, nil] # # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is # - # @param ethnicity [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] The EEOC-defined ethnicity of the individual. # # @param first_name [String, nil] The legal first name of the individual. # - # @param gender [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Gender, nil] The gender of the individual. + # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] The gender of the individual. # # @param last_name [String, nil] The legal last name of the individual. # # @param middle_name [String, nil] The legal middle name of the individual. # - # @param phone_numbers [Array, nil] + # @param phone_numbers [Array, nil] # # @param preferred_name [String, nil] The preferred name of the individual. # - # @param residence [FinchAPI::Location, nil] + # @param residence [FinchAPI::Models::Location, nil] # # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the # @@ -126,14 +126,14 @@ class Email < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Email::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::IndividualUpdateParams::Email::Type }, nil?: true # @!method initialize(data: nil, type: nil) # @param data [String] - # @param type [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Email::Type, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type, nil] - # @see FinchAPI::Sandbox::IndividualUpdateParams::Email#type + # @see FinchAPI::Models::Sandbox::IndividualUpdateParams::Email#type module Type extend FinchAPI::Internal::Type::Enum @@ -183,7 +183,7 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::Type @@ -192,9 +192,9 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!method initialize(data: nil, type: nil) # @param data [String, nil] - # @param type [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::Type, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type, nil] - # @see FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber#type + # @see FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/sandbox/individual_update_response.rb b/lib/finch_api/models/sandbox/individual_update_response.rb index 58d89e10..97358dd2 100644 --- a/lib/finch_api/models/sandbox/individual_update_response.rb +++ b/lib/finch_api/models/sandbox/individual_update_response.rb @@ -78,7 +78,7 @@ class IndividualUpdateResponse < FinchAPI::Internal::Type::BaseModel # @!attribute residence # - # @return [FinchAPI::Location, nil] + # @return [FinchAPI::Models::Location, nil] optional :residence, -> { FinchAPI::Location }, nil?: true # @!attribute ssn @@ -116,7 +116,7 @@ class IndividualUpdateResponse < FinchAPI::Internal::Type::BaseModel # # @param preferred_name [String, nil] The preferred name of the individual. # - # @param residence [FinchAPI::Location, nil] + # @param residence [FinchAPI::Models::Location, nil] # # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the diff --git a/lib/finch_api/models/sandbox/job_create_params.rb b/lib/finch_api/models/sandbox/job_create_params.rb index 91e9d454..cb1a1cc5 100644 --- a/lib/finch_api/models/sandbox/job_create_params.rb +++ b/lib/finch_api/models/sandbox/job_create_params.rb @@ -11,11 +11,11 @@ class JobCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of job to start. Currently the only supported type is `data_sync_all` # - # @return [Symbol, FinchAPI::Sandbox::JobCreateParams::Type] + # @return [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] required :type, enum: -> { FinchAPI::Sandbox::JobCreateParams::Type } # @!method initialize(type:, request_options: {}) - # @param type [Symbol, FinchAPI::Sandbox::JobCreateParams::Type] The type of job to start. Currently the only supported type is `data_sync_all` + # @param type [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] The type of job to start. Currently the only supported type is `data_sync_all` # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb b/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb index 57597215..3032b17e 100644 --- a/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb +++ b/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb @@ -8,20 +8,20 @@ module Jobs class SandboxJobConfiguration < FinchAPI::Internal::Type::BaseModel # @!attribute completion_status # - # @return [Symbol, FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] + # @return [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] required :completion_status, enum: -> { FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus } # @!attribute type # - # @return [Symbol, FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::Type] + # @return [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type] required :type, enum: -> { FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::Type } # @!method initialize(completion_status:, type:) - # @param completion_status [Symbol, FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] - # @param type [Symbol, FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::Type] + # @param completion_status [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] + # @param type [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type] - # @see FinchAPI::Sandbox::Jobs::SandboxJobConfiguration#completion_status + # @see FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration#completion_status module CompletionStatus extend FinchAPI::Internal::Type::Enum @@ -34,7 +34,7 @@ module CompletionStatus # @return [Array] end - # @see FinchAPI::Sandbox::Jobs::SandboxJobConfiguration#type + # @see FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/sandbox/payment_create_params.rb b/lib/finch_api/models/sandbox/payment_create_params.rb index b9e59e09..d381fb85 100644 --- a/lib/finch_api/models/sandbox/payment_create_params.rb +++ b/lib/finch_api/models/sandbox/payment_create_params.rb @@ -15,7 +15,7 @@ class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute pay_statements # - # @return [Array, nil] + # @return [Array, nil] optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] @@ -28,7 +28,7 @@ class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel # @!method initialize(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) # @param end_date [String] - # @param pay_statements [Array] + # @param pay_statements [Array] # @param start_date [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] @@ -36,7 +36,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute earnings # The array of earnings objects associated with this pay statement # - # @return [Array, nil] + # @return [Array, nil] optional :earnings, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning, @@ -47,7 +47,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute employee_deductions # The array of deductions objects associated with this pay statement. # - # @return [Array, nil] + # @return [Array, nil] optional :employee_deductions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction, @@ -57,7 +57,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute employer_contributions # - # @return [Array, nil] + # @return [Array, nil] optional :employer_contributions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution, @@ -67,7 +67,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute gross_pay # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :gross_pay, -> { FinchAPI::Money }, nil?: true # @!attribute individual_id @@ -78,13 +78,13 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute net_pay # - # @return [FinchAPI::Money, nil] + # @return [FinchAPI::Models::Money, nil] optional :net_pay, -> { FinchAPI::Money }, nil?: true # @!attribute payment_method # The payment method. # - # @return [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] optional :payment_method, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod }, nil?: true @@ -92,7 +92,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute taxes # The array of taxes objects associated with this pay statement. # - # @return [Array, nil] + # @return [Array, nil] optional :taxes, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax, @@ -109,29 +109,29 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of the payment associated with the pay statement. # - # @return [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type }, nil?: true # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) - # @param earnings [Array, nil] The array of earnings objects associated with this pay statement + # @param earnings [Array, nil] The array of earnings objects associated with this pay statement # - # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. + # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. # - # @param employer_contributions [Array, nil] + # @param employer_contributions [Array, nil] # - # @param gross_pay [FinchAPI::Money, nil] + # @param gross_pay [FinchAPI::Models::Money, nil] # # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company # - # @param net_pay [FinchAPI::Money, nil] + # @param net_pay [FinchAPI::Models::Money, nil] # - # @param payment_method [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] The payment method. + # @param payment_method [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] The payment method. # - # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. + # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. # # @param total_hours [Float, nil] The number of hours worked for this pay period # - # @param type [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type, nil] The type of the payment associated with the pay statement. + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] The type of the payment associated with the pay statement. class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute amount @@ -142,7 +142,7 @@ class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] optional :attributes, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes }, nil?: true @@ -169,19 +169,19 @@ class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of earning. # - # @return [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::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::Sandbox::PaymentCreateParams::PayStatement::Earning} for more + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning} for more # details. # # @param amount [Integer, nil] The earnings amount in cents. # - # @param attributes [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] # # @param currency [String, nil] The earnings currency code. # @@ -189,22 +189,22 @@ class Earning < FinchAPI::Internal::Type::BaseModel # # @param name [String, nil] The exact name of the deduction from the pay statement. # - # @param type [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] The type of earning. + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] The type of earning. - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning#attributes + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes#metadata + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::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 @@ -217,7 +217,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata} + # {FinchAPI::Models::Sandbox::PaymentCreateParams::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 @@ -226,7 +226,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # The type of earning. # - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning#type + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning#type module Type extend FinchAPI::Internal::Type::Enum @@ -258,7 +258,7 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] optional :attributes, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes @@ -286,13 +286,13 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute type # Type of benefit. # - # @return [Symbol, FinchAPI::HRIS::BenefitType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil) # @param amount [Integer, nil] The deduction amount in cents. # - # @param attributes [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] # # @param currency [String, nil] The deduction currency. # @@ -300,22 +300,22 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction#attributes + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes#metadata + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::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 @@ -328,7 +328,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata} + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::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 @@ -345,7 +345,7 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] optional :attributes, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes @@ -367,34 +367,34 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # @!attribute type # Type of benefit. # - # @return [Symbol, FinchAPI::HRIS::BenefitType, nil] + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil) # @param amount [Integer, nil] The contribution amount in cents. # - # @param attributes [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] # # @param currency [String, nil] The contribution currency. # # @param name [String, nil] The contribution name from the pay statement. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution#attributes + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes#metadata + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::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 @@ -407,7 +407,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata} + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::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 @@ -417,7 +417,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # The payment method. # - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement#payment_method + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement#payment_method module PaymentMethod extend FinchAPI::Internal::Type::Enum @@ -438,7 +438,7 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] optional :attributes, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes }, nil?: true @@ -464,7 +464,7 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @!attribute type # The type of taxes. # - # @return [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type @@ -474,7 +474,7 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @!method initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) # @param amount [Integer, nil] The tax amount in cents. # - # @param attributes [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] # # @param currency [String, nil] The currency code. # @@ -482,22 +482,22 @@ class Tax < FinchAPI::Internal::Type::BaseModel # # @param name [String, nil] The exact name of tax from the pay statement. # - # @param type [Symbol, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] The type of taxes. + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] The type of taxes. - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax#attributes + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata } # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes#metadata + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::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 @@ -510,7 +510,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @!method initialize(metadata: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata} + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::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 @@ -519,7 +519,7 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # The type of taxes. # - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax#type + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#type module Type extend FinchAPI::Internal::Type::Enum @@ -535,7 +535,7 @@ module Type # The type of the payment associated with the pay statement. # - # @see FinchAPI::Sandbox::PaymentCreateParams::PayStatement#type + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement#type module Type extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/webhook_event.rb b/lib/finch_api/models/webhook_event.rb index 7273c7e9..35aef0c7 100644 --- a/lib/finch_api/models/webhook_event.rb +++ b/lib/finch_api/models/webhook_event.rb @@ -24,7 +24,7 @@ module WebhookEvent variant -> { FinchAPI::PayStatementEvent } # @!method self.variants - # @return [Array(FinchAPI::AccountUpdateEvent, FinchAPI::CompanyEvent, FinchAPI::JobCompletionEvent, FinchAPI::DirectoryEvent, FinchAPI::EmploymentEvent, FinchAPI::IndividualEvent, FinchAPI::PaymentEvent, FinchAPI::PayStatementEvent)] + # @return [Array(FinchAPI::Models::AccountUpdateEvent, FinchAPI::Models::CompanyEvent, FinchAPI::Models::JobCompletionEvent, FinchAPI::Models::DirectoryEvent, FinchAPI::Models::EmploymentEvent, FinchAPI::Models::IndividualEvent, FinchAPI::Models::PaymentEvent, FinchAPI::Models::PayStatementEvent)] end end end diff --git a/lib/finch_api/resources/access_tokens.rb b/lib/finch_api/resources/access_tokens.rb index 041d7878..d1d4731c 100644 --- a/lib/finch_api/resources/access_tokens.rb +++ b/lib/finch_api/resources/access_tokens.rb @@ -13,7 +13,7 @@ class AccessTokens # @param redirect_uri [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::CreateAccessTokenResponse] + # @return [FinchAPI::Models::CreateAccessTokenResponse] # # @see FinchAPI::Models::AccessTokenCreateParams def create(params) diff --git a/lib/finch_api/resources/account.rb b/lib/finch_api/resources/account.rb index 22d38d4c..0a8ec282 100644 --- a/lib/finch_api/resources/account.rb +++ b/lib/finch_api/resources/account.rb @@ -9,7 +9,7 @@ class Account # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::DisconnectResponse] + # @return [FinchAPI::Models::DisconnectResponse] # # @see FinchAPI::Models::AccountDisconnectParams def disconnect(params = {}) @@ -27,7 +27,7 @@ def disconnect(params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Introspection] + # @return [FinchAPI::Models::Introspection] # # @see FinchAPI::Models::AccountIntrospectParams def introspect(params = {}) diff --git a/lib/finch_api/resources/connect/sessions.rb b/lib/finch_api/resources/connect/sessions.rb index 7f82a709..d056acb7 100644 --- a/lib/finch_api/resources/connect/sessions.rb +++ b/lib/finch_api/resources/connect/sessions.rb @@ -15,11 +15,11 @@ class Sessions # # @param customer_name [String] # - # @param products [Array] + # @param products [Array] # # @param customer_email [String, nil] # - # @param integration [FinchAPI::Connect::SessionNewParams::Integration, nil] + # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] # # @param manual [Boolean, nil] # @@ -27,7 +27,7 @@ class Sessions # # @param redirect_uri [String, nil] # - # @param sandbox [Symbol, FinchAPI::Connect::SessionNewParams::Sandbox, nil] + # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -56,7 +56,7 @@ def new(params) # # @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 # - # @param products [Array, nil] The products to request access to (optional for reauthentication) + # @param products [Array, nil] The products to request access to (optional for reauthentication) # # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed # diff --git a/lib/finch_api/resources/hris/benefits.rb b/lib/finch_api/resources/hris/benefits.rb index 76bc7388..0be2a5e9 100644 --- a/lib/finch_api/resources/hris/benefits.rb +++ b/lib/finch_api/resources/hris/benefits.rb @@ -15,17 +15,17 @@ class Benefits # # @overload create(company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {}) # - # @param company_contribution [FinchAPI::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit. + # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit. # # @param description [String] Name of the benefit as it appears in the provider and pay statements. Recommend # - # @param frequency [Symbol, FinchAPI::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. # - # @param type [Symbol, FinchAPI::HRIS::BenefitType, nil] Type of benefit. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::CreateCompanyBenefitsResponse] + # @return [FinchAPI::Models::HRIS::CreateCompanyBenefitsResponse] # # @see FinchAPI::Models::HRIS::BenefitCreateParams def create(params = {}) @@ -46,7 +46,7 @@ def create(params = {}) # @param benefit_id [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::CompanyBenefit] + # @return [FinchAPI::Models::HRIS::CompanyBenefit] # # @see FinchAPI::Models::HRIS::BenefitRetrieveParams def retrieve(benefit_id, params = {}) @@ -68,7 +68,7 @@ def retrieve(benefit_id, params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::UpdateCompanyBenefitResponse] + # @return [FinchAPI::Models::HRIS::UpdateCompanyBenefitResponse] # # @see FinchAPI::Models::HRIS::BenefitUpdateParams def update(benefit_id, params = {}) @@ -88,7 +88,7 @@ def update(benefit_id, params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::SinglePage] + # @return [FinchAPI::Internal::SinglePage] # # @see FinchAPI::Models::HRIS::BenefitListParams def list(params = {}) diff --git a/lib/finch_api/resources/hris/benefits/individuals.rb b/lib/finch_api/resources/hris/benefits/individuals.rb index 40110bce..5f09ffcb 100644 --- a/lib/finch_api/resources/hris/benefits/individuals.rb +++ b/lib/finch_api/resources/hris/benefits/individuals.rb @@ -14,11 +14,11 @@ class Individuals # # @param benefit_id [String] # - # @param individuals [Array] Array of the individual_id to enroll and a configuration object. + # @param individuals [Array] Array of the individual_id to enroll and a configuration object. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::Benefits::EnrolledIndividualBenefitResponse] + # @return [FinchAPI::Models::HRIS::Benefits::EnrolledIndividualBenefitResponse] # # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams def enroll_many(benefit_id, params = {}) @@ -65,7 +65,7 @@ def enrolled_ids(benefit_id, params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::SinglePage] + # @return [FinchAPI::Internal::SinglePage] # # @see FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams def retrieve_many_benefits(benefit_id, params = {}) @@ -90,7 +90,7 @@ def retrieve_many_benefits(benefit_id, params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::Benefits::UnenrolledIndividualBenefitResponse] + # @return [FinchAPI::Models::HRIS::Benefits::UnenrolledIndividualBenefitResponse] # # @see FinchAPI::Models::HRIS::Benefits::IndividualUnenrollManyParams def unenroll_many(benefit_id, params = {}) diff --git a/lib/finch_api/resources/hris/company.rb b/lib/finch_api/resources/hris/company.rb index 9cb9f66b..86087a9e 100644 --- a/lib/finch_api/resources/hris/company.rb +++ b/lib/finch_api/resources/hris/company.rb @@ -13,7 +13,7 @@ class Company # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::HRISCompany] + # @return [FinchAPI::Models::HRIS::HRISCompany] # # @see FinchAPI::Models::HRIS::CompanyRetrieveParams def retrieve(params = {}) diff --git a/lib/finch_api/resources/hris/company/pay_statement_item.rb b/lib/finch_api/resources/hris/company/pay_statement_item.rb index 2fd9ef77..9738b4bf 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item.rb @@ -17,7 +17,7 @@ class PayStatementItem # # @overload list(categories: nil, end_date: nil, name: nil, start_date: nil, type: nil, request_options: {}) # - # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de + # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de # # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in # diff --git a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb index c9e32e04..2c5c3bd3 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb @@ -15,15 +15,15 @@ class Rules # # @overload create(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) # - # @param attributes [FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. # - # @param conditions [Array] + # @param conditions [Array] # # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. # # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. # - # @param entity_type [Symbol, FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/finch_api/resources/hris/directory.rb b/lib/finch_api/resources/hris/directory.rb index d9be05a1..ccc5d9db 100644 --- a/lib/finch_api/resources/hris/directory.rb +++ b/lib/finch_api/resources/hris/directory.rb @@ -14,7 +14,7 @@ class Directory # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::IndividualsPage] + # @return [FinchAPI::Internal::IndividualsPage] # # @see FinchAPI::Models::HRIS::DirectoryListParams def list(params = {}) diff --git a/lib/finch_api/resources/hris/documents.rb b/lib/finch_api/resources/hris/documents.rb index a4a2b2f1..a389eac9 100644 --- a/lib/finch_api/resources/hris/documents.rb +++ b/lib/finch_api/resources/hris/documents.rb @@ -18,7 +18,7 @@ class Documents # # @param offset [Integer] Index to start from (defaults to 0) # - # @param types [Array] Comma-delimited list of document types to filter on. If empty, defaults to all t + # @param types [Array] Comma-delimited list of document types to filter on. If empty, defaults to all t # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -45,7 +45,7 @@ def list(params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::HRIS::W42020, FinchAPI::HRIS::W42005] + # @return [FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005] # # @see FinchAPI::Models::HRIS::DocumentRetreiveParams def retreive(document_id, params = {}) diff --git a/lib/finch_api/resources/hris/employments.rb b/lib/finch_api/resources/hris/employments.rb index e4323772..d2e44917 100644 --- a/lib/finch_api/resources/hris/employments.rb +++ b/lib/finch_api/resources/hris/employments.rb @@ -8,11 +8,11 @@ class Employments # # @overload retrieve_many(requests:, request_options: {}) # - # @param requests [Array] The array of batch requests. + # @param requests [Array] The array of batch requests. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::ResponsesPage] + # @return [FinchAPI::Internal::ResponsesPage] # # @see FinchAPI::Models::HRIS::EmploymentRetrieveManyParams def retrieve_many(params) diff --git a/lib/finch_api/resources/hris/individuals.rb b/lib/finch_api/resources/hris/individuals.rb index b8a64499..e03fbe23 100644 --- a/lib/finch_api/resources/hris/individuals.rb +++ b/lib/finch_api/resources/hris/individuals.rb @@ -8,11 +8,11 @@ class Individuals # # @overload retrieve_many(options: nil, requests: nil, request_options: {}) # - # @param options [FinchAPI::HRIS::IndividualRetrieveManyParams::Options, nil] - # @param requests [Array] + # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] + # @param requests [Array] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::ResponsesPage] + # @return [FinchAPI::Internal::ResponsesPage] # # @see FinchAPI::Models::HRIS::IndividualRetrieveManyParams def retrieve_many(params = {}) diff --git a/lib/finch_api/resources/hris/pay_statements.rb b/lib/finch_api/resources/hris/pay_statements.rb index 7f396a87..f32ae7ee 100644 --- a/lib/finch_api/resources/hris/pay_statements.rb +++ b/lib/finch_api/resources/hris/pay_statements.rb @@ -11,11 +11,11 @@ class PayStatements # # @overload retrieve_many(requests:, request_options: {}) # - # @param requests [Array] The array of batch requests. + # @param requests [Array] The array of batch requests. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::ResponsesPage] + # @return [FinchAPI::Internal::ResponsesPage] # # @see FinchAPI::Models::HRIS::PayStatementRetrieveManyParams def retrieve_many(params) diff --git a/lib/finch_api/resources/hris/payments.rb b/lib/finch_api/resources/hris/payments.rb index 8ab2b29d..2a92efd2 100644 --- a/lib/finch_api/resources/hris/payments.rb +++ b/lib/finch_api/resources/hris/payments.rb @@ -17,7 +17,7 @@ class Payments # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::SinglePage] + # @return [FinchAPI::Internal::SinglePage] # # @see FinchAPI::Models::HRIS::PaymentListParams def list(params) diff --git a/lib/finch_api/resources/jobs/automated.rb b/lib/finch_api/resources/jobs/automated.rb index 78bdc16b..08853dd8 100644 --- a/lib/finch_api/resources/jobs/automated.rb +++ b/lib/finch_api/resources/jobs/automated.rb @@ -21,9 +21,9 @@ class Automated # # @overload create(type:, params:, request_options: {}) # - # @param type [Symbol, FinchAPI::Jobs::AutomatedCreateParams::Type] The type of job to start. + # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] The type of job to start. # - # @param params [FinchAPI::Jobs::AutomatedCreateParams::Params] + # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -48,7 +48,7 @@ def create(params) # @param job_id [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Jobs::AutomatedAsyncJob] + # @return [FinchAPI::Models::Jobs::AutomatedAsyncJob] # # @see FinchAPI::Models::Jobs::AutomatedRetrieveParams def retrieve(job_id, params = {}) diff --git a/lib/finch_api/resources/jobs/manual.rb b/lib/finch_api/resources/jobs/manual.rb index 7e621736..0e04509a 100644 --- a/lib/finch_api/resources/jobs/manual.rb +++ b/lib/finch_api/resources/jobs/manual.rb @@ -12,7 +12,7 @@ class Manual # @param job_id [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Jobs::ManualAsyncJob] + # @return [FinchAPI::Models::Jobs::ManualAsyncJob] # # @see FinchAPI::Models::Jobs::ManualRetrieveParams def retrieve(job_id, params = {}) diff --git a/lib/finch_api/resources/providers.rb b/lib/finch_api/resources/providers.rb index aa6df226..512532bf 100644 --- a/lib/finch_api/resources/providers.rb +++ b/lib/finch_api/resources/providers.rb @@ -9,7 +9,7 @@ class Providers # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::SinglePage] + # @return [FinchAPI::Internal::SinglePage] # # @see FinchAPI::Models::ProviderListParams def list(params = {}) diff --git a/lib/finch_api/resources/sandbox/company.rb b/lib/finch_api/resources/sandbox/company.rb index ba4127c7..34f959df 100644 --- a/lib/finch_api/resources/sandbox/company.rb +++ b/lib/finch_api/resources/sandbox/company.rb @@ -11,17 +11,17 @@ class Company # # @overload update(accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:, request_options: {}) # - # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. # - # @param departments [Array, nil] The array of company departments. + # @param departments [Array, nil] The array of company departments. # # @param ein [String, nil] The employer identification number. # - # @param entity [FinchAPI::Sandbox::CompanyUpdateParams::Entity, nil] The entity type object. + # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] The entity type object. # # @param legal_name [String, nil] The legal name of the company. # - # @param locations [Array, nil] + # @param locations [Array, nil] # # @param primary_email [String, nil] The email of the main administrator on the account. # diff --git a/lib/finch_api/resources/sandbox/connections.rb b/lib/finch_api/resources/sandbox/connections.rb index 3be6fe42..a6c7389f 100644 --- a/lib/finch_api/resources/sandbox/connections.rb +++ b/lib/finch_api/resources/sandbox/connections.rb @@ -16,7 +16,7 @@ class Connections # # @param provider_id [String] The provider associated with the connection # - # @param authentication_type [Symbol, FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType] + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType] # # @param employee_size [Integer] Optional: the size of the employer to be created with this connection. Defaults # diff --git a/lib/finch_api/resources/sandbox/connections/accounts.rb b/lib/finch_api/resources/sandbox/connections/accounts.rb index 56f4c836..e769c1dc 100644 --- a/lib/finch_api/resources/sandbox/connections/accounts.rb +++ b/lib/finch_api/resources/sandbox/connections/accounts.rb @@ -16,7 +16,7 @@ class Accounts # # @param provider_id [String] The provider associated with the `access_token` # - # @param authentication_type [Symbol, FinchAPI::Sandbox::Connections::AccountCreateParams::AuthenticationType] + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType] # # @param products [Array] Optional, defaults to Organization products (`company`, `directory`, `employment # @@ -41,7 +41,7 @@ def create(params) # # @overload update(connection_status: nil, request_options: {}) # - # @param connection_status [Symbol, FinchAPI::ConnectionStatusType] + # @param connection_status [Symbol, FinchAPI::Models::ConnectionStatusType] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse] diff --git a/lib/finch_api/resources/sandbox/directory.rb b/lib/finch_api/resources/sandbox/directory.rb index 8db76f7f..1589a91f 100644 --- a/lib/finch_api/resources/sandbox/directory.rb +++ b/lib/finch_api/resources/sandbox/directory.rb @@ -11,7 +11,7 @@ class Directory # # @overload create(body: nil, request_options: {}) # - # @param body [Array] Array of individuals to create. Takes all combined fields from `/individual` and + # @param body [Array] Array of individuals to create. Takes all combined fields from `/individual` and # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/finch_api/resources/sandbox/employment.rb b/lib/finch_api/resources/sandbox/employment.rb index 9cb09c23..e574911e 100644 --- a/lib/finch_api/resources/sandbox/employment.rb +++ b/lib/finch_api/resources/sandbox/employment.rb @@ -15,21 +15,21 @@ class Employment # # @param class_code [String, nil] Worker's compensation classification code for this employee # - # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl # - # @param department [FinchAPI::Sandbox::EmploymentUpdateParams::Department, nil] The department object. + # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] The department object. # - # @param employment [FinchAPI::Sandbox::EmploymentUpdateParams::Employment, nil] The employment object. + # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] The employment object. # - # @param employment_status [Symbol, FinchAPI::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` # # @param end_date [String, nil] # # @param first_name [String, nil] The legal first name of the individual. # - # @param income [FinchAPI::Income, nil] The employee's income as reported by the provider. This may not always be annual + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # - # @param income_history [Array, nil] The array of income history. + # @param income_history [Array, nil] The array of income history. # # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. # @@ -37,9 +37,9 @@ class Employment # # @param latest_rehire_date [String, nil] # - # @param location [FinchAPI::Location, nil] + # @param location [FinchAPI::Models::Location, nil] # - # @param manager [FinchAPI::Sandbox::EmploymentUpdateParams::Manager, nil] The manager object representing the manager of the individual within the org. + # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] The manager object representing the manager of the individual within the org. # # @param middle_name [String, nil] The legal middle name of the individual. # diff --git a/lib/finch_api/resources/sandbox/individual.rb b/lib/finch_api/resources/sandbox/individual.rb index 5beb75ce..37b0ab55 100644 --- a/lib/finch_api/resources/sandbox/individual.rb +++ b/lib/finch_api/resources/sandbox/individual.rb @@ -15,25 +15,25 @@ class Individual # # @param dob [String, nil] # - # @param emails [Array, nil] + # @param emails [Array, nil] # # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is # - # @param ethnicity [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] The EEOC-defined ethnicity of the individual. # # @param first_name [String, nil] The legal first name of the individual. # - # @param gender [Symbol, FinchAPI::Sandbox::IndividualUpdateParams::Gender, nil] The gender of the individual. + # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] The gender of the individual. # # @param last_name [String, nil] The legal last name of the individual. # # @param middle_name [String, nil] The legal middle name of the individual. # - # @param phone_numbers [Array, nil] + # @param phone_numbers [Array, nil] # # @param preferred_name [String, nil] The preferred name of the individual. # - # @param residence [FinchAPI::Location, nil] + # @param residence [FinchAPI::Models::Location, nil] # # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the # diff --git a/lib/finch_api/resources/sandbox/jobs.rb b/lib/finch_api/resources/sandbox/jobs.rb index da2862bd..ee2b236f 100644 --- a/lib/finch_api/resources/sandbox/jobs.rb +++ b/lib/finch_api/resources/sandbox/jobs.rb @@ -11,7 +11,7 @@ class Jobs # # @overload create(type:, request_options: {}) # - # @param type [Symbol, FinchAPI::Sandbox::JobCreateParams::Type] The type of job to start. Currently the only supported type is `data_sync_all` + # @param type [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] The type of job to start. Currently the only supported type is `data_sync_all` # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/finch_api/resources/sandbox/jobs/configuration.rb b/lib/finch_api/resources/sandbox/jobs/configuration.rb index f5b38d21..6e21c45e 100644 --- a/lib/finch_api/resources/sandbox/jobs/configuration.rb +++ b/lib/finch_api/resources/sandbox/jobs/configuration.rb @@ -11,7 +11,7 @@ class Configuration # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Array] + # @return [Array] # # @see FinchAPI::Models::Sandbox::Jobs::ConfigurationRetrieveParams def retrieve(params = {}) @@ -27,11 +27,11 @@ def retrieve(params = {}) # # @overload update(completion_status:, type:, request_options: {}) # - # @param completion_status [Symbol, FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] - # @param type [Symbol, FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::Type] + # @param completion_status [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] + # @param type [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Sandbox::Jobs::SandboxJobConfiguration] + # @return [FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration] # # @see FinchAPI::Models::Sandbox::Jobs::ConfigurationUpdateParams def update(params) diff --git a/lib/finch_api/resources/sandbox/payment.rb b/lib/finch_api/resources/sandbox/payment.rb index d778e15f..7c3fe7ba 100644 --- a/lib/finch_api/resources/sandbox/payment.rb +++ b/lib/finch_api/resources/sandbox/payment.rb @@ -9,7 +9,7 @@ class Payment # @overload create(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) # # @param end_date [String] - # @param pay_statements [Array] + # @param pay_statements [Array] # @param start_date [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/sig/finch_api/models/access_token_create_params.rbs b/sig/finch_api/models/access_token_create_params.rbs index f67548e2..017785ab 100644 --- a/sig/finch_api/models/access_token_create_params.rbs +++ b/sig/finch_api/models/access_token_create_params.rbs @@ -34,6 +34,14 @@ module FinchAPI ?redirect_uri: String, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + code: String, + client_id: String, + client_secret: String, + redirect_uri: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/account_disconnect_params.rbs b/sig/finch_api/models/account_disconnect_params.rbs index 7e9dcc1c..628e6245 100644 --- a/sig/finch_api/models/account_disconnect_params.rbs +++ b/sig/finch_api/models/account_disconnect_params.rbs @@ -8,6 +8,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/account_introspect_params.rbs b/sig/finch_api/models/account_introspect_params.rbs index d6f92f47..8b053fc7 100644 --- a/sig/finch_api/models/account_introspect_params.rbs +++ b/sig/finch_api/models/account_introspect_params.rbs @@ -8,6 +8,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/account_update_event.rbs b/sig/finch_api/models/account_update_event.rbs index 32a7a1ac..d94f6d68 100644 --- a/sig/finch_api/models/account_update_event.rbs +++ b/sig/finch_api/models/account_update_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type account_update_event = { data: FinchAPI::AccountUpdateEvent::Data, - event_type: FinchAPI::AccountUpdateEvent::event_type + event_type: FinchAPI::Models::AccountUpdateEvent::event_type } class AccountUpdateEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::AccountUpdateEvent::Data _ ) -> FinchAPI::AccountUpdateEvent::Data - def event_type: -> FinchAPI::AccountUpdateEvent::event_type? + def event_type: -> FinchAPI::Models::AccountUpdateEvent::event_type? def event_type=: ( - FinchAPI::AccountUpdateEvent::event_type _ - ) -> FinchAPI::AccountUpdateEvent::event_type + FinchAPI::Models::AccountUpdateEvent::event_type _ + ) -> FinchAPI::Models::AccountUpdateEvent::event_type def initialize: ( ?data: FinchAPI::AccountUpdateEvent::Data, - ?event_type: FinchAPI::AccountUpdateEvent::event_type + ?event_type: FinchAPI::Models::AccountUpdateEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::AccountUpdateEvent::Data, + event_type: FinchAPI::Models::AccountUpdateEvent::event_type + } + type data = { authentication_method: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod, @@ -40,11 +45,16 @@ module FinchAPI status: FinchAPI::Models::connection_status_type ) -> void + def to_hash: -> { + authentication_method: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod, + status: FinchAPI::Models::connection_status_type + } + type authentication_method = { benefits_support: FinchAPI::HRIS::BenefitsSupport?, supported_fields: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields?, - type: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::type_ + type: FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_ } class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel @@ -52,18 +62,24 @@ module FinchAPI attr_accessor supported_fields: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields? - attr_reader type: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::type_? + attr_reader type: FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_? def type=: ( - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::type_ - ) -> FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::type_ + FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_ + ) -> FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_ def initialize: ( ?benefits_support: FinchAPI::HRIS::BenefitsSupport?, ?supported_fields: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields?, - ?type: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::type_ + ?type: FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_ ) -> void + def to_hash: -> { + benefits_support: FinchAPI::HRIS::BenefitsSupport?, + supported_fields: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields?, + type: FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_ + } + type supported_fields = { company: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company, @@ -128,6 +144,16 @@ module FinchAPI ?payment: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment ) -> void + def to_hash: -> { + company: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company, + directory: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory, + employment: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment, + individual: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual, + pay_group: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup, + pay_statement: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement, + payment: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment + } + type company = { id: bool, @@ -198,6 +224,18 @@ module FinchAPI ?primary_phone_number: bool ) -> void + def to_hash: -> { + id: bool, + accounts: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts, + departments: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments, + ein: bool, + entity: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity, + legal_name: bool, + locations: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations, + primary_email: bool, + primary_phone_number: bool + } + type accounts = { account_name: bool, @@ -235,6 +273,14 @@ module FinchAPI ?institution_name: bool, ?routing_number: bool ) -> void + + def to_hash: -> { + account_name: bool, + account_number: bool, + account_type: bool, + institution_name: bool, + routing_number: bool + } end type departments = @@ -259,6 +305,11 @@ module FinchAPI ?parent: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent ) -> void + def to_hash: -> { + name: bool, + parent: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent + } + type parent = { name: bool } class Parent < FinchAPI::Internal::Type::BaseModel @@ -267,6 +318,8 @@ module FinchAPI def name=: (bool) -> bool def initialize: (?name: bool) -> void + + def to_hash: -> { name: bool } end end @@ -282,6 +335,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?subtype: bool, ?type: bool) -> void + + def to_hash: -> { subtype: bool, type: bool } end type locations = @@ -327,6 +382,15 @@ module FinchAPI ?postal_code: bool, ?state: bool ) -> void + + def to_hash: -> { + city: bool, + country: bool, + :line1 => bool, + :line2 => bool, + postal_code: bool, + state: bool + } end end @@ -354,6 +418,11 @@ module FinchAPI ?paging: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging ) -> void + def to_hash: -> { + individuals: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals, + paging: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging + } + type individuals = { id: bool, @@ -406,6 +475,16 @@ module FinchAPI ?middle_name: bool ) -> void + def to_hash: -> { + id: bool, + department: bool, + first_name: bool, + is_active: bool, + last_name: bool, + manager: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, + middle_name: bool + } + type manager = { id: bool } class Manager < FinchAPI::Internal::Type::BaseModel @@ -414,6 +493,8 @@ module FinchAPI def id=: (bool) -> bool def initialize: (?id: bool) -> void + + def to_hash: -> { id: bool } end end @@ -429,6 +510,8 @@ module FinchAPI def offset=: (bool) -> bool def initialize: (?count: bool, ?offset: bool) -> void + + def to_hash: -> { count: bool, offset: bool } end end @@ -552,6 +635,26 @@ module FinchAPI ?title: bool ) -> void + def to_hash: -> { + id: bool, + class_code: bool, + custom_fields: bool, + department: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department, + employment: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment, + employment_status: bool, + end_date: bool, + first_name: bool, + income: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income, + income_history: bool, + is_active: bool, + last_name: bool, + location: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location, + manager: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager, + middle_name: bool, + start_date: bool, + title: bool + } + type department = { name: bool } class Department < FinchAPI::Internal::Type::BaseModel @@ -560,6 +663,8 @@ module FinchAPI def name=: (bool) -> bool def initialize: (?name: bool) -> void + + def to_hash: -> { name: bool } end type employment = { subtype: bool, type: bool } @@ -574,6 +679,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?subtype: bool, ?type: bool) -> void + + def to_hash: -> { subtype: bool, type: bool } end type income = { amount: bool, currency: bool, unit: bool } @@ -596,6 +703,8 @@ module FinchAPI ?currency: bool, ?unit: bool ) -> void + + def to_hash: -> { amount: bool, currency: bool, unit: bool } end type location = @@ -641,6 +750,15 @@ module FinchAPI ?postal_code: bool, ?state: bool ) -> void + + def to_hash: -> { + city: bool, + country: bool, + :line1 => bool, + :line2 => bool, + postal_code: bool, + state: bool + } end type manager = { id: bool } @@ -651,6 +769,8 @@ module FinchAPI def id=: (bool) -> bool def initialize: (?id: bool) -> void + + def to_hash: -> { id: bool } end end @@ -746,6 +866,22 @@ module FinchAPI ?ssn: bool ) -> void + def to_hash: -> { + id: bool, + dob: bool, + emails: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails, + encrypted_ssn: bool, + ethnicity: bool, + first_name: bool, + gender: bool, + last_name: bool, + middle_name: bool, + phone_numbers: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, + preferred_name: bool, + residence: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence, + ssn: bool + } + type emails = { data: bool, type: bool } class Emails < FinchAPI::Internal::Type::BaseModel @@ -758,6 +894,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?data: bool, ?type: bool) -> void + + def to_hash: -> { data: bool, type: bool } end type phone_numbers = { data: bool, type: bool } @@ -772,6 +910,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?data: bool, ?type: bool) -> void + + def to_hash: -> { data: bool, type: bool } end type residence = @@ -817,6 +957,15 @@ module FinchAPI ?postal_code: bool, ?state: bool ) -> void + + def to_hash: -> { + city: bool, + country: bool, + :line1 => bool, + :line2 => bool, + postal_code: bool, + state: bool + } end end @@ -851,6 +1000,13 @@ module FinchAPI ?name: bool, ?pay_frequencies: bool ) -> void + + def to_hash: -> { + id: bool, + individual_ids: bool, + name: bool, + pay_frequencies: bool + } end type pay_statement = @@ -877,6 +1033,11 @@ module FinchAPI ?pay_statements: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements ) -> void + def to_hash: -> { + paging: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging, + pay_statements: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements + } + type paging = { count: bool, offset: bool } class Paging < FinchAPI::Internal::Type::BaseModel @@ -885,6 +1046,8 @@ module FinchAPI attr_accessor offset: bool def initialize: (count: bool, offset: bool) -> void + + def to_hash: -> { count: bool, offset: bool } end type pay_statements = @@ -963,6 +1126,19 @@ module FinchAPI ?type: bool ) -> void + def to_hash: -> { + earnings: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, + employee_deductions: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, + employer_contributions: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, + gross_pay: bool, + individual_id: bool, + net_pay: bool, + payment_method: bool, + taxes: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, + total_hours: bool, + type: bool + } + type earnings = { amount: bool, currency: bool, name: bool, type: bool } @@ -989,6 +1165,13 @@ module FinchAPI ?name: bool, ?type: bool ) -> void + + def to_hash: -> { + amount: bool, + currency: bool, + name: bool, + type: bool + } end type employee_deductions = @@ -1028,6 +1211,14 @@ module FinchAPI ?pre_tax: bool, ?type: bool ) -> void + + def to_hash: -> { + amount: bool, + currency: bool, + name: bool, + pre_tax: bool, + type: bool + } end type employer_contributions = @@ -1051,6 +1242,8 @@ module FinchAPI ?currency: bool, ?name: bool ) -> void + + def to_hash: -> { amount: bool, currency: bool, name: bool } end type taxes = @@ -1090,6 +1283,14 @@ module FinchAPI ?name: bool, ?type: bool ) -> void + + def to_hash: -> { + amount: bool, + currency: bool, + employer: bool, + name: bool, + type: bool + } end end end @@ -1176,6 +1377,21 @@ module FinchAPI ?pay_period: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod ) -> void + def to_hash: -> { + id: bool, + company_debit: bool, + debit_date: bool, + employee_taxes: bool, + employer_taxes: bool, + gross_pay: bool, + individual_ids: bool, + net_pay: bool, + pay_date: bool, + pay_frequencies: bool, + pay_group_ids: bool, + pay_period: FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod + } + type pay_period = { end_date: bool, start_date: bool } class PayPeriod < FinchAPI::Internal::Type::BaseModel @@ -1188,6 +1404,8 @@ module FinchAPI def start_date=: (bool) -> bool def initialize: (?end_date: bool, ?start_date: bool) -> void + + def to_hash: -> { end_date: bool, start_date: bool } end end end @@ -1204,7 +1422,7 @@ module FinchAPI API_CREDENTIAL: :api_credential OAUTH: :oauth - def self?.values: -> ::Array[FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::type_] + def self?.values: -> ::Array[FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::type_] end end end @@ -1216,7 +1434,7 @@ module FinchAPI ACCOUNT_UPDATED: :"account.updated" - def self?.values: -> ::Array[FinchAPI::AccountUpdateEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::AccountUpdateEvent::event_type] end end end diff --git a/sig/finch_api/models/base_webhook_event.rbs b/sig/finch_api/models/base_webhook_event.rbs index 44b19717..d986f5b6 100644 --- a/sig/finch_api/models/base_webhook_event.rbs +++ b/sig/finch_api/models/base_webhook_event.rbs @@ -17,6 +17,12 @@ module FinchAPI company_id: String, ?connection_id: String ) -> void + + def to_hash: -> { + account_id: String, + company_id: String, + connection_id: String + } end end end diff --git a/sig/finch_api/models/company_event.rbs b/sig/finch_api/models/company_event.rbs index 5389b6c7..fcdfad22 100644 --- a/sig/finch_api/models/company_event.rbs +++ b/sig/finch_api/models/company_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type company_event = { data: ::Hash[Symbol, top]?, - event_type: FinchAPI::CompanyEvent::event_type + event_type: FinchAPI::Models::CompanyEvent::event_type } class CompanyEvent < FinchAPI::Models::BaseWebhookEvent @@ -11,17 +11,22 @@ module FinchAPI def data=: (::Hash[Symbol, top]? _) -> ::Hash[Symbol, top]? - def event_type: -> FinchAPI::CompanyEvent::event_type? + def event_type: -> FinchAPI::Models::CompanyEvent::event_type? def event_type=: ( - FinchAPI::CompanyEvent::event_type _ - ) -> FinchAPI::CompanyEvent::event_type + FinchAPI::Models::CompanyEvent::event_type _ + ) -> FinchAPI::Models::CompanyEvent::event_type def initialize: ( ?data: ::Hash[Symbol, top]?, - ?event_type: FinchAPI::CompanyEvent::event_type + ?event_type: FinchAPI::Models::CompanyEvent::event_type ) -> void + def to_hash: -> { + data: ::Hash[Symbol, top]?, + event_type: FinchAPI::Models::CompanyEvent::event_type + } + type event_type = :"company.updated" module EventType @@ -29,7 +34,7 @@ module FinchAPI COMPANY_UPDATED: :"company.updated" - def self?.values: -> ::Array[FinchAPI::CompanyEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::CompanyEvent::event_type] end end end diff --git a/sig/finch_api/models/connect/session_new_params.rbs b/sig/finch_api/models/connect/session_new_params.rbs index 2cfe4f8c..8283a65f 100644 --- a/sig/finch_api/models/connect/session_new_params.rbs +++ b/sig/finch_api/models/connect/session_new_params.rbs @@ -5,7 +5,7 @@ module FinchAPI { customer_id: String, customer_name: String, - products: ::Array[FinchAPI::Connect::SessionNewParams::product], + products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product], customer_email: String?, integration: FinchAPI::Connect::SessionNewParams::Integration?, manual: bool?, @@ -23,7 +23,7 @@ module FinchAPI attr_accessor customer_name: String - attr_accessor products: ::Array[FinchAPI::Connect::SessionNewParams::product] + attr_accessor products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product] attr_accessor customer_email: String? @@ -40,7 +40,7 @@ module FinchAPI def initialize: ( customer_id: String, customer_name: String, - products: ::Array[FinchAPI::Connect::SessionNewParams::product], + products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product], ?customer_email: String?, ?integration: FinchAPI::Connect::SessionNewParams::Integration?, ?manual: bool?, @@ -50,6 +50,19 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + customer_id: String, + customer_name: String, + products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product], + customer_email: String?, + integration: FinchAPI::Connect::SessionNewParams::Integration?, + manual: bool?, + minutes_to_expire: Float?, + redirect_uri: String?, + sandbox: FinchAPI::Models::Connect::SessionNewParams::sandbox?, + request_options: FinchAPI::RequestOptions + } + type product = :company | :directory @@ -76,25 +89,30 @@ module FinchAPI DEDUCTION: :deduction DOCUMENTS: :documents - def self?.values: -> ::Array[FinchAPI::Connect::SessionNewParams::product] + def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionNewParams::product] end type integration = { - auth_method: FinchAPI::Connect::SessionNewParams::Integration::auth_method?, + auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method?, provider: String? } class Integration < FinchAPI::Internal::Type::BaseModel - attr_accessor auth_method: FinchAPI::Connect::SessionNewParams::Integration::auth_method? + attr_accessor auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method? attr_accessor provider: String? def initialize: ( - ?auth_method: FinchAPI::Connect::SessionNewParams::Integration::auth_method?, + ?auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method?, ?provider: String? ) -> void + def to_hash: -> { + auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method?, + provider: String? + } + type auth_method = :assisted | :credential | :oauth | :api_token module AuthMethod @@ -105,7 +123,7 @@ module FinchAPI OAUTH: :oauth API_TOKEN: :api_token - def self?.values: -> ::Array[FinchAPI::Connect::SessionNewParams::Integration::auth_method] + def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method] end end diff --git a/sig/finch_api/models/connect/session_new_response.rbs b/sig/finch_api/models/connect/session_new_response.rbs index 67b02419..fde0d732 100644 --- a/sig/finch_api/models/connect/session_new_response.rbs +++ b/sig/finch_api/models/connect/session_new_response.rbs @@ -9,6 +9,8 @@ module FinchAPI attr_accessor session_id: String def initialize: (connect_url: String, session_id: String) -> void + + def to_hash: -> { connect_url: String, session_id: String } end end end diff --git a/sig/finch_api/models/connect/session_reauthenticate_params.rbs b/sig/finch_api/models/connect/session_reauthenticate_params.rbs index 4760323e..8e6644c2 100644 --- a/sig/finch_api/models/connect/session_reauthenticate_params.rbs +++ b/sig/finch_api/models/connect/session_reauthenticate_params.rbs @@ -5,7 +5,7 @@ module FinchAPI { connection_id: String, minutes_to_expire: Integer?, - products: ::Array[FinchAPI::Connect::SessionReauthenticateParams::product]?, + products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, redirect_uri: String? } & FinchAPI::Internal::Type::request_parameters @@ -18,18 +18,26 @@ module FinchAPI attr_accessor minutes_to_expire: Integer? - attr_accessor products: ::Array[FinchAPI::Connect::SessionReauthenticateParams::product]? + attr_accessor products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]? attr_accessor redirect_uri: String? def initialize: ( connection_id: String, ?minutes_to_expire: Integer?, - ?products: ::Array[FinchAPI::Connect::SessionReauthenticateParams::product]?, + ?products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, ?redirect_uri: String?, ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + connection_id: String, + minutes_to_expire: Integer?, + products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, + redirect_uri: String?, + request_options: FinchAPI::RequestOptions + } + type product = :company | :directory @@ -56,7 +64,7 @@ module FinchAPI DEDUCTION: :deduction DOCUMENTS: :documents - def self?.values: -> ::Array[FinchAPI::Connect::SessionReauthenticateParams::product] + def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product] end end end diff --git a/sig/finch_api/models/connect/session_reauthenticate_response.rbs b/sig/finch_api/models/connect/session_reauthenticate_response.rbs index 02cecde2..7694ac2a 100644 --- a/sig/finch_api/models/connect/session_reauthenticate_response.rbs +++ b/sig/finch_api/models/connect/session_reauthenticate_response.rbs @@ -10,6 +10,8 @@ module FinchAPI attr_accessor session_id: String def initialize: (connect_url: String, session_id: String) -> void + + def to_hash: -> { connect_url: String, session_id: String } end end end diff --git a/sig/finch_api/models/create_access_token_response.rbs b/sig/finch_api/models/create_access_token_response.rbs index d945bf4e..7722fa76 100644 --- a/sig/finch_api/models/create_access_token_response.rbs +++ b/sig/finch_api/models/create_access_token_response.rbs @@ -4,10 +4,10 @@ module FinchAPI { access_token: String, account_id: String, - client_type: FinchAPI::CreateAccessTokenResponse::client_type, + client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, company_id: String, connection_id: String, - connection_type: FinchAPI::CreateAccessTokenResponse::connection_type, + connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type, products: ::Array[String], provider_id: String, customer_id: String?, @@ -19,13 +19,13 @@ module FinchAPI attr_accessor account_id: String - attr_accessor client_type: FinchAPI::CreateAccessTokenResponse::client_type + attr_accessor client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type attr_accessor company_id: String attr_accessor connection_id: String - attr_accessor connection_type: FinchAPI::CreateAccessTokenResponse::connection_type + attr_accessor connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type attr_accessor products: ::Array[String] @@ -40,16 +40,29 @@ module FinchAPI def initialize: ( access_token: String, account_id: String, - client_type: FinchAPI::CreateAccessTokenResponse::client_type, + client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, company_id: String, connection_id: String, - connection_type: FinchAPI::CreateAccessTokenResponse::connection_type, + connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type, products: ::Array[String], provider_id: String, ?customer_id: String?, ?token_type: String ) -> void + def to_hash: -> { + access_token: String, + account_id: String, + client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, + company_id: String, + connection_id: String, + connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type, + products: ::Array[String], + provider_id: String, + customer_id: String?, + token_type: String + } + type client_type = :production | :development | :sandbox module ClientType @@ -59,7 +72,7 @@ module FinchAPI DEVELOPMENT: :development SANDBOX: :sandbox - def self?.values: -> ::Array[FinchAPI::CreateAccessTokenResponse::client_type] + def self?.values: -> ::Array[FinchAPI::Models::CreateAccessTokenResponse::client_type] end type connection_type = :provider | :finch @@ -70,7 +83,7 @@ module FinchAPI PROVIDER: :provider FINCH: :finch - def self?.values: -> ::Array[FinchAPI::CreateAccessTokenResponse::connection_type] + def self?.values: -> ::Array[FinchAPI::Models::CreateAccessTokenResponse::connection_type] end end end diff --git a/sig/finch_api/models/directory_event.rbs b/sig/finch_api/models/directory_event.rbs index c671abf7..c100bf00 100644 --- a/sig/finch_api/models/directory_event.rbs +++ b/sig/finch_api/models/directory_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type directory_event = { data: FinchAPI::DirectoryEvent::Data, - event_type: FinchAPI::DirectoryEvent::event_type + event_type: FinchAPI::Models::DirectoryEvent::event_type } class DirectoryEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::DirectoryEvent::Data _ ) -> FinchAPI::DirectoryEvent::Data - def event_type: -> FinchAPI::DirectoryEvent::event_type? + def event_type: -> FinchAPI::Models::DirectoryEvent::event_type? def event_type=: ( - FinchAPI::DirectoryEvent::event_type _ - ) -> FinchAPI::DirectoryEvent::event_type + FinchAPI::Models::DirectoryEvent::event_type _ + ) -> FinchAPI::Models::DirectoryEvent::event_type def initialize: ( ?data: FinchAPI::DirectoryEvent::Data, - ?event_type: FinchAPI::DirectoryEvent::event_type + ?event_type: FinchAPI::Models::DirectoryEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::DirectoryEvent::Data, + event_type: FinchAPI::Models::DirectoryEvent::event_type + } + type data = { individual_id: String } class Data < FinchAPI::Internal::Type::BaseModel @@ -32,6 +37,8 @@ module FinchAPI def individual_id=: (String) -> String def initialize: (?individual_id: String) -> void + + def to_hash: -> { individual_id: String } end type event_type = @@ -44,7 +51,7 @@ module FinchAPI DIRECTORY_UPDATED: :"directory.updated" DIRECTORY_DELETED: :"directory.deleted" - def self?.values: -> ::Array[FinchAPI::DirectoryEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::DirectoryEvent::event_type] end end end diff --git a/sig/finch_api/models/disconnect_response.rbs b/sig/finch_api/models/disconnect_response.rbs index f5f47375..77f2c707 100644 --- a/sig/finch_api/models/disconnect_response.rbs +++ b/sig/finch_api/models/disconnect_response.rbs @@ -6,6 +6,8 @@ module FinchAPI attr_accessor status: String def initialize: (status: String) -> void + + def to_hash: -> { status: String } end end end diff --git a/sig/finch_api/models/employment_event.rbs b/sig/finch_api/models/employment_event.rbs index 501739e5..dc7f5641 100644 --- a/sig/finch_api/models/employment_event.rbs +++ b/sig/finch_api/models/employment_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type employment_event = { data: FinchAPI::EmploymentEvent::Data, - event_type: FinchAPI::EmploymentEvent::event_type + event_type: FinchAPI::Models::EmploymentEvent::event_type } class EmploymentEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::EmploymentEvent::Data _ ) -> FinchAPI::EmploymentEvent::Data - def event_type: -> FinchAPI::EmploymentEvent::event_type? + def event_type: -> FinchAPI::Models::EmploymentEvent::event_type? def event_type=: ( - FinchAPI::EmploymentEvent::event_type _ - ) -> FinchAPI::EmploymentEvent::event_type + FinchAPI::Models::EmploymentEvent::event_type _ + ) -> FinchAPI::Models::EmploymentEvent::event_type def initialize: ( ?data: FinchAPI::EmploymentEvent::Data, - ?event_type: FinchAPI::EmploymentEvent::event_type + ?event_type: FinchAPI::Models::EmploymentEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::EmploymentEvent::Data, + event_type: FinchAPI::Models::EmploymentEvent::event_type + } + type data = { individual_id: String } class Data < FinchAPI::Internal::Type::BaseModel @@ -32,6 +37,8 @@ module FinchAPI def individual_id=: (String) -> String def initialize: (?individual_id: String) -> void + + def to_hash: -> { individual_id: String } end type event_type = @@ -44,7 +51,7 @@ module FinchAPI EMPLOYMENT_UPDATED: :"employment.updated" EMPLOYMENT_DELETED: :"employment.deleted" - def self?.values: -> ::Array[FinchAPI::EmploymentEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::EmploymentEvent::event_type] end end end diff --git a/sig/finch_api/models/hris/benefit_contribution.rbs b/sig/finch_api/models/hris/benefit_contribution.rbs index 2398608b..4461179b 100644 --- a/sig/finch_api/models/hris/benefit_contribution.rbs +++ b/sig/finch_api/models/hris/benefit_contribution.rbs @@ -2,18 +2,26 @@ module FinchAPI module Models module HRIS type benefit_contribution = - { amount: Integer?, type: FinchAPI::HRIS::BenefitContribution::type_? } + { + amount: Integer?, + type: FinchAPI::Models::HRIS::BenefitContribution::type_? + } class BenefitContribution < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer? - attr_accessor type: FinchAPI::HRIS::BenefitContribution::type_? + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::type_? def initialize: ( ?amount: Integer?, - ?type: FinchAPI::HRIS::BenefitContribution::type_? + ?type: FinchAPI::Models::HRIS::BenefitContribution::type_? ) -> void + def to_hash: -> { + amount: Integer?, + type: FinchAPI::Models::HRIS::BenefitContribution::type_? + } + type type_ = :fixed | :percent module Type @@ -22,7 +30,7 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::BenefitContribution::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::type_] end end end diff --git a/sig/finch_api/models/hris/benefit_create_params.rbs b/sig/finch_api/models/hris/benefit_create_params.rbs index 0c331bb4..84a26d40 100644 --- a/sig/finch_api/models/hris/benefit_create_params.rbs +++ b/sig/finch_api/models/hris/benefit_create_params.rbs @@ -32,10 +32,18 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + company_contribution: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution?, + description: String, + frequency: FinchAPI::Models::HRIS::benefit_frequency?, + type: FinchAPI::Models::HRIS::benefit_type?, + request_options: FinchAPI::RequestOptions + } + type company_contribution = { tiers: ::Array[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier], - type: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::type_ + type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ } class CompanyContribution < FinchAPI::Internal::Type::BaseModel @@ -45,17 +53,22 @@ module FinchAPI ::Array[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier] ) -> ::Array[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier] - attr_reader type: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::type_? + attr_reader type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_? def type=: ( - FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::type_ - ) -> FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::type_ + FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ + ) -> FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ def initialize: ( ?tiers: ::Array[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier], - ?type: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::type_ + ?type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ ) -> void + def to_hash: -> { + tiers: ::Array[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier], + type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ + } + type tier = { match: Integer, threshold: Integer } class Tier < FinchAPI::Internal::Type::BaseModel @@ -68,6 +81,8 @@ module FinchAPI def threshold=: (Integer) -> Integer def initialize: (?match: Integer, ?threshold: Integer) -> void + + def to_hash: -> { match: Integer, threshold: Integer } end type type_ = :match @@ -77,7 +92,7 @@ module FinchAPI MATCH: :match - def self?.values: -> ::Array[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_] end end end diff --git a/sig/finch_api/models/hris/benefit_features_and_operations.rbs b/sig/finch_api/models/hris/benefit_features_and_operations.rbs index 4f743b17..419df6d0 100644 --- a/sig/finch_api/models/hris/benefit_features_and_operations.rbs +++ b/sig/finch_api/models/hris/benefit_features_and_operations.rbs @@ -25,15 +25,20 @@ module FinchAPI ?supported_operations: FinchAPI::HRIS::SupportPerBenefitType ) -> void + def to_hash: -> { + supported_features: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, + supported_operations: FinchAPI::HRIS::SupportPerBenefitType + } + type supported_features = { annual_maximum: bool?, catch_up: bool?, - company_contribution: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, + company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, description: String?, - employee_deduction: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, + employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - hsa_contribution_limit: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? + hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? } class SupportedFeatures < FinchAPI::Internal::Type::BaseModel @@ -41,11 +46,11 @@ module FinchAPI attr_accessor catch_up: bool? - attr_accessor company_contribution: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]? + attr_accessor company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]? attr_accessor description: String? - attr_accessor employee_deduction: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]? + attr_accessor employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]? attr_reader frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?]? @@ -53,18 +58,28 @@ module FinchAPI ::Array[FinchAPI::Models::HRIS::benefit_frequency?] ) -> ::Array[FinchAPI::Models::HRIS::benefit_frequency?] - attr_accessor hsa_contribution_limit: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? + attr_accessor hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? def initialize: ( ?annual_maximum: bool?, ?catch_up: bool?, - ?company_contribution: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, + ?company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, ?description: String?, - ?employee_deduction: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, + ?employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, ?frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - ?hsa_contribution_limit: ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? + ?hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? ) -> void + def to_hash: -> { + annual_maximum: bool?, + catch_up: bool?, + company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, + description: String?, + employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, + frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], + hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? + } + type company_contribution = :fixed | :percent module CompanyContribution @@ -73,7 +88,7 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution] end type employee_deduction = :fixed | :percent @@ -84,7 +99,7 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction] end type hsa_contribution_limit = :individual | :family @@ -95,7 +110,7 @@ module FinchAPI INDIVIDUAL: :individual FAMILY: :family - def self?.values: -> ::Array[FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit] end end end diff --git a/sig/finch_api/models/hris/benefit_list_params.rbs b/sig/finch_api/models/hris/benefit_list_params.rbs index be84e750..0765ec3b 100644 --- a/sig/finch_api/models/hris/benefit_list_params.rbs +++ b/sig/finch_api/models/hris/benefit_list_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/benefit_list_supported_benefits_params.rbs b/sig/finch_api/models/hris/benefit_list_supported_benefits_params.rbs index 7768aed8..a2d4e0e0 100644 --- a/sig/finch_api/models/hris/benefit_list_supported_benefits_params.rbs +++ b/sig/finch_api/models/hris/benefit_list_supported_benefits_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs b/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs index 26facf81..a7aedd00 100644 --- a/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs +++ b/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs @@ -41,6 +41,16 @@ module FinchAPI ?hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit?]? ) -> void + def to_hash: -> { + annual_maximum: bool?, + catch_up: bool?, + company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::company_contribution?]?, + description: String?, + employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::employee_deduction?]?, + frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], + hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit?]? + } + type company_contribution = :fixed | :percent module CompanyContribution diff --git a/sig/finch_api/models/hris/benefit_retrieve_params.rbs b/sig/finch_api/models/hris/benefit_retrieve_params.rbs index 2f7d70ed..5c583170 100644 --- a/sig/finch_api/models/hris/benefit_retrieve_params.rbs +++ b/sig/finch_api/models/hris/benefit_retrieve_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/benefit_update_params.rbs b/sig/finch_api/models/hris/benefit_update_params.rbs index 7e3a7993..b307ba2e 100644 --- a/sig/finch_api/models/hris/benefit_update_params.rbs +++ b/sig/finch_api/models/hris/benefit_update_params.rbs @@ -16,6 +16,11 @@ module FinchAPI ?description: String, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + description: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbs b/sig/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbs index 5a27d6e3..7e642735 100644 --- a/sig/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbs +++ b/sig/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbs @@ -8,6 +8,8 @@ module FinchAPI attr_accessor job_id: String def initialize: (job_id: String) -> void + + def to_hash: -> { job_id: String } end end end diff --git a/sig/finch_api/models/hris/benefits/individual_benefit.rbs b/sig/finch_api/models/hris/benefits/individual_benefit.rbs index 66486183..9a819710 100644 --- a/sig/finch_api/models/hris/benefits/individual_benefit.rbs +++ b/sig/finch_api/models/hris/benefits/individual_benefit.rbs @@ -32,13 +32,19 @@ module FinchAPI ?individual_id: String ) -> void + def to_hash: -> { + body: FinchAPI::HRIS::Benefits::IndividualBenefit::Body, + code: Integer, + individual_id: String + } + type body = { annual_maximum: Integer?, catch_up: bool?, company_contribution: FinchAPI::HRIS::BenefitContribution?, employee_deduction: FinchAPI::HRIS::BenefitContribution?, - hsa_contribution_limit: FinchAPI::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? + hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? } class Body < FinchAPI::Internal::Type::BaseModel @@ -50,16 +56,24 @@ module FinchAPI attr_accessor employee_deduction: FinchAPI::HRIS::BenefitContribution? - attr_accessor hsa_contribution_limit: FinchAPI::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? + attr_accessor hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? def initialize: ( ?annual_maximum: Integer?, ?catch_up: bool?, ?company_contribution: FinchAPI::HRIS::BenefitContribution?, ?employee_deduction: FinchAPI::HRIS::BenefitContribution?, - ?hsa_contribution_limit: FinchAPI::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? + ?hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? ) -> void + def to_hash: -> { + annual_maximum: Integer?, + catch_up: bool?, + company_contribution: FinchAPI::HRIS::BenefitContribution?, + employee_deduction: FinchAPI::HRIS::BenefitContribution?, + hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit? + } + type hsa_contribution_limit = :individual | :family module HsaContributionLimit @@ -68,7 +82,7 @@ module FinchAPI INDIVIDUAL: :individual FAMILY: :family - def self?.values: -> ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::hsa_contribution_limit] end end end diff --git a/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs b/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs index 391f9f0e..01da28a8 100644 --- a/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs @@ -23,6 +23,11 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual], + request_options: FinchAPI::RequestOptions + } + type individual = { configuration: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration, @@ -45,9 +50,14 @@ module FinchAPI ?individual_id: String ) -> void + def to_hash: -> { + configuration: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration, + individual_id: String + } + type configuration = { - annual_contribution_limit: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit, + annual_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit, annual_maximum: Integer?, catch_up: bool, company_contribution: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, @@ -56,11 +66,11 @@ module FinchAPI } class Configuration < FinchAPI::Internal::Type::BaseModel - attr_reader annual_contribution_limit: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit? + attr_reader annual_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit? def annual_contribution_limit=: ( - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit - ) -> FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit + FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit + ) -> FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit attr_accessor annual_maximum: Integer? @@ -85,7 +95,7 @@ module FinchAPI ) -> FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction def initialize: ( - ?annual_contribution_limit: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit, + ?annual_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit, ?annual_maximum: Integer?, ?catch_up: bool, ?company_contribution: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, @@ -93,6 +103,15 @@ module FinchAPI ?employee_deduction: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction ) -> void + def to_hash: -> { + annual_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit, + annual_maximum: Integer?, + catch_up: bool, + company_contribution: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, + effective_date: Date, + employee_deduction: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction + } + type annual_contribution_limit = :individual | :family module AnnualContributionLimit @@ -101,13 +120,13 @@ module FinchAPI INDIVIDUAL: :individual FAMILY: :family - def self?.values: -> ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::annual_contribution_limit] end type company_contribution = { amount: Integer, - type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ } class CompanyContribution < FinchAPI::Internal::Type::BaseModel @@ -115,17 +134,22 @@ module FinchAPI def amount=: (Integer) -> Integer - attr_reader type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_? + attr_reader type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_? def type=: ( - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ - ) -> FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ + FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ + ) -> FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ def initialize: ( ?amount: Integer, - ?type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ + ?type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ ) -> void + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ + } + type type_ = :fixed | :percent module Type @@ -134,14 +158,14 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_] end end type employee_deduction = { amount: Integer, - type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ } class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel @@ -149,17 +173,22 @@ module FinchAPI def amount=: (Integer) -> Integer - attr_reader type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_? + attr_reader type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_? def type=: ( - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ - ) -> FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ + FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ + ) -> FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ def initialize: ( ?amount: Integer, - ?type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ + ?type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ ) -> void + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_ + } + type type_ = :fixed | :percent module Type @@ -168,7 +197,7 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::type_] end end end diff --git a/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs b/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs index 2d9bf817..a95458ce 100644 --- a/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs @@ -10,6 +10,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbs b/sig/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbs index c61f88a5..101293c6 100644 --- a/sig/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbs +++ b/sig/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbs @@ -14,6 +14,11 @@ module FinchAPI benefit_id: String, individual_ids: ::Array[String] ) -> void + + def to_hash: -> { + benefit_id: String, + individual_ids: ::Array[String] + } end end end diff --git a/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs b/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs index 68f41a8c..cecbf6dc 100644 --- a/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs @@ -18,6 +18,11 @@ module FinchAPI ?individual_ids: String, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + individual_ids: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs b/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs index 5ba6ab1c..fb2709ac 100644 --- a/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs @@ -18,6 +18,11 @@ module FinchAPI ?individual_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + individual_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbs b/sig/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbs index bc20b6e6..e583048d 100644 --- a/sig/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbs +++ b/sig/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbs @@ -8,6 +8,8 @@ module FinchAPI attr_accessor job_id: String def initialize: (job_id: String) -> void + + def to_hash: -> { job_id: String } end end end diff --git a/sig/finch_api/models/hris/benefits_support.rbs b/sig/finch_api/models/hris/benefits_support.rbs index e3cc0d95..c952968a 100644 --- a/sig/finch_api/models/hris/benefits_support.rbs +++ b/sig/finch_api/models/hris/benefits_support.rbs @@ -56,6 +56,21 @@ module FinchAPI ?simple: FinchAPI::HRIS::BenefitFeaturesAndOperations?, ?simple_ira: FinchAPI::HRIS::BenefitFeaturesAndOperations? ) -> void + + def to_hash: -> { + commuter: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + custom_post_tax: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + custom_pre_tax: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + fsa_dependent_care: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + fsa_medical: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + hsa_post: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + hsa_pre: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + :s125_dental => FinchAPI::HRIS::BenefitFeaturesAndOperations?, + :s125_medical => FinchAPI::HRIS::BenefitFeaturesAndOperations?, + :s125_vision => FinchAPI::HRIS::BenefitFeaturesAndOperations?, + simple: FinchAPI::HRIS::BenefitFeaturesAndOperations?, + simple_ira: FinchAPI::HRIS::BenefitFeaturesAndOperations? + } end end end diff --git a/sig/finch_api/models/hris/company.rbs b/sig/finch_api/models/hris/company.rbs index cb15090b..08a0a5ec 100644 --- a/sig/finch_api/models/hris/company.rbs +++ b/sig/finch_api/models/hris/company.rbs @@ -45,11 +45,23 @@ module FinchAPI primary_phone_number: String? ) -> void + def to_hash: -> { + id: String, + accounts: ::Array[FinchAPI::HRIS::HRISCompany::Account]?, + departments: ::Array[FinchAPI::HRIS::HRISCompany::Department?]?, + ein: String?, + entity: FinchAPI::HRIS::HRISCompany::Entity?, + legal_name: String?, + locations: ::Array[FinchAPI::Location?]?, + primary_email: String?, + primary_phone_number: String? + } + type account = { account_name: String?, account_number: String?, - account_type: FinchAPI::HRIS::HRISCompany::Account::account_type?, + account_type: FinchAPI::Models::HRIS::HRISCompany::Account::account_type?, institution_name: String?, routing_number: String? } @@ -59,7 +71,7 @@ module FinchAPI attr_accessor account_number: String? - attr_accessor account_type: FinchAPI::HRIS::HRISCompany::Account::account_type? + attr_accessor account_type: FinchAPI::Models::HRIS::HRISCompany::Account::account_type? attr_accessor institution_name: String? @@ -68,11 +80,19 @@ module FinchAPI def initialize: ( account_name: String?, account_number: String?, - account_type: FinchAPI::HRIS::HRISCompany::Account::account_type?, + account_type: FinchAPI::Models::HRIS::HRISCompany::Account::account_type?, institution_name: String?, routing_number: String? ) -> void + def to_hash: -> { + account_name: String?, + account_number: String?, + account_type: FinchAPI::Models::HRIS::HRISCompany::Account::account_type?, + institution_name: String?, + routing_number: String? + } + type account_type = :checking | :savings module AccountType @@ -81,7 +101,7 @@ module FinchAPI CHECKING: :checking SAVINGS: :savings - def self?.values: -> ::Array[FinchAPI::HRIS::HRISCompany::Account::account_type] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::HRISCompany::Account::account_type] end end @@ -101,31 +121,43 @@ module FinchAPI parent: FinchAPI::HRIS::HRISCompany::Department::Parent? ) -> void + def to_hash: -> { + name: String?, + parent: FinchAPI::HRIS::HRISCompany::Department::Parent? + } + type parent = { name: String? } class Parent < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? def initialize: (name: String?) -> void + + def to_hash: -> { name: String? } end end type entity = { - subtype: FinchAPI::HRIS::HRISCompany::Entity::subtype?, - type: FinchAPI::HRIS::HRISCompany::Entity::type_? + subtype: FinchAPI::Models::HRIS::HRISCompany::Entity::subtype?, + type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? } class Entity < FinchAPI::Internal::Type::BaseModel - attr_accessor subtype: FinchAPI::HRIS::HRISCompany::Entity::subtype? + attr_accessor subtype: FinchAPI::Models::HRIS::HRISCompany::Entity::subtype? - attr_accessor type: FinchAPI::HRIS::HRISCompany::Entity::type_? + attr_accessor type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? def initialize: ( - subtype: FinchAPI::HRIS::HRISCompany::Entity::subtype?, - type: FinchAPI::HRIS::HRISCompany::Entity::type_? + subtype: FinchAPI::Models::HRIS::HRISCompany::Entity::subtype?, + type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::HRIS::HRISCompany::Entity::subtype?, + type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? + } + type subtype = :s_corporation | :c_corporation | :b_corporation module Subtype @@ -135,7 +167,7 @@ module FinchAPI C_CORPORATION: :c_corporation B_CORPORATION: :b_corporation - def self?.values: -> ::Array[FinchAPI::HRIS::HRISCompany::Entity::subtype] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::HRISCompany::Entity::subtype] end type type_ = @@ -158,7 +190,7 @@ module FinchAPI PARTNERSHIP: :partnership COOPERATIVE: :cooperative - def self?.values: -> ::Array[FinchAPI::HRIS::HRISCompany::Entity::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::HRISCompany::Entity::type_] end end end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs index ac3a3aad..66130329 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs @@ -48,6 +48,15 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, + conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type, + request_options: FinchAPI::RequestOptions + } + type attributes = { metadata: ::Hash[Symbol, top] } class Attributes < FinchAPI::Internal::Type::BaseModel @@ -56,12 +65,14 @@ module FinchAPI def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } end type condition = { field: String, - operator: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, + operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, value: String } @@ -70,11 +81,11 @@ module FinchAPI def field=: (String) -> String - attr_reader operator: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator? + attr_reader operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator? def operator=: ( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator - ) -> FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator + FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator + ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator attr_reader value: String? @@ -82,10 +93,16 @@ module FinchAPI def initialize: ( ?field: String, - ?operator: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, + ?operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, ?value: String ) -> void + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, + value: String + } + type operator = :equals module Operator @@ -93,7 +110,7 @@ module FinchAPI EQUALS: :equals - def self?.values: -> ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator] end end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs index ecec8fad..ad879cbe 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs @@ -67,6 +67,18 @@ module FinchAPI ?updated_at: Time ) -> void + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type, + priority: Integer, + updated_at: Time + } + type attributes = { metadata: ::Hash[Symbol, top] } class Attributes < FinchAPI::Internal::Type::BaseModel @@ -75,6 +87,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } end type condition = @@ -105,6 +119,12 @@ module FinchAPI ?value: String ) -> void + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator, + value: String + } + type operator = :equals module Operator diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs index 8a907043..41d7f22d 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs @@ -11,6 +11,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs index 274e01f3..dfbf765d 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs @@ -73,6 +73,19 @@ module FinchAPI ?updated_at: Time ) -> void + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition], + created_at: Time, + deleted_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type, + priority: Integer, + updated_at: Time + } + type attributes = { metadata: ::Hash[Symbol, top] } class Attributes < FinchAPI::Internal::Type::BaseModel @@ -81,6 +94,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } end type condition = @@ -111,6 +126,12 @@ module FinchAPI ?value: String ) -> void + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator, + value: String + } + type operator = :equals module Operator diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs index 06587199..80a86e95 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs @@ -11,6 +11,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs index 5ea65c83..9516aae7 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs @@ -67,6 +67,18 @@ module FinchAPI ?updated_at: Time ) -> void + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type, + priority: Integer, + updated_at: Time + } + type attributes = { metadata: ::Hash[Symbol, top] } class Attributes < FinchAPI::Internal::Type::BaseModel @@ -75,6 +87,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } end type condition = @@ -105,6 +119,12 @@ module FinchAPI ?value: String ) -> void + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator, + value: String + } + type operator = :equals module Operator diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs index 9131569d..72f45738 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs @@ -19,6 +19,11 @@ module FinchAPI ?optional_property: top, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + optional_property: top, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs index 02affb29..c3577ae2 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs @@ -67,6 +67,18 @@ module FinchAPI ?updated_at: Time ) -> void + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type, + priority: Integer, + updated_at: Time + } + type attributes = { metadata: ::Hash[Symbol, top] } class Attributes < FinchAPI::Internal::Type::BaseModel @@ -75,6 +87,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } end type condition = @@ -105,6 +119,12 @@ module FinchAPI ?value: String ) -> void + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator, + value: String + } + type operator = :equals module Operator diff --git a/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs index 90b1e908..70b65247 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs @@ -4,7 +4,7 @@ module FinchAPI module Company type pay_statement_item_list_params = { - categories: ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category], + categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], end_date: Date, name: String, start_date: Date, @@ -16,11 +16,11 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - attr_reader categories: ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category]? + attr_reader categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category]? def categories=: ( - ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category] - ) -> ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category] + ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category] + ) -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category] attr_reader end_date: Date? @@ -39,7 +39,7 @@ module FinchAPI def type=: (String) -> String def initialize: ( - ?categories: ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category], + ?categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], ?end_date: Date, ?name: String, ?start_date: Date, @@ -47,6 +47,15 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], + end_date: Date, + name: String, + start_date: Date, + type: String, + request_options: FinchAPI::RequestOptions + } + type category = :earnings | :taxes | :employee_deductions | :employer_contributions @@ -58,7 +67,7 @@ module FinchAPI EMPLOYEE_DEDUCTIONS: :employee_deductions EMPLOYER_CONTRIBUTIONS: :employer_contributions - def self?.values: -> ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category] end end end diff --git a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs index 75713a6d..85036142 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs @@ -32,6 +32,12 @@ module FinchAPI ?name: String ) -> void + def to_hash: -> { + attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category, + name: String + } + type attributes = { employer: bool?, @@ -55,6 +61,13 @@ module FinchAPI ?pre_tax: bool?, ?type: String? ) -> void + + def to_hash: -> { + employer: bool?, + metadata: ::Hash[Symbol, top?]?, + pre_tax: bool?, + type: String? + } end type category = diff --git a/sig/finch_api/models/hris/company_benefit.rbs b/sig/finch_api/models/hris/company_benefit.rbs index 4d4b3086..b7004711 100644 --- a/sig/finch_api/models/hris/company_benefit.rbs +++ b/sig/finch_api/models/hris/company_benefit.rbs @@ -29,10 +29,18 @@ module FinchAPI type: FinchAPI::Models::HRIS::benefit_type? ) -> void + def to_hash: -> { + benefit_id: String, + company_contribution: FinchAPI::HRIS::CompanyBenefit::CompanyContribution?, + description: String?, + frequency: FinchAPI::Models::HRIS::benefit_frequency?, + type: FinchAPI::Models::HRIS::benefit_type? + } + type company_contribution = { tiers: ::Array[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier], - type: FinchAPI::HRIS::CompanyBenefit::CompanyContribution::type_ + type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ } class CompanyContribution < FinchAPI::Internal::Type::BaseModel @@ -42,17 +50,22 @@ module FinchAPI ::Array[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier] ) -> ::Array[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier] - attr_reader type: FinchAPI::HRIS::CompanyBenefit::CompanyContribution::type_? + attr_reader type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_? def type=: ( - FinchAPI::HRIS::CompanyBenefit::CompanyContribution::type_ - ) -> FinchAPI::HRIS::CompanyBenefit::CompanyContribution::type_ + FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ + ) -> FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ def initialize: ( ?tiers: ::Array[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier], - ?type: FinchAPI::HRIS::CompanyBenefit::CompanyContribution::type_ + ?type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ ) -> void + def to_hash: -> { + tiers: ::Array[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier], + type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ + } + type tier = { match: Integer, threshold: Integer } class Tier < FinchAPI::Internal::Type::BaseModel @@ -65,6 +78,8 @@ module FinchAPI def threshold=: (Integer) -> Integer def initialize: (?match: Integer, ?threshold: Integer) -> void + + def to_hash: -> { match: Integer, threshold: Integer } end type type_ = :match @@ -74,7 +89,7 @@ module FinchAPI MATCH: :match - def self?.values: -> ::Array[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_] end end end diff --git a/sig/finch_api/models/hris/company_retrieve_params.rbs b/sig/finch_api/models/hris/company_retrieve_params.rbs index f7a69c91..6023d525 100644 --- a/sig/finch_api/models/hris/company_retrieve_params.rbs +++ b/sig/finch_api/models/hris/company_retrieve_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/create_company_benefits_response.rbs b/sig/finch_api/models/hris/create_company_benefits_response.rbs index 5cba537b..a2818dc1 100644 --- a/sig/finch_api/models/hris/create_company_benefits_response.rbs +++ b/sig/finch_api/models/hris/create_company_benefits_response.rbs @@ -10,6 +10,8 @@ module FinchAPI attr_accessor job_id: String def initialize: (benefit_id: String, job_id: String) -> void + + def to_hash: -> { benefit_id: String, job_id: String } end end end diff --git a/sig/finch_api/models/hris/directory_list_individuals_params.rbs b/sig/finch_api/models/hris/directory_list_individuals_params.rbs index 8a0e14c0..04bf1cb6 100644 --- a/sig/finch_api/models/hris/directory_list_individuals_params.rbs +++ b/sig/finch_api/models/hris/directory_list_individuals_params.rbs @@ -22,6 +22,12 @@ module FinchAPI ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + limit: Integer, + offset: Integer, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/directory_list_params.rbs b/sig/finch_api/models/hris/directory_list_params.rbs index dd9e479b..89009e6a 100644 --- a/sig/finch_api/models/hris/directory_list_params.rbs +++ b/sig/finch_api/models/hris/directory_list_params.rbs @@ -22,6 +22,12 @@ module FinchAPI ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + limit: Integer, + offset: Integer, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/document_list_params.rbs b/sig/finch_api/models/hris/document_list_params.rbs index b3dff5fc..1d5b7b00 100644 --- a/sig/finch_api/models/hris/document_list_params.rbs +++ b/sig/finch_api/models/hris/document_list_params.rbs @@ -6,7 +6,7 @@ module FinchAPI individual_ids: ::Array[String], limit: Integer, offset: Integer, - types: ::Array[FinchAPI::HRIS::DocumentListParams::type_] + types: ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_] } & FinchAPI::Internal::Type::request_parameters @@ -26,20 +26,28 @@ module FinchAPI def offset=: (Integer) -> Integer - attr_reader types: ::Array[FinchAPI::HRIS::DocumentListParams::type_]? + attr_reader types: ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_]? def types=: ( - ::Array[FinchAPI::HRIS::DocumentListParams::type_] - ) -> ::Array[FinchAPI::HRIS::DocumentListParams::type_] + ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_] + ) -> ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_] def initialize: ( ?individual_ids: ::Array[String], ?limit: Integer, ?offset: Integer, - ?types: ::Array[FinchAPI::HRIS::DocumentListParams::type_], + ?types: ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_], ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + individual_ids: ::Array[String], + limit: Integer, + offset: Integer, + types: ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_], + request_options: FinchAPI::RequestOptions + } + type type_ = :w4_2020 | :w4_2005 module Type @@ -48,7 +56,7 @@ module FinchAPI W4_2020: :w4_2020 W4_2005: :w4_2005 - def self?.values: -> ::Array[FinchAPI::HRIS::DocumentListParams::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_] end end end diff --git a/sig/finch_api/models/hris/document_list_response.rbs b/sig/finch_api/models/hris/document_list_response.rbs index 992fa975..07ab2706 100644 --- a/sig/finch_api/models/hris/document_list_response.rbs +++ b/sig/finch_api/models/hris/document_list_response.rbs @@ -16,6 +16,11 @@ module FinchAPI documents: ::Array[FinchAPI::HRIS::DocumentResponse], paging: FinchAPI::Paging ) -> void + + def to_hash: -> { + documents: ::Array[FinchAPI::HRIS::DocumentResponse], + paging: FinchAPI::Paging + } end end end diff --git a/sig/finch_api/models/hris/document_response.rbs b/sig/finch_api/models/hris/document_response.rbs index 909385c8..733c19a3 100644 --- a/sig/finch_api/models/hris/document_response.rbs +++ b/sig/finch_api/models/hris/document_response.rbs @@ -5,7 +5,7 @@ module FinchAPI { id: String, individual_id: String?, - type: FinchAPI::HRIS::DocumentResponse::type_, + type: FinchAPI::Models::HRIS::DocumentResponse::type_, url: String, year: Float? } @@ -17,11 +17,11 @@ module FinchAPI attr_accessor individual_id: String? - attr_reader type: FinchAPI::HRIS::DocumentResponse::type_? + attr_reader type: FinchAPI::Models::HRIS::DocumentResponse::type_? def type=: ( - FinchAPI::HRIS::DocumentResponse::type_ - ) -> FinchAPI::HRIS::DocumentResponse::type_ + FinchAPI::Models::HRIS::DocumentResponse::type_ + ) -> FinchAPI::Models::HRIS::DocumentResponse::type_ attr_reader url: String? @@ -32,11 +32,19 @@ module FinchAPI def initialize: ( ?id: String, ?individual_id: String?, - ?type: FinchAPI::HRIS::DocumentResponse::type_, + ?type: FinchAPI::Models::HRIS::DocumentResponse::type_, ?url: String, ?year: Float? ) -> void + def to_hash: -> { + id: String, + individual_id: String?, + type: FinchAPI::Models::HRIS::DocumentResponse::type_, + url: String, + year: Float? + } + type type_ = :w4_2020 | :w4_2005 module Type @@ -45,7 +53,7 @@ module FinchAPI W4_2020: :w4_2020 W4_2005: :w4_2005 - def self?.values: -> ::Array[FinchAPI::HRIS::DocumentResponse::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::DocumentResponse::type_] end end end diff --git a/sig/finch_api/models/hris/document_retreive_params.rbs b/sig/finch_api/models/hris/document_retreive_params.rbs index f8383893..fe934d4e 100644 --- a/sig/finch_api/models/hris/document_retreive_params.rbs +++ b/sig/finch_api/models/hris/document_retreive_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/hris/employment_data.rbs b/sig/finch_api/models/hris/employment_data.rbs index 6d85a97b..3bd584f5 100644 --- a/sig/finch_api/models/hris/employment_data.rbs +++ b/sig/finch_api/models/hris/employment_data.rbs @@ -15,7 +15,7 @@ module FinchAPI custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, - employment_status: FinchAPI::HRIS::EmploymentData::UnionMember0::employment_status?, + employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, end_date: String?, first_name: String?, is_active: bool?, @@ -43,7 +43,7 @@ module FinchAPI attr_accessor employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment? - attr_accessor employment_status: FinchAPI::HRIS::EmploymentData::UnionMember0::employment_status? + attr_accessor employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status? attr_accessor end_date: String? @@ -79,7 +79,7 @@ module FinchAPI custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, - employment_status: FinchAPI::HRIS::EmploymentData::UnionMember0::employment_status?, + employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, end_date: String?, first_name: String?, is_active: bool?, @@ -96,28 +96,56 @@ module FinchAPI ?source_id: String? ) -> void + def to_hash: -> { + id: String, + class_code: String?, + custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, + department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, + employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, + employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, + end_date: String?, + first_name: String?, + is_active: bool?, + last_name: String?, + latest_rehire_date: String?, + location: FinchAPI::Location?, + manager: FinchAPI::HRIS::EmploymentData::UnionMember0::Manager?, + middle_name: String?, + start_date: String?, + title: String?, + work_id: String?, + income: FinchAPI::Income?, + income_history: ::Array[FinchAPI::Income?]?, + source_id: String? + } + type custom_field = { name: String?, - value: FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::value? + value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? } class CustomField < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? - attr_accessor value: FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::value? + attr_accessor value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? def initialize: ( ?name: String?, - ?value: FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::value? + ?value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? ) -> void + def to_hash: -> { + name: String?, + value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + } + type value = (String | ::Array[top] | top | Float | bool)? module Value extend FinchAPI::Internal::Type::Union - def self?.variants: -> ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::value] + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value] UnionMember1Array: FinchAPI::Internal::Type::Converter end @@ -129,24 +157,31 @@ module FinchAPI attr_accessor name: String? def initialize: (name: String?) -> void + + def to_hash: -> { name: String? } end type employment = { - subtype: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::subtype?, - type: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::type_? + subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype?, + type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? } class Employment < FinchAPI::Internal::Type::BaseModel - attr_accessor subtype: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::subtype? + attr_accessor subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype? - attr_accessor type: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::type_? + attr_accessor type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? def initialize: ( - subtype: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::subtype?, - type: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::type_? + subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype?, + type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype?, + type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? + } + type subtype = :full_time | :intern @@ -165,7 +200,7 @@ module FinchAPI SEASONAL: :seasonal INDIVIDUAL_CONTRACTOR: :individual_contractor - def self?.values: -> ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::subtype] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype] end type type_ = :employee | :contractor @@ -176,7 +211,7 @@ module FinchAPI EMPLOYEE: :employee CONTRACTOR: :contractor - def self?.values: -> ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_] end end @@ -200,7 +235,7 @@ module FinchAPI RETIRED: :retired TERMINATED: :terminated - def self?.values: -> ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::employment_status] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status] end type manager = { id: String } @@ -209,6 +244,8 @@ module FinchAPI attr_accessor id: String def initialize: (id: String) -> void + + def to_hash: -> { id: String } end end @@ -232,6 +269,13 @@ module FinchAPI name: String, ?finch_code: String ) -> void + + def to_hash: -> { + code: Float, + message: String, + name: String, + finch_code: String + } end def self?.variants: -> ::Array[FinchAPI::Models::HRIS::employment_data] diff --git a/sig/finch_api/models/hris/employment_data_response.rbs b/sig/finch_api/models/hris/employment_data_response.rbs index 58fce503..3eaad9ab 100644 --- a/sig/finch_api/models/hris/employment_data_response.rbs +++ b/sig/finch_api/models/hris/employment_data_response.rbs @@ -20,6 +20,12 @@ module FinchAPI code: Integer, individual_id: String ) -> void + + def to_hash: -> { + body: FinchAPI::Models::HRIS::employment_data, + code: Integer, + individual_id: String + } end end end diff --git a/sig/finch_api/models/hris/employment_retrieve_many_params.rbs b/sig/finch_api/models/hris/employment_retrieve_many_params.rbs index 1ca4bad6..6ae7ab0d 100644 --- a/sig/finch_api/models/hris/employment_retrieve_many_params.rbs +++ b/sig/finch_api/models/hris/employment_retrieve_many_params.rbs @@ -18,12 +18,19 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request], + request_options: FinchAPI::RequestOptions + } + type request = { individual_id: String } class Request < FinchAPI::Internal::Type::BaseModel attr_accessor individual_id: String def initialize: (individual_id: String) -> void + + def to_hash: -> { individual_id: String } end end end diff --git a/sig/finch_api/models/hris/individual.rbs b/sig/finch_api/models/hris/individual.rbs index 439efbdb..bc63b865 100644 --- a/sig/finch_api/models/hris/individual.rbs +++ b/sig/finch_api/models/hris/individual.rbs @@ -12,9 +12,9 @@ module FinchAPI { id: String, dob: String?, - ethnicity: FinchAPI::HRIS::Individual::UnionMember0::ethnicity?, + ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, first_name: String?, - gender: FinchAPI::HRIS::Individual::UnionMember0::gender?, + gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, last_name: String?, middle_name: String?, phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]?, @@ -30,11 +30,11 @@ module FinchAPI attr_accessor dob: String? - attr_accessor ethnicity: FinchAPI::HRIS::Individual::UnionMember0::ethnicity? + attr_accessor ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity? attr_accessor first_name: String? - attr_accessor gender: FinchAPI::HRIS::Individual::UnionMember0::gender? + attr_accessor gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender? attr_accessor last_name: String? @@ -55,9 +55,9 @@ module FinchAPI def initialize: ( id: String, dob: String?, - ethnicity: FinchAPI::HRIS::Individual::UnionMember0::ethnicity?, + ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, first_name: String?, - gender: FinchAPI::HRIS::Individual::UnionMember0::gender?, + gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, last_name: String?, middle_name: String?, phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]?, @@ -68,6 +68,22 @@ module FinchAPI ?ssn: String? ) -> void + def to_hash: -> { + id: String, + dob: String?, + ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, + first_name: String?, + gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, + last_name: String?, + middle_name: String?, + phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]?, + preferred_name: String?, + residence: FinchAPI::Location?, + emails: ::Array[FinchAPI::HRIS::Individual::UnionMember0::Email]?, + encrypted_ssn: String?, + ssn: String? + } + type ethnicity = :asian | :white @@ -90,7 +106,7 @@ module FinchAPI TWO_OR_MORE_RACES: :two_or_more_races DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::HRIS::Individual::UnionMember0::ethnicity] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity] end type gender = :female | :male | :other | :decline_to_specify @@ -103,25 +119,30 @@ module FinchAPI OTHER: :other DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::HRIS::Individual::UnionMember0::gender] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::gender] end type phone_number = { data: String?, - type: FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::type_? + type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? } class PhoneNumber < FinchAPI::Internal::Type::BaseModel attr_accessor data: String? - attr_accessor type: FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::type_? + attr_accessor type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? def initialize: ( data: String?, - type: FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::type_? + type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? ) -> void + def to_hash: -> { + data: String?, + type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + } + type type_ = :work | :personal module Type @@ -130,26 +151,31 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_] end end type email = { data: String, - type: FinchAPI::HRIS::Individual::UnionMember0::Email::type_? + type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? } class Email < FinchAPI::Internal::Type::BaseModel attr_accessor data: String - attr_accessor type: FinchAPI::HRIS::Individual::UnionMember0::Email::type_? + attr_accessor type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? def initialize: ( data: String, - type: FinchAPI::HRIS::Individual::UnionMember0::Email::type_? + type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? ) -> void + def to_hash: -> { + data: String, + type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + } + type type_ = :work | :personal module Type @@ -158,7 +184,7 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::HRIS::Individual::UnionMember0::Email::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_] end end end @@ -183,6 +209,13 @@ module FinchAPI name: String, ?finch_code: String ) -> void + + def to_hash: -> { + code: Float, + message: String, + name: String, + finch_code: String + } end def self?.variants: -> ::Array[FinchAPI::Models::HRIS::individual] diff --git a/sig/finch_api/models/hris/individual_in_directory.rbs b/sig/finch_api/models/hris/individual_in_directory.rbs index 1339b5c5..591c2956 100644 --- a/sig/finch_api/models/hris/individual_in_directory.rbs +++ b/sig/finch_api/models/hris/individual_in_directory.rbs @@ -37,12 +37,24 @@ module FinchAPI middle_name: String? ) -> void + def to_hash: -> { + id: String, + department: FinchAPI::HRIS::IndividualInDirectory::Department?, + first_name: String?, + is_active: bool?, + last_name: String?, + manager: FinchAPI::HRIS::IndividualInDirectory::Manager?, + middle_name: String? + } + type department = { name: String? } class Department < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? def initialize: (?name: String?) -> void + + def to_hash: -> { name: String? } end type manager = { id: String } @@ -51,6 +63,8 @@ module FinchAPI attr_accessor id: String def initialize: (id: String) -> void + + def to_hash: -> { id: String } end end end diff --git a/sig/finch_api/models/hris/individual_response.rbs b/sig/finch_api/models/hris/individual_response.rbs index 25287ab6..8de39157 100644 --- a/sig/finch_api/models/hris/individual_response.rbs +++ b/sig/finch_api/models/hris/individual_response.rbs @@ -20,6 +20,12 @@ module FinchAPI code: Integer, individual_id: String ) -> void + + def to_hash: -> { + body: FinchAPI::Models::HRIS::individual, + code: Integer, + individual_id: String + } end end end diff --git a/sig/finch_api/models/hris/individual_retrieve_many_params.rbs b/sig/finch_api/models/hris/individual_retrieve_many_params.rbs index 49c25a4e..3521fc38 100644 --- a/sig/finch_api/models/hris/individual_retrieve_many_params.rbs +++ b/sig/finch_api/models/hris/individual_retrieve_many_params.rbs @@ -26,6 +26,12 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, + requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], + request_options: FinchAPI::RequestOptions + } + type options = { include: ::Array[String] } class Options < FinchAPI::Internal::Type::BaseModel @@ -34,6 +40,8 @@ module FinchAPI def include=: (::Array[String]) -> ::Array[String] def initialize: (?include: ::Array[String]) -> void + + def to_hash: -> { include: ::Array[String] } end type request = { individual_id: String } @@ -44,6 +52,8 @@ module FinchAPI def individual_id=: (String) -> String def initialize: (?individual_id: String) -> void + + def to_hash: -> { individual_id: String } end end end diff --git a/sig/finch_api/models/hris/pay_statement.rbs b/sig/finch_api/models/hris/pay_statement.rbs index f8b18b32..f73ec03b 100644 --- a/sig/finch_api/models/hris/pay_statement.rbs +++ b/sig/finch_api/models/hris/pay_statement.rbs @@ -9,10 +9,10 @@ module FinchAPI gross_pay: FinchAPI::Money?, individual_id: String, net_pay: FinchAPI::Money?, - payment_method: FinchAPI::HRIS::PayStatement::payment_method?, + payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, total_hours: Float?, - type: FinchAPI::HRIS::PayStatement::type_? + type: FinchAPI::Models::HRIS::PayStatement::type_? } class PayStatement < FinchAPI::Internal::Type::BaseModel @@ -30,13 +30,13 @@ module FinchAPI attr_accessor net_pay: FinchAPI::Money? - attr_accessor payment_method: FinchAPI::HRIS::PayStatement::payment_method? + attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method? attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]? attr_accessor total_hours: Float? - attr_accessor type: FinchAPI::HRIS::PayStatement::type_? + attr_accessor type: FinchAPI::Models::HRIS::PayStatement::type_? def initialize: ( ?earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, @@ -45,12 +45,25 @@ module FinchAPI ?gross_pay: FinchAPI::Money?, ?individual_id: String, ?net_pay: FinchAPI::Money?, - ?payment_method: FinchAPI::HRIS::PayStatement::payment_method?, + ?payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, ?taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, ?total_hours: Float?, - ?type: FinchAPI::HRIS::PayStatement::type_? + ?type: FinchAPI::Models::HRIS::PayStatement::type_? ) -> void + def to_hash: -> { + earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatement::type_? + } + type earning = { amount: Integer?, @@ -58,7 +71,7 @@ module FinchAPI currency: String?, hours: Float?, name: String?, - type: FinchAPI::HRIS::PayStatement::Earning::type_? + type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? } class Earning < FinchAPI::Internal::Type::BaseModel @@ -72,7 +85,7 @@ module FinchAPI attr_accessor name: String? - attr_accessor type: FinchAPI::HRIS::PayStatement::Earning::type_? + attr_accessor type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? def initialize: ( ?amount: Integer?, @@ -80,9 +93,18 @@ module FinchAPI ?currency: String?, ?hours: Float?, ?name: String?, - ?type: FinchAPI::HRIS::PayStatement::Earning::type_? + ?type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? + } + type attributes = { metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata @@ -99,6 +121,10 @@ module FinchAPI ?metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -107,6 +133,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end @@ -142,7 +170,7 @@ module FinchAPI TYPE_1099: :"1099" OTHER: :other - def self?.values: -> ::Array[FinchAPI::HRIS::PayStatement::Earning::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::Earning::type_] end end @@ -178,6 +206,15 @@ module FinchAPI ?type: FinchAPI::Models::HRIS::benefit_type? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type? + } + type attributes = { metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata @@ -194,6 +231,10 @@ module FinchAPI ?metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -202,6 +243,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end end @@ -234,6 +277,14 @@ module FinchAPI ?type: FinchAPI::Models::HRIS::benefit_type? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes?, + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type? + } + type attributes = { metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata @@ -250,6 +301,10 @@ module FinchAPI ?metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -258,6 +313,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end end @@ -271,7 +328,7 @@ module FinchAPI DIRECT_DEPOSIT: :direct_deposit OTHER: :other - def self?.values: -> ::Array[FinchAPI::HRIS::PayStatement::payment_method] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::payment_method] end type tax = @@ -281,7 +338,7 @@ module FinchAPI currency: String?, employer: bool?, name: String?, - type: FinchAPI::HRIS::PayStatement::Tax::type_? + type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? } class Tax < FinchAPI::Internal::Type::BaseModel @@ -295,7 +352,7 @@ module FinchAPI attr_accessor name: String? - attr_accessor type: FinchAPI::HRIS::PayStatement::Tax::type_? + attr_accessor type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? def initialize: ( ?amount: Integer?, @@ -303,9 +360,18 @@ module FinchAPI ?currency: String?, ?employer: bool?, ?name: String?, - ?type: FinchAPI::HRIS::PayStatement::Tax::type_? + ?type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes?, + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? + } + type attributes = { metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata @@ -322,6 +388,10 @@ module FinchAPI ?metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -330,6 +400,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end @@ -343,7 +415,7 @@ module FinchAPI LOCAL: :local FICA: :fica - def self?.values: -> ::Array[FinchAPI::HRIS::PayStatement::Tax::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::Tax::type_] end end @@ -356,7 +428,7 @@ module FinchAPI OFF_CYCLE_PAYROLL: :off_cycle_payroll ONE_TIME_PAYMENT: :one_time_payment - def self?.values: -> ::Array[FinchAPI::HRIS::PayStatement::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::type_] end end end diff --git a/sig/finch_api/models/hris/pay_statement_response.rbs b/sig/finch_api/models/hris/pay_statement_response.rbs index 16a109ce..1960cfca 100644 --- a/sig/finch_api/models/hris/pay_statement_response.rbs +++ b/sig/finch_api/models/hris/pay_statement_response.rbs @@ -28,6 +28,12 @@ module FinchAPI ?code: Integer, ?payment_id: String ) -> void + + def to_hash: -> { + body: FinchAPI::HRIS::PayStatementResponseBody, + code: Integer, + payment_id: String + } end end end diff --git a/sig/finch_api/models/hris/pay_statement_response_body.rbs b/sig/finch_api/models/hris/pay_statement_response_body.rbs index 03b7d292..621debcc 100644 --- a/sig/finch_api/models/hris/pay_statement_response_body.rbs +++ b/sig/finch_api/models/hris/pay_statement_response_body.rbs @@ -22,6 +22,11 @@ module FinchAPI ?paging: FinchAPI::Paging, ?pay_statements: ::Array[FinchAPI::HRIS::PayStatement] ) -> void + + def to_hash: -> { + paging: FinchAPI::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatement] + } end end end diff --git a/sig/finch_api/models/hris/pay_statement_retrieve_many_params.rbs b/sig/finch_api/models/hris/pay_statement_retrieve_many_params.rbs index 7289e702..e25c327b 100644 --- a/sig/finch_api/models/hris/pay_statement_retrieve_many_params.rbs +++ b/sig/finch_api/models/hris/pay_statement_retrieve_many_params.rbs @@ -18,6 +18,11 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request], + request_options: FinchAPI::RequestOptions + } + type request = { payment_id: String, limit: Integer, offset: Integer } class Request < FinchAPI::Internal::Type::BaseModel @@ -36,6 +41,12 @@ module FinchAPI ?limit: Integer, ?offset: Integer ) -> void + + def to_hash: -> { + payment_id: String, + limit: Integer, + offset: Integer + } end end end diff --git a/sig/finch_api/models/hris/payment.rbs b/sig/finch_api/models/hris/payment.rbs index 8950479b..354bddda 100644 --- a/sig/finch_api/models/hris/payment.rbs +++ b/sig/finch_api/models/hris/payment.rbs @@ -12,7 +12,7 @@ module FinchAPI individual_ids: ::Array[String]?, net_pay: FinchAPI::Money?, pay_date: String?, - pay_frequencies: ::Array[FinchAPI::HRIS::Payment::pay_frequency]?, + pay_frequencies: ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency]?, pay_group_ids: ::Array[String]?, pay_period: FinchAPI::HRIS::Payment::PayPeriod? } @@ -38,7 +38,7 @@ module FinchAPI attr_accessor pay_date: String? - attr_accessor pay_frequencies: ::Array[FinchAPI::HRIS::Payment::pay_frequency]? + attr_accessor pay_frequencies: ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency]? attr_accessor pay_group_ids: ::Array[String]? @@ -54,11 +54,26 @@ module FinchAPI ?individual_ids: ::Array[String]?, ?net_pay: FinchAPI::Money?, ?pay_date: String?, - ?pay_frequencies: ::Array[FinchAPI::HRIS::Payment::pay_frequency]?, + ?pay_frequencies: ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency]?, ?pay_group_ids: ::Array[String]?, ?pay_period: FinchAPI::HRIS::Payment::PayPeriod? ) -> void + def to_hash: -> { + id: String, + company_debit: FinchAPI::Money?, + debit_date: String?, + employee_taxes: FinchAPI::Money?, + employer_taxes: FinchAPI::Money?, + gross_pay: FinchAPI::Money?, + individual_ids: ::Array[String]?, + net_pay: FinchAPI::Money?, + pay_date: String?, + pay_frequencies: ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency]?, + pay_group_ids: ::Array[String]?, + pay_period: FinchAPI::HRIS::Payment::PayPeriod? + } + type pay_frequency = :annually | :semi_annually @@ -83,7 +98,7 @@ module FinchAPI DAILY: :daily OTHER: :other - def self?.values: -> ::Array[FinchAPI::HRIS::Payment::pay_frequency] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency] end type pay_period = { end_date: String?, start_date: String? } @@ -94,6 +109,8 @@ module FinchAPI attr_accessor start_date: String? def initialize: (?end_date: String?, ?start_date: String?) -> void + + def to_hash: -> { end_date: String?, start_date: String? } end end end diff --git a/sig/finch_api/models/hris/payment_list_params.rbs b/sig/finch_api/models/hris/payment_list_params.rbs index 41801d09..bb12db5c 100644 --- a/sig/finch_api/models/hris/payment_list_params.rbs +++ b/sig/finch_api/models/hris/payment_list_params.rbs @@ -18,6 +18,12 @@ module FinchAPI start_date: Date, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + end_date: Date, + start_date: Date, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/support_per_benefit_type.rbs b/sig/finch_api/models/hris/support_per_benefit_type.rbs index 89374b9b..923133a7 100644 --- a/sig/finch_api/models/hris/support_per_benefit_type.rbs +++ b/sig/finch_api/models/hris/support_per_benefit_type.rbs @@ -24,6 +24,11 @@ module FinchAPI ?company_benefits: FinchAPI::OperationSupportMatrix, ?individual_benefits: FinchAPI::OperationSupportMatrix ) -> void + + def to_hash: -> { + company_benefits: FinchAPI::OperationSupportMatrix, + individual_benefits: FinchAPI::OperationSupportMatrix + } end end end diff --git a/sig/finch_api/models/hris/supported_benefit.rbs b/sig/finch_api/models/hris/supported_benefit.rbs index 04a64638..d4a7572d 100644 --- a/sig/finch_api/models/hris/supported_benefit.rbs +++ b/sig/finch_api/models/hris/supported_benefit.rbs @@ -5,11 +5,11 @@ module FinchAPI { annual_maximum: bool?, catch_up: bool?, - company_contribution: ::Array[FinchAPI::HRIS::SupportedBenefit::company_contribution?]?, + company_contribution: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::company_contribution?]?, description: String?, - employee_deduction: ::Array[FinchAPI::HRIS::SupportedBenefit::employee_deduction?]?, + employee_deduction: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::employee_deduction?]?, frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - hsa_contribution_limit: ::Array[FinchAPI::HRIS::SupportedBenefit::hsa_contribution_limit?]? + hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::hsa_contribution_limit?]? } class SupportedBenefit < FinchAPI::Internal::Type::BaseModel @@ -17,11 +17,11 @@ module FinchAPI attr_accessor catch_up: bool? - attr_accessor company_contribution: ::Array[FinchAPI::HRIS::SupportedBenefit::company_contribution?]? + attr_accessor company_contribution: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::company_contribution?]? attr_accessor description: String? - attr_accessor employee_deduction: ::Array[FinchAPI::HRIS::SupportedBenefit::employee_deduction?]? + attr_accessor employee_deduction: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::employee_deduction?]? attr_reader frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?]? @@ -29,18 +29,28 @@ module FinchAPI ::Array[FinchAPI::Models::HRIS::benefit_frequency?] ) -> ::Array[FinchAPI::Models::HRIS::benefit_frequency?] - attr_accessor hsa_contribution_limit: ::Array[FinchAPI::HRIS::SupportedBenefit::hsa_contribution_limit?]? + attr_accessor hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::hsa_contribution_limit?]? def initialize: ( ?annual_maximum: bool?, ?catch_up: bool?, - ?company_contribution: ::Array[FinchAPI::HRIS::SupportedBenefit::company_contribution?]?, + ?company_contribution: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::company_contribution?]?, ?description: String?, - ?employee_deduction: ::Array[FinchAPI::HRIS::SupportedBenefit::employee_deduction?]?, + ?employee_deduction: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::employee_deduction?]?, ?frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - ?hsa_contribution_limit: ::Array[FinchAPI::HRIS::SupportedBenefit::hsa_contribution_limit?]? + ?hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::hsa_contribution_limit?]? ) -> void + def to_hash: -> { + annual_maximum: bool?, + catch_up: bool?, + company_contribution: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::company_contribution?]?, + description: String?, + employee_deduction: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::employee_deduction?]?, + frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], + hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::hsa_contribution_limit?]? + } + type company_contribution = :fixed | :percent module CompanyContribution @@ -49,7 +59,7 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::SupportedBenefit::company_contribution] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::SupportedBenefit::company_contribution] end type employee_deduction = :fixed | :percent @@ -60,7 +70,7 @@ module FinchAPI FIXED: :fixed PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::HRIS::SupportedBenefit::employee_deduction] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::SupportedBenefit::employee_deduction] end type hsa_contribution_limit = :individual | :family @@ -71,7 +81,7 @@ module FinchAPI INDIVIDUAL: :individual FAMILY: :family - def self?.values: -> ::Array[FinchAPI::HRIS::SupportedBenefit::hsa_contribution_limit] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::SupportedBenefit::hsa_contribution_limit] end end end diff --git a/sig/finch_api/models/hris/update_company_benefit_response.rbs b/sig/finch_api/models/hris/update_company_benefit_response.rbs index c0093152..124bbd53 100644 --- a/sig/finch_api/models/hris/update_company_benefit_response.rbs +++ b/sig/finch_api/models/hris/update_company_benefit_response.rbs @@ -10,6 +10,8 @@ module FinchAPI attr_accessor job_id: String def initialize: (benefit_id: String, job_id: String) -> void + + def to_hash: -> { benefit_id: String, job_id: String } end end end diff --git a/sig/finch_api/models/hris/w42005.rbs b/sig/finch_api/models/hris/w42005.rbs index 9c20fc61..751c9f1e 100644 --- a/sig/finch_api/models/hris/w42005.rbs +++ b/sig/finch_api/models/hris/w42005.rbs @@ -4,7 +4,7 @@ module FinchAPI type w42005 = { data: FinchAPI::HRIS::W42005::Data, - type: FinchAPI::HRIS::W42005::type_, + type: FinchAPI::Models::HRIS::W42005::type_, year: Float? } @@ -15,25 +15,31 @@ module FinchAPI FinchAPI::HRIS::W42005::Data ) -> FinchAPI::HRIS::W42005::Data - attr_reader type: FinchAPI::HRIS::W42005::type_? + attr_reader type: FinchAPI::Models::HRIS::W42005::type_? def type=: ( - FinchAPI::HRIS::W42005::type_ - ) -> FinchAPI::HRIS::W42005::type_ + FinchAPI::Models::HRIS::W42005::type_ + ) -> FinchAPI::Models::HRIS::W42005::type_ attr_accessor year: Float? def initialize: ( ?data: FinchAPI::HRIS::W42005::Data, - ?type: FinchAPI::HRIS::W42005::type_, + ?type: FinchAPI::Models::HRIS::W42005::type_, ?year: Float? ) -> void + def to_hash: -> { + data: FinchAPI::HRIS::W42005::Data, + type: FinchAPI::Models::HRIS::W42005::type_, + year: Float? + } + type data = { additional_withholding: Integer?, - exemption: FinchAPI::HRIS::W42005::Data::exemption, - filing_status: FinchAPI::HRIS::W42005::Data::filing_status?, + exemption: FinchAPI::Models::HRIS::W42005::Data::exemption, + filing_status: FinchAPI::Models::HRIS::W42005::Data::filing_status?, individual_id: String, total_number_of_allowances: Integer? } @@ -41,13 +47,13 @@ module FinchAPI class Data < FinchAPI::Internal::Type::BaseModel attr_accessor additional_withholding: Integer? - attr_reader exemption: FinchAPI::HRIS::W42005::Data::exemption? + attr_reader exemption: FinchAPI::Models::HRIS::W42005::Data::exemption? def exemption=: ( - FinchAPI::HRIS::W42005::Data::exemption - ) -> FinchAPI::HRIS::W42005::Data::exemption + FinchAPI::Models::HRIS::W42005::Data::exemption + ) -> FinchAPI::Models::HRIS::W42005::Data::exemption - attr_accessor filing_status: FinchAPI::HRIS::W42005::Data::filing_status? + attr_accessor filing_status: FinchAPI::Models::HRIS::W42005::Data::filing_status? attr_reader individual_id: String? @@ -57,12 +63,20 @@ module FinchAPI def initialize: ( ?additional_withholding: Integer?, - ?exemption: FinchAPI::HRIS::W42005::Data::exemption, - ?filing_status: FinchAPI::HRIS::W42005::Data::filing_status?, + ?exemption: FinchAPI::Models::HRIS::W42005::Data::exemption, + ?filing_status: FinchAPI::Models::HRIS::W42005::Data::filing_status?, ?individual_id: String, ?total_number_of_allowances: Integer? ) -> void + def to_hash: -> { + additional_withholding: Integer?, + exemption: FinchAPI::Models::HRIS::W42005::Data::exemption, + filing_status: FinchAPI::Models::HRIS::W42005::Data::filing_status?, + individual_id: String, + total_number_of_allowances: Integer? + } + type exemption = :exempt | :non_exempt module Exemption @@ -71,7 +85,7 @@ module FinchAPI EXEMPT: :exempt NON_EXEMPT: :non_exempt - def self?.values: -> ::Array[FinchAPI::HRIS::W42005::Data::exemption] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::W42005::Data::exemption] end type filing_status = @@ -84,7 +98,7 @@ module FinchAPI MARRIED_BUT_WITHHOLD_AT_HIGHER_SINGLE_RATE: :married_but_withhold_at_higher_single_rate SINGLE: :single - def self?.values: -> ::Array[FinchAPI::HRIS::W42005::Data::filing_status] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::W42005::Data::filing_status] end end @@ -95,7 +109,7 @@ module FinchAPI W4_2005: :w4_2005 - def self?.values: -> ::Array[FinchAPI::HRIS::W42005::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::W42005::type_] end end end diff --git a/sig/finch_api/models/hris/w42020.rbs b/sig/finch_api/models/hris/w42020.rbs index 1b4e5367..e959ebe6 100644 --- a/sig/finch_api/models/hris/w42020.rbs +++ b/sig/finch_api/models/hris/w42020.rbs @@ -4,7 +4,7 @@ module FinchAPI type w42020 = { data: FinchAPI::HRIS::W42020::Data, - type: FinchAPI::HRIS::W42020::type_, + type: FinchAPI::Models::HRIS::W42020::type_, year: Float? } @@ -15,27 +15,33 @@ module FinchAPI FinchAPI::HRIS::W42020::Data ) -> FinchAPI::HRIS::W42020::Data - attr_reader type: FinchAPI::HRIS::W42020::type_? + attr_reader type: FinchAPI::Models::HRIS::W42020::type_? def type=: ( - FinchAPI::HRIS::W42020::type_ - ) -> FinchAPI::HRIS::W42020::type_ + FinchAPI::Models::HRIS::W42020::type_ + ) -> FinchAPI::Models::HRIS::W42020::type_ attr_accessor year: Float? def initialize: ( ?data: FinchAPI::HRIS::W42020::Data, - ?type: FinchAPI::HRIS::W42020::type_, + ?type: FinchAPI::Models::HRIS::W42020::type_, ?year: Float? ) -> void + def to_hash: -> { + data: FinchAPI::HRIS::W42020::Data, + type: FinchAPI::Models::HRIS::W42020::type_, + year: Float? + } + type data = { amount_for_other_dependents: Integer?, :amount_for_qualifying_children_under_17 => Integer?, deductions: Integer?, extra_withholding: Integer?, - filing_status: FinchAPI::HRIS::W42020::Data::filing_status?, + filing_status: FinchAPI::Models::HRIS::W42020::Data::filing_status?, individual_id: String, other_income: Integer?, total_claim_dependent_and_other_credits: Integer? @@ -50,7 +56,7 @@ module FinchAPI attr_accessor extra_withholding: Integer? - attr_accessor filing_status: FinchAPI::HRIS::W42020::Data::filing_status? + attr_accessor filing_status: FinchAPI::Models::HRIS::W42020::Data::filing_status? attr_reader individual_id: String? @@ -65,12 +71,23 @@ module FinchAPI ?amount_for_qualifying_children_under_17: Integer?, ?deductions: Integer?, ?extra_withholding: Integer?, - ?filing_status: FinchAPI::HRIS::W42020::Data::filing_status?, + ?filing_status: FinchAPI::Models::HRIS::W42020::Data::filing_status?, ?individual_id: String, ?other_income: Integer?, ?total_claim_dependent_and_other_credits: Integer? ) -> void + def to_hash: -> { + amount_for_other_dependents: Integer?, + :amount_for_qualifying_children_under_17 => Integer?, + deductions: Integer?, + extra_withholding: Integer?, + filing_status: FinchAPI::Models::HRIS::W42020::Data::filing_status?, + individual_id: String, + other_income: Integer?, + total_claim_dependent_and_other_credits: Integer? + } + type filing_status = :head_of_household | :married_filing_jointly_or_qualifying_surviving_spouse @@ -83,7 +100,7 @@ module FinchAPI MARRIED_FILING_JOINTLY_OR_QUALIFYING_SURVIVING_SPOUSE: :married_filing_jointly_or_qualifying_surviving_spouse SINGLE_OR_MARRIED_FILING_SEPARATELY: :single_or_married_filing_separately - def self?.values: -> ::Array[FinchAPI::HRIS::W42020::Data::filing_status] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::W42020::Data::filing_status] end end @@ -94,7 +111,7 @@ module FinchAPI W4_2020: :w4_2020 - def self?.values: -> ::Array[FinchAPI::HRIS::W42020::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::W42020::type_] end end end diff --git a/sig/finch_api/models/income.rbs b/sig/finch_api/models/income.rbs index dcb1e7a1..39a02ed5 100644 --- a/sig/finch_api/models/income.rbs +++ b/sig/finch_api/models/income.rbs @@ -5,7 +5,7 @@ module FinchAPI amount: Integer?, currency: String?, effective_date: String?, - unit: FinchAPI::Income::unit? + unit: FinchAPI::Models::Income::unit? } class Income < FinchAPI::Internal::Type::BaseModel @@ -15,15 +15,22 @@ module FinchAPI attr_accessor effective_date: String? - attr_accessor unit: FinchAPI::Income::unit? + attr_accessor unit: FinchAPI::Models::Income::unit? def initialize: ( amount: Integer?, currency: String?, effective_date: String?, - unit: FinchAPI::Income::unit? + unit: FinchAPI::Models::Income::unit? ) -> void + def to_hash: -> { + amount: Integer?, + currency: String?, + effective_date: String?, + unit: FinchAPI::Models::Income::unit? + } + type unit = :yearly | :quarterly @@ -48,7 +55,7 @@ module FinchAPI HOURLY: :hourly FIXED: :fixed - def self?.values: -> ::Array[FinchAPI::Income::unit] + def self?.values: -> ::Array[FinchAPI::Models::Income::unit] end end end diff --git a/sig/finch_api/models/individual_event.rbs b/sig/finch_api/models/individual_event.rbs index 263e53bd..d438841b 100644 --- a/sig/finch_api/models/individual_event.rbs +++ b/sig/finch_api/models/individual_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type individual_event = { data: FinchAPI::IndividualEvent::Data, - event_type: FinchAPI::IndividualEvent::event_type + event_type: FinchAPI::Models::IndividualEvent::event_type } class IndividualEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::IndividualEvent::Data _ ) -> FinchAPI::IndividualEvent::Data - def event_type: -> FinchAPI::IndividualEvent::event_type? + def event_type: -> FinchAPI::Models::IndividualEvent::event_type? def event_type=: ( - FinchAPI::IndividualEvent::event_type _ - ) -> FinchAPI::IndividualEvent::event_type + FinchAPI::Models::IndividualEvent::event_type _ + ) -> FinchAPI::Models::IndividualEvent::event_type def initialize: ( ?data: FinchAPI::IndividualEvent::Data, - ?event_type: FinchAPI::IndividualEvent::event_type + ?event_type: FinchAPI::Models::IndividualEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::IndividualEvent::Data, + event_type: FinchAPI::Models::IndividualEvent::event_type + } + type data = { individual_id: String } class Data < FinchAPI::Internal::Type::BaseModel @@ -32,6 +37,8 @@ module FinchAPI def individual_id=: (String) -> String def initialize: (?individual_id: String) -> void + + def to_hash: -> { individual_id: String } end type event_type = @@ -44,7 +51,7 @@ module FinchAPI INDIVIDUAL_UPDATED: :"individual.updated" INDIVIDUAL_DELETED: :"individual.deleted" - def self?.values: -> ::Array[FinchAPI::IndividualEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::IndividualEvent::event_type] end end end diff --git a/sig/finch_api/models/introspection.rbs b/sig/finch_api/models/introspection.rbs index 689c3896..7085f3c2 100644 --- a/sig/finch_api/models/introspection.rbs +++ b/sig/finch_api/models/introspection.rbs @@ -6,11 +6,11 @@ module FinchAPI account_id: String, authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod], client_id: String, - client_type: FinchAPI::Introspection::client_type, + client_type: FinchAPI::Models::Introspection::client_type, company_id: String, connection_id: String, connection_status: FinchAPI::Introspection::ConnectionStatus, - connection_type: FinchAPI::Introspection::connection_type, + connection_type: FinchAPI::Models::Introspection::connection_type, customer_email: String?, customer_id: String?, customer_name: String?, @@ -30,7 +30,7 @@ module FinchAPI attr_accessor client_id: String - attr_accessor client_type: FinchAPI::Introspection::client_type + attr_accessor client_type: FinchAPI::Models::Introspection::client_type attr_accessor company_id: String @@ -38,7 +38,7 @@ module FinchAPI attr_accessor connection_status: FinchAPI::Introspection::ConnectionStatus - attr_accessor connection_type: FinchAPI::Introspection::connection_type + attr_accessor connection_type: FinchAPI::Models::Introspection::connection_type attr_accessor customer_email: String? @@ -61,11 +61,11 @@ module FinchAPI account_id: String, authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod], client_id: String, - client_type: FinchAPI::Introspection::client_type, + client_type: FinchAPI::Models::Introspection::client_type, company_id: String, connection_id: String, connection_status: FinchAPI::Introspection::ConnectionStatus, - connection_type: FinchAPI::Introspection::connection_type, + connection_type: FinchAPI::Models::Introspection::connection_type, customer_email: String?, customer_id: String?, customer_name: String?, @@ -76,11 +76,31 @@ module FinchAPI username: String ) -> void + def to_hash: -> { + id: String, + account_id: String, + authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod], + client_id: String, + client_type: FinchAPI::Models::Introspection::client_type, + company_id: String, + connection_id: String, + connection_status: FinchAPI::Introspection::ConnectionStatus, + connection_type: FinchAPI::Models::Introspection::connection_type, + customer_email: String?, + customer_id: String?, + customer_name: String?, + manual: bool, + payroll_provider_id: String, + products: ::Array[String], + provider_id: String, + username: String + } + type authentication_method = { connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus, products: ::Array[String], - type: FinchAPI::Introspection::AuthenticationMethod::type_ + type: FinchAPI::Models::Introspection::AuthenticationMethod::type_ } class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel @@ -94,18 +114,24 @@ module FinchAPI def products=: (::Array[String]) -> ::Array[String] - attr_reader type: FinchAPI::Introspection::AuthenticationMethod::type_? + attr_reader type: FinchAPI::Models::Introspection::AuthenticationMethod::type_? def type=: ( - FinchAPI::Introspection::AuthenticationMethod::type_ - ) -> FinchAPI::Introspection::AuthenticationMethod::type_ + FinchAPI::Models::Introspection::AuthenticationMethod::type_ + ) -> FinchAPI::Models::Introspection::AuthenticationMethod::type_ def initialize: ( ?connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus, ?products: ::Array[String], - ?type: FinchAPI::Introspection::AuthenticationMethod::type_ + ?type: FinchAPI::Models::Introspection::AuthenticationMethod::type_ ) -> void + def to_hash: -> { + connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus, + products: ::Array[String], + type: FinchAPI::Models::Introspection::AuthenticationMethod::type_ + } + type connection_status = { message: String, status: FinchAPI::Models::connection_status_type } @@ -124,6 +150,11 @@ module FinchAPI ?message: String, ?status: FinchAPI::Models::connection_status_type ) -> void + + def to_hash: -> { + message: String, + status: FinchAPI::Models::connection_status_type + } end type type_ = @@ -138,7 +169,7 @@ module FinchAPI API_CREDENTIAL: :api_credential OAUTH: :oauth - def self?.values: -> ::Array[FinchAPI::Introspection::AuthenticationMethod::type_] + def self?.values: -> ::Array[FinchAPI::Models::Introspection::AuthenticationMethod::type_] end end @@ -151,7 +182,7 @@ module FinchAPI DEVELOPMENT: :development SANDBOX: :sandbox - def self?.values: -> ::Array[FinchAPI::Introspection::client_type] + def self?.values: -> ::Array[FinchAPI::Models::Introspection::client_type] end type connection_status = @@ -181,6 +212,12 @@ module FinchAPI ?message: String, ?status: FinchAPI::Models::connection_status_type ) -> void + + def to_hash: -> { + last_successful_sync: Time, + message: String, + status: FinchAPI::Models::connection_status_type + } end type connection_type = :provider | :finch @@ -191,7 +228,7 @@ module FinchAPI PROVIDER: :provider FINCH: :finch - def self?.values: -> ::Array[FinchAPI::Introspection::connection_type] + def self?.values: -> ::Array[FinchAPI::Models::Introspection::connection_type] end end end diff --git a/sig/finch_api/models/job_completion_event.rbs b/sig/finch_api/models/job_completion_event.rbs index f6870887..94d57afe 100644 --- a/sig/finch_api/models/job_completion_event.rbs +++ b/sig/finch_api/models/job_completion_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type job_completion_event = { data: FinchAPI::JobCompletionEvent::Data, - event_type: FinchAPI::JobCompletionEvent::event_type + event_type: FinchAPI::Models::JobCompletionEvent::event_type } class JobCompletionEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::JobCompletionEvent::Data _ ) -> FinchAPI::JobCompletionEvent::Data - def event_type: -> FinchAPI::JobCompletionEvent::event_type? + def event_type: -> FinchAPI::Models::JobCompletionEvent::event_type? def event_type=: ( - FinchAPI::JobCompletionEvent::event_type _ - ) -> FinchAPI::JobCompletionEvent::event_type + FinchAPI::Models::JobCompletionEvent::event_type _ + ) -> FinchAPI::Models::JobCompletionEvent::event_type def initialize: ( ?data: FinchAPI::JobCompletionEvent::Data, - ?event_type: FinchAPI::JobCompletionEvent::event_type + ?event_type: FinchAPI::Models::JobCompletionEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::JobCompletionEvent::Data, + event_type: FinchAPI::Models::JobCompletionEvent::event_type + } + type data = { job_id: String, job_url: String } class Data < FinchAPI::Internal::Type::BaseModel @@ -32,6 +37,8 @@ module FinchAPI attr_accessor job_url: String def initialize: (job_id: String, job_url: String) -> void + + def to_hash: -> { job_id: String, job_url: String } end type event_type = @@ -52,7 +59,7 @@ module FinchAPI JOB_BENEFIT_UPDATE_COMPLETED: :"job.benefit_update.completed" JOB_DATA_SYNC_ALL_COMPLETED: :"job.data_sync_all.completed" - def self?.values: -> ::Array[FinchAPI::JobCompletionEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::JobCompletionEvent::event_type] end end end diff --git a/sig/finch_api/models/jobs/automated_async_job.rbs b/sig/finch_api/models/jobs/automated_async_job.rbs index 3290f7a1..d46aba43 100644 --- a/sig/finch_api/models/jobs/automated_async_job.rbs +++ b/sig/finch_api/models/jobs/automated_async_job.rbs @@ -10,8 +10,8 @@ module FinchAPI params: FinchAPI::Jobs::AutomatedAsyncJob::Params?, scheduled_at: Time?, started_at: Time?, - status: FinchAPI::Jobs::AutomatedAsyncJob::status, - type: FinchAPI::Jobs::AutomatedAsyncJob::type_ + status: FinchAPI::Models::Jobs::AutomatedAsyncJob::status, + type: FinchAPI::Models::Jobs::AutomatedAsyncJob::type_ } class AutomatedAsyncJob < FinchAPI::Internal::Type::BaseModel @@ -29,9 +29,9 @@ module FinchAPI attr_accessor started_at: Time? - attr_accessor status: FinchAPI::Jobs::AutomatedAsyncJob::status + attr_accessor status: FinchAPI::Models::Jobs::AutomatedAsyncJob::status - attr_accessor type: FinchAPI::Jobs::AutomatedAsyncJob::type_ + attr_accessor type: FinchAPI::Models::Jobs::AutomatedAsyncJob::type_ def initialize: ( completed_at: Time?, @@ -41,10 +41,22 @@ module FinchAPI params: FinchAPI::Jobs::AutomatedAsyncJob::Params?, scheduled_at: Time?, started_at: Time?, - status: FinchAPI::Jobs::AutomatedAsyncJob::status, - type: FinchAPI::Jobs::AutomatedAsyncJob::type_ + status: FinchAPI::Models::Jobs::AutomatedAsyncJob::status, + type: FinchAPI::Models::Jobs::AutomatedAsyncJob::type_ ) -> void + def to_hash: -> { + completed_at: Time?, + created_at: Time, + job_id: String, + job_url: String, + params: FinchAPI::Jobs::AutomatedAsyncJob::Params?, + scheduled_at: Time?, + started_at: Time?, + status: FinchAPI::Models::Jobs::AutomatedAsyncJob::status, + type: FinchAPI::Models::Jobs::AutomatedAsyncJob::type_ + } + type params = { individual_id: String } class Params < FinchAPI::Internal::Type::BaseModel @@ -53,6 +65,8 @@ module FinchAPI def individual_id=: (String) -> String def initialize: (?individual_id: String) -> void + + def to_hash: -> { individual_id: String } end type status = @@ -73,7 +87,7 @@ module FinchAPI REAUTH_ERROR: :reauth_error PERMISSIONS_ERROR: :permissions_error - def self?.values: -> ::Array[FinchAPI::Jobs::AutomatedAsyncJob::status] + def self?.values: -> ::Array[FinchAPI::Models::Jobs::AutomatedAsyncJob::status] end type type_ = :data_sync_all | :w4_form_employee_sync @@ -84,7 +98,7 @@ module FinchAPI DATA_SYNC_ALL: :data_sync_all W4_FORM_EMPLOYEE_SYNC: :w4_form_employee_sync - def self?.values: -> ::Array[FinchAPI::Jobs::AutomatedAsyncJob::type_] + def self?.values: -> ::Array[FinchAPI::Models::Jobs::AutomatedAsyncJob::type_] end end end diff --git a/sig/finch_api/models/jobs/automated_create_params.rbs b/sig/finch_api/models/jobs/automated_create_params.rbs index ae78c312..5cfcf052 100644 --- a/sig/finch_api/models/jobs/automated_create_params.rbs +++ b/sig/finch_api/models/jobs/automated_create_params.rbs @@ -22,6 +22,12 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + type: FinchAPI::Models::Jobs::AutomatedCreateParams::type_, + params: FinchAPI::Jobs::AutomatedCreateParams::Params, + request_options: FinchAPI::RequestOptions + } + type type_ = :w4_form_employee_sync module Type @@ -38,6 +44,8 @@ module FinchAPI attr_accessor individual_id: String def initialize: (individual_id: String) -> void + + def to_hash: -> { individual_id: String } end end end diff --git a/sig/finch_api/models/jobs/automated_create_response.rbs b/sig/finch_api/models/jobs/automated_create_response.rbs index 725ab982..6665be1c 100644 --- a/sig/finch_api/models/jobs/automated_create_response.rbs +++ b/sig/finch_api/models/jobs/automated_create_response.rbs @@ -24,6 +24,13 @@ module FinchAPI job_url: String, remaining_refreshes: Integer ) -> void + + def to_hash: -> { + allowed_refreshes: Integer, + job_id: String, + job_url: String, + remaining_refreshes: Integer + } end end end diff --git a/sig/finch_api/models/jobs/automated_list_params.rbs b/sig/finch_api/models/jobs/automated_list_params.rbs index 8e38d3e7..291e0932 100644 --- a/sig/finch_api/models/jobs/automated_list_params.rbs +++ b/sig/finch_api/models/jobs/automated_list_params.rbs @@ -22,6 +22,12 @@ module FinchAPI ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + limit: Integer, + offset: Integer, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/jobs/automated_list_response.rbs b/sig/finch_api/models/jobs/automated_list_response.rbs index 9d419192..51e2205c 100644 --- a/sig/finch_api/models/jobs/automated_list_response.rbs +++ b/sig/finch_api/models/jobs/automated_list_response.rbs @@ -17,6 +17,11 @@ module FinchAPI meta: FinchAPI::Models::Jobs::AutomatedListResponse::Meta ) -> void + def to_hash: -> { + data: ::Array[FinchAPI::Jobs::AutomatedAsyncJob], + meta: FinchAPI::Models::Jobs::AutomatedListResponse::Meta + } + type meta = { quotas: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas @@ -33,6 +38,10 @@ module FinchAPI ?quotas: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas ) -> void + def to_hash: -> { + quotas: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas + } + type quotas = { data_sync_all: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll @@ -49,6 +58,10 @@ module FinchAPI ?data_sync_all: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll ) -> void + def to_hash: -> { + data_sync_all: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll + } + type data_sync_all = { allowed_refreshes: Integer, remaining_refreshes: Integer } @@ -65,6 +78,11 @@ module FinchAPI ?allowed_refreshes: Integer, ?remaining_refreshes: Integer ) -> void + + def to_hash: -> { + allowed_refreshes: Integer, + remaining_refreshes: Integer + } end end end diff --git a/sig/finch_api/models/jobs/automated_retrieve_params.rbs b/sig/finch_api/models/jobs/automated_retrieve_params.rbs index 50ca0a28..f7c8cfa0 100644 --- a/sig/finch_api/models/jobs/automated_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/automated_retrieve_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/jobs/manual_async_job.rbs b/sig/finch_api/models/jobs/manual_async_job.rbs index 4691897c..9f5c52f7 100644 --- a/sig/finch_api/models/jobs/manual_async_job.rbs +++ b/sig/finch_api/models/jobs/manual_async_job.rbs @@ -5,7 +5,7 @@ module FinchAPI { body: ::Array[top]?, job_id: String, - status: FinchAPI::Jobs::ManualAsyncJob::status + status: FinchAPI::Models::Jobs::ManualAsyncJob::status } class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel @@ -13,14 +13,20 @@ module FinchAPI attr_accessor job_id: String - attr_accessor status: FinchAPI::Jobs::ManualAsyncJob::status + attr_accessor status: FinchAPI::Models::Jobs::ManualAsyncJob::status def initialize: ( body: ::Array[top]?, job_id: String, - status: FinchAPI::Jobs::ManualAsyncJob::status + status: FinchAPI::Models::Jobs::ManualAsyncJob::status ) -> void + def to_hash: -> { + body: ::Array[top]?, + job_id: String, + status: FinchAPI::Models::Jobs::ManualAsyncJob::status + } + type status = :pending | :in_progress | :error | :complete module Status @@ -31,7 +37,7 @@ module FinchAPI ERROR: :error COMPLETE: :complete - def self?.values: -> ::Array[FinchAPI::Jobs::ManualAsyncJob::status] + def self?.values: -> ::Array[FinchAPI::Models::Jobs::ManualAsyncJob::status] end end end diff --git a/sig/finch_api/models/jobs/manual_retrieve_params.rbs b/sig/finch_api/models/jobs/manual_retrieve_params.rbs index 26afd780..0a765cf5 100644 --- a/sig/finch_api/models/jobs/manual_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/manual_retrieve_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/location.rbs b/sig/finch_api/models/location.rbs index 10f866f5..806a2489 100644 --- a/sig/finch_api/models/location.rbs +++ b/sig/finch_api/models/location.rbs @@ -39,6 +39,17 @@ module FinchAPI ?name: String?, ?source_id: String? ) -> void + + def to_hash: -> { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + postal_code: String?, + state: String?, + name: String?, + source_id: String? + } end end end diff --git a/sig/finch_api/models/money.rbs b/sig/finch_api/models/money.rbs index 31fc9398..4cd5b4e1 100644 --- a/sig/finch_api/models/money.rbs +++ b/sig/finch_api/models/money.rbs @@ -10,6 +10,8 @@ module FinchAPI def currency=: (String) -> String def initialize: (?amount: Integer?, ?currency: String) -> void + + def to_hash: -> { amount: Integer?, currency: String } end end end diff --git a/sig/finch_api/models/operation_support_matrix.rbs b/sig/finch_api/models/operation_support_matrix.rbs index 9083fd8d..c666a940 100644 --- a/sig/finch_api/models/operation_support_matrix.rbs +++ b/sig/finch_api/models/operation_support_matrix.rbs @@ -39,6 +39,13 @@ module FinchAPI ?read: FinchAPI::Models::operation_support, ?update: FinchAPI::Models::operation_support ) -> void + + def to_hash: -> { + create: FinchAPI::Models::operation_support, + delete: FinchAPI::Models::operation_support, + read: FinchAPI::Models::operation_support, + update: FinchAPI::Models::operation_support + } end end end diff --git a/sig/finch_api/models/paging.rbs b/sig/finch_api/models/paging.rbs index 49803a1b..4239d13a 100644 --- a/sig/finch_api/models/paging.rbs +++ b/sig/finch_api/models/paging.rbs @@ -10,6 +10,8 @@ module FinchAPI def count=: (Integer) -> Integer def initialize: (offset: Integer, ?count: Integer) -> void + + def to_hash: -> { offset: Integer, count: Integer } end end end diff --git a/sig/finch_api/models/pay_statement_event.rbs b/sig/finch_api/models/pay_statement_event.rbs index 7ebadee2..d4b0537b 100644 --- a/sig/finch_api/models/pay_statement_event.rbs +++ b/sig/finch_api/models/pay_statement_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type pay_statement_event = { data: FinchAPI::PayStatementEvent::Data, - event_type: FinchAPI::PayStatementEvent::event_type + event_type: FinchAPI::Models::PayStatementEvent::event_type } class PayStatementEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::PayStatementEvent::Data _ ) -> FinchAPI::PayStatementEvent::Data - def event_type: -> FinchAPI::PayStatementEvent::event_type? + def event_type: -> FinchAPI::Models::PayStatementEvent::event_type? def event_type=: ( - FinchAPI::PayStatementEvent::event_type _ - ) -> FinchAPI::PayStatementEvent::event_type + FinchAPI::Models::PayStatementEvent::event_type _ + ) -> FinchAPI::Models::PayStatementEvent::event_type def initialize: ( ?data: FinchAPI::PayStatementEvent::Data, - ?event_type: FinchAPI::PayStatementEvent::event_type + ?event_type: FinchAPI::Models::PayStatementEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::PayStatementEvent::Data, + event_type: FinchAPI::Models::PayStatementEvent::event_type + } + type data = { individual_id: String, payment_id: String } class Data < FinchAPI::Internal::Type::BaseModel @@ -36,6 +41,8 @@ module FinchAPI def payment_id=: (String) -> String def initialize: (?individual_id: String, ?payment_id: String) -> void + + def to_hash: -> { individual_id: String, payment_id: String } end type event_type = @@ -50,7 +57,7 @@ module FinchAPI PAY_STATEMENT_UPDATED: :"pay_statement.updated" PAY_STATEMENT_DELETED: :"pay_statement.deleted" - def self?.values: -> ::Array[FinchAPI::PayStatementEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::PayStatementEvent::event_type] end end end diff --git a/sig/finch_api/models/payment_event.rbs b/sig/finch_api/models/payment_event.rbs index ddef02a6..f1f33d85 100644 --- a/sig/finch_api/models/payment_event.rbs +++ b/sig/finch_api/models/payment_event.rbs @@ -3,7 +3,7 @@ module FinchAPI type payment_event = { data: FinchAPI::PaymentEvent::Data, - event_type: FinchAPI::PaymentEvent::event_type + event_type: FinchAPI::Models::PaymentEvent::event_type } class PaymentEvent < FinchAPI::Models::BaseWebhookEvent @@ -13,17 +13,22 @@ module FinchAPI FinchAPI::PaymentEvent::Data _ ) -> FinchAPI::PaymentEvent::Data - def event_type: -> FinchAPI::PaymentEvent::event_type? + def event_type: -> FinchAPI::Models::PaymentEvent::event_type? def event_type=: ( - FinchAPI::PaymentEvent::event_type _ - ) -> FinchAPI::PaymentEvent::event_type + FinchAPI::Models::PaymentEvent::event_type _ + ) -> FinchAPI::Models::PaymentEvent::event_type def initialize: ( ?data: FinchAPI::PaymentEvent::Data, - ?event_type: FinchAPI::PaymentEvent::event_type + ?event_type: FinchAPI::Models::PaymentEvent::event_type ) -> void + def to_hash: -> { + data: FinchAPI::PaymentEvent::Data, + event_type: FinchAPI::Models::PaymentEvent::event_type + } + type data = { pay_date: String, payment_id: String } class Data < FinchAPI::Internal::Type::BaseModel @@ -32,6 +37,8 @@ module FinchAPI attr_accessor payment_id: String def initialize: (pay_date: String, payment_id: String) -> void + + def to_hash: -> { pay_date: String, payment_id: String } end type event_type = @@ -44,7 +51,7 @@ module FinchAPI PAYMENT_UPDATED: :"payment.updated" PAYMENT_DELETED: :"payment.deleted" - def self?.values: -> ::Array[FinchAPI::PaymentEvent::event_type] + def self?.values: -> ::Array[FinchAPI::Models::PaymentEvent::event_type] end end end diff --git a/sig/finch_api/models/payroll/pay_group_list_params.rbs b/sig/finch_api/models/payroll/pay_group_list_params.rbs index 6aa11f86..fc7d371b 100644 --- a/sig/finch_api/models/payroll/pay_group_list_params.rbs +++ b/sig/finch_api/models/payroll/pay_group_list_params.rbs @@ -22,6 +22,12 @@ module FinchAPI ?pay_frequencies: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + individual_id: String, + pay_frequencies: ::Array[String], + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/payroll/pay_group_list_response.rbs b/sig/finch_api/models/payroll/pay_group_list_response.rbs index 9b203674..f122831c 100644 --- a/sig/finch_api/models/payroll/pay_group_list_response.rbs +++ b/sig/finch_api/models/payroll/pay_group_list_response.rbs @@ -29,6 +29,12 @@ module FinchAPI ?pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] ) -> void + def to_hash: -> { + id: String, + name: String, + pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] + } + type pay_frequency = :annually | :semi_annually diff --git a/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs b/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs index d901447d..c3b0a31c 100644 --- a/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs +++ b/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs @@ -9,6 +9,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs b/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs index 4fbffd0b..380e4c57 100644 --- a/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs +++ b/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs @@ -25,6 +25,13 @@ module FinchAPI pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupRetrieveResponse::pay_frequency] ) -> void + def to_hash: -> { + id: String, + individual_ids: ::Array[String], + name: String, + pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupRetrieveResponse::pay_frequency] + } + type pay_frequency = :annually | :semi_annually diff --git a/sig/finch_api/models/provider.rbs b/sig/finch_api/models/provider.rbs index 3a9f2f9a..89fd87d7 100644 --- a/sig/finch_api/models/provider.rbs +++ b/sig/finch_api/models/provider.rbs @@ -70,11 +70,24 @@ module FinchAPI ?products: ::Array[String] ) -> void + def to_hash: -> { + id: String, + authentication_methods: ::Array[FinchAPI::Provider::AuthenticationMethod], + beta: bool, + display_name: String, + icon: String, + logo: String, + manual: bool, + mfa_required: bool, + primary_color: String, + products: ::Array[String] + } + type authentication_method = { benefits_support: FinchAPI::HRIS::BenefitsSupport?, supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields?, - type: FinchAPI::Provider::AuthenticationMethod::type_ + type: FinchAPI::Models::Provider::AuthenticationMethod::type_ } class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel @@ -82,18 +95,24 @@ module FinchAPI attr_accessor supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields? - attr_reader type: FinchAPI::Provider::AuthenticationMethod::type_? + attr_reader type: FinchAPI::Models::Provider::AuthenticationMethod::type_? def type=: ( - FinchAPI::Provider::AuthenticationMethod::type_ - ) -> FinchAPI::Provider::AuthenticationMethod::type_ + FinchAPI::Models::Provider::AuthenticationMethod::type_ + ) -> FinchAPI::Models::Provider::AuthenticationMethod::type_ def initialize: ( ?benefits_support: FinchAPI::HRIS::BenefitsSupport?, ?supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields?, - ?type: FinchAPI::Provider::AuthenticationMethod::type_ + ?type: FinchAPI::Models::Provider::AuthenticationMethod::type_ ) -> void + def to_hash: -> { + benefits_support: FinchAPI::HRIS::BenefitsSupport?, + supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields?, + type: FinchAPI::Models::Provider::AuthenticationMethod::type_ + } + type supported_fields = { company: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company, @@ -158,6 +177,16 @@ module FinchAPI ?payment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment ) -> void + def to_hash: -> { + company: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company, + directory: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory, + employment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment, + individual: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual, + pay_group: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup, + pay_statement: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement, + payment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment + } + type company = { id: bool, @@ -228,6 +257,18 @@ module FinchAPI ?primary_phone_number: bool ) -> void + def to_hash: -> { + id: bool, + accounts: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, + departments: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments, + ein: bool, + entity: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity, + legal_name: bool, + locations: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations, + primary_email: bool, + primary_phone_number: bool + } + type accounts = { account_name: bool, @@ -265,6 +306,14 @@ module FinchAPI ?institution_name: bool, ?routing_number: bool ) -> void + + def to_hash: -> { + account_name: bool, + account_number: bool, + account_type: bool, + institution_name: bool, + routing_number: bool + } end type departments = @@ -289,6 +338,11 @@ module FinchAPI ?parent: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent ) -> void + def to_hash: -> { + name: bool, + parent: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent + } + type parent = { name: bool } class Parent < FinchAPI::Internal::Type::BaseModel @@ -297,6 +351,8 @@ module FinchAPI def name=: (bool) -> bool def initialize: (?name: bool) -> void + + def to_hash: -> { name: bool } end end @@ -312,6 +368,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?subtype: bool, ?type: bool) -> void + + def to_hash: -> { subtype: bool, type: bool } end type locations = @@ -357,6 +415,15 @@ module FinchAPI ?postal_code: bool, ?state: bool ) -> void + + def to_hash: -> { + city: bool, + country: bool, + :line1 => bool, + :line2 => bool, + postal_code: bool, + state: bool + } end end @@ -384,6 +451,11 @@ module FinchAPI ?paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging ) -> void + def to_hash: -> { + individuals: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, + paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging + } + type individuals = { id: bool, @@ -436,6 +508,16 @@ module FinchAPI ?middle_name: bool ) -> void + def to_hash: -> { + id: bool, + department: bool, + first_name: bool, + is_active: bool, + last_name: bool, + manager: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, + middle_name: bool + } + type manager = { id: bool } class Manager < FinchAPI::Internal::Type::BaseModel @@ -444,6 +526,8 @@ module FinchAPI def id=: (bool) -> bool def initialize: (?id: bool) -> void + + def to_hash: -> { id: bool } end end @@ -459,6 +543,8 @@ module FinchAPI def offset=: (bool) -> bool def initialize: (?count: bool, ?offset: bool) -> void + + def to_hash: -> { count: bool, offset: bool } end end @@ -582,6 +668,26 @@ module FinchAPI ?title: bool ) -> void + def to_hash: -> { + id: bool, + class_code: bool, + custom_fields: bool, + department: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department, + employment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, + employment_status: bool, + end_date: bool, + first_name: bool, + income: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income, + income_history: bool, + is_active: bool, + last_name: bool, + location: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location, + manager: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, + middle_name: bool, + start_date: bool, + title: bool + } + type department = { name: bool } class Department < FinchAPI::Internal::Type::BaseModel @@ -590,6 +696,8 @@ module FinchAPI def name=: (bool) -> bool def initialize: (?name: bool) -> void + + def to_hash: -> { name: bool } end type employment = { subtype: bool, type: bool } @@ -604,6 +712,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?subtype: bool, ?type: bool) -> void + + def to_hash: -> { subtype: bool, type: bool } end type income = { amount: bool, currency: bool, unit: bool } @@ -626,6 +736,8 @@ module FinchAPI ?currency: bool, ?unit: bool ) -> void + + def to_hash: -> { amount: bool, currency: bool, unit: bool } end type location = @@ -671,6 +783,15 @@ module FinchAPI ?postal_code: bool, ?state: bool ) -> void + + def to_hash: -> { + city: bool, + country: bool, + :line1 => bool, + :line2 => bool, + postal_code: bool, + state: bool + } end type manager = { id: bool } @@ -681,6 +802,8 @@ module FinchAPI def id=: (bool) -> bool def initialize: (?id: bool) -> void + + def to_hash: -> { id: bool } end end @@ -776,6 +899,22 @@ module FinchAPI ?ssn: bool ) -> void + def to_hash: -> { + id: bool, + dob: bool, + emails: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, + encrypted_ssn: bool, + ethnicity: bool, + first_name: bool, + gender: bool, + last_name: bool, + middle_name: bool, + phone_numbers: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, + preferred_name: bool, + residence: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, + ssn: bool + } + type emails = { data: bool, type: bool } class Emails < FinchAPI::Internal::Type::BaseModel @@ -788,6 +927,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?data: bool, ?type: bool) -> void + + def to_hash: -> { data: bool, type: bool } end type phone_numbers = { data: bool, type: bool } @@ -802,6 +943,8 @@ module FinchAPI def type=: (bool) -> bool def initialize: (?data: bool, ?type: bool) -> void + + def to_hash: -> { data: bool, type: bool } end type residence = @@ -847,6 +990,15 @@ module FinchAPI ?postal_code: bool, ?state: bool ) -> void + + def to_hash: -> { + city: bool, + country: bool, + :line1 => bool, + :line2 => bool, + postal_code: bool, + state: bool + } end end @@ -881,6 +1033,13 @@ module FinchAPI ?name: bool, ?pay_frequencies: bool ) -> void + + def to_hash: -> { + id: bool, + individual_ids: bool, + name: bool, + pay_frequencies: bool + } end type pay_statement = @@ -907,6 +1066,11 @@ module FinchAPI ?pay_statements: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements ) -> void + def to_hash: -> { + paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, + pay_statements: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements + } + type paging = { count: bool, offset: bool } class Paging < FinchAPI::Internal::Type::BaseModel @@ -915,6 +1079,8 @@ module FinchAPI attr_accessor offset: bool def initialize: (count: bool, offset: bool) -> void + + def to_hash: -> { count: bool, offset: bool } end type pay_statements = @@ -993,6 +1159,19 @@ module FinchAPI ?type: bool ) -> void + def to_hash: -> { + earnings: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, + employee_deductions: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, + employer_contributions: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, + gross_pay: bool, + individual_id: bool, + net_pay: bool, + payment_method: bool, + taxes: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, + total_hours: bool, + type: bool + } + type earnings = { amount: bool, currency: bool, name: bool, type: bool } @@ -1019,6 +1198,13 @@ module FinchAPI ?name: bool, ?type: bool ) -> void + + def to_hash: -> { + amount: bool, + currency: bool, + name: bool, + type: bool + } end type employee_deductions = @@ -1058,6 +1244,14 @@ module FinchAPI ?pre_tax: bool, ?type: bool ) -> void + + def to_hash: -> { + amount: bool, + currency: bool, + name: bool, + pre_tax: bool, + type: bool + } end type employer_contributions = @@ -1081,6 +1275,8 @@ module FinchAPI ?currency: bool, ?name: bool ) -> void + + def to_hash: -> { amount: bool, currency: bool, name: bool } end type taxes = @@ -1120,6 +1316,14 @@ module FinchAPI ?name: bool, ?type: bool ) -> void + + def to_hash: -> { + amount: bool, + currency: bool, + employer: bool, + name: bool, + type: bool + } end end end @@ -1206,6 +1410,21 @@ module FinchAPI ?pay_period: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod ) -> void + def to_hash: -> { + id: bool, + company_debit: bool, + debit_date: bool, + employee_taxes: bool, + employer_taxes: bool, + gross_pay: bool, + individual_ids: bool, + net_pay: bool, + pay_date: bool, + pay_frequencies: bool, + pay_group_ids: bool, + pay_period: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod + } + type pay_period = { end_date: bool, start_date: bool } class PayPeriod < FinchAPI::Internal::Type::BaseModel @@ -1218,6 +1437,8 @@ module FinchAPI def start_date=: (bool) -> bool def initialize: (?end_date: bool, ?start_date: bool) -> void + + def to_hash: -> { end_date: bool, start_date: bool } end end end @@ -1234,7 +1455,7 @@ module FinchAPI API_CREDENTIAL: :api_credential OAUTH: :oauth - def self?.values: -> ::Array[FinchAPI::Provider::AuthenticationMethod::type_] + def self?.values: -> ::Array[FinchAPI::Models::Provider::AuthenticationMethod::type_] end end end diff --git a/sig/finch_api/models/provider_list_params.rbs b/sig/finch_api/models/provider_list_params.rbs index c276a697..7c111ee0 100644 --- a/sig/finch_api/models/provider_list_params.rbs +++ b/sig/finch_api/models/provider_list_params.rbs @@ -8,6 +8,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/request_forwarding_forward_params.rbs b/sig/finch_api/models/request_forwarding_forward_params.rbs index 88aaf364..4076daaa 100644 --- a/sig/finch_api/models/request_forwarding_forward_params.rbs +++ b/sig/finch_api/models/request_forwarding_forward_params.rbs @@ -32,6 +32,15 @@ module FinchAPI ?params: top?, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + method_: String, + route: String, + data: String?, + headers: top?, + params: top?, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/request_forwarding_forward_response.rbs b/sig/finch_api/models/request_forwarding_forward_response.rbs index b53af075..56cb9d24 100644 --- a/sig/finch_api/models/request_forwarding_forward_response.rbs +++ b/sig/finch_api/models/request_forwarding_forward_response.rbs @@ -24,6 +24,13 @@ module FinchAPI status_code: Integer ) -> void + def to_hash: -> { + data: String?, + headers: top?, + request: FinchAPI::Models::RequestForwardingForwardResponse::Request, + status_code: Integer + } + type request = { data: String?, @@ -51,6 +58,14 @@ module FinchAPI params: top?, route: String ) -> void + + def to_hash: -> { + data: String?, + headers: top?, + method_: String, + params: top?, + route: String + } end end end diff --git a/sig/finch_api/models/sandbox/company_update_params.rbs b/sig/finch_api/models/sandbox/company_update_params.rbs index f9240957..ac0b116e 100644 --- a/sig/finch_api/models/sandbox/company_update_params.rbs +++ b/sig/finch_api/models/sandbox/company_update_params.rbs @@ -46,11 +46,23 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + accounts: ::Array[FinchAPI::Sandbox::CompanyUpdateParams::Account]?, + departments: ::Array[FinchAPI::Sandbox::CompanyUpdateParams::Department?]?, + ein: String?, + entity: FinchAPI::Sandbox::CompanyUpdateParams::Entity?, + legal_name: String?, + locations: ::Array[FinchAPI::Location?]?, + primary_email: String?, + primary_phone_number: String?, + request_options: FinchAPI::RequestOptions + } + type account = { account_name: String?, account_number: String?, - account_type: FinchAPI::Sandbox::CompanyUpdateParams::Account::account_type?, + account_type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::account_type?, institution_name: String?, routing_number: String? } @@ -60,7 +72,7 @@ module FinchAPI attr_accessor account_number: String? - attr_accessor account_type: FinchAPI::Sandbox::CompanyUpdateParams::Account::account_type? + attr_accessor account_type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::account_type? attr_accessor institution_name: String? @@ -69,11 +81,19 @@ module FinchAPI def initialize: ( ?account_name: String?, ?account_number: String?, - ?account_type: FinchAPI::Sandbox::CompanyUpdateParams::Account::account_type?, + ?account_type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::account_type?, ?institution_name: String?, ?routing_number: String? ) -> void + def to_hash: -> { + account_name: String?, + account_number: String?, + account_type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::account_type?, + institution_name: String?, + routing_number: String? + } + type account_type = :checking | :savings module AccountType @@ -82,7 +102,7 @@ module FinchAPI CHECKING: :checking SAVINGS: :savings - def self?.values: -> ::Array[FinchAPI::Sandbox::CompanyUpdateParams::Account::account_type] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::account_type] end end @@ -102,31 +122,43 @@ module FinchAPI ?parent: FinchAPI::Sandbox::CompanyUpdateParams::Department::Parent? ) -> void + def to_hash: -> { + name: String?, + parent: FinchAPI::Sandbox::CompanyUpdateParams::Department::Parent? + } + type parent = { name: String? } class Parent < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? def initialize: (?name: String?) -> void + + def to_hash: -> { name: String? } end end type entity = { - subtype: FinchAPI::Sandbox::CompanyUpdateParams::Entity::subtype?, - type: FinchAPI::Sandbox::CompanyUpdateParams::Entity::type_? + subtype: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::subtype?, + type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::type_? } class Entity < FinchAPI::Internal::Type::BaseModel - attr_accessor subtype: FinchAPI::Sandbox::CompanyUpdateParams::Entity::subtype? + attr_accessor subtype: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::subtype? - attr_accessor type: FinchAPI::Sandbox::CompanyUpdateParams::Entity::type_? + attr_accessor type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::type_? def initialize: ( - ?subtype: FinchAPI::Sandbox::CompanyUpdateParams::Entity::subtype?, - ?type: FinchAPI::Sandbox::CompanyUpdateParams::Entity::type_? + ?subtype: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::subtype?, + ?type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::subtype?, + type: FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::type_? + } + type subtype = :s_corporation | :c_corporation | :b_corporation module Subtype @@ -136,7 +168,7 @@ module FinchAPI C_CORPORATION: :c_corporation B_CORPORATION: :b_corporation - def self?.values: -> ::Array[FinchAPI::Sandbox::CompanyUpdateParams::Entity::subtype] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::subtype] end type type_ = @@ -159,7 +191,7 @@ module FinchAPI PARTNERSHIP: :partnership COOPERATIVE: :cooperative - def self?.values: -> ::Array[FinchAPI::Sandbox::CompanyUpdateParams::Entity::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::type_] end end end diff --git a/sig/finch_api/models/sandbox/company_update_response.rbs b/sig/finch_api/models/sandbox/company_update_response.rbs index 3433a748..fad56e91 100644 --- a/sig/finch_api/models/sandbox/company_update_response.rbs +++ b/sig/finch_api/models/sandbox/company_update_response.rbs @@ -41,6 +41,17 @@ module FinchAPI primary_phone_number: String? ) -> void + def to_hash: -> { + accounts: ::Array[FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account]?, + departments: ::Array[FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department?]?, + ein: String?, + entity: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity?, + legal_name: String?, + locations: ::Array[FinchAPI::Location?]?, + primary_email: String?, + primary_phone_number: String? + } + type account = { account_name: String?, @@ -69,6 +80,14 @@ module FinchAPI ?routing_number: String? ) -> void + def to_hash: -> { + account_name: String?, + account_number: String?, + account_type: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account::account_type?, + institution_name: String?, + routing_number: String? + } + type account_type = :checking | :savings module AccountType @@ -97,12 +116,19 @@ module FinchAPI ?parent: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department::Parent? ) -> void + def to_hash: -> { + name: String?, + parent: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department::Parent? + } + type parent = { name: String? } class Parent < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? def initialize: (?name: String?) -> void + + def to_hash: -> { name: String? } end end @@ -122,6 +148,11 @@ module FinchAPI ?type: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::subtype?, + type: FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::type_? + } + type subtype = :s_corporation | :c_corporation | :b_corporation module Subtype diff --git a/sig/finch_api/models/sandbox/connection_create_params.rbs b/sig/finch_api/models/sandbox/connection_create_params.rbs index e36f46ea..cd584cfb 100644 --- a/sig/finch_api/models/sandbox/connection_create_params.rbs +++ b/sig/finch_api/models/sandbox/connection_create_params.rbs @@ -38,6 +38,14 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + provider_id: String, + authentication_type: FinchAPI::Models::Sandbox::ConnectionCreateParams::authentication_type, + employee_size: Integer, + products: ::Array[String], + request_options: FinchAPI::RequestOptions + } + type authentication_type = :credential | :api_token | :oauth | :assisted module AuthenticationType diff --git a/sig/finch_api/models/sandbox/connection_create_response.rbs b/sig/finch_api/models/sandbox/connection_create_response.rbs index 389ec50b..0dc7bddd 100644 --- a/sig/finch_api/models/sandbox/connection_create_response.rbs +++ b/sig/finch_api/models/sandbox/connection_create_response.rbs @@ -43,6 +43,17 @@ module FinchAPI ?token_type: String ) -> void + def to_hash: -> { + access_token: String, + account_id: String, + authentication_type: FinchAPI::Models::Sandbox::ConnectionCreateResponse::authentication_type, + company_id: String, + connection_id: String, + products: ::Array[String], + provider_id: String, + token_type: String + } + type authentication_type = :credential | :api_token | :oauth | :assisted module AuthenticationType diff --git a/sig/finch_api/models/sandbox/connections/account_create_params.rbs b/sig/finch_api/models/sandbox/connections/account_create_params.rbs index 0f5766d2..ea494505 100644 --- a/sig/finch_api/models/sandbox/connections/account_create_params.rbs +++ b/sig/finch_api/models/sandbox/connections/account_create_params.rbs @@ -37,6 +37,14 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + company_id: String, + provider_id: String, + authentication_type: FinchAPI::Models::Sandbox::Connections::AccountCreateParams::authentication_type, + products: ::Array[String], + request_options: FinchAPI::RequestOptions + } + type authentication_type = :credential | :api_token | :oauth | :assisted diff --git a/sig/finch_api/models/sandbox/connections/account_create_response.rbs b/sig/finch_api/models/sandbox/connections/account_create_response.rbs index 959779a2..4f70fdaa 100644 --- a/sig/finch_api/models/sandbox/connections/account_create_response.rbs +++ b/sig/finch_api/models/sandbox/connections/account_create_response.rbs @@ -38,6 +38,16 @@ module FinchAPI provider_id: String ) -> void + def to_hash: -> { + access_token: String, + account_id: String, + authentication_type: FinchAPI::Models::Sandbox::Connections::AccountCreateResponse::authentication_type, + company_id: String, + connection_id: String, + products: ::Array[String], + provider_id: String + } + type authentication_type = :credential | :api_token | :oauth | :assisted diff --git a/sig/finch_api/models/sandbox/connections/account_update_params.rbs b/sig/finch_api/models/sandbox/connections/account_update_params.rbs index bd373242..e0e12d7b 100644 --- a/sig/finch_api/models/sandbox/connections/account_update_params.rbs +++ b/sig/finch_api/models/sandbox/connections/account_update_params.rbs @@ -20,6 +20,11 @@ module FinchAPI ?connection_status: FinchAPI::Models::connection_status_type, ?request_options: FinchAPI::request_opts ) -> void + + def to_hash: -> { + connection_status: FinchAPI::Models::connection_status_type, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/sandbox/connections/account_update_response.rbs b/sig/finch_api/models/sandbox/connections/account_update_response.rbs index a25b0b47..d37f1111 100644 --- a/sig/finch_api/models/sandbox/connections/account_update_response.rbs +++ b/sig/finch_api/models/sandbox/connections/account_update_response.rbs @@ -36,6 +36,15 @@ module FinchAPI ?connection_id: String ) -> void + def to_hash: -> { + account_id: String, + authentication_type: FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse::authentication_type, + company_id: String, + products: ::Array[String], + provider_id: String, + connection_id: String + } + type authentication_type = :credential | :api_token | :oauth | :assisted diff --git a/sig/finch_api/models/sandbox/directory_create_params.rbs b/sig/finch_api/models/sandbox/directory_create_params.rbs index f7b64520..a5222df7 100644 --- a/sig/finch_api/models/sandbox/directory_create_params.rbs +++ b/sig/finch_api/models/sandbox/directory_create_params.rbs @@ -20,6 +20,11 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + body: ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body], + request_options: FinchAPI::RequestOptions + } + type body = { class_code: String?, @@ -28,12 +33,12 @@ module FinchAPI dob: String?, emails: ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::Email]?, employment: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment?, - employment_status: FinchAPI::Sandbox::DirectoryCreateParams::Body::employment_status?, + employment_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::employment_status?, encrypted_ssn: String?, end_date: String?, - ethnicity: FinchAPI::Sandbox::DirectoryCreateParams::Body::ethnicity?, + ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity?, first_name: String?, - gender: FinchAPI::Sandbox::DirectoryCreateParams::Body::gender?, + gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, is_active: bool?, @@ -64,17 +69,17 @@ module FinchAPI attr_accessor employment: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment? - attr_accessor employment_status: FinchAPI::Sandbox::DirectoryCreateParams::Body::employment_status? + attr_accessor employment_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::employment_status? attr_accessor encrypted_ssn: String? attr_accessor end_date: String? - attr_accessor ethnicity: FinchAPI::Sandbox::DirectoryCreateParams::Body::ethnicity? + attr_accessor ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity? attr_accessor first_name: String? - attr_accessor gender: FinchAPI::Sandbox::DirectoryCreateParams::Body::gender? + attr_accessor gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender? attr_accessor income: FinchAPI::Income? @@ -113,12 +118,12 @@ module FinchAPI ?dob: String?, ?emails: ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::Email]?, ?employment: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment?, - ?employment_status: FinchAPI::Sandbox::DirectoryCreateParams::Body::employment_status?, + ?employment_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::employment_status?, ?encrypted_ssn: String?, ?end_date: String?, - ?ethnicity: FinchAPI::Sandbox::DirectoryCreateParams::Body::ethnicity?, + ?ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity?, ?first_name: String?, - ?gender: FinchAPI::Sandbox::DirectoryCreateParams::Body::gender?, + ?gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, ?is_active: bool?, @@ -136,6 +141,36 @@ module FinchAPI ?title: String? ) -> void + def to_hash: -> { + class_code: String?, + custom_fields: ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::CustomField]?, + department: FinchAPI::Sandbox::DirectoryCreateParams::Body::Department?, + dob: String?, + emails: ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::Email]?, + employment: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment?, + employment_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::employment_status?, + encrypted_ssn: String?, + end_date: String?, + ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity?, + first_name: String?, + gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender?, + income: FinchAPI::Income?, + income_history: ::Array[FinchAPI::Income?]?, + is_active: bool?, + last_name: String?, + latest_rehire_date: String?, + location: FinchAPI::Location?, + manager: FinchAPI::Sandbox::DirectoryCreateParams::Body::Manager?, + middle_name: String?, + phone_numbers: ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber?]?, + preferred_name: String?, + residence: FinchAPI::Location?, + source_id: String?, + ssn: String?, + start_date: String?, + title: String? + } + type custom_field = { name: String?, value: top } class CustomField < FinchAPI::Internal::Type::BaseModel @@ -146,6 +181,8 @@ module FinchAPI def value=: (top) -> top def initialize: (?name: String?, ?value: top) -> void + + def to_hash: -> { name: String?, value: top } end type department = { name: String? } @@ -154,12 +191,14 @@ module FinchAPI attr_accessor name: String? def initialize: (?name: String?) -> void + + def to_hash: -> { name: String? } end type email = { data: String, - type: FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::type_? + type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::type_? } class Email < FinchAPI::Internal::Type::BaseModel @@ -167,13 +206,18 @@ module FinchAPI def data=: (String) -> String - attr_accessor type: FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::type_? + attr_accessor type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::type_? def initialize: ( ?data: String, - ?type: FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::type_? + ?type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::type_? ) -> void + def to_hash: -> { + data: String, + type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::type_? + } + type type_ = :work | :personal module Type @@ -182,26 +226,31 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::Email::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::type_] end end type employment = { - subtype: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::subtype?, - type: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::type_? + subtype: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::subtype?, + type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::type_? } class Employment < FinchAPI::Internal::Type::BaseModel - attr_accessor subtype: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::subtype? + attr_accessor subtype: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::subtype? - attr_accessor type: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::type_? + attr_accessor type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::type_? def initialize: ( - ?subtype: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::subtype?, - ?type: FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::type_? + ?subtype: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::subtype?, + ?type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::subtype?, + type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::type_? + } + type subtype = :full_time | :intern @@ -220,7 +269,7 @@ module FinchAPI SEASONAL: :seasonal INDIVIDUAL_CONTRACTOR: :individual_contractor - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::subtype] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::subtype] end type type_ = :employee | :contractor @@ -231,7 +280,7 @@ module FinchAPI EMPLOYEE: :employee CONTRACTOR: :contractor - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::Employment::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::type_] end end @@ -255,7 +304,7 @@ module FinchAPI RETIRED: :retired TERMINATED: :terminated - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::employment_status] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::employment_status] end type ethnicity = @@ -280,7 +329,7 @@ module FinchAPI TWO_OR_MORE_RACES: :two_or_more_races DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::ethnicity] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity] end type gender = :female | :male | :other | :decline_to_specify @@ -293,7 +342,7 @@ module FinchAPI OTHER: :other DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::gender] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender] end type manager = { id: String } @@ -304,24 +353,31 @@ module FinchAPI def id=: (String) -> String def initialize: (?id: String) -> void + + def to_hash: -> { id: String } end type phone_number = { data: String?, - type: FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? + type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? } class PhoneNumber < FinchAPI::Internal::Type::BaseModel attr_accessor data: String? - attr_accessor type: FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? + attr_accessor type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? def initialize: ( ?data: String?, - ?type: FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? + ?type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? ) -> void + def to_hash: -> { + data: String?, + type: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_? + } + type type_ = :work | :personal module Type @@ -330,7 +386,7 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::type_] end end end diff --git a/sig/finch_api/models/sandbox/employment_update_params.rbs b/sig/finch_api/models/sandbox/employment_update_params.rbs index b8f17cc8..aee83ffe 100644 --- a/sig/finch_api/models/sandbox/employment_update_params.rbs +++ b/sig/finch_api/models/sandbox/employment_update_params.rbs @@ -86,6 +86,28 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + class_code: String?, + custom_fields: ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::CustomField]?, + department: FinchAPI::Sandbox::EmploymentUpdateParams::Department?, + employment: FinchAPI::Sandbox::EmploymentUpdateParams::Employment?, + employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::employment_status?, + end_date: String?, + first_name: String?, + income: FinchAPI::Income?, + income_history: ::Array[FinchAPI::Income?]?, + is_active: bool?, + last_name: String?, + latest_rehire_date: String?, + location: FinchAPI::Location?, + manager: FinchAPI::Sandbox::EmploymentUpdateParams::Manager?, + middle_name: String?, + source_id: String?, + start_date: String?, + title: String?, + request_options: FinchAPI::RequestOptions + } + type custom_field = { name: String?, value: top } class CustomField < FinchAPI::Internal::Type::BaseModel @@ -96,6 +118,8 @@ module FinchAPI def value=: (top) -> top def initialize: (?name: String?, ?value: top) -> void + + def to_hash: -> { name: String?, value: top } end type department = { name: String? } @@ -104,24 +128,31 @@ module FinchAPI attr_accessor name: String? def initialize: (?name: String?) -> void + + def to_hash: -> { name: String? } end type employment = { - subtype: FinchAPI::Sandbox::EmploymentUpdateParams::Employment::subtype?, - type: FinchAPI::Sandbox::EmploymentUpdateParams::Employment::type_? + subtype: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::subtype?, + type: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::type_? } class Employment < FinchAPI::Internal::Type::BaseModel - attr_accessor subtype: FinchAPI::Sandbox::EmploymentUpdateParams::Employment::subtype? + attr_accessor subtype: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::subtype? - attr_accessor type: FinchAPI::Sandbox::EmploymentUpdateParams::Employment::type_? + attr_accessor type: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::type_? def initialize: ( - ?subtype: FinchAPI::Sandbox::EmploymentUpdateParams::Employment::subtype?, - ?type: FinchAPI::Sandbox::EmploymentUpdateParams::Employment::type_? + ?subtype: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::subtype?, + ?type: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::subtype?, + type: FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::type_? + } + type subtype = :full_time | :intern @@ -140,7 +171,7 @@ module FinchAPI SEASONAL: :seasonal INDIVIDUAL_CONTRACTOR: :individual_contractor - def self?.values: -> ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::Employment::subtype] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::subtype] end type type_ = :employee | :contractor @@ -151,7 +182,7 @@ module FinchAPI EMPLOYEE: :employee CONTRACTOR: :contractor - def self?.values: -> ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::Employment::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::type_] end end @@ -186,6 +217,8 @@ module FinchAPI def id=: (String) -> String def initialize: (?id: String) -> void + + def to_hash: -> { id: String } end end end diff --git a/sig/finch_api/models/sandbox/employment_update_response.rbs b/sig/finch_api/models/sandbox/employment_update_response.rbs index 3ad57698..77658df7 100644 --- a/sig/finch_api/models/sandbox/employment_update_response.rbs +++ b/sig/finch_api/models/sandbox/employment_update_response.rbs @@ -87,6 +87,28 @@ module FinchAPI ?title: String? ) -> void + def to_hash: -> { + id: String, + class_code: String?, + custom_fields: ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateResponse::CustomField]?, + department: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Department?, + employment: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment?, + employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::employment_status?, + end_date: String?, + first_name: String?, + income: FinchAPI::Income?, + income_history: ::Array[FinchAPI::Income?]?, + is_active: bool?, + last_name: String?, + latest_rehire_date: String?, + location: FinchAPI::Location?, + manager: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Manager?, + middle_name: String?, + source_id: String?, + start_date: String?, + title: String? + } + type custom_field = { name: String?, value: top } class CustomField < FinchAPI::Internal::Type::BaseModel @@ -97,6 +119,8 @@ module FinchAPI def value=: (top) -> top def initialize: (?name: String?, ?value: top) -> void + + def to_hash: -> { name: String?, value: top } end type department = { name: String? } @@ -105,6 +129,8 @@ module FinchAPI attr_accessor name: String? def initialize: (?name: String?) -> void + + def to_hash: -> { name: String? } end type employment = @@ -123,6 +149,11 @@ module FinchAPI ?type: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::type_? ) -> void + def to_hash: -> { + subtype: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::subtype?, + type: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::type_? + } + type subtype = :full_time | :intern @@ -187,6 +218,8 @@ module FinchAPI def id=: (String) -> String def initialize: (?id: String) -> void + + def to_hash: -> { id: String } end end end diff --git a/sig/finch_api/models/sandbox/individual_update_params.rbs b/sig/finch_api/models/sandbox/individual_update_params.rbs index 8de8225f..042c0661 100644 --- a/sig/finch_api/models/sandbox/individual_update_params.rbs +++ b/sig/finch_api/models/sandbox/individual_update_params.rbs @@ -62,10 +62,26 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + dob: String?, + emails: ::Array[FinchAPI::Sandbox::IndividualUpdateParams::Email]?, + encrypted_ssn: String?, + ethnicity: FinchAPI::Models::Sandbox::IndividualUpdateParams::ethnicity?, + first_name: String?, + gender: FinchAPI::Models::Sandbox::IndividualUpdateParams::gender?, + last_name: String?, + middle_name: String?, + phone_numbers: ::Array[FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber?]?, + preferred_name: String?, + residence: FinchAPI::Location?, + ssn: String?, + request_options: FinchAPI::RequestOptions + } + type email = { data: String, - type: FinchAPI::Sandbox::IndividualUpdateParams::Email::type_? + type: FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::type_? } class Email < FinchAPI::Internal::Type::BaseModel @@ -73,13 +89,18 @@ module FinchAPI def data=: (String) -> String - attr_accessor type: FinchAPI::Sandbox::IndividualUpdateParams::Email::type_? + attr_accessor type: FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::type_? def initialize: ( ?data: String, - ?type: FinchAPI::Sandbox::IndividualUpdateParams::Email::type_? + ?type: FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::type_? ) -> void + def to_hash: -> { + data: String, + type: FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::type_? + } + type type_ = :work | :personal module Type @@ -88,7 +109,7 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::Sandbox::IndividualUpdateParams::Email::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::type_] end end @@ -133,19 +154,24 @@ module FinchAPI type phone_number = { data: String?, - type: FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::type_? + type: FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::type_? } class PhoneNumber < FinchAPI::Internal::Type::BaseModel attr_accessor data: String? - attr_accessor type: FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::type_? + attr_accessor type: FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::type_? def initialize: ( ?data: String?, - ?type: FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::type_? + ?type: FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::type_? ) -> void + def to_hash: -> { + data: String?, + type: FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::type_? + } + type type_ = :work | :personal module Type @@ -154,7 +180,7 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::Sandbox::IndividualUpdateParams::PhoneNumber::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::type_] end end end diff --git a/sig/finch_api/models/sandbox/individual_update_response.rbs b/sig/finch_api/models/sandbox/individual_update_response.rbs index 70159e25..9cecce0e 100644 --- a/sig/finch_api/models/sandbox/individual_update_response.rbs +++ b/sig/finch_api/models/sandbox/individual_update_response.rbs @@ -63,6 +63,22 @@ module FinchAPI ?ssn: String? ) -> void + def to_hash: -> { + id: String, + dob: String?, + emails: ::Array[FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email]?, + encrypted_ssn: String?, + ethnicity: FinchAPI::Models::Sandbox::IndividualUpdateResponse::ethnicity?, + first_name: String?, + gender: FinchAPI::Models::Sandbox::IndividualUpdateResponse::gender?, + last_name: String?, + middle_name: String?, + phone_numbers: ::Array[FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber?]?, + preferred_name: String?, + residence: FinchAPI::Location?, + ssn: String? + } + type email = { data: String, @@ -81,6 +97,11 @@ module FinchAPI ?type: FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::type_? ) -> void + def to_hash: -> { + data: String, + type: FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::type_? + } + type type_ = :work | :personal module Type @@ -147,6 +168,11 @@ module FinchAPI ?type: FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::type_? ) -> void + def to_hash: -> { + data: String?, + type: FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::type_? + } + type type_ = :work | :personal module Type diff --git a/sig/finch_api/models/sandbox/job_create_params.rbs b/sig/finch_api/models/sandbox/job_create_params.rbs index 10c756a8..232e7d0e 100644 --- a/sig/finch_api/models/sandbox/job_create_params.rbs +++ b/sig/finch_api/models/sandbox/job_create_params.rbs @@ -16,6 +16,11 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + type: FinchAPI::Models::Sandbox::JobCreateParams::type_, + request_options: FinchAPI::RequestOptions + } + type type_ = :data_sync_all module Type diff --git a/sig/finch_api/models/sandbox/job_create_response.rbs b/sig/finch_api/models/sandbox/job_create_response.rbs index e3eedc6c..472fdcd1 100644 --- a/sig/finch_api/models/sandbox/job_create_response.rbs +++ b/sig/finch_api/models/sandbox/job_create_response.rbs @@ -24,6 +24,13 @@ module FinchAPI job_url: String, remaining_refreshes: Integer ) -> void + + def to_hash: -> { + allowed_refreshes: Integer, + job_id: String, + job_url: String, + remaining_refreshes: Integer + } end end end diff --git a/sig/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbs b/sig/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbs index c661a565..22f764da 100644 --- a/sig/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbs +++ b/sig/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbs @@ -10,6 +10,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/sandbox/jobs/configuration_update_params.rbs b/sig/finch_api/models/sandbox/jobs/configuration_update_params.rbs index 9dabcff0..0786fc71 100644 --- a/sig/finch_api/models/sandbox/jobs/configuration_update_params.rbs +++ b/sig/finch_api/models/sandbox/jobs/configuration_update_params.rbs @@ -10,6 +10,8 @@ module FinchAPI include FinchAPI::Internal::Type::RequestParameters def initialize: (?request_options: FinchAPI::request_opts) -> void + + def to_hash: -> { request_options: FinchAPI::RequestOptions } end end end diff --git a/sig/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbs b/sig/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbs index d448d68d..da87ee1c 100644 --- a/sig/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbs +++ b/sig/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbs @@ -4,20 +4,25 @@ module FinchAPI module Jobs type sandbox_job_configuration = { - completion_status: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::completion_status, - type: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::type_ + completion_status: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::completion_status, + type: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::type_ } class SandboxJobConfiguration < FinchAPI::Internal::Type::BaseModel - attr_accessor completion_status: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::completion_status + attr_accessor completion_status: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::completion_status - attr_accessor type: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::type_ + attr_accessor type: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::type_ def initialize: ( - completion_status: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::completion_status, - type: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::type_ + completion_status: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::completion_status, + type: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::type_ ) -> void + def to_hash: -> { + completion_status: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::completion_status, + type: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::type_ + } + type completion_status = :complete | :reauth_error | :permissions_error | :error @@ -29,7 +34,7 @@ module FinchAPI PERMISSIONS_ERROR: :permissions_error ERROR: :error - def self?.values: -> ::Array[FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::completion_status] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::completion_status] end type type_ = :data_sync_all @@ -39,7 +44,7 @@ module FinchAPI DATA_SYNC_ALL: :data_sync_all - def self?.values: -> ::Array[FinchAPI::Sandbox::Jobs::SandboxJobConfiguration::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::type_] end end end diff --git a/sig/finch_api/models/sandbox/payment_create_params.rbs b/sig/finch_api/models/sandbox/payment_create_params.rbs index b70453e0..8ee3a8f8 100644 --- a/sig/finch_api/models/sandbox/payment_create_params.rbs +++ b/sig/finch_api/models/sandbox/payment_create_params.rbs @@ -34,6 +34,13 @@ module FinchAPI ?request_options: FinchAPI::request_opts ) -> void + def to_hash: -> { + end_date: String, + pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + start_date: String, + request_options: FinchAPI::RequestOptions + } + type pay_statement = { earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, @@ -42,10 +49,10 @@ module FinchAPI gross_pay: FinchAPI::Money?, individual_id: String, net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, total_hours: Float?, - type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? } class PayStatement < FinchAPI::Internal::Type::BaseModel @@ -63,13 +70,13 @@ module FinchAPI attr_accessor net_pay: FinchAPI::Money? - attr_accessor payment_method: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::payment_method? + attr_accessor payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method? attr_accessor taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]? attr_accessor total_hours: Float? - attr_accessor type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::type_? + attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? def initialize: ( ?earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, @@ -78,12 +85,25 @@ module FinchAPI ?gross_pay: FinchAPI::Money?, ?individual_id: String, ?net_pay: FinchAPI::Money?, - ?payment_method: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + ?payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, ?taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, ?total_hours: Float?, - ?type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::type_? + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? ) -> void + def to_hash: -> { + earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? + } + type earning = { amount: Integer?, @@ -91,7 +111,7 @@ module FinchAPI currency: String?, hours: Float?, name: String?, - type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? } class Earning < FinchAPI::Internal::Type::BaseModel @@ -105,7 +125,7 @@ module FinchAPI attr_accessor name: String? - attr_accessor type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? def initialize: ( ?amount: Integer?, @@ -113,9 +133,18 @@ module FinchAPI ?currency: String?, ?hours: Float?, ?name: String?, - ?type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + } + type attributes = { metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata @@ -132,6 +161,10 @@ module FinchAPI ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -140,6 +173,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end @@ -175,7 +210,7 @@ module FinchAPI TYPE_1099: :"1099" OTHER: :other - def self?.values: -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_] end end @@ -211,6 +246,15 @@ module FinchAPI ?type: FinchAPI::Models::HRIS::benefit_type? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type? + } + type attributes = { metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata @@ -227,6 +271,10 @@ module FinchAPI ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -235,6 +283,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end end @@ -267,6 +317,14 @@ module FinchAPI ?type: FinchAPI::Models::HRIS::benefit_type? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes?, + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type? + } + type attributes = { metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata @@ -283,6 +341,10 @@ module FinchAPI ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -291,6 +353,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end end @@ -304,7 +368,7 @@ module FinchAPI DIRECT_DEPOSIT: :direct_deposit OTHER: :other - def self?.values: -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::payment_method] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method] end type tax = @@ -314,7 +378,7 @@ module FinchAPI currency: String?, employer: bool?, name: String?, - type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? } class Tax < FinchAPI::Internal::Type::BaseModel @@ -328,7 +392,7 @@ module FinchAPI attr_accessor name: String? - attr_accessor type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? def initialize: ( ?amount: Integer?, @@ -336,9 +400,18 @@ module FinchAPI ?currency: String?, ?employer: bool?, ?name: String?, - ?type: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? ) -> void + def to_hash: -> { + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes?, + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + } + type attributes = { metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata @@ -355,6 +428,10 @@ module FinchAPI ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata ) -> void + def to_hash: -> { + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata + } + type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel @@ -363,6 +440,8 @@ module FinchAPI def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end @@ -376,7 +455,7 @@ module FinchAPI LOCAL: :local FICA: :fica - def self?.values: -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_] end end @@ -389,7 +468,7 @@ module FinchAPI OFF_CYCLE_PAYROLL: :off_cycle_payroll ONE_TIME_PAYMENT: :one_time_payment - def self?.values: -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::type_] + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_] end end end diff --git a/sig/finch_api/models/sandbox/payment_create_response.rbs b/sig/finch_api/models/sandbox/payment_create_response.rbs index cd6bbfdb..c36f64e9 100644 --- a/sig/finch_api/models/sandbox/payment_create_response.rbs +++ b/sig/finch_api/models/sandbox/payment_create_response.rbs @@ -9,6 +9,8 @@ module FinchAPI attr_accessor payment_id: String def initialize: (pay_date: String, payment_id: String) -> void + + def to_hash: -> { pay_date: String, payment_id: String } end end end diff --git a/sig/finch_api/resources/connect/sessions.rbs b/sig/finch_api/resources/connect/sessions.rbs index 2456ca66..bc282759 100644 --- a/sig/finch_api/resources/connect/sessions.rbs +++ b/sig/finch_api/resources/connect/sessions.rbs @@ -5,7 +5,7 @@ module FinchAPI def new: ( customer_id: String, customer_name: String, - products: ::Array[FinchAPI::Connect::SessionNewParams::product], + products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product], ?customer_email: String?, ?integration: FinchAPI::Connect::SessionNewParams::Integration?, ?manual: bool?, @@ -18,7 +18,7 @@ module FinchAPI def reauthenticate: ( connection_id: String, ?minutes_to_expire: Integer?, - ?products: ::Array[FinchAPI::Connect::SessionReauthenticateParams::product]?, + ?products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, ?redirect_uri: String?, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::Connect::SessionReauthenticateResponse diff --git a/sig/finch_api/resources/hris/company/pay_statement_item.rbs b/sig/finch_api/resources/hris/company/pay_statement_item.rbs index f7dd9a01..00da5c7b 100644 --- a/sig/finch_api/resources/hris/company/pay_statement_item.rbs +++ b/sig/finch_api/resources/hris/company/pay_statement_item.rbs @@ -6,7 +6,7 @@ module FinchAPI attr_reader rules: FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules def list: ( - ?categories: ::Array[FinchAPI::HRIS::Company::PayStatementItemListParams::category], + ?categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], ?end_date: Date, ?name: String, ?start_date: Date, diff --git a/sig/finch_api/resources/hris/documents.rbs b/sig/finch_api/resources/hris/documents.rbs index b294de77..f760d678 100644 --- a/sig/finch_api/resources/hris/documents.rbs +++ b/sig/finch_api/resources/hris/documents.rbs @@ -6,7 +6,7 @@ module FinchAPI ?individual_ids: ::Array[String], ?limit: Integer, ?offset: Integer, - ?types: ::Array[FinchAPI::HRIS::DocumentListParams::type_], + ?types: ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::HRIS::DocumentListResponse From 68d04c3e38f076254375ef4e1ea24383d7ff7aa2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 14:05:14 +0000 Subject: [PATCH 09/27] feat(api): api update --- .stats.yml | 4 ++-- lib/finch_api/models/connect/session_new_params.rb | 6 +++--- lib/finch_api/resources/connect/sessions.rb | 2 +- rbi/finch_api/models/connect/session_new_params.rbi | 8 ++++---- rbi/finch_api/resources/connect/sessions.rbi | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index eecdfce3..fca506d9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-944a0f9d35f3b8ec2ba62fa12e551cf89f0b845f8ed1e3c7f67a9fb80b32d96f.yml -openapi_spec_hash: 37c849e7b5dd941c011385b49467e077 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-4fcae6958da081ca0e96ef6b3ce8f0b6e50994faaed8ecd6e94aa40ce1a93521.yml +openapi_spec_hash: a825b1120bb26f04505e3bc9ab1e48f3 config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 diff --git a/lib/finch_api/models/connect/session_new_params.rb b/lib/finch_api/models/connect/session_new_params.rb index aa47195e..816141f0 100644 --- a/lib/finch_api/models/connect/session_new_params.rb +++ b/lib/finch_api/models/connect/session_new_params.rb @@ -40,8 +40,8 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel optional :manual, FinchAPI::Internal::Type::Boolean, nil?: true # @!attribute minutes_to_expire - # The number of minutes until the session expires (defaults to 43,200, which is 30 - # days) + # The number of minutes until the session expires (defaults to 129,600, which is + # 90 days) # # @return [Float, nil] optional :minutes_to_expire, Float, nil?: true @@ -72,7 +72,7 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # # @param manual [Boolean, nil] # - # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 + # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9 # # @param redirect_uri [String, nil] # diff --git a/lib/finch_api/resources/connect/sessions.rb b/lib/finch_api/resources/connect/sessions.rb index d056acb7..fc959cda 100644 --- a/lib/finch_api/resources/connect/sessions.rb +++ b/lib/finch_api/resources/connect/sessions.rb @@ -23,7 +23,7 @@ class Sessions # # @param manual [Boolean, nil] # - # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 + # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9 # # @param redirect_uri [String, nil] # diff --git a/rbi/finch_api/models/connect/session_new_params.rbi b/rbi/finch_api/models/connect/session_new_params.rbi index 6f0f91c6..0be8adae 100644 --- a/rbi/finch_api/models/connect/session_new_params.rbi +++ b/rbi/finch_api/models/connect/session_new_params.rbi @@ -49,8 +49,8 @@ module FinchAPI sig { returns(T.nilable(T::Boolean)) } attr_accessor :manual - # The number of minutes until the session expires (defaults to 43,200, which is 30 - # days) + # The number of minutes until the session expires (defaults to 129,600, which is + # 90 days) sig { returns(T.nilable(Float)) } attr_accessor :minutes_to_expire @@ -90,8 +90,8 @@ module FinchAPI customer_email: nil, integration: nil, manual: nil, - # The number of minutes until the session expires (defaults to 43,200, which is 30 - # days) + # The number of minutes until the session expires (defaults to 129,600, which is + # 90 days) minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, diff --git a/rbi/finch_api/resources/connect/sessions.rbi b/rbi/finch_api/resources/connect/sessions.rbi index 274f0674..ac062dac 100644 --- a/rbi/finch_api/resources/connect/sessions.rbi +++ b/rbi/finch_api/resources/connect/sessions.rbi @@ -31,8 +31,8 @@ module FinchAPI customer_email: nil, integration: nil, manual: nil, - # The number of minutes until the session expires (defaults to 43,200, which is 30 - # days) + # The number of minutes until the session expires (defaults to 129,600, which is + # 90 days) minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, From 6e46c62b78b34d3944136bea9decd9254b9d7b2c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 19:38:03 +0000 Subject: [PATCH 10/27] feat(api): api update --- .stats.yml | 4 +- lib/finch_api.rb | 1 - lib/finch_api/models/hris/benefit_type.rb | 20 +- .../pay_statement_item_list_response.rb | 36 +- lib/finch_api/models/hris/employment_data.rb | 122 +- lib/finch_api/models/hris/pay_statement.rb | 491 ------ .../models/hris/pay_statement_response.rb | 16 +- .../hris/pay_statement_response_body.rb | 689 +++++++- lib/finch_api/models/hris/payment.rb | 44 +- lib/finch_api/models/money.rb | 8 +- .../models/payroll/pay_group_list_response.rb | 24 +- .../payroll/pay_group_retrieve_response.rb | 10 +- .../models/sandbox/payment_create_params.rb | 298 ++-- rbi/finch_api/models/hris/benefit_type.rbi | 32 +- .../pay_statement_item_list_response.rbi | 51 +- rbi/finch_api/models/hris/employment_data.rbi | 246 +-- rbi/finch_api/models/hris/pay_statement.rbi | 1122 ------------ .../models/hris/pay_statement_response.rbi | 34 +- .../hris/pay_statement_response_body.rbi | 1532 ++++++++++++++++- rbi/finch_api/models/hris/payment.rbi | 57 +- rbi/finch_api/models/money.rbi | 11 +- .../payroll/pay_group_list_response.rbi | 68 +- .../payroll/pay_group_retrieve_response.rbi | 28 +- .../models/sandbox/payment_create_params.rbi | 609 +++---- sig/finch_api/models/hris/benefit_type.rbs | 42 +- .../pay_statement_item_list_response.rbs | 32 +- sig/finch_api/models/hris/employment_data.rbs | 88 +- sig/finch_api/models/hris/pay_statement.rbs | 436 ----- .../models/hris/pay_statement_response.rbs | 24 +- .../hris/pay_statement_response_body.rbs | 565 +++++- sig/finch_api/models/hris/payment.rbs | 50 +- sig/finch_api/models/money.rbs | 6 +- .../payroll/pay_group_list_response.rbs | 40 +- .../payroll/pay_group_retrieve_response.rbs | 20 +- .../models/sandbox/payment_create_params.rbs | 262 ++- .../hris/company/pay_statement_item_test.rb | 6 +- .../resources/hris/pay_statements_test.rb | 6 +- .../finch_api/resources/hris/payments_test.rb | 2 +- .../resources/payroll/pay_groups_test.rb | 6 +- 39 files changed, 3801 insertions(+), 3337 deletions(-) delete mode 100644 lib/finch_api/models/hris/pay_statement.rb delete mode 100644 rbi/finch_api/models/hris/pay_statement.rbi delete mode 100644 sig/finch_api/models/hris/pay_statement.rbs diff --git a/.stats.yml b/.stats.yml index fca506d9..f17b73c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-4fcae6958da081ca0e96ef6b3ce8f0b6e50994faaed8ecd6e94aa40ce1a93521.yml -openapi_spec_hash: a825b1120bb26f04505e3bc9ab1e48f3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5b7ee4cddd08558fb0cc5010d36899c0bbe5d6a8d39c8171f65b70b68927df3c.yml +openapi_spec_hash: c01482dc89e9bf7ae4c9dad0fb547e62 config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 diff --git a/lib/finch_api.rb b/lib/finch_api.rb index a7b1341f..e662482c 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -118,7 +118,6 @@ require_relative "finch_api/models/hris/individual_retrieve_many_params" require_relative "finch_api/models/hris/payment" require_relative "finch_api/models/hris/payment_list_params" -require_relative "finch_api/models/hris/pay_statement" require_relative "finch_api/models/hris/pay_statement_response" require_relative "finch_api/models/hris/pay_statement_response_body" require_relative "finch_api/models/hris/pay_statement_retrieve_many_params" diff --git a/lib/finch_api/models/hris/benefit_type.rb b/lib/finch_api/models/hris/benefit_type.rb index 45873261..d0260bee 100644 --- a/lib/finch_api/models/hris/benefit_type.rb +++ b/lib/finch_api/models/hris/benefit_type.rb @@ -7,25 +7,25 @@ module HRIS module BenefitType extend FinchAPI::Internal::Type::Enum + BENEFIT_TYPE_457 = :"457" BENEFIT_TYPE_401K = :"401k" BENEFIT_TYPE_401K_ROTH = :"401k_roth" BENEFIT_TYPE_401K_LOAN = :"401k_loan" BENEFIT_TYPE_403B = :"403b" BENEFIT_TYPE_403B_ROTH = :"403b_roth" - BENEFIT_TYPE_457 = :"457" BENEFIT_TYPE_457_ROTH = :"457_roth" - S125_MEDICAL = :s125_medical - S125_DENTAL = :s125_dental - S125_VISION = :s125_vision - HSA_PRE = :hsa_pre - HSA_POST = :hsa_post - FSA_MEDICAL = :fsa_medical - FSA_DEPENDENT_CARE = :fsa_dependent_care - SIMPLE_IRA = :simple_ira - SIMPLE = :simple COMMUTER = :commuter CUSTOM_POST_TAX = :custom_post_tax CUSTOM_PRE_TAX = :custom_pre_tax + FSA_DEPENDENT_CARE = :fsa_dependent_care + FSA_MEDICAL = :fsa_medical + HSA_POST = :hsa_post + HSA_PRE = :hsa_pre + S125_DENTAL = :s125_dental + S125_MEDICAL = :s125_medical + S125_VISION = :s125_vision + SIMPLE = :simple + SIMPLE_IRA = :simple_ira # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb b/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb index 18cd7fdf..c8a8b922 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb @@ -9,22 +9,22 @@ class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel # @!attribute attributes # The attributes of the pay statement item. # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, nil] - optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes } + # @return [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] + required :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes } # @!attribute category # The category of the pay statement item. # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category, nil] - optional :category, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category } + # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] + required :category, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category } # @!attribute name # The name of the pay statement item. # - # @return [String, nil] - optional :name, String + # @return [String] + required :name, String - # @!method initialize(attributes: nil, category: nil, name: nil) + # @!method initialize(attributes:, category:, name:) # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] The attributes of the pay statement item. # # @param category [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] The category of the pay statement item. @@ -33,22 +33,22 @@ class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel # @see FinchAPI::Models::HRIS::Company::PayStatementItemListResponse#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute employer - # `true` if the amount is paid by the employers. This field is only available for - # taxes. - # - # @return [Boolean, nil] - optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true - # @!attribute metadata # The metadata of the pay statement item derived by the rules engine if available. # Each attribute will be a key-value pair defined by a rule. # # @return [Hash{Symbol=>Object, nil}, nil] - optional :metadata, + required :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], nil?: true + # @!attribute employer + # `true` if the amount is paid by the employers. This field is only available for + # taxes. + # + # @return [Boolean, nil] + optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true + # @!attribute pre_tax # `true` if the pay statement item is pre-tax. This field is only available for # employee deductions. @@ -62,17 +62,17 @@ class Attributes < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :type, String, nil?: true - # @!method initialize(employer: nil, metadata: nil, pre_tax: nil, type: nil) + # @!method initialize(metadata:, employer: nil, pre_tax: nil, type: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes} for # more details. # # The attributes of the pay statement item. # - # @param employer [Boolean, nil] `true` if the amount is paid by the employers. This field is only available for - # # @param metadata [Hash{Symbol=>Object, nil}, nil] The metadata of the pay statement item derived by the rules engine if available. # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. This field is only available for + # # @param pre_tax [Boolean, nil] `true` if the pay statement item is pre-tax. This field is only available for em # # @param type [String, nil] The type of the pay statement item. diff --git a/lib/finch_api/models/hris/employment_data.rb b/lib/finch_api/models/hris/employment_data.rb index cfb040cc..c6ddae23 100644 --- a/lib/finch_api/models/hris/employment_data.rb +++ b/lib/finch_api/models/hris/employment_data.rb @@ -23,18 +23,6 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :class_code, String, nil?: true - # @!attribute custom_fields - # Custom fields for the individual. These are fields which are defined by the - # employer in the system. Custom fields are not currently supported for assisted - # connections. - # - # @return [Array, nil] - required :custom_fields, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField] - }, - nil?: true - # @!attribute department # The department object. # @@ -112,13 +100,17 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :title, String, nil?: true - # @!attribute work_id - # @deprecated - # - # This field is deprecated in favour of `source_id` + # @!attribute custom_fields + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. Custom fields are not currently supported for assisted + # connections. # - # @return [String, nil] - required :work_id, String, nil?: true + # @return [Array, nil] + optional :custom_fields, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField] + }, + nil?: true # @!attribute income # The employee's income as reported by the provider. This may not always be @@ -142,7 +134,15 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :source_id, String, nil?: true - # @!method initialize(id:, class_code:, custom_fields:, department:, employment:, employment_status:, end_date:, first_name:, is_active:, last_name:, latest_rehire_date:, location:, manager:, middle_name:, start_date:, title:, work_id:, income: nil, income_history: nil, source_id: nil) + # @!attribute work_id + # @deprecated + # + # This field is deprecated in favour of `source_id` + # + # @return [String, nil] + optional :work_id, String, nil?: true + + # @!method initialize(id:, class_code:, department:, employment:, employment_status:, end_date:, first_name:, is_active:, last_name:, latest_rehire_date:, location:, manager:, middle_name:, start_date:, title:, custom_fields: nil, income: nil, income_history: nil, source_id: nil, work_id: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::EmploymentData::UnionMember0} for more details. # @@ -150,8 +150,6 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param class_code [String, nil] Worker's compensation classification code for this employee # - # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl - # # @param department [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Department, nil] The department object. # # @param employment [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment, nil] The employment object. @@ -178,52 +176,15 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param title [String, nil] The current title of the individual. # - # @param work_id [String, nil] This field is deprecated in favour of `source_id` + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl # # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # # @param income_history [Array, nil] The array of income history. # # @param source_id [String, nil] The source system's unique employment identifier for this individual - - class CustomField < FinchAPI::Internal::Type::BaseModel - # @!attribute name - # - # @return [String, nil] - optional :name, String, nil?: true - - # @!attribute value - # - # @return [String, Array, 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, Float, Boolean, nil] - - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField#value - module Value - extend FinchAPI::Internal::Type::Union - - variant String - - variant -> { FinchAPI::Models::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, Float, Boolean)] - - # @type [FinchAPI::Internal::Type::Converter] - UnionMember1Array = FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown] - end - end + # + # @param work_id [String, nil] This field is deprecated in favour of `source_id` # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#department class Department < FinchAPI::Internal::Type::BaseModel @@ -335,6 +296,45 @@ class Manager < FinchAPI::Internal::Type::BaseModel # # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. end + + class CustomField < FinchAPI::Internal::Type::BaseModel + # @!attribute name + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute value + # + # @return [String, Array, 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, Float, Boolean, nil] + + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField#value + module Value + extend FinchAPI::Internal::Type::Union + + variant String + + variant -> { FinchAPI::Models::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, Float, Boolean)] + + # @type [FinchAPI::Internal::Type::Converter] + UnionMember1Array = FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown] + end + end end class BatchError < FinchAPI::Internal::Type::BaseModel diff --git a/lib/finch_api/models/hris/pay_statement.rb b/lib/finch_api/models/hris/pay_statement.rb deleted file mode 100644 index 6322be1a..00000000 --- a/lib/finch_api/models/hris/pay_statement.rb +++ /dev/null @@ -1,491 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - class PayStatement < FinchAPI::Internal::Type::BaseModel - # @!attribute earnings - # The array of earnings objects associated with this pay statement - # - # @return [Array, nil] - optional :earnings, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Earning, nil?: true] }, - nil?: true - - # @!attribute employee_deductions - # The array of deductions objects associated with this pay statement. - # - # @return [Array, nil] - optional :employee_deductions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction, - nil?: true] - }, - nil?: true - - # @!attribute employer_contributions - # - # @return [Array, nil] - optional :employer_contributions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution, - nil?: true] - }, - nil?: true - - # @!attribute gross_pay - # - # @return [FinchAPI::Models::Money, nil] - optional :gross_pay, -> { FinchAPI::Money }, nil?: true - - # @!attribute individual_id - # A stable Finch `id` (UUID v4) for an individual in the company - # - # @return [String, nil] - optional :individual_id, String - - # @!attribute net_pay - # - # @return [FinchAPI::Models::Money, nil] - optional :net_pay, -> { FinchAPI::Money }, nil?: true - - # @!attribute payment_method - # The payment method. - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] - optional :payment_method, enum: -> { FinchAPI::HRIS::PayStatement::PaymentMethod }, nil?: true - - # @!attribute taxes - # The array of taxes objects associated with this pay statement. - # - # @return [Array, nil] - optional :taxes, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax, nil?: true] }, - nil?: true - - # @!attribute total_hours - # The number of hours worked for this pay period - # - # @return [Float, nil] - optional :total_hours, Float, nil?: true - - # @!attribute type - # The type of the payment associated with the pay statement. - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] - optional :type, enum: -> { FinchAPI::HRIS::PayStatement::Type }, nil?: true - - # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) - # @param earnings [Array, nil] The array of earnings objects associated with this pay statement - # - # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. - # - # @param employer_contributions [Array, nil] - # - # @param gross_pay [FinchAPI::Models::Money, nil] - # - # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company - # - # @param net_pay [FinchAPI::Models::Money, nil] - # - # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] The payment method. - # - # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. - # - # @param total_hours [Float, nil] The number of hours worked for this pay period - # - # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] The type of the payment associated with the pay statement. - - 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::Models::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::Models::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::Models::HRIS::PayStatement::Earning} for more details. - # - # @param amount [Integer, nil] The earnings amount in cents. - # - # @param attributes [FinchAPI::Models::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::Models::HRIS::PayStatement::Earning::Type, nil] The type of earning. - - # @see FinchAPI::Models::HRIS::PayStatement::Earning#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata, nil] - optional :metadata, -> { FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata } - - # @!method initialize(metadata: nil) - # @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}, 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::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 - - # 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] - end - end - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The deduction amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] - optional :attributes, -> { FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes }, nil?: true - - # @!attribute currency - # The deduction currency. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute name - # The deduction name from the pay statement. - # - # @return [String, nil] - optional :name, String, nil?: true - - # @!attribute pre_tax - # Boolean indicating if the deduction is pre-tax. - # - # @return [Boolean, nil] - optional :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute type - # Type of benefit. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - - # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil) - # @param amount [Integer, nil] The deduction amount in cents. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] - # - # @param currency [String, nil] The deduction currency. - # - # @param name [String, nil] The deduction name from the pay statement. - # - # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - - # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] - optional :metadata, -> { FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata } - - # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::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::Models::HRIS::PayStatement::EmployeeDeduction::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 - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The contribution amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] - optional :attributes, - -> { - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes - }, - nil?: true - - # @!attribute currency - # The contribution currency. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute name - # The contribution name from the pay statement. - # - # @return [String, nil] - optional :name, String, nil?: true - - # @!attribute type - # Type of benefit. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - - # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil) - # @param amount [Integer, nil] The contribution amount in cents. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] - # - # @param currency [String, nil] The contribution currency. - # - # @param name [String, nil] The contribution name from the pay statement. - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - - # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata, nil] - optional :metadata, - -> { - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - } - - # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution::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::Models::HRIS::PayStatement::EmployerContribution::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 - - # The payment method. - # - # @see FinchAPI::Models::HRIS::PayStatement#payment_method - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - CHECK = :check - DIRECT_DEPOSIT = :direct_deposit - OTHER = :other - - # @!method self.values - # @return [Array] - end - - class Tax < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The tax amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] - optional :attributes, -> { FinchAPI::HRIS::PayStatement::Tax::Attributes }, nil?: true - - # @!attribute currency - # The currency code. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute employer - # `true` if the amount is paid by the employers. - # - # @return [Boolean, nil] - optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute name - # The exact name of tax from the pay statement. - # - # @return [String, nil] - optional :name, String, nil?: true - - # @!attribute type - # The type of taxes. - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] - optional :type, enum: -> { FinchAPI::HRIS::PayStatement::Tax::Type }, nil?: true - - # @!method initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) - # @param amount [Integer, nil] The tax amount in cents. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] - # - # @param currency [String, nil] The currency code. - # - # @param employer [Boolean, nil] `true` if the amount is paid by the employers. - # - # @param name [String, nil] The exact name of tax from the pay statement. - # - # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] The type of taxes. - - # @see FinchAPI::Models::HRIS::PayStatement::Tax#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata, nil] - optional :metadata, -> { FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata } - - # @!method initialize(metadata: nil) - # @param metadata [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatement::Tax::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::Models::HRIS::PayStatement::Tax::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 taxes. - # - # @see FinchAPI::Models::HRIS::PayStatement::Tax#type - module Type - extend FinchAPI::Internal::Type::Enum - - STATE = :state - FEDERAL = :federal - LOCAL = :local - FICA = :fica - - # @!method self.values - # @return [Array] - end - end - - # The type of the payment associated with the pay statement. - # - # @see FinchAPI::Models::HRIS::PayStatement#type - module Type - extend FinchAPI::Internal::Type::Enum - - REGULAR_PAYROLL = :regular_payroll - OFF_CYCLE_PAYROLL = :off_cycle_payroll - ONE_TIME_PAYMENT = :one_time_payment - - # @!method self.values - # @return [Array] - end - end - end - end -end diff --git a/lib/finch_api/models/hris/pay_statement_response.rb b/lib/finch_api/models/hris/pay_statement_response.rb index abebf178..9ca5eef5 100644 --- a/lib/finch_api/models/hris/pay_statement_response.rb +++ b/lib/finch_api/models/hris/pay_statement_response.rb @@ -7,21 +7,21 @@ module HRIS class PayStatementResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody, nil] - optional :body, -> { FinchAPI::HRIS::PayStatementResponseBody } + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0, FinchAPI::Models::HRIS::PayStatementResponseBody::BatchError, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2] + required :body, union: -> { FinchAPI::HRIS::PayStatementResponseBody } # @!attribute code # - # @return [Integer, nil] - optional :code, Integer + # @return [Integer] + required :code, Integer # @!attribute payment_id # - # @return [String, nil] - optional :payment_id, String + # @return [String] + required :payment_id, String - # @!method initialize(body: nil, code: nil, payment_id: nil) - # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody] + # @!method initialize(body:, code:, payment_id:) + # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0, FinchAPI::Models::HRIS::PayStatementResponseBody::BatchError, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2] # @param code [Integer] # @param payment_id [String] end diff --git a/lib/finch_api/models/hris/pay_statement_response_body.rb b/lib/finch_api/models/hris/pay_statement_response_body.rb index c717b6d9..5734a468 100644 --- a/lib/finch_api/models/hris/pay_statement_response_body.rb +++ b/lib/finch_api/models/hris/pay_statement_response_body.rb @@ -3,22 +3,679 @@ module FinchAPI module Models module HRIS - class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel - # @!attribute paging - # - # @return [FinchAPI::Models::Paging, nil] - optional :paging, -> { FinchAPI::Paging } - - # @!attribute pay_statements - # The array of pay statements for the current payment. - # - # @return [Array, nil] - optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement] } - - # @!method initialize(paging: nil, pay_statements: nil) - # @param paging [FinchAPI::Models::Paging] - # - # @param pay_statements [Array] The array of pay statements for the current payment. + module PayStatementResponseBody + extend FinchAPI::Internal::Type::Union + + variant -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember0 } + + variant -> { FinchAPI::HRIS::PayStatementResponseBody::BatchError } + + variant -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2 } + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + # @!attribute paging + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::Paging] + required :paging, -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging } + + # @!attribute pay_statements + # + # @return [Array] + required :pay_statements, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] + } + + # @!method initialize(paging:, pay_statements:) + # @param paging [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::Paging] + # @param pay_statements [Array] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0#paging + class Paging < FinchAPI::Internal::Type::BaseModel + # @!attribute offset + # The current start index of the returned list of elements + # + # @return [Integer] + required :offset, Integer + + # @!attribute count + # The total number of elements for the entire query (not just the given page) + # + # @return [Integer, nil] + optional :count, Integer + + # @!method initialize(offset:, count: nil) + # @param offset [Integer] The current start index of the returned list of elements + # + # @param count [Integer] The total number of elements for the entire query (not just the given page) + end + + class PayStatement < FinchAPI::Internal::Type::BaseModel + # @!attribute earnings + # The array of earnings objects associated with this pay statement + # + # @return [Array, nil] + required :earnings, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning, + nil?: true] + }, + nil?: true + + # @!attribute employee_deductions + # The array of deductions objects associated with this pay statement. + # + # @return [Array, nil] + required :employee_deductions, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction, + nil?: true] + }, + nil?: true + + # @!attribute employer_contributions + # + # @return [Array, nil] + required :employer_contributions, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution, + nil?: true] + }, + nil?: true + + # @!attribute gross_pay + # + # @return [FinchAPI::Models::Money, nil] + required :gross_pay, -> { FinchAPI::Money }, nil?: true + + # @!attribute individual_id + # A stable Finch `id` (UUID v4) for an individual in the company + # + # @return [String] + required :individual_id, String + + # @!attribute net_pay + # + # @return [FinchAPI::Models::Money, nil] + required :net_pay, -> { FinchAPI::Money }, nil?: true + + # @!attribute payment_method + # The payment method. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod, nil] + required :payment_method, + enum: -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod + }, + nil?: true + + # @!attribute taxes + # The array of taxes objects associated with this pay statement. + # + # @return [Array, nil] + required :taxes, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax, + nil?: true] + }, + nil?: true + + # @!attribute total_hours + # The number of hours worked for this pay period + # + # @return [Float, nil] + required :total_hours, Float, nil?: true + + # @!attribute type + # The type of the payment associated with the pay statement. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type, nil] + required :type, + enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type }, + nil?: true + + # @!method initialize(earnings:, employee_deductions:, employer_contributions:, gross_pay:, individual_id:, net_pay:, payment_method:, taxes:, total_hours:, type:) + # @param earnings [Array, nil] The array of earnings objects associated with this pay statement + # + # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. + # + # @param employer_contributions [Array, nil] + # + # @param gross_pay [FinchAPI::Models::Money, nil] + # + # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company + # + # @param net_pay [FinchAPI::Models::Money, nil] + # + # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod, nil] The payment method. + # + # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. + # + # @param total_hours [Float, nil] The number of hours worked for this pay period + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type, nil] The type of the payment associated with the pay statement. + + 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::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type, nil] + required :type, + enum: -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type + }, + nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes, nil] + optional :attributes, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes + }, + nil?: true + + # @!method initialize(amount:, currency:, hours:, name:, type:, attributes: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::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::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type, nil] The type of earning. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes, nil] + + # The type of earning. + # + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::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] + end + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata] + required :metadata, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::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::PayStatementResponseBody::UnionMember0::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 + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # The deduction amount in cents. + # + # @return [Integer, nil] + required :amount, Integer, nil?: true + + # @!attribute currency + # The deduction currency. + # + # @return [String, nil] + required :currency, String, nil?: true + + # @!attribute name + # The deduction name from the pay statement. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute pre_tax + # Boolean indicating if the deduction is pre-tax. + # + # @return [Boolean, nil] + required :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true + + # @!attribute type + # Type of benefit. + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] + required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes, nil] + optional :attributes, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes + }, + nil?: true + + # @!method initialize(amount:, currency:, name:, pre_tax:, type:, attributes: nil) + # @param amount [Integer, nil] The deduction amount in cents. + # + # @param currency [String, nil] The deduction currency. + # + # @param name [String, nil] The deduction name from the pay statement. + # + # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes, nil] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata] + required :metadata, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::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::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::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 + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + # @!attribute currency + # The contribution currency. + # + # @return [String, nil] + required :currency, String, nil?: true + + # @!attribute name + # The contribution name from the pay statement. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute type + # Type of benefit. + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] + required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true + + # @!attribute amount + # The contribution amount in cents. + # + # @return [Integer, nil] + optional :amount, Integer, nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes, nil] + optional :attributes, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes + }, + nil?: true + + # @!method initialize(currency:, name:, type:, amount: nil, attributes: nil) + # @param currency [String, nil] The contribution currency. + # + # @param name [String, nil] The contribution name from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param amount [Integer, nil] The contribution amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes, nil] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata] + required :metadata, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::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::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::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 + + # The payment method. + # + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement#payment_method + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + CHECK = :check + DIRECT_DEPOSIT = :direct_deposit + OTHER = :other + + # @!method self.values + # @return [Array] + end + + class Tax < FinchAPI::Internal::Type::BaseModel + # @!attribute currency + # The currency code. + # + # @return [String, nil] + required :currency, String, nil?: true + + # @!attribute employer + # `true` if the amount is paid by the employers. + # + # @return [Boolean, nil] + required :employer, FinchAPI::Internal::Type::Boolean, nil?: true + + # @!attribute name + # The exact name of tax from the pay statement. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute type + # The type of taxes. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type, nil] + required :type, + enum: -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type + }, + nil?: true + + # @!attribute amount + # The tax amount in cents. + # + # @return [Integer, nil] + optional :amount, Integer, nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes, nil] + optional :attributes, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes + }, + nil?: true + + # @!method initialize(currency:, employer:, name:, type:, amount: nil, attributes: nil) + # @param currency [String, nil] The currency code. + # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. + # + # @param name [String, nil] The exact name of tax from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type, nil] The type of taxes. + # + # @param amount [Integer, nil] The tax amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes, nil] + + # The type of taxes. + # + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax#type + module Type + extend FinchAPI::Internal::Type::Enum + + STATE = :state + FEDERAL = :federal + LOCAL = :local + FICA = :fica + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata] + required :metadata, + -> { + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::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::PayStatementResponseBody::UnionMember0::PayStatement::Tax::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 + + # The type of the payment associated with the pay statement. + # + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement#type + module Type + extend FinchAPI::Internal::Type::Enum + + OFF_CYCLE_PAYROLL = :off_cycle_payroll + ONE_TIME_PAYMENT = :one_time_payment + REGULAR_PAYROLL = :regular_payroll + + # @!method self.values + # @return [Array] + end + end + end + + class BatchError < FinchAPI::Internal::Type::BaseModel + # @!attribute code + # + # @return [Float] + required :code, Float + + # @!attribute message + # + # @return [String] + required :message, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute finch_code + # + # @return [String, nil] + optional :finch_code, String + + # @!method initialize(code:, message:, name:, finch_code: nil) + # @param code [Float] + # @param message [String] + # @param name [String] + # @param finch_code [String] + end + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + # @!attribute code + # + # @return [Float, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Code] + required :code, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code } + + # @!attribute finch_code + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::FinchCode] + required :finch_code, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode } + + # @!attribute message + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Message] + required :message, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message } + + # @!attribute name + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Name] + required :name, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name } + + # @!method initialize(code:, finch_code:, message:, name:) + # @param code [Float, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Code] + # @param finch_code [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::FinchCode] + # @param message [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Message] + # @param name [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Name] + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#code + module Code + extend FinchAPI::Internal::Type::Enum + + CODE_202 = 202 + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#finch_code + module FinchCode + extend FinchAPI::Internal::Type::Enum + + DATA_SYNC_IN_PROGRESS = :data_sync_in_progress + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#message + module Message + extend FinchAPI::Internal::Type::Enum + + THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER = + :"The pay statements for this payment are being fetched. Please check back later." + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#name + module Name + extend FinchAPI::Internal::Type::Enum + + ACCEPTED = :accepted + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0, FinchAPI::Models::HRIS::PayStatementResponseBody::BatchError, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2)] end end end diff --git a/lib/finch_api/models/hris/payment.rb b/lib/finch_api/models/hris/payment.rb index cf37e273..d48a8af3 100644 --- a/lib/finch_api/models/hris/payment.rb +++ b/lib/finch_api/models/hris/payment.rb @@ -8,55 +8,55 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute id # The unique id for the payment. # - # @return [String, nil] - optional :id, String + # @return [String] + required :id, String # @!attribute company_debit # # @return [FinchAPI::Models::Money, nil] - optional :company_debit, -> { FinchAPI::Money }, nil?: true + required :company_debit, -> { FinchAPI::Money }, nil?: true # @!attribute debit_date # # @return [String, nil] - optional :debit_date, String, nil?: true + required :debit_date, String, nil?: true # @!attribute employee_taxes # # @return [FinchAPI::Models::Money, nil] - optional :employee_taxes, -> { FinchAPI::Money }, nil?: true + required :employee_taxes, -> { FinchAPI::Money }, nil?: true # @!attribute employer_taxes # # @return [FinchAPI::Models::Money, nil] - optional :employer_taxes, -> { FinchAPI::Money }, nil?: true + required :employer_taxes, -> { FinchAPI::Money }, nil?: true # @!attribute gross_pay # # @return [FinchAPI::Models::Money, nil] - optional :gross_pay, -> { FinchAPI::Money }, nil?: true + required :gross_pay, -> { FinchAPI::Money }, nil?: true # @!attribute individual_ids # Array of every individual on this payment. # # @return [Array, nil] - optional :individual_ids, FinchAPI::Internal::Type::ArrayOf[String], nil?: true + required :individual_ids, FinchAPI::Internal::Type::ArrayOf[String], nil?: true # @!attribute net_pay # # @return [FinchAPI::Models::Money, nil] - optional :net_pay, -> { FinchAPI::Money }, nil?: true + required :net_pay, -> { FinchAPI::Money }, nil?: true # @!attribute pay_date # # @return [String, nil] - optional :pay_date, String, nil?: true + required :pay_date, String, nil?: true # @!attribute pay_frequencies # List of pay frequencies associated with this payment. # # @return [Array, nil] - optional :pay_frequencies, + required :pay_frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::Payment::PayFrequency] }, nil?: true @@ -64,15 +64,15 @@ class Payment < FinchAPI::Internal::Type::BaseModel # Array of the Finch id (uuidv4) of every pay group associated with this payment. # # @return [Array, nil] - optional :pay_group_ids, FinchAPI::Internal::Type::ArrayOf[String], nil?: true + required :pay_group_ids, FinchAPI::Internal::Type::ArrayOf[String], nil?: true # @!attribute pay_period # The pay period object. # # @return [FinchAPI::Models::HRIS::Payment::PayPeriod, nil] - optional :pay_period, -> { FinchAPI::HRIS::Payment::PayPeriod }, nil?: true + required :pay_period, -> { FinchAPI::HRIS::Payment::PayPeriod }, nil?: true - # @!method initialize(id: nil, company_debit: nil, debit_date: nil, employee_taxes: nil, employer_taxes: nil, gross_pay: nil, individual_ids: nil, net_pay: nil, pay_date: nil, pay_frequencies: nil, pay_group_ids: nil, pay_period: nil) + # @!method initialize(id:, company_debit:, debit_date:, employee_taxes:, employer_taxes:, gross_pay:, individual_ids:, net_pay:, pay_date:, pay_frequencies:, pay_group_ids:, pay_period:) # @param id [String] The unique id for the payment. # # @param company_debit [FinchAPI::Models::Money, nil] @@ -101,14 +101,14 @@ module PayFrequency extend FinchAPI::Internal::Type::Enum ANNUALLY = :annually - SEMI_ANNUALLY = :semi_annually - QUARTERLY = :quarterly - MONTHLY = :monthly - SEMI_MONTHLY = :semi_monthly BI_WEEKLY = :bi_weekly - WEEKLY = :weekly DAILY = :daily + MONTHLY = :monthly OTHER = :other + QUARTERLY = :quarterly + SEMI_ANNUALLY = :semi_annually + SEMI_MONTHLY = :semi_monthly + WEEKLY = :weekly # @!method self.values # @return [Array] @@ -119,14 +119,14 @@ class PayPeriod < FinchAPI::Internal::Type::BaseModel # @!attribute end_date # # @return [String, nil] - optional :end_date, String, nil?: true + required :end_date, String, nil?: true # @!attribute start_date # # @return [String, nil] - optional :start_date, String, nil?: true + required :start_date, String, nil?: true - # @!method initialize(end_date: nil, start_date: nil) + # @!method initialize(end_date:, start_date:) # The pay period object. # # @param end_date [String, nil] diff --git a/lib/finch_api/models/money.rb b/lib/finch_api/models/money.rb index 153d11a9..e3ccc89d 100644 --- a/lib/finch_api/models/money.rb +++ b/lib/finch_api/models/money.rb @@ -7,14 +7,14 @@ class Money < FinchAPI::Internal::Type::BaseModel # Amount for money object (in cents) # # @return [Integer, nil] - optional :amount, Integer, nil?: true + required :amount, Integer, nil?: true # @!attribute currency # - # @return [String, nil] - optional :currency, String + # @return [String] + required :currency, String - # @!method initialize(amount: nil, currency: nil) + # @!method initialize(amount:, currency:) # @param amount [Integer, nil] Amount for money object (in cents) # # @param currency [String] diff --git a/lib/finch_api/models/payroll/pay_group_list_response.rb b/lib/finch_api/models/payroll/pay_group_list_response.rb index 1d24b6ba..fb57ba88 100644 --- a/lib/finch_api/models/payroll/pay_group_list_response.rb +++ b/lib/finch_api/models/payroll/pay_group_list_response.rb @@ -8,23 +8,23 @@ class PayGroupListResponse < FinchAPI::Internal::Type::BaseModel # @!attribute id # Finch id (uuidv4) for the pay group # - # @return [String, nil] - optional :id, String + # @return [String] + required :id, String # @!attribute name # Name of the pay group # - # @return [String, nil] - optional :name, String + # @return [String] + required :name, String # @!attribute pay_frequencies # List of pay frequencies associated with this pay group # - # @return [Array, nil] - optional :pay_frequencies, + # @return [Array] + required :pay_frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency] } - # @!method initialize(id: nil, name: nil, pay_frequencies: nil) + # @!method initialize(id:, name:, pay_frequencies:) # @param id [String] Finch id (uuidv4) for the pay group # # @param name [String] Name of the pay group @@ -35,14 +35,14 @@ module PayFrequency extend FinchAPI::Internal::Type::Enum ANNUALLY = :annually - SEMI_ANNUALLY = :semi_annually - QUARTERLY = :quarterly - MONTHLY = :monthly - SEMI_MONTHLY = :semi_monthly BI_WEEKLY = :bi_weekly - WEEKLY = :weekly DAILY = :daily + MONTHLY = :monthly OTHER = :other + QUARTERLY = :quarterly + SEMI_ANNUALLY = :semi_annually + SEMI_MONTHLY = :semi_monthly + WEEKLY = :weekly # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/payroll/pay_group_retrieve_response.rb b/lib/finch_api/models/payroll/pay_group_retrieve_response.rb index d5c9e924..f48a6579 100644 --- a/lib/finch_api/models/payroll/pay_group_retrieve_response.rb +++ b/lib/finch_api/models/payroll/pay_group_retrieve_response.rb @@ -42,14 +42,14 @@ module PayFrequency extend FinchAPI::Internal::Type::Enum ANNUALLY = :annually - SEMI_ANNUALLY = :semi_annually - QUARTERLY = :quarterly - MONTHLY = :monthly - SEMI_MONTHLY = :semi_monthly BI_WEEKLY = :bi_weekly - WEEKLY = :weekly DAILY = :daily + MONTHLY = :monthly OTHER = :other + QUARTERLY = :quarterly + SEMI_ANNUALLY = :semi_annually + SEMI_MONTHLY = :semi_monthly + WEEKLY = :weekly # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/sandbox/payment_create_params.rb b/lib/finch_api/models/sandbox/payment_create_params.rb index d381fb85..ae79dd78 100644 --- a/lib/finch_api/models/sandbox/payment_create_params.rb +++ b/lib/finch_api/models/sandbox/payment_create_params.rb @@ -37,7 +37,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # The array of earnings objects associated with this pay statement # # @return [Array, nil] - optional :earnings, + required :earnings, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning, nil?: true] @@ -48,7 +48,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # The array of deductions objects associated with this pay statement. # # @return [Array, nil] - optional :employee_deductions, + required :employee_deductions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction, nil?: true] @@ -58,7 +58,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute employer_contributions # # @return [Array, nil] - optional :employer_contributions, + required :employer_contributions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution, nil?: true] @@ -68,24 +68,24 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute gross_pay # # @return [FinchAPI::Models::Money, nil] - optional :gross_pay, -> { FinchAPI::Money }, nil?: true + required :gross_pay, -> { FinchAPI::Money }, nil?: true # @!attribute individual_id # A stable Finch `id` (UUID v4) for an individual in the company # - # @return [String, nil] - optional :individual_id, String + # @return [String] + required :individual_id, String # @!attribute net_pay # # @return [FinchAPI::Models::Money, nil] - optional :net_pay, -> { FinchAPI::Money }, nil?: true + required :net_pay, -> { FinchAPI::Money }, nil?: true # @!attribute payment_method # The payment method. # # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] - optional :payment_method, + required :payment_method, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod }, nil?: true @@ -93,7 +93,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # The array of taxes objects associated with this pay statement. # # @return [Array, nil] - optional :taxes, + required :taxes, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax, nil?: true] @@ -104,15 +104,15 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # The number of hours worked for this pay period # # @return [Float, nil] - optional :total_hours, Float, nil?: true + required :total_hours, Float, nil?: true # @!attribute type # The type of the payment associated with the pay statement. # # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] - optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type }, nil?: true + required :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type }, nil?: true - # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) + # @!method initialize(earnings:, employee_deductions:, employer_contributions:, gross_pay:, individual_id:, net_pay:, payment_method:, taxes:, total_hours:, type:) # @param earnings [Array, nil] The array of earnings objects associated with this pay statement # # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. @@ -138,51 +138,49 @@ class Earning < FinchAPI::Internal::Type::BaseModel # The earnings amount in cents. # # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] - optional :attributes, - -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes }, - nil?: true + required :amount, Integer, nil?: true # @!attribute currency # The earnings currency code. # # @return [String, nil] - optional :currency, String, nil?: true + 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] - optional :hours, Float, nil?: true + required :hours, Float, nil?: true # @!attribute name # The exact name of the deduction from the pay statement. # # @return [String, nil] - optional :name, String, nil?: true + required :name, String, nil?: true # @!attribute type # The type of earning. # # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] - optional :type, + required :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type }, nil?: true - # @!method initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil) + # @!attribute attributes + # + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] + optional :attributes, + -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes }, + nil?: true + + # @!method initialize(amount:, currency:, hours:, name:, type:, attributes: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning} for more # details. # # @param amount [Integer, nil] The earnings amount in cents. # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::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 @@ -190,18 +188,44 @@ class Earning < FinchAPI::Internal::Type::BaseModel # @param name [String, nil] The exact name of the deduction from the pay statement. # # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] The type of earning. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] + + # The type of earning. + # + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::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] + end # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, nil] - optional :metadata, + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] + required :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata } - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes#metadata @@ -211,11 +235,11 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). # - # @return [Hash{Symbol=>Object, nil}, nil] - optional :metadata, + # @return [Hash{Symbol=>Object, nil}] + required :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata} # for more details. @@ -223,30 +247,6 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @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::Models::Sandbox::PaymentCreateParams::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] - end end class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel @@ -254,45 +254,43 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # The deduction amount in cents. # # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] - optional :attributes, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes - }, - nil?: true + required :amount, Integer, nil?: true # @!attribute currency # The deduction currency. # # @return [String, nil] - optional :currency, String, nil?: true + required :currency, String, nil?: true # @!attribute name # The deduction name from the pay statement. # # @return [String, nil] - optional :name, String, nil?: true + required :name, String, nil?: true # @!attribute pre_tax # Boolean indicating if the deduction is pre-tax. # # @return [Boolean, nil] - optional :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true + required :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true # @!attribute type # Type of benefit. # # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true + required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil) - # @param amount [Integer, nil] The deduction amount in cents. + # @!attribute attributes # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] + optional :attributes, + -> { + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes + }, + nil?: true + + # @!method initialize(amount:, currency:, name:, pre_tax:, type:, attributes: nil) + # @param amount [Integer, nil] The deduction amount in cents. # # @param currency [String, nil] The deduction currency. # @@ -301,18 +299,20 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] - optional :metadata, + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] + required :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata } - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes#metadata @@ -322,11 +322,11 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). # - # @return [Hash{Symbol=>Object, nil}, nil] - optional :metadata, + # @return [Hash{Symbol=>Object, nil}] + required :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata} # for more details. @@ -337,61 +337,61 @@ class Metadata < FinchAPI::Internal::Type::BaseModel end class EmployerContribution < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The contribution amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] - optional :attributes, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes - }, - nil?: true - # @!attribute currency # The contribution currency. # # @return [String, nil] - optional :currency, String, nil?: true + required :currency, String, nil?: true # @!attribute name # The contribution name from the pay statement. # # @return [String, nil] - optional :name, String, nil?: true + required :name, String, nil?: true # @!attribute type # Type of benefit. # # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true + required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil) - # @param amount [Integer, nil] The contribution amount in cents. + # @!attribute amount + # The contribution amount in cents. # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] + # @return [Integer, nil] + optional :amount, Integer, nil?: true + + # @!attribute attributes # + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] + optional :attributes, + -> { + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes + }, + nil?: true + + # @!method initialize(currency:, name:, type:, amount: nil, attributes: nil) # @param currency [String, nil] The contribution currency. # # @param name [String, nil] The contribution name from the pay statement. # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param amount [Integer, nil] The contribution amount in cents. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata, nil] - optional :metadata, + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] + required :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata } - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes#metadata @@ -401,11 +401,11 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). # - # @return [Hash{Symbol=>Object, nil}, nil] - optional :metadata, + # @return [Hash{Symbol=>Object, nil}] + required :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata} # for more details. @@ -430,52 +430,48 @@ module PaymentMethod end class Tax < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The tax amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] - optional :attributes, - -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes }, - nil?: true - # @!attribute currency # The currency code. # # @return [String, nil] - optional :currency, String, nil?: true + required :currency, String, nil?: true # @!attribute employer # `true` if the amount is paid by the employers. # # @return [Boolean, nil] - optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true + required :employer, FinchAPI::Internal::Type::Boolean, nil?: true # @!attribute name # The exact name of tax from the pay statement. # # @return [String, nil] - optional :name, String, nil?: true + required :name, String, nil?: true # @!attribute type # The type of taxes. # # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] - optional :type, + required :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type }, nil?: true - # @!method initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) - # @param amount [Integer, nil] The tax amount in cents. + # @!attribute amount + # The tax amount in cents. # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] + # @return [Integer, nil] + optional :amount, Integer, nil?: true + + # @!attribute attributes # + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] + optional :attributes, + -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes }, + nil?: true + + # @!method initialize(currency:, employer:, name:, type:, amount: nil, attributes: nil) # @param currency [String, nil] The currency code. # # @param employer [Boolean, nil] `true` if the amount is paid by the employers. @@ -483,18 +479,37 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @param name [String, nil] The exact name of tax from the pay statement. # # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] The type of taxes. + # + # @param amount [Integer, nil] The tax amount in cents. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] + + # The type of taxes. + # + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#type + module Type + extend FinchAPI::Internal::Type::Enum + + STATE = :state + FEDERAL = :federal + LOCAL = :local + FICA = :fica + + # @!method self.values + # @return [Array] + end # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#attributes class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata, nil] - optional :metadata, + # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] + required :metadata, -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata } - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes#metadata @@ -504,11 +519,11 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). # - # @return [Hash{Symbol=>Object, nil}, nil] - optional :metadata, + # @return [Hash{Symbol=>Object, nil}] + required :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] - # @!method initialize(metadata: nil) + # @!method initialize(metadata:) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata} # for more details. @@ -516,21 +531,6 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @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 taxes. - # - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#type - module Type - extend FinchAPI::Internal::Type::Enum - - STATE = :state - FEDERAL = :federal - LOCAL = :local - FICA = :fica - - # @!method self.values - # @return [Array] - end end # The type of the payment associated with the pay statement. @@ -539,9 +539,9 @@ module Type module Type extend FinchAPI::Internal::Type::Enum - REGULAR_PAYROLL = :regular_payroll OFF_CYCLE_PAYROLL = :off_cycle_payroll ONE_TIME_PAYMENT = :one_time_payment + REGULAR_PAYROLL = :regular_payroll # @!method self.values # @return [Array] diff --git a/rbi/finch_api/models/hris/benefit_type.rbi b/rbi/finch_api/models/hris/benefit_type.rbi index 01e74cf6..9a0bbcd3 100644 --- a/rbi/finch_api/models/hris/benefit_type.rbi +++ b/rbi/finch_api/models/hris/benefit_type.rbi @@ -11,6 +11,8 @@ module FinchAPI T.type_alias { T.all(Symbol, FinchAPI::HRIS::BenefitType) } OrSymbol = T.type_alias { T.any(Symbol, String) } + BENEFIT_TYPE_457 = + T.let(:"457", FinchAPI::HRIS::BenefitType::TaggedSymbol) BENEFIT_TYPE_401K = T.let(:"401k", FinchAPI::HRIS::BenefitType::TaggedSymbol) BENEFIT_TYPE_401K_ROTH = @@ -21,30 +23,28 @@ module FinchAPI T.let(:"403b", FinchAPI::HRIS::BenefitType::TaggedSymbol) BENEFIT_TYPE_403B_ROTH = T.let(:"403b_roth", FinchAPI::HRIS::BenefitType::TaggedSymbol) - BENEFIT_TYPE_457 = - T.let(:"457", FinchAPI::HRIS::BenefitType::TaggedSymbol) BENEFIT_TYPE_457_ROTH = T.let(:"457_roth", FinchAPI::HRIS::BenefitType::TaggedSymbol) - S125_MEDICAL = - T.let(:s125_medical, FinchAPI::HRIS::BenefitType::TaggedSymbol) + COMMUTER = T.let(:commuter, FinchAPI::HRIS::BenefitType::TaggedSymbol) + CUSTOM_POST_TAX = + T.let(:custom_post_tax, FinchAPI::HRIS::BenefitType::TaggedSymbol) + CUSTOM_PRE_TAX = + T.let(:custom_pre_tax, FinchAPI::HRIS::BenefitType::TaggedSymbol) + FSA_DEPENDENT_CARE = + T.let(:fsa_dependent_care, FinchAPI::HRIS::BenefitType::TaggedSymbol) + FSA_MEDICAL = + T.let(:fsa_medical, FinchAPI::HRIS::BenefitType::TaggedSymbol) + HSA_POST = T.let(:hsa_post, FinchAPI::HRIS::BenefitType::TaggedSymbol) + HSA_PRE = T.let(:hsa_pre, FinchAPI::HRIS::BenefitType::TaggedSymbol) S125_DENTAL = T.let(:s125_dental, FinchAPI::HRIS::BenefitType::TaggedSymbol) + S125_MEDICAL = + T.let(:s125_medical, FinchAPI::HRIS::BenefitType::TaggedSymbol) S125_VISION = T.let(:s125_vision, FinchAPI::HRIS::BenefitType::TaggedSymbol) - HSA_PRE = T.let(:hsa_pre, FinchAPI::HRIS::BenefitType::TaggedSymbol) - HSA_POST = T.let(:hsa_post, FinchAPI::HRIS::BenefitType::TaggedSymbol) - FSA_MEDICAL = - T.let(:fsa_medical, FinchAPI::HRIS::BenefitType::TaggedSymbol) - FSA_DEPENDENT_CARE = - T.let(:fsa_dependent_care, FinchAPI::HRIS::BenefitType::TaggedSymbol) + SIMPLE = T.let(:simple, FinchAPI::HRIS::BenefitType::TaggedSymbol) SIMPLE_IRA = T.let(:simple_ira, FinchAPI::HRIS::BenefitType::TaggedSymbol) - SIMPLE = T.let(:simple, FinchAPI::HRIS::BenefitType::TaggedSymbol) - COMMUTER = T.let(:commuter, FinchAPI::HRIS::BenefitType::TaggedSymbol) - CUSTOM_POST_TAX = - T.let(:custom_post_tax, FinchAPI::HRIS::BenefitType::TaggedSymbol) - CUSTOM_PRE_TAX = - T.let(:custom_pre_tax, FinchAPI::HRIS::BenefitType::TaggedSymbol) sig do override.returns(T::Array[FinchAPI::HRIS::BenefitType::TaggedSymbol]) diff --git a/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi index d50d4a14..45b6c134 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi @@ -16,9 +16,7 @@ module FinchAPI # The attributes of the pay statement item. sig do returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes - ) + FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes ) end attr_reader :attributes @@ -34,27 +32,14 @@ module FinchAPI # The category of the pay statement item. sig do returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) + FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol ) end - attr_reader :category - - sig do - params( - category: - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::OrSymbol - ).void - end - attr_writer :category + attr_accessor :category # The name of the pay statement item. - sig { returns(T.nilable(String)) } - attr_reader :name - - sig { params(name: String).void } - attr_writer :name + sig { returns(String) } + attr_accessor :name sig do params( @@ -67,11 +52,11 @@ module FinchAPI end def self.new( # The attributes of the pay statement item. - attributes: nil, + attributes:, # The category of the pay statement item. - category: nil, + category:, # The name of the pay statement item. - name: nil + name: ) end @@ -98,16 +83,16 @@ module FinchAPI ) end - # `true` if the amount is paid by the employers. This field is only available for - # taxes. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :employer - # The metadata of the pay statement item derived by the rules engine if available. # Each attribute will be a key-value pair defined by a rule. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } attr_accessor :metadata + # `true` if the amount is paid by the employers. This field is only available for + # taxes. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :employer + # `true` if the pay statement item is pre-tax. This field is only available for # employee deductions. sig { returns(T.nilable(T::Boolean)) } @@ -120,19 +105,19 @@ module FinchAPI # The attributes of the pay statement item. sig do params( - employer: T.nilable(T::Boolean), metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + employer: T.nilable(T::Boolean), pre_tax: T.nilable(T::Boolean), type: T.nilable(String) ).returns(T.attached_class) end def self.new( + # The metadata of the pay statement item derived by the rules engine if available. + # Each attribute will be a key-value pair defined by a rule. + metadata:, # `true` if the amount is paid by the employers. This field is only available for # taxes. employer: nil, - # The metadata of the pay statement item derived by the rules engine if available. - # Each attribute will be a key-value pair defined by a rule. - metadata: nil, # `true` if the pay statement item is pre-tax. This field is only available for # employee deductions. pre_tax: nil, @@ -144,8 +129,8 @@ module FinchAPI sig do override.returns( { - employer: T.nilable(T::Boolean), metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + employer: T.nilable(T::Boolean), pre_tax: T.nilable(T::Boolean), type: T.nilable(String) } diff --git a/rbi/finch_api/models/hris/employment_data.rbi b/rbi/finch_api/models/hris/employment_data.rbi index 3c9b139b..d806e603 100644 --- a/rbi/finch_api/models/hris/employment_data.rbi +++ b/rbi/finch_api/models/hris/employment_data.rbi @@ -31,20 +31,6 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :class_code - # Custom fields for the individual. These are fields which are defined by the - # employer in the system. Custom fields are not currently supported for assisted - # connections. - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField - ] - ) - ) - end - attr_accessor :custom_fields - # The department object. sig do returns( @@ -149,9 +135,19 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :title - # This field is deprecated in favour of `source_id` - sig { returns(T.nilable(String)) } - attr_accessor :work_id + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. Custom fields are not currently supported for assisted + # connections. + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField + ] + ) + ) + end + attr_accessor :custom_fields # 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, @@ -170,16 +166,14 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :source_id + # This field is deprecated in favour of `source_id` + sig { returns(T.nilable(String)) } + attr_accessor :work_id + sig do params( id: String, class_code: T.nilable(String), - custom_fields: - T.nilable( - T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::OrHash - ] - ), department: T.nilable( FinchAPI::HRIS::EmploymentData::UnionMember0::Department::OrHash @@ -205,11 +199,17 @@ module FinchAPI middle_name: T.nilable(String), start_date: T.nilable(String), title: T.nilable(String), - work_id: T.nilable(String), + custom_fields: + T.nilable( + T::Array[ + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::OrHash + ] + ), income: T.nilable(FinchAPI::Income::OrHash), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income::OrHash)]), - source_id: T.nilable(String) + source_id: T.nilable(String), + work_id: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -217,10 +217,6 @@ module FinchAPI id:, # Worker's compensation classification code for this employee class_code:, - # Custom fields for the individual. These are fields which are defined by the - # employer in the system. Custom fields are not currently supported for assisted - # connections. - custom_fields:, # The department object. department:, # The employment object. @@ -244,8 +240,10 @@ module FinchAPI start_date:, # The current title of the individual. title:, - # This field is deprecated in favour of `source_id` - work_id:, + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. Custom fields are not currently supported for assisted + # connections. + custom_fields: nil, # 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. @@ -253,7 +251,9 @@ module FinchAPI # The array of income history. income_history: nil, # The source system's unique employment identifier for this individual - source_id: nil + source_id: nil, + # This field is deprecated in favour of `source_id` + work_id: nil ) end @@ -262,12 +262,6 @@ module FinchAPI { id: String, class_code: T.nilable(String), - custom_fields: - T.nilable( - T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField - ] - ), department: T.nilable( FinchAPI::HRIS::EmploymentData::UnionMember0::Department @@ -293,100 +287,23 @@ module FinchAPI middle_name: T.nilable(String), start_date: T.nilable(String), title: T.nilable(String), - work_id: T.nilable(String), + custom_fields: + T.nilable( + T::Array[ + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField + ] + ), income: T.nilable(FinchAPI::Income), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income)]), - source_id: T.nilable(String) + source_id: T.nilable(String), + work_id: T.nilable(String) } ) end def to_hash end - class CustomField < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(String)) } - attr_accessor :name - - sig do - returns( - T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants - ) - ) - end - attr_accessor :value - - sig do - params( - name: T.nilable(String), - value: - T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants - ) - ).returns(T.attached_class) - end - def self.new(name: nil, value: nil) - end - - sig do - override.returns( - { - name: T.nilable(String), - value: - T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants - ) - } - ) - end - def to_hash - end - - module Value - extend FinchAPI::Internal::Type::Union - - Variants = - T.type_alias do - T.nilable( - T.any( - String, - T::Array[T.anything], - T.anything, - Float, - T::Boolean - ) - ) - end - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants - ] - ) - end - def self.variants - end - - UnionMember1Array = - T.let( - FinchAPI::Internal::Type::ArrayOf[ - FinchAPI::Internal::Type::Unknown - ], - FinchAPI::Internal::Type::Converter - ) - end - end - class Department < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do @@ -660,6 +577,89 @@ module FinchAPI def to_hash end end + + class CustomField < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(T.nilable(String)) } + attr_accessor :name + + sig do + returns( + T.nilable( + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + ) + ) + end + attr_accessor :value + + sig do + params( + name: T.nilable(String), + value: + T.nilable( + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + ) + ).returns(T.attached_class) + end + def self.new(name: nil, value: nil) + end + + sig do + override.returns( + { + name: T.nilable(String), + value: + T.nilable( + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + ) + } + ) + end + def to_hash + end + + module Value + extend FinchAPI::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + String, + T::Array[T.anything], + T.anything, + Float, + T::Boolean + ) + ) + end + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + ] + ) + end + def self.variants + end + + UnionMember1Array = + T.let( + FinchAPI::Internal::Type::ArrayOf[ + FinchAPI::Internal::Type::Unknown + ], + FinchAPI::Internal::Type::Converter + ) + end + end end class BatchError < FinchAPI::Internal::Type::BaseModel diff --git a/rbi/finch_api/models/hris/pay_statement.rbi b/rbi/finch_api/models/hris/pay_statement.rbi deleted file mode 100644 index be2cf9c7..00000000 --- a/rbi/finch_api/models/hris/pay_statement.rbi +++ /dev/null @@ -1,1122 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - class PayStatement < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any(FinchAPI::HRIS::PayStatement, FinchAPI::Internal::AnyHash) - end - - # The array of earnings objects associated with this pay statement - sig do - returns( - T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Earning)] - ) - ) - end - attr_accessor :earnings - - # The array of deductions objects associated with this pay statement. - sig do - returns( - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction) - ] - ) - ) - end - attr_accessor :employee_deductions - - sig do - returns( - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::EmployerContribution) - ] - ) - ) - end - attr_accessor :employer_contributions - - sig { returns(T.nilable(FinchAPI::Money)) } - attr_reader :gross_pay - - sig { params(gross_pay: T.nilable(FinchAPI::Money::OrHash)).void } - attr_writer :gross_pay - - # A stable Finch `id` (UUID v4) for an individual in the company - sig { returns(T.nilable(String)) } - attr_reader :individual_id - - sig { params(individual_id: String).void } - attr_writer :individual_id - - sig { returns(T.nilable(FinchAPI::Money)) } - attr_reader :net_pay - - sig { params(net_pay: T.nilable(FinchAPI::Money::OrHash)).void } - attr_writer :net_pay - - # The payment method. - sig do - returns( - T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol) - ) - end - attr_accessor :payment_method - - # The array of taxes objects associated with this pay statement. - sig do - returns( - T.nilable(T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)]) - ) - end - attr_accessor :taxes - - # The number of hours worked for this pay period - sig { returns(T.nilable(Float)) } - attr_accessor :total_hours - - # The type of the payment associated with the pay statement. - sig do - returns(T.nilable(FinchAPI::HRIS::PayStatement::Type::TaggedSymbol)) - end - attr_accessor :type - - sig do - params( - earnings: - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::Earning::OrHash) - ] - ), - employee_deductions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::OrHash - ) - ] - ), - employer_contributions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::OrHash - ) - ] - ), - gross_pay: T.nilable(FinchAPI::Money::OrHash), - individual_id: String, - net_pay: T.nilable(FinchAPI::Money::OrHash), - payment_method: - T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol), - taxes: - T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax::OrHash)] - ), - total_hours: T.nilable(Float), - type: T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol) - ).returns(T.attached_class) - end - def self.new( - # The array of earnings objects associated with this pay statement - earnings: nil, - # The array of deductions objects associated with this pay statement. - employee_deductions: nil, - employer_contributions: nil, - gross_pay: nil, - # A stable Finch `id` (UUID v4) for an individual in the company - individual_id: nil, - net_pay: nil, - # The payment method. - payment_method: nil, - # The array of taxes objects associated with this pay statement. - taxes: nil, - # The number of hours worked for this pay period - total_hours: nil, - # The type of the payment associated with the pay statement. - type: nil - ) - end - - sig do - override.returns( - { - earnings: - T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Earning)] - ), - employee_deductions: - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction) - ] - ), - employer_contributions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution - ) - ] - ), - gross_pay: T.nilable(FinchAPI::Money), - individual_id: String, - net_pay: T.nilable(FinchAPI::Money), - payment_method: - T.nilable( - FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol - ), - taxes: - T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)] - ), - total_hours: T.nilable(Float), - type: T.nilable(FinchAPI::HRIS::PayStatement::Type::TaggedSymbol) - } - ) - end - def to_hash - end - - class Earning < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::Earning, - FinchAPI::Internal::AnyHash - ) - end - - # The earnings amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable(FinchAPI::HRIS::PayStatement::Earning::Attributes) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::Earning::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - # The earnings currency code. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # 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). - sig { returns(T.nilable(Float)) } - attr_accessor :hours - - # The exact name of the deduction from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # The type of earning. - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - ) - end - attr_accessor :type - - sig do - params( - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::Earning::Attributes::OrHash - ), - currency: T.nilable(String), - hours: T.nilable(Float), - name: T.nilable(String), - type: - T.nilable(FinchAPI::HRIS::PayStatement::Earning::Type::OrSymbol) - ).returns(T.attached_class) - end - def self.new( - # The earnings amount in cents. - amount: nil, - attributes: nil, - # The earnings currency code. - currency: nil, - # 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). - hours: nil, - # The exact name of the deduction from the pay statement. - name: nil, - # The type of earning. - type: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - attributes: - T.nilable(FinchAPI::HRIS::PayStatement::Earning::Attributes), - currency: T.nilable(String), - hours: T.nilable(Float), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::Earning::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - ) - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata: nil) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: nil - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - - # The type of earning. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, FinchAPI::HRIS::PayStatement::Earning::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - SALARY = - T.let( - :salary, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - WAGE = - T.let( - :wage, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - REIMBURSEMENT = - T.let( - :reimbursement, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - OVERTIME = - T.let( - :overtime, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - SEVERANCE = - T.let( - :severance, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - DOUBLE_OVERTIME = - T.let( - :double_overtime, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - PTO = - T.let( - :pto, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - SICK = - T.let( - :sick, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - BONUS = - T.let( - :bonus, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - COMMISSION = - T.let( - :commission, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - TIPS = - T.let( - :tips, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - TYPE_1099 = - T.let( - :"1099", - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - OTHER = - T.let( - :other, - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::EmployeeDeduction, - FinchAPI::Internal::AnyHash - ) - end - - # The deduction amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - # The deduction currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The deduction name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Boolean indicating if the deduction is pre-tax. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :pre_tax - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) } - attr_accessor :type - - sig do - params( - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::OrHash - ), - currency: T.nilable(String), - name: T.nilable(String), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol) - ).returns(T.attached_class) - end - def self.new( - # The deduction amount in cents. - amount: nil, - attributes: nil, - # The deduction currency. - currency: nil, - # The deduction name from the pay statement. - name: nil, - # Boolean indicating if the deduction is pre-tax. - pre_tax: nil, - # Type of benefit. - type: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes - ), - currency: T.nilable(String), - name: T.nilable(String), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - ) - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata: nil) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: nil - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::EmployerContribution, - FinchAPI::Internal::AnyHash - ) - end - - # The contribution amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - # The contribution currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The contribution name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) } - attr_accessor :type - - sig do - params( - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::OrHash - ), - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol) - ).returns(T.attached_class) - end - def self.new( - # The contribution amount in cents. - amount: nil, - attributes: nil, - # The contribution currency. - currency: nil, - # The contribution name from the pay statement. - name: nil, - # Type of benefit. - type: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes - ), - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - ) - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata: nil) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: nil - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - # The payment method. - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, FinchAPI::HRIS::PayStatement::PaymentMethod) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CHECK = - T.let( - :check, - FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol - ) - DIRECT_DEPOSIT = - T.let( - :direct_deposit, - FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol - ) - OTHER = - T.let( - :other, - FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Tax < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::Tax, - FinchAPI::Internal::AnyHash - ) - end - - # The tax amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns(T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes)) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes::OrHash) - ).void - end - attr_writer :attributes - - # The currency code. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # `true` if the amount is paid by the employers. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :employer - - # The exact name of tax from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # The type of taxes. - sig do - returns( - T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol) - ) - end - attr_accessor :type - - sig do - params( - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatement::Tax::Attributes::OrHash - ), - currency: T.nilable(String), - employer: T.nilable(T::Boolean), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::OrSymbol) - ).returns(T.attached_class) - end - def self.new( - # The tax amount in cents. - amount: nil, - attributes: nil, - # The currency code. - currency: nil, - # `true` if the amount is paid by the employers. - employer: nil, - # The exact name of tax from the pay statement. - name: nil, - # The type of taxes. - type: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - attributes: - T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes), - currency: T.nilable(String), - employer: T.nilable(T::Boolean), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol - ) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::Tax::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - ) - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata: nil) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: nil - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - - # The type of taxes. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, FinchAPI::HRIS::PayStatement::Tax::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - STATE = - T.let( - :state, - FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol - ) - FEDERAL = - T.let( - :federal, - FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol - ) - LOCAL = - T.let( - :local, - FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol - ) - FICA = - T.let( - :fica, - FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol] - ) - end - def self.values - end - end - end - - # The type of the payment associated with the pay statement. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, FinchAPI::HRIS::PayStatement::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - REGULAR_PAYROLL = - T.let( - :regular_payroll, - FinchAPI::HRIS::PayStatement::Type::TaggedSymbol - ) - OFF_CYCLE_PAYROLL = - T.let( - :off_cycle_payroll, - FinchAPI::HRIS::PayStatement::Type::TaggedSymbol - ) - ONE_TIME_PAYMENT = - T.let( - :one_time_payment, - FinchAPI::HRIS::PayStatement::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[FinchAPI::HRIS::PayStatement::Type::TaggedSymbol] - ) - end - def self.values - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/pay_statement_response.rbi b/rbi/finch_api/models/hris/pay_statement_response.rbi index 035d8d52..61614e66 100644 --- a/rbi/finch_api/models/hris/pay_statement_response.rbi +++ b/rbi/finch_api/models/hris/pay_statement_response.rbi @@ -12,40 +12,34 @@ module FinchAPI ) end - sig { returns(T.nilable(FinchAPI::HRIS::PayStatementResponseBody)) } - attr_reader :body + sig { returns(FinchAPI::HRIS::PayStatementResponseBody::Variants) } + attr_accessor :body - sig do - params(body: FinchAPI::HRIS::PayStatementResponseBody::OrHash).void - end - attr_writer :body - - sig { returns(T.nilable(Integer)) } - attr_reader :code - - sig { params(code: Integer).void } - attr_writer :code - - sig { returns(T.nilable(String)) } - attr_reader :payment_id + sig { returns(Integer) } + attr_accessor :code - sig { params(payment_id: String).void } - attr_writer :payment_id + sig { returns(String) } + attr_accessor :payment_id sig do params( - body: FinchAPI::HRIS::PayStatementResponseBody::OrHash, + body: + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::OrHash, + FinchAPI::HRIS::PayStatementResponseBody::BatchError::OrHash, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::OrHash + ), code: Integer, payment_id: String ).returns(T.attached_class) end - def self.new(body: nil, code: nil, payment_id: nil) + def self.new(body:, code:, payment_id:) end sig do override.returns( { - body: FinchAPI::HRIS::PayStatementResponseBody, + body: FinchAPI::HRIS::PayStatementResponseBody::Variants, code: Integer, payment_id: String } diff --git a/rbi/finch_api/models/hris/pay_statement_response_body.rbi b/rbi/finch_api/models/hris/pay_statement_response_body.rbi index 2deb25a9..27ea5892 100644 --- a/rbi/finch_api/models/hris/pay_statement_response_body.rbi +++ b/rbi/finch_api/models/hris/pay_statement_response_body.rbi @@ -3,54 +3,1524 @@ module FinchAPI module Models module HRIS - class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel - OrHash = + module PayStatementResponseBody + extend FinchAPI::Internal::Type::Union + + Variants = T.type_alias do T.any( - FinchAPI::HRIS::PayStatementResponseBody, - FinchAPI::Internal::AnyHash + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0, + FinchAPI::HRIS::PayStatementResponseBody::BatchError, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2 ) end - sig { returns(T.nilable(FinchAPI::Paging)) } - attr_reader :paging + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0, + FinchAPI::Internal::AnyHash + ) + end - sig { params(paging: FinchAPI::Paging::OrHash).void } - attr_writer :paging + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging + ) + end + attr_reader :paging - # The array of pay statements for the current payment. - sig { returns(T.nilable(T::Array[FinchAPI::HRIS::PayStatement])) } - attr_reader :pay_statements + sig do + params( + paging: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging::OrHash + ).void + end + attr_writer :paging - sig do - params( - pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash] - ).void + sig do + returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement + ] + ) + end + attr_accessor :pay_statements + + sig do + params( + paging: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging::OrHash, + pay_statements: + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::OrHash + ] + ).returns(T.attached_class) + end + def self.new(paging:, pay_statements:) + end + + sig do + override.returns( + { + paging: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, + pay_statements: + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement + ] + } + ) + end + def to_hash + end + + class Paging < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, + FinchAPI::Internal::AnyHash + ) + end + + # The current start index of the returned list of elements + sig { returns(Integer) } + attr_accessor :offset + + # The total number of elements for the entire query (not just the given page) + sig { returns(T.nilable(Integer)) } + attr_reader :count + + sig { params(count: Integer).void } + attr_writer :count + + sig do + params(offset: Integer, count: Integer).returns(T.attached_class) + end + def self.new( + # The current start index of the returned list of elements + offset:, + # The total number of elements for the entire query (not just the given page) + count: nil + ) + end + + sig { override.returns({ offset: Integer, count: Integer }) } + def to_hash + end + end + + class PayStatement < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement, + FinchAPI::Internal::AnyHash + ) + end + + # The array of earnings objects associated with this pay statement + sig do + returns( + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning + ) + ] + ) + ) + end + attr_accessor :earnings + + # The array of deductions objects associated with this pay statement. + sig do + returns( + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction + ) + ] + ) + ) + end + attr_accessor :employee_deductions + + sig do + returns( + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution + ) + ] + ) + ) + end + attr_accessor :employer_contributions + + sig { returns(T.nilable(FinchAPI::Money)) } + attr_reader :gross_pay + + sig { params(gross_pay: T.nilable(FinchAPI::Money::OrHash)).void } + attr_writer :gross_pay + + # A stable Finch `id` (UUID v4) for an individual in the company + sig { returns(String) } + attr_accessor :individual_id + + sig { returns(T.nilable(FinchAPI::Money)) } + attr_reader :net_pay + + sig { params(net_pay: T.nilable(FinchAPI::Money::OrHash)).void } + attr_writer :net_pay + + # The payment method. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol + ) + ) + end + attr_accessor :payment_method + + # The array of taxes objects associated with this pay statement. + sig do + returns( + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax + ) + ] + ) + ) + end + attr_accessor :taxes + + # The number of hours worked for this pay period + sig { returns(T.nilable(Float)) } + attr_accessor :total_hours + + # The type of the payment associated with the pay statement. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol + ) + ) + end + attr_accessor :type + + sig do + params( + earnings: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::OrHash + ) + ] + ), + employee_deductions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::OrHash + ) + ] + ), + employer_contributions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::OrHash + ) + ] + ), + gross_pay: T.nilable(FinchAPI::Money::OrHash), + individual_id: String, + net_pay: T.nilable(FinchAPI::Money::OrHash), + payment_method: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::OrSymbol + ), + taxes: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::OrHash + ) + ] + ), + total_hours: T.nilable(Float), + type: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # The array of earnings objects associated with this pay statement + earnings:, + # The array of deductions objects associated with this pay statement. + employee_deductions:, + employer_contributions:, + gross_pay:, + # A stable Finch `id` (UUID v4) for an individual in the company + individual_id:, + net_pay:, + # The payment method. + payment_method:, + # The array of taxes objects associated with this pay statement. + taxes:, + # The number of hours worked for this pay period + total_hours:, + # The type of the payment associated with the pay statement. + type: + ) + end + + sig do + override.returns( + { + earnings: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning + ) + ] + ), + employee_deductions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction + ) + ] + ), + employer_contributions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution + ) + ] + ), + gross_pay: T.nilable(FinchAPI::Money), + individual_id: String, + net_pay: T.nilable(FinchAPI::Money), + payment_method: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol + ), + taxes: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax + ) + ] + ), + total_hours: T.nilable(Float), + type: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol + ) + } + ) + end + def to_hash + end + + class Earning < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning, + FinchAPI::Internal::AnyHash + ) + end + + # The earnings amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + # The earnings currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # 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). + sig { returns(T.nilable(Float)) } + attr_accessor :hours + + # The exact name of the deduction from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The type of earning. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + ) + end + attr_accessor :type + + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + amount: T.nilable(Integer), + currency: T.nilable(String), + hours: T.nilable(Float), + name: T.nilable(String), + type: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::OrSymbol + ), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The earnings amount in cents. + amount:, + # The earnings currency code. + currency:, + # 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). + hours:, + # The exact name of the deduction from the pay statement. + name:, + # The type of earning. + type:, + attributes: nil + ) + end + + sig do + override.returns( + { + amount: T.nilable(Integer), + currency: T.nilable(String), + hours: T.nilable(Float), + name: T.nilable(String), + type: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes + ) + } + ) + end + def to_hash + end + + # The type of earning. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SALARY = + T.let( + :salary, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + WAGE = + T.let( + :wage, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + REIMBURSEMENT = + T.let( + :reimbursement, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + OVERTIME = + T.let( + :overtime, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + SEVERANCE = + T.let( + :severance, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + DOUBLE_OVERTIME = + T.let( + :double_overtime, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + PTO = + T.let( + :pto, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + SICK = + T.let( + :sick, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + BONUS = + T.let( + :bonus, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + COMMISSION = + T.let( + :commission, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + TIPS = + T.let( + :tips, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + TYPE_1099 = + T.let( + :"1099", + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + OTHER = + T.let( + :other, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction, + FinchAPI::Internal::AnyHash + ) + end + + # The deduction amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + # The deduction currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # The deduction name from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Boolean indicating if the deduction is pre-tax. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :pre_tax + + # Type of benefit. + sig do + returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) + end + attr_accessor :type + + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + amount: T.nilable(Integer), + currency: T.nilable(String), + name: T.nilable(String), + pre_tax: T.nilable(T::Boolean), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The deduction amount in cents. + amount:, + # The deduction currency. + currency:, + # The deduction name from the pay statement. + name:, + # Boolean indicating if the deduction is pre-tax. + pre_tax:, + # Type of benefit. + type:, + attributes: nil + ) + end + + sig do + override.returns( + { + amount: T.nilable(Integer), + currency: T.nilable(String), + name: T.nilable(String), + pre_tax: T.nilable(T::Boolean), + type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes + ) + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution, + FinchAPI::Internal::AnyHash + ) + end + + # The contribution currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # The contribution name from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Type of benefit. + sig do + returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) + end + attr_accessor :type + + # The contribution amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + currency: T.nilable(String), + name: T.nilable(String), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The contribution currency. + currency:, + # The contribution name from the pay statement. + name:, + # Type of benefit. + type:, + # The contribution amount in cents. + amount: nil, + attributes: nil + ) + end + + sig do + override.returns( + { + currency: T.nilable(String), + name: T.nilable(String), + type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes + ) + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + # The payment method. + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CHECK = + T.let( + :check, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol + ) + DIRECT_DEPOSIT = + T.let( + :direct_deposit, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol + ) + OTHER = + T.let( + :other, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Tax < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax, + FinchAPI::Internal::AnyHash + ) + end + + # The currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # `true` if the amount is paid by the employers. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :employer + + # The exact name of tax from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The type of taxes. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ) + ) + end + attr_accessor :type + + # The tax amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + currency: T.nilable(String), + employer: T.nilable(T::Boolean), + name: T.nilable(String), + type: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::OrSymbol + ), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The currency code. + currency:, + # `true` if the amount is paid by the employers. + employer:, + # The exact name of tax from the pay statement. + name:, + # The type of taxes. + type:, + # The tax amount in cents. + amount: nil, + attributes: nil + ) + end + + sig do + override.returns( + { + currency: T.nilable(String), + employer: T.nilable(T::Boolean), + name: T.nilable(String), + type: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes + ) + } + ) + end + def to_hash + end + + # The type of taxes. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STATE = + T.let( + :state, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ) + FEDERAL = + T.let( + :federal, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ) + LOCAL = + T.let( + :local, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ) + FICA = + T.let( + :fica, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + # The type of the payment associated with the pay statement. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF_CYCLE_PAYROLL = + T.let( + :off_cycle_payroll, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol + ) + ONE_TIME_PAYMENT = + T.let( + :one_time_payment, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol + ) + REGULAR_PAYROLL = + T.let( + :regular_payroll, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end end - attr_writer :pay_statements - sig do - params( - paging: FinchAPI::Paging::OrHash, - pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash] - ).returns(T.attached_class) + class BatchError < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::BatchError, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(Float) } + attr_accessor :code + + sig { returns(String) } + attr_accessor :message + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(String)) } + attr_reader :finch_code + + sig { params(finch_code: String).void } + attr_writer :finch_code + + sig do + params( + code: Float, + message: String, + name: String, + finch_code: String + ).returns(T.attached_class) + end + def self.new(code:, message:, name:, finch_code: nil) + end + + sig do + override.returns( + { code: Float, message: String, name: String, finch_code: String } + ) + end + def to_hash + end end - def self.new( - paging: nil, - # The array of pay statements for the current payment. - pay_statements: nil - ) + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat + ) + end + attr_accessor :code + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol + ) + end + attr_accessor :finch_code + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol + ) + end + attr_accessor :message + + sig do + returns( + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol + ) + end + attr_accessor :name + + sig do + params( + code: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::OrFloat, + finch_code: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::OrSymbol, + message: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::OrSymbol, + name: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::OrSymbol + ).returns(T.attached_class) + end + def self.new(code:, finch_code:, message:, name:) + end + + sig do + override.returns( + { + code: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat, + finch_code: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol, + message: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol, + name: + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol + } + ) + end + def to_hash + end + + module Code + extend FinchAPI::Internal::Type::Enum + + TaggedFloat = + T.type_alias do + T.all( + Float, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code + ) + end + OrFloat = T.type_alias { Float } + + CODE_202 = + T.let( + 202, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat + ] + ) + end + def self.values + end + end + + module FinchCode + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DATA_SYNC_IN_PROGRESS = + T.let( + :data_sync_in_progress, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Message + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER = + T.let( + :"The pay statements for this payment are being fetched. Please check back later.", + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Name + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACCEPTED = + T.let( + :accepted, + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol + ] + ) + end + def self.values + end + end end sig do override.returns( - { - paging: FinchAPI::Paging, - pay_statements: T::Array[FinchAPI::HRIS::PayStatement] - } + T::Array[FinchAPI::HRIS::PayStatementResponseBody::Variants] ) end - def to_hash + def self.variants end end end diff --git a/rbi/finch_api/models/hris/payment.rbi b/rbi/finch_api/models/hris/payment.rbi index 7b7d6081..e2615cd5 100644 --- a/rbi/finch_api/models/hris/payment.rbi +++ b/rbi/finch_api/models/hris/payment.rbi @@ -10,11 +10,8 @@ module FinchAPI end # The unique id for the payment. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id + sig { returns(String) } + attr_accessor :id sig { returns(T.nilable(FinchAPI::Money)) } attr_reader :company_debit @@ -102,22 +99,22 @@ module FinchAPI end def self.new( # The unique id for the payment. - id: nil, - company_debit: nil, - debit_date: nil, - employee_taxes: nil, - employer_taxes: nil, - gross_pay: nil, + id:, + company_debit:, + debit_date:, + employee_taxes:, + employer_taxes:, + gross_pay:, # Array of every individual on this payment. - individual_ids: nil, - net_pay: nil, - pay_date: nil, + individual_ids:, + net_pay:, + pay_date:, # List of pay frequencies associated with this payment. - pay_frequencies: nil, + pay_frequencies:, # Array of the Finch id (uuidv4) of every pay group associated with this payment. - pay_group_ids: nil, + pay_group_ids:, # The pay period object. - pay_period: nil + pay_period: ) end @@ -159,34 +156,34 @@ module FinchAPI :annually, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol ) - SEMI_ANNUALLY = + BI_WEEKLY = T.let( - :semi_annually, + :bi_weekly, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol ) + DAILY = + T.let(:daily, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) + MONTHLY = + T.let(:monthly, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) + OTHER = + T.let(:other, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) QUARTERLY = T.let( :quarterly, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol ) - MONTHLY = - T.let(:monthly, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) - SEMI_MONTHLY = + SEMI_ANNUALLY = T.let( - :semi_monthly, + :semi_annually, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol ) - BI_WEEKLY = + SEMI_MONTHLY = T.let( - :bi_weekly, + :semi_monthly, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol ) WEEKLY = T.let(:weekly, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) - DAILY = - T.let(:daily, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) - OTHER = - T.let(:other, FinchAPI::HRIS::Payment::PayFrequency::TaggedSymbol) sig do override.returns( @@ -219,7 +216,7 @@ module FinchAPI start_date: T.nilable(String) ).returns(T.attached_class) end - def self.new(end_date: nil, start_date: nil) + def self.new(end_date:, start_date:) end sig do diff --git a/rbi/finch_api/models/money.rbi b/rbi/finch_api/models/money.rbi index 6510a1a1..82daff20 100644 --- a/rbi/finch_api/models/money.rbi +++ b/rbi/finch_api/models/money.rbi @@ -10,11 +10,8 @@ module FinchAPI sig { returns(T.nilable(Integer)) } attr_accessor :amount - sig { returns(T.nilable(String)) } - attr_reader :currency - - sig { params(currency: String).void } - attr_writer :currency + sig { returns(String) } + attr_accessor :currency sig do params(amount: T.nilable(Integer), currency: String).returns( @@ -23,8 +20,8 @@ module FinchAPI end def self.new( # Amount for money object (in cents) - amount: nil, - currency: nil + amount:, + currency: ) end diff --git a/rbi/finch_api/models/payroll/pay_group_list_response.rbi b/rbi/finch_api/models/payroll/pay_group_list_response.rbi index dae722e8..d6739ac3 100644 --- a/rbi/finch_api/models/payroll/pay_group_list_response.rbi +++ b/rbi/finch_api/models/payroll/pay_group_list_response.rbi @@ -13,40 +13,22 @@ module FinchAPI end # Finch id (uuidv4) for the pay group - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id + sig { returns(String) } + attr_accessor :id # Name of the pay group - sig { returns(T.nilable(String)) } - attr_reader :name - - sig { params(name: String).void } - attr_writer :name + sig { returns(String) } + attr_accessor :name # List of pay frequencies associated with this pay group sig do returns( - T.nilable( - T::Array[ - FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol - ] - ) + T::Array[ + FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol + ] ) end - attr_reader :pay_frequencies - - sig do - params( - pay_frequencies: - T::Array[ - FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::OrSymbol - ] - ).void - end - attr_writer :pay_frequencies + attr_accessor :pay_frequencies sig do params( @@ -60,11 +42,11 @@ module FinchAPI end def self.new( # Finch id (uuidv4) for the pay group - id: nil, + id:, # Name of the pay group - name: nil, + name:, # List of pay frequencies associated with this pay group - pay_frequencies: nil + pay_frequencies: ) end @@ -100,14 +82,14 @@ module FinchAPI :annually, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - SEMI_ANNUALLY = + BI_WEEKLY = T.let( - :semi_annually, + :bi_weekly, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - QUARTERLY = + DAILY = T.let( - :quarterly, + :daily, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) MONTHLY = @@ -115,29 +97,29 @@ module FinchAPI :monthly, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - SEMI_MONTHLY = + OTHER = T.let( - :semi_monthly, + :other, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - BI_WEEKLY = + QUARTERLY = T.let( - :bi_weekly, + :quarterly, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - WEEKLY = + SEMI_ANNUALLY = T.let( - :weekly, + :semi_annually, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - DAILY = + SEMI_MONTHLY = T.let( - :daily, + :semi_monthly, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) - OTHER = + WEEKLY = T.let( - :other, + :weekly, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol ) diff --git a/rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi b/rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi index 6a4f31f5..b340d962 100644 --- a/rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi +++ b/rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi @@ -88,14 +88,14 @@ module FinchAPI :annually, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - SEMI_ANNUALLY = + BI_WEEKLY = T.let( - :semi_annually, + :bi_weekly, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - QUARTERLY = + DAILY = T.let( - :quarterly, + :daily, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) MONTHLY = @@ -103,29 +103,29 @@ module FinchAPI :monthly, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - SEMI_MONTHLY = + OTHER = T.let( - :semi_monthly, + :other, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - BI_WEEKLY = + QUARTERLY = T.let( - :bi_weekly, + :quarterly, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - WEEKLY = + SEMI_ANNUALLY = T.let( - :weekly, + :semi_annually, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - DAILY = + SEMI_MONTHLY = T.let( - :daily, + :semi_monthly, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) - OTHER = + WEEKLY = T.let( - :other, + :weekly, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol ) diff --git a/rbi/finch_api/models/sandbox/payment_create_params.rbi b/rbi/finch_api/models/sandbox/payment_create_params.rbi index 247cb329..bda1510b 100644 --- a/rbi/finch_api/models/sandbox/payment_create_params.rbi +++ b/rbi/finch_api/models/sandbox/payment_create_params.rbi @@ -136,11 +136,8 @@ module FinchAPI attr_writer :gross_pay # A stable Finch `id` (UUID v4) for an individual in the company - sig { returns(T.nilable(String)) } - attr_reader :individual_id - - sig { params(individual_id: String).void } - attr_writer :individual_id + sig { returns(String) } + attr_accessor :individual_id sig { returns(T.nilable(FinchAPI::Money)) } attr_reader :net_pay @@ -236,22 +233,22 @@ module FinchAPI end def self.new( # The array of earnings objects associated with this pay statement - earnings: nil, + earnings:, # The array of deductions objects associated with this pay statement. - employee_deductions: nil, - employer_contributions: nil, - gross_pay: nil, + employee_deductions:, + employer_contributions:, + gross_pay:, # A stable Finch `id` (UUID v4) for an individual in the company - individual_id: nil, - net_pay: nil, + individual_id:, + net_pay:, # The payment method. - payment_method: nil, + payment_method:, # The array of taxes objects associated with this pay statement. - taxes: nil, + taxes:, # The number of hours worked for this pay period - total_hours: nil, + total_hours:, # The type of the payment associated with the pay statement. - type: nil + type: ) end @@ -321,25 +318,6 @@ module FinchAPI sig { returns(T.nilable(Integer)) } attr_accessor :amount - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - # The earnings currency code. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -363,35 +341,54 @@ module FinchAPI end attr_accessor :type + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes + ) + ) + end + attr_reader :attributes + sig do params( - amount: T.nilable(Integer), attributes: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::OrHash - ), + ) + ).void + end + attr_writer :attributes + + sig do + params( + amount: T.nilable(Integer), currency: T.nilable(String), hours: T.nilable(Float), name: T.nilable(String), type: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol + ), + attributes: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::OrHash ) ).returns(T.attached_class) end def self.new( # The earnings amount in cents. - amount: nil, - attributes: nil, + amount:, # The earnings currency code. - currency: nil, + currency:, # 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). - hours: nil, + hours:, # The exact name of the deduction from the pay statement. - name: nil, + name:, # The type of earning. - type: nil + type:, + attributes: nil ) end @@ -399,16 +396,16 @@ module FinchAPI override.returns( { amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes - ), currency: T.nilable(String), hours: T.nilable(Float), name: T.nilable(String), type: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol + ), + attributes: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes ) } ) @@ -416,97 +413,6 @@ module FinchAPI def to_hash end - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - ) - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata: nil) - end - - sig do - override.returns( - { - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig do - returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) - end - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: nil - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - # The type of earning. module Type extend FinchAPI::Internal::Type::Enum @@ -596,6 +502,88 @@ module FinchAPI def self.values end end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end end class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel @@ -611,6 +599,22 @@ module FinchAPI sig { returns(T.nilable(Integer)) } attr_accessor :amount + # The deduction currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # The deduction name from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Boolean indicating if the deduction is pre-tax. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :pre_tax + + # Type of benefit. + sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } + attr_accessor :type + sig do returns( T.nilable( @@ -630,47 +634,31 @@ module FinchAPI end attr_writer :attributes - # The deduction currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The deduction name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Boolean indicating if the deduction is pre-tax. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :pre_tax - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } - attr_accessor :type - sig do params( amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::OrHash - ), currency: T.nilable(String), name: T.nilable(String), pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol) + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + attributes: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::OrHash + ) ).returns(T.attached_class) end def self.new( # The deduction amount in cents. - amount: nil, - attributes: nil, + amount:, # The deduction currency. - currency: nil, + currency:, # The deduction name from the pay statement. - name: nil, + name:, # Boolean indicating if the deduction is pre-tax. - pre_tax: nil, + pre_tax:, # Type of benefit. - type: nil + type:, + attributes: nil ) end @@ -678,14 +666,14 @@ module FinchAPI override.returns( { amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes - ), currency: T.nilable(String), name: T.nilable(String), pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol) + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + attributes: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes + ) } ) end @@ -703,9 +691,7 @@ module FinchAPI sig do returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - ) + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata ) end attr_reader :metadata @@ -724,7 +710,7 @@ module FinchAPI FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash ).returns(T.attached_class) end - def self.new(metadata: nil) + def self.new(metadata:) end sig do @@ -750,15 +736,8 @@ module FinchAPI # 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.). - sig do - returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) - end - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata sig do params( @@ -769,7 +748,7 @@ module FinchAPI # 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.). - metadata: nil + metadata: ) end @@ -793,6 +772,18 @@ module FinchAPI ) end + # The contribution currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # The contribution name from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Type of benefit. + sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } + attr_accessor :type + # The contribution amount in cents. sig { returns(T.nilable(Integer)) } attr_accessor :amount @@ -816,54 +807,42 @@ module FinchAPI end attr_writer :attributes - # The contribution currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The contribution name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } - attr_accessor :type - sig do params( + currency: T.nilable(String), + name: T.nilable(String), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), amount: T.nilable(Integer), attributes: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::OrHash - ), - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol) + ) ).returns(T.attached_class) end def self.new( - # The contribution amount in cents. - amount: nil, - attributes: nil, # The contribution currency. - currency: nil, + currency:, # The contribution name from the pay statement. - name: nil, + name:, # Type of benefit. - type: nil + type:, + # The contribution amount in cents. + amount: nil, + attributes: nil ) end sig do override.returns( { + currency: T.nilable(String), + name: T.nilable(String), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), amount: T.nilable(Integer), attributes: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes - ), - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol) + ) } ) end @@ -881,9 +860,7 @@ module FinchAPI sig do returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - ) + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata ) end attr_reader :metadata @@ -902,7 +879,7 @@ module FinchAPI FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata::OrHash ).returns(T.attached_class) end - def self.new(metadata: nil) + def self.new(metadata:) end sig do @@ -928,15 +905,8 @@ module FinchAPI # 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.). - sig do - returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) - end - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata sig do params( @@ -947,7 +917,7 @@ module FinchAPI # 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.). - metadata: nil + metadata: ) end @@ -1011,29 +981,6 @@ module FinchAPI ) end - # The tax amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - # The currency code. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -1056,51 +1003,74 @@ module FinchAPI end attr_accessor :type + # The tax amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes + ) + ) + end + attr_reader :attributes + sig do params( - amount: T.nilable(Integer), attributes: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::OrHash - ), + ) + ).void + end + attr_writer :attributes + + sig do + params( currency: T.nilable(String), employer: T.nilable(T::Boolean), name: T.nilable(String), type: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol + ), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::OrHash ) ).returns(T.attached_class) end def self.new( - # The tax amount in cents. - amount: nil, - attributes: nil, # The currency code. - currency: nil, + currency:, # `true` if the amount is paid by the employers. - employer: nil, + employer:, # The exact name of tax from the pay statement. - name: nil, + name:, # The type of taxes. - type: nil + type:, + # The tax amount in cents. + amount: nil, + attributes: nil ) end sig do override.returns( { - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes - ), currency: T.nilable(String), employer: T.nilable(T::Boolean), name: T.nilable(String), type: T.nilable( FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol + ), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes ) } ) @@ -1108,6 +1078,51 @@ module FinchAPI def to_hash end + # The type of taxes. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STATE = + T.let( + :state, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + FEDERAL = + T.let( + :federal, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + LOCAL = + T.let( + :local, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + FICA = + T.let( + :fica, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + class Attributes < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do @@ -1119,9 +1134,7 @@ module FinchAPI sig do returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - ) + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata ) end attr_reader :metadata @@ -1140,7 +1153,7 @@ module FinchAPI FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata::OrHash ).returns(T.attached_class) end - def self.new(metadata: nil) + def self.new(metadata:) end sig do @@ -1166,15 +1179,8 @@ module FinchAPI # 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.). - sig do - returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) - end - attr_reader :metadata - - sig do - params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void - end - attr_writer :metadata + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata sig do params( @@ -1185,7 +1191,7 @@ module FinchAPI # 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.). - metadata: nil + metadata: ) end @@ -1198,51 +1204,6 @@ module FinchAPI end end end - - # The type of taxes. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - STATE = - T.let( - :state, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - FEDERAL = - T.let( - :federal, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - LOCAL = - T.let( - :local, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - FICA = - T.let( - :fica, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ] - ) - end - def self.values - end - end end # The type of the payment associated with the pay statement. @@ -1258,11 +1219,6 @@ module FinchAPI end OrSymbol = T.type_alias { T.any(Symbol, String) } - REGULAR_PAYROLL = - T.let( - :regular_payroll, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol - ) OFF_CYCLE_PAYROLL = T.let( :off_cycle_payroll, @@ -1273,6 +1229,11 @@ module FinchAPI :one_time_payment, FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol ) + REGULAR_PAYROLL = + T.let( + :regular_payroll, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol + ) sig do override.returns( diff --git a/sig/finch_api/models/hris/benefit_type.rbs b/sig/finch_api/models/hris/benefit_type.rbs index e8ee3636..60b14edd 100644 --- a/sig/finch_api/models/hris/benefit_type.rbs +++ b/sig/finch_api/models/hris/benefit_type.rbs @@ -2,48 +2,48 @@ module FinchAPI module Models module HRIS type benefit_type = - :"401k" + :"457" + | :"401k" | :"401k_roth" | :"401k_loan" | :"403b" | :"403b_roth" - | :"457" | :"457_roth" - | :s125_medical - | :s125_dental - | :s125_vision - | :hsa_pre - | :hsa_post - | :fsa_medical - | :fsa_dependent_care - | :simple_ira - | :simple | :commuter | :custom_post_tax | :custom_pre_tax + | :fsa_dependent_care + | :fsa_medical + | :hsa_post + | :hsa_pre + | :s125_dental + | :s125_medical + | :s125_vision + | :simple + | :simple_ira module BenefitType extend FinchAPI::Internal::Type::Enum + BENEFIT_TYPE_457: :"457" BENEFIT_TYPE_401K: :"401k" BENEFIT_TYPE_401K_ROTH: :"401k_roth" BENEFIT_TYPE_401K_LOAN: :"401k_loan" BENEFIT_TYPE_403B: :"403b" BENEFIT_TYPE_403B_ROTH: :"403b_roth" - BENEFIT_TYPE_457: :"457" BENEFIT_TYPE_457_ROTH: :"457_roth" - S125_MEDICAL: :s125_medical - S125_DENTAL: :s125_dental - S125_VISION: :s125_vision - HSA_PRE: :hsa_pre - HSA_POST: :hsa_post - FSA_MEDICAL: :fsa_medical - FSA_DEPENDENT_CARE: :fsa_dependent_care - SIMPLE_IRA: :simple_ira - SIMPLE: :simple COMMUTER: :commuter CUSTOM_POST_TAX: :custom_post_tax CUSTOM_PRE_TAX: :custom_pre_tax + FSA_DEPENDENT_CARE: :fsa_dependent_care + FSA_MEDICAL: :fsa_medical + HSA_POST: :hsa_post + HSA_PRE: :hsa_pre + S125_DENTAL: :s125_dental + S125_MEDICAL: :s125_medical + S125_VISION: :s125_vision + SIMPLE: :simple + SIMPLE_IRA: :simple_ira def self?.values: -> ::Array[FinchAPI::Models::HRIS::benefit_type] end diff --git a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs index 85036142..3a14dafc 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs @@ -10,26 +10,16 @@ module FinchAPI } class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel - attr_reader attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes? + attr_accessor attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes - def attributes=: ( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes - ) -> FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes + attr_accessor category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category - attr_reader category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category? - - def category=: ( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category - ) -> FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category - - attr_reader name: String? - - def name=: (String) -> String + attr_accessor name: String def initialize: ( - ?attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - ?category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category, - ?name: String + attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category, + name: String ) -> void def to_hash: -> { @@ -40,31 +30,31 @@ module FinchAPI type attributes = { - employer: bool?, metadata: ::Hash[Symbol, top?]?, + employer: bool?, pre_tax: bool?, type: String? } class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor employer: bool? - attr_accessor metadata: ::Hash[Symbol, top?]? + attr_accessor employer: bool? + attr_accessor pre_tax: bool? attr_accessor type: String? def initialize: ( + metadata: ::Hash[Symbol, top?]?, ?employer: bool?, - ?metadata: ::Hash[Symbol, top?]?, ?pre_tax: bool?, ?type: String? ) -> void def to_hash: -> { - employer: bool?, metadata: ::Hash[Symbol, top?]?, + employer: bool?, pre_tax: bool?, type: String? } diff --git a/sig/finch_api/models/hris/employment_data.rbs b/sig/finch_api/models/hris/employment_data.rbs index 3bd584f5..515184e8 100644 --- a/sig/finch_api/models/hris/employment_data.rbs +++ b/sig/finch_api/models/hris/employment_data.rbs @@ -12,7 +12,6 @@ module FinchAPI { id: String, class_code: String?, - custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, @@ -26,10 +25,11 @@ module FinchAPI middle_name: String?, start_date: String?, title: String?, - work_id: String?, + custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, - source_id: String? + source_id: String?, + work_id: String? } class UnionMember0 < FinchAPI::Internal::Type::BaseModel @@ -37,8 +37,6 @@ module FinchAPI attr_accessor class_code: String? - attr_accessor custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]? - attr_accessor department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department? attr_accessor employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment? @@ -65,7 +63,7 @@ module FinchAPI attr_accessor title: String? - attr_accessor work_id: String? + attr_accessor custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]? attr_accessor income: FinchAPI::Income? @@ -73,10 +71,11 @@ module FinchAPI attr_accessor source_id: String? + attr_accessor work_id: String? + def initialize: ( id: String, class_code: String?, - custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, @@ -90,16 +89,16 @@ module FinchAPI middle_name: String?, start_date: String?, title: String?, - work_id: String?, + ?custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, - ?source_id: String? + ?source_id: String?, + ?work_id: String? ) -> void def to_hash: -> { id: String, class_code: String?, - custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, @@ -113,44 +112,13 @@ module FinchAPI middle_name: String?, start_date: String?, title: String?, - work_id: String?, + custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, - source_id: String? + source_id: String?, + work_id: String? } - type custom_field = - { - name: String?, - value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? - } - - class CustomField < FinchAPI::Internal::Type::BaseModel - attr_accessor name: String? - - attr_accessor value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? - - def initialize: ( - ?name: String?, - ?value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? - ) -> void - - def to_hash: -> { - name: String?, - value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? - } - - type value = (String | ::Array[top] | top | Float | bool)? - - module Value - extend FinchAPI::Internal::Type::Union - - def self?.variants: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value] - - UnionMember1Array: FinchAPI::Internal::Type::Converter - end - end - type department = { name: String? } class Department < FinchAPI::Internal::Type::BaseModel @@ -247,6 +215,38 @@ module FinchAPI def to_hash: -> { id: String } end + + type custom_field = + { + name: String?, + value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + } + + class CustomField < FinchAPI::Internal::Type::BaseModel + attr_accessor name: String? + + attr_accessor value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + + def initialize: ( + ?name: String?, + ?value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + ) -> void + + def to_hash: -> { + name: String?, + value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + } + + type value = (String | ::Array[top] | top | Float | bool)? + + module Value + extend FinchAPI::Internal::Type::Union + + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value] + + UnionMember1Array: FinchAPI::Internal::Type::Converter + end + end end type batch_error = diff --git a/sig/finch_api/models/hris/pay_statement.rbs b/sig/finch_api/models/hris/pay_statement.rbs deleted file mode 100644 index f73ec03b..00000000 --- a/sig/finch_api/models/hris/pay_statement.rbs +++ /dev/null @@ -1,436 +0,0 @@ -module FinchAPI - module Models - module HRIS - type pay_statement = - { - earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::HRIS::PayStatement::type_? - } - - class PayStatement < FinchAPI::Internal::Type::BaseModel - attr_accessor earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]? - - attr_accessor employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]? - - attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]? - - attr_accessor gross_pay: FinchAPI::Money? - - attr_reader individual_id: String? - - def individual_id=: (String) -> String - - attr_accessor net_pay: FinchAPI::Money? - - attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method? - - attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]? - - attr_accessor total_hours: Float? - - attr_accessor type: FinchAPI::Models::HRIS::PayStatement::type_? - - def initialize: ( - ?earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, - ?employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, - ?employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, - ?gross_pay: FinchAPI::Money?, - ?individual_id: String, - ?net_pay: FinchAPI::Money?, - ?payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, - ?taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, - ?total_hours: Float?, - ?type: FinchAPI::Models::HRIS::PayStatement::type_? - ) -> void - - def to_hash: -> { - earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::HRIS::PayStatement::type_? - } - - type earning = - { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? - } - - class Earning < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes? - - attr_accessor currency: String? - - attr_accessor hours: Float? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? - - def initialize: ( - ?amount: Integer?, - ?attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes?, - ?currency: String?, - ?hours: Float?, - ?name: String?, - ?type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? - ) -> void - - def to_hash: -> { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? - } - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata? - - def metadata=: ( - FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - ) -> FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - - def initialize: ( - ?metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - - type type_ = - :salary - | :wage - | :reimbursement - | :overtime - | :severance - | :double_overtime - | :pto - | :sick - | :bonus - | :commission - | :tips - | :"1099" - | :other - - 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 - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::Earning::type_] - end - end - - type employee_deduction = - { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type? - } - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes? - - attr_accessor currency: String? - - attr_accessor name: String? - - attr_accessor pre_tax: bool? - - attr_accessor type: FinchAPI::Models::HRIS::benefit_type? - - def initialize: ( - ?amount: Integer?, - ?attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes?, - ?currency: String?, - ?name: String?, - ?pre_tax: bool?, - ?type: FinchAPI::Models::HRIS::benefit_type? - ) -> void - - def to_hash: -> { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type? - } - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata? - - def metadata=: ( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - ) -> FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - - def initialize: ( - ?metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type employer_contribution = - { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes?, - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type? - } - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes? - - attr_accessor currency: String? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::benefit_type? - - def initialize: ( - ?amount: Integer?, - ?attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes?, - ?currency: String?, - ?name: String?, - ?type: FinchAPI::Models::HRIS::benefit_type? - ) -> void - - def to_hash: -> { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes?, - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type? - } - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata? - - def metadata=: ( - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - ) -> FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - - def initialize: ( - ?metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type payment_method = :check | :direct_deposit | :other - - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - CHECK: :check - DIRECT_DEPOSIT: :direct_deposit - OTHER: :other - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::payment_method] - end - - type tax = - { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes?, - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? - } - - class Tax < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes? - - attr_accessor currency: String? - - attr_accessor employer: bool? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? - - def initialize: ( - ?amount: Integer?, - ?attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes?, - ?currency: String?, - ?employer: bool?, - ?name: String?, - ?type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? - ) -> void - - def to_hash: -> { - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes?, - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? - } - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata? - - def metadata=: ( - FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - ) -> FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - - def initialize: ( - ?metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - - type type_ = :state | :federal | :local | :fica - - module Type - extend FinchAPI::Internal::Type::Enum - - STATE: :state - FEDERAL: :federal - LOCAL: :local - FICA: :fica - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::Tax::type_] - end - end - - type type_ = :regular_payroll | :off_cycle_payroll | :one_time_payment - - module Type - extend FinchAPI::Internal::Type::Enum - - REGULAR_PAYROLL: :regular_payroll - OFF_CYCLE_PAYROLL: :off_cycle_payroll - ONE_TIME_PAYMENT: :one_time_payment - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::type_] - end - end - end - end -end diff --git a/sig/finch_api/models/hris/pay_statement_response.rbs b/sig/finch_api/models/hris/pay_statement_response.rbs index 1960cfca..288360be 100644 --- a/sig/finch_api/models/hris/pay_statement_response.rbs +++ b/sig/finch_api/models/hris/pay_statement_response.rbs @@ -3,34 +3,26 @@ module FinchAPI module HRIS type pay_statement_response = { - body: FinchAPI::HRIS::PayStatementResponseBody, + body: FinchAPI::Models::HRIS::pay_statement_response_body, code: Integer, payment_id: String } class PayStatementResponse < FinchAPI::Internal::Type::BaseModel - attr_reader body: FinchAPI::HRIS::PayStatementResponseBody? + attr_accessor body: FinchAPI::Models::HRIS::pay_statement_response_body - def body=: ( - FinchAPI::HRIS::PayStatementResponseBody - ) -> FinchAPI::HRIS::PayStatementResponseBody + attr_accessor code: Integer - attr_reader code: Integer? - - def code=: (Integer) -> Integer - - attr_reader payment_id: String? - - def payment_id=: (String) -> String + attr_accessor payment_id: String def initialize: ( - ?body: FinchAPI::HRIS::PayStatementResponseBody, - ?code: Integer, - ?payment_id: String + body: FinchAPI::Models::HRIS::pay_statement_response_body, + code: Integer, + payment_id: String ) -> void def to_hash: -> { - body: FinchAPI::HRIS::PayStatementResponseBody, + body: FinchAPI::Models::HRIS::pay_statement_response_body, code: Integer, payment_id: String } diff --git a/sig/finch_api/models/hris/pay_statement_response_body.rbs b/sig/finch_api/models/hris/pay_statement_response_body.rbs index 621debcc..9389b5a6 100644 --- a/sig/finch_api/models/hris/pay_statement_response_body.rbs +++ b/sig/finch_api/models/hris/pay_statement_response_body.rbs @@ -2,31 +2,558 @@ module FinchAPI module Models module HRIS type pay_statement_response_body = - { - paging: FinchAPI::Paging, - pay_statements: ::Array[FinchAPI::HRIS::PayStatement] - } + FinchAPI::HRIS::PayStatementResponseBody::UnionMember0 + | FinchAPI::HRIS::PayStatementResponseBody::BatchError + | FinchAPI::HRIS::PayStatementResponseBody::UnionMember2 - class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel - attr_reader paging: FinchAPI::Paging? + module PayStatementResponseBody + extend FinchAPI::Internal::Type::Union - def paging=: (FinchAPI::Paging) -> FinchAPI::Paging + type union_member0 = + { + paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] + } - attr_reader pay_statements: ::Array[FinchAPI::HRIS::PayStatement]? + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + attr_accessor paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging - def pay_statements=: ( - ::Array[FinchAPI::HRIS::PayStatement] - ) -> ::Array[FinchAPI::HRIS::PayStatement] + attr_accessor pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] - def initialize: ( - ?paging: FinchAPI::Paging, - ?pay_statements: ::Array[FinchAPI::HRIS::PayStatement] - ) -> void + def initialize: ( + paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] + ) -> void - def to_hash: -> { - paging: FinchAPI::Paging, - pay_statements: ::Array[FinchAPI::HRIS::PayStatement] - } + def to_hash: -> { + paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] + } + + type paging = { offset: Integer, count: Integer } + + class Paging < FinchAPI::Internal::Type::BaseModel + attr_accessor offset: Integer + + attr_reader count: Integer? + + def count=: (Integer) -> Integer + + def initialize: (offset: Integer, ?count: Integer) -> void + + def to_hash: -> { offset: Integer, count: Integer } + end + + type pay_statement = + { + earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? + } + + class PayStatement < FinchAPI::Internal::Type::BaseModel + attr_accessor earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]? + + attr_accessor employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]? + + attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]? + + attr_accessor gross_pay: FinchAPI::Money? + + attr_accessor individual_id: String + + attr_accessor net_pay: FinchAPI::Money? + + attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method? + + attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]? + + attr_accessor total_hours: Float? + + attr_accessor type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? + + def initialize: ( + earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? + ) -> void + + def to_hash: -> { + earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? + } + + type earning = + { + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? + } + + class Earning < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer? + + attr_accessor currency: String? + + attr_accessor hours: Float? + + attr_accessor name: String? + + attr_accessor type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_? + + attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? + + def initialize: ( + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_?, + ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? + ) -> void + + def to_hash: -> { + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? + } + + type type_ = + :salary + | :wage + | :reimbursement + | :overtime + | :severance + | :double_overtime + | :pto + | :sick + | :bonus + | :commission + | :tips + | :"1099" + | :other + + 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 + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_] + end + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type employee_deduction = + { + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? + } + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer? + + attr_accessor currency: String? + + attr_accessor name: String? + + attr_accessor pre_tax: bool? + + attr_accessor type: FinchAPI::Models::HRIS::benefit_type? + + attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? + + def initialize: ( + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? + ) -> void + + def to_hash: -> { + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? + } + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type employer_contribution = + { + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? + } + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + attr_accessor currency: String? + + attr_accessor name: String? + + attr_accessor type: FinchAPI::Models::HRIS::benefit_type? + + attr_accessor amount: Integer? + + attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? + + def initialize: ( + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, + ?amount: Integer?, + ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? + ) -> void + + def to_hash: -> { + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? + } + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type payment_method = :check | :direct_deposit | :other + + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + CHECK: :check + DIRECT_DEPOSIT: :direct_deposit + OTHER: :other + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method] + end + + type tax = + { + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? + } + + class Tax < FinchAPI::Internal::Type::BaseModel + attr_accessor currency: String? + + attr_accessor employer: bool? + + attr_accessor name: String? + + attr_accessor type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_? + + attr_accessor amount: Integer? + + attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? + + def initialize: ( + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_?, + ?amount: Integer?, + ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? + ) -> void + + def to_hash: -> { + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? + } + + type type_ = :state | :federal | :local | :fica + + module Type + extend FinchAPI::Internal::Type::Enum + + STATE: :state + FEDERAL: :federal + LOCAL: :local + FICA: :fica + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_] + end + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type type_ = + :off_cycle_payroll | :one_time_payment | :regular_payroll + + module Type + extend FinchAPI::Internal::Type::Enum + + OFF_CYCLE_PAYROLL: :off_cycle_payroll + ONE_TIME_PAYMENT: :one_time_payment + REGULAR_PAYROLL: :regular_payroll + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_] + end + end + end + + type batch_error = + { code: Float, message: String, name: String, finch_code: String } + + class BatchError < FinchAPI::Internal::Type::BaseModel + attr_accessor code: Float + + attr_accessor message: String + + attr_accessor name: String + + attr_reader finch_code: String? + + def finch_code=: (String) -> String + + def initialize: ( + code: Float, + message: String, + name: String, + ?finch_code: String + ) -> void + + def to_hash: -> { + code: Float, + message: String, + name: String, + finch_code: String + } + end + + type union_member2 = + { + code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code, + finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code, + message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message, + name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ + } + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + attr_accessor code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code + + attr_accessor finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code + + attr_accessor message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message + + attr_accessor name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ + + def initialize: ( + code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code, + finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code, + message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message, + name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ + ) -> void + + def to_hash: -> { + code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code, + finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code, + message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message, + name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ + } + + type code = Float + + module Code + extend FinchAPI::Internal::Type::Enum + + CODE_202: 202 + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code] + end + + type finch_code = :data_sync_in_progress + + module FinchCode + extend FinchAPI::Internal::Type::Enum + + DATA_SYNC_IN_PROGRESS: :data_sync_in_progress + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code] + end + + type message = + :"The pay statements for this payment are being fetched. Please check back later." + + module Message + extend FinchAPI::Internal::Type::Enum + + THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER: :"The pay statements for this payment are being fetched. Please check back later." + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message] + end + + type name_ = :accepted + + module Name + extend FinchAPI::Internal::Type::Enum + + ACCEPTED: :accepted + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_] + end + end + + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::pay_statement_response_body] end end end diff --git a/sig/finch_api/models/hris/payment.rbs b/sig/finch_api/models/hris/payment.rbs index 354bddda..471e14ee 100644 --- a/sig/finch_api/models/hris/payment.rbs +++ b/sig/finch_api/models/hris/payment.rbs @@ -18,9 +18,7 @@ module FinchAPI } class Payment < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String + attr_accessor id: String attr_accessor company_debit: FinchAPI::Money? @@ -45,18 +43,18 @@ module FinchAPI attr_accessor pay_period: FinchAPI::HRIS::Payment::PayPeriod? def initialize: ( - ?id: String, - ?company_debit: FinchAPI::Money?, - ?debit_date: String?, - ?employee_taxes: FinchAPI::Money?, - ?employer_taxes: FinchAPI::Money?, - ?gross_pay: FinchAPI::Money?, - ?individual_ids: ::Array[String]?, - ?net_pay: FinchAPI::Money?, - ?pay_date: String?, - ?pay_frequencies: ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency]?, - ?pay_group_ids: ::Array[String]?, - ?pay_period: FinchAPI::HRIS::Payment::PayPeriod? + id: String, + company_debit: FinchAPI::Money?, + debit_date: String?, + employee_taxes: FinchAPI::Money?, + employer_taxes: FinchAPI::Money?, + gross_pay: FinchAPI::Money?, + individual_ids: ::Array[String]?, + net_pay: FinchAPI::Money?, + pay_date: String?, + pay_frequencies: ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency]?, + pay_group_ids: ::Array[String]?, + pay_period: FinchAPI::HRIS::Payment::PayPeriod? ) -> void def to_hash: -> { @@ -76,27 +74,27 @@ module FinchAPI type pay_frequency = :annually - | :semi_annually - | :quarterly - | :monthly - | :semi_monthly | :bi_weekly - | :weekly | :daily + | :monthly | :other + | :quarterly + | :semi_annually + | :semi_monthly + | :weekly module PayFrequency extend FinchAPI::Internal::Type::Enum ANNUALLY: :annually - SEMI_ANNUALLY: :semi_annually - QUARTERLY: :quarterly - MONTHLY: :monthly - SEMI_MONTHLY: :semi_monthly BI_WEEKLY: :bi_weekly - WEEKLY: :weekly DAILY: :daily + MONTHLY: :monthly OTHER: :other + QUARTERLY: :quarterly + SEMI_ANNUALLY: :semi_annually + SEMI_MONTHLY: :semi_monthly + WEEKLY: :weekly def self?.values: -> ::Array[FinchAPI::Models::HRIS::Payment::pay_frequency] end @@ -108,7 +106,7 @@ module FinchAPI attr_accessor start_date: String? - def initialize: (?end_date: String?, ?start_date: String?) -> void + def initialize: (end_date: String?, start_date: String?) -> void def to_hash: -> { end_date: String?, start_date: String? } end diff --git a/sig/finch_api/models/money.rbs b/sig/finch_api/models/money.rbs index 4cd5b4e1..ebd96d2b 100644 --- a/sig/finch_api/models/money.rbs +++ b/sig/finch_api/models/money.rbs @@ -5,11 +5,9 @@ module FinchAPI class Money < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer? - attr_reader currency: String? + attr_accessor currency: String - def currency=: (String) -> String - - def initialize: (?amount: Integer?, ?currency: String) -> void + def initialize: (amount: Integer?, currency: String) -> void def to_hash: -> { amount: Integer?, currency: String } end diff --git a/sig/finch_api/models/payroll/pay_group_list_response.rbs b/sig/finch_api/models/payroll/pay_group_list_response.rbs index f122831c..417aef14 100644 --- a/sig/finch_api/models/payroll/pay_group_list_response.rbs +++ b/sig/finch_api/models/payroll/pay_group_list_response.rbs @@ -9,24 +9,16 @@ module FinchAPI } class PayGroupListResponse < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? + attr_accessor id: String - def id=: (String) -> String + attr_accessor name: String - attr_reader name: String? - - def name=: (String) -> String - - attr_reader pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency]? - - def pay_frequencies=: ( - ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] - ) -> ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] + attr_accessor pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] def initialize: ( - ?id: String, - ?name: String, - ?pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] + id: String, + name: String, + pay_frequencies: ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] ) -> void def to_hash: -> { @@ -37,27 +29,27 @@ module FinchAPI type pay_frequency = :annually - | :semi_annually - | :quarterly - | :monthly - | :semi_monthly | :bi_weekly - | :weekly | :daily + | :monthly | :other + | :quarterly + | :semi_annually + | :semi_monthly + | :weekly module PayFrequency extend FinchAPI::Internal::Type::Enum ANNUALLY: :annually - SEMI_ANNUALLY: :semi_annually - QUARTERLY: :quarterly - MONTHLY: :monthly - SEMI_MONTHLY: :semi_monthly BI_WEEKLY: :bi_weekly - WEEKLY: :weekly DAILY: :daily + MONTHLY: :monthly OTHER: :other + QUARTERLY: :quarterly + SEMI_ANNUALLY: :semi_annually + SEMI_MONTHLY: :semi_monthly + WEEKLY: :weekly def self?.values: -> ::Array[FinchAPI::Models::Payroll::PayGroupListResponse::pay_frequency] end diff --git a/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs b/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs index 380e4c57..59adbab7 100644 --- a/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs +++ b/sig/finch_api/models/payroll/pay_group_retrieve_response.rbs @@ -34,27 +34,27 @@ module FinchAPI type pay_frequency = :annually - | :semi_annually - | :quarterly - | :monthly - | :semi_monthly | :bi_weekly - | :weekly | :daily + | :monthly | :other + | :quarterly + | :semi_annually + | :semi_monthly + | :weekly module PayFrequency extend FinchAPI::Internal::Type::Enum ANNUALLY: :annually - SEMI_ANNUALLY: :semi_annually - QUARTERLY: :quarterly - MONTHLY: :monthly - SEMI_MONTHLY: :semi_monthly BI_WEEKLY: :bi_weekly - WEEKLY: :weekly DAILY: :daily + MONTHLY: :monthly OTHER: :other + QUARTERLY: :quarterly + SEMI_ANNUALLY: :semi_annually + SEMI_MONTHLY: :semi_monthly + WEEKLY: :weekly def self?.values: -> ::Array[FinchAPI::Models::Payroll::PayGroupRetrieveResponse::pay_frequency] end diff --git a/sig/finch_api/models/sandbox/payment_create_params.rbs b/sig/finch_api/models/sandbox/payment_create_params.rbs index 8ee3a8f8..17860875 100644 --- a/sig/finch_api/models/sandbox/payment_create_params.rbs +++ b/sig/finch_api/models/sandbox/payment_create_params.rbs @@ -64,9 +64,7 @@ module FinchAPI attr_accessor gross_pay: FinchAPI::Money? - attr_reader individual_id: String? - - def individual_id=: (String) -> String + attr_accessor individual_id: String attr_accessor net_pay: FinchAPI::Money? @@ -79,16 +77,16 @@ module FinchAPI attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? def initialize: ( - ?earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, - ?employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]?, - ?employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]?, - ?gross_pay: FinchAPI::Money?, - ?individual_id: String, - ?net_pay: FinchAPI::Money?, - ?payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, - ?taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, - ?total_hours: Float?, - ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? + earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? ) -> void def to_hash: -> { @@ -107,18 +105,16 @@ module FinchAPI type earning = { amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes?, currency: String?, hours: Float?, name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? } class Earning < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer? - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? - attr_accessor currency: String? attr_accessor hours: Float? @@ -127,57 +123,26 @@ module FinchAPI attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? + def initialize: ( - ?amount: Integer?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes?, - ?currency: String?, - ?hours: Float?, - ?name: String?, - ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_?, + ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? ) -> void def to_hash: -> { amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes?, currency: String?, hours: Float?, name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? } - type attributes = - { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata? - - def metadata=: ( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - ) -> FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - - def initialize: ( - ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - type type_ = :salary | :wage @@ -212,23 +177,48 @@ module FinchAPI def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_] end + + type attributes = + { + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end end type employee_deduction = { amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes?, currency: String?, name: String?, pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type? + type: FinchAPI::Models::HRIS::benefit_type?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? } class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer? - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? - attr_accessor currency: String? attr_accessor name: String? @@ -237,22 +227,24 @@ module FinchAPI attr_accessor type: FinchAPI::Models::HRIS::benefit_type? + attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? + def initialize: ( - ?amount: Integer?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes?, - ?currency: String?, - ?name: String?, - ?pre_tax: bool?, - ?type: FinchAPI::Models::HRIS::benefit_type? + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? ) -> void def to_hash: -> { amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes?, currency: String?, name: String?, pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type? + type: FinchAPI::Models::HRIS::benefit_type?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? } type attributes = @@ -261,14 +253,10 @@ module FinchAPI } class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata? - - def metadata=: ( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - ) -> FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata + attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata def initialize: ( - ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata ) -> void def to_hash: -> { @@ -278,11 +266,9 @@ module FinchAPI type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] + attr_accessor metadata: ::Hash[Symbol, top?] - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + def initialize: (metadata: ::Hash[Symbol, top?]) -> void def to_hash: -> { metadata: ::Hash[Symbol, top?] } end @@ -291,38 +277,38 @@ module FinchAPI type employer_contribution = { - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes?, currency: String?, name: String?, - type: FinchAPI::Models::HRIS::benefit_type? + type: FinchAPI::Models::HRIS::benefit_type?, + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? } class EmployerContribution < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? - attr_accessor currency: String? attr_accessor name: String? attr_accessor type: FinchAPI::Models::HRIS::benefit_type? + attr_accessor amount: Integer? + + attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? + def initialize: ( + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, ?amount: Integer?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes?, - ?currency: String?, - ?name: String?, - ?type: FinchAPI::Models::HRIS::benefit_type? + ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? ) -> void def to_hash: -> { - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes?, currency: String?, name: String?, - type: FinchAPI::Models::HRIS::benefit_type? + type: FinchAPI::Models::HRIS::benefit_type?, + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? } type attributes = @@ -331,14 +317,10 @@ module FinchAPI } class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata? - - def metadata=: ( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - ) -> FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata + attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata def initialize: ( - ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata ) -> void def to_hash: -> { @@ -348,11 +330,9 @@ module FinchAPI type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? + attr_accessor metadata: ::Hash[Symbol, top?] - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + def initialize: (metadata: ::Hash[Symbol, top?]) -> void def to_hash: -> { metadata: ::Hash[Symbol, top?] } end @@ -373,19 +353,15 @@ module FinchAPI type tax = { - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes?, currency: String?, employer: bool?, name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_?, + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? } class Tax < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? - attr_accessor currency: String? attr_accessor employer: bool? @@ -394,38 +370,51 @@ module FinchAPI attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + attr_accessor amount: Integer? + + attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? + def initialize: ( + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_?, ?amount: Integer?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes?, - ?currency: String?, - ?employer: bool?, - ?name: String?, - ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? ) -> void def to_hash: -> { - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes?, currency: String?, employer: bool?, name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_?, + amount: Integer?, + attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? } + type type_ = :state | :federal | :local | :fica + + module Type + extend FinchAPI::Internal::Type::Enum + + STATE: :state + FEDERAL: :federal + LOCAL: :local + FICA: :fica + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_] + end + type attributes = { metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata } class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata? - - def metadata=: ( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - ) -> FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata + attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata def initialize: ( - ?metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata + metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata ) -> void def to_hash: -> { @@ -435,38 +424,23 @@ module FinchAPI type metadata = { metadata: ::Hash[Symbol, top?] } class Metadata < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top?]? - - def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] + attr_accessor metadata: ::Hash[Symbol, top?] - def initialize: (?metadata: ::Hash[Symbol, top?]) -> void + def initialize: (metadata: ::Hash[Symbol, top?]) -> void def to_hash: -> { metadata: ::Hash[Symbol, top?] } end end - - type type_ = :state | :federal | :local | :fica - - module Type - extend FinchAPI::Internal::Type::Enum - - STATE: :state - FEDERAL: :federal - LOCAL: :local - FICA: :fica - - def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_] - end end - type type_ = :regular_payroll | :off_cycle_payroll | :one_time_payment + type type_ = :off_cycle_payroll | :one_time_payment | :regular_payroll module Type extend FinchAPI::Internal::Type::Enum - REGULAR_PAYROLL: :regular_payroll OFF_CYCLE_PAYROLL: :off_cycle_payroll ONE_TIME_PAYMENT: :one_time_payment + REGULAR_PAYROLL: :regular_payroll def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_] end diff --git a/test/finch_api/resources/hris/company/pay_statement_item_test.rb b/test/finch_api/resources/hris/company/pay_statement_item_test.rb index b666c2ce..9f6a30a5 100644 --- a/test/finch_api/resources/hris/company/pay_statement_item_test.rb +++ b/test/finch_api/resources/hris/company/pay_statement_item_test.rb @@ -19,9 +19,9 @@ def test_list assert_pattern do row => { - attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes | nil, - category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category | nil, - name: String | nil + attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category, + name: String } end end diff --git a/test/finch_api/resources/hris/pay_statements_test.rb b/test/finch_api/resources/hris/pay_statements_test.rb index 735fa76d..43e820b2 100644 --- a/test/finch_api/resources/hris/pay_statements_test.rb +++ b/test/finch_api/resources/hris/pay_statements_test.rb @@ -20,9 +20,9 @@ def test_retrieve_many_required_params assert_pattern do row => { - body: FinchAPI::HRIS::PayStatementResponseBody | nil, - code: Integer | nil, - payment_id: String | nil + body: FinchAPI::HRIS::PayStatementResponseBody, + code: Integer, + payment_id: String } end end diff --git a/test/finch_api/resources/hris/payments_test.rb b/test/finch_api/resources/hris/payments_test.rb index fb27a74b..d7ca30a0 100644 --- a/test/finch_api/resources/hris/payments_test.rb +++ b/test/finch_api/resources/hris/payments_test.rb @@ -19,7 +19,7 @@ def test_list_required_params assert_pattern do row => { - id: String | nil, + id: String, company_debit: FinchAPI::Money | nil, debit_date: String | nil, employee_taxes: FinchAPI::Money | nil, diff --git a/test/finch_api/resources/payroll/pay_groups_test.rb b/test/finch_api/resources/payroll/pay_groups_test.rb index bd1d6b53..d28f0b85 100644 --- a/test/finch_api/resources/payroll/pay_groups_test.rb +++ b/test/finch_api/resources/payroll/pay_groups_test.rb @@ -36,9 +36,9 @@ def test_list assert_pattern do row => { - id: String | nil, - name: String | nil, - pay_frequencies: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency]) | nil + id: String, + name: String, + pay_frequencies: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency]) } end end From 31a6af670617167397c2df0a6603367fcabb1b1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 12:26:21 +0000 Subject: [PATCH 11/27] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f17b73c9..c3c58b6d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5b7ee4cddd08558fb0cc5010d36899c0bbe5d6a8d39c8171f65b70b68927df3c.yml -openapi_spec_hash: c01482dc89e9bf7ae4c9dad0fb547e62 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bee51b1baafbccc6806b5165e0ed78ecf537826794fe15ceb0141897c73d8b8a.yml +openapi_spec_hash: 12440ed643b40a8690740b6b16ad410a config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 From 6301929d697ae1c006446a12e6c67046e83ef132 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 16:00:40 +0000 Subject: [PATCH 12/27] fix: prevent rubocop from mangling `===` to `is_a?` check --- lib/finch_api/internal/util.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 5ce4aefb..713e45cb 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -600,11 +600,13 @@ class << self # # @return [Object] def encode_content(headers, body) + # rubocop:disable Style/CaseEquality + # rubocop:disable Layout/LineLength content_type = headers["content-type"] case [content_type, body] in [FinchAPI::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }] [headers, JSON.generate(body)] - in [FinchAPI::Internal::Util::JSONL_CONTENT, Enumerable] unless body.is_a?(FinchAPI::Internal::Type::FileInput) + in [FinchAPI::Internal::Util::JSONL_CONTENT, Enumerable] unless FinchAPI::Internal::Type::FileInput === body [headers, body.lazy.map { JSON.generate(_1) }] in [%r{^multipart/form-data}, Hash | FinchAPI::Internal::Type::FileInput] boundary, strio = encode_multipart_streaming(body) @@ -619,6 +621,8 @@ def encode_content(headers, body) else [headers, body] end + # rubocop:enable Layout/LineLength + # rubocop:enable Style/CaseEquality end # @api private From 04cb830c96bed56455c6c494030819bc4fb2a474 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 22:16:33 +0000 Subject: [PATCH 13/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c3c58b6d..bfb3faad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bee51b1baafbccc6806b5165e0ed78ecf537826794fe15ceb0141897c73d8b8a.yml -openapi_spec_hash: 12440ed643b40a8690740b6b16ad410a +openapi_spec_hash: 5017bc383c3a779ccbc2d9b6d93b26b4 config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 From 79c1aeeb668d6c17594cf91c2b9fecd66d13651c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 13:24:34 +0000 Subject: [PATCH 14/27] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bfb3faad..34192d01 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bee51b1baafbccc6806b5165e0ed78ecf537826794fe15ceb0141897c73d8b8a.yml openapi_spec_hash: 5017bc383c3a779ccbc2d9b6d93b26b4 -config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 +config_hash: acf5ff659c4400f8c6ee5a2488a83904 From 4aaba6261e6c92833ab6e46acb2e2652da843be9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 15:36:25 +0000 Subject: [PATCH 15/27] fix: sorbet types for enums, and make tapioca detection ignore `tapioca dsl` --- lib/finch_api.rb | 4 +++- lib/finch_api/internal/util.rb | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/finch_api.rb b/lib/finch_api.rb index e662482c..43b317bf 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -20,7 +20,9 @@ # We already ship the preferred sorbet manifests in the package itself. # `tapioca` currently does not offer us a way to opt out of unnecessary compilation. -if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/) +if Object.const_defined?(:Tapioca) && + caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) && + ARGV.none?(/dsl/) return end diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 713e45cb..ffc262d2 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -875,8 +875,12 @@ def to_sorbet_type(type) case type in FinchAPI::Internal::Util::SorbetRuntimeSupport type.to_sorbet_type - else + in Class | Module type + in true | false + T::Boolean + else + type.class end end end From 86a6b543fc513e9febcfb58d04aecbbf71ec5001 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 16:09:07 +0000 Subject: [PATCH 16/27] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 34192d01..b69fc900 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bee51b1baafbccc6806b5165e0ed78ecf537826794fe15ceb0141897c73d8b8a.yml -openapi_spec_hash: 5017bc383c3a779ccbc2d9b6d93b26b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-fb9ba13b8189c4223972e38677ea301c3121358e88fbfc9e4ec95ea5cc92f530.yml +openapi_spec_hash: 7bd02ce73505e51c5fd78608fed55c62 config_hash: acf5ff659c4400f8c6ee5a2488a83904 From 529b41ea3cf67b553d85e36a256cc5d6c4b13800 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 15:56:59 +0000 Subject: [PATCH 17/27] chore(tests): skip endpoints with basic auth --- .stats.yml | 4 ++-- test/finch_api/resources/connect/sessions_test.rb | 4 ++++ test/finch_api/resources/sandbox/connections/accounts_test.rb | 2 ++ test/finch_api/resources/sandbox/connections_test.rb | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b69fc900..5ee5e805 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-fb9ba13b8189c4223972e38677ea301c3121358e88fbfc9e4ec95ea5cc92f530.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1a82d3230c420c8562600b0ad45133d79ab68ffd21d524ab26eef11e163dba09.yml openapi_spec_hash: 7bd02ce73505e51c5fd78608fed55c62 -config_hash: acf5ff659c4400f8c6ee5a2488a83904 +config_hash: 81eb5297df860cf29f8c5bdbf9f89608 diff --git a/test/finch_api/resources/connect/sessions_test.rb b/test/finch_api/resources/connect/sessions_test.rb index 5d413ec8..3d14e88c 100644 --- a/test/finch_api/resources/connect/sessions_test.rb +++ b/test/finch_api/resources/connect/sessions_test.rb @@ -4,6 +4,8 @@ class FinchAPI::Test::Resources::Connect::SessionsTest < FinchAPI::Test::ResourceTest def test_new_required_params + skip("prism tests are broken") + response = @finch.connect.sessions.new(customer_id: "x", customer_name: "x", products: [:company]) assert_pattern do @@ -19,6 +21,8 @@ def test_new_required_params end def test_reauthenticate_required_params + skip("prism tests are broken") + response = @finch.connect.sessions.reauthenticate(connection_id: "connection_id") assert_pattern do diff --git a/test/finch_api/resources/sandbox/connections/accounts_test.rb b/test/finch_api/resources/sandbox/connections/accounts_test.rb index 7042e3cf..b429300f 100644 --- a/test/finch_api/resources/sandbox/connections/accounts_test.rb +++ b/test/finch_api/resources/sandbox/connections/accounts_test.rb @@ -4,6 +4,8 @@ class FinchAPI::Test::Resources::Sandbox::Connections::AccountsTest < FinchAPI::Test::ResourceTest def test_create_required_params + skip("prism tests are broken") + response = @finch.sandbox.connections.accounts.create( company_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", diff --git a/test/finch_api/resources/sandbox/connections_test.rb b/test/finch_api/resources/sandbox/connections_test.rb index 55f2654e..15d1b364 100644 --- a/test/finch_api/resources/sandbox/connections_test.rb +++ b/test/finch_api/resources/sandbox/connections_test.rb @@ -4,6 +4,8 @@ class FinchAPI::Test::Resources::Sandbox::ConnectionsTest < FinchAPI::Test::ResourceTest def test_create_required_params + skip("prism tests are broken") + response = @finch.sandbox.connections.create(provider_id: "provider_id") assert_pattern do From 281928010fa852dd399354a4561191120e85ad00 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 20:02:51 +0000 Subject: [PATCH 18/27] fix: `to_sorbet_type` should not return branded types --- lib/finch_api/internal/type/enum.rb | 9 ++++++--- lib/finch_api/internal/type/union.rb | 7 +++++-- lib/finch_api/models.rb | 8 ++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/finch_api/internal/type/enum.rb b/lib/finch_api/internal/type/enum.rb index e6c25eab..cb054c05 100644 --- a/lib/finch_api/internal/type/enum.rb +++ b/lib/finch_api/internal/type/enum.rb @@ -116,11 +116,14 @@ def coerce(value, state:) # # @return [Object] def to_sorbet_type - case values + types = values.map { FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq + case types in [] T.noreturn - in [value, *_] - T.all(FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self) + in [type] + type + else + T.any(*types) end end diff --git a/lib/finch_api/internal/type/union.rb b/lib/finch_api/internal/type/union.rb index 7522476a..c6738c61 100644 --- a/lib/finch_api/internal/type/union.rb +++ b/lib/finch_api/internal/type/union.rb @@ -216,11 +216,14 @@ def dump(value, state:) # # @return [Object] def to_sorbet_type - case (v = variants) + types = variants.map { FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq + case types in [] T.noreturn + in [type] + type else - T.any(*v.map { FinchAPI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }) + T.any(*types) end end diff --git a/lib/finch_api/models.rb b/lib/finch_api/models.rb index 453eba3a..7bd52140 100644 --- a/lib/finch_api/models.rb +++ b/lib/finch_api/models.rb @@ -11,16 +11,16 @@ module FinchAPI mod.constants.each do |name| case mod.const_get(name) in true | false - mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } } + mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } } mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } } in Integer - mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } } + mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } } mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } } in Float - mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } } + mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } } mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } } in Symbol - mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } } + mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } } mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } } else end From bb0bb581ffc994714895363e21f461e2ec82676e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:28:52 +0000 Subject: [PATCH 19/27] fix(client): fix PayStatementResponse body --- .stats.yml | 2 +- lib/finch_api.rb | 2 + lib/finch_api/models/hris/pay_statement.rb | 491 ++++++ .../pay_statement_data_sync_in_progress.rb | 76 + .../models/hris/pay_statement_response.rb | 48 +- .../hris/pay_statement_response_body.rb | 689 +------- .../models/sandbox/payment_create_params.rb | 525 +----- lib/finch_api/resources/sandbox/payment.rb | 2 +- rbi/finch_api/models/hris/pay_statement.rbi | 1084 ++++++++++++ .../pay_statement_data_sync_in_progress.rbi | 188 ++ .../models/hris/pay_statement_response.rbi | 80 +- .../hris/pay_statement_response_body.rbi | 1538 +---------------- .../models/sandbox/payment_create_params.rbi | 1189 +------------ rbi/finch_api/resources/sandbox/payment.rbi | 5 +- sig/finch_api/models/hris/pay_statement.rbs | 410 +++++ .../pay_statement_data_sync_in_progress.rbs | 78 + .../models/hris/pay_statement_response.rbs | 48 +- .../hris/pay_statement_response_body.rbs | 563 +----- .../models/sandbox/payment_create_params.rbs | 417 +---- sig/finch_api/resources/sandbox/payment.rbs | 2 +- .../resources/hris/pay_statements_test.rb | 2 +- 21 files changed, 2606 insertions(+), 4833 deletions(-) create mode 100644 lib/finch_api/models/hris/pay_statement.rb create mode 100644 lib/finch_api/models/hris/pay_statement_data_sync_in_progress.rb create mode 100644 rbi/finch_api/models/hris/pay_statement.rbi create mode 100644 rbi/finch_api/models/hris/pay_statement_data_sync_in_progress.rbi create mode 100644 sig/finch_api/models/hris/pay_statement.rbs create mode 100644 sig/finch_api/models/hris/pay_statement_data_sync_in_progress.rbs diff --git a/.stats.yml b/.stats.yml index 5ee5e805..8d6b9198 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1a82d3230c420c8562600b0ad45133d79ab68ffd21d524ab26eef11e163dba09.yml openapi_spec_hash: 7bd02ce73505e51c5fd78608fed55c62 -config_hash: 81eb5297df860cf29f8c5bdbf9f89608 +config_hash: bb896000dc7e790e5c9ddda2549fb7ac diff --git a/lib/finch_api.rb b/lib/finch_api.rb index 43b317bf..72ca772f 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -120,6 +120,8 @@ require_relative "finch_api/models/hris/individual_retrieve_many_params" require_relative "finch_api/models/hris/payment" require_relative "finch_api/models/hris/payment_list_params" +require_relative "finch_api/models/hris/pay_statement" +require_relative "finch_api/models/hris/pay_statement_data_sync_in_progress" require_relative "finch_api/models/hris/pay_statement_response" require_relative "finch_api/models/hris/pay_statement_response_body" require_relative "finch_api/models/hris/pay_statement_retrieve_many_params" diff --git a/lib/finch_api/models/hris/pay_statement.rb b/lib/finch_api/models/hris/pay_statement.rb new file mode 100644 index 00000000..148a71d8 --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + class PayStatement < FinchAPI::Internal::Type::BaseModel + # @!attribute earnings + # The array of earnings objects associated with this pay statement + # + # @return [Array, nil] + required :earnings, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Earning, nil?: true] }, + nil?: true + + # @!attribute employee_deductions + # The array of deductions objects associated with this pay statement. + # + # @return [Array, nil] + required :employee_deductions, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction, + nil?: true] + }, + nil?: true + + # @!attribute employer_contributions + # + # @return [Array, nil] + required :employer_contributions, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution, + nil?: true] + }, + nil?: true + + # @!attribute gross_pay + # + # @return [FinchAPI::Models::Money, nil] + required :gross_pay, -> { FinchAPI::Money }, nil?: true + + # @!attribute individual_id + # A stable Finch `id` (UUID v4) for an individual in the company + # + # @return [String] + required :individual_id, String + + # @!attribute net_pay + # + # @return [FinchAPI::Models::Money, nil] + required :net_pay, -> { FinchAPI::Money }, nil?: true + + # @!attribute payment_method + # The payment method. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] + required :payment_method, enum: -> { FinchAPI::HRIS::PayStatement::PaymentMethod }, nil?: true + + # @!attribute taxes + # The array of taxes objects associated with this pay statement. + # + # @return [Array, nil] + required :taxes, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax, nil?: true] }, + nil?: true + + # @!attribute total_hours + # The number of hours worked for this pay period + # + # @return [Float, nil] + required :total_hours, Float, nil?: true + + # @!attribute type + # The type of the payment associated with the pay statement. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] + required :type, enum: -> { FinchAPI::HRIS::PayStatement::Type }, nil?: true + + # @!method initialize(earnings:, employee_deductions:, employer_contributions:, gross_pay:, individual_id:, net_pay:, payment_method:, taxes:, total_hours:, type:) + # @param earnings [Array, nil] The array of earnings objects associated with this pay statement + # + # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. + # + # @param employer_contributions [Array, nil] + # + # @param gross_pay [FinchAPI::Models::Money, nil] + # + # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company + # + # @param net_pay [FinchAPI::Models::Money, nil] + # + # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] The payment method. + # + # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. + # + # @param total_hours [Float, nil] The number of hours worked for this pay period + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] The type of the payment associated with the pay statement. + + 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] + 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 + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # The deduction amount in cents. + # + # @return [Integer, nil] + required :amount, Integer, nil?: true + + # @!attribute currency + # The deduction currency. + # + # @return [String, nil] + required :currency, String, nil?: true + + # @!attribute name + # The deduction name from the pay statement. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute pre_tax + # Boolean indicating if the deduction is pre-tax. + # + # @return [Boolean, nil] + required :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true + + # @!attribute type + # Type of benefit. + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] + required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] + optional :attributes, -> { FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes }, nil?: true + + # @!method initialize(amount:, currency:, name:, pre_tax:, type:, attributes: nil) + # @param amount [Integer, nil] The deduction amount in cents. + # + # @param currency [String, nil] The deduction currency. + # + # @param name [String, nil] The deduction name from the pay statement. + # + # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] + + # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] + required :metadata, -> { FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::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::EmployeeDeduction::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 + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + # @!attribute currency + # The contribution currency. + # + # @return [String, nil] + required :currency, String, nil?: true + + # @!attribute name + # The contribution name from the pay statement. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute type + # Type of benefit. + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] + required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true + + # @!attribute amount + # The contribution amount in cents. + # + # @return [Integer, nil] + optional :amount, Integer, nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] + optional :attributes, + -> { + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes + }, + nil?: true + + # @!method initialize(currency:, name:, type:, amount: nil, attributes: nil) + # @param currency [String, nil] The contribution currency. + # + # @param name [String, nil] The contribution name from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param amount [Integer, nil] The contribution amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] + + # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] + required :metadata, + -> { + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution::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::EmployerContribution::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 + + # The payment method. + # + # @see FinchAPI::Models::HRIS::PayStatement#payment_method + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + CHECK = :check + DIRECT_DEPOSIT = :direct_deposit + OTHER = :other + + # @!method self.values + # @return [Array] + end + + class Tax < FinchAPI::Internal::Type::BaseModel + # @!attribute currency + # The currency code. + # + # @return [String, nil] + required :currency, String, nil?: true + + # @!attribute employer + # `true` if the amount is paid by the employers. + # + # @return [Boolean, nil] + required :employer, FinchAPI::Internal::Type::Boolean, nil?: true + + # @!attribute name + # The exact name of tax from the pay statement. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute type + # The type of taxes. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] + required :type, enum: -> { FinchAPI::HRIS::PayStatement::Tax::Type }, nil?: true + + # @!attribute amount + # The tax amount in cents. + # + # @return [Integer, nil] + optional :amount, Integer, nil?: true + + # @!attribute attributes + # + # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] + optional :attributes, -> { FinchAPI::HRIS::PayStatement::Tax::Attributes }, nil?: true + + # @!method initialize(currency:, employer:, name:, type:, amount: nil, attributes: nil) + # @param currency [String, nil] The currency code. + # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. + # + # @param name [String, nil] The exact name of tax from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] The type of taxes. + # + # @param amount [Integer, nil] The tax amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] + + # The type of taxes. + # + # @see FinchAPI::Models::HRIS::PayStatement::Tax#type + module Type + extend FinchAPI::Internal::Type::Enum + + STATE = :state + FEDERAL = :federal + LOCAL = :local + FICA = :fica + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatement::Tax#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # + # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] + required :metadata, -> { FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata } + + # @!method initialize(metadata:) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] + + # @see FinchAPI::Models::HRIS::PayStatement::Tax::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::Tax::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 + + # The type of the payment associated with the pay statement. + # + # @see FinchAPI::Models::HRIS::PayStatement#type + module Type + extend FinchAPI::Internal::Type::Enum + + OFF_CYCLE_PAYROLL = :off_cycle_payroll + ONE_TIME_PAYMENT = :one_time_payment + REGULAR_PAYROLL = :regular_payroll + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_data_sync_in_progress.rb b/lib/finch_api/models/hris/pay_statement_data_sync_in_progress.rb new file mode 100644 index 00000000..0a65448c --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_data_sync_in_progress.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + class PayStatementDataSyncInProgress < FinchAPI::Internal::Type::BaseModel + # @!attribute code + # + # @return [Float, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::Code] + required :code, enum: -> { FinchAPI::HRIS::PayStatementDataSyncInProgress::Code } + + # @!attribute finch_code + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::FinchCode] + required :finch_code, enum: -> { FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode } + + # @!attribute message + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::Message] + required :message, enum: -> { FinchAPI::HRIS::PayStatementDataSyncInProgress::Message } + + # @!attribute name + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::Name] + required :name, enum: -> { FinchAPI::HRIS::PayStatementDataSyncInProgress::Name } + + # @!method initialize(code:, finch_code:, message:, name:) + # @param code [Float, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::Code] + # @param finch_code [Symbol, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::FinchCode] + # @param message [Symbol, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::Message] + # @param name [Symbol, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::Name] + + # @see FinchAPI::Models::HRIS::PayStatementDataSyncInProgress#code + module Code + extend FinchAPI::Internal::Type::Enum + + CODE_202 = 202 + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementDataSyncInProgress#finch_code + module FinchCode + extend FinchAPI::Internal::Type::Enum + + DATA_SYNC_IN_PROGRESS = :data_sync_in_progress + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementDataSyncInProgress#message + module Message + extend FinchAPI::Internal::Type::Enum + + THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER = + :"The pay statements for this payment are being fetched. Please check back later." + + # @!method self.values + # @return [Array] + end + + # @see FinchAPI::Models::HRIS::PayStatementDataSyncInProgress#name + module Name + extend FinchAPI::Internal::Type::Enum + + ACCEPTED = :accepted + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_response.rb b/lib/finch_api/models/hris/pay_statement_response.rb index 9ca5eef5..2fbab294 100644 --- a/lib/finch_api/models/hris/pay_statement_response.rb +++ b/lib/finch_api/models/hris/pay_statement_response.rb @@ -7,8 +7,8 @@ module HRIS class PayStatementResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0, FinchAPI::Models::HRIS::PayStatementResponseBody::BatchError, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2] - required :body, union: -> { FinchAPI::HRIS::PayStatementResponseBody } + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody, FinchAPI::Models::HRIS::PayStatementResponse::Body::BatchError, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress] + required :body, union: -> { FinchAPI::HRIS::PayStatementResponse::Body } # @!attribute code # @@ -21,9 +21,51 @@ class PayStatementResponse < FinchAPI::Internal::Type::BaseModel required :payment_id, String # @!method initialize(body:, code:, payment_id:) - # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0, FinchAPI::Models::HRIS::PayStatementResponseBody::BatchError, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2] + # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody, FinchAPI::Models::HRIS::PayStatementResponse::Body::BatchError, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress] # @param code [Integer] # @param payment_id [String] + + # @see FinchAPI::Models::HRIS::PayStatementResponse#body + module Body + extend FinchAPI::Internal::Type::Union + + variant -> { FinchAPI::HRIS::PayStatementResponseBody } + + variant -> { FinchAPI::HRIS::PayStatementResponse::Body::BatchError } + + variant -> { FinchAPI::HRIS::PayStatementDataSyncInProgress } + + class BatchError < FinchAPI::Internal::Type::BaseModel + # @!attribute code + # + # @return [Float] + required :code, Float + + # @!attribute message + # + # @return [String] + required :message, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute finch_code + # + # @return [String, nil] + optional :finch_code, String + + # @!method initialize(code:, message:, name:, finch_code: nil) + # @param code [Float] + # @param message [String] + # @param name [String] + # @param finch_code [String] + end + + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::PayStatementResponseBody, FinchAPI::Models::HRIS::PayStatementResponse::Body::BatchError, FinchAPI::Models::HRIS::PayStatementDataSyncInProgress)] + end end end end diff --git a/lib/finch_api/models/hris/pay_statement_response_body.rb b/lib/finch_api/models/hris/pay_statement_response_body.rb index 5734a468..3849d78e 100644 --- a/lib/finch_api/models/hris/pay_statement_response_body.rb +++ b/lib/finch_api/models/hris/pay_statement_response_body.rb @@ -3,679 +3,40 @@ module FinchAPI module Models module HRIS - module PayStatementResponseBody - extend FinchAPI::Internal::Type::Union + class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel + # @!attribute paging + # + # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::Paging] + required :paging, -> { FinchAPI::HRIS::PayStatementResponseBody::Paging } - variant -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember0 } + # @!attribute pay_statements + # + # @return [Array] + required :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement] } - variant -> { FinchAPI::HRIS::PayStatementResponseBody::BatchError } + # @!method initialize(paging:, pay_statements:) + # @param paging [FinchAPI::Models::HRIS::PayStatementResponseBody::Paging] + # @param pay_statements [Array] - variant -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2 } - - class UnionMember0 < FinchAPI::Internal::Type::BaseModel - # @!attribute paging - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::Paging] - required :paging, -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging } - - # @!attribute pay_statements - # - # @return [Array] - required :pay_statements, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] - } - - # @!method initialize(paging:, pay_statements:) - # @param paging [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::Paging] - # @param pay_statements [Array] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0#paging - class Paging < FinchAPI::Internal::Type::BaseModel - # @!attribute offset - # The current start index of the returned list of elements - # - # @return [Integer] - required :offset, Integer - - # @!attribute count - # The total number of elements for the entire query (not just the given page) - # - # @return [Integer, nil] - optional :count, Integer - - # @!method initialize(offset:, count: nil) - # @param offset [Integer] The current start index of the returned list of elements - # - # @param count [Integer] The total number of elements for the entire query (not just the given page) - end - - class PayStatement < FinchAPI::Internal::Type::BaseModel - # @!attribute earnings - # The array of earnings objects associated with this pay statement - # - # @return [Array, nil] - required :earnings, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning, - nil?: true] - }, - nil?: true - - # @!attribute employee_deductions - # The array of deductions objects associated with this pay statement. - # - # @return [Array, nil] - required :employee_deductions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction, - nil?: true] - }, - nil?: true - - # @!attribute employer_contributions - # - # @return [Array, nil] - required :employer_contributions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution, - nil?: true] - }, - nil?: true - - # @!attribute gross_pay - # - # @return [FinchAPI::Models::Money, nil] - required :gross_pay, -> { FinchAPI::Money }, nil?: true - - # @!attribute individual_id - # A stable Finch `id` (UUID v4) for an individual in the company - # - # @return [String] - required :individual_id, String - - # @!attribute net_pay - # - # @return [FinchAPI::Models::Money, nil] - required :net_pay, -> { FinchAPI::Money }, nil?: true - - # @!attribute payment_method - # The payment method. - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod, nil] - required :payment_method, - enum: -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod - }, - nil?: true - - # @!attribute taxes - # The array of taxes objects associated with this pay statement. - # - # @return [Array, nil] - required :taxes, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax, - nil?: true] - }, - nil?: true - - # @!attribute total_hours - # The number of hours worked for this pay period - # - # @return [Float, nil] - required :total_hours, Float, nil?: true - - # @!attribute type - # The type of the payment associated with the pay statement. - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type, nil] - required :type, - enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type }, - nil?: true - - # @!method initialize(earnings:, employee_deductions:, employer_contributions:, gross_pay:, individual_id:, net_pay:, payment_method:, taxes:, total_hours:, type:) - # @param earnings [Array, nil] The array of earnings objects associated with this pay statement - # - # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. - # - # @param employer_contributions [Array, nil] - # - # @param gross_pay [FinchAPI::Models::Money, nil] - # - # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company - # - # @param net_pay [FinchAPI::Models::Money, nil] - # - # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod, nil] The payment method. - # - # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. - # - # @param total_hours [Float, nil] The number of hours worked for this pay period - # - # @param type [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type, nil] The type of the payment associated with the pay statement. - - 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::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type, nil] - required :type, - enum: -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type - }, - nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes, nil] - optional :attributes, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes - }, - nil?: true - - # @!method initialize(amount:, currency:, hours:, name:, type:, attributes: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::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::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type, nil] The type of earning. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes, nil] - - # The type of earning. - # - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::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] - end - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::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::PayStatementResponseBody::UnionMember0::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 - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The deduction amount in cents. - # - # @return [Integer, nil] - required :amount, Integer, nil?: true - - # @!attribute currency - # The deduction currency. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute name - # The deduction name from the pay statement. - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute pre_tax - # Boolean indicating if the deduction is pre-tax. - # - # @return [Boolean, nil] - required :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute type - # Type of benefit. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes, nil] - optional :attributes, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes - }, - nil?: true - - # @!method initialize(amount:, currency:, name:, pre_tax:, type:, attributes: nil) - # @param amount [Integer, nil] The deduction amount in cents. - # - # @param currency [String, nil] The deduction currency. - # - # @param name [String, nil] The deduction name from the pay statement. - # - # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes, nil] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::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::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::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 - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - # @!attribute currency - # The contribution currency. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute name - # The contribution name from the pay statement. - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute type - # Type of benefit. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - - # @!attribute amount - # The contribution amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes, nil] - optional :attributes, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes - }, - nil?: true - - # @!method initialize(currency:, name:, type:, amount: nil, attributes: nil) - # @param currency [String, nil] The contribution currency. - # - # @param name [String, nil] The contribution name from the pay statement. - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # - # @param amount [Integer, nil] The contribution amount in cents. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes, nil] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::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::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::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 - - # The payment method. - # - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement#payment_method - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - CHECK = :check - DIRECT_DEPOSIT = :direct_deposit - OTHER = :other - - # @!method self.values - # @return [Array] - end - - class Tax < FinchAPI::Internal::Type::BaseModel - # @!attribute currency - # The currency code. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute employer - # `true` if the amount is paid by the employers. - # - # @return [Boolean, nil] - required :employer, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute name - # The exact name of tax from the pay statement. - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute type - # The type of taxes. - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type, nil] - required :type, - enum: -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type - }, - nil?: true - - # @!attribute amount - # The tax amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes, nil] - optional :attributes, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes - }, - nil?: true - - # @!method initialize(currency:, employer:, name:, type:, amount: nil, attributes: nil) - # @param currency [String, nil] The currency code. - # - # @param employer [Boolean, nil] `true` if the amount is paid by the employers. - # - # @param name [String, nil] The exact name of tax from the pay statement. - # - # @param type [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type, nil] The type of taxes. - # - # @param amount [Integer, nil] The tax amount in cents. - # - # @param attributes [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes, nil] - - # The type of taxes. - # - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax#type - module Type - extend FinchAPI::Internal::Type::Enum - - STATE = :state - FEDERAL = :federal - LOCAL = :local - FICA = :fica - - # @!method self.values - # @return [Array] - end - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::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::PayStatementResponseBody::UnionMember0::PayStatement::Tax::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 - - # The type of the payment associated with the pay statement. - # - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement#type - module Type - extend FinchAPI::Internal::Type::Enum - - OFF_CYCLE_PAYROLL = :off_cycle_payroll - ONE_TIME_PAYMENT = :one_time_payment - REGULAR_PAYROLL = :regular_payroll - - # @!method self.values - # @return [Array] - end - end - end - - class BatchError < FinchAPI::Internal::Type::BaseModel - # @!attribute code + # @see FinchAPI::Models::HRIS::PayStatementResponseBody#paging + class Paging < FinchAPI::Internal::Type::BaseModel + # @!attribute offset + # The current start index of the returned list of elements # - # @return [Float] - required :code, Float + # @return [Integer] + required :offset, Integer - # @!attribute message + # @!attribute count + # The total number of elements for the entire query (not just the given page) # - # @return [String] - required :message, String + # @return [Integer, nil] + optional :count, Integer - # @!attribute name + # @!method initialize(offset:, count: nil) + # @param offset [Integer] The current start index of the returned list of elements # - # @return [String] - required :name, String - - # @!attribute finch_code - # - # @return [String, nil] - optional :finch_code, String - - # @!method initialize(code:, message:, name:, finch_code: nil) - # @param code [Float] - # @param message [String] - # @param name [String] - # @param finch_code [String] + # @param count [Integer] The total number of elements for the entire query (not just the given page) end - - class UnionMember2 < FinchAPI::Internal::Type::BaseModel - # @!attribute code - # - # @return [Float, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Code] - required :code, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code } - - # @!attribute finch_code - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::FinchCode] - required :finch_code, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode } - - # @!attribute message - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Message] - required :message, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message } - - # @!attribute name - # - # @return [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Name] - required :name, enum: -> { FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name } - - # @!method initialize(code:, finch_code:, message:, name:) - # @param code [Float, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Code] - # @param finch_code [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::FinchCode] - # @param message [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Message] - # @param name [Symbol, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::Name] - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#code - module Code - extend FinchAPI::Internal::Type::Enum - - CODE_202 = 202 - - # @!method self.values - # @return [Array] - end - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#finch_code - module FinchCode - extend FinchAPI::Internal::Type::Enum - - DATA_SYNC_IN_PROGRESS = :data_sync_in_progress - - # @!method self.values - # @return [Array] - end - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#message - module Message - extend FinchAPI::Internal::Type::Enum - - THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER = - :"The pay statements for this payment are being fetched. Please check back later." - - # @!method self.values - # @return [Array] - end - - # @see FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2#name - module Name - extend FinchAPI::Internal::Type::Enum - - ACCEPTED = :accepted - - # @!method self.values - # @return [Array] - end - end - - # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0, FinchAPI::Models::HRIS::PayStatementResponseBody::BatchError, FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2)] end end end diff --git a/lib/finch_api/models/sandbox/payment_create_params.rb b/lib/finch_api/models/sandbox/payment_create_params.rb index ae79dd78..96b7b351 100644 --- a/lib/finch_api/models/sandbox/payment_create_params.rb +++ b/lib/finch_api/models/sandbox/payment_create_params.rb @@ -15,11 +15,8 @@ class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute pay_statements # - # @return [Array, nil] - optional :pay_statements, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] - } + # @return [Array, nil] + optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement] } # @!attribute start_date # @@ -28,525 +25,9 @@ class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel # @!method initialize(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) # @param end_date [String] - # @param pay_statements [Array] + # @param pay_statements [Array] # @param start_date [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - - class PayStatement < FinchAPI::Internal::Type::BaseModel - # @!attribute earnings - # The array of earnings objects associated with this pay statement - # - # @return [Array, nil] - required :earnings, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning, - nil?: true] - }, - nil?: true - - # @!attribute employee_deductions - # The array of deductions objects associated with this pay statement. - # - # @return [Array, nil] - required :employee_deductions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction, - nil?: true] - }, - nil?: true - - # @!attribute employer_contributions - # - # @return [Array, nil] - required :employer_contributions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution, - nil?: true] - }, - nil?: true - - # @!attribute gross_pay - # - # @return [FinchAPI::Models::Money, nil] - required :gross_pay, -> { FinchAPI::Money }, nil?: true - - # @!attribute individual_id - # A stable Finch `id` (UUID v4) for an individual in the company - # - # @return [String] - required :individual_id, String - - # @!attribute net_pay - # - # @return [FinchAPI::Models::Money, nil] - required :net_pay, -> { FinchAPI::Money }, nil?: true - - # @!attribute payment_method - # The payment method. - # - # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] - required :payment_method, - enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod }, - nil?: true - - # @!attribute taxes - # The array of taxes objects associated with this pay statement. - # - # @return [Array, nil] - required :taxes, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax, - nil?: true] - }, - nil?: true - - # @!attribute total_hours - # The number of hours worked for this pay period - # - # @return [Float, nil] - required :total_hours, Float, nil?: true - - # @!attribute type - # The type of the payment associated with the pay statement. - # - # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] - required :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type }, nil?: true - - # @!method initialize(earnings:, employee_deductions:, employer_contributions:, gross_pay:, individual_id:, net_pay:, payment_method:, taxes:, total_hours:, type:) - # @param earnings [Array, nil] The array of earnings objects associated with this pay statement - # - # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. - # - # @param employer_contributions [Array, nil] - # - # @param gross_pay [FinchAPI::Models::Money, nil] - # - # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company - # - # @param net_pay [FinchAPI::Models::Money, nil] - # - # @param payment_method [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] The payment method. - # - # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. - # - # @param total_hours [Float, nil] The number of hours worked for this pay period - # - # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] The type of the payment associated with the pay statement. - - 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::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] - required :type, - enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type }, - nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] - optional :attributes, - -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes }, - nil?: true - - # @!method initialize(amount:, currency:, hours:, name:, type:, attributes: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Sandbox::PaymentCreateParams::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::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] The type of earning. - # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] - - # The type of earning. - # - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::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] - end - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::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::Sandbox::PaymentCreateParams::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 - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # The deduction amount in cents. - # - # @return [Integer, nil] - required :amount, Integer, nil?: true - - # @!attribute currency - # The deduction currency. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute name - # The deduction name from the pay statement. - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute pre_tax - # Boolean indicating if the deduction is pre-tax. - # - # @return [Boolean, nil] - required :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute type - # Type of benefit. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] - optional :attributes, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes - }, - nil?: true - - # @!method initialize(amount:, currency:, name:, pre_tax:, type:, attributes: nil) - # @param amount [Integer, nil] The deduction amount in cents. - # - # @param currency [String, nil] The deduction currency. - # - # @param name [String, nil] The deduction name from the pay statement. - # - # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::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::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::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 - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - # @!attribute currency - # The contribution currency. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute name - # The contribution name from the pay statement. - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute type - # Type of benefit. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - required :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true - - # @!attribute amount - # The contribution amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] - optional :attributes, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes - }, - nil?: true - - # @!method initialize(currency:, name:, type:, amount: nil, attributes: nil) - # @param currency [String, nil] The contribution currency. - # - # @param name [String, nil] The contribution name from the pay statement. - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. - # - # @param amount [Integer, nil] The contribution amount in cents. - # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::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::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::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 - - # The payment method. - # - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement#payment_method - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - CHECK = :check - DIRECT_DEPOSIT = :direct_deposit - OTHER = :other - - # @!method self.values - # @return [Array] - end - - class Tax < FinchAPI::Internal::Type::BaseModel - # @!attribute currency - # The currency code. - # - # @return [String, nil] - required :currency, String, nil?: true - - # @!attribute employer - # `true` if the amount is paid by the employers. - # - # @return [Boolean, nil] - required :employer, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute name - # The exact name of tax from the pay statement. - # - # @return [String, nil] - required :name, String, nil?: true - - # @!attribute type - # The type of taxes. - # - # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] - required :type, - enum: -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type - }, - nil?: true - - # @!attribute amount - # The tax amount in cents. - # - # @return [Integer, nil] - optional :amount, Integer, nil?: true - - # @!attribute attributes - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] - optional :attributes, - -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes }, - nil?: true - - # @!method initialize(currency:, employer:, name:, type:, amount: nil, attributes: nil) - # @param currency [String, nil] The currency code. - # - # @param employer [Boolean, nil] `true` if the amount is paid by the employers. - # - # @param name [String, nil] The exact name of tax from the pay statement. - # - # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] The type of taxes. - # - # @param amount [Integer, nil] The tax amount in cents. - # - # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] - - # The type of taxes. - # - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#type - module Type - extend FinchAPI::Internal::Type::Enum - - STATE = :state - FEDERAL = :federal - LOCAL = :local - FICA = :fica - - # @!method self.values - # @return [Array] - end - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # - # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - } - - # @!method initialize(metadata:) - # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] - - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::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::Sandbox::PaymentCreateParams::PayStatement::Tax::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 - - # The type of the payment associated with the pay statement. - # - # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement#type - module Type - extend FinchAPI::Internal::Type::Enum - - OFF_CYCLE_PAYROLL = :off_cycle_payroll - ONE_TIME_PAYMENT = :one_time_payment - REGULAR_PAYROLL = :regular_payroll - - # @!method self.values - # @return [Array] - end - end end end end diff --git a/lib/finch_api/resources/sandbox/payment.rb b/lib/finch_api/resources/sandbox/payment.rb index 7c3fe7ba..aa6ea02c 100644 --- a/lib/finch_api/resources/sandbox/payment.rb +++ b/lib/finch_api/resources/sandbox/payment.rb @@ -9,7 +9,7 @@ class Payment # @overload create(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) # # @param end_date [String] - # @param pay_statements [Array] + # @param pay_statements [Array] # @param start_date [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/finch_api/models/hris/pay_statement.rbi b/rbi/finch_api/models/hris/pay_statement.rbi new file mode 100644 index 00000000..d42b6443 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement.rbi @@ -0,0 +1,1084 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class PayStatement < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(FinchAPI::HRIS::PayStatement, FinchAPI::Internal::AnyHash) + end + + # The array of earnings objects associated with this pay statement + sig do + returns( + T.nilable( + T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Earning)] + ) + ) + end + attr_accessor :earnings + + # The array of deductions objects associated with this pay statement. + sig do + returns( + T.nilable( + T::Array[ + T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction) + ] + ) + ) + end + attr_accessor :employee_deductions + + sig do + returns( + T.nilable( + T::Array[ + T.nilable(FinchAPI::HRIS::PayStatement::EmployerContribution) + ] + ) + ) + end + attr_accessor :employer_contributions + + sig { returns(T.nilable(FinchAPI::Money)) } + attr_reader :gross_pay + + sig { params(gross_pay: T.nilable(FinchAPI::Money::OrHash)).void } + attr_writer :gross_pay + + # A stable Finch `id` (UUID v4) for an individual in the company + sig { returns(String) } + attr_accessor :individual_id + + sig { returns(T.nilable(FinchAPI::Money)) } + attr_reader :net_pay + + sig { params(net_pay: T.nilable(FinchAPI::Money::OrHash)).void } + attr_writer :net_pay + + # The payment method. + sig do + returns( + T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol) + ) + end + attr_accessor :payment_method + + # The array of taxes objects associated with this pay statement. + sig do + returns( + T.nilable(T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)]) + ) + end + attr_accessor :taxes + + # The number of hours worked for this pay period + sig { returns(T.nilable(Float)) } + attr_accessor :total_hours + + # The type of the payment associated with the pay statement. + sig { returns(T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol)) } + attr_accessor :type + + sig do + params( + earnings: + T.nilable( + T::Array[ + T.nilable(FinchAPI::HRIS::PayStatement::Earning::OrHash) + ] + ), + employee_deductions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::OrHash + ) + ] + ), + employer_contributions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatement::EmployerContribution::OrHash + ) + ] + ), + gross_pay: T.nilable(FinchAPI::Money::OrHash), + individual_id: String, + net_pay: T.nilable(FinchAPI::Money::OrHash), + payment_method: + T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol), + taxes: + T.nilable( + T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax::OrHash)] + ), + total_hours: T.nilable(Float), + type: T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol) + ).returns(T.attached_class) + end + def self.new( + # The array of earnings objects associated with this pay statement + earnings:, + # The array of deductions objects associated with this pay statement. + employee_deductions:, + employer_contributions:, + gross_pay:, + # A stable Finch `id` (UUID v4) for an individual in the company + individual_id:, + net_pay:, + # The payment method. + payment_method:, + # The array of taxes objects associated with this pay statement. + taxes:, + # The number of hours worked for this pay period + total_hours:, + # The type of the payment associated with the pay statement. + type: + ) + end + + sig do + override.returns( + { + earnings: + T.nilable( + T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Earning)] + ), + employee_deductions: + T.nilable( + T::Array[ + T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction) + ] + ), + employer_contributions: + T.nilable( + T::Array[ + T.nilable( + FinchAPI::HRIS::PayStatement::EmployerContribution + ) + ] + ), + gross_pay: T.nilable(FinchAPI::Money), + individual_id: String, + net_pay: T.nilable(FinchAPI::Money), + payment_method: + T.nilable( + FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol + ), + taxes: + T.nilable( + T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)] + ), + total_hours: T.nilable(Float), + type: T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol) + } + ) + end + def to_hash + end + + class Earning < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::Earning, + FinchAPI::Internal::AnyHash + ) + end + + # The earnings amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + # The earnings currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # 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). + sig { returns(T.nilable(Float)) } + attr_accessor :hours + + # The exact name of the deduction from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The type of earning. + sig do + returns( + T.nilable(FinchAPI::HRIS::PayStatement::Earning::Type::OrSymbol) + ) + end + attr_accessor :type + + sig do + returns( + T.nilable(FinchAPI::HRIS::PayStatement::Earning::Attributes) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::Earning::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + amount: T.nilable(Integer), + currency: T.nilable(String), + hours: T.nilable(Float), + name: T.nilable(String), + type: + T.nilable( + FinchAPI::HRIS::PayStatement::Earning::Type::OrSymbol + ), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::Earning::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The earnings amount in cents. + amount:, + # The earnings currency code. + currency:, + # 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). + hours:, + # The exact name of the deduction from the pay statement. + name:, + # The type of earning. + type:, + attributes: nil + ) + end + + sig do + override.returns( + { + amount: T.nilable(Integer), + currency: T.nilable(String), + hours: T.nilable(Float), + name: T.nilable(String), + type: + T.nilable( + FinchAPI::HRIS::PayStatement::Earning::Type::OrSymbol + ), + attributes: + T.nilable(FinchAPI::HRIS::PayStatement::Earning::Attributes) + } + ) + end + def to_hash + end + + # The type of earning. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, FinchAPI::HRIS::PayStatement::Earning::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SALARY = + T.let( + :salary, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + WAGE = + T.let( + :wage, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + REIMBURSEMENT = + T.let( + :reimbursement, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + OVERTIME = + T.let( + :overtime, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + SEVERANCE = + T.let( + :severance, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + DOUBLE_OVERTIME = + T.let( + :double_overtime, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + PTO = + T.let( + :pto, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + SICK = + T.let( + :sick, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + BONUS = + T.let( + :bonus, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + COMMISSION = + T.let( + :commission, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + TIPS = + T.let( + :tips, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + TYPE_1099 = + T.let( + :"1099", + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + OTHER = + T.let( + :other, + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::Earning::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::EmployeeDeduction, + FinchAPI::Internal::AnyHash + ) + end + + # The deduction amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + # The deduction currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # The deduction name from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Boolean indicating if the deduction is pre-tax. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :pre_tax + + # Type of benefit. + sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } + attr_accessor :type + + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + amount: T.nilable(Integer), + currency: T.nilable(String), + name: T.nilable(String), + pre_tax: T.nilable(T::Boolean), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The deduction amount in cents. + amount:, + # The deduction currency. + currency:, + # The deduction name from the pay statement. + name:, + # Boolean indicating if the deduction is pre-tax. + pre_tax:, + # Type of benefit. + type:, + attributes: nil + ) + end + + sig do + override.returns( + { + amount: T.nilable(Integer), + currency: T.nilable(String), + name: T.nilable(String), + pre_tax: T.nilable(T::Boolean), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes + ) + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::EmployerContribution, + FinchAPI::Internal::AnyHash + ) + end + + # The contribution currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # The contribution name from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Type of benefit. + sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } + attr_accessor :type + + # The contribution amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::OrHash + ) + ).void + end + attr_writer :attributes + + sig do + params( + currency: T.nilable(String), + name: T.nilable(String), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The contribution currency. + currency:, + # The contribution name from the pay statement. + name:, + # Type of benefit. + type:, + # The contribution amount in cents. + amount: nil, + attributes: nil + ) + end + + sig do + override.returns( + { + currency: T.nilable(String), + name: T.nilable(String), + type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + amount: T.nilable(Integer), + attributes: + T.nilable( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes + ) + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + ) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + # The payment method. + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, FinchAPI::HRIS::PayStatement::PaymentMethod) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CHECK = + T.let( + :check, + FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol + ) + DIRECT_DEPOSIT = + T.let( + :direct_deposit, + FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol + ) + OTHER = + T.let( + :other, + FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Tax < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::Tax, + FinchAPI::Internal::AnyHash + ) + end + + # The currency code. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # `true` if the amount is paid by the employers. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :employer + + # The exact name of tax from the pay statement. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The type of taxes. + sig do + returns( + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::OrSymbol) + ) + end + attr_accessor :type + + # The tax amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + + sig do + returns(T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes)) + end + attr_reader :attributes + + sig do + params( + attributes: + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes::OrHash) + ).void + end + attr_writer :attributes + + sig do + params( + currency: T.nilable(String), + employer: T.nilable(T::Boolean), + name: T.nilable(String), + type: + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::OrSymbol), + amount: T.nilable(Integer), + attributes: + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes::OrHash) + ).returns(T.attached_class) + end + def self.new( + # The currency code. + currency:, + # `true` if the amount is paid by the employers. + employer:, + # The exact name of tax from the pay statement. + name:, + # The type of taxes. + type:, + # The tax amount in cents. + amount: nil, + attributes: nil + ) + end + + sig do + override.returns( + { + currency: T.nilable(String), + employer: T.nilable(T::Boolean), + name: T.nilable(String), + type: + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::OrSymbol), + amount: T.nilable(Integer), + attributes: + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes) + } + ) + end + def to_hash + end + + # The type of taxes. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, FinchAPI::HRIS::PayStatement::Tax::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STATE = + T.let( + :state, + FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol + ) + FEDERAL = + T.let( + :federal, + FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol + ) + LOCAL = + T.let( + :local, + FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol + ) + FICA = + T.let( + :fica, + FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol] + ) + end + def self.values + end + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::Tax::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns(FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata) + end + attr_reader :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata::OrHash + ).void + end + attr_writer :metadata + + sig do + params( + metadata: + FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata::OrHash + ).returns(T.attached_class) + end + def self.new(metadata:) + end + + sig do + override.returns( + { + metadata: + FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata + } + ) + end + def to_hash + end + + class Metadata < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata, + FinchAPI::Internal::AnyHash + ) + end + + # 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.). + sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } + attr_accessor :metadata + + sig do + params( + metadata: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # 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.). + metadata: + ) + end + + sig do + override.returns( + { metadata: T::Hash[Symbol, T.nilable(T.anything)] } + ) + end + def to_hash + end + end + end + end + + # The type of the payment associated with the pay statement. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::HRIS::PayStatement::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF_CYCLE_PAYROLL = + T.let( + :off_cycle_payroll, + FinchAPI::HRIS::PayStatement::Type::TaggedSymbol + ) + ONE_TIME_PAYMENT = + T.let( + :one_time_payment, + FinchAPI::HRIS::PayStatement::Type::TaggedSymbol + ) + REGULAR_PAYROLL = + T.let( + :regular_payroll, + FinchAPI::HRIS::PayStatement::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[FinchAPI::HRIS::PayStatement::Type::TaggedSymbol] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_data_sync_in_progress.rbi b/rbi/finch_api/models/hris/pay_statement_data_sync_in_progress.rbi new file mode 100644 index 00000000..5b2a84f9 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_data_sync_in_progress.rbi @@ -0,0 +1,188 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class PayStatementDataSyncInProgress < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementDataSyncInProgress, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::HRIS::PayStatementDataSyncInProgress::Code::TaggedFloat + ) + end + attr_accessor :code + + sig do + returns( + FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode::TaggedSymbol + ) + end + attr_accessor :finch_code + + sig do + returns( + FinchAPI::HRIS::PayStatementDataSyncInProgress::Message::TaggedSymbol + ) + end + attr_accessor :message + + sig do + returns( + FinchAPI::HRIS::PayStatementDataSyncInProgress::Name::TaggedSymbol + ) + end + attr_accessor :name + + sig do + params( + code: FinchAPI::HRIS::PayStatementDataSyncInProgress::Code::OrFloat, + finch_code: + FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode::OrSymbol, + message: + FinchAPI::HRIS::PayStatementDataSyncInProgress::Message::OrSymbol, + name: FinchAPI::HRIS::PayStatementDataSyncInProgress::Name::OrSymbol + ).returns(T.attached_class) + end + def self.new(code:, finch_code:, message:, name:) + end + + sig do + override.returns( + { + code: + FinchAPI::HRIS::PayStatementDataSyncInProgress::Code::TaggedFloat, + finch_code: + FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode::TaggedSymbol, + message: + FinchAPI::HRIS::PayStatementDataSyncInProgress::Message::TaggedSymbol, + name: + FinchAPI::HRIS::PayStatementDataSyncInProgress::Name::TaggedSymbol + } + ) + end + def to_hash + end + + module Code + extend FinchAPI::Internal::Type::Enum + + TaggedFloat = + T.type_alias do + T.all(Float, FinchAPI::HRIS::PayStatementDataSyncInProgress::Code) + end + OrFloat = T.type_alias { Float } + + CODE_202 = + T.let( + 202, + FinchAPI::HRIS::PayStatementDataSyncInProgress::Code::TaggedFloat + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementDataSyncInProgress::Code::TaggedFloat + ] + ) + end + def self.values + end + end + + module FinchCode + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DATA_SYNC_IN_PROGRESS = + T.let( + :data_sync_in_progress, + FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementDataSyncInProgress::FinchCode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Message + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementDataSyncInProgress::Message + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER = + T.let( + :"The pay statements for this payment are being fetched. Please check back later.", + FinchAPI::HRIS::PayStatementDataSyncInProgress::Message::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementDataSyncInProgress::Message::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Name + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementDataSyncInProgress::Name + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACCEPTED = + T.let( + :accepted, + FinchAPI::HRIS::PayStatementDataSyncInProgress::Name::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementDataSyncInProgress::Name::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_response.rbi b/rbi/finch_api/models/hris/pay_statement_response.rbi index 61614e66..7a3dd48c 100644 --- a/rbi/finch_api/models/hris/pay_statement_response.rbi +++ b/rbi/finch_api/models/hris/pay_statement_response.rbi @@ -12,7 +12,7 @@ module FinchAPI ) end - sig { returns(FinchAPI::HRIS::PayStatementResponseBody::Variants) } + sig { returns(FinchAPI::HRIS::PayStatementResponse::Body::Variants) } attr_accessor :body sig { returns(Integer) } @@ -25,9 +25,9 @@ module FinchAPI params( body: T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::OrHash, - FinchAPI::HRIS::PayStatementResponseBody::BatchError::OrHash, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::OrHash + FinchAPI::HRIS::PayStatementResponseBody::OrHash, + FinchAPI::HRIS::PayStatementResponse::Body::BatchError::OrHash, + FinchAPI::HRIS::PayStatementDataSyncInProgress::OrHash ), code: Integer, payment_id: String @@ -39,7 +39,7 @@ module FinchAPI sig do override.returns( { - body: FinchAPI::HRIS::PayStatementResponseBody::Variants, + body: FinchAPI::HRIS::PayStatementResponse::Body::Variants, code: Integer, payment_id: String } @@ -47,6 +47,76 @@ module FinchAPI end def to_hash end + + module Body + extend FinchAPI::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponseBody, + FinchAPI::HRIS::PayStatementResponse::Body::BatchError, + FinchAPI::HRIS::PayStatementDataSyncInProgress + ) + end + + class BatchError < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementResponse::Body::BatchError, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(Float) } + attr_accessor :code + + sig { returns(String) } + attr_accessor :message + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(String)) } + attr_reader :finch_code + + sig { params(finch_code: String).void } + attr_writer :finch_code + + sig do + params( + code: Float, + message: String, + name: String, + finch_code: String + ).returns(T.attached_class) + end + def self.new(code:, message:, name:, finch_code: nil) + end + + sig do + override.returns( + { + code: Float, + message: String, + name: String, + finch_code: String + } + ) + end + def to_hash + end + end + + sig do + override.returns( + T::Array[FinchAPI::HRIS::PayStatementResponse::Body::Variants] + ) + end + def self.variants + end + end end end end diff --git a/rbi/finch_api/models/hris/pay_statement_response_body.rbi b/rbi/finch_api/models/hris/pay_statement_response_body.rbi index 27ea5892..c786586d 100644 --- a/rbi/finch_api/models/hris/pay_statement_response_body.rbi +++ b/rbi/finch_api/models/hris/pay_statement_response_body.rbi @@ -3,1524 +3,82 @@ module FinchAPI module Models module HRIS - module PayStatementResponseBody - extend FinchAPI::Internal::Type::Union - - Variants = + class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0, - FinchAPI::HRIS::PayStatementResponseBody::BatchError, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2 - ) - end - - class UnionMember0 < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging - ) - end - attr_reader :paging - - sig do - params( - paging: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging::OrHash - ).void - end - attr_writer :paging - - sig do - returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement - ] - ) - end - attr_accessor :pay_statements - - sig do - params( - paging: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging::OrHash, - pay_statements: - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::OrHash - ] - ).returns(T.attached_class) - end - def self.new(paging:, pay_statements:) - end - - sig do - override.returns( - { - paging: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, - pay_statements: - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement - ] - } - ) - end - def to_hash - end - - class Paging < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, - FinchAPI::Internal::AnyHash - ) - end - - # The current start index of the returned list of elements - sig { returns(Integer) } - attr_accessor :offset - - # The total number of elements for the entire query (not just the given page) - sig { returns(T.nilable(Integer)) } - attr_reader :count - - sig { params(count: Integer).void } - attr_writer :count - - sig do - params(offset: Integer, count: Integer).returns(T.attached_class) - end - def self.new( - # The current start index of the returned list of elements - offset:, - # The total number of elements for the entire query (not just the given page) - count: nil + FinchAPI::HRIS::PayStatementResponseBody, + FinchAPI::Internal::AnyHash ) - end - - sig { override.returns({ offset: Integer, count: Integer }) } - def to_hash - end end - class PayStatement < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement, - FinchAPI::Internal::AnyHash - ) - end - - # The array of earnings objects associated with this pay statement - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning - ) - ] - ) - ) - end - attr_accessor :earnings - - # The array of deductions objects associated with this pay statement. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction - ) - ] - ) - ) - end - attr_accessor :employee_deductions - - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution - ) - ] - ) - ) - end - attr_accessor :employer_contributions - - sig { returns(T.nilable(FinchAPI::Money)) } - attr_reader :gross_pay - - sig { params(gross_pay: T.nilable(FinchAPI::Money::OrHash)).void } - attr_writer :gross_pay - - # A stable Finch `id` (UUID v4) for an individual in the company - sig { returns(String) } - attr_accessor :individual_id - - sig { returns(T.nilable(FinchAPI::Money)) } - attr_reader :net_pay - - sig { params(net_pay: T.nilable(FinchAPI::Money::OrHash)).void } - attr_writer :net_pay - - # The payment method. - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol - ) - ) - end - attr_accessor :payment_method - - # The array of taxes objects associated with this pay statement. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax - ) - ] - ) - ) - end - attr_accessor :taxes - - # The number of hours worked for this pay period - sig { returns(T.nilable(Float)) } - attr_accessor :total_hours - - # The type of the payment associated with the pay statement. - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol - ) - ) - end - attr_accessor :type - - sig do - params( - earnings: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::OrHash - ) - ] - ), - employee_deductions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::OrHash - ) - ] - ), - employer_contributions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::OrHash - ) - ] - ), - gross_pay: T.nilable(FinchAPI::Money::OrHash), - individual_id: String, - net_pay: T.nilable(FinchAPI::Money::OrHash), - payment_method: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::OrSymbol - ), - taxes: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::OrHash - ) - ] - ), - total_hours: T.nilable(Float), - type: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::OrSymbol - ) - ).returns(T.attached_class) - end - def self.new( - # The array of earnings objects associated with this pay statement - earnings:, - # The array of deductions objects associated with this pay statement. - employee_deductions:, - employer_contributions:, - gross_pay:, - # A stable Finch `id` (UUID v4) for an individual in the company - individual_id:, - net_pay:, - # The payment method. - payment_method:, - # The array of taxes objects associated with this pay statement. - taxes:, - # The number of hours worked for this pay period - total_hours:, - # The type of the payment associated with the pay statement. - type: - ) - end - - sig do - override.returns( - { - earnings: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning - ) - ] - ), - employee_deductions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction - ) - ] - ), - employer_contributions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution - ) - ] - ), - gross_pay: T.nilable(FinchAPI::Money), - individual_id: String, - net_pay: T.nilable(FinchAPI::Money), - payment_method: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol - ), - taxes: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax - ) - ] - ), - total_hours: T.nilable(Float), - type: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol - ) - } - ) - end - def to_hash - end - - class Earning < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning, - FinchAPI::Internal::AnyHash - ) - end - - # The earnings amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - # The earnings currency code. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # 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). - sig { returns(T.nilable(Float)) } - attr_accessor :hours - - # The exact name of the deduction from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # The type of earning. - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - ) - end - attr_accessor :type - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - amount: T.nilable(Integer), - currency: T.nilable(String), - hours: T.nilable(Float), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::OrSymbol - ), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The earnings amount in cents. - amount:, - # The earnings currency code. - currency:, - # 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). - hours:, - # The exact name of the deduction from the pay statement. - name:, - # The type of earning. - type:, - attributes: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - currency: T.nilable(String), - hours: T.nilable(Float), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes - ) - } - ) - end - def to_hash - end - - # The type of earning. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - SALARY = - T.let( - :salary, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - WAGE = - T.let( - :wage, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - REIMBURSEMENT = - T.let( - :reimbursement, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - OVERTIME = - T.let( - :overtime, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - SEVERANCE = - T.let( - :severance, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - DOUBLE_OVERTIME = - T.let( - :double_overtime, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - PTO = - T.let( - :pto, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - SICK = - T.let( - :sick, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - BONUS = - T.let( - :bonus, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - COMMISSION = - T.let( - :commission, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - TIPS = - T.let( - :tips, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - TYPE_1099 = - T.let( - :"1099", - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - OTHER = - T.let( - :other, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction, - FinchAPI::Internal::AnyHash - ) - end - - # The deduction amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - # The deduction currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The deduction name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Boolean indicating if the deduction is pre-tax. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :pre_tax - - # Type of benefit. - sig do - returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) - end - attr_accessor :type - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - amount: T.nilable(Integer), - currency: T.nilable(String), - name: T.nilable(String), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The deduction amount in cents. - amount:, - # The deduction currency. - currency:, - # The deduction name from the pay statement. - name:, - # Boolean indicating if the deduction is pre-tax. - pre_tax:, - # Type of benefit. - type:, - attributes: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - currency: T.nilable(String), - name: T.nilable(String), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes - ) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution, - FinchAPI::Internal::AnyHash - ) - end - - # The contribution currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The contribution name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Type of benefit. - sig do - returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) - end - attr_accessor :type - - # The contribution amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The contribution currency. - currency:, - # The contribution name from the pay statement. - name:, - # Type of benefit. - type:, - # The contribution amount in cents. - amount: nil, - attributes: nil - ) - end - - sig do - override.returns( - { - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes - ) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - ) - end - attr_reader :metadata + sig { returns(FinchAPI::HRIS::PayStatementResponseBody::Paging) } + attr_reader :paging - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - # The payment method. - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CHECK = - T.let( - :check, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol - ) - DIRECT_DEPOSIT = - T.let( - :direct_deposit, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol - ) - OTHER = - T.let( - :other, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::PaymentMethod::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Tax < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax, - FinchAPI::Internal::AnyHash - ) - end - - # The currency code. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # `true` if the amount is paid by the employers. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :employer - - # The exact name of tax from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # The type of taxes. - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ) - ) - end - attr_accessor :type - - # The tax amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - currency: T.nilable(String), - employer: T.nilable(T::Boolean), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::OrSymbol - ), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The currency code. - currency:, - # `true` if the amount is paid by the employers. - employer:, - # The exact name of tax from the pay statement. - name:, - # The type of taxes. - type:, - # The tax amount in cents. - amount: nil, - attributes: nil - ) - end - - sig do - override.returns( - { - currency: T.nilable(String), - employer: T.nilable(T::Boolean), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes - ) - } - ) - end - def to_hash - end - - # The type of taxes. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - STATE = - T.let( - :state, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ) - FEDERAL = - T.let( - :federal, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ) - LOCAL = - T.let( - :local, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ) - FICA = - T.let( - :fica, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - # The type of the payment associated with the pay statement. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - OFF_CYCLE_PAYROLL = - T.let( - :off_cycle_payroll, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol - ) - ONE_TIME_PAYMENT = - T.let( - :one_time_payment, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol - ) - REGULAR_PAYROLL = - T.let( - :regular_payroll, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end + sig do + params( + paging: FinchAPI::HRIS::PayStatementResponseBody::Paging::OrHash + ).void end + attr_writer :paging - class BatchError < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::PayStatementResponseBody::BatchError, - FinchAPI::Internal::AnyHash - ) - end + sig { returns(T::Array[FinchAPI::HRIS::PayStatement]) } + attr_accessor :pay_statements - sig { returns(Float) } - attr_accessor :code - - sig { returns(String) } - attr_accessor :message - - sig { returns(String) } - attr_accessor :name - - sig { returns(T.nilable(String)) } - attr_reader :finch_code - - sig { params(finch_code: String).void } - attr_writer :finch_code - - sig do - params( - code: Float, - message: String, - name: String, - finch_code: String - ).returns(T.attached_class) - end - def self.new(code:, message:, name:, finch_code: nil) - end + sig do + params( + paging: FinchAPI::HRIS::PayStatementResponseBody::Paging::OrHash, + pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash] + ).returns(T.attached_class) + end + def self.new(paging:, pay_statements:) + end - sig do - override.returns( - { code: Float, message: String, name: String, finch_code: String } - ) - end - def to_hash - end + sig do + override.returns( + { + paging: FinchAPI::HRIS::PayStatementResponseBody::Paging, + pay_statements: T::Array[FinchAPI::HRIS::PayStatement] + } + ) + end + def to_hash end - class UnionMember2 < FinchAPI::Internal::Type::BaseModel + class Paging < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2, + FinchAPI::HRIS::PayStatementResponseBody::Paging, FinchAPI::Internal::AnyHash ) end - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat - ) - end - attr_accessor :code + # The current start index of the returned list of elements + sig { returns(Integer) } + attr_accessor :offset - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol - ) - end - attr_accessor :finch_code - - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol - ) - end - attr_accessor :message + # The total number of elements for the entire query (not just the given page) + sig { returns(T.nilable(Integer)) } + attr_reader :count - sig do - returns( - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol - ) - end - attr_accessor :name + sig { params(count: Integer).void } + attr_writer :count sig do - params( - code: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::OrFloat, - finch_code: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::OrSymbol, - message: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::OrSymbol, - name: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::OrSymbol - ).returns(T.attached_class) + params(offset: Integer, count: Integer).returns(T.attached_class) end - def self.new(code:, finch_code:, message:, name:) + def self.new( + # The current start index of the returned list of elements + offset:, + # The total number of elements for the entire query (not just the given page) + count: nil + ) end - sig do - override.returns( - { - code: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat, - finch_code: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol, - message: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol, - name: - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol - } - ) - end + sig { override.returns({ offset: Integer, count: Integer }) } def to_hash end - - module Code - extend FinchAPI::Internal::Type::Enum - - TaggedFloat = - T.type_alias do - T.all( - Float, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code - ) - end - OrFloat = T.type_alias { Float } - - CODE_202 = - T.let( - 202, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Code::TaggedFloat - ] - ) - end - def self.values - end - end - - module FinchCode - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DATA_SYNC_IN_PROGRESS = - T.let( - :data_sync_in_progress, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::FinchCode::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Message - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER = - T.let( - :"The pay statements for this payment are being fetched. Please check back later.", - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Message::TaggedSymbol - ] - ) - end - def self.values - end - end - - module Name - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACCEPTED = - T.let( - :accepted, - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::PayStatementResponseBody::UnionMember2::Name::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - sig do - override.returns( - T::Array[FinchAPI::HRIS::PayStatementResponseBody::Variants] - ) - end - def self.variants end end end diff --git a/rbi/finch_api/models/sandbox/payment_create_params.rbi b/rbi/finch_api/models/sandbox/payment_create_params.rbi index bda1510b..0b5eb880 100644 --- a/rbi/finch_api/models/sandbox/payment_create_params.rbi +++ b/rbi/finch_api/models/sandbox/payment_create_params.rbi @@ -21,21 +21,12 @@ module FinchAPI sig { params(end_date: String).void } attr_writer :end_date - sig do - returns( - T.nilable( - T::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] - ) - ) - end + sig { returns(T.nilable(T::Array[FinchAPI::HRIS::PayStatement])) } attr_reader :pay_statements sig do params( - pay_statements: - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::OrHash - ] + pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash] ).void end attr_writer :pay_statements @@ -49,10 +40,7 @@ module FinchAPI sig do params( end_date: String, - pay_statements: - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::OrHash - ], + pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash], start_date: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) @@ -69,8 +57,7 @@ module FinchAPI override.returns( { end_date: String, - pay_statements: - T::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + pay_statements: T::Array[FinchAPI::HRIS::PayStatement], start_date: String, request_options: FinchAPI::RequestOptions } @@ -78,1174 +65,6 @@ module FinchAPI end def to_hash end - - class PayStatement < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement, - FinchAPI::Internal::AnyHash - ) - end - - # The array of earnings objects associated with this pay statement - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning - ) - ] - ) - ) - end - attr_accessor :earnings - - # The array of deductions objects associated with this pay statement. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction - ) - ] - ) - ) - end - attr_accessor :employee_deductions - - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution - ) - ] - ) - ) - end - attr_accessor :employer_contributions - - sig { returns(T.nilable(FinchAPI::Money)) } - attr_reader :gross_pay - - sig { params(gross_pay: T.nilable(FinchAPI::Money::OrHash)).void } - attr_writer :gross_pay - - # A stable Finch `id` (UUID v4) for an individual in the company - sig { returns(String) } - attr_accessor :individual_id - - sig { returns(T.nilable(FinchAPI::Money)) } - attr_reader :net_pay - - sig { params(net_pay: T.nilable(FinchAPI::Money::OrHash)).void } - attr_writer :net_pay - - # The payment method. - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::OrSymbol - ) - ) - end - attr_accessor :payment_method - - # The array of taxes objects associated with this pay statement. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax - ) - ] - ) - ) - end - attr_accessor :taxes - - # The number of hours worked for this pay period - sig { returns(T.nilable(Float)) } - attr_accessor :total_hours - - # The type of the payment associated with the pay statement. - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::OrSymbol - ) - ) - end - attr_accessor :type - - sig do - params( - earnings: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::OrHash - ) - ] - ), - employee_deductions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::OrHash - ) - ] - ), - employer_contributions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::OrHash - ) - ] - ), - gross_pay: T.nilable(FinchAPI::Money::OrHash), - individual_id: String, - net_pay: T.nilable(FinchAPI::Money::OrHash), - payment_method: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::OrSymbol - ), - taxes: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::OrHash - ) - ] - ), - total_hours: T.nilable(Float), - type: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::OrSymbol - ) - ).returns(T.attached_class) - end - def self.new( - # The array of earnings objects associated with this pay statement - earnings:, - # The array of deductions objects associated with this pay statement. - employee_deductions:, - employer_contributions:, - gross_pay:, - # A stable Finch `id` (UUID v4) for an individual in the company - individual_id:, - net_pay:, - # The payment method. - payment_method:, - # The array of taxes objects associated with this pay statement. - taxes:, - # The number of hours worked for this pay period - total_hours:, - # The type of the payment associated with the pay statement. - type: - ) - end - - sig do - override.returns( - { - earnings: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning - ) - ] - ), - employee_deductions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction - ) - ] - ), - employer_contributions: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution - ) - ] - ), - gross_pay: T.nilable(FinchAPI::Money), - individual_id: String, - net_pay: T.nilable(FinchAPI::Money), - payment_method: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::OrSymbol - ), - taxes: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax - ) - ] - ), - total_hours: T.nilable(Float), - type: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::OrSymbol - ) - } - ) - end - def to_hash - end - - class Earning < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning, - FinchAPI::Internal::AnyHash - ) - end - - # The earnings amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - # The earnings currency code. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # 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). - sig { returns(T.nilable(Float)) } - attr_accessor :hours - - # The exact name of the deduction from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # The type of earning. - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol - ) - ) - end - attr_accessor :type - - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - amount: T.nilable(Integer), - currency: T.nilable(String), - hours: T.nilable(Float), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol - ), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The earnings amount in cents. - amount:, - # The earnings currency code. - currency:, - # 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). - hours:, - # The exact name of the deduction from the pay statement. - name:, - # The type of earning. - type:, - attributes: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - currency: T.nilable(String), - hours: T.nilable(Float), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol - ), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes - ) - } - ) - end - def to_hash - end - - # The type of earning. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - SALARY = - T.let( - :salary, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - WAGE = - T.let( - :wage, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - REIMBURSEMENT = - T.let( - :reimbursement, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - OVERTIME = - T.let( - :overtime, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - SEVERANCE = - T.let( - :severance, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - DOUBLE_OVERTIME = - T.let( - :double_overtime, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - PTO = - T.let( - :pto, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - SICK = - T.let( - :sick, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - BONUS = - T.let( - :bonus, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - COMMISSION = - T.let( - :commission, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - TIPS = - T.let( - :tips, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - TYPE_1099 = - T.let( - :"1099", - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - OTHER = - T.let( - :other, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction, - FinchAPI::Internal::AnyHash - ) - end - - # The deduction amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - # The deduction currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The deduction name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Boolean indicating if the deduction is pre-tax. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :pre_tax - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } - attr_accessor :type - - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - amount: T.nilable(Integer), - currency: T.nilable(String), - name: T.nilable(String), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The deduction amount in cents. - amount:, - # The deduction currency. - currency:, - # The deduction name from the pay statement. - name:, - # Boolean indicating if the deduction is pre-tax. - pre_tax:, - # Type of benefit. - type:, - attributes: nil - ) - end - - sig do - override.returns( - { - amount: T.nilable(Integer), - currency: T.nilable(String), - name: T.nilable(String), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes - ) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution, - FinchAPI::Internal::AnyHash - ) - end - - # The contribution currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # The contribution name from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } - attr_accessor :type - - # The contribution amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The contribution currency. - currency:, - # The contribution name from the pay statement. - name:, - # Type of benefit. - type:, - # The contribution amount in cents. - amount: nil, - attributes: nil - ) - end - - sig do - override.returns( - { - currency: T.nilable(String), - name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes - ) - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - # The payment method. - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CHECK = - T.let( - :check, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol - ) - DIRECT_DEPOSIT = - T.let( - :direct_deposit, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol - ) - OTHER = - T.let( - :other, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Tax < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax, - FinchAPI::Internal::AnyHash - ) - end - - # The currency code. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # `true` if the amount is paid by the employers. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :employer - - # The exact name of tax from the pay statement. - sig { returns(T.nilable(String)) } - attr_accessor :name - - # The type of taxes. - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol - ) - ) - end - attr_accessor :type - - # The tax amount in cents. - sig { returns(T.nilable(Integer)) } - attr_accessor :amount - - sig do - returns( - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::OrHash - ) - ).void - end - attr_writer :attributes - - sig do - params( - currency: T.nilable(String), - employer: T.nilable(T::Boolean), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol - ), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # The currency code. - currency:, - # `true` if the amount is paid by the employers. - employer:, - # The exact name of tax from the pay statement. - name:, - # The type of taxes. - type:, - # The tax amount in cents. - amount: nil, - attributes: nil - ) - end - - sig do - override.returns( - { - currency: T.nilable(String), - employer: T.nilable(T::Boolean), - name: T.nilable(String), - type: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol - ), - amount: T.nilable(Integer), - attributes: - T.nilable( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes - ) - } - ) - end - def to_hash - end - - # The type of taxes. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - STATE = - T.let( - :state, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - FEDERAL = - T.let( - :federal, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - LOCAL = - T.let( - :local, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - FICA = - T.let( - :fica, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - ) - end - attr_reader :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata::OrHash - ).void - end - attr_writer :metadata - - sig do - params( - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata::OrHash - ).returns(T.attached_class) - end - def self.new(metadata:) - end - - sig do - override.returns( - { - metadata: - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - } - ) - end - def to_hash - end - - class Metadata < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata, - FinchAPI::Internal::AnyHash - ) - end - - # 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.). - sig { returns(T::Hash[Symbol, T.nilable(T.anything)]) } - attr_accessor :metadata - - sig do - params( - metadata: T::Hash[Symbol, T.nilable(T.anything)] - ).returns(T.attached_class) - end - def self.new( - # 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.). - metadata: - ) - end - - sig do - override.returns( - { metadata: T::Hash[Symbol, T.nilable(T.anything)] } - ) - end - def to_hash - end - end - end - end - - # The type of the payment associated with the pay statement. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - OFF_CYCLE_PAYROLL = - T.let( - :off_cycle_payroll, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol - ) - ONE_TIME_PAYMENT = - T.let( - :one_time_payment, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol - ) - REGULAR_PAYROLL = - T.let( - :regular_payroll, - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/finch_api/resources/sandbox/payment.rbi b/rbi/finch_api/resources/sandbox/payment.rbi index 4afcb852..ff6bafaf 100644 --- a/rbi/finch_api/resources/sandbox/payment.rbi +++ b/rbi/finch_api/resources/sandbox/payment.rbi @@ -8,10 +8,7 @@ module FinchAPI sig do params( end_date: String, - pay_statements: - T::Array[ - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::OrHash - ], + pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash], start_date: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::Sandbox::PaymentCreateResponse) diff --git a/sig/finch_api/models/hris/pay_statement.rbs b/sig/finch_api/models/hris/pay_statement.rbs new file mode 100644 index 00000000..2c5572b3 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement.rbs @@ -0,0 +1,410 @@ +module FinchAPI + module Models + module HRIS + type pay_statement = + { + earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatement::type_? + } + + class PayStatement < FinchAPI::Internal::Type::BaseModel + attr_accessor earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]? + + attr_accessor employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]? + + attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]? + + attr_accessor gross_pay: FinchAPI::Money? + + attr_accessor individual_id: String + + attr_accessor net_pay: FinchAPI::Money? + + attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method? + + attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]? + + attr_accessor total_hours: Float? + + attr_accessor type: FinchAPI::Models::HRIS::PayStatement::type_? + + def initialize: ( + earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatement::type_? + ) -> void + + def to_hash: -> { + earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, + employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, + employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, + gross_pay: FinchAPI::Money?, + individual_id: String, + net_pay: FinchAPI::Money?, + payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]?, + total_hours: Float?, + type: FinchAPI::Models::HRIS::PayStatement::type_? + } + + type earning = + { + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Earning::type_?, + attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes? + } + + class Earning < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer? + + attr_accessor currency: String? + + attr_accessor hours: Float? + + attr_accessor name: String? + + attr_accessor type: FinchAPI::Models::HRIS::PayStatement::Earning::type_? + + attr_accessor attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes? + + def initialize: ( + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Earning::type_?, + ?attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes? + ) -> void + + def to_hash: -> { + amount: Integer?, + currency: String?, + hours: Float?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Earning::type_?, + attributes: FinchAPI::HRIS::PayStatement::Earning::Attributes? + } + + type type_ = + :salary + | :wage + | :reimbursement + | :overtime + | :severance + | :double_overtime + | :pto + | :sick + | :bonus + | :commission + | :tips + | :"1099" + | :other + + 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 + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::Earning::type_] + end + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::Earning::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type employee_deduction = + { + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes? + } + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer? + + attr_accessor currency: String? + + attr_accessor name: String? + + attr_accessor pre_tax: bool? + + attr_accessor type: FinchAPI::Models::HRIS::benefit_type? + + attr_accessor attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes? + + def initialize: ( + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + ?attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes? + ) -> void + + def to_hash: -> { + amount: Integer?, + currency: String?, + name: String?, + pre_tax: bool?, + type: FinchAPI::Models::HRIS::benefit_type?, + attributes: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes? + } + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type employer_contribution = + { + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes? + } + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + attr_accessor currency: String? + + attr_accessor name: String? + + attr_accessor type: FinchAPI::Models::HRIS::benefit_type? + + attr_accessor amount: Integer? + + attr_accessor attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes? + + def initialize: ( + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, + ?amount: Integer?, + ?attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes? + ) -> void + + def to_hash: -> { + currency: String?, + name: String?, + type: FinchAPI::Models::HRIS::benefit_type?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes? + } + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type payment_method = :check | :direct_deposit | :other + + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + CHECK: :check + DIRECT_DEPOSIT: :direct_deposit + OTHER: :other + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::payment_method] + end + + type tax = + { + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Tax::type_?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes? + } + + class Tax < FinchAPI::Internal::Type::BaseModel + attr_accessor currency: String? + + attr_accessor employer: bool? + + attr_accessor name: String? + + attr_accessor type: FinchAPI::Models::HRIS::PayStatement::Tax::type_? + + attr_accessor amount: Integer? + + attr_accessor attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes? + + def initialize: ( + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Tax::type_?, + ?amount: Integer?, + ?attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes? + ) -> void + + def to_hash: -> { + currency: String?, + employer: bool?, + name: String?, + type: FinchAPI::Models::HRIS::PayStatement::Tax::type_?, + amount: Integer?, + attributes: FinchAPI::HRIS::PayStatement::Tax::Attributes? + } + + type type_ = :state | :federal | :local | :fica + + module Type + extend FinchAPI::Internal::Type::Enum + + STATE: :state + FEDERAL: :federal + LOCAL: :local + FICA: :fica + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::Tax::type_] + end + + type attributes = + { + metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata + + def initialize: ( + metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata + ) -> void + + def to_hash: -> { + metadata: FinchAPI::HRIS::PayStatement::Tax::Attributes::Metadata + } + + type metadata = { metadata: ::Hash[Symbol, top?] } + + class Metadata < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?] + + def initialize: (metadata: ::Hash[Symbol, top?]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top?] } + end + end + end + + type type_ = :off_cycle_payroll | :one_time_payment | :regular_payroll + + module Type + extend FinchAPI::Internal::Type::Enum + + OFF_CYCLE_PAYROLL: :off_cycle_payroll + ONE_TIME_PAYMENT: :one_time_payment + REGULAR_PAYROLL: :regular_payroll + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatement::type_] + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_data_sync_in_progress.rbs b/sig/finch_api/models/hris/pay_statement_data_sync_in_progress.rbs new file mode 100644 index 00000000..162ebf87 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_data_sync_in_progress.rbs @@ -0,0 +1,78 @@ +module FinchAPI + module Models + module HRIS + type pay_statement_data_sync_in_progress = + { + code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::code, + finch_code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::finch_code, + message: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::message, + name: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::name_ + } + + class PayStatementDataSyncInProgress < FinchAPI::Internal::Type::BaseModel + attr_accessor code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::code + + attr_accessor finch_code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::finch_code + + attr_accessor message: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::message + + attr_accessor name: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::name_ + + def initialize: ( + code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::code, + finch_code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::finch_code, + message: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::message, + name: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::name_ + ) -> void + + def to_hash: -> { + code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::code, + finch_code: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::finch_code, + message: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::message, + name: FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::name_ + } + + type code = Float + + module Code + extend FinchAPI::Internal::Type::Enum + + CODE_202: 202 + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::code] + end + + type finch_code = :data_sync_in_progress + + module FinchCode + extend FinchAPI::Internal::Type::Enum + + DATA_SYNC_IN_PROGRESS: :data_sync_in_progress + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::finch_code] + end + + type message = + :"The pay statements for this payment are being fetched. Please check back later." + + module Message + extend FinchAPI::Internal::Type::Enum + + THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER: :"The pay statements for this payment are being fetched. Please check back later." + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::message] + end + + type name_ = :accepted + + module Name + extend FinchAPI::Internal::Type::Enum + + ACCEPTED: :accepted + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementDataSyncInProgress::name_] + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_response.rbs b/sig/finch_api/models/hris/pay_statement_response.rbs index 288360be..9321db6c 100644 --- a/sig/finch_api/models/hris/pay_statement_response.rbs +++ b/sig/finch_api/models/hris/pay_statement_response.rbs @@ -3,29 +3,69 @@ module FinchAPI module HRIS type pay_statement_response = { - body: FinchAPI::Models::HRIS::pay_statement_response_body, + body: FinchAPI::Models::HRIS::PayStatementResponse::body, code: Integer, payment_id: String } class PayStatementResponse < FinchAPI::Internal::Type::BaseModel - attr_accessor body: FinchAPI::Models::HRIS::pay_statement_response_body + attr_accessor body: FinchAPI::Models::HRIS::PayStatementResponse::body attr_accessor code: Integer attr_accessor payment_id: String def initialize: ( - body: FinchAPI::Models::HRIS::pay_statement_response_body, + body: FinchAPI::Models::HRIS::PayStatementResponse::body, code: Integer, payment_id: String ) -> void def to_hash: -> { - body: FinchAPI::Models::HRIS::pay_statement_response_body, + body: FinchAPI::Models::HRIS::PayStatementResponse::body, code: Integer, payment_id: String } + + type body = + FinchAPI::HRIS::PayStatementResponseBody + | FinchAPI::HRIS::PayStatementResponse::Body::BatchError + | FinchAPI::HRIS::PayStatementDataSyncInProgress + + module Body + extend FinchAPI::Internal::Type::Union + + type batch_error = + { code: Float, message: String, name: String, finch_code: String } + + class BatchError < FinchAPI::Internal::Type::BaseModel + attr_accessor code: Float + + attr_accessor message: String + + attr_accessor name: String + + attr_reader finch_code: String? + + def finch_code=: (String) -> String + + def initialize: ( + code: Float, + message: String, + name: String, + ?finch_code: String + ) -> void + + def to_hash: -> { + code: Float, + message: String, + name: String, + finch_code: String + } + end + + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponse::body] + end end end end diff --git a/sig/finch_api/models/hris/pay_statement_response_body.rbs b/sig/finch_api/models/hris/pay_statement_response_body.rbs index 9389b5a6..b29eb31e 100644 --- a/sig/finch_api/models/hris/pay_statement_response_body.rbs +++ b/sig/finch_api/models/hris/pay_statement_response_body.rbs @@ -2,558 +2,39 @@ module FinchAPI module Models module HRIS type pay_statement_response_body = - FinchAPI::HRIS::PayStatementResponseBody::UnionMember0 - | FinchAPI::HRIS::PayStatementResponseBody::BatchError - | FinchAPI::HRIS::PayStatementResponseBody::UnionMember2 + { + paging: FinchAPI::HRIS::PayStatementResponseBody::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatement] + } - module PayStatementResponseBody - extend FinchAPI::Internal::Type::Union + class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel + attr_accessor paging: FinchAPI::HRIS::PayStatementResponseBody::Paging - type union_member0 = - { - paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, - pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] - } + attr_accessor pay_statements: ::Array[FinchAPI::HRIS::PayStatement] - class UnionMember0 < FinchAPI::Internal::Type::BaseModel - attr_accessor paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging + def initialize: ( + paging: FinchAPI::HRIS::PayStatementResponseBody::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatement] + ) -> void - attr_accessor pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] + def to_hash: -> { + paging: FinchAPI::HRIS::PayStatementResponseBody::Paging, + pay_statements: ::Array[FinchAPI::HRIS::PayStatement] + } - def initialize: ( - paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, - pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] - ) -> void + type paging = { offset: Integer, count: Integer } - def to_hash: -> { - paging: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::Paging, - pay_statements: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement] - } + class Paging < FinchAPI::Internal::Type::BaseModel + attr_accessor offset: Integer - type paging = { offset: Integer, count: Integer } + attr_reader count: Integer? - class Paging < FinchAPI::Internal::Type::BaseModel - attr_accessor offset: Integer + def count=: (Integer) -> Integer - attr_reader count: Integer? + def initialize: (offset: Integer, ?count: Integer) -> void - def count=: (Integer) -> Integer - - def initialize: (offset: Integer, ?count: Integer) -> void - - def to_hash: -> { offset: Integer, count: Integer } - end - - type pay_statement = - { - earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? - } - - class PayStatement < FinchAPI::Internal::Type::BaseModel - attr_accessor earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]? - - attr_accessor employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]? - - attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]? - - attr_accessor gross_pay: FinchAPI::Money? - - attr_accessor individual_id: String - - attr_accessor net_pay: FinchAPI::Money? - - attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method? - - attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]? - - attr_accessor total_hours: Float? - - attr_accessor type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? - - def initialize: ( - earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? - ) -> void - - def to_hash: -> { - earnings: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_? - } - - type earning = - { - amount: Integer?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? - } - - class Earning < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor currency: String? - - attr_accessor hours: Float? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_? - - attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? - - def initialize: ( - amount: Integer?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_?, - ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? - ) -> void - - def to_hash: -> { - amount: Integer?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes? - } - - type type_ = - :salary - | :wage - | :reimbursement - | :overtime - | :severance - | :double_overtime - | :pto - | :sick - | :bonus - | :commission - | :tips - | :"1099" - | :other - - 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 - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::type_] - end - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Earning::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type employee_deduction = - { - amount: Integer?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? - } - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor currency: String? - - attr_accessor name: String? - - attr_accessor pre_tax: bool? - - attr_accessor type: FinchAPI::Models::HRIS::benefit_type? - - attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? - - def initialize: ( - amount: Integer?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type?, - ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? - ) -> void - - def to_hash: -> { - amount: Integer?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes? - } - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type employer_contribution = - { - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type?, - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? - } - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - attr_accessor currency: String? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::benefit_type? - - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? - - def initialize: ( - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type?, - ?amount: Integer?, - ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? - ) -> void - - def to_hash: -> { - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type?, - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes? - } - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::EmployerContribution::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type payment_method = :check | :direct_deposit | :other - - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - CHECK: :check - DIRECT_DEPOSIT: :direct_deposit - OTHER: :other - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::payment_method] - end - - type tax = - { - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_?, - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? - } - - class Tax < FinchAPI::Internal::Type::BaseModel - attr_accessor currency: String? - - attr_accessor employer: bool? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_? - - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? - - def initialize: ( - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_?, - ?amount: Integer?, - ?attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? - ) -> void - - def to_hash: -> { - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_?, - amount: Integer?, - attributes: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes? - } - - type type_ = :state | :federal | :local | :fica - - module Type - extend FinchAPI::Internal::Type::Enum - - STATE: :state - FEDERAL: :federal - LOCAL: :local - FICA: :fica - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::type_] - end - - type attributes = - { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::Tax::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type type_ = - :off_cycle_payroll | :one_time_payment | :regular_payroll - - module Type - extend FinchAPI::Internal::Type::Enum - - OFF_CYCLE_PAYROLL: :off_cycle_payroll - ONE_TIME_PAYMENT: :one_time_payment - REGULAR_PAYROLL: :regular_payroll - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember0::PayStatement::type_] - end - end - end - - type batch_error = - { code: Float, message: String, name: String, finch_code: String } - - class BatchError < FinchAPI::Internal::Type::BaseModel - attr_accessor code: Float - - attr_accessor message: String - - attr_accessor name: String - - attr_reader finch_code: String? - - def finch_code=: (String) -> String - - def initialize: ( - code: Float, - message: String, - name: String, - ?finch_code: String - ) -> void - - def to_hash: -> { - code: Float, - message: String, - name: String, - finch_code: String - } + def to_hash: -> { offset: Integer, count: Integer } end - - type union_member2 = - { - code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code, - finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code, - message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message, - name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ - } - - class UnionMember2 < FinchAPI::Internal::Type::BaseModel - attr_accessor code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code - - attr_accessor finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code - - attr_accessor message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message - - attr_accessor name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ - - def initialize: ( - code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code, - finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code, - message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message, - name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ - ) -> void - - def to_hash: -> { - code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code, - finch_code: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code, - message: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message, - name: FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_ - } - - type code = Float - - module Code - extend FinchAPI::Internal::Type::Enum - - CODE_202: 202 - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::code] - end - - type finch_code = :data_sync_in_progress - - module FinchCode - extend FinchAPI::Internal::Type::Enum - - DATA_SYNC_IN_PROGRESS: :data_sync_in_progress - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::finch_code] - end - - type message = - :"The pay statements for this payment are being fetched. Please check back later." - - module Message - extend FinchAPI::Internal::Type::Enum - - THE_PAY_STATEMENTS_FOR_THIS_PAYMENT_ARE_BEING_FETCHED_PLEASE_CHECK_BACK_LATER: :"The pay statements for this payment are being fetched. Please check back later." - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::message] - end - - type name_ = :accepted - - module Name - extend FinchAPI::Internal::Type::Enum - - ACCEPTED: :accepted - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementResponseBody::UnionMember2::name_] - end - end - - def self?.variants: -> ::Array[FinchAPI::Models::HRIS::pay_statement_response_body] end end end diff --git a/sig/finch_api/models/sandbox/payment_create_params.rbs b/sig/finch_api/models/sandbox/payment_create_params.rbs index 17860875..a3269ac3 100644 --- a/sig/finch_api/models/sandbox/payment_create_params.rbs +++ b/sig/finch_api/models/sandbox/payment_create_params.rbs @@ -4,7 +4,7 @@ module FinchAPI type payment_create_params = { end_date: String, - pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + pay_statements: ::Array[FinchAPI::HRIS::PayStatement], start_date: String } & FinchAPI::Internal::Type::request_parameters @@ -17,11 +17,11 @@ module FinchAPI def end_date=: (String) -> String - attr_reader pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement]? + attr_reader pay_statements: ::Array[FinchAPI::HRIS::PayStatement]? def pay_statements=: ( - ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] - ) -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] + ::Array[FinchAPI::HRIS::PayStatement] + ) -> ::Array[FinchAPI::HRIS::PayStatement] attr_reader start_date: String? @@ -29,422 +29,17 @@ module FinchAPI def initialize: ( ?end_date: String, - ?pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + ?pay_statements: ::Array[FinchAPI::HRIS::PayStatement], ?start_date: String, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { end_date: String, - pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + pay_statements: ::Array[FinchAPI::HRIS::PayStatement], start_date: String, request_options: FinchAPI::RequestOptions } - - type pay_statement = - { - earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? - } - - class PayStatement < FinchAPI::Internal::Type::BaseModel - attr_accessor earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]? - - attr_accessor employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]? - - attr_accessor employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]? - - attr_accessor gross_pay: FinchAPI::Money? - - attr_accessor individual_id: String - - attr_accessor net_pay: FinchAPI::Money? - - attr_accessor payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method? - - attr_accessor taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]? - - attr_accessor total_hours: Float? - - attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? - - def initialize: ( - earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? - ) -> void - - def to_hash: -> { - earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution?]?, - gross_pay: FinchAPI::Money?, - individual_id: String, - net_pay: FinchAPI::Money?, - payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, - taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax?]?, - total_hours: Float?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? - } - - type earning = - { - amount: Integer?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? - } - - class Earning < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor currency: String? - - attr_accessor hours: Float? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? - - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? - - def initialize: ( - amount: Integer?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? - ) -> void - - def to_hash: -> { - amount: Integer?, - currency: String?, - hours: Float?, - name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes? - } - - type type_ = - :salary - | :wage - | :reimbursement - | :overtime - | :severance - | :double_overtime - | :pto - | :sick - | :bonus - | :commission - | :tips - | :"1099" - | :other - - 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 - - def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_] - end - - type attributes = - { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type employee_deduction = - { - amount: Integer?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? - } - - class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? - - attr_accessor currency: String? - - attr_accessor name: String? - - attr_accessor pre_tax: bool? - - attr_accessor type: FinchAPI::Models::HRIS::benefit_type? - - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? - - def initialize: ( - amount: Integer?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? - ) -> void - - def to_hash: -> { - amount: Integer?, - currency: String?, - name: String?, - pre_tax: bool?, - type: FinchAPI::Models::HRIS::benefit_type?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes? - } - - type attributes = - { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type employer_contribution = - { - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type?, - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? - } - - class EmployerContribution < FinchAPI::Internal::Type::BaseModel - attr_accessor currency: String? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::HRIS::benefit_type? - - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? - - def initialize: ( - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type?, - ?amount: Integer?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? - ) -> void - - def to_hash: -> { - currency: String?, - name: String?, - type: FinchAPI::Models::HRIS::benefit_type?, - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes? - } - - type attributes = - { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type payment_method = :check | :direct_deposit | :other - - module PaymentMethod - extend FinchAPI::Internal::Type::Enum - - CHECK: :check - DIRECT_DEPOSIT: :direct_deposit - OTHER: :other - - def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method] - end - - type tax = - { - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_?, - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? - } - - class Tax < FinchAPI::Internal::Type::BaseModel - attr_accessor currency: String? - - attr_accessor employer: bool? - - attr_accessor name: String? - - attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? - - attr_accessor amount: Integer? - - attr_accessor attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? - - def initialize: ( - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_?, - ?amount: Integer?, - ?attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? - ) -> void - - def to_hash: -> { - currency: String?, - employer: bool?, - name: String?, - type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_?, - amount: Integer?, - attributes: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes? - } - - type type_ = :state | :federal | :local | :fica - - module Type - extend FinchAPI::Internal::Type::Enum - - STATE: :state - FEDERAL: :federal - LOCAL: :local - FICA: :fica - - def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_] - end - - type attributes = - { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - - def initialize: ( - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - ) -> void - - def to_hash: -> { - metadata: FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata - } - - type metadata = { metadata: ::Hash[Symbol, top?] } - - class Metadata < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?] - - def initialize: (metadata: ::Hash[Symbol, top?]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top?] } - end - end - end - - type type_ = :off_cycle_payroll | :one_time_payment | :regular_payroll - - module Type - extend FinchAPI::Internal::Type::Enum - - OFF_CYCLE_PAYROLL: :off_cycle_payroll - ONE_TIME_PAYMENT: :one_time_payment - REGULAR_PAYROLL: :regular_payroll - - def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_] - end - end end end end diff --git a/sig/finch_api/resources/sandbox/payment.rbs b/sig/finch_api/resources/sandbox/payment.rbs index c22a1b32..0b803a92 100644 --- a/sig/finch_api/resources/sandbox/payment.rbs +++ b/sig/finch_api/resources/sandbox/payment.rbs @@ -4,7 +4,7 @@ module FinchAPI class Payment def create: ( ?end_date: String, - ?pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + ?pay_statements: ::Array[FinchAPI::HRIS::PayStatement], ?start_date: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::Sandbox::PaymentCreateResponse diff --git a/test/finch_api/resources/hris/pay_statements_test.rb b/test/finch_api/resources/hris/pay_statements_test.rb index 43e820b2..5090346f 100644 --- a/test/finch_api/resources/hris/pay_statements_test.rb +++ b/test/finch_api/resources/hris/pay_statements_test.rb @@ -20,7 +20,7 @@ def test_retrieve_many_required_params assert_pattern do row => { - body: FinchAPI::HRIS::PayStatementResponseBody, + body: FinchAPI::HRIS::PayStatementResponse::Body, code: Integer, payment_id: String } From 2288848990739f298069c86ad90d915c1bd88c60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:45:18 +0000 Subject: [PATCH 20/27] fix: default content-type for text in multi-part formdata uploads should be text/plain --- lib/finch_api/internal/util.rb | 17 ++++++++--------- rbi/finch_api/internal/util.rbi | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index ffc262d2..d20590e8 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -497,7 +497,7 @@ class << self # @param closing [Array] # @param content_type [String, nil] private def write_multipart_content(y, val:, closing:, content_type: nil) - content_type ||= "application/octet-stream" + content_line = "Content-Type: %s\r\n\r\n" case val in FinchAPI::FilePart @@ -508,24 +508,21 @@ class << self content_type: val.content_type ) in Pathname - y << "Content-Type: #{content_type}\r\n\r\n" + y << format(content_line, content_type || "application/octet-stream") io = val.open(binmode: true) closing << io.method(:close) IO.copy_stream(io, y) in IO - y << "Content-Type: #{content_type}\r\n\r\n" + y << format(content_line, content_type || "application/octet-stream") IO.copy_stream(val, y) in StringIO - y << "Content-Type: #{content_type}\r\n\r\n" + y << format(content_line, content_type || "application/octet-stream") y << val.string - in String - y << "Content-Type: #{content_type}\r\n\r\n" - y << val.to_s in -> { primitive?(_1) } - y << "Content-Type: text/plain\r\n\r\n" + y << format(content_line, content_type || "text/plain") y << val.to_s else - y << "Content-Type: application/json\r\n\r\n" + y << format(content_line, content_type || "application/json") y << JSON.generate(val) end y << "\r\n" @@ -563,6 +560,8 @@ class << self # @api private # + # https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content + # # @param body [Object] # # @return [Array(String, Enumerable)] diff --git a/rbi/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi index 1eaee20a..72ecd9e1 100644 --- a/rbi/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -332,6 +332,8 @@ module FinchAPI end # @api private + # + # https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content sig do params(body: T.anything).returns([String, T::Enumerable[String]]) end From 3774286f68227085e6f54396290e3de7569bba0d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:46:08 +0000 Subject: [PATCH 21/27] fix(client): manual fix --- .stats.yml | 2 +- lib/finch_api.rb | 1 - .../hris/benefit_features_and_operations.rb | 121 +------ ...enefit_list_supported_benefits_response.rb | 110 ------- .../models/hris/supported_benefit.rb | 1 + lib/finch_api/resources/hris/benefits.rb | 4 +- .../hris/benefit_features_and_operations.rbi | 300 +----------------- ...nefit_list_supported_benefits_response.rbi | 290 ----------------- .../models/hris/supported_benefit.rbi | 20 +- rbi/finch_api/resources/hris/benefits.rbi | 4 +- .../hris/benefit_features_and_operations.rbs | 96 +----- ...nefit_list_supported_benefits_response.rbs | 89 ------ sig/finch_api/resources/hris/benefits.rbs | 2 +- .../finch_api/resources/hris/benefits_test.rb | 11 +- 14 files changed, 38 insertions(+), 1013 deletions(-) delete mode 100644 lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb delete mode 100644 rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi delete mode 100644 sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs diff --git a/.stats.yml b/.stats.yml index 8d6b9198..a5a080cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1a82d3230c420c8562600b0ad45133d79ab68ffd21d524ab26eef11e163dba09.yml openapi_spec_hash: 7bd02ce73505e51c5fd78608fed55c62 -config_hash: bb896000dc7e790e5c9ddda2549fb7ac +config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/lib/finch_api.rb b/lib/finch_api.rb index 72ca772f..4b61f69c 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -76,7 +76,6 @@ require_relative "finch_api/models/hris/benefit_frequency" require_relative "finch_api/models/hris/benefit_list_params" require_relative "finch_api/models/hris/benefit_list_supported_benefits_params" -require_relative "finch_api/models/hris/benefit_list_supported_benefits_response" require_relative "finch_api/models/hris/benefit_retrieve_params" require_relative "finch_api/models/hris/benefits/enrolled_individual_benefit_response" require_relative "finch_api/models/hris/benefits/individual_benefit" diff --git a/lib/finch_api/models/hris/benefit_features_and_operations.rb b/lib/finch_api/models/hris/benefit_features_and_operations.rb index ddc22368..236e628d 100644 --- a/lib/finch_api/models/hris/benefit_features_and_operations.rb +++ b/lib/finch_api/models/hris/benefit_features_and_operations.rb @@ -6,8 +6,8 @@ module HRIS class BenefitFeaturesAndOperations < FinchAPI::Internal::Type::BaseModel # @!attribute supported_features # - # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, nil] - optional :supported_features, -> { FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures } + # @return [FinchAPI::Models::HRIS::SupportedBenefit, nil] + optional :supported_features, -> { FinchAPI::HRIS::SupportedBenefit } # @!attribute supported_operations # @@ -15,123 +15,8 @@ class BenefitFeaturesAndOperations < FinchAPI::Internal::Type::BaseModel optional :supported_operations, -> { FinchAPI::HRIS::SupportPerBenefitType } # @!method initialize(supported_features: nil, supported_operations: nil) - # @param supported_features [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures] + # @param supported_features [FinchAPI::Models::HRIS::SupportedBenefit] # @param supported_operations [FinchAPI::Models::HRIS::SupportPerBenefitType] - - # @see FinchAPI::Models::HRIS::BenefitFeaturesAndOperations#supported_features - class SupportedFeatures < FinchAPI::Internal::Type::BaseModel - # @!attribute annual_maximum - # Whether the provider supports an annual maximum for this benefit. - # - # @return [Boolean, nil] - optional :annual_maximum, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute catch_up - # Whether the provider supports catch up for this benefit. This field will only be - # true for retirement benefits. - # - # @return [Boolean, nil] - optional :catch_up, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute company_contribution - # Supported contribution types. An empty array indicates contributions are not - # supported. - # - # @return [Array, nil] - optional :company_contribution, - -> { - FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution, - nil?: true] - }, - nil?: true - - # @!attribute description - # - # @return [String, nil] - optional :description, String, nil?: true - - # @!attribute employee_deduction - # Supported deduction types. An empty array indicates deductions are not - # supported. - # - # @return [Array, nil] - optional :employee_deduction, - -> { - FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction, - nil?: true] - }, - nil?: true - - # @!attribute frequencies - # The list of frequencies supported by the provider for this benefit - # - # @return [Array, nil] - optional :frequencies, - -> { - FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFrequency, nil?: true] - } - - # @!attribute hsa_contribution_limit - # Whether the provider supports HSA contribution limits. Empty if this feature is - # not supported for the benefit. This array only has values for HSA benefits. - # - # @return [Array, nil] - optional :hsa_contribution_limit, - -> { - FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit, - nil?: true] - }, - nil?: true - - # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures} for - # more details. - # - # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. - # - # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be - # - # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup - # - # @param description [String, nil] - # - # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported - # - # @param frequencies [Array] The list of frequencies supported by the provider for this benefit - # - # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is - - module CompanyContribution - extend FinchAPI::Internal::Type::Enum - - FIXED = :fixed - PERCENT = :percent - - # @!method self.values - # @return [Array] - end - - module EmployeeDeduction - extend FinchAPI::Internal::Type::Enum - - FIXED = :fixed - PERCENT = :percent - - # @!method self.values - # @return [Array] - end - - module HsaContributionLimit - extend FinchAPI::Internal::Type::Enum - - INDIVIDUAL = :individual - FAMILY = :family - - # @!method self.values - # @return [Array] - end - end end end end diff --git a/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb b/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb deleted file mode 100644 index 567744a3..00000000 --- a/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - # @see FinchAPI::Resources::HRIS::Benefits#list_supported_benefits - class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute annual_maximum - # Whether the provider supports an annual maximum for this benefit. - # - # @return [Boolean, nil] - optional :annual_maximum, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute catch_up - # Whether the provider supports catch up for this benefit. This field will only be - # true for retirement benefits. - # - # @return [Boolean, nil] - optional :catch_up, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute company_contribution - # Supported contribution types. An empty array indicates contributions are not - # supported. - # - # @return [Array, nil] - optional :company_contribution, - -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution, nil?: true] }, - nil?: true - - # @!attribute description - # - # @return [String, nil] - optional :description, String, nil?: true - - # @!attribute employee_deduction - # Supported deduction types. An empty array indicates deductions are not - # supported. - # - # @return [Array, nil] - optional :employee_deduction, - -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction, nil?: true] }, - nil?: true - - # @!attribute frequencies - # The list of frequencies supported by the provider for this benefit - # - # @return [Array, nil] - optional :frequencies, - -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFrequency, nil?: true] } - - # @!attribute hsa_contribution_limit - # Whether the provider supports HSA contribution limits. Empty if this feature is - # not supported for the benefit. This array only has values for HSA benefits. - # - # @return [Array, nil] - optional :hsa_contribution_limit, - -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit, nil?: true] }, - nil?: true - - # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse} for more details. - # - # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. - # - # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be - # - # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup - # - # @param description [String, nil] - # - # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported - # - # @param frequencies [Array] The list of frequencies supported by the provider for this benefit - # - # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is - - module CompanyContribution - extend FinchAPI::Internal::Type::Enum - - FIXED = :fixed - PERCENT = :percent - - # @!method self.values - # @return [Array] - end - - module EmployeeDeduction - extend FinchAPI::Internal::Type::Enum - - FIXED = :fixed - PERCENT = :percent - - # @!method self.values - # @return [Array] - end - - module HsaContributionLimit - extend FinchAPI::Internal::Type::Enum - - INDIVIDUAL = :individual - FAMILY = :family - - # @!method self.values - # @return [Array] - end - end - end - end -end diff --git a/lib/finch_api/models/hris/supported_benefit.rb b/lib/finch_api/models/hris/supported_benefit.rb index 0e3dbe98..f1f3e811 100644 --- a/lib/finch_api/models/hris/supported_benefit.rb +++ b/lib/finch_api/models/hris/supported_benefit.rb @@ -3,6 +3,7 @@ module FinchAPI module Models module HRIS + # @see FinchAPI::Resources::HRIS::Benefits#list_supported_benefits class SupportedBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute annual_maximum # Whether the provider supports an annual maximum for this benefit. diff --git a/lib/finch_api/resources/hris/benefits.rb b/lib/finch_api/resources/hris/benefits.rb index 0be2a5e9..1bee9fa3 100644 --- a/lib/finch_api/resources/hris/benefits.rb +++ b/lib/finch_api/resources/hris/benefits.rb @@ -107,7 +107,7 @@ def list(params = {}) # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [FinchAPI::Internal::SinglePage] + # @return [FinchAPI::Internal::SinglePage] # # @see FinchAPI::Models::HRIS::BenefitListSupportedBenefitsParams def list_supported_benefits(params = {}) @@ -115,7 +115,7 @@ def list_supported_benefits(params = {}) method: :get, path: "employer/benefits/meta", page: FinchAPI::Internal::SinglePage, - model: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse, + model: FinchAPI::HRIS::SupportedBenefit, options: params[:request_options] ) end diff --git a/rbi/finch_api/models/hris/benefit_features_and_operations.rbi b/rbi/finch_api/models/hris/benefit_features_and_operations.rbi index 8b9d6c4c..2f963328 100644 --- a/rbi/finch_api/models/hris/benefit_features_and_operations.rbi +++ b/rbi/finch_api/models/hris/benefit_features_and_operations.rbi @@ -12,19 +12,12 @@ module FinchAPI ) end - sig do - returns( - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures - ) - ) - end + sig { returns(T.nilable(FinchAPI::HRIS::SupportedBenefit)) } attr_reader :supported_features sig do params( - supported_features: - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::OrHash + supported_features: FinchAPI::HRIS::SupportedBenefit::OrHash ).void end attr_writer :supported_features @@ -41,8 +34,7 @@ module FinchAPI sig do params( - supported_features: - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::OrHash, + supported_features: FinchAPI::HRIS::SupportedBenefit::OrHash, supported_operations: FinchAPI::HRIS::SupportPerBenefitType::OrHash ).returns(T.attached_class) end @@ -52,297 +44,13 @@ module FinchAPI sig do override.returns( { - supported_features: - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, + supported_features: FinchAPI::HRIS::SupportedBenefit, supported_operations: FinchAPI::HRIS::SupportPerBenefitType } ) end def to_hash end - - class SupportedFeatures < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, - FinchAPI::Internal::AnyHash - ) - end - - # Whether the provider supports an annual maximum for this benefit. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :annual_maximum - - # Whether the provider supports catch up for this benefit. This field will only be - # true for retirement benefits. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :catch_up - - # Supported contribution types. An empty array indicates contributions are not - # supported. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::TaggedSymbol - ) - ] - ) - ) - end - attr_accessor :company_contribution - - sig { returns(T.nilable(String)) } - attr_accessor :description - - # Supported deduction types. An empty array indicates deductions are not - # supported. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::TaggedSymbol - ) - ] - ) - ) - end - attr_accessor :employee_deduction - - # The list of frequencies supported by the provider for this benefit - sig do - returns( - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol) - ] - ) - ) - end - attr_reader :frequencies - - sig do - params( - frequencies: - T::Array[T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol)] - ).void - end - attr_writer :frequencies - - # Whether the provider supports HSA contribution limits. Empty if this feature is - # not supported for the benefit. This array only has values for HSA benefits. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::TaggedSymbol - ) - ] - ) - ) - end - attr_accessor :hsa_contribution_limit - - sig do - params( - annual_maximum: T.nilable(T::Boolean), - catch_up: T.nilable(T::Boolean), - company_contribution: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::OrSymbol - ) - ] - ), - description: T.nilable(String), - employee_deduction: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::OrSymbol - ) - ] - ), - frequencies: - T::Array[T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol)], - hsa_contribution_limit: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::OrSymbol - ) - ] - ) - ).returns(T.attached_class) - end - def self.new( - # Whether the provider supports an annual maximum for this benefit. - annual_maximum: nil, - # Whether the provider supports catch up for this benefit. This field will only be - # true for retirement benefits. - catch_up: nil, - # Supported contribution types. An empty array indicates contributions are not - # supported. - company_contribution: nil, - description: nil, - # Supported deduction types. An empty array indicates deductions are not - # supported. - employee_deduction: nil, - # The list of frequencies supported by the provider for this benefit - frequencies: nil, - # Whether the provider supports HSA contribution limits. Empty if this feature is - # not supported for the benefit. This array only has values for HSA benefits. - hsa_contribution_limit: nil - ) - end - - sig do - override.returns( - { - annual_maximum: T.nilable(T::Boolean), - catch_up: T.nilable(T::Boolean), - company_contribution: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::TaggedSymbol - ) - ] - ), - description: T.nilable(String), - employee_deduction: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::TaggedSymbol - ) - ] - ), - frequencies: - T::Array[ - T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol) - ], - hsa_contribution_limit: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::TaggedSymbol - ) - ] - ) - } - ) - end - def to_hash - end - - module CompanyContribution - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - FIXED = - T.let( - :fixed, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::TaggedSymbol - ) - PERCENT = - T.let( - :percent, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::TaggedSymbol - ] - ) - end - def self.values - end - end - - module EmployeeDeduction - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - FIXED = - T.let( - :fixed, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::TaggedSymbol - ) - PERCENT = - T.let( - :percent, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::TaggedSymbol - ] - ) - end - def self.values - end - end - - module HsaContributionLimit - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - INDIVIDUAL = - T.let( - :individual, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::TaggedSymbol - ) - FAMILY = - T.let( - :family, - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::TaggedSymbol - ] - ) - end - def self.values - end - end - end end end end diff --git a/rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi b/rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi deleted file mode 100644 index 5133c381..00000000 --- a/rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi +++ /dev/null @@ -1,290 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse, - FinchAPI::Internal::AnyHash - ) - end - - # Whether the provider supports an annual maximum for this benefit. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :annual_maximum - - # Whether the provider supports catch up for this benefit. This field will only be - # true for retirement benefits. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :catch_up - - # Supported contribution types. An empty array indicates contributions are not - # supported. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::TaggedSymbol - ) - ] - ) - ) - end - attr_accessor :company_contribution - - sig { returns(T.nilable(String)) } - attr_accessor :description - - # Supported deduction types. An empty array indicates deductions are not - # supported. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::TaggedSymbol - ) - ] - ) - ) - end - attr_accessor :employee_deduction - - # The list of frequencies supported by the provider for this benefit - sig do - returns( - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol) - ] - ) - ) - end - attr_reader :frequencies - - sig do - params( - frequencies: - T::Array[T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol)] - ).void - end - attr_writer :frequencies - - # Whether the provider supports HSA contribution limits. Empty if this feature is - # not supported for the benefit. This array only has values for HSA benefits. - sig do - returns( - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::TaggedSymbol - ) - ] - ) - ) - end - attr_accessor :hsa_contribution_limit - - sig do - params( - annual_maximum: T.nilable(T::Boolean), - catch_up: T.nilable(T::Boolean), - company_contribution: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::OrSymbol - ) - ] - ), - description: T.nilable(String), - employee_deduction: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::OrSymbol - ) - ] - ), - frequencies: - T::Array[T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol)], - hsa_contribution_limit: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::OrSymbol - ) - ] - ) - ).returns(T.attached_class) - end - def self.new( - # Whether the provider supports an annual maximum for this benefit. - annual_maximum: nil, - # Whether the provider supports catch up for this benefit. This field will only be - # true for retirement benefits. - catch_up: nil, - # Supported contribution types. An empty array indicates contributions are not - # supported. - company_contribution: nil, - description: nil, - # Supported deduction types. An empty array indicates deductions are not - # supported. - employee_deduction: nil, - # The list of frequencies supported by the provider for this benefit - frequencies: nil, - # Whether the provider supports HSA contribution limits. Empty if this feature is - # not supported for the benefit. This array only has values for HSA benefits. - hsa_contribution_limit: nil - ) - end - - sig do - override.returns( - { - annual_maximum: T.nilable(T::Boolean), - catch_up: T.nilable(T::Boolean), - company_contribution: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::TaggedSymbol - ) - ] - ), - description: T.nilable(String), - employee_deduction: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::TaggedSymbol - ) - ] - ), - frequencies: - T::Array[ - T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol) - ], - hsa_contribution_limit: - T.nilable( - T::Array[ - T.nilable( - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::TaggedSymbol - ) - ] - ) - } - ) - end - def to_hash - end - - module CompanyContribution - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - FIXED = - T.let( - :fixed, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::TaggedSymbol - ) - PERCENT = - T.let( - :percent, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::TaggedSymbol - ] - ) - end - def self.values - end - end - - module EmployeeDeduction - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - FIXED = - T.let( - :fixed, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::TaggedSymbol - ) - PERCENT = - T.let( - :percent, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::TaggedSymbol - ] - ) - end - def self.values - end - end - - module HsaContributionLimit - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - INDIVIDUAL = - T.let( - :individual, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::TaggedSymbol - ) - FAMILY = - T.let( - :family, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/supported_benefit.rbi b/rbi/finch_api/models/hris/supported_benefit.rbi index 320239bf..6bda9106 100644 --- a/rbi/finch_api/models/hris/supported_benefit.rbi +++ b/rbi/finch_api/models/hris/supported_benefit.rbi @@ -25,7 +25,7 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::SupportedBenefit::CompanyContribution::OrSymbol + FinchAPI::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol ) ] ) @@ -43,7 +43,7 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::SupportedBenefit::EmployeeDeduction::OrSymbol + FinchAPI::HRIS::SupportedBenefit::EmployeeDeduction::TaggedSymbol ) ] ) @@ -55,7 +55,9 @@ module FinchAPI sig do returns( T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol)] + T::Array[ + T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol) + ] ) ) end @@ -76,7 +78,7 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::SupportedBenefit::HsaContributionLimit::OrSymbol + FinchAPI::HRIS::SupportedBenefit::HsaContributionLimit::TaggedSymbol ) ] ) @@ -147,7 +149,7 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::SupportedBenefit::CompanyContribution::OrSymbol + FinchAPI::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol ) ] ), @@ -156,17 +158,19 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::SupportedBenefit::EmployeeDeduction::OrSymbol + FinchAPI::HRIS::SupportedBenefit::EmployeeDeduction::TaggedSymbol ) ] ), frequencies: - T::Array[T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol)], + T::Array[ + T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol) + ], hsa_contribution_limit: T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::SupportedBenefit::HsaContributionLimit::OrSymbol + FinchAPI::HRIS::SupportedBenefit::HsaContributionLimit::TaggedSymbol ) ] ) diff --git a/rbi/finch_api/resources/hris/benefits.rbi b/rbi/finch_api/resources/hris/benefits.rbi index e17e54a4..4562c58a 100644 --- a/rbi/finch_api/resources/hris/benefits.rbi +++ b/rbi/finch_api/resources/hris/benefits.rbi @@ -74,9 +74,7 @@ module FinchAPI # Get deductions metadata sig do params(request_options: FinchAPI::RequestOptions::OrHash).returns( - FinchAPI::Internal::SinglePage[ - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse - ] + FinchAPI::Internal::SinglePage[FinchAPI::HRIS::SupportedBenefit] ) end def list_supported_benefits(request_options: {}) diff --git a/sig/finch_api/models/hris/benefit_features_and_operations.rbs b/sig/finch_api/models/hris/benefit_features_and_operations.rbs index 419df6d0..04364d33 100644 --- a/sig/finch_api/models/hris/benefit_features_and_operations.rbs +++ b/sig/finch_api/models/hris/benefit_features_and_operations.rbs @@ -3,16 +3,16 @@ module FinchAPI module HRIS type benefit_features_and_operations = { - supported_features: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, + supported_features: FinchAPI::HRIS::SupportedBenefit, supported_operations: FinchAPI::HRIS::SupportPerBenefitType } class BenefitFeaturesAndOperations < FinchAPI::Internal::Type::BaseModel - attr_reader supported_features: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures? + attr_reader supported_features: FinchAPI::HRIS::SupportedBenefit? def supported_features=: ( - FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures - ) -> FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures + FinchAPI::HRIS::SupportedBenefit + ) -> FinchAPI::HRIS::SupportedBenefit attr_reader supported_operations: FinchAPI::HRIS::SupportPerBenefitType? @@ -21,98 +21,14 @@ module FinchAPI ) -> FinchAPI::HRIS::SupportPerBenefitType def initialize: ( - ?supported_features: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, + ?supported_features: FinchAPI::HRIS::SupportedBenefit, ?supported_operations: FinchAPI::HRIS::SupportPerBenefitType ) -> void def to_hash: -> { - supported_features: FinchAPI::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, + supported_features: FinchAPI::HRIS::SupportedBenefit, supported_operations: FinchAPI::HRIS::SupportPerBenefitType } - - type supported_features = - { - annual_maximum: bool?, - catch_up: bool?, - company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, - description: String?, - employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, - frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? - } - - class SupportedFeatures < FinchAPI::Internal::Type::BaseModel - attr_accessor annual_maximum: bool? - - attr_accessor catch_up: bool? - - attr_accessor company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]? - - attr_accessor description: String? - - attr_accessor employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]? - - attr_reader frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?]? - - def frequencies=: ( - ::Array[FinchAPI::Models::HRIS::benefit_frequency?] - ) -> ::Array[FinchAPI::Models::HRIS::benefit_frequency?] - - attr_accessor hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? - - def initialize: ( - ?annual_maximum: bool?, - ?catch_up: bool?, - ?company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, - ?description: String?, - ?employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, - ?frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - ?hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? - ) -> void - - def to_hash: -> { - annual_maximum: bool?, - catch_up: bool?, - company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution?]?, - description: String?, - employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction?]?, - frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit?]? - } - - type company_contribution = :fixed | :percent - - module CompanyContribution - extend FinchAPI::Internal::Type::Enum - - FIXED: :fixed - PERCENT: :percent - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::company_contribution] - end - - type employee_deduction = :fixed | :percent - - module EmployeeDeduction - extend FinchAPI::Internal::Type::Enum - - FIXED: :fixed - PERCENT: :percent - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::employee_deduction] - end - - type hsa_contribution_limit = :individual | :family - - module HsaContributionLimit - extend FinchAPI::Internal::Type::Enum - - INDIVIDUAL: :individual - FAMILY: :family - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::hsa_contribution_limit] - end - end end end end diff --git a/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs b/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs deleted file mode 100644 index a7aedd00..00000000 --- a/sig/finch_api/models/hris/benefit_list_supported_benefits_response.rbs +++ /dev/null @@ -1,89 +0,0 @@ -module FinchAPI - module Models - module HRIS - type benefit_list_supported_benefits_response = - { - annual_maximum: bool?, - catch_up: bool?, - company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::company_contribution?]?, - description: String?, - employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::employee_deduction?]?, - frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit?]? - } - - class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel - attr_accessor annual_maximum: bool? - - attr_accessor catch_up: bool? - - attr_accessor company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::company_contribution?]? - - attr_accessor description: String? - - attr_accessor employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::employee_deduction?]? - - attr_reader frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?]? - - def frequencies=: ( - ::Array[FinchAPI::Models::HRIS::benefit_frequency?] - ) -> ::Array[FinchAPI::Models::HRIS::benefit_frequency?] - - attr_accessor hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit?]? - - def initialize: ( - ?annual_maximum: bool?, - ?catch_up: bool?, - ?company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::company_contribution?]?, - ?description: String?, - ?employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::employee_deduction?]?, - ?frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - ?hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit?]? - ) -> void - - def to_hash: -> { - annual_maximum: bool?, - catch_up: bool?, - company_contribution: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::company_contribution?]?, - description: String?, - employee_deduction: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::employee_deduction?]?, - frequencies: ::Array[FinchAPI::Models::HRIS::benefit_frequency?], - hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit?]? - } - - type company_contribution = :fixed | :percent - - module CompanyContribution - extend FinchAPI::Internal::Type::Enum - - FIXED: :fixed - PERCENT: :percent - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::company_contribution] - end - - type employee_deduction = :fixed | :percent - - module EmployeeDeduction - extend FinchAPI::Internal::Type::Enum - - FIXED: :fixed - PERCENT: :percent - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::employee_deduction] - end - - type hsa_contribution_limit = :individual | :family - - module HsaContributionLimit - extend FinchAPI::Internal::Type::Enum - - INDIVIDUAL: :individual - FAMILY: :family - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::hsa_contribution_limit] - end - end - end - end -end diff --git a/sig/finch_api/resources/hris/benefits.rbs b/sig/finch_api/resources/hris/benefits.rbs index 997e787d..efbcdcf4 100644 --- a/sig/finch_api/resources/hris/benefits.rbs +++ b/sig/finch_api/resources/hris/benefits.rbs @@ -29,7 +29,7 @@ module FinchAPI def list_supported_benefits: ( ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Internal::SinglePage[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse] + ) -> FinchAPI::Internal::SinglePage[FinchAPI::HRIS::SupportedBenefit] def initialize: (client: FinchAPI::Client) -> void end diff --git a/test/finch_api/resources/hris/benefits_test.rb b/test/finch_api/resources/hris/benefits_test.rb index 6cc85455..c7de1b26 100644 --- a/test/finch_api/resources/hris/benefits_test.rb +++ b/test/finch_api/resources/hris/benefits_test.rb @@ -87,19 +87,22 @@ def test_list_supported_benefits return if row.nil? assert_pattern do - row => FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse + row => FinchAPI::HRIS::SupportedBenefit end assert_pattern do row => { annual_maximum: FinchAPI::Internal::Type::Boolean | nil, catch_up: FinchAPI::Internal::Type::Boolean | nil, - company_contribution: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution, nil?: true]) | nil, + company_contribution: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::SupportedBenefit::CompanyContribution, + nil?: true]) | nil, description: String | nil, - employee_deduction: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction, nil?: true]) | nil, + employee_deduction: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::SupportedBenefit::EmployeeDeduction, + nil?: true]) | nil, frequencies: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::BenefitFrequency, nil?: true]) | nil, - hsa_contribution_limit: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit, nil?: true]) | nil + hsa_contribution_limit: ^(FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::SupportedBenefit::HsaContributionLimit, + nil?: true]) | nil } end end From 6479e2217a712d55aac84da1041a88efcbd4f1f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 09:33:37 +0000 Subject: [PATCH 22/27] chore(ci): link to correct github repo --- .github/workflows/publish-gem.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 476bfc7e..a3316868 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to rubygems.org in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/Finch-API/finch-api-python/actions/workflows/publish-gem.yml +# You can run this workflow by navigating to https://www.github.com/Finch-API/finch-api-ruby/actions/workflows/publish-gem.yml name: Publish Gem on: workflow_dispatch: From 055b260f9607ea1c408510bf19c86390ba515b48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:51:31 +0000 Subject: [PATCH 23/27] feat(api): api update --- .stats.yml | 4 ++-- lib/finch_api/models/income.rb | 6 +++--- rbi/finch_api/models/income.rbi | 6 +++--- sig/finch_api/models/income.rbs | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index a5a080cf..2d5b94d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1a82d3230c420c8562600b0ad45133d79ab68ffd21d524ab26eef11e163dba09.yml -openapi_spec_hash: 7bd02ce73505e51c5fd78608fed55c62 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-dd2cdf274497a0f36aaa493457a1144f51f6c28e14b4521acca9715747688b50.yml +openapi_spec_hash: 8bbc0ac9dae255055b69c1d040c43c4b config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/lib/finch_api/models/income.rb b/lib/finch_api/models/income.rb index 5ec443d2..b619effe 100644 --- a/lib/finch_api/models/income.rb +++ b/lib/finch_api/models/income.rb @@ -18,8 +18,8 @@ class Income < FinchAPI::Internal::Type::BaseModel # @!attribute effective_date # The date the income amount went into effect. # - # @return [String, nil] - required :effective_date, String, nil?: true + # @return [Date, nil] + required :effective_date, Date, nil?: true # @!attribute unit # The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, @@ -40,7 +40,7 @@ class Income < FinchAPI::Internal::Type::BaseModel # # @param currency [String, nil] The currency code. # - # @param effective_date [String, nil] The date the income amount went into effect. + # @param effective_date [Date, nil] The date the income amount went into effect. # # @param unit [Symbol, FinchAPI::Models::Income::Unit, nil] The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, `semi_mon diff --git a/rbi/finch_api/models/income.rbi b/rbi/finch_api/models/income.rbi index 64142b1d..c6f150d4 100644 --- a/rbi/finch_api/models/income.rbi +++ b/rbi/finch_api/models/income.rbi @@ -15,7 +15,7 @@ module FinchAPI attr_accessor :currency # The date the income amount went into effect. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(Date)) } attr_accessor :effective_date # The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, @@ -30,7 +30,7 @@ module FinchAPI params( amount: T.nilable(Integer), currency: T.nilable(String), - effective_date: T.nilable(String), + effective_date: T.nilable(Date), unit: T.nilable(FinchAPI::Income::Unit::OrSymbol) ).returns(T.attached_class) end @@ -52,7 +52,7 @@ module FinchAPI { amount: T.nilable(Integer), currency: T.nilable(String), - effective_date: T.nilable(String), + effective_date: T.nilable(Date), unit: T.nilable(FinchAPI::Income::Unit::OrSymbol) } ) diff --git a/sig/finch_api/models/income.rbs b/sig/finch_api/models/income.rbs index 39a02ed5..903bba57 100644 --- a/sig/finch_api/models/income.rbs +++ b/sig/finch_api/models/income.rbs @@ -4,7 +4,7 @@ module FinchAPI { amount: Integer?, currency: String?, - effective_date: String?, + effective_date: Date?, unit: FinchAPI::Models::Income::unit? } @@ -13,21 +13,21 @@ module FinchAPI attr_accessor currency: String? - attr_accessor effective_date: String? + attr_accessor effective_date: Date? attr_accessor unit: FinchAPI::Models::Income::unit? def initialize: ( amount: Integer?, currency: String?, - effective_date: String?, + effective_date: Date?, unit: FinchAPI::Models::Income::unit? ) -> void def to_hash: -> { amount: Integer?, currency: String?, - effective_date: String?, + effective_date: Date?, unit: FinchAPI::Models::Income::unit? } From 6a3cc47713d3f52d84da946c1f86c328692a71f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:57:26 +0000 Subject: [PATCH 24/27] feat(api): api update --- .stats.yml | 4 +- .../models/sandbox/payment_create_params.rb | 330 +++++- lib/finch_api/resources/sandbox/payment.rb | 9 +- rbi/finch_api/models/hris/pay_statement.rbi | 30 +- .../models/sandbox/payment_create_params.rbi | 980 +++++++++++++++++- rbi/finch_api/resources/sandbox/payment.rbi | 10 +- .../models/sandbox/payment_create_params.rbs | 443 +++++++- sig/finch_api/resources/sandbox/payment.rbs | 6 +- 8 files changed, 1752 insertions(+), 60 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d5b94d6..f1c7d32b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-dd2cdf274497a0f36aaa493457a1144f51f6c28e14b4521acca9715747688b50.yml -openapi_spec_hash: 8bbc0ac9dae255055b69c1d040c43c4b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f7e741bc6e0175fd96a9db5348092b90a77b0985154c0814bb681ad5dccdf19a.yml +openapi_spec_hash: b348a9ef407a8e91dd770fcb219d4ac5 config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/lib/finch_api/models/sandbox/payment_create_params.rb b/lib/finch_api/models/sandbox/payment_create_params.rb index 96b7b351..a1785423 100644 --- a/lib/finch_api/models/sandbox/payment_create_params.rb +++ b/lib/finch_api/models/sandbox/payment_create_params.rb @@ -10,24 +10,336 @@ class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute end_date # - # @return [String, nil] - optional :end_date, String + # @return [Date, nil] + optional :end_date, Date # @!attribute pay_statements + # Array of pay statements to include in the payment. # - # @return [Array, nil] - optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement] } + # @return [Array, nil] + optional :pay_statements, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] + } # @!attribute start_date # - # @return [String, nil] - optional :start_date, String + # @return [Date, nil] + optional :start_date, Date # @!method initialize(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) - # @param end_date [String] - # @param pay_statements [Array] - # @param start_date [String] + # @param end_date [Date] + # + # @param pay_statements [Array] Array of pay statements to include in the payment. + # + # @param start_date [Date] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + + class PayStatement < FinchAPI::Internal::Type::BaseModel + # @!attribute individual_id + # + # @return [String] + required :individual_id, String + + # @!attribute earnings + # + # @return [Array, nil] + optional :earnings, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning] + } + + # @!attribute employee_deductions + # + # @return [Array, nil] + optional :employee_deductions, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction] + } + + # @!attribute employer_contributions + # + # @return [Array, nil] + optional :employer_contributions, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution] + } + + # @!attribute gross_pay + # + # @return [Integer, nil] + optional :gross_pay, Integer + + # @!attribute net_pay + # + # @return [Integer, nil] + optional :net_pay, Integer + + # @!attribute payment_method + # + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] + optional :payment_method, + enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod }, + nil?: true + + # @!attribute taxes + # + # @return [Array, nil] + optional :taxes, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax] + } + + # @!attribute total_hours + # + # @return [Float, nil] + optional :total_hours, Float + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] + optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type }, nil?: true + + # @!method initialize(individual_id:, earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) + # @param individual_id [String] + # @param earnings [Array] + # @param employee_deductions [Array] + # @param employer_contributions [Array] + # @param gross_pay [Integer] + # @param net_pay [Integer] + # @param payment_method [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] + # @param taxes [Array] + # @param total_hours [Float] + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] + + class Earning < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # + # @return [Integer, nil] + optional :amount, Integer + + # @!attribute hours + # + # @return [Float, nil] + optional :hours, Float + + # @!attribute name + # + # @return [String, nil] + optional :name, String + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] + optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type } + + # @!method initialize(amount: nil, hours: nil, name: nil, type: nil) + # @param amount [Integer] + # @param hours [Float] + # @param name [String] + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type] + + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning#type + module Type + extend FinchAPI::Internal::Type::Enum + + BONUS = :bonus + COMMISSION = :commission + DOUBLE_OVERTIME = :double_overtime + OTHER = :other + OVERTIME = :overtime + PTO = :pto + REIMBURSEMENT = :reimbursement + SALARY = :salary + SEVERANCE = :severance + SICK = :sick + TIPS = :tips + WAGE = :wage + TYPE_1099 = :"1099" + + # @!method self.values + # @return [Array] + end + end + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # + # @return [Integer, nil] + optional :amount, Integer + + # @!attribute name + # + # @return [String, nil] + optional :name, String + + # @!attribute pre_tax + # + # @return [Boolean, nil] + optional :pre_tax, FinchAPI::Internal::Type::Boolean + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type, nil] + optional :type, + enum: -> { + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type + } + + # @!method initialize(amount: nil, name: nil, pre_tax: nil, type: nil) + # @param amount [Integer] + # @param name [String] + # @param pre_tax [Boolean] + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type] + + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction#type + module Type + extend FinchAPI::Internal::Type::Enum + + TYPE_457 = :"457" + TYPE_401K = :"401k" + TYPE_401K_ROTH = :"401k_roth" + TYPE_401K_LOAN = :"401k_loan" + TYPE_403B = :"403b" + TYPE_403B_ROTH = :"403b_roth" + TYPE_457_ROTH = :"457_roth" + COMMUTER = :commuter + CUSTOM_POST_TAX = :custom_post_tax + CUSTOM_PRE_TAX = :custom_pre_tax + FSA_DEPENDENT_CARE = :fsa_dependent_care + FSA_MEDICAL = :fsa_medical + HSA_POST = :hsa_post + HSA_PRE = :hsa_pre + S125_DENTAL = :s125_dental + S125_MEDICAL = :s125_medical + S125_VISION = :s125_vision + SIMPLE = :simple + SIMPLE_IRA = :simple_ira + + # @!method self.values + # @return [Array] + end + end + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # + # @return [Integer, nil] + optional :amount, Integer + + # @!attribute name + # + # @return [String, nil] + optional :name, String + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type, nil] + optional :type, + enum: -> { + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type + } + + # @!method initialize(amount: nil, name: nil, type: nil) + # @param amount [Integer] + # @param name [String] + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type] + + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution#type + module Type + extend FinchAPI::Internal::Type::Enum + + TYPE_457 = :"457" + TYPE_401K = :"401k" + TYPE_401K_ROTH = :"401k_roth" + TYPE_401K_LOAN = :"401k_loan" + TYPE_403B = :"403b" + TYPE_403B_ROTH = :"403b_roth" + TYPE_457_ROTH = :"457_roth" + COMMUTER = :commuter + CUSTOM_POST_TAX = :custom_post_tax + CUSTOM_PRE_TAX = :custom_pre_tax + FSA_DEPENDENT_CARE = :fsa_dependent_care + FSA_MEDICAL = :fsa_medical + HSA_POST = :hsa_post + HSA_PRE = :hsa_pre + S125_DENTAL = :s125_dental + S125_MEDICAL = :s125_medical + S125_VISION = :s125_vision + SIMPLE = :simple + SIMPLE_IRA = :simple_ira + + # @!method self.values + # @return [Array] + end + end + + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement#payment_method + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + CHECK = :check + DIRECT_DEPOSIT = :direct_deposit + OTHER = :other + + # @!method self.values + # @return [Array] + end + + class Tax < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # + # @return [Integer, nil] + optional :amount, Integer + + # @!attribute employer + # + # @return [Boolean, nil] + optional :employer, FinchAPI::Internal::Type::Boolean + + # @!attribute name + # + # @return [String, nil] + optional :name, String + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] + optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type } + + # @!method initialize(amount: nil, employer: nil, name: nil, type: nil) + # @param amount [Integer] + # @param employer [Boolean] + # @param name [String] + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type] + + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#type + module Type + extend FinchAPI::Internal::Type::Enum + + FEDERAL = :federal + FICA = :fica + LOCAL = :local + STATE = :state + + # @!method self.values + # @return [Array] + end + end + + # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement#type + module Type + extend FinchAPI::Internal::Type::Enum + + OFF_CYCLE_PAYROLL = :off_cycle_payroll + ONE_TIME_PAYMENT = :one_time_payment + REGULAR_PAYROLL = :regular_payroll + + # @!method self.values + # @return [Array] + end + end end end end diff --git a/lib/finch_api/resources/sandbox/payment.rb b/lib/finch_api/resources/sandbox/payment.rb index aa6ea02c..ab0edb7d 100644 --- a/lib/finch_api/resources/sandbox/payment.rb +++ b/lib/finch_api/resources/sandbox/payment.rb @@ -8,9 +8,12 @@ class Payment # # @overload create(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) # - # @param end_date [String] - # @param pay_statements [Array] - # @param start_date [String] + # @param end_date [Date] + # + # @param pay_statements [Array] Array of pay statements to include in the payment. + # + # @param start_date [Date] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::PaymentCreateResponse] diff --git a/rbi/finch_api/models/hris/pay_statement.rbi b/rbi/finch_api/models/hris/pay_statement.rbi index d42b6443..1de7f657 100644 --- a/rbi/finch_api/models/hris/pay_statement.rbi +++ b/rbi/finch_api/models/hris/pay_statement.rbi @@ -61,7 +61,7 @@ module FinchAPI # The payment method. sig do returns( - T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol) + T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol) ) end attr_accessor :payment_method @@ -79,7 +79,9 @@ module FinchAPI attr_accessor :total_hours # The type of the payment associated with the pay statement. - sig { returns(T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol)) } + sig do + returns(T.nilable(FinchAPI::HRIS::PayStatement::Type::TaggedSymbol)) + end attr_accessor :type sig do @@ -166,14 +168,14 @@ module FinchAPI net_pay: T.nilable(FinchAPI::Money), payment_method: T.nilable( - FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol + FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol ), taxes: T.nilable( T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)] ), total_hours: T.nilable(Float), - type: T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol) + type: T.nilable(FinchAPI::HRIS::PayStatement::Type::TaggedSymbol) } ) end @@ -209,7 +211,9 @@ module FinchAPI # The type of earning. sig do returns( - T.nilable(FinchAPI::HRIS::PayStatement::Earning::Type::OrSymbol) + T.nilable( + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol + ) ) end attr_accessor :type @@ -272,7 +276,7 @@ module FinchAPI name: T.nilable(String), type: T.nilable( - FinchAPI::HRIS::PayStatement::Earning::Type::OrSymbol + FinchAPI::HRIS::PayStatement::Earning::Type::TaggedSymbol ), attributes: T.nilable(FinchAPI::HRIS::PayStatement::Earning::Attributes) @@ -478,7 +482,7 @@ module FinchAPI attr_accessor :pre_tax # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } + sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) } attr_accessor :type sig do @@ -535,7 +539,7 @@ module FinchAPI currency: T.nilable(String), name: T.nilable(String), pre_tax: T.nilable(T::Boolean), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol), attributes: T.nilable( FinchAPI::HRIS::PayStatement::EmployeeDeduction::Attributes @@ -647,7 +651,7 @@ module FinchAPI attr_accessor :name # Type of benefit. - sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)) } + sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) } attr_accessor :type # The contribution amount in cents. @@ -703,7 +707,7 @@ module FinchAPI { currency: T.nilable(String), name: T.nilable(String), - type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol), + type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol), amount: T.nilable(Integer), attributes: T.nilable( @@ -859,7 +863,7 @@ module FinchAPI # The type of taxes. sig do returns( - T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::OrSymbol) + T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol) ) end attr_accessor :type @@ -915,7 +919,9 @@ module FinchAPI employer: T.nilable(T::Boolean), name: T.nilable(String), type: - T.nilable(FinchAPI::HRIS::PayStatement::Tax::Type::OrSymbol), + T.nilable( + FinchAPI::HRIS::PayStatement::Tax::Type::TaggedSymbol + ), amount: T.nilable(Integer), attributes: T.nilable(FinchAPI::HRIS::PayStatement::Tax::Attributes) diff --git a/rbi/finch_api/models/sandbox/payment_create_params.rbi b/rbi/finch_api/models/sandbox/payment_create_params.rbi index 0b5eb880..8c3a5f65 100644 --- a/rbi/finch_api/models/sandbox/payment_create_params.rbi +++ b/rbi/finch_api/models/sandbox/payment_create_params.rbi @@ -15,38 +15,52 @@ module FinchAPI ) end - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(Date)) } attr_reader :end_date - sig { params(end_date: String).void } + sig { params(end_date: Date).void } attr_writer :end_date - sig { returns(T.nilable(T::Array[FinchAPI::HRIS::PayStatement])) } + # Array of pay statements to include in the payment. + sig do + returns( + T.nilable( + T::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] + ) + ) + end attr_reader :pay_statements sig do params( - pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash] + pay_statements: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::OrHash + ] ).void end attr_writer :pay_statements - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(Date)) } attr_reader :start_date - sig { params(start_date: String).void } + sig { params(start_date: Date).void } attr_writer :start_date sig do params( - end_date: String, - pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash], - start_date: String, + end_date: Date, + pay_statements: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::OrHash + ], + start_date: Date, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( end_date: nil, + # Array of pay statements to include in the payment. pay_statements: nil, start_date: nil, request_options: {} @@ -56,15 +70,957 @@ module FinchAPI sig do override.returns( { - end_date: String, - pay_statements: T::Array[FinchAPI::HRIS::PayStatement], - start_date: String, + end_date: Date, + pay_statements: + T::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + start_date: Date, request_options: FinchAPI::RequestOptions } ) end def to_hash end + + class PayStatement < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :individual_id + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning + ] + ) + ) + end + attr_reader :earnings + + sig do + params( + earnings: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::OrHash + ] + ).void + end + attr_writer :earnings + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction + ] + ) + ) + end + attr_reader :employee_deductions + + sig do + params( + employee_deductions: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::OrHash + ] + ).void + end + attr_writer :employee_deductions + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution + ] + ) + ) + end + attr_reader :employer_contributions + + sig do + params( + employer_contributions: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::OrHash + ] + ).void + end + attr_writer :employer_contributions + + sig { returns(T.nilable(Integer)) } + attr_reader :gross_pay + + sig { params(gross_pay: Integer).void } + attr_writer :gross_pay + + sig { returns(T.nilable(Integer)) } + attr_reader :net_pay + + sig { params(net_pay: Integer).void } + attr_writer :net_pay + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::OrSymbol + ) + ) + end + attr_accessor :payment_method + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax + ] + ) + ) + end + attr_reader :taxes + + sig do + params( + taxes: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::OrHash + ] + ).void + end + attr_writer :taxes + + sig { returns(T.nilable(Float)) } + attr_reader :total_hours + + sig { params(total_hours: Float).void } + attr_writer :total_hours + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::OrSymbol + ) + ) + end + attr_accessor :type + + sig do + params( + individual_id: String, + earnings: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::OrHash + ], + employee_deductions: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::OrHash + ], + employer_contributions: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::OrHash + ], + gross_pay: Integer, + net_pay: Integer, + payment_method: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::OrSymbol + ), + taxes: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::OrHash + ], + total_hours: Float, + type: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + individual_id:, + earnings: nil, + employee_deductions: nil, + employer_contributions: nil, + gross_pay: nil, + net_pay: nil, + payment_method: nil, + taxes: nil, + total_hours: nil, + type: nil + ) + end + + sig do + override.returns( + { + individual_id: String, + earnings: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning + ], + employee_deductions: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction + ], + employer_contributions: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution + ], + gross_pay: Integer, + net_pay: Integer, + payment_method: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::OrSymbol + ), + taxes: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax + ], + total_hours: Float, + type: + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::OrSymbol + ) + } + ) + end + def to_hash + end + + class Earning < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(T.nilable(Integer)) } + attr_reader :amount + + sig { params(amount: Integer).void } + attr_writer :amount + + sig { returns(T.nilable(Float)) } + attr_reader :hours + + sig { params(hours: Float).void } + attr_writer :hours + + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol + ) + ) + end + attr_reader :type + + sig do + params( + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol + ).void + end + attr_writer :type + + sig do + params( + amount: Integer, + hours: Float, + name: String, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new(amount: nil, hours: nil, name: nil, type: nil) + end + + sig do + override.returns( + { + amount: Integer, + hours: Float, + name: String, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::OrSymbol + } + ) + end + def to_hash + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BONUS = + T.let( + :bonus, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + COMMISSION = + T.let( + :commission, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + DOUBLE_OVERTIME = + T.let( + :double_overtime, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + OTHER = + T.let( + :other, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + OVERTIME = + T.let( + :overtime, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + PTO = + T.let( + :pto, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + REIMBURSEMENT = + T.let( + :reimbursement, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + SALARY = + T.let( + :salary, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + SEVERANCE = + T.let( + :severance, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + SICK = + T.let( + :sick, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + TIPS = + T.let( + :tips, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + WAGE = + T.let( + :wage, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + TYPE_1099 = + T.let( + :"1099", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(T.nilable(Integer)) } + attr_reader :amount + + sig { params(amount: Integer).void } + attr_writer :amount + + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :pre_tax + + sig { params(pre_tax: T::Boolean).void } + attr_writer :pre_tax + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::OrSymbol + ) + ) + end + attr_reader :type + + sig do + params( + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::OrSymbol + ).void + end + attr_writer :type + + sig do + params( + amount: Integer, + name: String, + pre_tax: T::Boolean, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new(amount: nil, name: nil, pre_tax: nil, type: nil) + end + + sig do + override.returns( + { + amount: Integer, + name: String, + pre_tax: T::Boolean, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::OrSymbol + } + ) + end + def to_hash + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TYPE_457 = + T.let( + :"457", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + TYPE_401K = + T.let( + :"401k", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + TYPE_401K_ROTH = + T.let( + :"401k_roth", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + TYPE_401K_LOAN = + T.let( + :"401k_loan", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + TYPE_403B = + T.let( + :"403b", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + TYPE_403B_ROTH = + T.let( + :"403b_roth", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + TYPE_457_ROTH = + T.let( + :"457_roth", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + COMMUTER = + T.let( + :commuter, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + CUSTOM_POST_TAX = + T.let( + :custom_post_tax, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + CUSTOM_PRE_TAX = + T.let( + :custom_pre_tax, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + FSA_DEPENDENT_CARE = + T.let( + :fsa_dependent_care, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + FSA_MEDICAL = + T.let( + :fsa_medical, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + HSA_POST = + T.let( + :hsa_post, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + HSA_PRE = + T.let( + :hsa_pre, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + S125_DENTAL = + T.let( + :s125_dental, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + S125_MEDICAL = + T.let( + :s125_medical, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + S125_VISION = + T.let( + :s125_vision, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + SIMPLE = + T.let( + :simple, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + SIMPLE_IRA = + T.let( + :simple_ira, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(T.nilable(Integer)) } + attr_reader :amount + + sig { params(amount: Integer).void } + attr_writer :amount + + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::OrSymbol + ) + ) + end + attr_reader :type + + sig do + params( + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::OrSymbol + ).void + end + attr_writer :type + + sig do + params( + amount: Integer, + name: String, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new(amount: nil, name: nil, type: nil) + end + + sig do + override.returns( + { + amount: Integer, + name: String, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::OrSymbol + } + ) + end + def to_hash + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TYPE_457 = + T.let( + :"457", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + TYPE_401K = + T.let( + :"401k", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + TYPE_401K_ROTH = + T.let( + :"401k_roth", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + TYPE_401K_LOAN = + T.let( + :"401k_loan", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + TYPE_403B = + T.let( + :"403b", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + TYPE_403B_ROTH = + T.let( + :"403b_roth", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + TYPE_457_ROTH = + T.let( + :"457_roth", + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + COMMUTER = + T.let( + :commuter, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + CUSTOM_POST_TAX = + T.let( + :custom_post_tax, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + CUSTOM_PRE_TAX = + T.let( + :custom_pre_tax, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + FSA_DEPENDENT_CARE = + T.let( + :fsa_dependent_care, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + FSA_MEDICAL = + T.let( + :fsa_medical, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + HSA_POST = + T.let( + :hsa_post, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + HSA_PRE = + T.let( + :hsa_pre, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + S125_DENTAL = + T.let( + :s125_dental, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + S125_MEDICAL = + T.let( + :s125_medical, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + S125_VISION = + T.let( + :s125_vision, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + SIMPLE = + T.let( + :simple, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + SIMPLE_IRA = + T.let( + :simple_ira, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CHECK = + T.let( + :check, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol + ) + DIRECT_DEPOSIT = + T.let( + :direct_deposit, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol + ) + OTHER = + T.let( + :other, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Tax < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(T.nilable(Integer)) } + attr_reader :amount + + sig { params(amount: Integer).void } + attr_writer :amount + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :employer + + sig { params(employer: T::Boolean).void } + attr_writer :employer + + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + returns( + T.nilable( + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol + ) + ) + end + attr_reader :type + + sig do + params( + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol + ).void + end + attr_writer :type + + sig do + params( + amount: Integer, + employer: T::Boolean, + name: String, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new(amount: nil, employer: nil, name: nil, type: nil) + end + + sig do + override.returns( + { + amount: Integer, + employer: T::Boolean, + name: String, + type: + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::OrSymbol + } + ) + end + def to_hash + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FEDERAL = + T.let( + :federal, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + FICA = + T.let( + :fica, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + LOCAL = + T.let( + :local, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + STATE = + T.let( + :state, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF_CYCLE_PAYROLL = + T.let( + :off_cycle_payroll, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol + ) + ONE_TIME_PAYMENT = + T.let( + :one_time_payment, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol + ) + REGULAR_PAYROLL = + T.let( + :regular_payroll, + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end end end end diff --git a/rbi/finch_api/resources/sandbox/payment.rbi b/rbi/finch_api/resources/sandbox/payment.rbi index ff6bafaf..ed3f72a4 100644 --- a/rbi/finch_api/resources/sandbox/payment.rbi +++ b/rbi/finch_api/resources/sandbox/payment.rbi @@ -7,14 +7,18 @@ module FinchAPI # Add a new sandbox payment sig do params( - end_date: String, - pay_statements: T::Array[FinchAPI::HRIS::PayStatement::OrHash], - start_date: String, + end_date: Date, + pay_statements: + T::Array[ + FinchAPI::Sandbox::PaymentCreateParams::PayStatement::OrHash + ], + start_date: Date, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::Sandbox::PaymentCreateResponse) end def create( end_date: nil, + # Array of pay statements to include in the payment. pay_statements: nil, start_date: nil, request_options: {} diff --git a/sig/finch_api/models/sandbox/payment_create_params.rbs b/sig/finch_api/models/sandbox/payment_create_params.rbs index a3269ac3..1cd239b0 100644 --- a/sig/finch_api/models/sandbox/payment_create_params.rbs +++ b/sig/finch_api/models/sandbox/payment_create_params.rbs @@ -3,9 +3,9 @@ module FinchAPI module Sandbox type payment_create_params = { - end_date: String, - pay_statements: ::Array[FinchAPI::HRIS::PayStatement], - start_date: String + end_date: Date, + pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + start_date: Date } & FinchAPI::Internal::Type::request_parameters @@ -13,33 +13,444 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - attr_reader end_date: String? + attr_reader end_date: Date? - def end_date=: (String) -> String + def end_date=: (Date) -> Date - attr_reader pay_statements: ::Array[FinchAPI::HRIS::PayStatement]? + attr_reader pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement]? def pay_statements=: ( - ::Array[FinchAPI::HRIS::PayStatement] - ) -> ::Array[FinchAPI::HRIS::PayStatement] + ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] + ) -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] - attr_reader start_date: String? + attr_reader start_date: Date? - def start_date=: (String) -> String + def start_date=: (Date) -> Date def initialize: ( - ?end_date: String, - ?pay_statements: ::Array[FinchAPI::HRIS::PayStatement], - ?start_date: String, + ?end_date: Date, + ?pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + ?start_date: Date, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { - end_date: String, - pay_statements: ::Array[FinchAPI::HRIS::PayStatement], - start_date: String, + end_date: Date, + pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + start_date: Date, request_options: FinchAPI::RequestOptions } + + type pay_statement = + { + individual_id: String, + earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning], + employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction], + employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution], + gross_pay: Integer, + net_pay: Integer, + payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax], + total_hours: Float, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? + } + + class PayStatement < FinchAPI::Internal::Type::BaseModel + attr_accessor individual_id: String + + attr_reader earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning]? + + def earnings=: ( + ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning] + ) -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning] + + attr_reader employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction]? + + def employee_deductions=: ( + ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction] + ) -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction] + + attr_reader employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution]? + + def employer_contributions=: ( + ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution] + ) -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution] + + attr_reader gross_pay: Integer? + + def gross_pay=: (Integer) -> Integer + + attr_reader net_pay: Integer? + + def net_pay=: (Integer) -> Integer + + attr_accessor payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method? + + attr_reader taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax]? + + def taxes=: ( + ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax] + ) -> ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax] + + attr_reader total_hours: Float? + + def total_hours=: (Float) -> Float + + attr_accessor type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? + + def initialize: ( + individual_id: String, + ?earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning], + ?employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction], + ?employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution], + ?gross_pay: Integer, + ?net_pay: Integer, + ?payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + ?taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax], + ?total_hours: Float, + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? + ) -> void + + def to_hash: -> { + individual_id: String, + earnings: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning], + employee_deductions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction], + employer_contributions: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution], + gross_pay: Integer, + net_pay: Integer, + payment_method: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method?, + taxes: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax], + total_hours: Float, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_? + } + + type earning = + { + amount: Integer, + hours: Float, + name: String, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_ + } + + class Earning < FinchAPI::Internal::Type::BaseModel + attr_reader amount: Integer? + + def amount=: (Integer) -> Integer + + attr_reader hours: Float? + + def hours=: (Float) -> Float + + attr_reader name: String? + + def name=: (String) -> String + + attr_reader type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_? + + def type=: ( + FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_ + ) -> FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_ + + def initialize: ( + ?amount: Integer, + ?hours: Float, + ?name: String, + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + hours: Float, + name: String, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_ + } + + type type_ = + :bonus + | :commission + | :double_overtime + | :other + | :overtime + | :pto + | :reimbursement + | :salary + | :severance + | :sick + | :tips + | :wage + | :"1099" + + module Type + extend FinchAPI::Internal::Type::Enum + + BONUS: :bonus + COMMISSION: :commission + DOUBLE_OVERTIME: :double_overtime + OTHER: :other + OVERTIME: :overtime + PTO: :pto + REIMBURSEMENT: :reimbursement + SALARY: :salary + SEVERANCE: :severance + SICK: :sick + TIPS: :tips + WAGE: :wage + TYPE_1099: :"1099" + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::type_] + end + end + + type employee_deduction = + { + amount: Integer, + name: String, + pre_tax: bool, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_ + } + + class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel + attr_reader amount: Integer? + + def amount=: (Integer) -> Integer + + attr_reader name: String? + + def name=: (String) -> String + + attr_reader pre_tax: bool? + + def pre_tax=: (bool) -> bool + + attr_reader type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_? + + def type=: ( + FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_ + ) -> FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_ + + def initialize: ( + ?amount: Integer, + ?name: String, + ?pre_tax: bool, + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + name: String, + pre_tax: bool, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_ + } + + type type_ = + :"457" + | :"401k" + | :"401k_roth" + | :"401k_loan" + | :"403b" + | :"403b_roth" + | :"457_roth" + | :commuter + | :custom_post_tax + | :custom_pre_tax + | :fsa_dependent_care + | :fsa_medical + | :hsa_post + | :hsa_pre + | :s125_dental + | :s125_medical + | :s125_vision + | :simple + | :simple_ira + + module Type + extend FinchAPI::Internal::Type::Enum + + TYPE_457: :"457" + TYPE_401K: :"401k" + TYPE_401K_ROTH: :"401k_roth" + TYPE_401K_LOAN: :"401k_loan" + TYPE_403B: :"403b" + TYPE_403B_ROTH: :"403b_roth" + TYPE_457_ROTH: :"457_roth" + COMMUTER: :commuter + CUSTOM_POST_TAX: :custom_post_tax + CUSTOM_PRE_TAX: :custom_pre_tax + FSA_DEPENDENT_CARE: :fsa_dependent_care + FSA_MEDICAL: :fsa_medical + HSA_POST: :hsa_post + HSA_PRE: :hsa_pre + S125_DENTAL: :s125_dental + S125_MEDICAL: :s125_medical + S125_VISION: :s125_vision + SIMPLE: :simple + SIMPLE_IRA: :simple_ira + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::type_] + end + end + + type employer_contribution = + { + amount: Integer, + name: String, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_ + } + + class EmployerContribution < FinchAPI::Internal::Type::BaseModel + attr_reader amount: Integer? + + def amount=: (Integer) -> Integer + + attr_reader name: String? + + def name=: (String) -> String + + attr_reader type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_? + + def type=: ( + FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_ + ) -> FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_ + + def initialize: ( + ?amount: Integer, + ?name: String, + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + name: String, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_ + } + + type type_ = + :"457" + | :"401k" + | :"401k_roth" + | :"401k_loan" + | :"403b" + | :"403b_roth" + | :"457_roth" + | :commuter + | :custom_post_tax + | :custom_pre_tax + | :fsa_dependent_care + | :fsa_medical + | :hsa_post + | :hsa_pre + | :s125_dental + | :s125_medical + | :s125_vision + | :simple + | :simple_ira + + module Type + extend FinchAPI::Internal::Type::Enum + + TYPE_457: :"457" + TYPE_401K: :"401k" + TYPE_401K_ROTH: :"401k_roth" + TYPE_401K_LOAN: :"401k_loan" + TYPE_403B: :"403b" + TYPE_403B_ROTH: :"403b_roth" + TYPE_457_ROTH: :"457_roth" + COMMUTER: :commuter + CUSTOM_POST_TAX: :custom_post_tax + CUSTOM_PRE_TAX: :custom_pre_tax + FSA_DEPENDENT_CARE: :fsa_dependent_care + FSA_MEDICAL: :fsa_medical + HSA_POST: :hsa_post + HSA_PRE: :hsa_pre + S125_DENTAL: :s125_dental + S125_MEDICAL: :s125_medical + S125_VISION: :s125_vision + SIMPLE: :simple + SIMPLE_IRA: :simple_ira + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::type_] + end + end + + type payment_method = :check | :direct_deposit | :other + + module PaymentMethod + extend FinchAPI::Internal::Type::Enum + + CHECK: :check + DIRECT_DEPOSIT: :direct_deposit + OTHER: :other + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::payment_method] + end + + type tax = + { + amount: Integer, + employer: bool, + name: String, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_ + } + + class Tax < FinchAPI::Internal::Type::BaseModel + attr_reader amount: Integer? + + def amount=: (Integer) -> Integer + + attr_reader employer: bool? + + def employer=: (bool) -> bool + + attr_reader name: String? + + def name=: (String) -> String + + attr_reader type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_? + + def type=: ( + FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_ + ) -> FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_ + + def initialize: ( + ?amount: Integer, + ?employer: bool, + ?name: String, + ?type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + employer: bool, + name: String, + type: FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_ + } + + type type_ = :federal | :fica | :local | :state + + module Type + extend FinchAPI::Internal::Type::Enum + + FEDERAL: :federal + FICA: :fica + LOCAL: :local + STATE: :state + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::type_] + end + end + + type type_ = :off_cycle_payroll | :one_time_payment | :regular_payroll + + module Type + extend FinchAPI::Internal::Type::Enum + + OFF_CYCLE_PAYROLL: :off_cycle_payroll + ONE_TIME_PAYMENT: :one_time_payment + REGULAR_PAYROLL: :regular_payroll + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::type_] + end + end end end end diff --git a/sig/finch_api/resources/sandbox/payment.rbs b/sig/finch_api/resources/sandbox/payment.rbs index 0b803a92..f9c74b5d 100644 --- a/sig/finch_api/resources/sandbox/payment.rbs +++ b/sig/finch_api/resources/sandbox/payment.rbs @@ -3,9 +3,9 @@ module FinchAPI class Sandbox class Payment def create: ( - ?end_date: String, - ?pay_statements: ::Array[FinchAPI::HRIS::PayStatement], - ?start_date: String, + ?end_date: Date, + ?pay_statements: ::Array[FinchAPI::Sandbox::PaymentCreateParams::PayStatement], + ?start_date: Date, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::Sandbox::PaymentCreateResponse From 77fdc63fa78dd6356baf44cc3770902bfb83311b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 00:11:17 +0000 Subject: [PATCH 25/27] chore(ci): enable for pull requests --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a89508ac..106f992f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: From c4c01587e16d76f1c6b3f5a48414000954dc4805 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 01:54:43 +0000 Subject: [PATCH 26/27] fix: issue where we cannot mutate arrays on base model derivatives array properties are now always recursively coerced into the desire type upon being set, instead of "almost always" hash key names are no longer unnecessarily translated when creating base models via hash coercion errors are now stored and re-thrown instead of being re-computed each property access fixed inconsistencies where sometimes `TypeError`s would be thrown instead of `ArgumentError`s, and vice versa --- lib/finch_api/errors.rb | 22 ++++ lib/finch_api/internal/type/array_of.rb | 7 +- lib/finch_api/internal/type/base_model.rb | 102 +++++++++++++----- lib/finch_api/internal/type/boolean.rb | 8 +- lib/finch_api/internal/type/converter.rb | 76 +++++++------ lib/finch_api/internal/type/enum.rb | 12 ++- lib/finch_api/internal/type/file_input.rb | 7 +- lib/finch_api/internal/type/hash_of.rb | 7 +- lib/finch_api/internal/type/union.rb | 19 ++-- lib/finch_api/internal/type/unknown.rb | 8 +- rbi/finch_api/errors.rbi | 16 +++ rbi/finch_api/internal/type/boolean.rbi | 2 + rbi/finch_api/internal/type/converter.rbi | 30 +++--- rbi/finch_api/internal/type/union.rbi | 5 + rbi/finch_api/internal/type/unknown.rbi | 2 + sig/finch_api/errors.rbs | 9 ++ sig/finch_api/internal/type/converter.rbs | 8 +- .../internal/type/base_model_test.rb | 69 ++++++++---- 18 files changed, 299 insertions(+), 110 deletions(-) diff --git a/lib/finch_api/errors.rb b/lib/finch_api/errors.rb index db324534..fbcaa508 100644 --- a/lib/finch_api/errors.rb +++ b/lib/finch_api/errors.rb @@ -9,6 +9,28 @@ class Error < StandardError end class ConversionError < FinchAPI::Errors::Error + # @return [StandardError, nil] + def cause = @cause.nil? ? super : @cause + + # @api private + # + # @param on [Class] + # @param method [Symbol] + # @param target [Object] + # @param value [Object] + # @param cause [StandardError, nil] + def initialize(on:, method:, target:, value:, cause: nil) + cls = on.name.split("::").last + + message = [ + "Failed to parse #{cls}.#{method} from #{value.class} to #{target.inspect}.", + "To get the unparsed API response, use #{cls}[#{method.inspect}].", + cause && "Cause: #{cause.message}" + ].filter(&:itself).join(" ") + + @cause = cause + super(message) + end end class APIError < FinchAPI::Errors::Error diff --git a/lib/finch_api/internal/type/array_of.rb b/lib/finch_api/internal/type/array_of.rb index dc92c492..9fdffed7 100644 --- a/lib/finch_api/internal/type/array_of.rb +++ b/lib/finch_api/internal/type/array_of.rb @@ -62,10 +62,14 @@ def hash = [self.class, item_type].hash # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Array, Object] @@ -74,6 +78,7 @@ def coerce(value, state:) unless value.is_a?(Array) exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{Array}") return value end diff --git a/lib/finch_api/internal/type/base_model.rb b/lib/finch_api/internal/type/base_model.rb index b8fc7959..75e26847 100644 --- a/lib/finch_api/internal/type/base_model.rb +++ b/lib/finch_api/internal/type/base_model.rb @@ -60,7 +60,7 @@ def fields [FinchAPI::Internal::Type::Converter.type_info(type_info), type_info] end - setter = "#{name_sym}=" + setter = :"#{name_sym}=" api_name = info.fetch(:api_name, name_sym) nilable = info.fetch(:nil?, false) const = if required && !nilable @@ -84,30 +84,61 @@ def fields type_fn: type_fn } - define_method(setter) { @data.store(name_sym, _1) } + define_method(setter) do |value| + target = type_fn.call + state = FinchAPI::Internal::Type::Converter.new_coerce_state(translate_names: false) + coerced = FinchAPI::Internal::Type::Converter.coerce(target, value, state: state) + status = @coerced.store(name_sym, state.fetch(:error) || true) + stored = + case [target, status] + in [FinchAPI::Internal::Type::Converter | Symbol, true] + coerced + else + value + end + @data.store(name_sym, stored) + end + # rubocop:disable Style/CaseEquality + # rubocop:disable Metrics/BlockLength define_method(name_sym) do target = type_fn.call - value = @data.fetch(name_sym) { const == FinchAPI::Internal::OMIT ? nil : const } - state = {strictness: :strong, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} - if (nilable || !required) && value.nil? - nil - else - FinchAPI::Internal::Type::Converter.coerce( - target, - value, - state: state + + case @coerced[name_sym] + in true | false if FinchAPI::Internal::Type::Converter === target + @data.fetch(name_sym) + in ::StandardError => e + raise FinchAPI::Errors::ConversionError.new( + on: self.class, + method: __method__, + target: target, + value: @data.fetch(name_sym), + cause: e ) + else + Kernel.then do + value = @data.fetch(name_sym) { const == FinchAPI::Internal::OMIT ? nil : const } + state = FinchAPI::Internal::Type::Converter.new_coerce_state(translate_names: false) + if (nilable || !required) && value.nil? + nil + else + FinchAPI::Internal::Type::Converter.coerce( + target, value, state: state + ) + end + rescue StandardError => e + raise FinchAPI::Errors::ConversionError.new( + on: self.class, + method: __method__, + target: target, + value: value, + cause: e + ) + end end - rescue StandardError => e - cls = self.class.name.split("::").last - message = [ - "Failed to parse #{cls}.#{__method__} from #{value.class} to #{target.inspect}.", - "To get the unparsed API response, use #{cls}[#{__method__.inspect}].", - "Cause: #{e.message}" - ].join(" ") - raise FinchAPI::Errors::ConversionError.new(message) end + # rubocop:enable Metrics/BlockLength + # rubocop:enable Style/CaseEquality end # @api private @@ -207,23 +238,28 @@ class << self # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [self, Object] def coerce(value, state:) exactness = state.fetch(:exactness) - if value.is_a?(self.class) + if value.is_a?(self) exactness[:yes] += 1 return value end unless (val = FinchAPI::Internal::Util.coerce_hash(value)).is_a?(Hash) exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{Hash}") return value end exactness[:yes] += 1 @@ -231,13 +267,15 @@ def coerce(value, state:) keys = val.keys.to_set instance = new data = instance.to_h + status = instance.instance_variable_get(:@coerced) # rubocop:disable Metrics/BlockLength fields.each do |name, field| mode, required, target = field.fetch_values(:mode, :required, :type) api_name, nilable, const = field.fetch_values(:api_name, :nilable, :const) + src_name = state.fetch(:translate_names) ? api_name : name - unless val.key?(api_name) + unless val.key?(src_name) if required && mode != :dump && const == FinchAPI::Internal::OMIT exactness[nilable ? :maybe : :no] += 1 else @@ -246,9 +284,10 @@ def coerce(value, state:) next end - item = val.fetch(api_name) - keys.delete(api_name) + item = val.fetch(src_name) + keys.delete(src_name) + state[:error] = nil converted = if item.nil? && (nilable || !required) exactness[nilable ? :yes : :maybe] += 1 @@ -262,6 +301,8 @@ def coerce(value, state:) item end end + + status.store(name, state.fetch(:error) || true) data.store(name, converted) end # rubocop:enable Metrics/BlockLength @@ -437,7 +478,18 @@ def to_yaml(*a) = FinchAPI::Internal::Type::Converter.dump(self.class, self).to_ # Create a new instance of a model. # # @param data [Hash{Symbol=>Object}, self] - def initialize(data = {}) = (@data = FinchAPI::Internal::Util.coerce_hash!(data).to_h) + def initialize(data = {}) + @data = {} + @coerced = {} + FinchAPI::Internal::Util.coerce_hash!(data).each do + if self.class.known_fields.key?(_1) + public_send(:"#{_1}=", _2) + else + @data.store(_1, _2) + @coerced.store(_1, false) + end + end + end class << self # @api private diff --git a/lib/finch_api/internal/type/boolean.rb b/lib/finch_api/internal/type/boolean.rb index aa924b9e..99cecab8 100644 --- a/lib/finch_api/internal/type/boolean.rb +++ b/lib/finch_api/internal/type/boolean.rb @@ -31,14 +31,20 @@ def self.==(other) = other.is_a?(Class) && other <= FinchAPI::Internal::Type::Bo class << self # @api private # + # Coerce value to Boolean if possible, otherwise return the original value. + # # @param value [Boolean, Object] # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Boolean, Object] diff --git a/lib/finch_api/internal/type/converter.rb b/lib/finch_api/internal/type/converter.rb index 4c9a4bbc..92b65936 100644 --- a/lib/finch_api/internal/type/converter.rb +++ b/lib/finch_api/internal/type/converter.rb @@ -15,10 +15,14 @@ module Converter # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] @@ -94,6 +98,21 @@ def type_info(spec) end end + # @api private + # + # @param translate_names [Boolean] + # + # @return [Hash{Symbol=>Object}] + def new_coerce_state(translate_names: true) + { + translate_names: translate_names, + strictness: true, + exactness: {yes: 0, no: 0, maybe: 0}, + error: nil, + branched: 0 + } + end + # @api private # # Based on `target`, transform `value` into `target`, to the extent possible: @@ -110,14 +129,11 @@ def type_info(spec) # # @param value [Object] # - # @param state [Hash{Symbol=>Object}] The `strictness` is one of `true`, `false`, or `:strong`. This informs the - # coercion strategy when we have to decide between multiple possible conversion - # targets: + # @param state [Hash{Symbol=>Object}] The `strictness` is one of `true`, `false`. This informs the coercion strategy + # when we have to decide between multiple possible conversion targets: # # - `true`: the conversion must be exact, with minimum coercion. # - `false`: the conversion can be approximate, with some coercion. - # - `:strong`: the conversion must be exact, with no coercion, and raise an error - # if not possible. # # The `exactness` is `Hash` with keys being one of `yes`, `no`, or `maybe`. For # any given conversion attempt, the exactness will be updated based on how closely @@ -130,21 +146,20 @@ def type_info(spec) # # See implementation below for more details. # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] - def coerce( - target, - value, - state: {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} - ) - # rubocop:disable Lint/SuppressedException + def coerce(target, value, state: FinchAPI::Internal::Type::Converter.new_coerce_state) # rubocop:disable Metrics/BlockNesting - strictness, exactness = state.fetch_values(:strictness, :exactness) + exactness = state.fetch(:exactness) case target in FinchAPI::Internal::Type::Converter @@ -160,29 +175,26 @@ def coerce( exactness[value.nil? ? :yes : :maybe] += 1 return nil in -> { _1 <= Integer } - if value.is_a?(Integer) + case value + in Integer exactness[:yes] += 1 return value - elsif strictness == :strong && Integer(value, exception: false) != value - message = "no implicit conversion of #{value.class} into #{target.inspect}" - raise value.is_a?(Numeric) ? ArgumentError.new(message) : TypeError.new(message) else Kernel.then do return Integer(value).tap { exactness[:maybe] += 1 } - rescue ArgumentError, TypeError + rescue ArgumentError, TypeError => e + state[:error] = e end end in -> { _1 <= Float } if value.is_a?(Numeric) exactness[:yes] += 1 return Float(value) - elsif strictness == :strong - message = "no implicit conversion of #{value.class} into #{target.inspect}" - raise TypeError.new(message) else Kernel.then do return Float(value).tap { exactness[:maybe] += 1 } - rescue ArgumentError, TypeError + rescue ArgumentError, TypeError => e + state[:error] = e end end in -> { _1 <= String } @@ -194,16 +206,13 @@ def coerce( exactness[:yes] += 1 return value.string else - if strictness == :strong - message = "no implicit conversion of #{value.class} into #{target.inspect}" - raise TypeError.new(message) - end + state[:error] = TypeError.new("#{value.class} can't be coerced into #{String}") end in -> { _1 <= Date || _1 <= Time } Kernel.then do return target.parse(value).tap { exactness[:yes] += 1 } rescue ArgumentError, TypeError => e - raise e if strictness == :strong + state[:error] = e end in -> { _1 <= StringIO } if value.is_a?(String) exactness[:yes] += 1 @@ -221,10 +230,8 @@ def coerce( return value end else - if strictness == :strong - message = "cannot convert non-matching #{value.class} into #{target.inspect}" - raise ArgumentError.new(message) - end + message = "cannot convert non-matching #{value.class} into #{target.inspect}" + state[:error] = ArgumentError.new(message) end else end @@ -232,7 +239,6 @@ def coerce( exactness[:no] += 1 value # rubocop:enable Metrics/BlockNesting - # rubocop:enable Lint/SuppressedException end # @api private @@ -277,8 +283,10 @@ def inspect(target, depth:) define_sorbet_constant!(:CoerceState) do T.type_alias do { - strictness: T.any(T::Boolean, Symbol), + translate_names: T::Boolean, + strictness: T::Boolean, exactness: {yes: Integer, no: Integer, maybe: Integer}, + error: T::Class[StandardError], branched: Integer } end diff --git a/lib/finch_api/internal/type/enum.rb b/lib/finch_api/internal/type/enum.rb index cb054c05..2d96e5d7 100644 --- a/lib/finch_api/internal/type/enum.rb +++ b/lib/finch_api/internal/type/enum.rb @@ -81,10 +81,14 @@ def hash = values.to_set.hash # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Symbol, Object] @@ -95,8 +99,12 @@ def coerce(value, state:) if values.include?(val) exactness[:yes] += 1 val + elsif values.first&.class == val.class + exactness[:maybe] += 1 + value else - exactness[values.first&.class == val.class ? :maybe : :no] += 1 + exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{self}") value end end diff --git a/lib/finch_api/internal/type/file_input.rb b/lib/finch_api/internal/type/file_input.rb index a350a782..b3d67e3c 100644 --- a/lib/finch_api/internal/type/file_input.rb +++ b/lib/finch_api/internal/type/file_input.rb @@ -45,10 +45,14 @@ class << self # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [StringIO, Object] @@ -62,6 +66,7 @@ def coerce(value, state:) exactness[:yes] += 1 value else + state[:error] = TypeError.new("#{value.class} can't be coerced into #{StringIO}") exactness[:no] += 1 value end diff --git a/lib/finch_api/internal/type/hash_of.rb b/lib/finch_api/internal/type/hash_of.rb index 69e71fd0..f4750e0d 100644 --- a/lib/finch_api/internal/type/hash_of.rb +++ b/lib/finch_api/internal/type/hash_of.rb @@ -77,10 +77,14 @@ def hash = [self.class, item_type].hash # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Hash{Symbol=>Object}, Object] @@ -89,6 +93,7 @@ def coerce(value, state:) unless value.is_a?(Hash) exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{Hash}") return value end diff --git a/lib/finch_api/internal/type/union.rb b/lib/finch_api/internal/type/union.rb index c6738c61..d3076a27 100644 --- a/lib/finch_api/internal/type/union.rb +++ b/lib/finch_api/internal/type/union.rb @@ -136,14 +136,23 @@ def hash = variants.hash # @api private # + # Tries to efficiently coerce the given value to one of the known variants. + # + # If the value cannot match any of the known variants, the coercion is considered + # non-viable and returns the original value. + # # @param value [Object] # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] @@ -154,7 +163,6 @@ def coerce(value, state:) strictness = state.fetch(:strictness) exactness = state.fetch(:exactness) - state[:strictness] = strictness == :strong ? true : strictness alternatives = [] known_variants.each do |_, variant_fn| @@ -173,13 +181,10 @@ def coerce(value, state:) end end - case alternatives.sort_by(&:first) + case alternatives.sort_by!(&:first) in [] exactness[:no] += 1 - if strictness == :strong - message = "no possible conversion of #{value.class} into a variant of #{target.inspect}" - raise ArgumentError.new(message) - end + state[:error] = ArgumentError.new("no matching variant for #{value.inspect}") value in [[_, exact, coerced], *] exact.each { exactness[_1] += _2 } diff --git a/lib/finch_api/internal/type/unknown.rb b/lib/finch_api/internal/type/unknown.rb index 330b96d5..f35d6c44 100644 --- a/lib/finch_api/internal/type/unknown.rb +++ b/lib/finch_api/internal/type/unknown.rb @@ -33,14 +33,20 @@ def self.==(other) = other.is_a?(Class) && other <= FinchAPI::Internal::Type::Un class << self # @api private # + # No coercion needed for Unknown type. + # # @param value [Object] # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] diff --git a/rbi/finch_api/errors.rbi b/rbi/finch_api/errors.rbi index 205195c6..1898896e 100644 --- a/rbi/finch_api/errors.rbi +++ b/rbi/finch_api/errors.rbi @@ -8,6 +8,22 @@ module FinchAPI end class ConversionError < FinchAPI::Errors::Error + sig { returns(T.nilable(StandardError)) } + def cause + end + + # @api private + sig do + params( + on: T::Class[StandardError], + method: Symbol, + target: T.anything, + value: T.anything, + cause: T.nilable(StandardError) + ).returns(T.attached_class) + end + def self.new(on:, method:, target:, value:, cause: nil) + end end class APIError < FinchAPI::Errors::Error diff --git a/rbi/finch_api/internal/type/boolean.rbi b/rbi/finch_api/internal/type/boolean.rbi index 55044b98..1304f535 100644 --- a/rbi/finch_api/internal/type/boolean.rbi +++ b/rbi/finch_api/internal/type/boolean.rbi @@ -22,6 +22,8 @@ module FinchAPI class << self # @api private + # + # Coerce value to Boolean if possible, otherwise return the original value. sig do override .params( diff --git a/rbi/finch_api/internal/type/converter.rbi b/rbi/finch_api/internal/type/converter.rbi index e89c3738..b8c0e857 100644 --- a/rbi/finch_api/internal/type/converter.rbi +++ b/rbi/finch_api/internal/type/converter.rbi @@ -15,12 +15,14 @@ module FinchAPI CoerceState = T.type_alias do { - strictness: T.any(T::Boolean, Symbol), + translate_names: T::Boolean, + strictness: T::Boolean, exactness: { yes: Integer, no: Integer, maybe: Integer }, + error: T::Class[StandardError], branched: Integer } end @@ -88,6 +90,15 @@ module FinchAPI def self.type_info(spec) end + # @api private + sig do + params(translate_names: T::Boolean).returns( + FinchAPI::Internal::Type::Converter::CoerceState + ) + end + def self.new_coerce_state(translate_names: true) + end + # @api private # # Based on `target`, transform `value` into `target`, to the extent possible: @@ -109,14 +120,11 @@ module FinchAPI def self.coerce( target, value, - # The `strictness` is one of `true`, `false`, or `:strong`. This informs the - # coercion strategy when we have to decide between multiple possible conversion - # targets: + # The `strictness` is one of `true`, `false`. This informs the coercion strategy + # when we have to decide between multiple possible conversion targets: # # - `true`: the conversion must be exact, with minimum coercion. # - `false`: the conversion can be approximate, with some coercion. - # - `:strong`: the conversion must be exact, with no coercion, and raise an error - # if not possible. # # The `exactness` is `Hash` with keys being one of `yes`, `no`, or `maybe`. For # any given conversion attempt, the exactness will be updated based on how closely @@ -128,15 +136,7 @@ module FinchAPI # - `no`: the value cannot be converted to the target type. # # See implementation below for more details. - state: { - strictness: true, - exactness: { - yes: 0, - no: 0, - maybe: 0 - }, - branched: 0 - } + state: FinchAPI::Internal::Type::Converter.new_coerce_state ) end diff --git a/rbi/finch_api/internal/type/union.rbi b/rbi/finch_api/internal/type/union.rbi index d5f43cf4..1a64742e 100644 --- a/rbi/finch_api/internal/type/union.rbi +++ b/rbi/finch_api/internal/type/union.rbi @@ -78,6 +78,11 @@ module FinchAPI end # @api private + # + # Tries to efficiently coerce the given value to one of the known variants. + # + # If the value cannot match any of the known variants, the coercion is considered + # non-viable and returns the original value. sig do override .params( diff --git a/rbi/finch_api/internal/type/unknown.rbi b/rbi/finch_api/internal/type/unknown.rbi index 7048e573..0f6d3d36 100644 --- a/rbi/finch_api/internal/type/unknown.rbi +++ b/rbi/finch_api/internal/type/unknown.rbi @@ -22,6 +22,8 @@ module FinchAPI class << self # @api private + # + # No coercion needed for Unknown type. sig do override .params( diff --git a/sig/finch_api/errors.rbs b/sig/finch_api/errors.rbs index c15a87cd..9fa8cfbb 100644 --- a/sig/finch_api/errors.rbs +++ b/sig/finch_api/errors.rbs @@ -5,6 +5,15 @@ module FinchAPI end class ConversionError < FinchAPI::Errors::Error + def cause: -> StandardError? + + def initialize: ( + on: Class, + method: Symbol, + target: top, + value: top, + ?cause: StandardError? + ) -> void end class APIError < FinchAPI::Errors::Error diff --git a/sig/finch_api/internal/type/converter.rbs b/sig/finch_api/internal/type/converter.rbs index 304b7dcf..dc39f1a3 100644 --- a/sig/finch_api/internal/type/converter.rbs +++ b/sig/finch_api/internal/type/converter.rbs @@ -8,8 +8,10 @@ module FinchAPI type coerce_state = { - strictness: bool | :strong, + translate_names: bool, + strictness: bool, exactness: { yes: Integer, no: Integer, maybe: Integer }, + error: Class, branched: Integer } @@ -37,6 +39,10 @@ module FinchAPI | FinchAPI::Internal::Type::Converter::input spec ) -> (^-> top) + def self.new_coerce_state: ( + ?translate_names: bool + ) -> FinchAPI::Internal::Type::Converter::coerce_state + def self.coerce: ( FinchAPI::Internal::Type::Converter::input target, top value, diff --git a/test/finch_api/internal/type/base_model_test.rb b/test/finch_api/internal/type/base_model_test.rb index 7da74cc3..02ea4cb1 100644 --- a/test/finch_api/internal/type/base_model_test.rb +++ b/test/finch_api/internal/type/base_model_test.rb @@ -66,7 +66,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = FinchAPI::Internal::Type::Converter.new_coerce_state assert_pattern do FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) => ^expect state.fetch(:exactness).filter { _2.nonzero? }.to_h => ^exactness @@ -108,18 +108,19 @@ def test_dump def test_coerce_errors cases = { - [Integer, "one"] => TypeError, - [Float, "one"] => TypeError, + [Integer, "one"] => ArgumentError, + [Float, "one"] => ArgumentError, [String, Time] => TypeError, [Date, "one"] => ArgumentError, [Time, "one"] => ArgumentError } - cases.each do - target, input = _1 - state = {strictness: :strong, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} - assert_raises(_2) do - FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) + cases.each do |testcase, expect| + target, input = testcase + state = FinchAPI::Internal::Type::Converter.new_coerce_state + FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) + assert_pattern do + state => {error: ^expect} end end end @@ -217,7 +218,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = FinchAPI::Internal::Type::Converter.new_coerce_state assert_pattern do FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) => ^expect state.fetch(:exactness).filter { _2.nonzero? }.to_h => ^exactness @@ -291,7 +292,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = FinchAPI::Internal::Type::Converter.new_coerce_state assert_pattern do FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) => ^expect state.fetch(:exactness).filter { _2.nonzero? }.to_h => ^exactness @@ -340,6 +341,7 @@ class M5 < FinchAPI::Internal::Type::BaseModel class M6 < M1 required :a, FinchAPI::Internal::Type::ArrayOf[M6] + optional :b, M6 end def test_coerce @@ -365,13 +367,14 @@ def test_coerce [M5, {d: "d"}] => [{yes: 3}, {d: :d}], [M5, {d: nil}] => [{yes: 2, no: 1}, {d: nil}], - [M6, {a: [{a: []}]}] => [{yes: 4}, -> { _1 in {a: [M6]} }] + [M6, {a: [{a: []}]}] => [{yes: 6}, -> { _1 in {a: [M6]} }], + [M6, {b: {a: []}}] => [{yes: 4, no: 1}, -> { _1 in {b: M6} }] } cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = FinchAPI::Internal::Type::Converter.new_coerce_state assert_pattern do coerced = FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) assert_equal(coerced, coerced) @@ -410,20 +413,26 @@ def test_dump def test_accessors cases = { - M2.new({a: "1990-09-19", b: "1"}) => {a: Time.new(1990, 9, 19), b: TypeError}, - M2.new(a: "one", b: "one") => {a: ArgumentError, b: TypeError}, - M2.new(a: nil, b: 2.0) => {a: TypeError}, - M2.new(a: nil, b: 2.2) => {a: TypeError, b: ArgumentError}, + M2.new({a: "1990-09-19", b: "1"}) => [{a: "1990-09-19", b: "1"}, {a: Time.new(1990, 9, 19), b: 1}], + M2.new(a: "one", b: "one") => [{a: "one", b: "one"}, {a: ArgumentError, b: ArgumentError}], + M2.new(a: nil, b: 2.0) => [{a: nil, b: 2.0}, {a: TypeError}], + M2.new(a: nil, b: 2.2) => [{a: nil, b: 2.2}, {a: TypeError, b: 2}], - M3.new => {d: :d}, - M3.new(d: 1) => {d: ArgumentError}, + M3.new => [{}, {d: :d}], + M3.new(d: 1) => [{d: 1}, {d: ArgumentError}], - M5.new => {c: :c, d: :d} + M5.new => [{}, {c: :c, d: :d}] } cases.each do target = _1 - _2.each do |accessor, expect| + data, attributes = _2 + + assert_pattern do + target.to_h => ^data + end + + attributes.each do |accessor, expect| case expect in Class if expect <= StandardError tap do @@ -438,6 +447,24 @@ def test_accessors end end end + + def test_inplace_modification + m1 = M6.new(a: []) + m1.a << M6.new(a: []) + + m2 = M6.new(b: M6.new(a: [])) + m2.b.a << M6.new(a: []) + + m3 = M6.new(a: []) + m4 = M6.new(b: m3) + m3.a << M6.new(a: []) + + assert_pattern do + m1 => {a: [{a: []}]} + m2 => {b: {a: [{a: []}]}} + m4 => {b: {a: [{a: []}]}} + end + end end class FinchAPI::Test::UnionTest < Minitest::Test @@ -555,7 +582,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, branched, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = FinchAPI::Internal::Type::Converter.new_coerce_state assert_pattern do coerced = FinchAPI::Internal::Type::Converter.coerce(target, input, state: state) assert_equal(coerced, coerced) From c8801fdbdaf3bb4962fd1730715d1d4adc04298a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 01:55:11 +0000 Subject: [PATCH 27/27] release: 0.1.0-alpha.20 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 37 +++++++++++++++++++++++++++++++++++ README.md | 2 +- lib/finch_api/version.rb | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b386befd..fac14074 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.19" + ".": "0.1.0-alpha.20" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd515d6..ed2c055f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ # Changelog +## 0.1.0-alpha.20 (2025-06-18) + +Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.19...v0.1.0-alpha.20) + +### Features + +* **api:** api update ([6a3cc47](https://github.com/Finch-API/finch-api-ruby/commit/6a3cc47713d3f52d84da946c1f86c328692a71f1)) +* **api:** api update ([055b260](https://github.com/Finch-API/finch-api-ruby/commit/055b260f9607ea1c408510bf19c86390ba515b48)) +* **api:** api update ([6e46c62](https://github.com/Finch-API/finch-api-ruby/commit/6e46c62b78b34d3944136bea9decd9254b9d7b2c)) +* **api:** api update ([68d04c3](https://github.com/Finch-API/finch-api-ruby/commit/68d04c3e38f076254375ef4e1ea24383d7ff7aa2)) + + +### Bug Fixes + +* `to_sorbet_type` should not return branded types ([2819280](https://github.com/Finch-API/finch-api-ruby/commit/281928010fa852dd399354a4561191120e85ad00)) +* **client:** fix PayStatementResponse body ([bb0bb58](https://github.com/Finch-API/finch-api-ruby/commit/bb0bb581ffc994714895363e21f461e2ec82676e)) +* **client:** manual fix ([3774286](https://github.com/Finch-API/finch-api-ruby/commit/3774286f68227085e6f54396290e3de7569bba0d)) +* correctly instantiate sorbet type aliases for enums and unions ([9a84b92](https://github.com/Finch-API/finch-api-ruby/commit/9a84b92df48e001ee28989703cbe8bdd9f461528)) +* default content-type for text in multi-part formdata uploads should be text/plain ([2288848](https://github.com/Finch-API/finch-api-ruby/commit/2288848990739f298069c86ad90d915c1bd88c60)) +* issue where we cannot mutate arrays on base model derivatives ([c4c0158](https://github.com/Finch-API/finch-api-ruby/commit/c4c01587e16d76f1c6b3f5a48414000954dc4805)) +* prevent rubocop from mangling `===` to `is_a?` check ([6301929](https://github.com/Finch-API/finch-api-ruby/commit/6301929d697ae1c006446a12e6c67046e83ef132)) +* sorbet types for enums, and make tapioca detection ignore `tapioca dsl` ([4aaba62](https://github.com/Finch-API/finch-api-ruby/commit/4aaba6261e6c92833ab6e46acb2e2652da843be9)) + + +### Chores + +* **ci:** enable for pull requests ([77fdc63](https://github.com/Finch-API/finch-api-ruby/commit/77fdc63fa78dd6356baf44cc3770902bfb83311b)) +* **ci:** link to correct github repo ([6479e22](https://github.com/Finch-API/finch-api-ruby/commit/6479e2217a712d55aac84da1041a88efcbd4f1f2)) +* **docs:** grammar improvements ([0c55f26](https://github.com/Finch-API/finch-api-ruby/commit/0c55f26abe131663cfe8e739b95154172d967085)) +* force utf-8 locale via `RUBYOPT` when formatting ([2f00817](https://github.com/Finch-API/finch-api-ruby/commit/2f008175f0a18dc01a0c2b900c2e692f77b3a0ac)) +* **internal:** version bump ([2b40219](https://github.com/Finch-API/finch-api-ruby/commit/2b4021961b248f64cb9c5564b4199d0c840593fd)) +* refine Yard and Sorbet types and ensure linting is turned on for examples ([e0eb636](https://github.com/Finch-API/finch-api-ruby/commit/e0eb63695b803e35dd9e35a57cd0769a60db7bc7)) +* **tests:** skip endpoints with basic auth ([529b41e](https://github.com/Finch-API/finch-api-ruby/commit/529b41ea3cf67b553d85e36a256cc5d6c4b13800)) +* use fully qualified names for yard annotations and rbs aliases ([98866d5](https://github.com/Finch-API/finch-api-ruby/commit/98866d5133c2afb76b141045f1361705f9bac94a)) +* use sorbet union aliases where available ([37cc1c2](https://github.com/Finch-API/finch-api-ruby/commit/37cc1c27968a448e7bfef8527a0f3105b476de09)) +* whitespaces ([16ff9b3](https://github.com/Finch-API/finch-api-ruby/commit/16ff9b32a68eecb17c5719b354de64fe788bedd4)) + ## 0.1.0-alpha.19 (2025-05-16) Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.18...v0.1.0-alpha.19) diff --git a/README.md b/README.md index 2ed7ff5d..0e9e2e41 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.19" +gem "finch-api", "~> 0.1.0.pre.alpha.20" ``` diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 6a104193..cc171f46 100644 --- a/lib/finch_api/version.rb +++ b/lib/finch_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module FinchAPI - VERSION = "0.1.0.pre.alpha.19" + VERSION = "0.1.0.pre.alpha.20" end