diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 52b3e834..a899ac74 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.30" + ".": "0.1.0-alpha.31" } \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml index 9afe9e0f..7d3e3372 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -121,6 +121,10 @@ Metrics/BlockLength: Metrics/ClassLength: Enabled: false +Metrics/CollectionLiteralLength: + Exclude: + - "test/**/*" + Metrics/CyclomaticComplexity: Enabled: false diff --git a/.stats.yml b/.stats.yml index 496cf9a0..ee607421 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-bb50c0ae41ff5036adf72344d33057941f6de67c5fae811eba2e758bfa4ffd31.yml -openapi_spec_hash: 1b21e4bfc46daeef1613e410e5aa8f28 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0105d239fcaf84750c886dfa6c2cfbf2b2087f89a48f8827c4cbe28479ebfb13.yml +openapi_spec_hash: 34895c3d3c137fb9f5a019ac5370afbb config_hash: 6d3585c0032e08d723d077d660fc8448 diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f69b1f..fc775988 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## 0.1.0-alpha.31 (2025-10-27) + +Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.30...v0.1.0-alpha.31) + +### Features + +* **api:** api update ([2c193f3](https://github.com/Finch-API/finch-api-ruby/commit/2c193f3efeec2a63a845a399a8ed678a95e14dd9)) +* **api:** api update ([a463808](https://github.com/Finch-API/finch-api-ruby/commit/a4638080bfdd91ed19083a7cf3f43b1cee5a8568)) +* **api:** api update ([4e526be](https://github.com/Finch-API/finch-api-ruby/commit/4e526befab7e3cc48a0b13cd869ff81df27f9469)) +* **api:** api update ([78a45f9](https://github.com/Finch-API/finch-api-ruby/commit/78a45f95a0ad4dbed56b70c66427c9158933383e)) +* **api:** api update ([61d827e](https://github.com/Finch-API/finch-api-ruby/commit/61d827e756ba40a17532ac75694370b666eed062)) +* **api:** api update ([0d1e8ba](https://github.com/Finch-API/finch-api-ruby/commit/0d1e8baa59306512f78750f4c5bfef9f2d66e0e6)) +* **api:** api update ([31c3661](https://github.com/Finch-API/finch-api-ruby/commit/31c3661fa11d6f74224e9c0af9b5dcee877183ee)) +* **api:** api update ([ab22783](https://github.com/Finch-API/finch-api-ruby/commit/ab2278377aae4058398fa1540df2a16f5cbaf704)) +* **api:** api update ([66b8a64](https://github.com/Finch-API/finch-api-ruby/commit/66b8a6446d12b5222a2408af0de686b94afff297)) +* expose response headers for both streams and errors ([45672bb](https://github.com/Finch-API/finch-api-ruby/commit/45672bb5a1b70d8fc1ea4acf2fa89044284d7fab)) +* handle thread interrupts in the core HTTP client ([97627a2](https://github.com/Finch-API/finch-api-ruby/commit/97627a28d523f0554075ca469e94aae6cc111def)) + + +### Bug Fixes + +* absolutely qualified uris should always override the default ([96b3cd9](https://github.com/Finch-API/finch-api-ruby/commit/96b3cd9ab133c0bb0b30cc151c9c1e3e1493d97e)) +* always send `filename=...` for multipart requests where a file is expected ([ee2e0ed](https://github.com/Finch-API/finch-api-ruby/commit/ee2e0ed334b365dbc89ec602402310695d48922b)) +* coroutine leaks from connection pool ([ed8c82c](https://github.com/Finch-API/finch-api-ruby/commit/ed8c82c1de78c5416bf2704b2c7208289d5526d6)) +* **internal:** use null byte as file separator in the fast formatting script ([8387c75](https://github.com/Finch-API/finch-api-ruby/commit/8387c751006f4e9832bbfcd87fc22a0e10c1e7cf)) +* shorten multipart boundary sep to less than RFC specificed max length ([df686c5](https://github.com/Finch-API/finch-api-ruby/commit/df686c5b25b82c9f4f44966e087812be37007fbf)) +* should not reuse buffers for `IO.copy_stream` interop ([8ad8c9d](https://github.com/Finch-API/finch-api-ruby/commit/8ad8c9dc1429b38df047ac7a17ebf33eafe84a10)) + + +### Performance Improvements + +* faster code formatting ([69f9d97](https://github.com/Finch-API/finch-api-ruby/commit/69f9d97f9f857b3b9912e733cb37d8e9ca41af3a)) + + +### Chores + +* allow fast-format to use bsd sed as well ([b7c6223](https://github.com/Finch-API/finch-api-ruby/commit/b7c6223003113460bef7064164ae2590940c984b)) +* do not install brew dependencies in ./scripts/bootstrap by default ([6faa93e](https://github.com/Finch-API/finch-api-ruby/commit/6faa93ee15839976d987e97701c988940e2a134e)) +* ignore linter error for tests having large collections ([d3f05ab](https://github.com/Finch-API/finch-api-ruby/commit/d3f05ab04c2a228488f57933ea8643913bfa6260)) + ## 0.1.0-alpha.30 (2025-09-08) Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.29...v0.1.0-alpha.30) diff --git a/Gemfile.lock b/Gemfile.lock index d02d747e..6ad67ab8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.30) + finch-api (0.1.0.pre.alpha.31) connection_pool GEM diff --git a/README.md b/README.md index c458f72d..80a1a093 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.30" +gem "finch-api", "~> 0.1.0.pre.alpha.31" ``` diff --git a/Rakefile b/Rakefile index 8fae6bce..98230e7b 100644 --- a/Rakefile +++ b/Rakefile @@ -12,6 +12,8 @@ tapioca = "sorbet/tapioca" examples = "examples" ignore_file = ".ignore" +FILES_ENV = "FORMAT_FILE" + CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file) CLOBBER.push(*%w[sorbet/rbi/annotations/ sorbet/rbi/gems/], tapioca) @@ -38,6 +40,14 @@ end xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --] ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")} +filtered = ->(ext, dirs) do + if ENV.key?(FILES_ENV) + %w[sed -E -n -e] << "/\\.#{ext}$/p" << "--" << ENV.fetch(FILES_ENV) + else + (%w[find] + dirs + %w[-type f -and -name]) << "*.#{ext}" << "-print0" + end +end + desc("Lint `*.rb(i)`") multitask(:"lint:rubocop") do find = %w[find ./lib ./test ./rbi ./examples -type f -and ( -name *.rb -or -name *.rbi ) -print0] @@ -52,24 +62,26 @@ multitask(:"lint:rubocop") do sh("#{find.shelljoin} | #{lint.shelljoin}") end +norm_lines = %w[tr -- \n \0].shelljoin + 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 ./examples -type f -and -name *.rb -print0] + files = filtered["rb", %w[./lib ./test ./examples]] fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --] - sh("#{find.shelljoin} | #{fmt.shelljoin}") + sh("#{files.shelljoin} | #{norm_lines} | #{fmt.shelljoin}") end desc("Format `*.rbi`") multitask(:"format:rbi") do - find = %w[find ./rbi -type f -and -name *.rbi -print0] + files = filtered["rbi", %w[./rbi]] fmt = xargs + %w[stree write --] - sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") + sh(ruby_opt, "#{files.shelljoin} | #{norm_lines} | #{fmt.shelljoin}") end desc("Format `*.rbs`") multitask(:"format:rbs") do - find = %w[find ./sig -type f -name *.rbs -print0] + files = filtered["rbs", %w[./sig]] inplace = /darwin|bsd/ =~ RUBY_PLATFORM ? ["-i", ""] : %w[-i] uuid = SecureRandom.uuid @@ -98,13 +110,13 @@ multitask(:"format:rbs") do success = false # transform class aliases to type aliases, which syntax tree has no trouble with - sh("#{find.shelljoin} | #{pre.shelljoin}") + sh("#{files.shelljoin} | #{norm_lines} | #{pre.shelljoin}") # run syntax tree to format `*.rbs` files - sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") do + sh(ruby_opt, "#{files.shelljoin} | #{norm_lines} | #{fmt.shelljoin}") do success = _1 end # transform type aliases back to class aliases - sh("#{find.shelljoin} | #{pst.shelljoin}") + sh("#{files.shelljoin} | #{norm_lines} | #{pst.shelljoin}") # always run post-processing to remove comment marker fail unless success diff --git a/lib/finch_api.rb b/lib/finch_api.rb index 4b61f69c..54c1b933 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -154,6 +154,7 @@ require_relative "finch_api/models/pay_statement_event" require_relative "finch_api/models/provider" require_relative "finch_api/models/provider_list_params" +require_relative "finch_api/models/provider_list_response" require_relative "finch_api/models/request_forwarding_forward_params" require_relative "finch_api/models/request_forwarding_forward_response" require_relative "finch_api/models/sandbox/company_update_params" diff --git a/lib/finch_api/errors.rb b/lib/finch_api/errors.rb index fbcaa508..e995932e 100644 --- a/lib/finch_api/errors.rb +++ b/lib/finch_api/errors.rb @@ -40,6 +40,9 @@ class APIError < FinchAPI::Errors::Error # @return [Integer, nil] attr_accessor :status + # @return [Hash{String=>String}, nil] + attr_accessor :headers + # @return [Object, nil] attr_accessor :body @@ -47,13 +50,15 @@ class APIError < FinchAPI::Errors::Error # # @param url [URI::Generic] # @param status [Integer, nil] + # @param headers [Hash{String=>String}, nil] # @param body [Object, nil] # @param request [nil] # @param response [nil] # @param message [String, nil] - def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil) + def initialize(url:, status: nil, headers: nil, body: nil, request: nil, response: nil, message: nil) @url = url @status = status + @headers = headers @body = body @request = request @response = response @@ -74,6 +79,7 @@ class APIConnectionError < FinchAPI::Errors::APIError # # @param url [URI::Generic] # @param status [nil] + # @param headers [Hash{String=>String}, nil] # @param body [nil] # @param request [nil] # @param response [nil] @@ -81,6 +87,7 @@ class APIConnectionError < FinchAPI::Errors::APIError def initialize( url:, status: nil, + headers: nil, body: nil, request: nil, response: nil, @@ -95,6 +102,7 @@ class APITimeoutError < FinchAPI::Errors::APIConnectionError # # @param url [URI::Generic] # @param status [nil] + # @param headers [Hash{String=>String}, nil] # @param body [nil] # @param request [nil] # @param response [nil] @@ -102,6 +110,7 @@ class APITimeoutError < FinchAPI::Errors::APIConnectionError def initialize( url:, status: nil, + headers: nil, body: nil, request: nil, response: nil, @@ -116,21 +125,24 @@ class APIStatusError < FinchAPI::Errors::APIError # # @param url [URI::Generic] # @param status [Integer] + # @param headers [Hash{String=>String}, nil] # @param body [Object, nil] # @param request [nil] # @param response [nil] # @param message [String, nil] # # @return [self] - def self.for(url:, status:, body:, request:, response:, message: nil) - kwargs = { - url: url, - status: status, - body: body, - request: request, - response: response, - message: message - } + def self.for(url:, status:, headers:, body:, request:, response:, message: nil) + kwargs = + { + url: url, + status: status, + headers: headers, + body: body, + request: request, + response: response, + message: message + } case status in 400 @@ -162,15 +174,17 @@ def self.for(url:, status:, body:, request:, response:, message: nil) # # @param url [URI::Generic] # @param status [Integer] + # @param headers [Hash{String=>String}, nil] # @param body [Object, nil] # @param request [nil] # @param response [nil] # @param message [String, nil] - def initialize(url:, status:, body:, request:, response:, message: nil) + def initialize(url:, status:, headers:, body:, request:, response:, message: nil) message ||= {url: url.to_s, status: status, body: body} super( url: url, status: status, + headers: headers, body: body, request: request, response: response, diff --git a/lib/finch_api/file_part.rb b/lib/finch_api/file_part.rb index 0fd397f2..cf20e145 100644 --- a/lib/finch_api/file_part.rb +++ b/lib/finch_api/file_part.rb @@ -38,18 +38,21 @@ def to_json(*a) = read.to_json(*a) def to_yaml(*a) = read.to_yaml(*a) # @param content [Pathname, StringIO, IO, String] - # @param filename [String, nil] + # @param filename [Pathname, String, nil] # @param content_type [String, nil] def initialize(content, filename: nil, content_type: nil) - @content = content + @content_type = content_type @filename = - case content - in Pathname - filename.nil? ? content.basename.to_path : ::File.basename(filename) + case [filename, (@content = content)] + in [String | Pathname, _] + ::File.basename(filename) + in [nil, Pathname] + content.basename.to_path + in [nil, IO] + content.to_path else - filename.nil? ? nil : ::File.basename(filename) + filename end - @content_type = content_type end end end diff --git a/lib/finch_api/internal/individuals_page.rb b/lib/finch_api/internal/individuals_page.rb index 7c08dedc..f75c9196 100644 --- a/lib/finch_api/internal/individuals_page.rb +++ b/lib/finch_api/internal/individuals_page.rb @@ -63,7 +63,7 @@ def auto_paging_each(&blk) # # @param client [FinchAPI::Internal::Transport::BaseClient] # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # @param page_data [Hash{Symbol=>Object}] def initialize(client:, req:, headers:, page_data:) super diff --git a/lib/finch_api/internal/page.rb b/lib/finch_api/internal/page.rb index d830840a..bed88784 100644 --- a/lib/finch_api/internal/page.rb +++ b/lib/finch_api/internal/page.rb @@ -63,7 +63,7 @@ def auto_paging_each(&blk) # # @param client [FinchAPI::Internal::Transport::BaseClient] # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # @param page_data [Hash{Symbol=>Object}] def initialize(client:, req:, headers:, page_data:) super diff --git a/lib/finch_api/internal/responses_page.rb b/lib/finch_api/internal/responses_page.rb index 00dc07b0..eb54e24b 100644 --- a/lib/finch_api/internal/responses_page.rb +++ b/lib/finch_api/internal/responses_page.rb @@ -51,7 +51,7 @@ def auto_paging_each(&blk) # # @param client [FinchAPI::Internal::Transport::BaseClient] # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # @param page_data [Array] def initialize(client:, req:, headers:, page_data:) super diff --git a/lib/finch_api/internal/single_page.rb b/lib/finch_api/internal/single_page.rb index 5bcba837..f825b137 100644 --- a/lib/finch_api/internal/single_page.rb +++ b/lib/finch_api/internal/single_page.rb @@ -48,7 +48,7 @@ def auto_paging_each(&blk) # # @param client [FinchAPI::Internal::Transport::BaseClient] # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # @param page_data [Array] def initialize(client:, req:, headers:, page_data:) super diff --git a/lib/finch_api/internal/transport/base_client.rb b/lib/finch_api/internal/transport/base_client.rb index 3f539160..d6d5a3e9 100644 --- a/lib/finch_api/internal/transport/base_client.rb +++ b/lib/finch_api/internal/transport/base_client.rb @@ -47,7 +47,7 @@ def validate!(req) # @api private # # @param status [Integer] - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # # @return [Boolean] def should_retry?(status, headers:) @@ -85,7 +85,7 @@ def should_retry?(status, headers:) # # @param status [Integer] # - # @param response_headers [Hash{String=>String}, Net::HTTPHeader] + # @param response_headers [Hash{String=>String}] # # @return [Hash{Symbol=>Object}] def follow_redirect(request, status:, response_headers:) @@ -378,6 +378,7 @@ def send_request(request, redirect_count:, retry_count:, send_retry_header:) rescue FinchAPI::Errors::APIConnectionError => e status = e end + headers = FinchAPI::Internal::Util.normalized_headers(response&.each_header&.to_h) case status in ..299 @@ -390,7 +391,7 @@ def send_request(request, redirect_count:, retry_count:, send_retry_header:) in 300..399 self.class.reap_connection!(status, stream: stream) - request = self.class.follow_redirect(request, status: status, response_headers: response) + request = self.class.follow_redirect(request, status: status, response_headers: headers) send_request( request, redirect_count: redirect_count + 1, @@ -399,9 +400,9 @@ def send_request(request, redirect_count:, retry_count:, send_retry_header:) ) in FinchAPI::Errors::APIConnectionError if retry_count >= max_retries raise status - in (400..) if retry_count >= max_retries || !self.class.should_retry?(status, headers: response) + in (400..) if retry_count >= max_retries || !self.class.should_retry?(status, headers: headers) decoded = Kernel.then do - FinchAPI::Internal::Util.decode_content(response, stream: stream, suppress_error: true) + FinchAPI::Internal::Util.decode_content(headers, stream: stream, suppress_error: true) ensure self.class.reap_connection!(status, stream: stream) end @@ -409,6 +410,7 @@ def send_request(request, redirect_count:, retry_count:, send_retry_header:) raise FinchAPI::Errors::APIStatusError.for( url: url, status: status, + headers: headers, body: decoded, request: nil, response: response @@ -485,19 +487,21 @@ def request(req) send_retry_header: send_retry_header ) - decoded = FinchAPI::Internal::Util.decode_content(response, stream: stream) + headers = FinchAPI::Internal::Util.normalized_headers(response.each_header.to_h) + decoded = FinchAPI::Internal::Util.decode_content(headers, stream: stream) case req in {stream: Class => st} st.new( model: model, url: url, status: status, + headers: headers, response: response, unwrap: unwrap, stream: decoded ) in {page: Class => page} - page.new(client: self, req: req, headers: response, page_data: decoded) + page.new(client: self, req: req, headers: headers, page_data: decoded) else unwrapped = FinchAPI::Internal::Util.dig(decoded, unwrap) FinchAPI::Internal::Type::Converter.coerce(model, unwrapped) diff --git a/lib/finch_api/internal/transport/pooled_net_requester.rb b/lib/finch_api/internal/transport/pooled_net_requester.rb index 9ebb1bcf..17fa4942 100644 --- a/lib/finch_api/internal/transport/pooled_net_requester.rb +++ b/lib/finch_api/internal/transport/pooled_net_requester.rb @@ -128,37 +128,47 @@ def execute(request) url, deadline = request.fetch_values(:url, :deadline) req = nil - eof = false finished = false - closing = nil # rubocop:disable Metrics/BlockLength enum = Enumerator.new do |y| - with_pool(url, deadline: deadline) do |conn| - next if finished - - req, closing = self.class.build_request(request) do - self.class.calibrate_socket_timeout(conn, deadline) - end - - self.class.calibrate_socket_timeout(conn, deadline) - unless conn.started? - conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT - conn.start - end + next if finished - self.class.calibrate_socket_timeout(conn, deadline) - conn.request(req) do |rsp| - y << [conn, req, rsp] - break if finished + with_pool(url, deadline: deadline) do |conn| + eof = false + closing = nil + ::Thread.handle_interrupt(Object => :never) do + ::Thread.handle_interrupt(Object => :immediate) do + req, closing = self.class.build_request(request) do + self.class.calibrate_socket_timeout(conn, deadline) + end - rsp.read_body do |bytes| - y << bytes.force_encoding(Encoding::BINARY) - break if finished + self.class.calibrate_socket_timeout(conn, deadline) + unless conn.started? + conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT + conn.start + end self.class.calibrate_socket_timeout(conn, deadline) + conn.request(req) do |rsp| + y << [req, rsp] + break if finished + + rsp.read_body do |bytes| + y << bytes.force_encoding(Encoding::BINARY) + break if finished + + self.class.calibrate_socket_timeout(conn, deadline) + end + eof = true + end + end + ensure + begin + conn.finish if !eof && conn&.started? + ensure + closing&.call end - eof = true end end rescue Timeout::Error @@ -168,17 +178,10 @@ def execute(request) end # rubocop:enable Metrics/BlockLength - conn, _, response = enum.next + _, response = enum.next body = FinchAPI::Internal::Util.fused_enum(enum, external: true) do finished = true - tap do - enum.next - rescue StopIteration - nil - end - ensure - conn.finish if !eof && conn&.started? - closing&.call + loop { enum.next } end [Integer(response.code), response, body] end diff --git a/lib/finch_api/internal/type/base_page.rb b/lib/finch_api/internal/type/base_page.rb index 803cd997..83a8a1fe 100644 --- a/lib/finch_api/internal/type/base_page.rb +++ b/lib/finch_api/internal/type/base_page.rb @@ -39,7 +39,7 @@ def to_enum = super(:auto_paging_each) # # @param client [FinchAPI::Internal::Transport::BaseClient] # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # @param page_data [Object] def initialize(client:, req:, headers:, page_data:) @client = client diff --git a/lib/finch_api/internal/type/file_input.rb b/lib/finch_api/internal/type/file_input.rb index b3d67e3c..f329d13a 100644 --- a/lib/finch_api/internal/type/file_input.rb +++ b/lib/finch_api/internal/type/file_input.rb @@ -82,17 +82,20 @@ def coerce(value, state:) # # @return [Pathname, StringIO, IO, String, Object] def dump(value, state:) - # rubocop:disable Lint/DuplicateBranch case value + in StringIO | String + # https://datatracker.ietf.org/doc/html/rfc7578#section-4.2 + # while not required, a filename is recommended, and in practice many servers do expect this + FinchAPI::FilePart.new(value, filename: "upload") in IO state[:can_retry] = false + value.to_path.nil? ? FinchAPI::FilePart.new(value, filename: "upload") : value in FinchAPI::FilePart if value.content.is_a?(IO) state[:can_retry] = false + value else + value end - # rubocop:enable Lint/DuplicateBranch - - value end # @api private diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 5b98a0d8..4653e788 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -346,8 +346,9 @@ def join_parsed_uri(lhs, rhs) base_path, base_query = lhs.fetch_values(:path, :query) slashed = base_path.end_with?("/") ? base_path : "#{base_path}/" - parsed_path, parsed_query = parse_uri(rhs.fetch(:path)).fetch_values(:path, :query) - override = URI::Generic.build(**rhs.slice(:scheme, :host, :port), path: parsed_path) + merged = {**parse_uri(rhs.fetch(:path)), **rhs.except(:path, :query)} + parsed_path, parsed_query = merged.fetch_values(:path, :query) + override = URI::Generic.build(**merged.slice(:scheme, :host, :port), path: parsed_path) joined = URI.join(URI::Generic.build(lhs.except(:path, :query)), slashed, override) query = deep_merge( @@ -473,10 +474,9 @@ class << self # @return [Enumerable] def writable_enum(&blk) Enumerator.new do |y| - buf = String.new y.define_singleton_method(:write) do - self << buf.replace(_1) - buf.bytesize + self << _1.dup + _1.bytesize end blk.call(y) @@ -566,7 +566,8 @@ class << self # # @return [Array(String, Enumerable)] private def encode_multipart_streaming(body) - boundary = SecureRandom.urlsafe_base64(60) + # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length + boundary = SecureRandom.urlsafe_base64(46) closing = [] strio = writable_enum do |y| @@ -647,7 +648,7 @@ def force_charset!(content_type, text:) # # Assumes each chunk in stream has `Encoding::BINARY`. # - # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param headers [Hash{String=>String}] # @param stream [Enumerable] # @param suppress_error [Boolean] # diff --git a/lib/finch_api/models/connect/session_new_params.rb b/lib/finch_api/models/connect/session_new_params.rb index 816141f0..88dad917 100644 --- a/lib/finch_api/models/connect/session_new_params.rb +++ b/lib/finch_api/models/connect/session_new_params.rb @@ -8,114 +8,110 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute customer_email + # Email address of the customer + # + # @return [String, nil] + required :customer_email, String, nil?: true + # @!attribute customer_id + # Unique identifier for the customer # # @return [String] required :customer_id, String # @!attribute customer_name + # Name of the customer # # @return [String] required :customer_name, String - # @!attribute products - # - # @return [Array] - required :products, - -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionNewParams::Product] } - - # @!attribute customer_email - # - # @return [String, nil] - optional :customer_email, String, nil?: true - # @!attribute integration + # Integration configuration for the connect session # # @return [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] - optional :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true + required :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true # @!attribute manual + # Enable manual authentication mode # # @return [Boolean, nil] - optional :manual, FinchAPI::Internal::Type::Boolean, nil?: true + required :manual, FinchAPI::Internal::Type::Boolean, nil?: true # @!attribute minutes_to_expire # 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 + required :minutes_to_expire, Float, nil?: true + + # @!attribute products + # The Finch products to request access to + # + # @return [Array] + required :products, + -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionNewParams::Product] } # @!attribute redirect_uri + # The URI to redirect to after the Connect flow is completed # # @return [String, nil] - optional :redirect_uri, String, nil?: true + required :redirect_uri, String, nil?: true # @!attribute sandbox + # Sandbox mode for testing # # @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] - optional :sandbox, enum: -> { FinchAPI::Connect::SessionNewParams::Sandbox }, nil?: true + required :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: {}) + # @!method initialize(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Connect::SessionNewParams} for more details. # - # @param customer_id [String] + # @param customer_email [String, nil] Email address of the customer # - # @param customer_name [String] + # @param customer_id [String] Unique identifier for the customer # - # @param products [Array] + # @param customer_name [String] Name of the customer # - # @param customer_email [String, nil] + # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session # - # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] - # - # @param manual [Boolean, nil] + # @param manual [Boolean, nil] Enable manual authentication mode # # @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] + # @param products [Array] The Finch products to request access to + # + # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed # - # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] + # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # The Finch products that can be requested during the Connect flow. - module Product - extend FinchAPI::Internal::Type::Enum - - COMPANY = :company - DIRECTORY = :directory - INDIVIDUAL = :individual - EMPLOYMENT = :employment - PAYMENT = :payment - PAY_STATEMENT = :pay_statement - BENEFITS = :benefits - SSN = :ssn - DEDUCTION = :deduction - DOCUMENTS = :documents - - # @!method self.values - # @return [Array] - end - class Integration < FinchAPI::Internal::Type::BaseModel # @!attribute auth_method + # The authentication method to use # # @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] - optional :auth_method, + required :auth_method, enum: -> { FinchAPI::Connect::SessionNewParams::Integration::AuthMethod }, nil?: true # @!attribute provider + # The provider to integrate with # # @return [String, nil] - optional :provider, String, nil?: true + required :provider, String, nil?: true - # @!method initialize(auth_method: nil, provider: nil) - # @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] - # @param provider [String, nil] + # @!method initialize(auth_method:, provider:) + # Integration configuration for the connect session + # + # @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] The authentication method to use + # + # @param provider [String, nil] The provider to integrate with + # The authentication method to use + # # @see FinchAPI::Models::Connect::SessionNewParams::Integration#auth_method module AuthMethod extend FinchAPI::Internal::Type::Enum @@ -130,6 +126,26 @@ module AuthMethod end end + # The Finch products that can be requested during the Connect flow. + module Product + extend FinchAPI::Internal::Type::Enum + + BENEFITS = :benefits + COMPANY = :company + DEDUCTION = :deduction + DIRECTORY = :directory + DOCUMENTS = :documents + EMPLOYMENT = :employment + INDIVIDUAL = :individual + PAYMENT = :payment + PAY_STATEMENT = :pay_statement + SSN = :ssn + + # @!method self.values + # @return [Array] + end + + # Sandbox mode for testing module Sandbox 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 74638f5d..2fe9d045 100644 --- a/lib/finch_api/models/connect/session_reauthenticate_params.rb +++ b/lib/finch_api/models/connect/session_reauthenticate_params.rb @@ -18,14 +18,14 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel # The number of minutes until the session expires (defaults to 43,200, which is 30 # days) # - # @return [Integer, nil] - optional :minutes_to_expire, Integer, nil?: true + # @return [Integer] + required :minutes_to_expire, Integer # @!attribute products # The products to request access to (optional for reauthentication) # # @return [Array, nil] - optional :products, + required :products, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionReauthenticateParams::Product] }, @@ -35,15 +35,15 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel # The URI to redirect to after the Connect flow is completed # # @return [String, nil] - optional :redirect_uri, String, nil?: true + required :redirect_uri, String, nil?: true - # @!method initialize(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {}) + # @!method initialize(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Connect::SessionReauthenticateParams} for more details. # # @param connection_id [String] The ID of the existing connection to reauthenticate # - # @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 + # @param minutes_to_expire [Integer] 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) # @@ -55,16 +55,16 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel module Product extend FinchAPI::Internal::Type::Enum + BENEFITS = :benefits COMPANY = :company + DEDUCTION = :deduction DIRECTORY = :directory - INDIVIDUAL = :individual + DOCUMENTS = :documents EMPLOYMENT = :employment + INDIVIDUAL = :individual PAYMENT = :payment PAY_STATEMENT = :pay_statement - BENEFITS = :benefits SSN = :ssn - DEDUCTION = :deduction - DOCUMENTS = :documents # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/create_access_token_response.rb b/lib/finch_api/models/create_access_token_response.rb index fb3e791d..bc4d34c2 100644 --- a/lib/finch_api/models/create_access_token_response.rb +++ b/lib/finch_api/models/create_access_token_response.rb @@ -31,6 +31,12 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] required :connection_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ConnectionType } + # @!attribute entity_ids + # An array of entity IDs that can be accessed with this access token + # + # @return [Array] + required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute products # An array of the authorized products associated with the `access_token` # @@ -74,7 +80,7 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :customer_id, String, nil?: true - # @!method initialize(access_token:, client_type:, connection_id:, connection_type:, products:, provider_id:, token_type:, account_id: nil, company_id: nil, customer_id: nil) + # @!method initialize(access_token:, client_type:, connection_id:, connection_type:, entity_ids:, products:, provider_id:, token_type:, account_id: nil, company_id: nil, customer_id: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::CreateAccessTokenResponse} for more details. # @@ -86,6 +92,8 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # # @param connection_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] The type of the connection associated with the token. # + # @param entity_ids [Array] An array of entity IDs that can be accessed with this access token + # # @param products [Array] An array of the authorized products associated with the `access_token` # # @param provider_id [String] The ID of the provider associated with the `access_token` diff --git a/lib/finch_api/models/hris/benefit_contribution.rb b/lib/finch_api/models/hris/benefit_contribution.rb index 0b35eb4d..1e36298f 100644 --- a/lib/finch_api/models/hris/benefit_contribution.rb +++ b/lib/finch_api/models/hris/benefit_contribution.rb @@ -3,36 +3,131 @@ module FinchAPI module Models module HRIS - class BenefitContribution < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # Contribution amount in cents (if `fixed`) or basis points (if `percent`). - # - # @return [Integer, nil] - required :amount, Integer, nil?: true - - # @!attribute type - # Contribution type. - # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] - required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::Type }, nil?: true - - # @!method initialize(amount:, type:) - # @param amount [Integer, nil] Contribution amount in cents (if `fixed`) or basis points (if `percent`). - # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] Contribution type. - - # Contribution type. - # - # @see FinchAPI::Models::HRIS::BenefitContribution#type - module Type - extend FinchAPI::Internal::Type::Enum - - FIXED = :fixed - PERCENT = :percent - - # @!method self.values - # @return [Array] + module BenefitContribution + extend FinchAPI::Internal::Type::Union + + variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember0 } + + variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember1 } + + variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember2 } + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # Contribution amount in cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute type + # Fixed contribution type. + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember0::Type } + + # @!method initialize(amount:, type:) + # @param amount [Integer] Contribution amount in cents. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] Fixed contribution type. + + # Fixed contribution type. + # + # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember0#type + module Type + extend FinchAPI::Internal::Type::Enum + + FIXED = :fixed + + # @!method self.values + # @return [Array] + end end + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # Contribution amount in basis points (1/100th of a percent). + # + # @return [Integer] + required :amount, Integer + + # @!attribute type + # Percentage contribution type. + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember1::Type } + + # @!method initialize(amount:, type:) + # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] Percentage contribution type. + + # Percentage contribution type. + # + # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember1#type + module Type + extend FinchAPI::Internal::Type::Enum + + PERCENT = :percent + + # @!method self.values + # @return [Array] + end + end + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + # @!attribute tiers + # Array of tier objects defining employer match tiers based on employee + # contribution thresholds. + # + # @return [Array] + required :tiers, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] } + + # @!attribute type + # Tiered contribution type (only valid for company_contribution). + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember2::Type } + + # @!method initialize(tiers:, type:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::BenefitContribution::UnionMember2} for more details. + # + # @param tiers [Array] Array of tier objects defining employer match tiers based on employee contributi + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] Tiered contribution type (only valid for company_contribution). + + class Tier < FinchAPI::Internal::Type::BaseModel + # @!attribute match + # + # @return [Integer] + required :match, Integer + + # @!attribute threshold + # + # @return [Integer] + required :threshold, Integer + + # @!method initialize(match:, threshold:) + # @param match [Integer] + # @param threshold [Integer] + end + + # Tiered contribution type (only valid for company_contribution). + # + # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember2#type + module Type + extend FinchAPI::Internal::Type::Enum + + TIERED = :tiered + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::BenefitContribution::UnionMember0, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2)] end end end diff --git a/lib/finch_api/models/hris/benefit_create_params.rb b/lib/finch_api/models/hris/benefit_create_params.rb index f1811b2b..dde19103 100644 --- a/lib/finch_api/models/hris/benefit_create_params.rb +++ b/lib/finch_api/models/hris/benefit_create_params.rb @@ -8,6 +8,12 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute company_contribution # The company match for this benefit. # @@ -36,10 +42,12 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel # @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: {}) + # @!method initialize(entity_ids: nil, 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 entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @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 diff --git a/lib/finch_api/models/hris/benefit_list_params.rb b/lib/finch_api/models/hris/benefit_list_params.rb index e6fd96b3..6cad646a 100644 --- a/lib/finch_api/models/hris/benefit_list_params.rb +++ b/lib/finch_api/models/hris/benefit_list_params.rb @@ -8,7 +8,15 @@ class BenefitListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rb b/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rb index ab66dee1..e28d9c54 100644 --- a/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rb +++ b/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rb @@ -8,7 +8,15 @@ class BenefitListSupportedBenefitsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/benefit_retrieve_params.rb b/lib/finch_api/models/hris/benefit_retrieve_params.rb index 092c4a31..cd3246be 100644 --- a/lib/finch_api/models/hris/benefit_retrieve_params.rb +++ b/lib/finch_api/models/hris/benefit_retrieve_params.rb @@ -8,7 +8,15 @@ class BenefitRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/benefit_update_params.rb b/lib/finch_api/models/hris/benefit_update_params.rb index 5b9291c9..0168d703 100644 --- a/lib/finch_api/models/hris/benefit_update_params.rb +++ b/lib/finch_api/models/hris/benefit_update_params.rb @@ -8,13 +8,21 @@ class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute description # Updated name or description. # # @return [String, nil] optional :description, String - # @!method initialize(description: nil, request_options: {}) + # @!method initialize(entity_ids: nil, description: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param description [String] Updated name or description. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/benefits/individual_benefit.rb b/lib/finch_api/models/hris/benefits/individual_benefit.rb index 59b06c6a..3542d4b4 100644 --- a/lib/finch_api/models/hris/benefits/individual_benefit.rb +++ b/lib/finch_api/models/hris/benefits/individual_benefit.rb @@ -50,13 +50,21 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute company_contribution # - # @return [FinchAPI::Models::HRIS::BenefitContribution, nil] - required :company_contribution, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true + # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, nil] + required :company_contribution, + union: -> { + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution + }, + nil?: true # @!attribute employee_deduction # - # @return [FinchAPI::Models::HRIS::BenefitContribution, nil] - required :employee_deduction, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true + # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, nil] + required :employee_deduction, + union: -> { + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction + }, + nil?: true # @!attribute hsa_contribution_limit # Type for HSA contribution limit if the benefit is a HSA. @@ -77,12 +85,220 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled # - # @param company_contribution [FinchAPI::Models::HRIS::BenefitContribution, nil] + # @param company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, nil] # - # @param employee_deduction [FinchAPI::Models::HRIS::BenefitContribution, nil] + # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, nil] # # @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit, nil] Type for HSA contribution limit if the benefit is a HSA. + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#company_contribution + module CompanyContribution + extend FinchAPI::Internal::Type::Union + + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0 } + + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1 } + + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2 } + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # Contribution amount in cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute type + # Fixed contribution type. + # + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type] + required :type, + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type } + + # @!method initialize(amount:, type:) + # @param amount [Integer] Contribution amount in cents. + # + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type] Fixed contribution type. + + # Fixed contribution type. + # + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0#type + module Type + extend FinchAPI::Internal::Type::Enum + + FIXED = :fixed + + # @!method self.values + # @return [Array] + end + end + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # Contribution amount in basis points (1/100th of a percent). + # + # @return [Integer] + required :amount, Integer + + # @!attribute type + # Percentage contribution type. + # + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type] + required :type, + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type } + + # @!method initialize(amount:, type:) + # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). + # + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type] Percentage contribution type. + + # Percentage contribution type. + # + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1#type + module Type + extend FinchAPI::Internal::Type::Enum + + PERCENT = :percent + + # @!method self.values + # @return [Array] + end + end + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + # @!attribute tiers + # Array of tier objects defining employer match tiers based on employee + # contribution thresholds. + # + # @return [Array] + required :tiers, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier] } + + # @!attribute type + # Tiered contribution type (only valid for company_contribution). + # + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type] + required :type, + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type } + + # @!method initialize(tiers:, type:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2} + # for more details. + # + # @param tiers [Array] Array of tier objects defining employer match tiers based on employee contributi + # + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type] Tiered contribution type (only valid for company_contribution). + + class Tier < FinchAPI::Internal::Type::BaseModel + # @!attribute match + # + # @return [Integer] + required :match, Integer + + # @!attribute threshold + # + # @return [Integer] + required :threshold, Integer + + # @!method initialize(match:, threshold:) + # @param match [Integer] + # @param threshold [Integer] + end + + # Tiered contribution type (only valid for company_contribution). + # + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2#type + module Type + extend FinchAPI::Internal::Type::Enum + + TIERED = :tiered + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2)] + end + + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#employee_deduction + module EmployeeDeduction + extend FinchAPI::Internal::Type::Union + + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0 } + + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1 } + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # Contribution amount in cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute type + # Fixed contribution type. + # + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type] + required :type, + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type } + + # @!method initialize(amount:, type:) + # @param amount [Integer] Contribution amount in cents. + # + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type] Fixed contribution type. + + # Fixed contribution type. + # + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0#type + module Type + extend FinchAPI::Internal::Type::Enum + + FIXED = :fixed + + # @!method self.values + # @return [Array] + end + end + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + # @!attribute amount + # Contribution amount in basis points (1/100th of a percent). + # + # @return [Integer] + required :amount, Integer + + # @!attribute type + # Percentage contribution type. + # + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type] + required :type, + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type } + + # @!method initialize(amount:, type:) + # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). + # + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type] Percentage contribution type. + + # Percentage contribution type. + # + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1#type + module Type + extend FinchAPI::Internal::Type::Enum + + PERCENT = :percent + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1)] + end + # Type for HSA contribution limit if the benefit is a HSA. # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#hsa_contribution_limit 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 89e9674c..fd30add6 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 @@ -9,6 +9,12 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute individuals # Array of the individual_id to enroll and a configuration object. # @@ -16,7 +22,9 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel optional :individuals, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] } - # @!method initialize(individuals: nil, request_options: {}) + # @!method initialize(entity_ids: nil, individuals: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param individuals [Array] Array of the individual_id to enroll and a configuration object. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] @@ -119,27 +127,57 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :amount, Integer + # @!attribute tiers + # Array of tier objects for tiered contribution matching (required when type is + # tiered) + # + # @return [Array, nil] + optional :tiers, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier] } + # @!attribute type # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type, nil] optional :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type } - # @!method initialize(amount: nil, type: nil) + # @!method initialize(amount: nil, tiers: nil, type: nil) # Some parameter documentations has been truncated, see # {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 tiers [Array] Array of tier objects for tiered contribution matching (required when type is ti + # # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type] + class Tier < FinchAPI::Internal::Type::BaseModel + # @!attribute match + # The employer match percentage in basis points (0-10000 = 0-100%) + # + # @return [Integer] + required :match, Integer + + # @!attribute threshold + # The employee contribution threshold in basis points (0-10000 = 0-100%) + # + # @return [Integer] + required :threshold, Integer + + # @!method initialize(match:, threshold:) + # @param match [Integer] The employer match percentage in basis points (0-10000 = 0-100%) + # + # @param threshold [Integer] The employee contribution threshold in basis points (0-10000 = 0-100%) + end + # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution#type module Type extend FinchAPI::Internal::Type::Enum FIXED = :fixed PERCENT = :percent + TIERED = :tiered # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb b/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb index eb2e8035..e44e8816 100644 --- a/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb @@ -9,7 +9,15 @@ class IndividualEnrolledIDsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb b/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb index 6f061bb2..c3afb068 100644 --- a/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb @@ -9,6 +9,12 @@ class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute individual_ids # comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals @@ -16,11 +22,13 @@ class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :individual_ids, String - # @!method initialize(individual_ids: nil, request_options: {}) + # @!method initialize(entity_ids: nil, individual_ids: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams} for # more details. # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param individual_ids [String] comma-delimited list of stable Finch uuids for each individual. If empty, defaul # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb b/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb index 37f08e13..adba41a0 100644 --- a/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb @@ -9,13 +9,21 @@ class IndividualUnenrollManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute individual_ids # Array of individual_ids to unenroll. # # @return [Array, nil] optional :individual_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(individual_ids: nil, request_options: {}) + # @!method initialize(entity_ids: nil, individual_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param individual_ids [Array] Array of individual_ids to unenroll. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] 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 03504d56..6c88048c 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 @@ -10,6 +10,12 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to create the rule for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute attributes # Specifies the fields to be applied when the condition is met. # @@ -41,7 +47,9 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel 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: {}) + # @!method initialize(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to create the rule for. + # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. # # @param conditions [Array] diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb index 45153cd0..4eb3d43e 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb @@ -10,7 +10,15 @@ class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to delete the rule for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to delete the rule for. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb index 21ee756f..b85c54e6 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb @@ -10,7 +10,15 @@ class RuleListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to retrieve rules for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to retrieve rules for. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb index ec5d0ea9..4dbc42ae 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb @@ -10,13 +10,22 @@ class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to update the rule for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute optional_property # # @return [Object, nil] optional :optional_property, FinchAPI::Internal::Type::Unknown, api_name: :optionalProperty - # @!method initialize(optional_property: nil, request_options: {}) + # @!method initialize(entity_ids: nil, optional_property: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to update the rule for. + # # @param optional_property [Object] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end 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 b247d835..196a3a68 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 @@ -24,6 +24,12 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel # @return [Date, nil] optional :end_date, Date + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute name # Case-insensitive partial match search by pay statement item name. # @@ -43,7 +49,7 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :type, String - # @!method initialize(categories: nil, end_date: nil, name: nil, start_date: nil, type: nil, request_options: {}) + # @!method initialize(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::Company::PayStatementItemListParams} for more details. # @@ -51,6 +57,8 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel # # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param name [String] Case-insensitive partial match search by pay statement item name. # # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date ( diff --git a/lib/finch_api/models/hris/company_retrieve_params.rb b/lib/finch_api/models/hris/company_retrieve_params.rb index 1d6ac43f..b2f4523f 100644 --- a/lib/finch_api/models/hris/company_retrieve_params.rb +++ b/lib/finch_api/models/hris/company_retrieve_params.rb @@ -8,7 +8,15 @@ class CompanyRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/directory_list_individuals_params.rb b/lib/finch_api/models/hris/directory_list_individuals_params.rb index b5dedf8f..bbfc5cb3 100644 --- a/lib/finch_api/models/hris/directory_list_individuals_params.rb +++ b/lib/finch_api/models/hris/directory_list_individuals_params.rb @@ -8,6 +8,12 @@ class DirectoryListIndividualsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute limit # Number of employees to return (defaults to all) # @@ -20,7 +26,9 @@ class DirectoryListIndividualsParams < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :offset, Integer - # @!method initialize(limit: nil, offset: nil, request_options: {}) + # @!method initialize(entity_ids: nil, limit: nil, offset: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param limit [Integer] Number of employees to return (defaults to all) # # @param offset [Integer] Index to start from (defaults to 0) diff --git a/lib/finch_api/models/hris/directory_list_params.rb b/lib/finch_api/models/hris/directory_list_params.rb index 26d4d990..b24a78db 100644 --- a/lib/finch_api/models/hris/directory_list_params.rb +++ b/lib/finch_api/models/hris/directory_list_params.rb @@ -8,6 +8,12 @@ class DirectoryListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute limit # Number of employees to return (defaults to all) # @@ -20,7 +26,9 @@ class DirectoryListParams < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :offset, Integer - # @!method initialize(limit: nil, offset: nil, request_options: {}) + # @!method initialize(entity_ids: nil, limit: nil, offset: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param limit [Integer] Number of employees to return (defaults to all) # # @param offset [Integer] Index to start from (defaults to 0) diff --git a/lib/finch_api/models/hris/document_list_params.rb b/lib/finch_api/models/hris/document_list_params.rb index a709b5b4..5f1d264d 100644 --- a/lib/finch_api/models/hris/document_list_params.rb +++ b/lib/finch_api/models/hris/document_list_params.rb @@ -8,6 +8,12 @@ class DocumentListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute individual_ids # Comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals @@ -34,10 +40,12 @@ class DocumentListParams < FinchAPI::Internal::Type::BaseModel # @return [Array, nil] optional :types, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::DocumentListParams::Type] } - # @!method initialize(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) + # @!method initialize(entity_ids: nil, individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::DocumentListParams} for more details. # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param individual_ids [Array] Comma-delimited list of stable Finch uuids for each individual. If empty, defaul # # @param limit [Integer] Number of documents to return (defaults to all) diff --git a/lib/finch_api/models/hris/document_response.rb b/lib/finch_api/models/hris/document_response.rb index 8b26ca7c..47a93ad2 100644 --- a/lib/finch_api/models/hris/document_response.rb +++ b/lib/finch_api/models/hris/document_response.rb @@ -7,36 +7,36 @@ class DocumentResponse < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch id for the document. # - # @return [String, nil] - optional :id, String + # @return [String] + required :id, String # @!attribute individual_id # The ID of the individual associated with the document. This will be null for # employer-level documents. # # @return [String, nil] - optional :individual_id, String, nil?: true + required :individual_id, String, nil?: true # @!attribute type # The type of document. # - # @return [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type, nil] - optional :type, enum: -> { FinchAPI::HRIS::DocumentResponse::Type } + # @return [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type] + required :type, enum: -> { FinchAPI::HRIS::DocumentResponse::Type } # @!attribute url # A URL to access the document. Format: # `https://api.tryfinch.com/employer/documents/:document_id`. # - # @return [String, nil] - optional :url, String + # @return [String] + required :url, String # @!attribute year # The year the document applies to, if available. # - # @return [Float, nil] - optional :year, Float, nil?: true + # @return [Float] + required :year, Float - # @!method initialize(id: nil, individual_id: nil, type: nil, url: nil, year: nil) + # @!method initialize(id:, individual_id:, type:, url:, year:) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::DocumentResponse} for more details. # @@ -48,7 +48,7 @@ class DocumentResponse < FinchAPI::Internal::Type::BaseModel # # @param url [String] A URL to access the document. Format: `https://api.tryfinch.com/employer/documen # - # @param year [Float, nil] The year the document applies to, if available. + # @param year [Float] The year the document applies to, if available. # The type of document. # diff --git a/lib/finch_api/models/hris/document_retreive_params.rb b/lib/finch_api/models/hris/document_retreive_params.rb index 0991ec54..35684b7f 100644 --- a/lib/finch_api/models/hris/document_retreive_params.rb +++ b/lib/finch_api/models/hris/document_retreive_params.rb @@ -8,7 +8,15 @@ class DocumentRetreiveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end 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 4f729227..6dce3306 100644 --- a/lib/finch_api/models/hris/employment_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/employment_retrieve_many_params.rb @@ -15,9 +15,17 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel required :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] } - # @!method initialize(requests:, request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(requests:, entity_ids: nil, request_options: {}) # @param requests [Array] The array of batch requests. # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Request < FinchAPI::Internal::Type::BaseModel 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 177c7483..92e7c3af 100644 --- a/lib/finch_api/models/hris/individual_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/individual_retrieve_many_params.rb @@ -8,6 +8,12 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute options # # @return [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] @@ -19,9 +25,13 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel optional :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] } - # @!method initialize(options: nil, requests: nil, request_options: {}) + # @!method initialize(entity_ids: nil, options: nil, requests: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @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 c716eccd..aaba6f8f 100644 --- a/lib/finch_api/models/hris/pay_statement.rb +++ b/lib/finch_api/models/hris/pay_statement.rb @@ -15,22 +15,16 @@ 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] required :employee_deductions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction, - nil?: true] - }, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployeeDeduction] }, nil?: true # @!attribute employer_contributions # - # @return [Array, nil] + # @return [Array, nil] required :employer_contributions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution, - nil?: true] - }, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::EmployerContribution] }, nil?: true # @!attribute gross_pay @@ -58,9 +52,11 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute taxes # The array of taxes objects associated with this pay statement. # - # @return [Array, nil] + # @return [Array, nil] required :taxes, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax, nil?: true] }, + -> { + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatement::Tax] + }, nil?: true # @!attribute total_hours @@ -78,9 +74,9 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!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 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::Models::Money, nil] # @@ -90,7 +86,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # # @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 # 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 0f725d06..176e07f5 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 @@ -15,9 +15,17 @@ class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel required :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] } - # @!method initialize(requests:, request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(requests:, entity_ids: nil, request_options: {}) # @param requests [Array] The array of batch requests. # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Request < FinchAPI::Internal::Type::BaseModel diff --git a/lib/finch_api/models/hris/payment_list_params.rb b/lib/finch_api/models/hris/payment_list_params.rb index 7e55bd53..7aab0985 100644 --- a/lib/finch_api/models/hris/payment_list_params.rb +++ b/lib/finch_api/models/hris/payment_list_params.rb @@ -22,7 +22,13 @@ class PaymentListParams < FinchAPI::Internal::Type::BaseModel # @return [Date] required :start_date, Date - # @!method initialize(end_date:, start_date:, request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(end_date:, start_date:, entity_ids: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::PaymentListParams} for more details. # @@ -30,6 +36,8 @@ class PaymentListParams < FinchAPI::Internal::Type::BaseModel # # @param start_date [Date] The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` for # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/hris/supported_benefit.rb b/lib/finch_api/models/hris/supported_benefit.rb index a283db37..218ef59b 100644 --- a/lib/finch_api/models/hris/supported_benefit.rb +++ b/lib/finch_api/models/hris/supported_benefit.rb @@ -89,6 +89,7 @@ module CompanyContribution FIXED = :fixed PERCENT = :percent + TIERED = :tiered # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/hris/w42005.rb b/lib/finch_api/models/hris/w42005.rb index 8be50f9e..c68806af 100644 --- a/lib/finch_api/models/hris/w42005.rb +++ b/lib/finch_api/models/hris/w42005.rb @@ -7,22 +7,22 @@ class W42005 < FinchAPI::Internal::Type::BaseModel # @!attribute data # Detailed information specific to the 2005 W4 form. # - # @return [FinchAPI::Models::HRIS::W42005::Data, nil] - optional :data, -> { FinchAPI::HRIS::W42005::Data } + # @return [FinchAPI::Models::HRIS::W42005::Data] + required :data, -> { FinchAPI::HRIS::W42005::Data } # @!attribute type # Specifies the form type, indicating that this document is a 2005 W4 form. # - # @return [Symbol, FinchAPI::Models::HRIS::W42005::Type, nil] - optional :type, enum: -> { FinchAPI::HRIS::W42005::Type } + # @return [Symbol, FinchAPI::Models::HRIS::W42005::Type] + required :type, enum: -> { FinchAPI::HRIS::W42005::Type } # @!attribute year # The tax year this W4 document applies to. # - # @return [Float, nil] - optional :year, Float, nil?: true + # @return [Float] + required :year, Float - # @!method initialize(data: nil, type: nil, year: nil) + # @!method initialize(data:, type:, year:) # A 2005 version of the W-4 tax form containing information on an individual's # filing status, dependents, and withholding details. # @@ -30,52 +30,52 @@ class W42005 < FinchAPI::Internal::Type::BaseModel # # @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. + # @param year [Float] The tax year this W4 document applies to. # @see FinchAPI::Models::HRIS::W42005#data class Data < FinchAPI::Internal::Type::BaseModel # @!attribute additional_withholding # Additional withholding amount (in cents). # - # @return [Integer, nil] - optional :additional_withholding, Integer, nil?: true + # @return [Integer] + required :additional_withholding, Integer # @!attribute exemption # Indicates exemption status from federal tax withholding. # # @return [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption, nil] - optional :exemption, enum: -> { FinchAPI::HRIS::W42005::Data::Exemption } + required :exemption, enum: -> { FinchAPI::HRIS::W42005::Data::Exemption }, nil?: true # @!attribute filing_status # The individual's filing status for tax purposes. # # @return [Symbol, FinchAPI::Models::HRIS::W42005::Data::FilingStatus, nil] - optional :filing_status, enum: -> { FinchAPI::HRIS::W42005::Data::FilingStatus }, nil?: true + required :filing_status, enum: -> { FinchAPI::HRIS::W42005::Data::FilingStatus }, nil?: true # @!attribute individual_id # The unique identifier for the individual associated with this 2005 W4 form. # - # @return [String, nil] - optional :individual_id, String + # @return [String] + required :individual_id, String # @!attribute total_number_of_allowances # Total number of allowances claimed (in cents). # - # @return [Integer, nil] - optional :total_number_of_allowances, Integer, nil?: true + # @return [Integer] + required :total_number_of_allowances, Integer - # @!method initialize(additional_withholding: nil, exemption: nil, filing_status: nil, individual_id: nil, total_number_of_allowances: nil) + # @!method initialize(additional_withholding:, exemption:, filing_status:, individual_id:, total_number_of_allowances:) # Detailed information specific to the 2005 W4 form. # - # @param additional_withholding [Integer, nil] Additional withholding amount (in cents). + # @param additional_withholding [Integer] Additional withholding amount (in cents). # - # @param exemption [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption] Indicates exemption status from federal tax withholding. + # @param exemption [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption, nil] Indicates exemption status from federal tax withholding. # # @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. # - # @param total_number_of_allowances [Integer, nil] Total number of allowances claimed (in cents). + # @param total_number_of_allowances [Integer] Total number of allowances claimed (in cents). # Indicates exemption status from federal tax withholding. # diff --git a/lib/finch_api/models/hris/w42020.rb b/lib/finch_api/models/hris/w42020.rb index e7eb2346..43f97cdb 100644 --- a/lib/finch_api/models/hris/w42020.rb +++ b/lib/finch_api/models/hris/w42020.rb @@ -7,22 +7,22 @@ class W42020 < FinchAPI::Internal::Type::BaseModel # @!attribute data # Detailed information specific to the 2020 W4 form. # - # @return [FinchAPI::Models::HRIS::W42020::Data, nil] - optional :data, -> { FinchAPI::HRIS::W42020::Data } + # @return [FinchAPI::Models::HRIS::W42020::Data] + required :data, -> { FinchAPI::HRIS::W42020::Data } # @!attribute type # Specifies the form type, indicating that this document is a 2020 W4 form. # - # @return [Symbol, FinchAPI::Models::HRIS::W42020::Type, nil] - optional :type, enum: -> { FinchAPI::HRIS::W42020::Type } + # @return [Symbol, FinchAPI::Models::HRIS::W42020::Type] + required :type, enum: -> { FinchAPI::HRIS::W42020::Type } # @!attribute year # The tax year this W4 document applies to. # - # @return [Float, nil] - optional :year, Float, nil?: true + # @return [Float] + required :year, Float - # @!method initialize(data: nil, type: nil, year: nil) + # @!method initialize(data:, type:, year:) # A 2020 version of the W-4 tax form containing information on an individual's # filing status, dependents, and withholding details. # @@ -30,7 +30,7 @@ class W42020 < FinchAPI::Internal::Type::BaseModel # # @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. + # @param year [Float] The tax year this W4 document applies to. # @see FinchAPI::Models::HRIS::W42020#data class Data < FinchAPI::Internal::Type::BaseModel @@ -38,72 +38,72 @@ class Data < FinchAPI::Internal::Type::BaseModel # Amount claimed for dependents other than qualifying children under 17 (in # cents). # - # @return [Integer, nil] - optional :amount_for_other_dependents, Integer, nil?: true + # @return [Integer] + required :amount_for_other_dependents, Integer # @!attribute amount_for_qualifying_children_under_17 # Amount claimed for dependents under 17 years old (in cents). # - # @return [Integer, nil] - optional :amount_for_qualifying_children_under_17, Integer, nil?: true + # @return [Integer] + required :amount_for_qualifying_children_under_17, Integer # @!attribute deductions # Deductible expenses (in cents). # - # @return [Integer, nil] - optional :deductions, Integer, nil?: true + # @return [Integer] + required :deductions, Integer # @!attribute extra_withholding # Additional withholding amount (in cents). # - # @return [Integer, nil] - optional :extra_withholding, Integer, nil?: true + # @return [Integer] + required :extra_withholding, Integer # @!attribute filing_status # The individual's filing status for tax purposes. # # @return [Symbol, FinchAPI::Models::HRIS::W42020::Data::FilingStatus, nil] - optional :filing_status, enum: -> { FinchAPI::HRIS::W42020::Data::FilingStatus }, nil?: true + required :filing_status, enum: -> { FinchAPI::HRIS::W42020::Data::FilingStatus }, nil?: true # @!attribute individual_id # The unique identifier for the individual associated with this document. # - # @return [String, nil] - optional :individual_id, String + # @return [String] + required :individual_id, String # @!attribute other_income # Additional income from sources outside of primary employment (in cents). # - # @return [Integer, nil] - optional :other_income, Integer, nil?: true + # @return [Integer] + required :other_income, Integer # @!attribute total_claim_dependent_and_other_credits # Total amount claimed for dependents and other credits (in cents). # - # @return [Integer, nil] - optional :total_claim_dependent_and_other_credits, Integer, nil?: true + # @return [Integer] + required :total_claim_dependent_and_other_credits, Integer - # @!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) + # @!method initialize(amount_for_other_dependents:, amount_for_qualifying_children_under_17:, deductions:, extra_withholding:, filing_status:, individual_id:, other_income:, total_claim_dependent_and_other_credits:) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::W42020::Data} for more details. # # Detailed information specific to the 2020 W4 form. # - # @param amount_for_other_dependents [Integer, nil] Amount claimed for dependents other than qualifying children under 17 (in cents) + # @param amount_for_other_dependents [Integer] Amount claimed for dependents other than qualifying children under 17 (in cents) # - # @param amount_for_qualifying_children_under_17 [Integer, nil] Amount claimed for dependents under 17 years old (in cents). + # @param amount_for_qualifying_children_under_17 [Integer] Amount claimed for dependents under 17 years old (in cents). # - # @param deductions [Integer, nil] Deductible expenses (in cents). + # @param deductions [Integer] Deductible expenses (in cents). # - # @param extra_withholding [Integer, nil] Additional withholding amount (in cents). + # @param extra_withholding [Integer] Additional withholding amount (in cents). # # @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. # - # @param other_income [Integer, nil] Additional income from sources outside of primary employment (in cents). + # @param other_income [Integer] Additional income from sources outside of primary employment (in cents). # - # @param total_claim_dependent_and_other_credits [Integer, nil] Total amount claimed for dependents and other credits (in cents). + # @param total_claim_dependent_and_other_credits [Integer] Total amount claimed for dependents and other credits (in cents). # The individual's filing status for tax purposes. # diff --git a/lib/finch_api/models/introspection.rb b/lib/finch_api/models/introspection.rb index 3aa7cd50..83f47db6 100644 --- a/lib/finch_api/models/introspection.rb +++ b/lib/finch_api/models/introspection.rb @@ -99,17 +99,12 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :customer_name, String, nil?: true - # @!attribute entity_ids - # Array of entity IDs associated with this connection. + # @!attribute entities + # Array of detailed entity information for each connected account in multi-account + # mode # - # @return [Array, nil] - optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - - # @!attribute entity_mode - # Indicates whether this connection manages a single entity or multiple entities. - # - # @return [Symbol, FinchAPI::Models::Introspection::EntityMode, nil] - optional :entity_mode, enum: -> { FinchAPI::Introspection::EntityMode } + # @return [Array, nil] + optional :entities, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Introspection::Entity] } # @!attribute manual # Whether the connection associated with the `access_token` uses the Assisted @@ -134,7 +129,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :username, String, nil?: true - # @!method initialize(id:, client_id:, client_type:, connection_id:, connection_status:, connection_type:, products:, provider_id:, account_id: nil, authentication_methods: nil, company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, entity_ids: nil, entity_mode: nil, manual: nil, payroll_provider_id: nil, username: nil) + # @!method initialize(id:, client_id:, client_type:, connection_id:, connection_status:, connection_type:, products:, provider_id:, account_id: nil, authentication_methods: nil, company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, entities: nil, manual: nil, payroll_provider_id: nil, username: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Introspection} for more details. # @@ -166,9 +161,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # # @param customer_name [String, nil] The name of your customer you provided to Finch when a connect session was creat # - # @param entity_ids [Array] Array of entity IDs associated with this connection. - # - # @param entity_mode [Symbol, FinchAPI::Models::Introspection::EntityMode] Indicates whether this connection manages a single entity or multiple entities. + # @param entities [Array] Array of detailed entity information for each connected account in multi-account # # @param manual [Boolean] Whether the connection associated with the `access_token` uses the Assisted Conn # @@ -334,17 +327,39 @@ module LastSuccessfulSync end end - # Indicates whether this connection manages a single entity or multiple entities. - # - # @see FinchAPI::Models::Introspection#entity_mode - module EntityMode - extend FinchAPI::Internal::Type::Enum + class Entity < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # The connection account ID for this entity + # + # @return [String] + required :id, String - SINGLE = :single - MULTI = :multi + # @!attribute name + # The name of the entity (payroll provider company name) + # + # @return [String, nil] + required :name, String, nil?: true - # @!method self.values - # @return [Array] + # @!attribute source_id + # The source ID of the entity + # + # @return [String, nil] + required :source_id, String, nil?: true + + # @!attribute type + # The type of entity + # + # @return [String, nil] + required :type, String, nil?: true + + # @!method initialize(id:, name:, source_id:, type:) + # @param id [String] The connection account ID for this entity + # + # @param name [String, nil] The name of the entity (payroll provider company name) + # + # @param source_id [String, nil] The source ID of the entity + # + # @param type [String, nil] The type of entity end end end diff --git a/lib/finch_api/models/jobs/automated_list_params.rb b/lib/finch_api/models/jobs/automated_list_params.rb index 12461cd6..5d7fd632 100644 --- a/lib/finch_api/models/jobs/automated_list_params.rb +++ b/lib/finch_api/models/jobs/automated_list_params.rb @@ -8,14 +8,6 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute entity_id - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - # - # @return [String, nil] - optional :entity_id, String - # @!attribute limit # Number of items to return # @@ -28,12 +20,7 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :offset, Integer - # @!method initialize(entity_id: nil, limit: nil, offset: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Jobs::AutomatedListParams} for more details. - # - # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh - # + # @!method initialize(limit: nil, offset: nil, request_options: {}) # @param limit [Integer] Number of items to return # # @param offset [Integer] Index to start from (defaults to 0) diff --git a/lib/finch_api/models/jobs/automated_retrieve_params.rb b/lib/finch_api/models/jobs/automated_retrieve_params.rb index 7eb3a0ae..dc698f82 100644 --- a/lib/finch_api/models/jobs/automated_retrieve_params.rb +++ b/lib/finch_api/models/jobs/automated_retrieve_params.rb @@ -8,20 +8,7 @@ class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute entity_id - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - # - # @return [String, nil] - optional :entity_id, String - - # @!method initialize(entity_id: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details. - # - # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh - # + # @!method initialize(request_options: {}) # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/jobs/manual_retrieve_params.rb b/lib/finch_api/models/jobs/manual_retrieve_params.rb index 2ffa97b8..321c5aa6 100644 --- a/lib/finch_api/models/jobs/manual_retrieve_params.rb +++ b/lib/finch_api/models/jobs/manual_retrieve_params.rb @@ -8,20 +8,7 @@ class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute entity_id - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - # - # @return [String, nil] - optional :entity_id, String - - # @!method initialize(entity_id: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details. - # - # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh - # + # @!method initialize(request_options: {}) # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/payroll/pay_group_list_params.rb b/lib/finch_api/models/payroll/pay_group_list_params.rb index da5be761..b6bcc91b 100644 --- a/lib/finch_api/models/payroll/pay_group_list_params.rb +++ b/lib/finch_api/models/payroll/pay_group_list_params.rb @@ -8,6 +8,12 @@ class PayGroupListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + # @!attribute individual_id # # @return [String, nil] @@ -18,9 +24,13 @@ class PayGroupListParams < FinchAPI::Internal::Type::BaseModel # @return [Array, nil] optional :pay_frequencies, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(individual_id: nil, pay_frequencies: nil, request_options: {}) + # @!method initialize(entity_ids: nil, individual_id: nil, pay_frequencies: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param individual_id [String] + # # @param pay_frequencies [Array] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/payroll/pay_group_retrieve_params.rb b/lib/finch_api/models/payroll/pay_group_retrieve_params.rb index fb2f8114..69858b28 100644 --- a/lib/finch_api/models/payroll/pay_group_retrieve_params.rb +++ b/lib/finch_api/models/payroll/pay_group_retrieve_params.rb @@ -8,7 +8,15 @@ class PayGroupRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/provider.rb b/lib/finch_api/models/provider.rb index 5e3f8a81..03be47a6 100644 --- a/lib/finch_api/models/provider.rb +++ b/lib/finch_api/models/provider.rb @@ -2,16 +2,27 @@ module FinchAPI module Models - # @see FinchAPI::Resources::Providers#list class Provider < FinchAPI::Internal::Type::BaseModel # @!attribute id # The id of the payroll provider used in Connect. # - # @return [String, nil] - optional :id, String + # @return [String] + required :id, String + + # @!attribute display_name + # The display name of the payroll provider. + # + # @return [String] + required :display_name, String + + # @!attribute products + # The list of Finch products supported on this payroll provider. + # + # @return [Array] + required :products, FinchAPI::Internal::Type::ArrayOf[String] # @!attribute authentication_methods - # The list of authentication methods supported by the provider. + # The authentication methods supported by the provider. # # @return [Array, nil] optional :authentication_methods, @@ -23,12 +34,6 @@ class Provider < FinchAPI::Internal::Type::BaseModel # @return [Boolean, nil] optional :beta, FinchAPI::Internal::Type::Boolean - # @!attribute display_name - # The display name of the payroll provider. - # - # @return [String, nil] - optional :display_name, String - # @!attribute icon # The url to the official icon of the payroll provider. # @@ -42,6 +47,8 @@ class Provider < FinchAPI::Internal::Type::BaseModel optional :logo, String # @!attribute manual + # @deprecated + # # [DEPRECATED] Whether the Finch integration with this provider uses the Assisted # Connect Flow by default. This field is now deprecated. Please check for a `type` # of `assisted` in the `authentication_methods` field instead. @@ -61,23 +68,19 @@ class Provider < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :primary_color, String - # @!attribute products - # The list of Finch products supported on this payroll provider. - # - # @return [Array, nil] - 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) + # @!method initialize(id:, display_name:, products:, authentication_methods: nil, beta: nil, icon: nil, logo: nil, manual: nil, mfa_required: nil, primary_color: nil) # 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 display_name [String] The display name of the payroll provider. # - # @param beta [Boolean] `true` if the integration is in a beta state, `false` otherwise + # @param products [Array] The list of Finch products supported on this payroll provider. # - # @param display_name [String] The display name of the payroll provider. + # @param authentication_methods [Array] The authentication methods supported by the provider. + # + # @param beta [Boolean] `true` if the integration is in a beta state, `false` otherwise # # @param icon [String] The url to the official icon of the payroll provider. # @@ -88,1090 +91,36 @@ class Provider < FinchAPI::Internal::Type::BaseModel # @param mfa_required [Boolean] whether MFA is required for the provider. # # @param primary_color [String] The hex code for the primary color of the payroll provider. - # - # @param products [Array] The list of Finch products supported on this payroll provider. class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel + # @!attribute type + # The type of authentication method + # + # @return [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type] + required :type, enum: -> { FinchAPI::Provider::AuthenticationMethod::Type } + # @!attribute benefits_support - # Each benefit type and their supported features. If the benefit type is not - # supported, the property will be null + # The supported benefit types and their configurations # - # @return [FinchAPI::Models::HRIS::BenefitsSupport, nil] - optional :benefits_support, -> { FinchAPI::HRIS::BenefitsSupport }, nil?: true + # @return [Hash{Symbol=>Object, nil}, nil] + optional :benefits_support, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] # @!attribute supported_fields - # The supported data fields returned by our HR and payroll endpoints + # The supported fields for each Finch product # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields, nil] + # @return [Hash{Symbol=>Object, nil}, nil] optional :supported_fields, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields - }, - nil?: true + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] - # @!attribute type - # The type of authentication method. - # - # @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::Models::Provider::AuthenticationMethod} for more details. - # - # @param benefits_support [FinchAPI::Models::HRIS::BenefitsSupport, nil] Each benefit type and their supported features. If the benefit type is not suppo + # @!method initialize(type:, benefits_support: nil, supported_fields: nil) + # @param type [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type] The type of authentication method # - # @param supported_fields [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints + # @param benefits_support [Hash{Symbol=>Object, nil}] The supported benefit types and their configurations # - # @param type [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type] The type of authentication method. - - # @see FinchAPI::Models::Provider::AuthenticationMethod#supported_fields - class SupportedFields < FinchAPI::Internal::Type::BaseModel - # @!attribute company - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company, nil] - optional :company, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company } - - # @!attribute directory - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory, nil] - optional :directory, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory } - - # @!attribute employment - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment, nil] - optional :employment, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment } - - # @!attribute individual - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual, nil] - optional :individual, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual } - - # @!attribute pay_group - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayGroup, nil] - optional :pay_group, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup } - - # @!attribute pay_statement - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement, nil] - optional :pay_statement, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement } - - # @!attribute payment - # - # @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::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 - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!attribute accounts - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, nil] - optional :accounts, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts } - - # @!attribute departments - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments, nil] - optional :departments, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments } - - # @!attribute ein - # - # @return [Boolean, nil] - optional :ein, FinchAPI::Internal::Type::Boolean - - # @!attribute entity - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity, nil] - optional :entity, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity } - - # @!attribute legal_name - # - # @return [Boolean, nil] - optional :legal_name, FinchAPI::Internal::Type::Boolean - - # @!attribute locations - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations, nil] - optional :locations, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations } - - # @!attribute primary_email - # - # @return [Boolean, nil] - optional :primary_email, FinchAPI::Internal::Type::Boolean - - # @!attribute primary_phone_number - # - # @return [Boolean, nil] - optional :primary_phone_number, FinchAPI::Internal::Type::Boolean - - # @!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::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts] - # @param departments [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments] - # @param ein [Boolean] - # @param entity [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity] - # @param legal_name [Boolean] - # @param locations [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations] - # @param primary_email [Boolean] - # @param primary_phone_number [Boolean] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#accounts - class Accounts < FinchAPI::Internal::Type::BaseModel - # @!attribute account_name - # - # @return [Boolean, nil] - optional :account_name, FinchAPI::Internal::Type::Boolean - - # @!attribute account_number - # - # @return [Boolean, nil] - optional :account_number, FinchAPI::Internal::Type::Boolean - - # @!attribute account_type - # - # @return [Boolean, nil] - optional :account_type, FinchAPI::Internal::Type::Boolean - - # @!attribute institution_name - # - # @return [Boolean, nil] - optional :institution_name, FinchAPI::Internal::Type::Boolean - - # @!attribute routing_number - # - # @return [Boolean, nil] - optional :routing_number, FinchAPI::Internal::Type::Boolean - - # @!method initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil) - # @param account_name [Boolean] - # @param account_number [Boolean] - # @param account_type [Boolean] - # @param institution_name [Boolean] - # @param routing_number [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#departments - class Departments < FinchAPI::Internal::Type::BaseModel - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!attribute parent - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] - optional :parent, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent } - - # @!method initialize(name: nil, parent: nil) - # @param name [Boolean] - # @param parent [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments#parent - class Parent < FinchAPI::Internal::Type::BaseModel - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!method initialize(name: nil) - # @param name [Boolean] - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#entity - class Entity < FinchAPI::Internal::Type::BaseModel - # @!attribute subtype - # - # @return [Boolean, nil] - optional :subtype, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(subtype: nil, type: nil) - # @param subtype [Boolean] - # @param type [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#locations - class Locations < FinchAPI::Internal::Type::BaseModel - # @!attribute city - # - # @return [Boolean, nil] - optional :city, FinchAPI::Internal::Type::Boolean - - # @!attribute country - # - # @return [Boolean, nil] - optional :country, FinchAPI::Internal::Type::Boolean - - # @!attribute line1 - # - # @return [Boolean, nil] - optional :line1, FinchAPI::Internal::Type::Boolean - - # @!attribute line2 - # - # @return [Boolean, nil] - optional :line2, FinchAPI::Internal::Type::Boolean - - # @!attribute postal_code - # - # @return [Boolean, nil] - optional :postal_code, FinchAPI::Internal::Type::Boolean - - # @!attribute state - # - # @return [Boolean, nil] - optional :state, FinchAPI::Internal::Type::Boolean - - # @!method initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) - # @param city [Boolean] - # @param country [Boolean] - # @param line1 [Boolean] - # @param line2 [Boolean] - # @param postal_code [Boolean] - # @param state [Boolean] - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#directory - class Directory < FinchAPI::Internal::Type::BaseModel - # @!attribute individuals - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] - optional :individuals, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals } - - # @!attribute paging - # - # @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::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals] - # @param paging [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory#individuals - class Individuals < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!attribute department - # - # @return [Boolean, nil] - optional :department, FinchAPI::Internal::Type::Boolean - - # @!attribute first_name - # - # @return [Boolean, nil] - optional :first_name, FinchAPI::Internal::Type::Boolean - - # @!attribute is_active - # - # @return [Boolean, nil] - optional :is_active, FinchAPI::Internal::Type::Boolean - - # @!attribute last_name - # - # @return [Boolean, nil] - optional :last_name, FinchAPI::Internal::Type::Boolean - - # @!attribute manager - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] - optional :manager, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager } - - # @!attribute middle_name - # - # @return [Boolean, nil] - optional :middle_name, FinchAPI::Internal::Type::Boolean - - # @!method initialize(id: nil, department: nil, first_name: nil, is_active: nil, last_name: nil, manager: nil, middle_name: nil) - # @param id [Boolean] - # @param department [Boolean] - # @param first_name [Boolean] - # @param is_active [Boolean] - # @param last_name [Boolean] - # @param manager [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] - # @param middle_name [Boolean] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals#manager - class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!method initialize(id: nil) - # @param id [Boolean] - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory#paging - class Paging < FinchAPI::Internal::Type::BaseModel - # @!attribute count - # - # @return [Boolean, nil] - optional :count, FinchAPI::Internal::Type::Boolean - - # @!attribute offset - # - # @return [Boolean, nil] - optional :offset, FinchAPI::Internal::Type::Boolean - - # @!method initialize(count: nil, offset: nil) - # @param count [Boolean] - # @param offset [Boolean] - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#employment - class Employment < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!attribute class_code - # - # @return [Boolean, nil] - optional :class_code, FinchAPI::Internal::Type::Boolean - - # @!attribute custom_fields - # - # @return [Boolean, nil] - optional :custom_fields, FinchAPI::Internal::Type::Boolean - - # @!attribute department - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Department, nil] - optional :department, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department } - - # @!attribute employment - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, nil] - optional :employment, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment } - - # @!attribute employment_status - # - # @return [Boolean, nil] - optional :employment_status, FinchAPI::Internal::Type::Boolean - - # @!attribute end_date - # - # @return [Boolean, nil] - optional :end_date, FinchAPI::Internal::Type::Boolean - - # @!attribute first_name - # - # @return [Boolean, nil] - optional :first_name, FinchAPI::Internal::Type::Boolean - - # @!attribute income - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income, nil] - optional :income, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income } - - # @!attribute income_history - # - # @return [Boolean, nil] - optional :income_history, FinchAPI::Internal::Type::Boolean - - # @!attribute is_active - # - # @return [Boolean, nil] - optional :is_active, FinchAPI::Internal::Type::Boolean - - # @!attribute last_name - # - # @return [Boolean, nil] - optional :last_name, FinchAPI::Internal::Type::Boolean - - # @!attribute location - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location, nil] - optional :location, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location } - - # @!attribute manager - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, nil] - optional :manager, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager } - - # @!attribute middle_name - # - # @return [Boolean, nil] - optional :middle_name, FinchAPI::Internal::Type::Boolean - - # @!attribute start_date - # - # @return [Boolean, nil] - optional :start_date, FinchAPI::Internal::Type::Boolean - - # @!attribute title - # - # @return [Boolean, nil] - optional :title, FinchAPI::Internal::Type::Boolean - - # @!method initialize(id: nil, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, location: nil, manager: nil, middle_name: nil, start_date: nil, title: nil) - # @param id [Boolean] - # @param class_code [Boolean] - # @param custom_fields [Boolean] - # @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::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income] - # @param income_history [Boolean] - # @param is_active [Boolean] - # @param last_name [Boolean] - # @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::Models::Provider::AuthenticationMethod::SupportedFields::Employment#department - class Department < FinchAPI::Internal::Type::BaseModel - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!method initialize(name: nil) - # @param name [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#employment - class Employment < FinchAPI::Internal::Type::BaseModel - # @!attribute subtype - # - # @return [Boolean, nil] - optional :subtype, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(subtype: nil, type: nil) - # @param subtype [Boolean] - # @param type [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#income - class Income < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # - # @return [Boolean, nil] - optional :amount, FinchAPI::Internal::Type::Boolean - - # @!attribute currency - # - # @return [Boolean, nil] - optional :currency, FinchAPI::Internal::Type::Boolean - - # @!attribute unit - # - # @return [Boolean, nil] - optional :unit, FinchAPI::Internal::Type::Boolean - - # @!method initialize(amount: nil, currency: nil, unit: nil) - # @param amount [Boolean] - # @param currency [Boolean] - # @param unit [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#location - class Location < FinchAPI::Internal::Type::BaseModel - # @!attribute city - # - # @return [Boolean, nil] - optional :city, FinchAPI::Internal::Type::Boolean - - # @!attribute country - # - # @return [Boolean, nil] - optional :country, FinchAPI::Internal::Type::Boolean - - # @!attribute line1 - # - # @return [Boolean, nil] - optional :line1, FinchAPI::Internal::Type::Boolean - - # @!attribute line2 - # - # @return [Boolean, nil] - optional :line2, FinchAPI::Internal::Type::Boolean - - # @!attribute postal_code - # - # @return [Boolean, nil] - optional :postal_code, FinchAPI::Internal::Type::Boolean - - # @!attribute state - # - # @return [Boolean, nil] - optional :state, FinchAPI::Internal::Type::Boolean - - # @!method initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) - # @param city [Boolean] - # @param country [Boolean] - # @param line1 [Boolean] - # @param line2 [Boolean] - # @param postal_code [Boolean] - # @param state [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#manager - class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!method initialize(id: nil) - # @param id [Boolean] - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#individual - class Individual < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!attribute dob - # - # @return [Boolean, nil] - optional :dob, FinchAPI::Internal::Type::Boolean - - # @!attribute emails - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, nil] - optional :emails, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails } - - # @!attribute encrypted_ssn - # - # @return [Boolean, nil] - optional :encrypted_ssn, FinchAPI::Internal::Type::Boolean - - # @!attribute ethnicity - # - # @return [Boolean, nil] - optional :ethnicity, FinchAPI::Internal::Type::Boolean - - # @!attribute first_name - # - # @return [Boolean, nil] - optional :first_name, FinchAPI::Internal::Type::Boolean - - # @!attribute gender - # - # @return [Boolean, nil] - optional :gender, FinchAPI::Internal::Type::Boolean - - # @!attribute last_name - # - # @return [Boolean, nil] - optional :last_name, FinchAPI::Internal::Type::Boolean - - # @!attribute middle_name - # - # @return [Boolean, nil] - optional :middle_name, FinchAPI::Internal::Type::Boolean - - # @!attribute phone_numbers - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] - optional :phone_numbers, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers } - - # @!attribute preferred_name - # - # @return [Boolean, nil] - optional :preferred_name, FinchAPI::Internal::Type::Boolean - - # @!attribute residence - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, nil] - optional :residence, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence } - - # @!attribute ssn - # - # @return [Boolean, nil] - optional :ssn, FinchAPI::Internal::Type::Boolean - - # @!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::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::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] - # @param preferred_name [Boolean] - # @param residence [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence] - # @param ssn [Boolean] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual#emails - class Emails < FinchAPI::Internal::Type::BaseModel - # @!attribute data - # - # @return [Boolean, nil] - optional :data, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(data: nil, type: nil) - # @param data [Boolean] - # @param type [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual#phone_numbers - class PhoneNumbers < FinchAPI::Internal::Type::BaseModel - # @!attribute data - # - # @return [Boolean, nil] - optional :data, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(data: nil, type: nil) - # @param data [Boolean] - # @param type [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual#residence - class Residence < FinchAPI::Internal::Type::BaseModel - # @!attribute city - # - # @return [Boolean, nil] - optional :city, FinchAPI::Internal::Type::Boolean - - # @!attribute country - # - # @return [Boolean, nil] - optional :country, FinchAPI::Internal::Type::Boolean - - # @!attribute line1 - # - # @return [Boolean, nil] - optional :line1, FinchAPI::Internal::Type::Boolean - - # @!attribute line2 - # - # @return [Boolean, nil] - optional :line2, FinchAPI::Internal::Type::Boolean - - # @!attribute postal_code - # - # @return [Boolean, nil] - optional :postal_code, FinchAPI::Internal::Type::Boolean - - # @!attribute state - # - # @return [Boolean, nil] - optional :state, FinchAPI::Internal::Type::Boolean - - # @!method initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) - # @param city [Boolean] - # @param country [Boolean] - # @param line1 [Boolean] - # @param line2 [Boolean] - # @param postal_code [Boolean] - # @param state [Boolean] - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#pay_group - class PayGroup < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!attribute individual_ids - # - # @return [Boolean, nil] - optional :individual_ids, FinchAPI::Internal::Type::Boolean - - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!attribute pay_frequencies - # - # @return [Boolean, nil] - optional :pay_frequencies, FinchAPI::Internal::Type::Boolean - - # @!method initialize(id: nil, individual_ids: nil, name: nil, pay_frequencies: nil) - # @param id [Boolean] - # @param individual_ids [Boolean] - # @param name [Boolean] - # @param pay_frequencies [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#pay_statement - class PayStatement < FinchAPI::Internal::Type::BaseModel - # @!attribute paging - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] - optional :paging, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging } - - # @!attribute pay_statements - # - # @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::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # @param pay_statements [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement#paging - class Paging < FinchAPI::Internal::Type::BaseModel - # @!attribute count - # - # @return [Boolean] - required :count, FinchAPI::Internal::Type::Boolean - - # @!attribute offset - # - # @return [Boolean] - required :offset, FinchAPI::Internal::Type::Boolean - - # @!method initialize(count:, offset:) - # @param count [Boolean] - # @param offset [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement#pay_statements - class PayStatements < FinchAPI::Internal::Type::BaseModel - # @!attribute earnings - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] - optional :earnings, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings } - - # @!attribute employee_deductions - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] - optional :employee_deductions, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions } - - # @!attribute employer_contributions - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] - optional :employer_contributions, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions } - - # @!attribute gross_pay - # - # @return [Boolean, nil] - optional :gross_pay, FinchAPI::Internal::Type::Boolean - - # @!attribute individual_id - # - # @return [Boolean, nil] - optional :individual_id, FinchAPI::Internal::Type::Boolean - - # @!attribute net_pay - # - # @return [Boolean, nil] - optional :net_pay, FinchAPI::Internal::Type::Boolean - - # @!attribute payment_method - # - # @return [Boolean, nil] - optional :payment_method, FinchAPI::Internal::Type::Boolean - - # @!attribute taxes - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] - optional :taxes, - -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes } - - # @!attribute total_hours - # - # @return [Boolean, nil] - optional :total_hours, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - 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::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::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] - # @param total_hours [Boolean] - # @param type [Boolean] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#earnings - class Earnings < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # - # @return [Boolean, nil] - optional :amount, FinchAPI::Internal::Type::Boolean - - # @!attribute currency - # - # @return [Boolean, nil] - optional :currency, FinchAPI::Internal::Type::Boolean - - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(amount: nil, currency: nil, name: nil, type: nil) - # @param amount [Boolean] - # @param currency [Boolean] - # @param name [Boolean] - # @param type [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employee_deductions - class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # - # @return [Boolean, nil] - optional :amount, FinchAPI::Internal::Type::Boolean - - # @!attribute currency - # - # @return [Boolean, nil] - optional :currency, FinchAPI::Internal::Type::Boolean - - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!attribute pre_tax - # - # @return [Boolean, nil] - optional :pre_tax, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(amount: nil, currency: nil, name: nil, pre_tax: nil, type: nil) - # @param amount [Boolean] - # @param currency [Boolean] - # @param name [Boolean] - # @param pre_tax [Boolean] - # @param type [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employer_contributions - class EmployerContributions < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # - # @return [Boolean, nil] - optional :amount, FinchAPI::Internal::Type::Boolean - - # @!attribute currency - # - # @return [Boolean, nil] - optional :currency, FinchAPI::Internal::Type::Boolean - - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!method initialize(amount: nil, currency: nil, name: nil) - # @param amount [Boolean] - # @param currency [Boolean] - # @param name [Boolean] - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#taxes - class Taxes < FinchAPI::Internal::Type::BaseModel - # @!attribute amount - # - # @return [Boolean, nil] - optional :amount, FinchAPI::Internal::Type::Boolean - - # @!attribute currency - # - # @return [Boolean, nil] - optional :currency, FinchAPI::Internal::Type::Boolean - - # @!attribute employer - # - # @return [Boolean, nil] - optional :employer, FinchAPI::Internal::Type::Boolean - - # @!attribute name - # - # @return [Boolean, nil] - optional :name, FinchAPI::Internal::Type::Boolean - - # @!attribute type - # - # @return [Boolean, nil] - optional :type, FinchAPI::Internal::Type::Boolean - - # @!method initialize(amount: nil, currency: nil, employer: nil, name: nil, type: nil) - # @param amount [Boolean] - # @param currency [Boolean] - # @param employer [Boolean] - # @param name [Boolean] - # @param type [Boolean] - end - end - end - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#payment - class Payment < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # - # @return [Boolean, nil] - optional :id, FinchAPI::Internal::Type::Boolean - - # @!attribute company_debit - # - # @return [Boolean, nil] - optional :company_debit, FinchAPI::Internal::Type::Boolean - - # @!attribute debit_date - # - # @return [Boolean, nil] - optional :debit_date, FinchAPI::Internal::Type::Boolean - - # @!attribute employee_taxes - # - # @return [Boolean, nil] - optional :employee_taxes, FinchAPI::Internal::Type::Boolean - - # @!attribute employer_taxes - # - # @return [Boolean, nil] - optional :employer_taxes, FinchAPI::Internal::Type::Boolean - - # @!attribute gross_pay - # - # @return [Boolean, nil] - optional :gross_pay, FinchAPI::Internal::Type::Boolean - - # @!attribute individual_ids - # - # @return [Boolean, nil] - optional :individual_ids, FinchAPI::Internal::Type::Boolean - - # @!attribute net_pay - # - # @return [Boolean, nil] - optional :net_pay, FinchAPI::Internal::Type::Boolean - - # @!attribute pay_date - # - # @return [Boolean, nil] - optional :pay_date, FinchAPI::Internal::Type::Boolean - - # @!attribute pay_frequencies - # - # @return [Boolean, nil] - optional :pay_frequencies, FinchAPI::Internal::Type::Boolean - - # @!attribute pay_group_ids - # - # @return [Boolean, nil] - optional :pay_group_ids, FinchAPI::Internal::Type::Boolean - - # @!attribute pay_period - # - # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] - optional :pay_period, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod } - - # @!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 [Boolean] - # @param company_debit [Boolean] - # @param debit_date [Boolean] - # @param employee_taxes [Boolean] - # @param employer_taxes [Boolean] - # @param gross_pay [Boolean] - # @param individual_ids [Boolean] - # @param net_pay [Boolean] - # @param pay_date [Boolean] - # @param pay_frequencies [Boolean] - # @param pay_group_ids [Boolean] - # @param pay_period [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod] - - # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment#pay_period - class PayPeriod < FinchAPI::Internal::Type::BaseModel - # @!attribute end_date - # - # @return [Boolean, nil] - optional :end_date, FinchAPI::Internal::Type::Boolean - - # @!attribute start_date - # - # @return [Boolean, nil] - optional :start_date, FinchAPI::Internal::Type::Boolean - - # @!method initialize(end_date: nil, start_date: nil) - # @param end_date [Boolean] - # @param start_date [Boolean] - end - end - end + # @param supported_fields [Hash{Symbol=>Object, nil}] The supported fields for each Finch product - # The type of authentication method. + # The type of authentication method # # @see FinchAPI::Models::Provider::AuthenticationMethod#type module Type @@ -1182,6 +131,7 @@ module Type API_TOKEN = :api_token API_CREDENTIAL = :api_credential OAUTH = :oauth + API = :api # @!method self.values # @return [Array] diff --git a/lib/finch_api/models/provider_list_response.rb b/lib/finch_api/models/provider_list_response.rb new file mode 100644 index 00000000..3b6c0609 --- /dev/null +++ b/lib/finch_api/models/provider_list_response.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + # @see FinchAPI::Resources::Providers#list + class ProviderListResponse < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # The id of the payroll provider used in Connect. + # + # @return [String] + required :id, String + + # @!attribute display_name + # The display name of the payroll provider. + # + # @return [String] + required :display_name, String + + # @!attribute products + # The list of Finch products supported on this payroll provider. + # + # @return [Array] + required :products, FinchAPI::Internal::Type::ArrayOf[String] + + # @!attribute authentication_methods + # The authentication methods supported by the provider. + # + # @return [Array, nil] + optional :authentication_methods, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::ProviderListResponse::AuthenticationMethod] } + + # @!attribute beta + # `true` if the integration is in a beta state, `false` otherwise + # + # @return [Boolean, nil] + optional :beta, FinchAPI::Internal::Type::Boolean + + # @!attribute icon + # The url to the official icon of the payroll provider. + # + # @return [String, nil] + optional :icon, String + + # @!attribute logo + # The url to the official logo of the payroll provider. + # + # @return [String, nil] + optional :logo, String + + # @!attribute manual + # @deprecated + # + # [DEPRECATED] Whether the Finch integration with this provider uses the Assisted + # Connect Flow by default. This field is now deprecated. Please check for a `type` + # of `assisted` in the `authentication_methods` field instead. + # + # @return [Boolean, nil] + optional :manual, FinchAPI::Internal::Type::Boolean + + # @!attribute mfa_required + # whether MFA is required for the provider. + # + # @return [Boolean, nil] + optional :mfa_required, FinchAPI::Internal::Type::Boolean + + # @!attribute primary_color + # The hex code for the primary color of the payroll provider. + # + # @return [String, nil] + optional :primary_color, String + + # @!method initialize(id:, display_name:, products:, authentication_methods: nil, beta: nil, icon: nil, logo: nil, manual: nil, mfa_required: nil, primary_color: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::ProviderListResponse} for more details. + # + # @param id [String] The id of the payroll provider used in Connect. + # + # @param display_name [String] The display name of the payroll provider. + # + # @param products [Array] The list of Finch products supported on this payroll provider. + # + # @param authentication_methods [Array] The authentication methods supported by the provider. + # + # @param beta [Boolean] `true` if the integration is in a beta state, `false` otherwise + # + # @param icon [String] The url to the official icon of the payroll provider. + # + # @param logo [String] The url to the official logo of the payroll provider. + # + # @param manual [Boolean] [DEPRECATED] Whether the Finch integration with this provider uses the Assisted + # + # @param mfa_required [Boolean] whether MFA is required for the provider. + # + # @param primary_color [String] The hex code for the primary color of the payroll provider. + + class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel + # @!attribute type + # The type of authentication method + # + # @return [Symbol, FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type] + required :type, enum: -> { FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type } + + # @!attribute benefits_support + # The supported benefit types and their configurations + # + # @return [Hash{Symbol=>Object, nil}, nil] + optional :benefits_support, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] + + # @!attribute supported_fields + # The supported fields for each Finch product + # + # @return [Hash{Symbol=>Object, nil}, nil] + optional :supported_fields, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] + + # @!method initialize(type:, benefits_support: nil, supported_fields: nil) + # @param type [Symbol, FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type] The type of authentication method + # + # @param benefits_support [Hash{Symbol=>Object, nil}] The supported benefit types and their configurations + # + # @param supported_fields [Hash{Symbol=>Object, nil}] The supported fields for each Finch product + + # The type of authentication method + # + # @see FinchAPI::Models::ProviderListResponse::AuthenticationMethod#type + module Type + extend FinchAPI::Internal::Type::Enum + + ASSISTED = :assisted + CREDENTIAL = :credential + API_TOKEN = :api_token + API_CREDENTIAL = :api_credential + OAUTH = :oauth + API = :api + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/finch_api/models/request_forwarding_forward_params.rb b/lib/finch_api/models/request_forwarding_forward_params.rb index 0a88971e..ccf1de21 100644 --- a/lib/finch_api/models/request_forwarding_forward_params.rb +++ b/lib/finch_api/models/request_forwarding_forward_params.rb @@ -34,15 +34,19 @@ class RequestForwardingForwardParams < FinchAPI::Internal::Type::BaseModel # specified as an object of key-value pairs. Example: # `{"Content-Type": "application/xml", "X-API-Version": "v1" }` # - # @return [Object, nil] - optional :headers, FinchAPI::Internal::Type::Unknown, nil?: true + # @return [Hash{Symbol=>Object, nil}, nil] + optional :headers, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true # @!attribute params # The query parameters for the forwarded request. This value must be specified as # a valid JSON object rather than a query string. # - # @return [Object, nil] - optional :params, FinchAPI::Internal::Type::Unknown, nil?: true + # @return [Hash{Symbol=>Object, nil}, nil] + optional :params, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true # @!method initialize(method_:, route:, data: nil, headers: nil, params: nil, request_options: {}) # Some parameter documentations has been truncated, see @@ -54,9 +58,9 @@ class RequestForwardingForwardParams < FinchAPI::Internal::Type::BaseModel # # @param data [String, nil] The body for the forwarded request. This value must be specified as either a str # - # @param headers [Object, nil] The HTTP headers to include on the forwarded request. This value must be specifi + # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers to include on the forwarded request. This value must be specifi # - # @param params [Object, nil] The query parameters for the forwarded request. This value must be specified as + # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters for the forwarded request. This value must be specified as # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/finch_api/models/request_forwarding_forward_response.rb b/lib/finch_api/models/request_forwarding_forward_response.rb index 27fc4def..1ae7873a 100644 --- a/lib/finch_api/models/request_forwarding_forward_response.rb +++ b/lib/finch_api/models/request_forwarding_forward_response.rb @@ -4,21 +4,6 @@ module FinchAPI module Models # @see FinchAPI::Resources::RequestForwarding#forward class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute data - # A string representation of the HTTP response body of the forwarded request's - # response received from the underlying integration's API. This field may be null - # in the case where the upstream system's response is empty. - # - # @return [String, nil] - required :data, String, nil?: true - - # @!attribute headers - # The HTTP headers of the forwarded request's response, exactly as received from - # the underlying integration's API. - # - # @return [Object, nil] - required :headers, FinchAPI::Internal::Type::Unknown, nil?: true - # @!attribute request # An object containing details of your original forwarded request, for your ease # of reference. @@ -33,35 +18,37 @@ class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel # @return [Integer] required :status_code, Integer, api_name: :statusCode - # @!method initialize(data:, headers:, request:, status_code:) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::RequestForwardingForwardResponse} for more details. + # @!attribute data + # A string representation of the HTTP response body of the forwarded request's + # response received from the underlying integration's API. This field may be null + # in the case where the upstream system's response is empty. # - # @param data [String, nil] A string representation of the HTTP response body of the forwarded request's res + # @return [String, nil] + optional :data, String, nil?: true + + # @!attribute headers + # The HTTP headers of the forwarded request's response, exactly as received from + # the underlying integration's API. # - # @param headers [Object, nil] The HTTP headers of the forwarded request's response, exactly as received from t + # @return [Hash{Symbol=>Object, nil}, nil] + optional :headers, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true + + # @!method initialize(request:, status_code:, data: nil, headers: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::RequestForwardingForwardResponse} for more details. # # @param request [FinchAPI::Models::RequestForwardingForwardResponse::Request] An object containing details of your original forwarded request, for your ease o # # @param status_code [Integer] The HTTP status code of the forwarded request's response, exactly received from + # + # @param data [String, nil] A string representation of the HTTP response body of the forwarded request's res + # + # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers of the forwarded request's response, exactly as received from t # @see FinchAPI::Models::RequestForwardingForwardResponse#request class Request < FinchAPI::Internal::Type::BaseModel - # @!attribute data - # The body that was specified for the forwarded request. If a value was not - # specified in the original request, this value will be returned as null ; - # otherwise, this value will always be returned as a string. - # - # @return [String, nil] - required :data, String, nil?: true - - # @!attribute headers - # The specified HTTP headers that were included in the forwarded request. If no - # headers were specified, this will be returned as `null`. - # - # @return [Object, nil] - required :headers, FinchAPI::Internal::Type::Unknown, nil?: true - # @!attribute method_ # The HTTP method that was specified for the forwarded request. Valid values # include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`. @@ -69,35 +56,69 @@ class Request < FinchAPI::Internal::Type::BaseModel # @return [String] required :method_, String, api_name: :method - # @!attribute params - # The query parameters that were included in the forwarded request. If no query - # parameters were specified, this will be returned as `null`. - # - # @return [Object, nil] - required :params, FinchAPI::Internal::Type::Unknown, nil?: true - # @!attribute route # The URL route path that was specified for the forwarded request. # # @return [String] required :route, String - # @!method initialize(data:, headers:, method_:, params:, route:) + # @!attribute data + # The body that was specified for the forwarded request. + # + # @return [String, Hash{Symbol=>Object, nil}, nil] + optional :data, + union: -> { FinchAPI::Models::RequestForwardingForwardResponse::Request::Data }, + nil?: true + + # @!attribute headers + # The HTTP headers that were specified for the forwarded request. + # + # @return [Hash{Symbol=>Object, nil}, nil] + optional :headers, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true + + # @!attribute params + # The query parameters that were specified for the forwarded request. + # + # @return [Hash{Symbol=>Object, nil}, nil] + optional :params, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true + + # @!method initialize(method_:, route:, data: nil, headers: nil, params: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::RequestForwardingForwardResponse::Request} for more details. # # An object containing details of your original forwarded request, for your ease # of reference. # - # @param data [String, nil] The body that was specified for the forwarded request. If a value was not specif + # @param method_ [String] The HTTP method that was specified for the forwarded request. Valid values inclu # - # @param headers [Object, nil] The specified HTTP headers that were included in the forwarded request. If no he + # @param route [String] The URL route path that was specified for the forwarded request. # - # @param method_ [String] The HTTP method that was specified for the forwarded request. Valid values inclu + # @param data [String, Hash{Symbol=>Object, nil}, nil] The body that was specified for the forwarded request. # - # @param params [Object, nil] The query parameters that were included in the forwarded request. If no query pa + # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers that were specified for the forwarded request. # - # @param route [String] The URL route path that was specified for the forwarded request. + # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters that were specified for the forwarded request. + + # The body that was specified for the forwarded request. + # + # @see FinchAPI::Models::RequestForwardingForwardResponse::Request#data + module Data + extend FinchAPI::Internal::Type::Union + + variant String + + variant -> { FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::UnionMember1Map } + + # @!method self.variants + # @return [Array(String, Hash{Symbol=>Object, nil})] + + # @type [FinchAPI::Internal::Type::Converter] + UnionMember1Map = FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true] + end end end end diff --git a/lib/finch_api/resources/connect/sessions.rb b/lib/finch_api/resources/connect/sessions.rb index fc959cda..df010dd6 100644 --- a/lib/finch_api/resources/connect/sessions.rb +++ b/lib/finch_api/resources/connect/sessions.rb @@ -9,25 +9,25 @@ class Sessions # # Create a new connect session for an employer # - # @overload new(customer_id:, customer_name:, products:, customer_email: nil, integration: nil, manual: nil, minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, request_options: {}) + # @overload new(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {}) # - # @param customer_id [String] + # @param customer_email [String, nil] Email address of the customer # - # @param customer_name [String] + # @param customer_id [String] Unique identifier for the customer # - # @param products [Array] + # @param customer_name [String] Name of the customer # - # @param customer_email [String, nil] + # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session # - # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] - # - # @param manual [Boolean, nil] + # @param manual [Boolean, nil] Enable manual authentication mode # # @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] + # @param products [Array] The Finch products to request access to + # + # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed # - # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] + # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -50,11 +50,11 @@ def new(params) # # Create a new Connect session for reauthenticating an existing connection # - # @overload reauthenticate(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {}) + # @overload reauthenticate(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {}) # # @param connection_id [String] The ID of the existing connection to reauthenticate # - # @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 + # @param minutes_to_expire [Integer] 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) # diff --git a/lib/finch_api/resources/hris/benefits.rb b/lib/finch_api/resources/hris/benefits.rb index 1bee9fa3..166c7ad7 100644 --- a/lib/finch_api/resources/hris/benefits.rb +++ b/lib/finch_api/resources/hris/benefits.rb @@ -13,15 +13,17 @@ class Benefits # Creates a new company-wide deduction or contribution. Please use the # `/providers` endpoint to view available types for each provider. # - # @overload create(company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {}) + # @overload create(entity_ids: nil, company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {}) # - # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit. + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # - # @param description [String] Name of the benefit as it appears in the provider and pay statements. Recommend + # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] Body param: The company match for this benefit. # - # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # @param description [String] Body param: Name of the benefit as it appears in the provider and pay statements # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] Body param: The frequency of the benefit deduction/contribution. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Body param: Type of benefit. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -30,10 +32,12 @@ class Benefits # @see FinchAPI::Models::HRIS::BenefitCreateParams def create(params = {}) parsed, options = FinchAPI::HRIS::BenefitCreateParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :post, path: "employer/benefits", - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), model: FinchAPI::HRIS::CreateCompanyBenefitsResponse, options: options ) @@ -41,30 +45,37 @@ def create(params = {}) # Lists deductions and contributions information for a given item # - # @overload retrieve(benefit_id, request_options: {}) + # @overload retrieve(benefit_id, entity_ids: nil, request_options: {}) # # @param benefit_id [String] + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::CompanyBenefit] # # @see FinchAPI::Models::HRIS::BenefitRetrieveParams def retrieve(benefit_id, params = {}) + parsed, options = FinchAPI::HRIS::BenefitRetrieveParams.dump_request(params) @client.request( method: :get, path: ["employer/benefits/%1$s", benefit_id], + query: parsed, model: FinchAPI::HRIS::CompanyBenefit, - options: params[:request_options] + options: options ) end # Updates an existing company-wide deduction or contribution # - # @overload update(benefit_id, description: nil, request_options: {}) + # @overload update(benefit_id, entity_ids: nil, description: nil, request_options: {}) # - # @param benefit_id [String] + # @param benefit_id [String] Path param: # - # @param description [String] Updated name or description. + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. + # + # @param description [String] Body param: Updated name or description. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -73,10 +84,12 @@ def retrieve(benefit_id, params = {}) # @see FinchAPI::Models::HRIS::BenefitUpdateParams def update(benefit_id, params = {}) parsed, options = FinchAPI::HRIS::BenefitUpdateParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :post, path: ["employer/benefits/%1$s", benefit_id], - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), model: FinchAPI::HRIS::UpdateCompanyBenefitResponse, options: options ) @@ -84,7 +97,9 @@ def update(benefit_id, params = {}) # List all company-wide deductions and contributions. # - # @overload list(request_options: {}) + # @overload list(entity_ids: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -92,18 +107,22 @@ def update(benefit_id, params = {}) # # @see FinchAPI::Models::HRIS::BenefitListParams def list(params = {}) + parsed, options = FinchAPI::HRIS::BenefitListParams.dump_request(params) @client.request( method: :get, path: "employer/benefits", + query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::CompanyBenefit, - options: params[:request_options] + options: options ) end # Get deductions metadata # - # @overload list_supported_benefits(request_options: {}) + # @overload list_supported_benefits(entity_ids: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -111,12 +130,14 @@ def list(params = {}) # # @see FinchAPI::Models::HRIS::BenefitListSupportedBenefitsParams def list_supported_benefits(params = {}) + parsed, options = FinchAPI::HRIS::BenefitListSupportedBenefitsParams.dump_request(params) @client.request( method: :get, path: "employer/benefits/meta", + query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::SupportedBenefit, - options: params[:request_options] + options: options ) end diff --git a/lib/finch_api/resources/hris/benefits/individuals.rb b/lib/finch_api/resources/hris/benefits/individuals.rb index 5f09ffcb..17f4dfc1 100644 --- a/lib/finch_api/resources/hris/benefits/individuals.rb +++ b/lib/finch_api/resources/hris/benefits/individuals.rb @@ -10,11 +10,13 @@ class Individuals # adjusted. Making the same request multiple times will not create new # enrollments, but will continue to set the state of the existing enrollment. # - # @overload enroll_many(benefit_id, individuals: nil, request_options: {}) + # @overload enroll_many(benefit_id, entity_ids: nil, individuals: nil, request_options: {}) # - # @param benefit_id [String] + # @param benefit_id [String] Path param: + # + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # - # @param individuals [Array] Array of the individual_id to enroll and a configuration object. + # @param individuals [Array] Body param: Array of the individual_id to enroll and a configuration object. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -26,6 +28,7 @@ def enroll_many(benefit_id, params = {}) @client.request( method: :post, path: ["employer/benefits/%1$s/individuals", benefit_id], + query: parsed.except(:individuals), body: parsed[:individuals], model: FinchAPI::HRIS::Benefits::EnrolledIndividualBenefitResponse, options: options @@ -34,20 +37,25 @@ def enroll_many(benefit_id, params = {}) # Lists individuals currently enrolled in a given deduction. # - # @overload enrolled_ids(benefit_id, request_options: {}) + # @overload enrolled_ids(benefit_id, entity_ids: nil, request_options: {}) # # @param benefit_id [String] + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse] # # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsParams def enrolled_ids(benefit_id, params = {}) + parsed, options = FinchAPI::HRIS::Benefits::IndividualEnrolledIDsParams.dump_request(params) @client.request( method: :get, path: ["employer/benefits/%1$s/enrolled", benefit_id], + query: parsed, model: FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse, - options: params[:request_options] + options: options ) end @@ -57,10 +65,12 @@ def enrolled_ids(benefit_id, params = {}) # # Get enrollment information for the given individuals. # - # @overload retrieve_many_benefits(benefit_id, individual_ids: nil, request_options: {}) + # @overload retrieve_many_benefits(benefit_id, entity_ids: nil, individual_ids: nil, request_options: {}) # # @param benefit_id [String] # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param individual_ids [String] comma-delimited list of stable Finch uuids for each individual. If empty, defaul # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] @@ -82,11 +92,13 @@ def retrieve_many_benefits(benefit_id, params = {}) # Unenroll individuals from a deduction or contribution # - # @overload unenroll_many(benefit_id, individual_ids: nil, request_options: {}) + # @overload unenroll_many(benefit_id, entity_ids: nil, individual_ids: nil, request_options: {}) # - # @param benefit_id [String] + # @param benefit_id [String] Path param: + # + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # - # @param individual_ids [Array] Array of individual_ids to unenroll. + # @param individual_ids [Array] Body param: Array of individual_ids to unenroll. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -95,10 +107,12 @@ def retrieve_many_benefits(benefit_id, params = {}) # @see FinchAPI::Models::HRIS::Benefits::IndividualUnenrollManyParams def unenroll_many(benefit_id, params = {}) parsed, options = FinchAPI::HRIS::Benefits::IndividualUnenrollManyParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :delete, path: ["employer/benefits/%1$s/individuals", benefit_id], - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), model: FinchAPI::HRIS::Benefits::UnenrolledIndividualBenefitResponse, options: options ) diff --git a/lib/finch_api/resources/hris/company.rb b/lib/finch_api/resources/hris/company.rb index 86087a9e..6a93f9fb 100644 --- a/lib/finch_api/resources/hris/company.rb +++ b/lib/finch_api/resources/hris/company.rb @@ -9,7 +9,9 @@ class Company # Read basic company data # - # @overload retrieve(request_options: {}) + # @overload retrieve(entity_ids: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -17,11 +19,13 @@ class Company # # @see FinchAPI::Models::HRIS::CompanyRetrieveParams def retrieve(params = {}) + parsed, options = FinchAPI::HRIS::CompanyRetrieveParams.dump_request(params) @client.request( method: :get, path: "employer/company", + query: parsed, model: FinchAPI::HRIS::HRISCompany, - options: params[:request_options] + options: options ) end 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 9738b4bf..c9f31e61 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item.rb @@ -15,12 +15,14 @@ class PayStatementItem # historical support will be added soon Retrieve a list of detailed pay statement # items for the access token's connection account. # - # @overload list(categories: nil, end_date: nil, name: nil, start_date: nil, type: nil, request_options: {}) + # @overload list(categories: nil, end_date: nil, entity_ids: 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 end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param name [String] Case-insensitive partial match search by pay statement item name. # # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date ( 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 2c5c3bd3..e6345cad 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 @@ -6,6 +6,10 @@ class HRIS class Company class PayStatementItem class Rules + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams} for more + # details. + # # **Beta:** this endpoint currently serves employers onboarded after March 4th and # historical support will be added soon Custom rules can be created to associate # specific attributes to pay statement items depending on the use case. For @@ -13,17 +17,19 @@ class Rules # pre-tax 401k. This metadata can be retrieved where pay statement item # information is available. # - # @overload create(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) + # @overload create(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) + # + # @param entity_ids [Array] Query param: The entity IDs to create the rule for. # - # @param attributes [FinchAPI::Models::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] Body param: Specifies the fields to be applied when the condition is met. # - # @param conditions [Array] + # @param conditions [Array] Body param: # - # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # @param effective_end_date [String, nil] Body param: Specifies when the rules should stop applying rules based on the dat # - # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # @param effective_start_date [String, nil] Body param: Specifies when the rule should begin applying based on the date. # - # @param entity_type [Symbol, FinchAPI::Models::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] Body param: The entity type to which the rule is applied. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -32,10 +38,12 @@ class Rules # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams def create(params = {}) parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :post, path: "employer/pay-statement-item/rule", - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse, options: options ) @@ -44,10 +52,14 @@ def create(params = {}) # **Beta:** this endpoint currently serves employers onboarded after March 4th and # historical support will be added soon Update a rule for a pay statement item. # - # @overload update(rule_id, optional_property: nil, request_options: {}) + # @overload update(rule_id, entity_ids: nil, optional_property: nil, request_options: {}) + # + # @param rule_id [String] Path param: + # + # @param entity_ids [Array] Query param: The entity IDs to update the rule for. + # + # @param optional_property [Object] Body param: # - # @param rule_id [String] - # @param optional_property [Object] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse] @@ -55,10 +67,12 @@ def create(params = {}) # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateParams def update(rule_id, params = {}) parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :put, path: ["employer/pay-statement-item/rule/%1$s", rule_id], - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse, options: options ) @@ -67,7 +81,9 @@ def update(rule_id, params = {}) # **Beta:** this endpoint currently serves employers onboarded after March 4th and # historical support will be added soon List all rules of a connection account. # - # @overload list(request_options: {}) + # @overload list(entity_ids: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to retrieve rules for. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -75,32 +91,39 @@ def update(rule_id, params = {}) # # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListParams def list(params = {}) + parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleListParams.dump_request(params) @client.request( method: :get, path: "employer/pay-statement-item/rule", + query: parsed, page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse, - options: params[:request_options] + options: options ) end # **Beta:** this endpoint currently serves employers onboarded after March 4th and # historical support will be added soon Delete a rule for a pay statement item. # - # @overload delete(rule_id, request_options: {}) + # @overload delete(rule_id, entity_ids: nil, request_options: {}) # # @param rule_id [String] + # + # @param entity_ids [Array] The entity IDs to delete the rule for. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse] # # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteParams def delete(rule_id, params = {}) + parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleDeleteParams.dump_request(params) @client.request( method: :delete, path: ["employer/pay-statement-item/rule/%1$s", rule_id], + query: parsed, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse, - options: params[:request_options] + options: options ) end diff --git a/lib/finch_api/resources/hris/directory.rb b/lib/finch_api/resources/hris/directory.rb index ccc5d9db..d04b348e 100644 --- a/lib/finch_api/resources/hris/directory.rb +++ b/lib/finch_api/resources/hris/directory.rb @@ -6,7 +6,9 @@ class HRIS class Directory # Read company directory and organization structure # - # @overload list(limit: nil, offset: nil, request_options: {}) + # @overload list(entity_ids: nil, limit: nil, offset: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param limit [Integer] Number of employees to return (defaults to all) # diff --git a/lib/finch_api/resources/hris/documents.rb b/lib/finch_api/resources/hris/documents.rb index a389eac9..02ac3131 100644 --- a/lib/finch_api/resources/hris/documents.rb +++ b/lib/finch_api/resources/hris/documents.rb @@ -10,7 +10,9 @@ class Documents # **Beta:** This endpoint is in beta and may change. Retrieve a list of # company-wide documents. # - # @overload list(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) + # @overload list(entity_ids: nil, individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param individual_ids [Array] Comma-delimited list of stable Finch uuids for each individual. If empty, defaul # @@ -39,21 +41,25 @@ def list(params = {}) # **Beta:** This endpoint is in beta and may change. Retrieve details of a # specific document by its ID. # - # @overload retreive(document_id, request_options: {}) + # @overload retreive(document_id, entity_ids: nil, request_options: {}) # # @param document_id [String] The unique identifier of the document. # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005] # # @see FinchAPI::Models::HRIS::DocumentRetreiveParams def retreive(document_id, params = {}) + parsed, options = FinchAPI::HRIS::DocumentRetreiveParams.dump_request(params) @client.request( method: :get, path: ["employer/documents/%1$s", document_id], + query: parsed, model: FinchAPI::Models::HRIS::DocumentRetreiveResponse, - options: params[:request_options] + options: options ) end diff --git a/lib/finch_api/resources/hris/employments.rb b/lib/finch_api/resources/hris/employments.rb index d2e44917..6609de72 100644 --- a/lib/finch_api/resources/hris/employments.rb +++ b/lib/finch_api/resources/hris/employments.rb @@ -6,9 +6,11 @@ class HRIS class Employments # Read individual employment and income data # - # @overload retrieve_many(requests:, request_options: {}) + # @overload retrieve_many(requests:, entity_ids: nil, request_options: {}) # - # @param requests [Array] The array of batch requests. + # @param requests [Array] Body param: The array of batch requests. + # + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -17,10 +19,12 @@ class Employments # @see FinchAPI::Models::HRIS::EmploymentRetrieveManyParams def retrieve_many(params) parsed, options = FinchAPI::HRIS::EmploymentRetrieveManyParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :post, path: "employer/employment", - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::EmploymentDataResponse, options: options diff --git a/lib/finch_api/resources/hris/individuals.rb b/lib/finch_api/resources/hris/individuals.rb index e03fbe23..13de1bfb 100644 --- a/lib/finch_api/resources/hris/individuals.rb +++ b/lib/finch_api/resources/hris/individuals.rb @@ -6,10 +6,14 @@ class HRIS class Individuals # Read individual data, excluding income and employment data # - # @overload retrieve_many(options: nil, requests: nil, request_options: {}) + # @overload retrieve_many(entity_ids: nil, options: nil, requests: nil, request_options: {}) + # + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. + # + # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] Body param: + # + # @param requests [Array] Body param: # - # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] - # @param requests [Array] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::ResponsesPage] @@ -17,10 +21,12 @@ class Individuals # @see FinchAPI::Models::HRIS::IndividualRetrieveManyParams def retrieve_many(params = {}) parsed, options = FinchAPI::HRIS::IndividualRetrieveManyParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :post, path: "employer/individual", - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::IndividualResponse, options: options diff --git a/lib/finch_api/resources/hris/pay_statements.rb b/lib/finch_api/resources/hris/pay_statements.rb index f32ae7ee..40b48832 100644 --- a/lib/finch_api/resources/hris/pay_statements.rb +++ b/lib/finch_api/resources/hris/pay_statements.rb @@ -9,9 +9,11 @@ class PayStatements # Deduction and contribution types are supported by the payroll systems that # supports Benefits. # - # @overload retrieve_many(requests:, request_options: {}) + # @overload retrieve_many(requests:, entity_ids: nil, request_options: {}) # - # @param requests [Array] The array of batch requests. + # @param requests [Array] Body param: The array of batch requests. + # + # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -20,10 +22,12 @@ class PayStatements # @see FinchAPI::Models::HRIS::PayStatementRetrieveManyParams def retrieve_many(params) parsed, options = FinchAPI::HRIS::PayStatementRetrieveManyParams.dump_request(params) + query_params = [:entity_ids] @client.request( method: :post, path: "employer/pay-statement", - body: parsed, + query: parsed.slice(*query_params), + body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::PayStatementResponse, options: options diff --git a/lib/finch_api/resources/hris/payments.rb b/lib/finch_api/resources/hris/payments.rb index 2a92efd2..1079291c 100644 --- a/lib/finch_api/resources/hris/payments.rb +++ b/lib/finch_api/resources/hris/payments.rb @@ -9,12 +9,14 @@ class Payments # # Read payroll and contractor related payments by the company. # - # @overload list(end_date:, start_date:, request_options: {}) + # @overload list(end_date:, start_date:, entity_ids: nil, request_options: {}) # # @param end_date [Date] The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` forma # # @param start_date [Date] The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` for # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::SinglePage] diff --git a/lib/finch_api/resources/jobs/automated.rb b/lib/finch_api/resources/jobs/automated.rb index 095ac9de..08853dd8 100644 --- a/lib/finch_api/resources/jobs/automated.rb +++ b/lib/finch_api/resources/jobs/automated.rb @@ -41,43 +41,30 @@ def create(params) ) end - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details. - # # Get an automated job by `job_id`. # - # @overload retrieve(job_id, entity_id: nil, request_options: {}) + # @overload retrieve(job_id, request_options: {}) # # @param job_id [String] - # - # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::AutomatedAsyncJob] # # @see FinchAPI::Models::Jobs::AutomatedRetrieveParams def retrieve(job_id, params = {}) - parsed, options = FinchAPI::Jobs::AutomatedRetrieveParams.dump_request(params) @client.request( method: :get, path: ["jobs/automated/%1$s", job_id], - query: parsed, model: FinchAPI::Jobs::AutomatedAsyncJob, - options: options + options: params[:request_options] ) end - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Jobs::AutomatedListParams} for more details. - # # Get all automated jobs. Automated jobs are completed by a machine. By default, # jobs are sorted in descending order by submission time. For scheduled jobs such # as data syncs, only the next scheduled job is shown. # - # @overload list(entity_id: nil, limit: nil, offset: nil, request_options: {}) - # - # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh + # @overload list(limit: nil, offset: nil, request_options: {}) # # @param limit [Integer] Number of items to return # diff --git a/lib/finch_api/resources/jobs/manual.rb b/lib/finch_api/resources/jobs/manual.rb index f67f67e9..0e04509a 100644 --- a/lib/finch_api/resources/jobs/manual.rb +++ b/lib/finch_api/resources/jobs/manual.rb @@ -4,31 +4,23 @@ module FinchAPI module Resources class Jobs class Manual - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details. - # # Get a manual job by `job_id`. Manual jobs are completed by a human and include # Assisted Benefits jobs. # - # @overload retrieve(job_id, entity_id: nil, request_options: {}) + # @overload retrieve(job_id, request_options: {}) # # @param job_id [String] - # - # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::ManualAsyncJob] # # @see FinchAPI::Models::Jobs::ManualRetrieveParams def retrieve(job_id, params = {}) - parsed, options = FinchAPI::Jobs::ManualRetrieveParams.dump_request(params) @client.request( method: :get, path: ["jobs/manual/%1$s", job_id], - query: parsed, model: FinchAPI::Jobs::ManualAsyncJob, - options: options + options: params[:request_options] ) end diff --git a/lib/finch_api/resources/payroll/pay_groups.rb b/lib/finch_api/resources/payroll/pay_groups.rb index dca6e3cb..da14ff13 100644 --- a/lib/finch_api/resources/payroll/pay_groups.rb +++ b/lib/finch_api/resources/payroll/pay_groups.rb @@ -6,29 +6,38 @@ class Payroll class PayGroups # Read information from a single pay group # - # @overload retrieve(pay_group_id, request_options: {}) + # @overload retrieve(pay_group_id, entity_ids: nil, request_options: {}) # # @param pay_group_id [String] + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Payroll::PayGroupRetrieveResponse] # # @see FinchAPI::Models::Payroll::PayGroupRetrieveParams def retrieve(pay_group_id, params = {}) + parsed, options = FinchAPI::Payroll::PayGroupRetrieveParams.dump_request(params) @client.request( method: :get, path: ["employer/pay-groups/%1$s", pay_group_id], + query: parsed, model: FinchAPI::Models::Payroll::PayGroupRetrieveResponse, - options: params[:request_options] + options: options ) end # Read company pay groups and frequencies # - # @overload list(individual_id: nil, pay_frequencies: nil, request_options: {}) + # @overload list(entity_ids: nil, individual_id: nil, pay_frequencies: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param individual_id [String] + # # @param pay_frequencies [Array] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::SinglePage] diff --git a/lib/finch_api/resources/providers.rb b/lib/finch_api/resources/providers.rb index 512532bf..7c278011 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 = {}) @@ -17,7 +17,7 @@ def list(params = {}) method: :get, path: "providers", page: FinchAPI::Internal::SinglePage, - model: FinchAPI::Provider, + model: FinchAPI::Models::ProviderListResponse, options: params[:request_options] ) end diff --git a/lib/finch_api/resources/request_forwarding.rb b/lib/finch_api/resources/request_forwarding.rb index dec63bac..d2ec40b6 100644 --- a/lib/finch_api/resources/request_forwarding.rb +++ b/lib/finch_api/resources/request_forwarding.rb @@ -19,9 +19,9 @@ class RequestForwarding # # @param data [String, nil] The body for the forwarded request. This value must be specified as either a str # - # @param headers [Object, nil] The HTTP headers to include on the forwarded request. This value must be specifi + # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers to include on the forwarded request. This value must be specifi # - # @param params [Object, nil] The query parameters for the forwarded request. This value must be specified as + # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters for the forwarded request. This value must be specified as # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 43c4172f..dbf4f8cf 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.30" + VERSION = "0.1.0.pre.alpha.31" end diff --git a/rbi/finch_api/errors.rbi b/rbi/finch_api/errors.rbi index 901283ea..600a158d 100644 --- a/rbi/finch_api/errors.rbi +++ b/rbi/finch_api/errors.rbi @@ -33,6 +33,9 @@ module FinchAPI sig { returns(T.nilable(Integer)) } attr_accessor :status + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :headers + sig { returns(T.nilable(T.anything)) } attr_accessor :body @@ -41,6 +44,7 @@ module FinchAPI params( url: URI::Generic, status: T.nilable(Integer), + headers: T.nilable(T::Hash[String, String]), body: T.nilable(Object), request: NilClass, response: NilClass, @@ -50,6 +54,7 @@ module FinchAPI def self.new( url:, status: nil, + headers: nil, body: nil, request: nil, response: nil, @@ -70,6 +75,7 @@ module FinchAPI params( url: URI::Generic, status: NilClass, + headers: T.nilable(T::Hash[String, String]), body: NilClass, request: NilClass, response: NilClass, @@ -79,6 +85,7 @@ module FinchAPI def self.new( url:, status: nil, + headers: nil, body: nil, request: nil, response: nil, @@ -93,6 +100,7 @@ module FinchAPI params( url: URI::Generic, status: NilClass, + headers: T.nilable(T::Hash[String, String]), body: NilClass, request: NilClass, response: NilClass, @@ -102,6 +110,7 @@ module FinchAPI def self.new( url:, status: nil, + headers: nil, body: nil, request: nil, response: nil, @@ -116,13 +125,22 @@ module FinchAPI params( url: URI::Generic, status: Integer, + headers: T.nilable(T::Hash[String, String]), body: T.nilable(Object), request: NilClass, response: NilClass, message: T.nilable(String) ).returns(T.attached_class) end - def self.for(url:, status:, body:, request:, response:, message: nil) + def self.for( + url:, + status:, + headers:, + body:, + request:, + response:, + message: nil + ) end sig { returns(Integer) } @@ -133,13 +151,22 @@ module FinchAPI params( url: URI::Generic, status: Integer, + headers: T.nilable(T::Hash[String, String]), body: T.nilable(Object), request: NilClass, response: NilClass, message: T.nilable(String) ).returns(T.attached_class) end - def self.new(url:, status:, body:, request:, response:, message: nil) + def self.new( + url:, + status:, + headers:, + body:, + request:, + response:, + message: nil + ) end end diff --git a/rbi/finch_api/file_part.rbi b/rbi/finch_api/file_part.rbi index 93b8cfd5..38aec928 100644 --- a/rbi/finch_api/file_part.rbi +++ b/rbi/finch_api/file_part.rbi @@ -27,7 +27,7 @@ module FinchAPI sig do params( content: T.any(Pathname, StringIO, IO, String), - filename: T.nilable(String), + filename: T.nilable(T.any(Pathname, String)), content_type: T.nilable(String) ).returns(T.attached_class) end diff --git a/rbi/finch_api/internal/transport/base_client.rbi b/rbi/finch_api/internal/transport/base_client.rbi index 12c2d6cc..061306c6 100644 --- a/rbi/finch_api/internal/transport/base_client.rbi +++ b/rbi/finch_api/internal/transport/base_client.rbi @@ -84,10 +84,9 @@ module FinchAPI # @api private sig do - params( - status: Integer, - headers: T.any(T::Hash[String, String], Net::HTTPHeader) - ).returns(T::Boolean) + params(status: Integer, headers: T::Hash[String, String]).returns( + T::Boolean + ) end def should_retry?(status, headers:) end @@ -97,7 +96,7 @@ module FinchAPI params( request: FinchAPI::Internal::Transport::BaseClient::RequestInput, status: Integer, - response_headers: T.any(T::Hash[String, String], Net::HTTPHeader) + response_headers: T::Hash[String, String] ).returns(FinchAPI::Internal::Transport::BaseClient::RequestInput) end def follow_redirect(request, status:, response_headers:) diff --git a/rbi/finch_api/internal/type/base_page.rbi b/rbi/finch_api/internal/type/base_page.rbi index 0eb28ffb..c6912bf6 100644 --- a/rbi/finch_api/internal/type/base_page.rbi +++ b/rbi/finch_api/internal/type/base_page.rbi @@ -30,7 +30,7 @@ module FinchAPI params( client: FinchAPI::Internal::Transport::BaseClient, req: FinchAPI::Internal::Transport::BaseClient::RequestComponents, - headers: T.any(T::Hash[String, String], Net::HTTPHeader), + headers: T::Hash[String, String], page_data: T.anything ).void end diff --git a/rbi/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi index 72ecd9e1..0bccd650 100644 --- a/rbi/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -361,7 +361,7 @@ module FinchAPI # Assumes each chunk in stream has `Encoding::BINARY`. sig do params( - headers: T.any(T::Hash[String, String], Net::HTTPHeader), + headers: T::Hash[String, String], stream: T::Enumerable[String], suppress_error: T::Boolean ).returns(T.anything) diff --git a/rbi/finch_api/models/connect/session_new_params.rbi b/rbi/finch_api/models/connect/session_new_params.rbi index 0be8adae..e209450d 100644 --- a/rbi/finch_api/models/connect/session_new_params.rbi +++ b/rbi/finch_api/models/connect/session_new_params.rbi @@ -15,22 +15,19 @@ module FinchAPI ) end + # Email address of the customer + sig { returns(T.nilable(String)) } + attr_accessor :customer_email + + # Unique identifier for the customer sig { returns(String) } attr_accessor :customer_id + # Name of the customer sig { returns(String) } attr_accessor :customer_name - sig do - returns( - T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol] - ) - end - attr_accessor :products - - sig { returns(T.nilable(String)) } - attr_accessor :customer_email - + # Integration configuration for the connect session sig do returns(T.nilable(FinchAPI::Connect::SessionNewParams::Integration)) end @@ -46,6 +43,7 @@ module FinchAPI end attr_writer :integration + # Enable manual authentication mode sig { returns(T.nilable(T::Boolean)) } attr_accessor :manual @@ -54,9 +52,19 @@ module FinchAPI sig { returns(T.nilable(Float)) } attr_accessor :minutes_to_expire + # The Finch products to request access to + sig do + returns( + T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol] + ) + end + attr_accessor :products + + # The URI to redirect to after the Connect flow is completed sig { returns(T.nilable(String)) } attr_accessor :redirect_uri + # Sandbox mode for testing sig do returns( T.nilable(FinchAPI::Connect::SessionNewParams::Sandbox::OrSymbol) @@ -66,17 +74,17 @@ module FinchAPI sig do params( + customer_email: T.nilable(String), customer_id: String, customer_name: String, - products: - T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol], - customer_email: T.nilable(String), integration: T.nilable( FinchAPI::Connect::SessionNewParams::Integration::OrHash ), manual: T.nilable(T::Boolean), minutes_to_expire: T.nilable(Float), + products: + T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol], redirect_uri: T.nilable(String), sandbox: T.nilable(FinchAPI::Connect::SessionNewParams::Sandbox::OrSymbol), @@ -84,17 +92,25 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + # Email address of the customer + customer_email:, + # Unique identifier for the customer customer_id:, + # Name of the customer customer_name:, - products:, - customer_email: nil, - integration: nil, - manual: nil, + # Integration configuration for the connect session + integration:, + # Enable manual authentication mode + manual:, # 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, + minutes_to_expire:, + # The Finch products to request access to + products:, + # The URI to redirect to after the Connect flow is completed + redirect_uri:, + # Sandbox mode for testing + sandbox:, request_options: {} ) end @@ -102,17 +118,17 @@ module FinchAPI sig do override.returns( { + customer_email: T.nilable(String), customer_id: String, customer_name: String, - products: - T::Array[ - FinchAPI::Connect::SessionNewParams::Product::OrSymbol - ], - customer_email: T.nilable(String), integration: T.nilable(FinchAPI::Connect::SessionNewParams::Integration), manual: T.nilable(T::Boolean), minutes_to_expire: T.nilable(Float), + products: + T::Array[ + FinchAPI::Connect::SessionNewParams::Product::OrSymbol + ], redirect_uri: T.nilable(String), sandbox: T.nilable( @@ -125,78 +141,6 @@ module FinchAPI def to_hash end - # The Finch products that can be requested during the Connect flow. - module Product - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, FinchAPI::Connect::SessionNewParams::Product) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - COMPANY = - T.let( - :company, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - DIRECTORY = - T.let( - :directory, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - INDIVIDUAL = - T.let( - :individual, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - EMPLOYMENT = - T.let( - :employment, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - PAYMENT = - T.let( - :payment, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - PAY_STATEMENT = - T.let( - :pay_statement, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - BENEFITS = - T.let( - :benefits, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - SSN = - T.let( - :ssn, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - DEDUCTION = - T.let( - :deduction, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - DOCUMENTS = - T.let( - :documents, - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol - ] - ) - end - def self.values - end - end - class Integration < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do @@ -206,6 +150,7 @@ module FinchAPI ) end + # The authentication method to use sig do returns( T.nilable( @@ -215,9 +160,11 @@ module FinchAPI end attr_accessor :auth_method + # The provider to integrate with sig { returns(T.nilable(String)) } attr_accessor :provider + # Integration configuration for the connect session sig do params( auth_method: @@ -227,7 +174,12 @@ module FinchAPI provider: T.nilable(String) ).returns(T.attached_class) end - def self.new(auth_method: nil, provider: nil) + def self.new( + # The authentication method to use + auth_method:, + # The provider to integrate with + provider: + ) end sig do @@ -244,6 +196,7 @@ module FinchAPI def to_hash end + # The authentication method to use module AuthMethod extend FinchAPI::Internal::Type::Enum @@ -289,6 +242,79 @@ module FinchAPI end end + # The Finch products that can be requested during the Connect flow. + module Product + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, FinchAPI::Connect::SessionNewParams::Product) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BENEFITS = + T.let( + :benefits, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + COMPANY = + T.let( + :company, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + DEDUCTION = + T.let( + :deduction, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + DIRECTORY = + T.let( + :directory, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + DOCUMENTS = + T.let( + :documents, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + EMPLOYMENT = + T.let( + :employment, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + INDIVIDUAL = + T.let( + :individual, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + PAYMENT = + T.let( + :payment, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + PAY_STATEMENT = + T.let( + :pay_statement, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + SSN = + T.let( + :ssn, + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Sandbox mode for testing module Sandbox extend FinchAPI::Internal::Type::Enum diff --git a/rbi/finch_api/models/connect/session_reauthenticate_params.rbi b/rbi/finch_api/models/connect/session_reauthenticate_params.rbi index 6994e85e..6facaac7 100644 --- a/rbi/finch_api/models/connect/session_reauthenticate_params.rbi +++ b/rbi/finch_api/models/connect/session_reauthenticate_params.rbi @@ -21,7 +21,7 @@ module FinchAPI # The number of minutes until the session expires (defaults to 43,200, which is 30 # days) - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :minutes_to_expire # The products to request access to (optional for reauthentication) @@ -43,7 +43,7 @@ module FinchAPI sig do params( connection_id: String, - minutes_to_expire: T.nilable(Integer), + minutes_to_expire: Integer, products: T.nilable( T::Array[ @@ -59,11 +59,11 @@ module FinchAPI connection_id:, # The number of minutes until the session expires (defaults to 43,200, which is 30 # days) - minutes_to_expire: nil, + minutes_to_expire:, # The products to request access to (optional for reauthentication) - products: nil, + products:, # The URI to redirect to after the Connect flow is completed - redirect_uri: nil, + redirect_uri:, request_options: {} ) end @@ -72,7 +72,7 @@ module FinchAPI override.returns( { connection_id: String, - minutes_to_expire: T.nilable(Integer), + minutes_to_expire: Integer, products: T.nilable( T::Array[ @@ -100,19 +100,29 @@ module FinchAPI end OrSymbol = T.type_alias { T.any(Symbol, String) } + BENEFITS = + T.let( + :benefits, + FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol + ) COMPANY = T.let( :company, FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol ) + DEDUCTION = + T.let( + :deduction, + FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol + ) DIRECTORY = T.let( :directory, FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol ) - INDIVIDUAL = + DOCUMENTS = T.let( - :individual, + :documents, FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol ) EMPLOYMENT = @@ -120,6 +130,11 @@ module FinchAPI :employment, FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol ) + INDIVIDUAL = + T.let( + :individual, + FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol + ) PAYMENT = T.let( :payment, @@ -130,26 +145,11 @@ module FinchAPI :pay_statement, FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol ) - BENEFITS = - T.let( - :benefits, - FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol - ) SSN = T.let( :ssn, FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol ) - DEDUCTION = - T.let( - :deduction, - FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol - ) - DOCUMENTS = - T.let( - :documents, - FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol - ) sig do override.returns( diff --git a/rbi/finch_api/models/create_access_token_response.rbi b/rbi/finch_api/models/create_access_token_response.rbi index 2d124a0a..c2e95d72 100644 --- a/rbi/finch_api/models/create_access_token_response.rbi +++ b/rbi/finch_api/models/create_access_token_response.rbi @@ -36,6 +36,10 @@ module FinchAPI end attr_accessor :connection_type + # An array of entity IDs that can be accessed with this access token + sig { returns(T::Array[String]) } + attr_accessor :entity_ids + # An array of the authorized products associated with the `access_token` sig { returns(T::Array[String]) } attr_accessor :products @@ -77,6 +81,7 @@ module FinchAPI connection_id: String, connection_type: FinchAPI::CreateAccessTokenResponse::ConnectionType::OrSymbol, + entity_ids: T::Array[String], products: T::Array[String], provider_id: String, token_type: String, @@ -97,6 +102,8 @@ module FinchAPI # - `provider` - connection to an external provider # - `finch` - finch-generated data. connection_type:, + # An array of entity IDs that can be accessed with this access token + entity_ids:, # An array of the authorized products associated with the `access_token` products:, # The ID of the provider associated with the `access_token` @@ -124,6 +131,7 @@ module FinchAPI connection_id: String, connection_type: FinchAPI::CreateAccessTokenResponse::ConnectionType::TaggedSymbol, + entity_ids: T::Array[String], products: T::Array[String], provider_id: String, token_type: String, diff --git a/rbi/finch_api/models/hris/benefit_contribution.rbi b/rbi/finch_api/models/hris/benefit_contribution.rbi index 84568b65..a03fbeb5 100644 --- a/rbi/finch_api/models/hris/benefit_contribution.rbi +++ b/rbi/finch_api/models/hris/benefit_contribution.rbi @@ -3,83 +3,301 @@ module FinchAPI module Models module HRIS - class BenefitContribution < FinchAPI::Internal::Type::BaseModel - OrHash = + module BenefitContribution + extend FinchAPI::Internal::Type::Union + + Variants = T.type_alias do T.any( - FinchAPI::HRIS::BenefitContribution, - FinchAPI::Internal::AnyHash + FinchAPI::HRIS::BenefitContribution::UnionMember0, + FinchAPI::HRIS::BenefitContribution::UnionMember1, + FinchAPI::HRIS::BenefitContribution::UnionMember2 ) end - # Contribution amount in cents (if `fixed`) or basis points (if `percent`). - sig { returns(T.nilable(Integer)) } - attr_accessor :amount + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::BenefitContribution::UnionMember0, + FinchAPI::Internal::AnyHash + ) + end + + # Contribution amount in cents. + sig { returns(Integer) } + attr_accessor :amount - # Contribution type. - sig do - returns( - T.nilable(FinchAPI::HRIS::BenefitContribution::Type::TaggedSymbol) + # Fixed contribution type. + sig do + returns( + FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::OrSymbol + ) + end + attr_accessor :type + + sig do + params( + amount: Integer, + type: + FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Contribution amount in cents. + amount:, + # Fixed contribution type. + type: ) - end - attr_accessor :type + end - sig do - params( - amount: T.nilable(Integer), - type: T.nilable(FinchAPI::HRIS::BenefitContribution::Type::OrSymbol) - ).returns(T.attached_class) - end - def self.new( - # Contribution amount in cents (if `fixed`) or basis points (if `percent`). - amount:, - # Contribution type. - type: - ) + sig do + override.returns( + { + amount: Integer, + type: + FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::OrSymbol + } + ) + end + def to_hash + end + + # Fixed contribution type. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::BenefitContribution::UnionMember0::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FIXED = + T.let( + :fixed, + FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end - sig do - override.returns( - { - amount: T.nilable(Integer), + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::BenefitContribution::UnionMember1, + FinchAPI::Internal::AnyHash + ) + end + + # Contribution amount in basis points (1/100th of a percent). + sig { returns(Integer) } + attr_accessor :amount + + # Percentage contribution type. + sig do + returns( + FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::OrSymbol + ) + end + attr_accessor :type + + sig do + params( + amount: Integer, type: - T.nilable( - FinchAPI::HRIS::BenefitContribution::Type::TaggedSymbol - ) - } + FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Contribution amount in basis points (1/100th of a percent). + amount:, + # Percentage contribution type. + type: ) - end - def to_hash - end + end + + sig do + override.returns( + { + amount: Integer, + type: + FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::OrSymbol + } + ) + end + def to_hash + end + + # Percentage contribution type. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::BenefitContribution::UnionMember1::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PERCENT = + T.let( + :percent, + FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::TaggedSymbol + ) - # Contribution type. - module Type - extend FinchAPI::Internal::Type::Enum + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end - TaggedSymbol = + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all(Symbol, FinchAPI::HRIS::BenefitContribution::Type) + T.any( + FinchAPI::HRIS::BenefitContribution::UnionMember2, + FinchAPI::Internal::AnyHash + ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - FIXED = - T.let( - :fixed, - FinchAPI::HRIS::BenefitContribution::Type::TaggedSymbol + # Array of tier objects defining employer match tiers based on employee + # contribution thresholds. + sig do + returns( + T::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] ) - PERCENT = - T.let( - :percent, - FinchAPI::HRIS::BenefitContribution::Type::TaggedSymbol + end + attr_accessor :tiers + + # Tiered contribution type (only valid for company_contribution). + sig do + returns( + FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::OrSymbol ) + end + attr_accessor :type + + sig do + params( + tiers: + T::Array[ + FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier::OrHash + ], + type: + FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Array of tier objects defining employer match tiers based on employee + # contribution thresholds. + tiers:, + # Tiered contribution type (only valid for company_contribution). + type: + ) + end sig do override.returns( - T::Array[FinchAPI::HRIS::BenefitContribution::Type::TaggedSymbol] + { + tiers: + T::Array[ + FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier + ], + type: + FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::OrSymbol + } ) end - def self.values + def to_hash end + + class Tier < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(Integer) } + attr_accessor :match + + sig { returns(Integer) } + attr_accessor :threshold + + sig do + params(match: Integer, threshold: Integer).returns( + T.attached_class + ) + end + def self.new(match:, threshold:) + end + + sig { override.returns({ match: Integer, threshold: Integer }) } + def to_hash + end + end + + # Tiered contribution type (only valid for company_contribution). + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::BenefitContribution::UnionMember2::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TIERED = + T.let( + :tiered, + FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[FinchAPI::HRIS::BenefitContribution::Variants] + ) + end + def self.variants end end end diff --git a/rbi/finch_api/models/hris/benefit_create_params.rbi b/rbi/finch_api/models/hris/benefit_create_params.rbi index b4efa3bc..9c783a5c 100644 --- a/rbi/finch_api/models/hris/benefit_create_params.rbi +++ b/rbi/finch_api/models/hris/benefit_create_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # The company match for this benefit. sig do returns( @@ -52,6 +59,7 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], company_contribution: T.nilable( FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::OrHash @@ -63,6 +71,8 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # The company match for this benefit. company_contribution: nil, # Name of the benefit as it appears in the provider and pay statements. Recommend @@ -80,6 +90,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], company_contribution: T.nilable( FinchAPI::HRIS::BenefitCreateParams::CompanyContribution diff --git a/rbi/finch_api/models/hris/benefit_list_params.rbi b/rbi/finch_api/models/hris/benefit_list_params.rbi index a055d3ef..973457c0 100644 --- a/rbi/finch_api/models/hris/benefit_list_params.rbi +++ b/rbi/finch_api/models/hris/benefit_list_params.rbi @@ -15,15 +15,34 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi b/rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi index b7d0a7da..740a87ac 100644 --- a/rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi +++ b/rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi @@ -15,15 +15,34 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/hris/benefit_retrieve_params.rbi b/rbi/finch_api/models/hris/benefit_retrieve_params.rbi index 810a2385..4d603cc8 100644 --- a/rbi/finch_api/models/hris/benefit_retrieve_params.rbi +++ b/rbi/finch_api/models/hris/benefit_retrieve_params.rbi @@ -15,15 +15,34 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/hris/benefit_update_params.rbi b/rbi/finch_api/models/hris/benefit_update_params.rbi index 28fcc65e..abd51115 100644 --- a/rbi/finch_api/models/hris/benefit_update_params.rbi +++ b/rbi/finch_api/models/hris/benefit_update_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Updated name or description. sig { returns(T.nilable(String)) } attr_reader :description @@ -24,11 +31,14 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], description: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Updated name or description. description: nil, request_options: {} @@ -37,7 +47,11 @@ module FinchAPI sig do override.returns( - { description: String, request_options: FinchAPI::RequestOptions } + { + entity_ids: T::Array[String], + description: String, + request_options: FinchAPI::RequestOptions + } ) end def to_hash diff --git a/rbi/finch_api/models/hris/benefits/individual_benefit.rbi b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi index 952acd1d..7a35fec2 100644 --- a/rbi/finch_api/models/hris/benefits/individual_benefit.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi @@ -82,27 +82,23 @@ module FinchAPI sig { returns(T.nilable(T::Boolean)) } attr_accessor :catch_up - sig { returns(T.nilable(FinchAPI::HRIS::BenefitContribution)) } - attr_reader :company_contribution - sig do - params( - company_contribution: - T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash) - ).void + returns( + T.nilable( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::Variants + ) + ) end - attr_writer :company_contribution - - sig { returns(T.nilable(FinchAPI::HRIS::BenefitContribution)) } - attr_reader :employee_deduction + attr_accessor :company_contribution sig do - params( - employee_deduction: - T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash) - ).void + returns( + T.nilable( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::Variants + ) + ) end - attr_writer :employee_deduction + attr_accessor :employee_deduction # Type for HSA contribution limit if the benefit is a HSA. sig do @@ -119,9 +115,20 @@ module FinchAPI annual_maximum: T.nilable(Integer), catch_up: T.nilable(T::Boolean), company_contribution: - T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash), + T.nilable( + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::OrHash + ) + ), employee_deduction: - T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash), + T.nilable( + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::OrHash + ) + ), hsa_contribution_limit: T.nilable( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::OrSymbol @@ -147,9 +154,13 @@ module FinchAPI annual_maximum: T.nilable(Integer), catch_up: T.nilable(T::Boolean), company_contribution: - T.nilable(FinchAPI::HRIS::BenefitContribution), + T.nilable( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::Variants + ), employee_deduction: - T.nilable(FinchAPI::HRIS::BenefitContribution), + T.nilable( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::Variants + ), hsa_contribution_limit: T.nilable( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol @@ -160,6 +171,490 @@ module FinchAPI def to_hash end + module CompanyContribution + extend FinchAPI::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2 + ) + end + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, + FinchAPI::Internal::AnyHash + ) + end + + # Contribution amount in cents. + sig { returns(Integer) } + attr_accessor :amount + + # Fixed contribution type. + sig do + returns( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Contribution amount in cents. + amount:, + # Fixed contribution type. + type: + ) + end + + sig do + override.returns( + { + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # Fixed contribution type. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FIXED = + T.let( + :fixed, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, + FinchAPI::Internal::AnyHash + ) + end + + # Contribution amount in basis points (1/100th of a percent). + sig { returns(Integer) } + attr_accessor :amount + + # Percentage contribution type. + sig do + returns( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Contribution amount in basis points (1/100th of a percent). + amount:, + # Percentage contribution type. + type: + ) + end + + sig do + override.returns( + { + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # Percentage contribution type. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PERCENT = + T.let( + :percent, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, + FinchAPI::Internal::AnyHash + ) + end + + # Array of tier objects defining employer match tiers based on employee + # contribution thresholds. + sig do + returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier + ] + ) + end + attr_accessor :tiers + + # Tiered contribution type (only valid for company_contribution). + sig do + returns( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + tiers: + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier::OrHash + ], + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Array of tier objects defining employer match tiers based on employee + # contribution thresholds. + tiers:, + # Tiered contribution type (only valid for company_contribution). + type: + ) + end + + sig do + override.returns( + { + tiers: + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier + ], + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + } + ) + end + def to_hash + end + + class Tier < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(Integer) } + attr_accessor :match + + sig { returns(Integer) } + attr_accessor :threshold + + sig do + params(match: Integer, threshold: Integer).returns( + T.attached_class + ) + end + def self.new(match:, threshold:) + end + + sig do + override.returns({ match: Integer, threshold: Integer }) + end + def to_hash + end + end + + # Tiered contribution type (only valid for company_contribution). + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TIERED = + T.let( + :tiered, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::Variants + ] + ) + end + def self.variants + end + end + + module EmployeeDeduction + extend FinchAPI::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1 + ) + end + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, + FinchAPI::Internal::AnyHash + ) + end + + # Contribution amount in cents. + sig { returns(Integer) } + attr_accessor :amount + + # Fixed contribution type. + sig do + returns( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Contribution amount in cents. + amount:, + # Fixed contribution type. + type: + ) + end + + sig do + override.returns( + { + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # Fixed contribution type. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FIXED = + T.let( + :fixed, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, + FinchAPI::Internal::AnyHash + ) + end + + # Contribution amount in basis points (1/100th of a percent). + sig { returns(Integer) } + attr_accessor :amount + + # Percentage contribution type. + sig do + returns( + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + ) + end + attr_accessor :type + + sig do + params( + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Contribution amount in basis points (1/100th of a percent). + amount:, + # Percentage contribution type. + type: + ) + end + + sig do + override.returns( + { + amount: Integer, + type: + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # Percentage contribution type. + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PERCENT = + T.let( + :percent, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::Variants + ] + ) + end + def self.variants + end + end + # Type for HSA contribution limit if the benefit is a HSA. module HsaContributionLimit extend FinchAPI::Internal::Type::Enum diff --git a/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi b/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi index e1d0fcde..40c6886d 100644 --- a/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi @@ -16,6 +16,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Array of the individual_id to enroll and a configuration object. sig do returns( @@ -40,6 +47,7 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], individuals: T::Array[ FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::OrHash @@ -48,6 +56,8 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Array of the individual_id to enroll and a configuration object. individuals: nil, request_options: {} @@ -57,6 +67,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], individuals: T::Array[ FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual @@ -306,6 +317,29 @@ module FinchAPI sig { params(amount: Integer).void } attr_writer :amount + # Array of tier objects for tiered contribution matching (required when type is + # tiered) + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier + ] + ) + ) + end + attr_reader :tiers + + sig do + params( + tiers: + T::Array[ + FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier::OrHash + ] + ).void + end + attr_writer :tiers + sig do returns( T.nilable( @@ -326,6 +360,10 @@ module FinchAPI sig do params( amount: Integer, + tiers: + T::Array[ + FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier::OrHash + ], type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type::OrSymbol ).returns(T.attached_class) @@ -334,6 +372,9 @@ module FinchAPI # Amount in cents for fixed type or basis points (1/100th of a percent) for # percent type amount: nil, + # Array of tier objects for tiered contribution matching (required when type is + # tiered) + tiers: nil, type: nil ) end @@ -342,6 +383,10 @@ module FinchAPI override.returns( { amount: Integer, + tiers: + T::Array[ + FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier + ], type: FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type::OrSymbol } @@ -350,6 +395,43 @@ module FinchAPI def to_hash end + class Tier < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier, + FinchAPI::Internal::AnyHash + ) + end + + # The employer match percentage in basis points (0-10000 = 0-100%) + sig { returns(Integer) } + attr_accessor :match + + # The employee contribution threshold in basis points (0-10000 = 0-100%) + sig { returns(Integer) } + attr_accessor :threshold + + sig do + params(match: Integer, threshold: Integer).returns( + T.attached_class + ) + end + def self.new( + # The employer match percentage in basis points (0-10000 = 0-100%) + match:, + # The employee contribution threshold in basis points (0-10000 = 0-100%) + threshold: + ) + end + + sig do + override.returns({ match: Integer, threshold: Integer }) + end + def to_hash + end + end + module Type extend FinchAPI::Internal::Type::Enum @@ -372,6 +454,11 @@ module FinchAPI :percent, FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type::TaggedSymbol ) + TIERED = + T.let( + :tiered, + FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi index d6695a0d..cbca21d2 100644 --- a/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi @@ -16,16 +16,33 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end sig do - override.returns({ request_options: FinchAPI::RequestOptions }) + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) end def to_hash end diff --git a/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi b/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi index 85685415..0f0252b0 100644 --- a/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi @@ -16,6 +16,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals sig { returns(T.nilable(String)) } @@ -26,11 +33,14 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals individual_ids: nil, @@ -41,6 +51,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi b/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi index e9261602..d578e596 100644 --- a/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi @@ -16,6 +16,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Array of individual_ids to unenroll. sig { returns(T.nilable(T::Array[String])) } attr_reader :individual_ids @@ -25,11 +32,14 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], individual_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Array of individual_ids to unenroll. individual_ids: nil, request_options: {} @@ -39,6 +49,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], individual_ids: T::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi index 8db60e0e..0e6fb196 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi @@ -17,6 +17,13 @@ module FinchAPI ) end + # The entity IDs to create the rule for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Specifies the fields to be applied when the condition is met. sig do returns( @@ -84,6 +91,7 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes::OrHash, conditions: @@ -98,6 +106,8 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + # The entity IDs to create the rule for. + entity_ids: nil, # Specifies the fields to be applied when the condition is met. attributes: nil, conditions: nil, @@ -114,6 +124,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, conditions: diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi index 6c9e9edf..82b4a4f4 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi @@ -17,16 +17,33 @@ module FinchAPI ) end + # The entity IDs to delete the rule for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to delete the rule for. + entity_ids: nil, + request_options: {} + ) end sig do - override.returns({ request_options: FinchAPI::RequestOptions }) + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) end def to_hash end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi index a95be1cb..ee5e2dc5 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi @@ -17,16 +17,33 @@ module FinchAPI ) end + # The entity IDs to retrieve rules for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to retrieve rules for. + entity_ids: nil, + request_options: {} + ) end sig do - override.returns({ request_options: FinchAPI::RequestOptions }) + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) end def to_hash end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi index 61648289..49c1c0cf 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi @@ -17,6 +17,13 @@ module FinchAPI ) end + # The entity IDs to update the rule for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig { returns(T.nilable(T.anything)) } attr_reader :optional_property @@ -25,16 +32,23 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], optional_property: T.anything, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(optional_property: nil, request_options: {}) + def self.new( + # The entity IDs to update the rule for. + entity_ids: nil, + optional_property: nil, + request_options: {} + ) end sig do override.returns( { + entity_ids: T::Array[String], optional_property: T.anything, request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi index e5744f6d..2f9c0f47 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi @@ -47,6 +47,13 @@ module FinchAPI sig { params(end_date: Date).void } attr_writer :end_date + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Case-insensitive partial match search by pay statement item name. sig { returns(T.nilable(String)) } attr_reader :name @@ -76,6 +83,7 @@ module FinchAPI FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol ], end_date: Date, + entity_ids: T::Array[String], name: String, start_date: Date, type: String, @@ -89,6 +97,8 @@ module FinchAPI # The end date to retrieve pay statement items by via their last seen pay date in # `YYYY-MM-DD` format. end_date: nil, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Case-insensitive partial match search by pay statement item name. name: nil, # The start date to retrieve pay statement items by via their last seen pay date @@ -108,6 +118,7 @@ module FinchAPI FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol ], end_date: Date, + entity_ids: T::Array[String], name: String, start_date: Date, type: String, diff --git a/rbi/finch_api/models/hris/company_retrieve_params.rbi b/rbi/finch_api/models/hris/company_retrieve_params.rbi index c618cc0f..216e94d7 100644 --- a/rbi/finch_api/models/hris/company_retrieve_params.rbi +++ b/rbi/finch_api/models/hris/company_retrieve_params.rbi @@ -15,15 +15,34 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/hris/directory_list_individuals_params.rbi b/rbi/finch_api/models/hris/directory_list_individuals_params.rbi index 19c1627d..f223b29c 100644 --- a/rbi/finch_api/models/hris/directory_list_individuals_params.rbi +++ b/rbi/finch_api/models/hris/directory_list_individuals_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Number of employees to return (defaults to all) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -31,12 +38,15 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Number of employees to return (defaults to all) limit: nil, # Index to start from (defaults to 0) @@ -48,6 +58,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/hris/directory_list_params.rbi b/rbi/finch_api/models/hris/directory_list_params.rbi index 28bc07a1..4c0b8bed 100644 --- a/rbi/finch_api/models/hris/directory_list_params.rbi +++ b/rbi/finch_api/models/hris/directory_list_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Number of employees to return (defaults to all) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -31,12 +38,15 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Number of employees to return (defaults to all) limit: nil, # Index to start from (defaults to 0) @@ -48,6 +58,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/hris/document_list_params.rbi b/rbi/finch_api/models/hris/document_list_params.rbi index f17a1d7f..adf48d2e 100644 --- a/rbi/finch_api/models/hris/document_list_params.rbi +++ b/rbi/finch_api/models/hris/document_list_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + # Comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals sig { returns(T.nilable(T::Array[String])) } @@ -57,6 +64,7 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], individual_ids: T::Array[String], limit: Integer, offset: Integer, @@ -65,6 +73,8 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals individual_ids: nil, @@ -82,6 +92,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], individual_ids: T::Array[String], limit: Integer, offset: Integer, diff --git a/rbi/finch_api/models/hris/document_response.rbi b/rbi/finch_api/models/hris/document_response.rbi index b1f06cc8..1854fe7a 100644 --- a/rbi/finch_api/models/hris/document_response.rbi +++ b/rbi/finch_api/models/hris/document_response.rbi @@ -10,11 +10,8 @@ module FinchAPI end # A stable Finch id for the document. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id + sig { returns(String) } + attr_accessor :id # The ID of the individual associated with the document. This will be null for # employer-level documents. @@ -22,28 +19,16 @@ module FinchAPI attr_accessor :individual_id # The type of document. - sig do - returns( - T.nilable(FinchAPI::HRIS::DocumentResponse::Type::TaggedSymbol) - ) - end - attr_reader :type - - sig do - params(type: FinchAPI::HRIS::DocumentResponse::Type::OrSymbol).void - end - attr_writer :type + sig { returns(FinchAPI::HRIS::DocumentResponse::Type::TaggedSymbol) } + attr_accessor :type # A URL to access the document. Format: # `https://api.tryfinch.com/employer/documents/:document_id`. - sig { returns(T.nilable(String)) } - attr_reader :url - - sig { params(url: String).void } - attr_writer :url + sig { returns(String) } + attr_accessor :url # The year the document applies to, if available. - sig { returns(T.nilable(Float)) } + sig { returns(Float) } attr_accessor :year sig do @@ -52,22 +37,22 @@ module FinchAPI individual_id: T.nilable(String), type: FinchAPI::HRIS::DocumentResponse::Type::OrSymbol, url: String, - year: T.nilable(Float) + year: Float ).returns(T.attached_class) end def self.new( # A stable Finch id for the document. - id: nil, + id:, # The ID of the individual associated with the document. This will be null for # employer-level documents. - individual_id: nil, + individual_id:, # The type of document. - type: nil, + type:, # A URL to access the document. Format: # `https://api.tryfinch.com/employer/documents/:document_id`. - url: nil, + url:, # The year the document applies to, if available. - year: nil + year: ) end @@ -78,7 +63,7 @@ module FinchAPI individual_id: T.nilable(String), type: FinchAPI::HRIS::DocumentResponse::Type::TaggedSymbol, url: String, - year: T.nilable(Float) + year: Float } ) end diff --git a/rbi/finch_api/models/hris/document_retreive_params.rbi b/rbi/finch_api/models/hris/document_retreive_params.rbi index c008d3e1..a4245901 100644 --- a/rbi/finch_api/models/hris/document_retreive_params.rbi +++ b/rbi/finch_api/models/hris/document_retreive_params.rbi @@ -15,15 +15,34 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi b/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi index db2ec9eb..50f5ad67 100644 --- a/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi @@ -23,18 +23,28 @@ module FinchAPI end attr_accessor :requests + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do params( requests: T::Array[ FinchAPI::HRIS::EmploymentRetrieveManyParams::Request::OrHash ], + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( # The array of batch requests. requests:, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end @@ -44,6 +54,7 @@ module FinchAPI { requests: T::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request], + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } ) diff --git a/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi b/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi index a8fce80e..356451f3 100644 --- a/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do returns( T.nilable(FinchAPI::HRIS::IndividualRetrieveManyParams::Options) @@ -53,6 +60,7 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], options: T.nilable( FinchAPI::HRIS::IndividualRetrieveManyParams::Options::OrHash @@ -64,12 +72,19 @@ module FinchAPI request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(options: nil, requests: nil, request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + options: nil, + requests: nil, + request_options: {} + ) end sig do override.returns( { + entity_ids: T::Array[String], options: T.nilable( FinchAPI::HRIS::IndividualRetrieveManyParams::Options diff --git a/rbi/finch_api/models/hris/pay_statement.rbi b/rbi/finch_api/models/hris/pay_statement.rbi index b8160f83..af31b0f3 100644 --- a/rbi/finch_api/models/hris/pay_statement.rbi +++ b/rbi/finch_api/models/hris/pay_statement.rbi @@ -22,11 +22,7 @@ module FinchAPI # The array of deductions objects associated with this pay statement. sig do returns( - T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction) - ] - ) + T.nilable(T::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]) ) end attr_accessor :employee_deductions @@ -34,9 +30,7 @@ module FinchAPI sig do returns( T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::EmployerContribution) - ] + T::Array[FinchAPI::HRIS::PayStatement::EmployerContribution] ) ) end @@ -67,11 +61,7 @@ module FinchAPI 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 + sig { returns(T.nilable(T::Array[FinchAPI::HRIS::PayStatement::Tax])) } attr_accessor :taxes # The number of hours worked for this pay period @@ -95,17 +85,13 @@ module FinchAPI employee_deductions: T.nilable( T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatement::EmployeeDeduction::OrHash - ) + FinchAPI::HRIS::PayStatement::EmployeeDeduction::OrHash ] ), employer_contributions: T.nilable( T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution::OrHash - ) + FinchAPI::HRIS::PayStatement::EmployerContribution::OrHash ] ), gross_pay: T.nilable(FinchAPI::Money::OrHash), @@ -114,9 +100,7 @@ module FinchAPI payment_method: T.nilable(FinchAPI::HRIS::PayStatement::PaymentMethod::OrSymbol), taxes: - T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax::OrHash)] - ), + T.nilable(T::Array[FinchAPI::HRIS::PayStatement::Tax::OrHash]), total_hours: T.nilable(Float), type: T.nilable(FinchAPI::HRIS::PayStatement::Type::OrSymbol) ).returns(T.attached_class) @@ -151,17 +135,11 @@ module FinchAPI ), employee_deductions: T.nilable( - T::Array[ - T.nilable(FinchAPI::HRIS::PayStatement::EmployeeDeduction) - ] + T::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction] ), employer_contributions: T.nilable( - T::Array[ - T.nilable( - FinchAPI::HRIS::PayStatement::EmployerContribution - ) - ] + T::Array[FinchAPI::HRIS::PayStatement::EmployerContribution] ), gross_pay: T.nilable(FinchAPI::Money), individual_id: String, @@ -170,10 +148,7 @@ module FinchAPI T.nilable( FinchAPI::HRIS::PayStatement::PaymentMethod::TaggedSymbol ), - taxes: - T.nilable( - T::Array[T.nilable(FinchAPI::HRIS::PayStatement::Tax)] - ), + taxes: T.nilable(T::Array[FinchAPI::HRIS::PayStatement::Tax]), total_hours: T.nilable(Float), type: T.nilable(FinchAPI::HRIS::PayStatement::Type::TaggedSymbol) } diff --git a/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi b/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi index f4c9101e..2e8a90f4 100644 --- a/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi @@ -23,18 +23,28 @@ module FinchAPI end attr_accessor :requests + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do params( requests: T::Array[ FinchAPI::HRIS::PayStatementRetrieveManyParams::Request::OrHash ], + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( # The array of batch requests. requests:, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end @@ -46,6 +56,7 @@ module FinchAPI T::Array[ FinchAPI::HRIS::PayStatementRetrieveManyParams::Request ], + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } ) diff --git a/rbi/finch_api/models/hris/payment_list_params.rbi b/rbi/finch_api/models/hris/payment_list_params.rbi index 0934fc28..3084b348 100644 --- a/rbi/finch_api/models/hris/payment_list_params.rbi +++ b/rbi/finch_api/models/hris/payment_list_params.rbi @@ -25,10 +25,18 @@ module FinchAPI sig { returns(Date) } attr_accessor :start_date + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do params( end_date: Date, start_date: Date, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end @@ -39,6 +47,8 @@ module FinchAPI # The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` # format. start_date:, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end @@ -48,6 +58,7 @@ module FinchAPI { end_date: Date, start_date: Date, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } ) diff --git a/rbi/finch_api/models/hris/supported_benefit.rbi b/rbi/finch_api/models/hris/supported_benefit.rbi index db643fff..2eeaa30a 100644 --- a/rbi/finch_api/models/hris/supported_benefit.rbi +++ b/rbi/finch_api/models/hris/supported_benefit.rbi @@ -190,6 +190,11 @@ module FinchAPI :percent, FinchAPI::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol ) + TIERED = + T.let( + :tiered, + FinchAPI::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/finch_api/models/hris/w42005.rbi b/rbi/finch_api/models/hris/w42005.rbi index 128aa1cf..e9419bd6 100644 --- a/rbi/finch_api/models/hris/w42005.rbi +++ b/rbi/finch_api/models/hris/w42005.rbi @@ -10,21 +10,18 @@ module FinchAPI end # Detailed information specific to the 2005 W4 form. - sig { returns(T.nilable(FinchAPI::HRIS::W42005::Data)) } + sig { returns(FinchAPI::HRIS::W42005::Data) } attr_reader :data sig { params(data: FinchAPI::HRIS::W42005::Data::OrHash).void } attr_writer :data # Specifies the form type, indicating that this document is a 2005 W4 form. - sig { returns(T.nilable(FinchAPI::HRIS::W42005::Type::TaggedSymbol)) } - attr_reader :type - - sig { params(type: FinchAPI::HRIS::W42005::Type::OrSymbol).void } - attr_writer :type + sig { returns(FinchAPI::HRIS::W42005::Type::TaggedSymbol) } + attr_accessor :type # The tax year this W4 document applies to. - sig { returns(T.nilable(Float)) } + sig { returns(Float) } attr_accessor :year # A 2005 version of the W-4 tax form containing information on an individual's @@ -33,16 +30,16 @@ module FinchAPI params( data: FinchAPI::HRIS::W42005::Data::OrHash, type: FinchAPI::HRIS::W42005::Type::OrSymbol, - year: T.nilable(Float) + year: Float ).returns(T.attached_class) end def self.new( # Detailed information specific to the 2005 W4 form. - data: nil, + data:, # Specifies the form type, indicating that this document is a 2005 W4 form. - type: nil, + type:, # The tax year this W4 document applies to. - year: nil + year: ) end @@ -51,7 +48,7 @@ module FinchAPI { data: FinchAPI::HRIS::W42005::Data, type: FinchAPI::HRIS::W42005::Type::TaggedSymbol, - year: T.nilable(Float) + year: Float } ) end @@ -65,7 +62,7 @@ module FinchAPI end # Additional withholding amount (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :additional_withholding # Indicates exemption status from federal tax withholding. @@ -74,14 +71,7 @@ module FinchAPI T.nilable(FinchAPI::HRIS::W42005::Data::Exemption::TaggedSymbol) ) end - attr_reader :exemption - - sig do - params( - exemption: FinchAPI::HRIS::W42005::Data::Exemption::OrSymbol - ).void - end - attr_writer :exemption + attr_accessor :exemption # The individual's filing status for tax purposes. sig do @@ -94,53 +84,53 @@ module FinchAPI attr_accessor :filing_status # The unique identifier for the individual associated with this 2005 W4 form. - 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 # Total number of allowances claimed (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :total_number_of_allowances # Detailed information specific to the 2005 W4 form. sig do params( - additional_withholding: T.nilable(Integer), - exemption: FinchAPI::HRIS::W42005::Data::Exemption::OrSymbol, + additional_withholding: Integer, + exemption: + T.nilable(FinchAPI::HRIS::W42005::Data::Exemption::OrSymbol), filing_status: T.nilable(FinchAPI::HRIS::W42005::Data::FilingStatus::OrSymbol), individual_id: String, - total_number_of_allowances: T.nilable(Integer) + total_number_of_allowances: Integer ).returns(T.attached_class) end def self.new( # Additional withholding amount (in cents). - additional_withholding: nil, + additional_withholding:, # Indicates exemption status from federal tax withholding. - exemption: nil, + exemption:, # The individual's filing status for tax purposes. - filing_status: nil, + filing_status:, # The unique identifier for the individual associated with this 2005 W4 form. - individual_id: nil, + individual_id:, # Total number of allowances claimed (in cents). - total_number_of_allowances: nil + total_number_of_allowances: ) end sig do override.returns( { - additional_withholding: T.nilable(Integer), + additional_withholding: Integer, exemption: - FinchAPI::HRIS::W42005::Data::Exemption::TaggedSymbol, + T.nilable( + FinchAPI::HRIS::W42005::Data::Exemption::TaggedSymbol + ), filing_status: T.nilable( FinchAPI::HRIS::W42005::Data::FilingStatus::TaggedSymbol ), individual_id: String, - total_number_of_allowances: T.nilable(Integer) + total_number_of_allowances: Integer } ) end diff --git a/rbi/finch_api/models/hris/w42020.rbi b/rbi/finch_api/models/hris/w42020.rbi index fb6c2bdb..60e5e559 100644 --- a/rbi/finch_api/models/hris/w42020.rbi +++ b/rbi/finch_api/models/hris/w42020.rbi @@ -10,21 +10,18 @@ module FinchAPI end # Detailed information specific to the 2020 W4 form. - sig { returns(T.nilable(FinchAPI::HRIS::W42020::Data)) } + sig { returns(FinchAPI::HRIS::W42020::Data) } attr_reader :data sig { params(data: FinchAPI::HRIS::W42020::Data::OrHash).void } attr_writer :data # Specifies the form type, indicating that this document is a 2020 W4 form. - sig { returns(T.nilable(FinchAPI::HRIS::W42020::Type::TaggedSymbol)) } - attr_reader :type - - sig { params(type: FinchAPI::HRIS::W42020::Type::OrSymbol).void } - attr_writer :type + sig { returns(FinchAPI::HRIS::W42020::Type::TaggedSymbol) } + attr_accessor :type # The tax year this W4 document applies to. - sig { returns(T.nilable(Float)) } + sig { returns(Float) } attr_accessor :year # A 2020 version of the W-4 tax form containing information on an individual's @@ -33,16 +30,16 @@ module FinchAPI params( data: FinchAPI::HRIS::W42020::Data::OrHash, type: FinchAPI::HRIS::W42020::Type::OrSymbol, - year: T.nilable(Float) + year: Float ).returns(T.attached_class) end def self.new( # Detailed information specific to the 2020 W4 form. - data: nil, + data:, # Specifies the form type, indicating that this document is a 2020 W4 form. - type: nil, + type:, # The tax year this W4 document applies to. - year: nil + year: ) end @@ -51,7 +48,7 @@ module FinchAPI { data: FinchAPI::HRIS::W42020::Data, type: FinchAPI::HRIS::W42020::Type::TaggedSymbol, - year: T.nilable(Float) + year: Float } ) end @@ -66,19 +63,19 @@ module FinchAPI # Amount claimed for dependents other than qualifying children under 17 (in # cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :amount_for_other_dependents # Amount claimed for dependents under 17 years old (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :amount_for_qualifying_children_under_17 # Deductible expenses (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :deductions # Additional withholding amount (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :extra_withholding # The individual's filing status for tax purposes. @@ -92,69 +89,66 @@ module FinchAPI attr_accessor :filing_status # The unique identifier for the individual associated with this document. - 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 # Additional income from sources outside of primary employment (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :other_income # Total amount claimed for dependents and other credits (in cents). - sig { returns(T.nilable(Integer)) } + sig { returns(Integer) } attr_accessor :total_claim_dependent_and_other_credits # Detailed information specific to the 2020 W4 form. sig do params( - amount_for_other_dependents: T.nilable(Integer), - amount_for_qualifying_children_under_17: T.nilable(Integer), - deductions: T.nilable(Integer), - extra_withholding: T.nilable(Integer), + amount_for_other_dependents: Integer, + amount_for_qualifying_children_under_17: Integer, + deductions: Integer, + extra_withholding: Integer, filing_status: T.nilable(FinchAPI::HRIS::W42020::Data::FilingStatus::OrSymbol), individual_id: String, - other_income: T.nilable(Integer), - total_claim_dependent_and_other_credits: T.nilable(Integer) + other_income: Integer, + total_claim_dependent_and_other_credits: Integer ).returns(T.attached_class) end def self.new( # Amount claimed for dependents other than qualifying children under 17 (in # cents). - amount_for_other_dependents: nil, + amount_for_other_dependents:, # Amount claimed for dependents under 17 years old (in cents). - amount_for_qualifying_children_under_17: nil, + amount_for_qualifying_children_under_17:, # Deductible expenses (in cents). - deductions: nil, + deductions:, # Additional withholding amount (in cents). - extra_withholding: nil, + extra_withholding:, # The individual's filing status for tax purposes. - filing_status: nil, + filing_status:, # The unique identifier for the individual associated with this document. - individual_id: nil, + individual_id:, # Additional income from sources outside of primary employment (in cents). - other_income: nil, + other_income:, # Total amount claimed for dependents and other credits (in cents). - total_claim_dependent_and_other_credits: nil + total_claim_dependent_and_other_credits: ) end sig do override.returns( { - amount_for_other_dependents: T.nilable(Integer), - amount_for_qualifying_children_under_17: T.nilable(Integer), - deductions: T.nilable(Integer), - extra_withholding: T.nilable(Integer), + amount_for_other_dependents: Integer, + amount_for_qualifying_children_under_17: Integer, + deductions: Integer, + extra_withholding: Integer, filing_status: T.nilable( FinchAPI::HRIS::W42020::Data::FilingStatus::TaggedSymbol ), individual_id: String, - other_income: T.nilable(Integer), - total_claim_dependent_and_other_credits: T.nilable(Integer) + other_income: Integer, + total_claim_dependent_and_other_credits: Integer } ) end diff --git a/rbi/finch_api/models/introspection.rbi b/rbi/finch_api/models/introspection.rbi index e98a1009..6863ea03 100644 --- a/rbi/finch_api/models/introspection.rbi +++ b/rbi/finch_api/models/introspection.rbi @@ -95,23 +95,15 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :customer_name - # Array of entity IDs associated with this connection. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :entity_ids - - sig { params(entity_ids: T::Array[String]).void } - attr_writer :entity_ids - - # Indicates whether this connection manages a single entity or multiple entities. - sig do - returns(T.nilable(FinchAPI::Introspection::EntityMode::TaggedSymbol)) - end - attr_reader :entity_mode + # Array of detailed entity information for each connected account in multi-account + # mode + sig { returns(T.nilable(T::Array[FinchAPI::Introspection::Entity])) } + attr_reader :entities sig do - params(entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol).void + params(entities: T::Array[FinchAPI::Introspection::Entity::OrHash]).void end - attr_writer :entity_mode + attr_writer :entities # Whether the connection associated with the `access_token` uses the Assisted # Connect Flow. (`true` if using Assisted Connect, `false` if connection is @@ -151,8 +143,7 @@ module FinchAPI customer_email: T.nilable(String), customer_id: T.nilable(String), customer_name: T.nilable(String), - entity_ids: T::Array[String], - entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol, + entities: T::Array[FinchAPI::Introspection::Entity::OrHash], manual: T::Boolean, payroll_provider_id: String, username: T.nilable(String) @@ -193,10 +184,9 @@ module FinchAPI # The name of your customer you provided to Finch when a connect session was # created for this connection customer_name: nil, - # Array of entity IDs associated with this connection. - entity_ids: nil, - # Indicates whether this connection manages a single entity or multiple entities. - entity_mode: nil, + # Array of detailed entity information for each connected account in multi-account + # mode + entities: nil, # Whether the connection associated with the `access_token` uses the Assisted # Connect Flow. (`true` if using Assisted Connect, `false` if connection is # automated) @@ -228,8 +218,7 @@ module FinchAPI customer_email: T.nilable(String), customer_id: T.nilable(String), customer_name: T.nilable(String), - entity_ids: T::Array[String], - entity_mode: FinchAPI::Introspection::EntityMode::TaggedSymbol, + entities: T::Array[FinchAPI::Introspection::Entity], manual: T::Boolean, payroll_provider_id: String, username: T.nilable(String) @@ -571,24 +560,59 @@ module FinchAPI end end - # Indicates whether this connection manages a single entity or multiple entities. - module EntityMode - extend FinchAPI::Internal::Type::Enum + class Entity < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(FinchAPI::Introspection::Entity, FinchAPI::Internal::AnyHash) + end - TaggedSymbol = - T.type_alias { T.all(Symbol, FinchAPI::Introspection::EntityMode) } - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The connection account ID for this entity + sig { returns(String) } + attr_accessor :id - SINGLE = - T.let(:single, FinchAPI::Introspection::EntityMode::TaggedSymbol) - MULTI = T.let(:multi, FinchAPI::Introspection::EntityMode::TaggedSymbol) + # The name of the entity (payroll provider company name) + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The source ID of the entity + sig { returns(T.nilable(String)) } + attr_accessor :source_id + + # The type of entity + sig { returns(T.nilable(String)) } + attr_accessor :type + + sig do + params( + id: String, + name: T.nilable(String), + source_id: T.nilable(String), + type: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The connection account ID for this entity + id:, + # The name of the entity (payroll provider company name) + name:, + # The source ID of the entity + source_id:, + # The type of entity + type: + ) + end sig do override.returns( - T::Array[FinchAPI::Introspection::EntityMode::TaggedSymbol] + { + id: String, + name: T.nilable(String), + source_id: T.nilable(String), + type: T.nilable(String) + } ) end - def self.values + def to_hash end end end diff --git a/rbi/finch_api/models/jobs/automated_list_params.rbi b/rbi/finch_api/models/jobs/automated_list_params.rbi index 04080485..7a11e67e 100644 --- a/rbi/finch_api/models/jobs/automated_list_params.rbi +++ b/rbi/finch_api/models/jobs/automated_list_params.rbi @@ -15,15 +15,6 @@ module FinchAPI ) end - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - sig { returns(T.nilable(String)) } - attr_reader :entity_id - - sig { params(entity_id: String).void } - attr_writer :entity_id - # Number of items to return sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -40,17 +31,12 @@ module FinchAPI sig do params( - entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - entity_id: nil, # Number of items to return limit: nil, # Index to start from (defaults to 0) @@ -62,7 +48,6 @@ module FinchAPI sig do override.returns( { - entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/jobs/automated_retrieve_params.rbi b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi index 002a027e..daa429b3 100644 --- a/rbi/finch_api/models/jobs/automated_retrieve_params.rbi +++ b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi @@ -15,35 +15,15 @@ module FinchAPI ) end - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - sig { returns(T.nilable(String)) } - attr_reader :entity_id - - sig { params(entity_id: String).void } - attr_writer :entity_id - sig do - params( - entity_id: String, - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) + params(request_options: FinchAPI::RequestOptions::OrHash).returns( + T.attached_class + ) end - def self.new( - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - entity_id: nil, - request_options: {} - ) + def self.new(request_options: {}) end - sig do - override.returns( - { entity_id: String, request_options: FinchAPI::RequestOptions } - ) - end + sig { override.returns({ request_options: FinchAPI::RequestOptions }) } def to_hash end end diff --git a/rbi/finch_api/models/jobs/manual_retrieve_params.rbi b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi index 6daf52ae..1b6a3dad 100644 --- a/rbi/finch_api/models/jobs/manual_retrieve_params.rbi +++ b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi @@ -15,35 +15,15 @@ module FinchAPI ) end - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - sig { returns(T.nilable(String)) } - attr_reader :entity_id - - sig { params(entity_id: String).void } - attr_writer :entity_id - sig do - params( - entity_id: String, - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) + params(request_options: FinchAPI::RequestOptions::OrHash).returns( + T.attached_class + ) end - def self.new( - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - entity_id: nil, - request_options: {} - ) + def self.new(request_options: {}) end - sig do - override.returns( - { entity_id: String, request_options: FinchAPI::RequestOptions } - ) - end + sig { override.returns({ request_options: FinchAPI::RequestOptions }) } def to_hash end end diff --git a/rbi/finch_api/models/payroll/pay_group_list_params.rbi b/rbi/finch_api/models/payroll/pay_group_list_params.rbi index a64b3e53..75a4c03d 100644 --- a/rbi/finch_api/models/payroll/pay_group_list_params.rbi +++ b/rbi/finch_api/models/payroll/pay_group_list_params.rbi @@ -15,6 +15,13 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig { returns(T.nilable(String)) } attr_reader :individual_id @@ -29,12 +36,15 @@ module FinchAPI sig do params( + entity_ids: T::Array[String], individual_id: String, pay_frequencies: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, individual_id: nil, pay_frequencies: nil, request_options: {} @@ -44,6 +54,7 @@ module FinchAPI sig do override.returns( { + entity_ids: T::Array[String], individual_id: String, pay_frequencies: T::Array[String], request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi b/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi index 3b985d03..65fea4af 100644 --- a/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi +++ b/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi @@ -15,15 +15,34 @@ module FinchAPI ) end + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/provider.rbi b/rbi/finch_api/models/provider.rbi index f20cbcf8..4094b328 100644 --- a/rbi/finch_api/models/provider.rbi +++ b/rbi/finch_api/models/provider.rbi @@ -7,13 +7,18 @@ module FinchAPI T.type_alias { T.any(FinchAPI::Provider, FinchAPI::Internal::AnyHash) } # The id of the payroll provider used in Connect. - sig { returns(T.nilable(String)) } - attr_reader :id + sig { returns(String) } + attr_accessor :id + + # The display name of the payroll provider. + sig { returns(String) } + attr_accessor :display_name - sig { params(id: String).void } - attr_writer :id + # The list of Finch products supported on this payroll provider. + sig { returns(T::Array[String]) } + attr_accessor :products - # The list of authentication methods supported by the provider. + # The authentication methods supported by the provider. sig do returns(T.nilable(T::Array[FinchAPI::Provider::AuthenticationMethod])) end @@ -34,13 +39,6 @@ module FinchAPI sig { params(beta: T::Boolean).void } attr_writer :beta - # The display name of the payroll provider. - sig { returns(T.nilable(String)) } - attr_reader :display_name - - sig { params(display_name: String).void } - attr_writer :display_name - # The url to the official icon of the payroll provider. sig { returns(T.nilable(String)) } attr_reader :icon @@ -78,37 +76,32 @@ module FinchAPI sig { params(primary_color: String).void } attr_writer :primary_color - # The list of Finch products supported on this payroll provider. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :products - - sig { params(products: T::Array[String]).void } - attr_writer :products - sig do params( id: String, + display_name: String, + products: T::Array[String], authentication_methods: T::Array[FinchAPI::Provider::AuthenticationMethod::OrHash], beta: T::Boolean, - display_name: String, icon: String, logo: String, manual: T::Boolean, mfa_required: T::Boolean, - primary_color: String, - products: T::Array[String] + primary_color: String ).returns(T.attached_class) end def self.new( # The id of the payroll provider used in Connect. - id: nil, - # The list of authentication methods supported by the provider. + id:, + # The display name of the payroll provider. + display_name:, + # The list of Finch products supported on this payroll provider. + products:, + # The authentication methods supported by the provider. authentication_methods: nil, # `true` if the integration is in a beta state, `false` otherwise beta: nil, - # The display name of the payroll provider. - display_name: nil, # The url to the official icon of the payroll provider. icon: nil, # The url to the official logo of the payroll provider. @@ -120,9 +113,7 @@ module FinchAPI # whether MFA is required for the provider. mfa_required: nil, # The hex code for the primary color of the payroll provider. - primary_color: nil, - # The list of Finch products supported on this payroll provider. - products: nil + primary_color: nil ) end @@ -130,16 +121,16 @@ module FinchAPI override.returns( { id: String, + display_name: String, + products: T::Array[String], authentication_methods: T::Array[FinchAPI::Provider::AuthenticationMethod], beta: T::Boolean, - display_name: String, icon: String, logo: String, manual: T::Boolean, mfa_required: T::Boolean, - primary_color: String, - products: T::Array[String] + primary_color: String } ) end @@ -155,2520 +146,97 @@ module FinchAPI ) end - # Each benefit type and their supported features. If the benefit type is not - # supported, the property will be null - sig { returns(T.nilable(FinchAPI::HRIS::BenefitsSupport)) } + # The type of authentication method + sig do + returns(FinchAPI::Provider::AuthenticationMethod::Type::OrSymbol) + end + attr_accessor :type + + # The supported benefit types and their configurations + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } attr_reader :benefits_support sig do - params( - benefits_support: T.nilable(FinchAPI::HRIS::BenefitsSupport::OrHash) - ).void + params(benefits_support: T::Hash[Symbol, T.nilable(T.anything)]).void end attr_writer :benefits_support - # The supported data fields returned by our HR and payroll endpoints - sig do - returns( - T.nilable(FinchAPI::Provider::AuthenticationMethod::SupportedFields) - ) - end + # The supported fields for each Finch product + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } attr_reader :supported_fields sig do - params( - supported_fields: - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::OrHash - ) - ).void + params(supported_fields: T::Hash[Symbol, T.nilable(T.anything)]).void end attr_writer :supported_fields - # The type of authentication method. - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol - ) - ) - end - attr_reader :type - - sig do - params( - type: FinchAPI::Provider::AuthenticationMethod::Type::OrSymbol - ).void - end - attr_writer :type - sig do params( - benefits_support: - T.nilable(FinchAPI::HRIS::BenefitsSupport::OrHash), - supported_fields: - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::OrHash - ), - type: FinchAPI::Provider::AuthenticationMethod::Type::OrSymbol + type: FinchAPI::Provider::AuthenticationMethod::Type::OrSymbol, + benefits_support: T::Hash[Symbol, T.nilable(T.anything)], + supported_fields: T::Hash[Symbol, T.nilable(T.anything)] ).returns(T.attached_class) end def self.new( - # Each benefit type and their supported features. If the benefit type is not - # supported, the property will be null + # The type of authentication method + type:, + # The supported benefit types and their configurations benefits_support: nil, - # The supported data fields returned by our HR and payroll endpoints - supported_fields: nil, - # The type of authentication method. - type: nil + # The supported fields for each Finch product + supported_fields: nil ) end sig do override.returns( { - benefits_support: T.nilable(FinchAPI::HRIS::BenefitsSupport), - supported_fields: - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields - ), - type: FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol + type: FinchAPI::Provider::AuthenticationMethod::Type::OrSymbol, + benefits_support: T::Hash[Symbol, T.nilable(T.anything)], + supported_fields: T::Hash[Symbol, T.nilable(T.anything)] } ) end def to_hash end - class SupportedFields < FinchAPI::Internal::Type::BaseModel - OrHash = + # The type of authentication method + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields, - FinchAPI::Internal::AnyHash - ) + T.all(Symbol, FinchAPI::Provider::AuthenticationMethod::Type) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company - ) - ) - end - attr_reader :company - - sig do - params( - company: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::OrHash - ).void - end - attr_writer :company - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory - ) - ) - end - attr_reader :directory - - sig do - params( - directory: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::OrHash - ).void - end - attr_writer :directory - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment - ) - ) - end - attr_reader :employment - - sig do - params( - employment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::OrHash - ).void - end - attr_writer :employment - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual - ) - ) - end - attr_reader :individual - - sig do - params( - individual: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::OrHash - ).void - end - attr_writer :individual - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup - ) + ASSISTED = + T.let( + :assisted, + FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol ) - end - attr_reader :pay_group - - sig do - params( - pay_group: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup::OrHash - ).void - end - attr_writer :pay_group - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement - ) + CREDENTIAL = + T.let( + :credential, + FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol ) - end - attr_reader :pay_statement - - sig do - params( - pay_statement: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::OrHash - ).void - end - attr_writer :pay_statement - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment - ) + API_TOKEN = + T.let( + :api_token, + FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol ) - end - attr_reader :payment - - sig do - params( - payment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::OrHash - ).void - end - attr_writer :payment - - # The supported data fields returned by our HR and payroll endpoints - sig do - params( - company: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::OrHash, - directory: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::OrHash, - employment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::OrHash, - individual: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::OrHash, - pay_group: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup::OrHash, - pay_statement: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::OrHash, - payment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::OrHash - ).returns(T.attached_class) - end - def self.new( - company: nil, - directory: nil, - employment: nil, - individual: nil, - pay_group: nil, - pay_statement: nil, - payment: nil - ) - end - - sig do - override.returns( - { - 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 - } + API_CREDENTIAL = + T.let( + :api_credential, + FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol ) - end - def to_hash - end - - class Company < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts - ) - ) - end - attr_reader :accounts - - sig do - params( - accounts: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts::OrHash - ).void - end - attr_writer :accounts - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments - ) - ) - end - attr_reader :departments - - sig do - params( - departments: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::OrHash - ).void - end - attr_writer :departments - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :ein - - sig { params(ein: T::Boolean).void } - attr_writer :ein - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity - ) - ) - end - attr_reader :entity - - sig do - params( - entity: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity::OrHash - ).void - end - attr_writer :entity - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :legal_name - - sig { params(legal_name: T::Boolean).void } - attr_writer :legal_name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations - ) - ) - end - attr_reader :locations - - sig do - params( - locations: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations::OrHash - ).void - end - attr_writer :locations - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :primary_email - - sig { params(primary_email: T::Boolean).void } - attr_writer :primary_email - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :primary_phone_number - - sig { params(primary_phone_number: T::Boolean).void } - attr_writer :primary_phone_number - - sig do - params( - id: T::Boolean, - accounts: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts::OrHash, - departments: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::OrHash, - ein: T::Boolean, - entity: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity::OrHash, - legal_name: T::Boolean, - locations: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations::OrHash, - primary_email: T::Boolean, - primary_phone_number: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id: nil, - accounts: nil, - departments: nil, - ein: nil, - entity: nil, - legal_name: nil, - locations: nil, - primary_email: nil, - primary_phone_number: nil + OAUTH = + T.let( + :oauth, + FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol ) - end - - sig do - override.returns( - { - id: T::Boolean, - accounts: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, - departments: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments, - ein: T::Boolean, - entity: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity, - legal_name: T::Boolean, - locations: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations, - primary_email: T::Boolean, - primary_phone_number: T::Boolean - } - ) - end - def to_hash - end - - class Accounts < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :account_name - - sig { params(account_name: T::Boolean).void } - attr_writer :account_name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :account_number - - sig { params(account_number: T::Boolean).void } - attr_writer :account_number - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :account_type - - sig { params(account_type: T::Boolean).void } - attr_writer :account_type - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :institution_name - - sig { params(institution_name: T::Boolean).void } - attr_writer :institution_name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :routing_number - - sig { params(routing_number: T::Boolean).void } - attr_writer :routing_number - - sig do - params( - account_name: T::Boolean, - account_number: T::Boolean, - account_type: T::Boolean, - institution_name: T::Boolean, - routing_number: T::Boolean - ).returns(T.attached_class) - end - def self.new( - account_name: nil, - account_number: nil, - account_type: nil, - institution_name: nil, - routing_number: nil - ) - end - - sig do - override.returns( - { - account_name: T::Boolean, - account_number: T::Boolean, - account_type: T::Boolean, - institution_name: T::Boolean, - routing_number: T::Boolean - } - ) - end - def to_hash - end - end - - class Departments < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent - ) - ) - end - attr_reader :parent - - sig do - params( - parent: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent::OrHash - ).void - end - attr_writer :parent - - sig do - params( - name: T::Boolean, - parent: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent::OrHash - ).returns(T.attached_class) - end - def self.new(name: nil, parent: nil) - end - - sig do - override.returns( - { - name: T::Boolean, - parent: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent - } - ) - end - def to_hash - end - - class Parent < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig { params(name: T::Boolean).returns(T.attached_class) } - def self.new(name: nil) - end - - sig { override.returns({ name: T::Boolean }) } - def to_hash - end - end - end - - class Entity < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :subtype - - sig { params(subtype: T::Boolean).void } - attr_writer :subtype - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params(subtype: T::Boolean, type: T::Boolean).returns( - T.attached_class - ) - end - def self.new(subtype: nil, type: nil) - end - - sig do - override.returns({ subtype: T::Boolean, type: T::Boolean }) - end - def to_hash - end - end - - class Locations < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :city - - sig { params(city: T::Boolean).void } - attr_writer :city - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :country - - sig { params(country: T::Boolean).void } - attr_writer :country - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :line1 - - sig { params(line1: T::Boolean).void } - attr_writer :line1 - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :line2 - - sig { params(line2: T::Boolean).void } - attr_writer :line2 - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :postal_code - - sig { params(postal_code: T::Boolean).void } - attr_writer :postal_code - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :state - - sig { params(state: T::Boolean).void } - attr_writer :state - - sig do - params( - city: T::Boolean, - country: T::Boolean, - line1: T::Boolean, - line2: T::Boolean, - postal_code: T::Boolean, - state: T::Boolean - ).returns(T.attached_class) - end - def self.new( - city: nil, - country: nil, - line1: nil, - line2: nil, - postal_code: nil, - state: nil - ) - end - - sig do - override.returns( - { - city: T::Boolean, - country: T::Boolean, - line1: T::Boolean, - line2: T::Boolean, - postal_code: T::Boolean, - state: T::Boolean - } - ) - end - def to_hash - end - end - end - - class Directory < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals - ) - ) - end - attr_reader :individuals - - sig do - params( - individuals: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::OrHash - ).void - end - attr_writer :individuals - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging - ) - ) - end - attr_reader :paging - - sig do - params( - paging: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging::OrHash - ).void - end - attr_writer :paging - - sig do - params( - individuals: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::OrHash, - paging: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging::OrHash - ).returns(T.attached_class) - end - def self.new(individuals: nil, paging: nil) - end - - sig do - override.returns( - { - individuals: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, - paging: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging - } - ) - end - def to_hash - end - - class Individuals < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :department - - sig { params(department: T::Boolean).void } - attr_writer :department - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :first_name - - sig { params(first_name: T::Boolean).void } - attr_writer :first_name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_active - - sig { params(is_active: T::Boolean).void } - attr_writer :is_active - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :last_name - - sig { params(last_name: T::Boolean).void } - attr_writer :last_name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager - ) - ) - end - attr_reader :manager - - sig do - params( - manager: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager::OrHash - ).void - end - attr_writer :manager - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :middle_name - - sig { params(middle_name: T::Boolean).void } - attr_writer :middle_name - - sig do - params( - id: T::Boolean, - department: T::Boolean, - first_name: T::Boolean, - is_active: T::Boolean, - last_name: T::Boolean, - manager: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager::OrHash, - middle_name: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id: nil, - department: nil, - first_name: nil, - is_active: nil, - last_name: nil, - manager: nil, - middle_name: nil - ) - end - - sig do - override.returns( - { - id: T::Boolean, - department: T::Boolean, - first_name: T::Boolean, - is_active: T::Boolean, - last_name: T::Boolean, - manager: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, - middle_name: T::Boolean - } - ) - end - def to_hash - end - - class Manager < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { params(id: T::Boolean).returns(T.attached_class) } - def self.new(id: nil) - end - - sig { override.returns({ id: T::Boolean }) } - def to_hash - end - end - end - - class Paging < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :count - - sig { params(count: T::Boolean).void } - attr_writer :count - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :offset - - sig { params(offset: T::Boolean).void } - attr_writer :offset - - sig do - params(count: T::Boolean, offset: T::Boolean).returns( - T.attached_class - ) - end - def self.new(count: nil, offset: nil) - end - - sig do - override.returns({ count: T::Boolean, offset: T::Boolean }) - end - def to_hash - end - end - end - - class Employment < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :class_code - - sig { params(class_code: T::Boolean).void } - attr_writer :class_code - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :custom_fields - - sig { params(custom_fields: T::Boolean).void } - attr_writer :custom_fields - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department - ) - ) - end - attr_reader :department - - sig do - params( - department: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department::OrHash - ).void - end - attr_writer :department - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment - ) - ) - end - attr_reader :employment - - sig do - params( - employment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment::OrHash - ).void - end - attr_writer :employment - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :employment_status - - sig { params(employment_status: T::Boolean).void } - attr_writer :employment_status - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :end_date - - sig { params(end_date: T::Boolean).void } - attr_writer :end_date - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :first_name - - sig { params(first_name: T::Boolean).void } - attr_writer :first_name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income - ) - ) - end - attr_reader :income - - sig do - params( - income: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income::OrHash - ).void - end - attr_writer :income - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :income_history - - sig { params(income_history: T::Boolean).void } - attr_writer :income_history - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :is_active - - sig { params(is_active: T::Boolean).void } - attr_writer :is_active - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :last_name - - sig { params(last_name: T::Boolean).void } - attr_writer :last_name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location - ) - ) - end - attr_reader :location - - sig do - params( - location: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location::OrHash - ).void - end - attr_writer :location - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager - ) - ) - end - attr_reader :manager - - sig do - params( - manager: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager::OrHash - ).void - end - attr_writer :manager - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :middle_name - - sig { params(middle_name: T::Boolean).void } - attr_writer :middle_name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :start_date - - sig { params(start_date: T::Boolean).void } - attr_writer :start_date - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :title - - sig { params(title: T::Boolean).void } - attr_writer :title - - sig do - params( - id: T::Boolean, - class_code: T::Boolean, - custom_fields: T::Boolean, - department: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department::OrHash, - employment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment::OrHash, - employment_status: T::Boolean, - end_date: T::Boolean, - first_name: T::Boolean, - income: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income::OrHash, - income_history: T::Boolean, - is_active: T::Boolean, - last_name: T::Boolean, - location: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location::OrHash, - manager: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager::OrHash, - middle_name: T::Boolean, - start_date: T::Boolean, - title: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id: nil, - class_code: nil, - custom_fields: nil, - department: nil, - employment: nil, - employment_status: nil, - end_date: nil, - first_name: nil, - income: nil, - income_history: nil, - is_active: nil, - last_name: nil, - location: nil, - manager: nil, - middle_name: nil, - start_date: nil, - title: nil - ) - end - - sig do - override.returns( - { - id: T::Boolean, - class_code: T::Boolean, - custom_fields: T::Boolean, - department: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department, - employment: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, - employment_status: T::Boolean, - end_date: T::Boolean, - first_name: T::Boolean, - income: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income, - income_history: T::Boolean, - is_active: T::Boolean, - last_name: T::Boolean, - location: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location, - manager: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, - middle_name: T::Boolean, - start_date: T::Boolean, - title: T::Boolean - } - ) - end - def to_hash - end - - class Department < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig { params(name: T::Boolean).returns(T.attached_class) } - def self.new(name: nil) - end - - sig { override.returns({ name: T::Boolean }) } - def to_hash - end - end - - class Employment < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :subtype - - sig { params(subtype: T::Boolean).void } - attr_writer :subtype - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params(subtype: T::Boolean, type: T::Boolean).returns( - T.attached_class - ) - end - def self.new(subtype: nil, type: nil) - end - - sig do - override.returns({ subtype: T::Boolean, type: T::Boolean }) - end - def to_hash - end - end - - class Income < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :amount - - sig { params(amount: T::Boolean).void } - attr_writer :amount - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :currency - - sig { params(currency: T::Boolean).void } - attr_writer :currency - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :unit - - sig { params(unit: T::Boolean).void } - attr_writer :unit - - sig do - params( - amount: T::Boolean, - currency: T::Boolean, - unit: T::Boolean - ).returns(T.attached_class) - end - def self.new(amount: nil, currency: nil, unit: nil) - end - - sig do - override.returns( - { amount: T::Boolean, currency: T::Boolean, unit: T::Boolean } - ) - end - def to_hash - end - end - - class Location < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :city - - sig { params(city: T::Boolean).void } - attr_writer :city - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :country - - sig { params(country: T::Boolean).void } - attr_writer :country - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :line1 - - sig { params(line1: T::Boolean).void } - attr_writer :line1 - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :line2 - - sig { params(line2: T::Boolean).void } - attr_writer :line2 - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :postal_code - - sig { params(postal_code: T::Boolean).void } - attr_writer :postal_code - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :state - - sig { params(state: T::Boolean).void } - attr_writer :state - - sig do - params( - city: T::Boolean, - country: T::Boolean, - line1: T::Boolean, - line2: T::Boolean, - postal_code: T::Boolean, - state: T::Boolean - ).returns(T.attached_class) - end - def self.new( - city: nil, - country: nil, - line1: nil, - line2: nil, - postal_code: nil, - state: nil - ) - end - - sig do - override.returns( - { - city: T::Boolean, - country: T::Boolean, - line1: T::Boolean, - line2: T::Boolean, - postal_code: T::Boolean, - state: T::Boolean - } - ) - end - def to_hash - end - end - - class Manager < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { params(id: T::Boolean).returns(T.attached_class) } - def self.new(id: nil) - end - - sig { override.returns({ id: T::Boolean }) } - def to_hash - end - end - end - - class Individual < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :dob - - sig { params(dob: T::Boolean).void } - attr_writer :dob - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails - ) - ) - end - attr_reader :emails - - sig do - params( - emails: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails::OrHash - ).void - end - attr_writer :emails - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :encrypted_ssn - - sig { params(encrypted_ssn: T::Boolean).void } - attr_writer :encrypted_ssn - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :ethnicity - - sig { params(ethnicity: T::Boolean).void } - attr_writer :ethnicity - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :first_name - - sig { params(first_name: T::Boolean).void } - attr_writer :first_name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :gender - - sig { params(gender: T::Boolean).void } - attr_writer :gender - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :last_name - - sig { params(last_name: T::Boolean).void } - attr_writer :last_name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :middle_name - - sig { params(middle_name: T::Boolean).void } - attr_writer :middle_name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers - ) - ) - end - attr_reader :phone_numbers - - sig do - params( - phone_numbers: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers::OrHash - ).void - end - attr_writer :phone_numbers - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :preferred_name - - sig { params(preferred_name: T::Boolean).void } - attr_writer :preferred_name - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence - ) - ) - end - attr_reader :residence - - sig do - params( - residence: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence::OrHash - ).void - end - attr_writer :residence - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :ssn - - sig { params(ssn: T::Boolean).void } - attr_writer :ssn - - sig do - params( - id: T::Boolean, - dob: T::Boolean, - emails: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails::OrHash, - encrypted_ssn: T::Boolean, - ethnicity: T::Boolean, - first_name: T::Boolean, - gender: T::Boolean, - last_name: T::Boolean, - middle_name: T::Boolean, - phone_numbers: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers::OrHash, - preferred_name: T::Boolean, - residence: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence::OrHash, - ssn: T::Boolean - ).returns(T.attached_class) - end - def self.new( - 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 - ) - end - - sig do - override.returns( - { - id: T::Boolean, - dob: T::Boolean, - emails: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, - encrypted_ssn: T::Boolean, - ethnicity: T::Boolean, - first_name: T::Boolean, - gender: T::Boolean, - last_name: T::Boolean, - middle_name: T::Boolean, - phone_numbers: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, - preferred_name: T::Boolean, - residence: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, - ssn: T::Boolean - } - ) - end - def to_hash - end - - class Emails < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :data - - sig { params(data: T::Boolean).void } - attr_writer :data - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params(data: T::Boolean, type: T::Boolean).returns( - T.attached_class - ) - end - def self.new(data: nil, type: nil) - end - - sig { override.returns({ data: T::Boolean, type: T::Boolean }) } - def to_hash - end - end - - class PhoneNumbers < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :data - - sig { params(data: T::Boolean).void } - attr_writer :data - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params(data: T::Boolean, type: T::Boolean).returns( - T.attached_class - ) - end - def self.new(data: nil, type: nil) - end - - sig { override.returns({ data: T::Boolean, type: T::Boolean }) } - def to_hash - end - end - - class Residence < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :city - - sig { params(city: T::Boolean).void } - attr_writer :city - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :country - - sig { params(country: T::Boolean).void } - attr_writer :country - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :line1 - - sig { params(line1: T::Boolean).void } - attr_writer :line1 - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :line2 - - sig { params(line2: T::Boolean).void } - attr_writer :line2 - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :postal_code - - sig { params(postal_code: T::Boolean).void } - attr_writer :postal_code - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :state - - sig { params(state: T::Boolean).void } - attr_writer :state - - sig do - params( - city: T::Boolean, - country: T::Boolean, - line1: T::Boolean, - line2: T::Boolean, - postal_code: T::Boolean, - state: T::Boolean - ).returns(T.attached_class) - end - def self.new( - city: nil, - country: nil, - line1: nil, - line2: nil, - postal_code: nil, - state: nil - ) - end - - sig do - override.returns( - { - city: T::Boolean, - country: T::Boolean, - line1: T::Boolean, - line2: T::Boolean, - postal_code: T::Boolean, - state: T::Boolean - } - ) - end - def to_hash - end - end - end - - class PayGroup < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :individual_ids - - sig { params(individual_ids: T::Boolean).void } - attr_writer :individual_ids - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :pay_frequencies - - sig { params(pay_frequencies: T::Boolean).void } - attr_writer :pay_frequencies - - sig do - params( - id: T::Boolean, - individual_ids: T::Boolean, - name: T::Boolean, - pay_frequencies: T::Boolean - ).returns(T.attached_class) - end - def self.new( - id: nil, - individual_ids: nil, - name: nil, - pay_frequencies: nil - ) - end - - sig do - override.returns( - { - id: T::Boolean, - individual_ids: T::Boolean, - name: T::Boolean, - pay_frequencies: T::Boolean - } - ) - end - def to_hash - end - end - - class PayStatement < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging - ) - ) - end - attr_reader :paging - - sig do - params( - paging: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging::OrHash - ).void - end - attr_writer :paging - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - ) - ) - end - attr_reader :pay_statements - - sig do - params( - pay_statements: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::OrHash - ).void - end - attr_writer :pay_statements - - sig do - params( - paging: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging::OrHash, - pay_statements: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::OrHash - ).returns(T.attached_class) - end - def self.new(paging: nil, pay_statements: nil) - end - - sig do - override.returns( - { - paging: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, - pay_statements: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - } - ) - end - def to_hash - end - - class Paging < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T::Boolean) } - attr_accessor :count - - sig { returns(T::Boolean) } - attr_accessor :offset - - sig do - params(count: T::Boolean, offset: T::Boolean).returns( - T.attached_class - ) - end - def self.new(count:, offset:) - end - - sig do - override.returns({ count: T::Boolean, offset: T::Boolean }) - end - def to_hash - end - end - - class PayStatements < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, - FinchAPI::Internal::AnyHash - ) - end - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings - ) - ) - end - attr_reader :earnings - - sig do - params( - earnings: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings::OrHash - ).void - end - attr_writer :earnings - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions - ) - ) - end - attr_reader :employee_deductions - - sig do - params( - employee_deductions: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions::OrHash - ).void - end - attr_writer :employee_deductions - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions - ) - ) - end - attr_reader :employer_contributions - - sig do - params( - employer_contributions: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions::OrHash - ).void - end - attr_writer :employer_contributions - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :gross_pay - - sig { params(gross_pay: T::Boolean).void } - attr_writer :gross_pay - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :individual_id - - sig { params(individual_id: T::Boolean).void } - attr_writer :individual_id - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :net_pay - - sig { params(net_pay: T::Boolean).void } - attr_writer :net_pay - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :payment_method - - sig { params(payment_method: T::Boolean).void } - attr_writer :payment_method - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes - ) - ) - end - attr_reader :taxes - - sig do - params( - taxes: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes::OrHash - ).void - end - attr_writer :taxes - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :total_hours - - sig { params(total_hours: T::Boolean).void } - attr_writer :total_hours - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params( - earnings: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings::OrHash, - employee_deductions: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions::OrHash, - employer_contributions: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions::OrHash, - gross_pay: T::Boolean, - individual_id: T::Boolean, - net_pay: T::Boolean, - payment_method: T::Boolean, - taxes: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes::OrHash, - total_hours: T::Boolean, - type: T::Boolean - ).returns(T.attached_class) - end - def self.new( - 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 - ) - end - - sig do - override.returns( - { - 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: T::Boolean, - individual_id: T::Boolean, - net_pay: T::Boolean, - payment_method: T::Boolean, - taxes: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, - total_hours: T::Boolean, - type: T::Boolean - } - ) - end - def to_hash - end - - class Earnings < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :amount - - sig { params(amount: T::Boolean).void } - attr_writer :amount - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :currency - - sig { params(currency: T::Boolean).void } - attr_writer :currency - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params( - amount: T::Boolean, - currency: T::Boolean, - name: T::Boolean, - type: T::Boolean - ).returns(T.attached_class) - end - def self.new(amount: nil, currency: nil, name: nil, type: nil) - end - - sig do - override.returns( - { - amount: T::Boolean, - currency: T::Boolean, - name: T::Boolean, - type: T::Boolean - } - ) - end - def to_hash - end - end - - class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :amount - - sig { params(amount: T::Boolean).void } - attr_writer :amount - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :currency - - sig { params(currency: T::Boolean).void } - attr_writer :currency - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).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 { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params( - amount: T::Boolean, - currency: T::Boolean, - name: T::Boolean, - pre_tax: T::Boolean, - type: T::Boolean - ).returns(T.attached_class) - end - def self.new( - amount: nil, - currency: nil, - name: nil, - pre_tax: nil, - type: nil - ) - end - - sig do - override.returns( - { - amount: T::Boolean, - currency: T::Boolean, - name: T::Boolean, - pre_tax: T::Boolean, - type: T::Boolean - } - ) - end - def to_hash - end - end - - class EmployerContributions < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :amount - - sig { params(amount: T::Boolean).void } - attr_writer :amount - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :currency - - sig { params(currency: T::Boolean).void } - attr_writer :currency - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig do - params( - amount: T::Boolean, - currency: T::Boolean, - name: T::Boolean - ).returns(T.attached_class) - end - def self.new(amount: nil, currency: nil, name: nil) - end - - sig do - override.returns( - { - amount: T::Boolean, - currency: T::Boolean, - name: T::Boolean - } - ) - end - def to_hash - end - end - - class Taxes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :amount - - sig { params(amount: T::Boolean).void } - attr_writer :amount - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :currency - - sig { params(currency: T::Boolean).void } - attr_writer :currency - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :employer - - sig { params(employer: T::Boolean).void } - attr_writer :employer - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :name - - sig { params(name: T::Boolean).void } - attr_writer :name - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :type - - sig { params(type: T::Boolean).void } - attr_writer :type - - sig do - params( - amount: T::Boolean, - currency: T::Boolean, - employer: T::Boolean, - name: T::Boolean, - type: T::Boolean - ).returns(T.attached_class) - end - def self.new( - amount: nil, - currency: nil, - employer: nil, - name: nil, - type: nil - ) - end - - sig do - override.returns( - { - amount: T::Boolean, - currency: T::Boolean, - employer: T::Boolean, - name: T::Boolean, - type: T::Boolean - } - ) - end - def to_hash - end - end - end - end - - class Payment < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :id - - sig { params(id: T::Boolean).void } - attr_writer :id - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :company_debit - - sig { params(company_debit: T::Boolean).void } - attr_writer :company_debit - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :debit_date - - sig { params(debit_date: T::Boolean).void } - attr_writer :debit_date - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :employee_taxes - - sig { params(employee_taxes: T::Boolean).void } - attr_writer :employee_taxes - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :employer_taxes - - sig { params(employer_taxes: T::Boolean).void } - attr_writer :employer_taxes - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :gross_pay - - sig { params(gross_pay: T::Boolean).void } - attr_writer :gross_pay - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :individual_ids - - sig { params(individual_ids: T::Boolean).void } - attr_writer :individual_ids - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :net_pay - - sig { params(net_pay: T::Boolean).void } - attr_writer :net_pay - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :pay_date - - sig { params(pay_date: T::Boolean).void } - attr_writer :pay_date - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :pay_frequencies - - sig { params(pay_frequencies: T::Boolean).void } - attr_writer :pay_frequencies - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :pay_group_ids - - sig { params(pay_group_ids: T::Boolean).void } - attr_writer :pay_group_ids - - sig do - returns( - T.nilable( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod - ) - ) - end - attr_reader :pay_period - - sig do - params( - pay_period: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod::OrHash - ).void - end - attr_writer :pay_period - - sig do - params( - id: T::Boolean, - company_debit: T::Boolean, - debit_date: T::Boolean, - employee_taxes: T::Boolean, - employer_taxes: T::Boolean, - gross_pay: T::Boolean, - individual_ids: T::Boolean, - net_pay: T::Boolean, - pay_date: T::Boolean, - pay_frequencies: T::Boolean, - pay_group_ids: T::Boolean, - pay_period: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod::OrHash - ).returns(T.attached_class) - end - def self.new( - 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 - ) - end - - sig do - override.returns( - { - id: T::Boolean, - company_debit: T::Boolean, - debit_date: T::Boolean, - employee_taxes: T::Boolean, - employer_taxes: T::Boolean, - gross_pay: T::Boolean, - individual_ids: T::Boolean, - net_pay: T::Boolean, - pay_date: T::Boolean, - pay_frequencies: T::Boolean, - pay_group_ids: T::Boolean, - pay_period: - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod - } - ) - end - def to_hash - end - - class PayPeriod < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :end_date - - sig { params(end_date: T::Boolean).void } - attr_writer :end_date - - sig { returns(T.nilable(T::Boolean)) } - attr_reader :start_date - - sig { params(start_date: T::Boolean).void } - attr_writer :start_date - - sig do - params(end_date: T::Boolean, start_date: T::Boolean).returns( - T.attached_class - ) - end - def self.new(end_date: nil, start_date: nil) - end - - sig do - override.returns( - { end_date: T::Boolean, start_date: T::Boolean } - ) - end - def to_hash - end - end - end - end - - # The type of authentication method. - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, FinchAPI::Provider::AuthenticationMethod::Type) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ASSISTED = + API = T.let( - :assisted, - FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol - ) - CREDENTIAL = - T.let( - :credential, - FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol - ) - API_TOKEN = - T.let( - :api_token, - FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol - ) - API_CREDENTIAL = - T.let( - :api_credential, - FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol - ) - OAUTH = - T.let( - :oauth, + :api, FinchAPI::Provider::AuthenticationMethod::Type::TaggedSymbol ) diff --git a/rbi/finch_api/models/provider_list_response.rbi b/rbi/finch_api/models/provider_list_response.rbi new file mode 100644 index 00000000..a22b37f5 --- /dev/null +++ b/rbi/finch_api/models/provider_list_response.rbi @@ -0,0 +1,280 @@ +# typed: strong + +module FinchAPI + module Models + class ProviderListResponse < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::ProviderListResponse, + FinchAPI::Internal::AnyHash + ) + end + + # The id of the payroll provider used in Connect. + sig { returns(String) } + attr_accessor :id + + # The display name of the payroll provider. + sig { returns(String) } + attr_accessor :display_name + + # The list of Finch products supported on this payroll provider. + sig { returns(T::Array[String]) } + attr_accessor :products + + # The authentication methods supported by the provider. + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Models::ProviderListResponse::AuthenticationMethod + ] + ) + ) + end + attr_reader :authentication_methods + + sig do + params( + authentication_methods: + T::Array[ + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::OrHash + ] + ).void + end + attr_writer :authentication_methods + + # `true` if the integration is in a beta state, `false` otherwise + sig { returns(T.nilable(T::Boolean)) } + attr_reader :beta + + sig { params(beta: T::Boolean).void } + attr_writer :beta + + # The url to the official icon of the payroll provider. + sig { returns(T.nilable(String)) } + attr_reader :icon + + sig { params(icon: String).void } + attr_writer :icon + + # The url to the official logo of the payroll provider. + sig { returns(T.nilable(String)) } + attr_reader :logo + + sig { params(logo: String).void } + attr_writer :logo + + # [DEPRECATED] Whether the Finch integration with this provider uses the Assisted + # Connect Flow by default. This field is now deprecated. Please check for a `type` + # of `assisted` in the `authentication_methods` field instead. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :manual + + sig { params(manual: T::Boolean).void } + attr_writer :manual + + # whether MFA is required for the provider. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :mfa_required + + sig { params(mfa_required: T::Boolean).void } + attr_writer :mfa_required + + # The hex code for the primary color of the payroll provider. + sig { returns(T.nilable(String)) } + attr_reader :primary_color + + sig { params(primary_color: String).void } + attr_writer :primary_color + + sig do + params( + id: String, + display_name: String, + products: T::Array[String], + authentication_methods: + T::Array[ + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::OrHash + ], + beta: T::Boolean, + icon: String, + logo: String, + manual: T::Boolean, + mfa_required: T::Boolean, + primary_color: String + ).returns(T.attached_class) + end + def self.new( + # The id of the payroll provider used in Connect. + id:, + # The display name of the payroll provider. + display_name:, + # The list of Finch products supported on this payroll provider. + products:, + # The authentication methods supported by the provider. + authentication_methods: nil, + # `true` if the integration is in a beta state, `false` otherwise + beta: nil, + # The url to the official icon of the payroll provider. + icon: nil, + # The url to the official logo of the payroll provider. + logo: nil, + # [DEPRECATED] Whether the Finch integration with this provider uses the Assisted + # Connect Flow by default. This field is now deprecated. Please check for a `type` + # of `assisted` in the `authentication_methods` field instead. + manual: nil, + # whether MFA is required for the provider. + mfa_required: nil, + # The hex code for the primary color of the payroll provider. + primary_color: nil + ) + end + + sig do + override.returns( + { + id: String, + display_name: String, + products: T::Array[String], + authentication_methods: + T::Array[ + FinchAPI::Models::ProviderListResponse::AuthenticationMethod + ], + beta: T::Boolean, + icon: String, + logo: String, + manual: T::Boolean, + mfa_required: T::Boolean, + primary_color: String + } + ) + end + def to_hash + end + + class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::ProviderListResponse::AuthenticationMethod, + FinchAPI::Internal::AnyHash + ) + end + + # The type of authentication method + sig do + returns( + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + end + attr_accessor :type + + # The supported benefit types and their configurations + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + attr_reader :benefits_support + + sig do + params(benefits_support: T::Hash[Symbol, T.nilable(T.anything)]).void + end + attr_writer :benefits_support + + # The supported fields for each Finch product + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + attr_reader :supported_fields + + sig do + params(supported_fields: T::Hash[Symbol, T.nilable(T.anything)]).void + end + attr_writer :supported_fields + + sig do + params( + type: + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::OrSymbol, + benefits_support: T::Hash[Symbol, T.nilable(T.anything)], + supported_fields: T::Hash[Symbol, T.nilable(T.anything)] + ).returns(T.attached_class) + end + def self.new( + # The type of authentication method + type:, + # The supported benefit types and their configurations + benefits_support: nil, + # The supported fields for each Finch product + supported_fields: nil + ) + end + + sig do + override.returns( + { + type: + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol, + benefits_support: T::Hash[Symbol, T.nilable(T.anything)], + supported_fields: T::Hash[Symbol, T.nilable(T.anything)] + } + ) + end + def to_hash + end + + # The type of authentication method + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ASSISTED = + T.let( + :assisted, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + CREDENTIAL = + T.let( + :credential, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + API_TOKEN = + T.let( + :api_token, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + API_CREDENTIAL = + T.let( + :api_credential, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + OAUTH = + T.let( + :oauth, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + API = + T.let( + :api, + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/finch_api/models/request_forwarding_forward_params.rbi b/rbi/finch_api/models/request_forwarding_forward_params.rbi index 077e7160..cf34b0a8 100644 --- a/rbi/finch_api/models/request_forwarding_forward_params.rbi +++ b/rbi/finch_api/models/request_forwarding_forward_params.rbi @@ -33,12 +33,12 @@ module FinchAPI # The HTTP headers to include on the forwarded request. This value must be # specified as an object of key-value pairs. Example: # `{"Content-Type": "application/xml", "X-API-Version": "v1" }` - sig { returns(T.nilable(T.anything)) } + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } attr_accessor :headers # The query parameters for the forwarded request. This value must be specified as # a valid JSON object rather than a query string. - sig { returns(T.nilable(T.anything)) } + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } attr_accessor :params sig do @@ -46,8 +46,8 @@ module FinchAPI method_: String, route: String, data: T.nilable(String), - headers: T.nilable(T.anything), - params: T.nilable(T.anything), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end @@ -79,8 +79,8 @@ module FinchAPI method_: String, route: String, data: T.nilable(String), - headers: T.nilable(T.anything), - params: T.nilable(T.anything), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), request_options: FinchAPI::RequestOptions } ) diff --git a/rbi/finch_api/models/request_forwarding_forward_response.rbi b/rbi/finch_api/models/request_forwarding_forward_response.rbi index fea3bfbd..899f889b 100644 --- a/rbi/finch_api/models/request_forwarding_forward_response.rbi +++ b/rbi/finch_api/models/request_forwarding_forward_response.rbi @@ -11,17 +11,6 @@ module FinchAPI ) end - # A string representation of the HTTP response body of the forwarded request's - # response received from the underlying integration's API. This field may be null - # in the case where the upstream system's response is empty. - sig { returns(T.nilable(String)) } - attr_accessor :data - - # The HTTP headers of the forwarded request's response, exactly as received from - # the underlying integration's API. - sig { returns(T.nilable(T.anything)) } - attr_accessor :headers - # An object containing details of your original forwarded request, for your ease # of reference. sig do @@ -42,40 +31,51 @@ module FinchAPI sig { returns(Integer) } attr_accessor :status_code + # A string representation of the HTTP response body of the forwarded request's + # response received from the underlying integration's API. This field may be null + # in the case where the upstream system's response is empty. + sig { returns(T.nilable(String)) } + attr_accessor :data + + # The HTTP headers of the forwarded request's response, exactly as received from + # the underlying integration's API. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + attr_accessor :headers + sig do params( - data: T.nilable(String), - headers: T.nilable(T.anything), request: FinchAPI::Models::RequestForwardingForwardResponse::Request::OrHash, - status_code: Integer + status_code: Integer, + data: T.nilable(String), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]) ).returns(T.attached_class) end def self.new( - # A string representation of the HTTP response body of the forwarded request's - # response received from the underlying integration's API. This field may be null - # in the case where the upstream system's response is empty. - data:, - # The HTTP headers of the forwarded request's response, exactly as received from - # the underlying integration's API. - headers:, # An object containing details of your original forwarded request, for your ease # of reference. request:, # The HTTP status code of the forwarded request's response, exactly received from # the underlying integration's API. This value will be returned as an integer. - status_code: + status_code:, + # A string representation of the HTTP response body of the forwarded request's + # response received from the underlying integration's API. This field may be null + # in the case where the upstream system's response is empty. + data: nil, + # The HTTP headers of the forwarded request's response, exactly as received from + # the underlying integration's API. + headers: nil ) end sig do override.returns( { - data: T.nilable(String), - headers: T.nilable(T.anything), request: FinchAPI::Models::RequestForwardingForwardResponse::Request, - status_code: Integer + status_code: Integer, + data: T.nilable(String), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]) } ) end @@ -91,74 +91,107 @@ module FinchAPI ) end - # The body that was specified for the forwarded request. If a value was not - # specified in the original request, this value will be returned as null ; - # otherwise, this value will always be returned as a string. - sig { returns(T.nilable(String)) } - attr_accessor :data - - # The specified HTTP headers that were included in the forwarded request. If no - # headers were specified, this will be returned as `null`. - sig { returns(T.nilable(T.anything)) } - attr_accessor :headers - # The HTTP method that was specified for the forwarded request. Valid values # include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`. sig { returns(String) } attr_accessor :method_ - # The query parameters that were included in the forwarded request. If no query - # parameters were specified, this will be returned as `null`. - sig { returns(T.nilable(T.anything)) } - attr_accessor :params - # The URL route path that was specified for the forwarded request. sig { returns(String) } attr_accessor :route + # The body that was specified for the forwarded request. + sig do + returns( + T.nilable( + FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::Variants + ) + ) + end + attr_accessor :data + + # The HTTP headers that were specified for the forwarded request. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + attr_accessor :headers + + # The query parameters that were specified for the forwarded request. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + attr_accessor :params + # An object containing details of your original forwarded request, for your ease # of reference. sig do params( - data: T.nilable(String), - headers: T.nilable(T.anything), method_: String, - params: T.nilable(T.anything), - route: String + route: String, + data: + T.nilable( + FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::Variants + ), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]) ).returns(T.attached_class) end def self.new( - # The body that was specified for the forwarded request. If a value was not - # specified in the original request, this value will be returned as null ; - # otherwise, this value will always be returned as a string. - data:, - # The specified HTTP headers that were included in the forwarded request. If no - # headers were specified, this will be returned as `null`. - headers:, # The HTTP method that was specified for the forwarded request. Valid values # include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`. method_:, - # The query parameters that were included in the forwarded request. If no query - # parameters were specified, this will be returned as `null`. - params:, # The URL route path that was specified for the forwarded request. - route: + route:, + # The body that was specified for the forwarded request. + data: nil, + # The HTTP headers that were specified for the forwarded request. + headers: nil, + # The query parameters that were specified for the forwarded request. + params: nil ) end sig do override.returns( { - data: T.nilable(String), - headers: T.nilable(T.anything), method_: String, - params: T.nilable(T.anything), - route: String + route: String, + data: + T.nilable( + FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::Variants + ), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]) } ) end def to_hash end + + # The body that was specified for the forwarded request. + module Data + extend FinchAPI::Internal::Type::Union + + Variants = + T.type_alias do + T.any(String, T::Hash[Symbol, T.nilable(T.anything)]) + end + + sig do + override.returns( + T::Array[ + FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::Variants + ] + ) + end + def self.variants + end + + UnionMember1Map = + T.let( + FinchAPI::Internal::Type::HashOf[ + FinchAPI::Internal::Type::Unknown, + nil?: true + ], + FinchAPI::Internal::Type::Converter + ) + end end end end diff --git a/rbi/finch_api/resources/connect/sessions.rbi b/rbi/finch_api/resources/connect/sessions.rbi index ac062dac..bd60287f 100644 --- a/rbi/finch_api/resources/connect/sessions.rbi +++ b/rbi/finch_api/resources/connect/sessions.rbi @@ -7,17 +7,17 @@ module FinchAPI # Create a new connect session for an employer sig do params( + customer_email: T.nilable(String), customer_id: String, customer_name: String, - products: - T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol], - customer_email: T.nilable(String), integration: T.nilable( FinchAPI::Connect::SessionNewParams::Integration::OrHash ), manual: T.nilable(T::Boolean), minutes_to_expire: T.nilable(Float), + products: + T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol], redirect_uri: T.nilable(String), sandbox: T.nilable(FinchAPI::Connect::SessionNewParams::Sandbox::OrSymbol), @@ -25,17 +25,25 @@ module FinchAPI ).returns(FinchAPI::Models::Connect::SessionNewResponse) end def new( + # Email address of the customer + customer_email:, + # Unique identifier for the customer customer_id:, + # Name of the customer customer_name:, - products:, - customer_email: nil, - integration: nil, - manual: nil, + # Integration configuration for the connect session + integration:, + # Enable manual authentication mode + manual:, # 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, + minutes_to_expire:, + # The Finch products to request access to + products:, + # The URI to redirect to after the Connect flow is completed + redirect_uri:, + # Sandbox mode for testing + sandbox:, request_options: {} ) end @@ -44,7 +52,7 @@ module FinchAPI sig do params( connection_id: String, - minutes_to_expire: T.nilable(Integer), + minutes_to_expire: Integer, products: T.nilable( T::Array[ @@ -60,11 +68,11 @@ module FinchAPI connection_id:, # The number of minutes until the session expires (defaults to 43,200, which is 30 # days) - minutes_to_expire: nil, + minutes_to_expire:, # The products to request access to (optional for reauthentication) - products: nil, + products:, # The URI to redirect to after the Connect flow is completed - redirect_uri: nil, + redirect_uri:, request_options: {} ) end diff --git a/rbi/finch_api/resources/hris/benefits.rbi b/rbi/finch_api/resources/hris/benefits.rbi index 4562c58a..e1ae9ef5 100644 --- a/rbi/finch_api/resources/hris/benefits.rbi +++ b/rbi/finch_api/resources/hris/benefits.rbi @@ -11,6 +11,7 @@ module FinchAPI # `/providers` endpoint to view available types for each provider. sig do params( + entity_ids: T::Array[String], company_contribution: T.nilable( FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::OrHash @@ -22,15 +23,17 @@ module FinchAPI ).returns(FinchAPI::HRIS::CreateCompanyBenefitsResponse) end def create( - # The company match for this benefit. + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Body param: The company match for this benefit. company_contribution: nil, - # Name of the benefit as it appears in the provider and pay statements. Recommend - # limiting this to <30 characters due to limitations in specific providers (e.g. - # Justworks). + # Body param: Name of the benefit as it appears in the provider and pay + # statements. Recommend limiting this to <30 characters due to limitations in + # specific providers (e.g. Justworks). description: nil, - # The frequency of the benefit deduction/contribution. + # Body param: The frequency of the benefit deduction/contribution. frequency: nil, - # Type of benefit. + # Body param: Type of benefit. type: nil, request_options: {} ) @@ -40,23 +43,33 @@ module FinchAPI sig do params( benefit_id: String, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::HRIS::CompanyBenefit) end - def retrieve(benefit_id, request_options: {}) + def retrieve( + benefit_id, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end # Updates an existing company-wide deduction or contribution sig do params( benefit_id: String, + entity_ids: T::Array[String], description: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::HRIS::UpdateCompanyBenefitResponse) end def update( + # Path param: benefit_id, - # Updated name or description. + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Body param: Updated name or description. description: nil, request_options: {} ) @@ -64,20 +77,34 @@ module FinchAPI # List all company-wide deductions and contributions. sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns( FinchAPI::Internal::SinglePage[FinchAPI::HRIS::CompanyBenefit] ) end - def list(request_options: {}) + def list( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end # Get deductions metadata sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns( FinchAPI::Internal::SinglePage[FinchAPI::HRIS::SupportedBenefit] ) end - def list_supported_benefits(request_options: {}) + def list_supported_benefits( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end # @api private diff --git a/rbi/finch_api/resources/hris/benefits/individuals.rbi b/rbi/finch_api/resources/hris/benefits/individuals.rbi index 57de0568..f2aa7794 100644 --- a/rbi/finch_api/resources/hris/benefits/individuals.rbi +++ b/rbi/finch_api/resources/hris/benefits/individuals.rbi @@ -12,6 +12,7 @@ module FinchAPI sig do params( benefit_id: String, + entity_ids: T::Array[String], individuals: T::Array[ FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::OrHash @@ -22,8 +23,11 @@ module FinchAPI ) end def enroll_many( + # Path param: benefit_id, - # Array of the individual_id to enroll and a configuration object. + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Body param: Array of the individual_id to enroll and a configuration object. individuals: nil, request_options: {} ) @@ -33,18 +37,25 @@ module FinchAPI sig do params( benefit_id: String, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns( FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse ) end - def enrolled_ids(benefit_id, request_options: {}) + def enrolled_ids( + benefit_id, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end # Get enrollment information for the given individuals. sig do params( benefit_id: String, + entity_ids: T::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions::OrHash ).returns( @@ -55,6 +66,8 @@ module FinchAPI end def retrieve_many_benefits( benefit_id, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals individual_ids: nil, @@ -66,6 +79,7 @@ module FinchAPI sig do params( benefit_id: String, + entity_ids: T::Array[String], individual_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns( @@ -73,8 +87,11 @@ module FinchAPI ) end def unenroll_many( + # Path param: benefit_id, - # Array of individual_ids to unenroll. + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Body param: Array of individual_ids to unenroll. individual_ids: nil, request_options: {} ) diff --git a/rbi/finch_api/resources/hris/company.rbi b/rbi/finch_api/resources/hris/company.rbi index e6c65b13..3ea7ecad 100644 --- a/rbi/finch_api/resources/hris/company.rbi +++ b/rbi/finch_api/resources/hris/company.rbi @@ -9,11 +9,16 @@ module FinchAPI # Read basic company data sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - FinchAPI::HRIS::HRISCompany - ) + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(FinchAPI::HRIS::HRISCompany) end - def retrieve(request_options: {}) + def retrieve( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end # @api private diff --git a/rbi/finch_api/resources/hris/company/pay_statement_item.rbi b/rbi/finch_api/resources/hris/company/pay_statement_item.rbi index 5ef7fece..f323ea70 100644 --- a/rbi/finch_api/resources/hris/company/pay_statement_item.rbi +++ b/rbi/finch_api/resources/hris/company/pay_statement_item.rbi @@ -20,6 +20,7 @@ module FinchAPI FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol ], end_date: Date, + entity_ids: T::Array[String], name: String, start_date: Date, type: String, @@ -37,6 +38,8 @@ module FinchAPI # The end date to retrieve pay statement items by via their last seen pay date in # `YYYY-MM-DD` format. end_date: nil, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Case-insensitive partial match search by pay statement item name. name: nil, # The start date to retrieve pay statement items by via their last seen pay date diff --git a/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi b/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi index f6b35e79..650ca9ca 100644 --- a/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi +++ b/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi @@ -14,6 +14,7 @@ module FinchAPI # information is available. sig do params( + entity_ids: T::Array[String], attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes::OrHash, conditions: @@ -30,14 +31,18 @@ module FinchAPI ) end def create( - # Specifies the fields to be applied when the condition is met. + # Query param: The entity IDs to create the rule for. + entity_ids: nil, + # Body param: Specifies the fields to be applied when the condition is met. attributes: nil, + # Body param: conditions: nil, - # Specifies when the rules should stop applying rules based on the date. + # Body param: Specifies when the rules should stop applying rules based on the + # date. effective_end_date: nil, - # Specifies when the rule should begin applying based on the date. + # Body param: Specifies when the rule should begin applying based on the date. effective_start_date: nil, - # The entity type to which the rule is applied. + # Body param: The entity type to which the rule is applied. entity_type: nil, request_options: {} ) @@ -48,25 +53,41 @@ module FinchAPI sig do params( rule_id: String, + entity_ids: T::Array[String], optional_property: T.anything, request_options: FinchAPI::RequestOptions::OrHash ).returns( FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse ) end - def update(rule_id, optional_property: nil, request_options: {}) + def update( + # Path param: + rule_id, + # Query param: The entity IDs to update the rule for. + entity_ids: nil, + # Body param: + optional_property: nil, + request_options: {} + ) end # **Beta:** this endpoint currently serves employers onboarded after March 4th and # historical support will be added soon List all rules of a connection account. sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns( FinchAPI::Internal::ResponsesPage[ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse ] ) end - def list(request_options: {}) + def list( + # The entity IDs to retrieve rules for. + entity_ids: nil, + request_options: {} + ) end # **Beta:** this endpoint currently serves employers onboarded after March 4th and @@ -74,12 +95,18 @@ module FinchAPI sig do params( rule_id: String, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns( FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse ) end - def delete(rule_id, request_options: {}) + def delete( + rule_id, + # The entity IDs to delete the rule for. + entity_ids: nil, + request_options: {} + ) end # @api private diff --git a/rbi/finch_api/resources/hris/directory.rbi b/rbi/finch_api/resources/hris/directory.rbi index f795b9b5..cfca5e62 100644 --- a/rbi/finch_api/resources/hris/directory.rbi +++ b/rbi/finch_api/resources/hris/directory.rbi @@ -7,6 +7,7 @@ module FinchAPI # Read company directory and organization structure sig do params( + entity_ids: T::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash @@ -17,6 +18,8 @@ module FinchAPI ) end def list( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Number of employees to return (defaults to all) limit: nil, # Index to start from (defaults to 0) diff --git a/rbi/finch_api/resources/hris/documents.rbi b/rbi/finch_api/resources/hris/documents.rbi index a953c5ba..5b59035c 100644 --- a/rbi/finch_api/resources/hris/documents.rbi +++ b/rbi/finch_api/resources/hris/documents.rbi @@ -8,6 +8,7 @@ module FinchAPI # company-wide documents. sig do params( + entity_ids: T::Array[String], individual_ids: T::Array[String], limit: Integer, offset: Integer, @@ -16,6 +17,8 @@ module FinchAPI ).returns(FinchAPI::Models::HRIS::DocumentListResponse) end def list( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, # Comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals individual_ids: nil, @@ -35,12 +38,15 @@ module FinchAPI sig do params( document_id: String, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::HRIS::DocumentRetreiveResponse::Variants) end def retreive( # The unique identifier of the document. document_id, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end diff --git a/rbi/finch_api/resources/hris/employments.rbi b/rbi/finch_api/resources/hris/employments.rbi index b585efa8..b5e16764 100644 --- a/rbi/finch_api/resources/hris/employments.rbi +++ b/rbi/finch_api/resources/hris/employments.rbi @@ -11,6 +11,7 @@ module FinchAPI T::Array[ FinchAPI::HRIS::EmploymentRetrieveManyParams::Request::OrHash ], + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns( FinchAPI::Internal::ResponsesPage[ @@ -19,8 +20,10 @@ module FinchAPI ) end def retrieve_many( - # The array of batch requests. + # Body param: The array of batch requests. requests:, + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end diff --git a/rbi/finch_api/resources/hris/individuals.rbi b/rbi/finch_api/resources/hris/individuals.rbi index 54724b67..6401666d 100644 --- a/rbi/finch_api/resources/hris/individuals.rbi +++ b/rbi/finch_api/resources/hris/individuals.rbi @@ -7,6 +7,7 @@ module FinchAPI # Read individual data, excluding income and employment data sig do params( + entity_ids: T::Array[String], options: T.nilable( FinchAPI::HRIS::IndividualRetrieveManyParams::Options::OrHash @@ -22,7 +23,15 @@ module FinchAPI ] ) end - def retrieve_many(options: nil, requests: nil, request_options: {}) + def retrieve_many( + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Body param: + options: nil, + # Body param: + requests: nil, + request_options: {} + ) end # @api private diff --git a/rbi/finch_api/resources/hris/pay_statements.rbi b/rbi/finch_api/resources/hris/pay_statements.rbi index 69ad5dec..8118945a 100644 --- a/rbi/finch_api/resources/hris/pay_statements.rbi +++ b/rbi/finch_api/resources/hris/pay_statements.rbi @@ -14,6 +14,7 @@ module FinchAPI T::Array[ FinchAPI::HRIS::PayStatementRetrieveManyParams::Request::OrHash ], + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns( FinchAPI::Internal::ResponsesPage[ @@ -22,8 +23,10 @@ module FinchAPI ) end def retrieve_many( - # The array of batch requests. + # Body param: The array of batch requests. requests:, + # Query param: The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end diff --git a/rbi/finch_api/resources/hris/payments.rbi b/rbi/finch_api/resources/hris/payments.rbi index 07f378dc..e53ecf03 100644 --- a/rbi/finch_api/resources/hris/payments.rbi +++ b/rbi/finch_api/resources/hris/payments.rbi @@ -9,6 +9,7 @@ module FinchAPI params( end_date: Date, start_date: Date, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Internal::SinglePage[FinchAPI::HRIS::Payment]) end @@ -19,6 +20,8 @@ module FinchAPI # The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` # format. start_date:, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, request_options: {} ) end diff --git a/rbi/finch_api/resources/jobs/automated.rbi b/rbi/finch_api/resources/jobs/automated.rbi index 34d2f712..8a14e34f 100644 --- a/rbi/finch_api/resources/jobs/automated.rbi +++ b/rbi/finch_api/resources/jobs/automated.rbi @@ -37,18 +37,10 @@ module FinchAPI sig do params( job_id: String, - entity_id: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Jobs::AutomatedAsyncJob) end - def retrieve( - job_id, - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - entity_id: nil, - request_options: {} - ) + def retrieve(job_id, request_options: {}) end # Get all automated jobs. Automated jobs are completed by a machine. By default, @@ -56,17 +48,12 @@ module FinchAPI # as data syncs, only the next scheduled job is shown. sig do params( - entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::Jobs::AutomatedListResponse) end def list( - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - entity_id: nil, # Number of items to return limit: nil, # Index to start from (defaults to 0) diff --git a/rbi/finch_api/resources/jobs/manual.rbi b/rbi/finch_api/resources/jobs/manual.rbi index 2e9a3ec6..ca91bfdb 100644 --- a/rbi/finch_api/resources/jobs/manual.rbi +++ b/rbi/finch_api/resources/jobs/manual.rbi @@ -9,18 +9,10 @@ module FinchAPI sig do params( job_id: String, - entity_id: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Jobs::ManualAsyncJob) end - def retrieve( - job_id, - # The entity ID to use when authenticating with a multi-account token. Required - # when using a multi-account token to specify which entity's data to access. - # Example: `123e4567-e89b-12d3-a456-426614174000` - entity_id: nil, - request_options: {} - ) + def retrieve(job_id, request_options: {}) end # @api private diff --git a/rbi/finch_api/resources/payroll/pay_groups.rbi b/rbi/finch_api/resources/payroll/pay_groups.rbi index c06cf3b8..a31fdc15 100644 --- a/rbi/finch_api/resources/payroll/pay_groups.rbi +++ b/rbi/finch_api/resources/payroll/pay_groups.rbi @@ -8,15 +8,22 @@ module FinchAPI sig do params( pay_group_id: String, + entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::Payroll::PayGroupRetrieveResponse) end - def retrieve(pay_group_id, request_options: {}) + def retrieve( + pay_group_id, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + request_options: {} + ) end # Read company pay groups and frequencies sig do params( + entity_ids: T::Array[String], individual_id: String, pay_frequencies: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash @@ -26,7 +33,13 @@ module FinchAPI ] ) end - def list(individual_id: nil, pay_frequencies: nil, request_options: {}) + def list( + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + individual_id: nil, + pay_frequencies: nil, + request_options: {} + ) end # @api private diff --git a/rbi/finch_api/resources/providers.rbi b/rbi/finch_api/resources/providers.rbi index dcca71ad..7ccb8c84 100644 --- a/rbi/finch_api/resources/providers.rbi +++ b/rbi/finch_api/resources/providers.rbi @@ -6,7 +6,7 @@ module FinchAPI # Return details on all available payroll and HR systems. sig do params(request_options: FinchAPI::RequestOptions::OrHash).returns( - FinchAPI::Internal::SinglePage[FinchAPI::Provider] + FinchAPI::Internal::SinglePage[FinchAPI::Models::ProviderListResponse] ) end def list(request_options: {}) diff --git a/rbi/finch_api/resources/request_forwarding.rbi b/rbi/finch_api/resources/request_forwarding.rbi index 50ec19c3..3aef9d51 100644 --- a/rbi/finch_api/resources/request_forwarding.rbi +++ b/rbi/finch_api/resources/request_forwarding.rbi @@ -12,8 +12,8 @@ module FinchAPI method_: String, route: String, data: T.nilable(String), - headers: T.nilable(T.anything), - params: T.nilable(T.anything), + headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::RequestForwardingForwardResponse) end diff --git a/scripts/bootstrap b/scripts/bootstrap index cc31aa85..34878642 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,10 +4,18 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { - echo "==> Installing Homebrew dependencies…" - brew bundle + echo -n "==> Install Homebrew dependencies? (y/N): " + read -r response + case "$response" in + [yY][eE][sS]|[yY]) + brew bundle + ;; + *) + ;; + esac + echo } fi diff --git a/scripts/fast-format b/scripts/fast-format new file mode 100755 index 00000000..6d5973fb --- /dev/null +++ b/scripts/fast-format @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Script started with $# arguments" +echo "Arguments: $*" +echo "Script location: $(dirname "$0")" + +cd -- "$(dirname "$0")/.." +echo "Changed to directory: $PWD" + +if [ $# -eq 0 ]; then + echo "Usage: $0 [additional-formatter-args...]" + echo "The file should contain one file path per line" + exit 1 +fi + +exec -- bundle exec rake format FORMAT_FILE="$1" diff --git a/sig/finch_api/errors.rbs b/sig/finch_api/errors.rbs index 9fa8cfbb..40773bad 100644 --- a/sig/finch_api/errors.rbs +++ b/sig/finch_api/errors.rbs @@ -21,11 +21,14 @@ module FinchAPI attr_accessor status: Integer? + attr_accessor headers: ::Hash[String, String]? + attr_accessor body: top? def initialize: ( url: URI::Generic, ?status: Integer?, + ?headers: ::Hash[String, String]?, ?body: Object?, ?request: nil, ?response: nil, @@ -37,6 +40,7 @@ module FinchAPI def initialize: ( url: URI::Generic, ?status: nil, + ?headers: ::Hash[String, String]?, ?body: nil, ?request: nil, ?response: nil, @@ -48,6 +52,7 @@ module FinchAPI def initialize: ( url: URI::Generic, ?status: nil, + ?headers: ::Hash[String, String]?, ?body: nil, ?request: nil, ?response: nil, @@ -59,6 +64,7 @@ module FinchAPI def self.for: ( url: URI::Generic, status: Integer, + headers: ::Hash[String, String]?, body: Object?, request: nil, response: nil, @@ -68,6 +74,7 @@ module FinchAPI def initialize: ( url: URI::Generic, status: Integer, + headers: ::Hash[String, String]?, body: Object?, request: nil, response: nil, diff --git a/sig/finch_api/file_part.rbs b/sig/finch_api/file_part.rbs index 31ed4ca6..e414c37e 100644 --- a/sig/finch_api/file_part.rbs +++ b/sig/finch_api/file_part.rbs @@ -14,7 +14,7 @@ module FinchAPI def initialize: ( Pathname | StringIO | IO | String content, - ?filename: String?, + ?filename: (Pathname | String)?, ?content_type: String? ) -> void end diff --git a/sig/finch_api/models/connect/session_new_params.rbs b/sig/finch_api/models/connect/session_new_params.rbs index 8283a65f..9f2b894b 100644 --- a/sig/finch_api/models/connect/session_new_params.rbs +++ b/sig/finch_api/models/connect/session_new_params.rbs @@ -3,13 +3,13 @@ module FinchAPI module Connect type session_new_params = { + customer_email: String?, 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?, + products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product], redirect_uri: String?, sandbox: FinchAPI::Models::Connect::SessionNewParams::sandbox? } @@ -19,79 +19,50 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor customer_email: String? + attr_accessor customer_id: String attr_accessor customer_name: String - attr_accessor products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product] - - attr_accessor customer_email: String? - attr_accessor integration: FinchAPI::Connect::SessionNewParams::Integration? attr_accessor manual: bool? attr_accessor minutes_to_expire: Float? + attr_accessor products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product] + attr_accessor redirect_uri: String? attr_accessor sandbox: FinchAPI::Models::Connect::SessionNewParams::sandbox? def initialize: ( + customer_email: String?, customer_id: String, customer_name: String, + integration: FinchAPI::Connect::SessionNewParams::Integration?, + manual: bool?, + minutes_to_expire: Float?, 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?, + redirect_uri: String?, + sandbox: FinchAPI::Models::Connect::SessionNewParams::sandbox?, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + customer_email: String?, 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?, + products: ::Array[FinchAPI::Models::Connect::SessionNewParams::product], redirect_uri: String?, sandbox: FinchAPI::Models::Connect::SessionNewParams::sandbox?, request_options: FinchAPI::RequestOptions } - type product = - :company - | :directory - | :individual - | :employment - | :payment - | :pay_statement - | :benefits - | :ssn - | :deduction - | :documents - - module Product - extend FinchAPI::Internal::Type::Enum - - COMPANY: :company - DIRECTORY: :directory - INDIVIDUAL: :individual - EMPLOYMENT: :employment - PAYMENT: :payment - PAY_STATEMENT: :pay_statement - BENEFITS: :benefits - SSN: :ssn - DEDUCTION: :deduction - DOCUMENTS: :documents - - def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionNewParams::product] - end - type integration = { auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method?, @@ -104,8 +75,8 @@ module FinchAPI attr_accessor provider: String? def initialize: ( - ?auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method?, - ?provider: String? + auth_method: FinchAPI::Models::Connect::SessionNewParams::Integration::auth_method?, + provider: String? ) -> void def to_hash: -> { @@ -127,6 +98,35 @@ module FinchAPI end end + type product = + :benefits + | :company + | :deduction + | :directory + | :documents + | :employment + | :individual + | :payment + | :pay_statement + | :ssn + + module Product + extend FinchAPI::Internal::Type::Enum + + BENEFITS: :benefits + COMPANY: :company + DEDUCTION: :deduction + DIRECTORY: :directory + DOCUMENTS: :documents + EMPLOYMENT: :employment + INDIVIDUAL: :individual + PAYMENT: :payment + PAY_STATEMENT: :pay_statement + SSN: :ssn + + def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionNewParams::product] + end + type sandbox = :finch | :provider module Sandbox diff --git a/sig/finch_api/models/connect/session_reauthenticate_params.rbs b/sig/finch_api/models/connect/session_reauthenticate_params.rbs index 8e6644c2..8c8d277a 100644 --- a/sig/finch_api/models/connect/session_reauthenticate_params.rbs +++ b/sig/finch_api/models/connect/session_reauthenticate_params.rbs @@ -4,7 +4,7 @@ module FinchAPI type session_reauthenticate_params = { connection_id: String, - minutes_to_expire: Integer?, + minutes_to_expire: Integer, products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, redirect_uri: String? } @@ -16,7 +16,7 @@ module FinchAPI attr_accessor connection_id: String - attr_accessor minutes_to_expire: Integer? + attr_accessor minutes_to_expire: Integer attr_accessor products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]? @@ -24,45 +24,45 @@ module FinchAPI def initialize: ( connection_id: String, - ?minutes_to_expire: Integer?, - ?products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, - ?redirect_uri: String?, + minutes_to_expire: Integer, + 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?, + minutes_to_expire: Integer, products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, redirect_uri: String?, request_options: FinchAPI::RequestOptions } type product = - :company + :benefits + | :company + | :deduction | :directory - | :individual + | :documents | :employment + | :individual | :payment | :pay_statement - | :benefits | :ssn - | :deduction - | :documents module Product extend FinchAPI::Internal::Type::Enum + BENEFITS: :benefits COMPANY: :company + DEDUCTION: :deduction DIRECTORY: :directory - INDIVIDUAL: :individual + DOCUMENTS: :documents EMPLOYMENT: :employment + INDIVIDUAL: :individual PAYMENT: :payment PAY_STATEMENT: :pay_statement - BENEFITS: :benefits SSN: :ssn - DEDUCTION: :deduction - DOCUMENTS: :documents def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product] end diff --git a/sig/finch_api/models/create_access_token_response.rbs b/sig/finch_api/models/create_access_token_response.rbs index ce890088..ee20e257 100644 --- a/sig/finch_api/models/create_access_token_response.rbs +++ b/sig/finch_api/models/create_access_token_response.rbs @@ -6,6 +6,7 @@ module FinchAPI client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, connection_id: String, connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type, + entity_ids: ::Array[String], products: ::Array[String], provider_id: String, token_type: String, @@ -23,6 +24,8 @@ module FinchAPI attr_accessor connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type + attr_accessor entity_ids: ::Array[String] + attr_accessor products: ::Array[String] attr_accessor provider_id: String @@ -44,6 +47,7 @@ module FinchAPI client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, connection_id: String, connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type, + entity_ids: ::Array[String], products: ::Array[String], provider_id: String, token_type: String, @@ -57,6 +61,7 @@ module FinchAPI client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, connection_id: String, connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type, + entity_ids: ::Array[String], products: ::Array[String], provider_id: String, token_type: String, diff --git a/sig/finch_api/models/hris/benefit_contribution.rbs b/sig/finch_api/models/hris/benefit_contribution.rbs index b18e040d..8e390d49 100644 --- a/sig/finch_api/models/hris/benefit_contribution.rbs +++ b/sig/finch_api/models/hris/benefit_contribution.rbs @@ -2,36 +2,122 @@ module FinchAPI module Models module HRIS type benefit_contribution = - { - amount: Integer?, - type: FinchAPI::Models::HRIS::BenefitContribution::type_? - } + FinchAPI::HRIS::BenefitContribution::UnionMember0 + | FinchAPI::HRIS::BenefitContribution::UnionMember1 + | FinchAPI::HRIS::BenefitContribution::UnionMember2 - class BenefitContribution < FinchAPI::Internal::Type::BaseModel - attr_accessor amount: Integer? + module BenefitContribution + extend FinchAPI::Internal::Type::Union - attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::type_? + type union_member0 = + { + amount: Integer, + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + } - def initialize: ( - amount: Integer?, - type: FinchAPI::Models::HRIS::BenefitContribution::type_? - ) -> void + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer - def to_hash: -> { - amount: Integer?, - type: FinchAPI::Models::HRIS::BenefitContribution::type_? - } + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ - type type_ = :fixed | :percent + def initialize: ( + amount: Integer, + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + ) -> void - module Type - extend FinchAPI::Internal::Type::Enum + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + } - FIXED: :fixed - PERCENT: :percent + type type_ = :fixed - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::type_] + module Type + extend FinchAPI::Internal::Type::Enum + + FIXED: :fixed + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_] + end + end + + type union_member1 = + { + amount: Integer, + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + } + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + + def initialize: ( + amount: Integer, + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + } + + type type_ = :percent + + module Type + extend FinchAPI::Internal::Type::Enum + + PERCENT: :percent + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_] + end + end + + type union_member2 = + { + tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier], + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + } + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + attr_accessor tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] + + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + + def initialize: ( + tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier], + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + ) -> void + + def to_hash: -> { + tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier], + type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + } + + type tier = { match: Integer, threshold: Integer } + + class Tier < FinchAPI::Internal::Type::BaseModel + attr_accessor match: Integer + + attr_accessor threshold: Integer + + def initialize: (match: Integer, threshold: Integer) -> void + + def to_hash: -> { match: Integer, threshold: Integer } + end + + type type_ = :tiered + + module Type + extend FinchAPI::Internal::Type::Enum + + TIERED: :tiered + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_] + end end + + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::benefit_contribution] 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 3a79eece..1a687b34 100644 --- a/sig/finch_api/models/hris/benefit_create_params.rbs +++ b/sig/finch_api/models/hris/benefit_create_params.rbs @@ -3,6 +3,7 @@ module FinchAPI module HRIS type benefit_create_params = { + entity_ids: ::Array[String], company_contribution: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution?, description: String, frequency: FinchAPI::Models::HRIS::benefit_frequency?, @@ -14,6 +15,10 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_accessor company_contribution: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution? attr_reader description: String? @@ -25,6 +30,7 @@ module FinchAPI attr_accessor type: FinchAPI::Models::HRIS::benefit_type? def initialize: ( + ?entity_ids: ::Array[String], ?company_contribution: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution?, ?description: String, ?frequency: FinchAPI::Models::HRIS::benefit_frequency?, @@ -33,6 +39,7 @@ module FinchAPI ) -> void def to_hash: -> { + entity_ids: ::Array[String], company_contribution: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution?, description: String, frequency: FinchAPI::Models::HRIS::benefit_frequency?, diff --git a/sig/finch_api/models/hris/benefit_list_params.rbs b/sig/finch_api/models/hris/benefit_list_params.rbs index 0765ec3b..edf28466 100644 --- a/sig/finch_api/models/hris/benefit_list_params.rbs +++ b/sig/finch_api/models/hris/benefit_list_params.rbs @@ -2,15 +2,26 @@ module FinchAPI module Models module HRIS type benefit_list_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class BenefitListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + 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 a2d4e0e0..ec057698 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 @@ -2,15 +2,26 @@ module FinchAPI module Models module HRIS type benefit_list_supported_benefits_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class BenefitListSupportedBenefitsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/hris/benefit_retrieve_params.rbs b/sig/finch_api/models/hris/benefit_retrieve_params.rbs index 5c583170..ac88c4be 100644 --- a/sig/finch_api/models/hris/benefit_retrieve_params.rbs +++ b/sig/finch_api/models/hris/benefit_retrieve_params.rbs @@ -2,15 +2,26 @@ module FinchAPI module Models module HRIS type benefit_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class BenefitRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + 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 b307ba2e..44536449 100644 --- a/sig/finch_api/models/hris/benefit_update_params.rbs +++ b/sig/finch_api/models/hris/benefit_update_params.rbs @@ -2,22 +2,29 @@ module FinchAPI module Models module HRIS type benefit_update_params = - { description: String } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String], description: String } + & FinchAPI::Internal::Type::request_parameters class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader description: String? def description=: (String) -> String def initialize: ( + ?entity_ids: ::Array[String], ?description: String, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], description: String, request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/hris/benefits/individual_benefit.rbs b/sig/finch_api/models/hris/benefits/individual_benefit.rbs index 1469f702..d76af5d2 100644 --- a/sig/finch_api/models/hris/benefits/individual_benefit.rbs +++ b/sig/finch_api/models/hris/benefits/individual_benefit.rbs @@ -41,8 +41,8 @@ module FinchAPI { annual_maximum: Integer?, catch_up: bool?, - company_contribution: FinchAPI::HRIS::BenefitContribution?, - employee_deduction: FinchAPI::HRIS::BenefitContribution?, + company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution?, + employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction?, hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? } @@ -51,28 +51,221 @@ module FinchAPI attr_accessor catch_up: bool? - attr_accessor company_contribution: FinchAPI::HRIS::BenefitContribution? + attr_accessor company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution? - attr_accessor employee_deduction: FinchAPI::HRIS::BenefitContribution? + attr_accessor employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction? attr_accessor hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? def initialize: ( annual_maximum: Integer?, catch_up: bool?, - company_contribution: FinchAPI::HRIS::BenefitContribution?, - employee_deduction: FinchAPI::HRIS::BenefitContribution?, + company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution?, + employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction?, ?hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? ) -> void def to_hash: -> { annual_maximum: Integer?, catch_up: bool?, - company_contribution: FinchAPI::HRIS::BenefitContribution?, - employee_deduction: FinchAPI::HRIS::BenefitContribution?, + company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution?, + employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction?, hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? } + type company_contribution = + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0 + | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1 + | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2 + + module CompanyContribution + extend FinchAPI::Internal::Type::Union + + type union_member0 = + { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + } + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + + def initialize: ( + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + } + + type type_ = :fixed + + module Type + extend FinchAPI::Internal::Type::Enum + + FIXED: :fixed + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_] + end + end + + type union_member1 = + { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + } + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + + def initialize: ( + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + } + + type type_ = :percent + + module Type + extend FinchAPI::Internal::Type::Enum + + PERCENT: :percent + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_] + end + end + + type union_member2 = + { + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier], + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + } + + class UnionMember2 < FinchAPI::Internal::Type::BaseModel + attr_accessor tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier] + + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + + def initialize: ( + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier], + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + ) -> void + + def to_hash: -> { + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier], + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + } + + type tier = { match: Integer, threshold: Integer } + + class Tier < FinchAPI::Internal::Type::BaseModel + attr_accessor match: Integer + + attr_accessor threshold: Integer + + def initialize: (match: Integer, threshold: Integer) -> void + + def to_hash: -> { match: Integer, threshold: Integer } + end + + type type_ = :tiered + + module Type + extend FinchAPI::Internal::Type::Enum + + TIERED: :tiered + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_] + end + end + + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution] + end + + type employee_deduction = + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0 + | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1 + + module EmployeeDeduction + extend FinchAPI::Internal::Type::Union + + type union_member0 = + { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + } + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + + def initialize: ( + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + } + + type type_ = :fixed + + module Type + extend FinchAPI::Internal::Type::Enum + + FIXED: :fixed + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_] + end + end + + type union_member1 = + { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + } + + class UnionMember1 < FinchAPI::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + + def initialize: ( + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + ) -> void + + def to_hash: -> { + amount: Integer, + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + } + + type type_ = :percent + + module Type + extend FinchAPI::Internal::Type::Enum + + PERCENT: :percent + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_] + end + end + + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction] + end + type hsa_contribution_limit = :individual | :family module HsaContributionLimit 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 01da28a8..b6c848e6 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 @@ -4,6 +4,7 @@ module FinchAPI module Benefits type individual_enroll_many_params = { + entity_ids: ::Array[String], individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] } & FinchAPI::Internal::Type::request_parameters @@ -12,6 +13,10 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual]? def individuals=: ( @@ -19,11 +24,13 @@ module FinchAPI ) -> ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] def initialize: ( + ?entity_ids: ::Array[String], ?individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual], request_options: FinchAPI::RequestOptions } @@ -126,6 +133,7 @@ module FinchAPI type company_contribution = { amount: Integer, + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier], type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ } @@ -134,6 +142,12 @@ module FinchAPI def amount=: (Integer) -> Integer + attr_reader tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier]? + + def tiers=: ( + ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier] + ) -> ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier] + attr_reader type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_? def type=: ( @@ -142,21 +156,36 @@ module FinchAPI def initialize: ( ?amount: Integer, + ?tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier], ?type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ ) -> void def to_hash: -> { amount: Integer, + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Tier], type: FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_ } - type type_ = :fixed | :percent + type tier = { match: Integer, threshold: Integer } + + class Tier < FinchAPI::Internal::Type::BaseModel + attr_accessor match: Integer + + attr_accessor threshold: Integer + + def initialize: (match: Integer, threshold: Integer) -> void + + def to_hash: -> { match: Integer, threshold: Integer } + end + + type type_ = :fixed | :percent | :tiered module Type extend FinchAPI::Internal::Type::Enum FIXED: :fixed PERCENT: :percent + TIERED: :tiered def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::type_] 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 a95458ce..72e3b890 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 @@ -3,15 +3,26 @@ module FinchAPI module HRIS module Benefits type individual_enrolled_ids_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class IndividualEnrolledIDsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } 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 cecbf6dc..5f3fa7b0 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 @@ -3,23 +3,29 @@ module FinchAPI module HRIS module Benefits type individual_retrieve_many_benefits_params = - { individual_ids: String } + { entity_ids: ::Array[String], individual_ids: String } & FinchAPI::Internal::Type::request_parameters class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader individual_ids: String? def individual_ids=: (String) -> String def initialize: ( + ?entity_ids: ::Array[String], ?individual_ids: String, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions } 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 fb2709ac..43a8589e 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 @@ -3,23 +3,29 @@ module FinchAPI module HRIS module Benefits type individual_unenroll_many_params = - { individual_ids: ::Array[String] } + { entity_ids: ::Array[String], individual_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class IndividualUnenrollManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader individual_ids: ::Array[String]? def individual_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + ?entity_ids: ::Array[String], ?individual_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], individual_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/hris/benfit_contribution.rbs b/sig/finch_api/models/hris/benfit_contribution.rbs index 429686d0..941b1849 100644 --- a/sig/finch_api/models/hris/benfit_contribution.rbs +++ b/sig/finch_api/models/hris/benfit_contribution.rbs @@ -1,7 +1,7 @@ module FinchAPI module Models module HRIS - class BenfitContribution = FinchAPI::Models::HRIS::BenefitContribution + module BenfitContribution = FinchAPI::Models::HRIS::BenefitContribution 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 66130329..c78df13a 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 @@ -5,6 +5,7 @@ module FinchAPI module PayStatementItem type rule_create_params = { + entity_ids: ::Array[String], attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], effective_end_date: String?, @@ -17,6 +18,10 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes? def attributes=: ( @@ -40,6 +45,7 @@ module FinchAPI ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type def initialize: ( + ?entity_ids: ::Array[String], ?attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, ?conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], ?effective_end_date: String?, @@ -49,6 +55,7 @@ module FinchAPI ) -> void def to_hash: -> { + entity_ids: ::Array[String], attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], effective_end_date: String?, 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 41d7f22d..72499010 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 @@ -4,15 +4,26 @@ module FinchAPI module Company module PayStatementItem type rule_delete_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } end end end 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 80a86e95..2bf6060c 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 @@ -4,15 +4,26 @@ module FinchAPI module Company module PayStatementItem type rule_list_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class RuleListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } end end end 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 72f45738..67658acf 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 @@ -4,23 +4,29 @@ module FinchAPI module Company module PayStatementItem type rule_update_params = - { optional_property: top } + { entity_ids: ::Array[String], optional_property: top } & FinchAPI::Internal::Type::request_parameters class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader optional_property: top? def optional_property=: (top) -> top def initialize: ( + ?entity_ids: ::Array[String], ?optional_property: top, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], optional_property: top, request_options: FinchAPI::RequestOptions } 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 70b65247..6b7d49b8 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 @@ -6,6 +6,7 @@ module FinchAPI { categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], end_date: Date, + entity_ids: ::Array[String], name: String, start_date: Date, type: String @@ -26,6 +27,10 @@ module FinchAPI def end_date=: (Date) -> Date + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader name: String? def name=: (String) -> String @@ -41,6 +46,7 @@ module FinchAPI def initialize: ( ?categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], ?end_date: Date, + ?entity_ids: ::Array[String], ?name: String, ?start_date: Date, ?type: String, @@ -50,6 +56,7 @@ module FinchAPI def to_hash: -> { categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], end_date: Date, + entity_ids: ::Array[String], name: String, start_date: Date, type: String, diff --git a/sig/finch_api/models/hris/company_retrieve_params.rbs b/sig/finch_api/models/hris/company_retrieve_params.rbs index 6023d525..e2a694c8 100644 --- a/sig/finch_api/models/hris/company_retrieve_params.rbs +++ b/sig/finch_api/models/hris/company_retrieve_params.rbs @@ -2,15 +2,26 @@ module FinchAPI module Models module HRIS type company_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class CompanyRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } 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 04bf1cb6..ba20a716 100644 --- a/sig/finch_api/models/hris/directory_list_individuals_params.rbs +++ b/sig/finch_api/models/hris/directory_list_individuals_params.rbs @@ -2,13 +2,17 @@ module FinchAPI module Models module HRIS type directory_list_individuals_params = - { limit: Integer, offset: Integer } + { entity_ids: ::Array[String], limit: Integer, offset: Integer } & FinchAPI::Internal::Type::request_parameters class DirectoryListIndividualsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader limit: Integer? def limit=: (Integer) -> Integer @@ -18,12 +22,14 @@ module FinchAPI def offset=: (Integer) -> Integer def initialize: ( + ?entity_ids: ::Array[String], ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/directory_list_params.rbs b/sig/finch_api/models/hris/directory_list_params.rbs index 89009e6a..f74880fe 100644 --- a/sig/finch_api/models/hris/directory_list_params.rbs +++ b/sig/finch_api/models/hris/directory_list_params.rbs @@ -2,13 +2,17 @@ module FinchAPI module Models module HRIS type directory_list_params = - { limit: Integer, offset: Integer } + { entity_ids: ::Array[String], limit: Integer, offset: Integer } & FinchAPI::Internal::Type::request_parameters class DirectoryListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader limit: Integer? def limit=: (Integer) -> Integer @@ -18,12 +22,14 @@ module FinchAPI def offset=: (Integer) -> Integer def initialize: ( + ?entity_ids: ::Array[String], ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/document_list_params.rbs b/sig/finch_api/models/hris/document_list_params.rbs index 1d5b7b00..a5f0076c 100644 --- a/sig/finch_api/models/hris/document_list_params.rbs +++ b/sig/finch_api/models/hris/document_list_params.rbs @@ -3,6 +3,7 @@ module FinchAPI module HRIS type document_list_params = { + entity_ids: ::Array[String], individual_ids: ::Array[String], limit: Integer, offset: Integer, @@ -14,6 +15,10 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader individual_ids: ::Array[String]? def individual_ids=: (::Array[String]) -> ::Array[String] @@ -33,6 +38,7 @@ module FinchAPI ) -> ::Array[FinchAPI::Models::HRIS::DocumentListParams::type_] def initialize: ( + ?entity_ids: ::Array[String], ?individual_ids: ::Array[String], ?limit: Integer, ?offset: Integer, @@ -41,6 +47,7 @@ module FinchAPI ) -> void def to_hash: -> { + entity_ids: ::Array[String], individual_ids: ::Array[String], limit: Integer, offset: Integer, diff --git a/sig/finch_api/models/hris/document_response.rbs b/sig/finch_api/models/hris/document_response.rbs index 733c19a3..ba3baec6 100644 --- a/sig/finch_api/models/hris/document_response.rbs +++ b/sig/finch_api/models/hris/document_response.rbs @@ -7,34 +7,26 @@ module FinchAPI individual_id: String?, type: FinchAPI::Models::HRIS::DocumentResponse::type_, url: String, - year: Float? + year: Float } class DocumentResponse < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String + attr_accessor id: String attr_accessor individual_id: String? - attr_reader type: FinchAPI::Models::HRIS::DocumentResponse::type_? - - def type=: ( - FinchAPI::Models::HRIS::DocumentResponse::type_ - ) -> FinchAPI::Models::HRIS::DocumentResponse::type_ + attr_accessor type: FinchAPI::Models::HRIS::DocumentResponse::type_ - attr_reader url: String? + attr_accessor url: String - def url=: (String) -> String - - attr_accessor year: Float? + attr_accessor year: Float def initialize: ( - ?id: String, - ?individual_id: String?, - ?type: FinchAPI::Models::HRIS::DocumentResponse::type_, - ?url: String, - ?year: Float? + id: String, + individual_id: String?, + type: FinchAPI::Models::HRIS::DocumentResponse::type_, + url: String, + year: Float ) -> void def to_hash: -> { @@ -42,7 +34,7 @@ module FinchAPI individual_id: String?, type: FinchAPI::Models::HRIS::DocumentResponse::type_, url: String, - year: Float? + year: Float } type type_ = :w4_2020 | :w4_2005 diff --git a/sig/finch_api/models/hris/document_retreive_params.rbs b/sig/finch_api/models/hris/document_retreive_params.rbs index fe934d4e..e757fc2e 100644 --- a/sig/finch_api/models/hris/document_retreive_params.rbs +++ b/sig/finch_api/models/hris/document_retreive_params.rbs @@ -2,15 +2,26 @@ module FinchAPI module Models module HRIS type document_retreive_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class DocumentRetreiveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } 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 6ae7ab0d..2599bb73 100644 --- a/sig/finch_api/models/hris/employment_retrieve_many_params.rbs +++ b/sig/finch_api/models/hris/employment_retrieve_many_params.rbs @@ -3,7 +3,8 @@ module FinchAPI module HRIS type employment_retrieve_many_params = { - requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] + requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request], + entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters @@ -13,13 +14,19 @@ module FinchAPI attr_accessor requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + def initialize: ( requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request], + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request], + entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } 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 3521fc38..6530e92d 100644 --- a/sig/finch_api/models/hris/individual_retrieve_many_params.rbs +++ b/sig/finch_api/models/hris/individual_retrieve_many_params.rbs @@ -3,6 +3,7 @@ module FinchAPI module HRIS type individual_retrieve_many_params = { + entity_ids: ::Array[String], options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] } @@ -12,6 +13,10 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_accessor options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options? attr_reader requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request]? @@ -21,12 +26,14 @@ module FinchAPI ) -> ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] def initialize: ( + ?entity_ids: ::Array[String], ?options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, ?requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/pay_statement.rbs b/sig/finch_api/models/hris/pay_statement.rbs index d5ac5e28..5cf15fa9 100644 --- a/sig/finch_api/models/hris/pay_statement.rbs +++ b/sig/finch_api/models/hris/pay_statement.rbs @@ -4,13 +4,13 @@ module FinchAPI type pay_statement = { earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, + 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?]?, + taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]?, total_hours: Float?, type: FinchAPI::Models::HRIS::PayStatement::type_? } @@ -18,9 +18,9 @@ module FinchAPI 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 employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction]? - attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]? + attr_accessor employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution]? attr_accessor gross_pay: FinchAPI::Money? @@ -30,7 +30,7 @@ module FinchAPI attr_accessor payment_method: FinchAPI::Models::HRIS::PayStatement::payment_method? - attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax?]? + attr_accessor taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]? attr_accessor total_hours: Float? @@ -38,26 +38,26 @@ module FinchAPI def initialize: ( earnings: ::Array[FinchAPI::HRIS::PayStatement::Earning?]?, - employee_deductions: ::Array[FinchAPI::HRIS::PayStatement::EmployeeDeduction?]?, - employer_contributions: ::Array[FinchAPI::HRIS::PayStatement::EmployerContribution?]?, + 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?]?, + 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?]?, + 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?]?, + taxes: ::Array[FinchAPI::HRIS::PayStatement::Tax]?, total_hours: Float?, type: FinchAPI::Models::HRIS::PayStatement::type_? } 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 e25c327b..b66138bf 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 @@ -3,7 +3,8 @@ module FinchAPI module HRIS type pay_statement_retrieve_many_params = { - requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] + requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request], + entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters @@ -13,13 +14,19 @@ module FinchAPI attr_accessor requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + def initialize: ( requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request], + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request], + entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/hris/payment_list_params.rbs b/sig/finch_api/models/hris/payment_list_params.rbs index bb12db5c..b6771820 100644 --- a/sig/finch_api/models/hris/payment_list_params.rbs +++ b/sig/finch_api/models/hris/payment_list_params.rbs @@ -2,7 +2,7 @@ module FinchAPI module Models module HRIS type payment_list_params = - { end_date: Date, start_date: Date } + { end_date: Date, start_date: Date, entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class PaymentListParams < FinchAPI::Internal::Type::BaseModel @@ -13,15 +13,21 @@ module FinchAPI attr_accessor start_date: Date + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + def initialize: ( end_date: Date, start_date: Date, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { end_date: Date, start_date: Date, + entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } end diff --git a/sig/finch_api/models/hris/supported_benefit.rbs b/sig/finch_api/models/hris/supported_benefit.rbs index ab4e335c..60981a8a 100644 --- a/sig/finch_api/models/hris/supported_benefit.rbs +++ b/sig/finch_api/models/hris/supported_benefit.rbs @@ -47,13 +47,14 @@ module FinchAPI hsa_contribution_limit: ::Array[FinchAPI::Models::HRIS::SupportedBenefit::hsa_contribution_limit?]? } - type company_contribution = :fixed | :percent + type company_contribution = :fixed | :percent | :tiered module CompanyContribution extend FinchAPI::Internal::Type::Enum FIXED: :fixed PERCENT: :percent + TIERED: :tiered def self?.values: -> ::Array[FinchAPI::Models::HRIS::SupportedBenefit::company_contribution] end diff --git a/sig/finch_api/models/hris/w42005.rbs b/sig/finch_api/models/hris/w42005.rbs index 751c9f1e..9b13149c 100644 --- a/sig/finch_api/models/hris/w42005.rbs +++ b/sig/finch_api/models/hris/w42005.rbs @@ -5,76 +5,62 @@ module FinchAPI { data: FinchAPI::HRIS::W42005::Data, type: FinchAPI::Models::HRIS::W42005::type_, - year: Float? + year: Float } class W42005 < FinchAPI::Internal::Type::BaseModel - attr_reader data: FinchAPI::HRIS::W42005::Data? + attr_accessor data: FinchAPI::HRIS::W42005::Data - def data=: ( - FinchAPI::HRIS::W42005::Data - ) -> FinchAPI::HRIS::W42005::Data + attr_accessor type: FinchAPI::Models::HRIS::W42005::type_ - attr_reader type: FinchAPI::Models::HRIS::W42005::type_? - - def type=: ( - FinchAPI::Models::HRIS::W42005::type_ - ) -> FinchAPI::Models::HRIS::W42005::type_ - - attr_accessor year: Float? + attr_accessor year: Float def initialize: ( - ?data: FinchAPI::HRIS::W42005::Data, - ?type: FinchAPI::Models::HRIS::W42005::type_, - ?year: Float? + data: FinchAPI::HRIS::W42005::Data, + 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? + year: Float } type data = { - additional_withholding: Integer?, - exemption: FinchAPI::Models::HRIS::W42005::Data::exemption, + 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? + total_number_of_allowances: Integer } class Data < FinchAPI::Internal::Type::BaseModel - attr_accessor additional_withholding: Integer? + attr_accessor additional_withholding: Integer - attr_reader exemption: FinchAPI::Models::HRIS::W42005::Data::exemption? - - def exemption=: ( - FinchAPI::Models::HRIS::W42005::Data::exemption - ) -> FinchAPI::Models::HRIS::W42005::Data::exemption + attr_accessor exemption: FinchAPI::Models::HRIS::W42005::Data::exemption? attr_accessor filing_status: FinchAPI::Models::HRIS::W42005::Data::filing_status? - attr_reader individual_id: String? - - def individual_id=: (String) -> String + attr_accessor individual_id: String - attr_accessor total_number_of_allowances: Integer? + attr_accessor total_number_of_allowances: Integer def initialize: ( - ?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? + 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 ) -> void def to_hash: -> { - additional_withholding: Integer?, - exemption: FinchAPI::Models::HRIS::W42005::Data::exemption, + 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? + total_number_of_allowances: Integer } type exemption = :exempt | :non_exempt diff --git a/sig/finch_api/models/hris/w42020.rbs b/sig/finch_api/models/hris/w42020.rbs index e959ebe6..ec34a33c 100644 --- a/sig/finch_api/models/hris/w42020.rbs +++ b/sig/finch_api/models/hris/w42020.rbs @@ -5,87 +5,77 @@ module FinchAPI { data: FinchAPI::HRIS::W42020::Data, type: FinchAPI::Models::HRIS::W42020::type_, - year: Float? + year: Float } class W42020 < FinchAPI::Internal::Type::BaseModel - attr_reader data: FinchAPI::HRIS::W42020::Data? + attr_accessor data: FinchAPI::HRIS::W42020::Data - def data=: ( - FinchAPI::HRIS::W42020::Data - ) -> FinchAPI::HRIS::W42020::Data + attr_accessor type: FinchAPI::Models::HRIS::W42020::type_ - attr_reader type: FinchAPI::Models::HRIS::W42020::type_? - - def type=: ( - FinchAPI::Models::HRIS::W42020::type_ - ) -> FinchAPI::Models::HRIS::W42020::type_ - - attr_accessor year: Float? + attr_accessor year: Float def initialize: ( - ?data: FinchAPI::HRIS::W42020::Data, - ?type: FinchAPI::Models::HRIS::W42020::type_, - ?year: Float? + data: FinchAPI::HRIS::W42020::Data, + 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? + year: Float } type data = { - amount_for_other_dependents: Integer?, - :amount_for_qualifying_children_under_17 => Integer?, - deductions: Integer?, - extra_withholding: Integer?, + 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? + other_income: Integer, + total_claim_dependent_and_other_credits: Integer } class Data < FinchAPI::Internal::Type::BaseModel - attr_accessor amount_for_other_dependents: Integer? + attr_accessor amount_for_other_dependents: Integer - attr_accessor amount_for_qualifying_children_under_17: Integer? + attr_accessor amount_for_qualifying_children_under_17: Integer - attr_accessor deductions: Integer? + attr_accessor deductions: Integer - attr_accessor extra_withholding: Integer? + attr_accessor extra_withholding: Integer attr_accessor filing_status: FinchAPI::Models::HRIS::W42020::Data::filing_status? - attr_reader individual_id: String? + attr_accessor individual_id: String - def individual_id=: (String) -> String + attr_accessor other_income: Integer - attr_accessor other_income: Integer? - - attr_accessor total_claim_dependent_and_other_credits: Integer? + attr_accessor total_claim_dependent_and_other_credits: Integer def initialize: ( - ?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? + 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 ) -> void def to_hash: -> { - amount_for_other_dependents: Integer?, - :amount_for_qualifying_children_under_17 => Integer?, - deductions: Integer?, - extra_withholding: Integer?, + 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? + other_income: Integer, + total_claim_dependent_and_other_credits: Integer } type filing_status = diff --git a/sig/finch_api/models/introspection.rbs b/sig/finch_api/models/introspection.rbs index 3e9d33e7..8fc7c9af 100644 --- a/sig/finch_api/models/introspection.rbs +++ b/sig/finch_api/models/introspection.rbs @@ -16,8 +16,7 @@ module FinchAPI customer_email: String?, customer_id: String?, customer_name: String?, - entity_ids: ::Array[String], - entity_mode: FinchAPI::Models::Introspection::entity_mode, + entities: ::Array[FinchAPI::Introspection::Entity], manual: bool, payroll_provider_id: String, username: String? @@ -60,15 +59,11 @@ module FinchAPI attr_accessor customer_name: String? - attr_reader entity_ids: ::Array[String]? + attr_reader entities: ::Array[FinchAPI::Introspection::Entity]? - def entity_ids=: (::Array[String]) -> ::Array[String] - - attr_reader entity_mode: FinchAPI::Models::Introspection::entity_mode? - - def entity_mode=: ( - FinchAPI::Models::Introspection::entity_mode - ) -> FinchAPI::Models::Introspection::entity_mode + def entities=: ( + ::Array[FinchAPI::Introspection::Entity] + ) -> ::Array[FinchAPI::Introspection::Entity] attr_reader manual: bool? @@ -95,8 +90,7 @@ module FinchAPI ?customer_email: String?, ?customer_id: String?, ?customer_name: String?, - ?entity_ids: ::Array[String], - ?entity_mode: FinchAPI::Models::Introspection::entity_mode, + ?entities: ::Array[FinchAPI::Introspection::Entity], ?manual: bool, ?payroll_provider_id: String, ?username: String? @@ -117,8 +111,7 @@ module FinchAPI customer_email: String?, customer_id: String?, customer_name: String?, - entity_ids: ::Array[String], - entity_mode: FinchAPI::Models::Introspection::entity_mode, + entities: ::Array[FinchAPI::Introspection::Entity], manual: bool, payroll_provider_id: String, username: String? @@ -269,15 +262,31 @@ module FinchAPI end end - type entity_mode = :single | :multi + type entity = + { id: String, name: String?, source_id: String?, type: String? } - module EntityMode - extend FinchAPI::Internal::Type::Enum + class Entity < FinchAPI::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor source_id: String? - SINGLE: :single - MULTI: :multi + attr_accessor type: String? - def self?.values: -> ::Array[FinchAPI::Models::Introspection::entity_mode] + def initialize: ( + id: String, + name: String?, + source_id: String?, + type: String? + ) -> void + + def to_hash: -> { + id: String, + name: String?, + source_id: String?, + type: String? + } 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 beda5dca..291e0932 100644 --- a/sig/finch_api/models/jobs/automated_list_params.rbs +++ b/sig/finch_api/models/jobs/automated_list_params.rbs @@ -2,17 +2,13 @@ module FinchAPI module Models module Jobs type automated_list_params = - { entity_id: String, limit: Integer, offset: Integer } + { limit: Integer, offset: Integer } & FinchAPI::Internal::Type::request_parameters class AutomatedListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - attr_reader entity_id: String? - - def entity_id=: (String) -> String - attr_reader limit: Integer? def limit=: (Integer) -> Integer @@ -22,14 +18,12 @@ module FinchAPI def offset=: (Integer) -> Integer def initialize: ( - ?entity_id: String, ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { - entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/jobs/automated_retrieve_params.rbs b/sig/finch_api/models/jobs/automated_retrieve_params.rbs index 5d80ee70..f7c8cfa0 100644 --- a/sig/finch_api/models/jobs/automated_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/automated_retrieve_params.rbs @@ -2,25 +2,15 @@ module FinchAPI module Models module Jobs type automated_retrieve_params = - { entity_id: String } & FinchAPI::Internal::Type::request_parameters + { } & FinchAPI::Internal::Type::request_parameters class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - attr_reader entity_id: String? + def initialize: (?request_options: FinchAPI::request_opts) -> void - def entity_id=: (String) -> String - - def initialize: ( - ?entity_id: String, - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - entity_id: String, - request_options: FinchAPI::RequestOptions - } + def to_hash: -> { request_options: FinchAPI::RequestOptions } 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 644e08a6..0a765cf5 100644 --- a/sig/finch_api/models/jobs/manual_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/manual_retrieve_params.rbs @@ -2,25 +2,15 @@ module FinchAPI module Models module Jobs type manual_retrieve_params = - { entity_id: String } & FinchAPI::Internal::Type::request_parameters + { } & FinchAPI::Internal::Type::request_parameters class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - attr_reader entity_id: String? + def initialize: (?request_options: FinchAPI::request_opts) -> void - def entity_id=: (String) -> String - - def initialize: ( - ?entity_id: String, - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - entity_id: String, - request_options: FinchAPI::RequestOptions - } + def to_hash: -> { request_options: FinchAPI::RequestOptions } 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 fc7d371b..743a2682 100644 --- a/sig/finch_api/models/payroll/pay_group_list_params.rbs +++ b/sig/finch_api/models/payroll/pay_group_list_params.rbs @@ -2,13 +2,21 @@ module FinchAPI module Models module Payroll type pay_group_list_params = - { individual_id: String, pay_frequencies: ::Array[String] } + { + entity_ids: ::Array[String], + individual_id: String, + pay_frequencies: ::Array[String] + } & FinchAPI::Internal::Type::request_parameters class PayGroupListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + attr_reader individual_id: String? def individual_id=: (String) -> String @@ -18,12 +26,14 @@ module FinchAPI def pay_frequencies=: (::Array[String]) -> ::Array[String] def initialize: ( + ?entity_ids: ::Array[String], ?individual_id: String, ?pay_frequencies: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_ids: ::Array[String], individual_id: String, pay_frequencies: ::Array[String], request_options: FinchAPI::RequestOptions 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 c3b0a31c..771d2b07 100644 --- a/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs +++ b/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs @@ -2,15 +2,26 @@ module FinchAPI module Models module Payroll type pay_group_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters class PayGroupRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_ids: ::Array[String]? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/provider.rbs b/sig/finch_api/models/provider.rbs index 89fd87d7..5c9d238a 100644 --- a/sig/finch_api/models/provider.rbs +++ b/sig/finch_api/models/provider.rbs @@ -3,21 +3,23 @@ module FinchAPI type provider = { id: String, + display_name: String, + products: ::Array[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] + primary_color: String } class Provider < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? + attr_accessor id: String - def id=: (String) -> String + attr_accessor display_name: String + + attr_accessor products: ::Array[String] attr_reader authentication_methods: ::Array[FinchAPI::Provider::AuthenticationMethod]? @@ -29,10 +31,6 @@ module FinchAPI def beta=: (bool) -> bool - attr_reader display_name: String? - - def display_name=: (String) -> String - attr_reader icon: String? def icon=: (String) -> String @@ -53,1398 +51,64 @@ module FinchAPI def primary_color=: (String) -> String - attr_reader products: ::Array[String]? - - def products=: (::Array[String]) -> ::Array[String] - def initialize: ( - ?id: String, + id: String, + display_name: String, + products: ::Array[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] + ?primary_color: String ) -> void def to_hash: -> { id: String, + display_name: String, + products: ::Array[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] + primary_color: String } type authentication_method = { - benefits_support: FinchAPI::HRIS::BenefitsSupport?, - supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields?, - type: FinchAPI::Models::Provider::AuthenticationMethod::type_ + type: FinchAPI::Models::Provider::AuthenticationMethod::type_, + benefits_support: ::Hash[Symbol, top?], + supported_fields: ::Hash[Symbol, top?] } class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel - attr_accessor benefits_support: FinchAPI::HRIS::BenefitsSupport? + attr_accessor type: FinchAPI::Models::Provider::AuthenticationMethod::type_ + + attr_reader benefits_support: ::Hash[Symbol, top?]? - attr_accessor supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields? + def benefits_support=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] - attr_reader type: FinchAPI::Models::Provider::AuthenticationMethod::type_? + attr_reader supported_fields: ::Hash[Symbol, top?]? - def type=: ( - FinchAPI::Models::Provider::AuthenticationMethod::type_ - ) -> FinchAPI::Models::Provider::AuthenticationMethod::type_ + def supported_fields=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] def initialize: ( - ?benefits_support: FinchAPI::HRIS::BenefitsSupport?, - ?supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields?, - ?type: FinchAPI::Models::Provider::AuthenticationMethod::type_ + type: FinchAPI::Models::Provider::AuthenticationMethod::type_, + ?benefits_support: ::Hash[Symbol, top?], + ?supported_fields: ::Hash[Symbol, top?] ) -> void def to_hash: -> { - benefits_support: FinchAPI::HRIS::BenefitsSupport?, - supported_fields: FinchAPI::Provider::AuthenticationMethod::SupportedFields?, - type: FinchAPI::Models::Provider::AuthenticationMethod::type_ + type: FinchAPI::Models::Provider::AuthenticationMethod::type_, + benefits_support: ::Hash[Symbol, top?], + supported_fields: ::Hash[Symbol, top?] } - type supported_fields = - { - 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 - } - - class SupportedFields < FinchAPI::Internal::Type::BaseModel - attr_reader company: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company? - - def company=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company - - attr_reader directory: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory? - - def directory=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory - - attr_reader employment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment? - - def employment=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment - - attr_reader individual: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual? - - def individual=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual - - attr_reader pay_group: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup? - - def pay_group=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayGroup - - attr_reader pay_statement: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement? - - def pay_statement=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement - - attr_reader payment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment? - - def payment=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment - - def initialize: ( - ?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 - ) -> 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, - 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 - } - - class Company < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - attr_reader accounts: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts? - - def accounts=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts - - attr_reader departments: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments? - - def departments=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments - - attr_reader ein: bool? - - def ein=: (bool) -> bool - - attr_reader entity: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity? - - def entity=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity - - attr_reader legal_name: bool? - - def legal_name=: (bool) -> bool - - attr_reader locations: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations? - - def locations=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations - - attr_reader primary_email: bool? - - def primary_email=: (bool) -> bool - - attr_reader primary_phone_number: bool? - - def primary_phone_number=: (bool) -> bool - - def initialize: ( - ?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 - ) -> 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, - account_number: bool, - account_type: bool, - institution_name: bool, - routing_number: bool - } - - class Accounts < FinchAPI::Internal::Type::BaseModel - attr_reader account_name: bool? - - def account_name=: (bool) -> bool - - attr_reader account_number: bool? - - def account_number=: (bool) -> bool - - attr_reader account_type: bool? - - def account_type=: (bool) -> bool - - attr_reader institution_name: bool? - - def institution_name=: (bool) -> bool - - attr_reader routing_number: bool? - - def routing_number=: (bool) -> bool - - def initialize: ( - ?account_name: bool, - ?account_number: bool, - ?account_type: bool, - ?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 = - { - name: bool, - parent: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent - } - - class Departments < FinchAPI::Internal::Type::BaseModel - attr_reader name: bool? - - def name=: (bool) -> bool - - attr_reader parent: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent? - - def parent=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent - - def initialize: ( - ?name: bool, - ?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 - attr_reader name: bool? - - def name=: (bool) -> bool - - def initialize: (?name: bool) -> void - - def to_hash: -> { name: bool } - end - end - - type entity = { subtype: bool, type: bool } - - class Entity < FinchAPI::Internal::Type::BaseModel - attr_reader subtype: bool? - - def subtype=: (bool) -> bool - - attr_reader type: bool? - - def type=: (bool) -> bool - - def initialize: (?subtype: bool, ?type: bool) -> void - - def to_hash: -> { subtype: bool, type: bool } - end - - type locations = - { - city: bool, - country: bool, - :line1 => bool, - :line2 => bool, - postal_code: bool, - state: bool - } - - class Locations < FinchAPI::Internal::Type::BaseModel - attr_reader city: bool? - - def city=: (bool) -> bool - - attr_reader country: bool? - - def country=: (bool) -> bool - - attr_reader line1: bool? - - def line1=: (bool) -> bool - - attr_reader line2: bool? - - def line2=: (bool) -> bool - - attr_reader postal_code: bool? - - def postal_code=: (bool) -> bool - - attr_reader state: bool? - - def state=: (bool) -> bool - - def initialize: ( - ?city: bool, - ?country: bool, - ?line1: bool, - ?line2: bool, - ?postal_code: bool, - ?state: bool - ) -> void - - def to_hash: -> { - city: bool, - country: bool, - :line1 => bool, - :line2 => bool, - postal_code: bool, - state: bool - } - end - end - - type directory = - { - individuals: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, - paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging - } - - class Directory < FinchAPI::Internal::Type::BaseModel - attr_reader individuals: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals? - - def individuals=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals - - attr_reader paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging? - - def paging=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging - - def initialize: ( - ?individuals: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, - ?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, - department: bool, - first_name: bool, - is_active: bool, - last_name: bool, - manager: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, - middle_name: bool - } - - class Individuals < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - attr_reader department: bool? - - def department=: (bool) -> bool - - attr_reader first_name: bool? - - def first_name=: (bool) -> bool - - attr_reader is_active: bool? - - def is_active=: (bool) -> bool - - attr_reader last_name: bool? - - def last_name=: (bool) -> bool - - attr_reader manager: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager? - - def manager=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager - - attr_reader middle_name: bool? - - def middle_name=: (bool) -> bool - - def initialize: ( - ?id: bool, - ?department: bool, - ?first_name: bool, - ?is_active: bool, - ?last_name: bool, - ?manager: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, - ?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 - attr_reader id: bool? - - def id=: (bool) -> bool - - def initialize: (?id: bool) -> void - - def to_hash: -> { id: bool } - end - end - - type paging = { count: bool, offset: bool } - - class Paging < FinchAPI::Internal::Type::BaseModel - attr_reader count: bool? - - def count=: (bool) -> bool - - attr_reader offset: bool? - - def offset=: (bool) -> bool - - def initialize: (?count: bool, ?offset: bool) -> void - - def to_hash: -> { count: bool, offset: bool } - end - end - - type employment = - { - 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 - } - - class Employment < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - attr_reader class_code: bool? - - def class_code=: (bool) -> bool - - attr_reader custom_fields: bool? - - def custom_fields=: (bool) -> bool - - attr_reader department: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department? - - def department=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Department - - attr_reader employment: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment? - - def employment=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Employment - - attr_reader employment_status: bool? - - def employment_status=: (bool) -> bool - - attr_reader end_date: bool? - - def end_date=: (bool) -> bool - - attr_reader first_name: bool? - - def first_name=: (bool) -> bool - - attr_reader income: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income? - - def income=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income - - attr_reader income_history: bool? - - def income_history=: (bool) -> bool - - attr_reader is_active: bool? - - def is_active=: (bool) -> bool - - attr_reader last_name: bool? - - def last_name=: (bool) -> bool - - attr_reader location: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location? - - def location=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location - - attr_reader manager: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager? - - def manager=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager - - attr_reader middle_name: bool? - - def middle_name=: (bool) -> bool - - attr_reader start_date: bool? - - def start_date=: (bool) -> bool - - attr_reader title: bool? - - def title=: (bool) -> bool - - def initialize: ( - ?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 - ) -> 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 - attr_reader name: bool? - - def name=: (bool) -> bool - - def initialize: (?name: bool) -> void - - def to_hash: -> { name: bool } - end - - type employment = { subtype: bool, type: bool } - - class Employment < FinchAPI::Internal::Type::BaseModel - attr_reader subtype: bool? - - def subtype=: (bool) -> bool - - attr_reader type: bool? - - 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 } - - class Income < FinchAPI::Internal::Type::BaseModel - attr_reader amount: bool? - - def amount=: (bool) -> bool - - attr_reader currency: bool? - - def currency=: (bool) -> bool - - attr_reader unit: bool? - - def unit=: (bool) -> bool - - def initialize: ( - ?amount: bool, - ?currency: bool, - ?unit: bool - ) -> void - - def to_hash: -> { amount: bool, currency: bool, unit: bool } - end - - type location = - { - city: bool, - country: bool, - :line1 => bool, - :line2 => bool, - postal_code: bool, - state: bool - } - - class Location < FinchAPI::Internal::Type::BaseModel - attr_reader city: bool? - - def city=: (bool) -> bool - - attr_reader country: bool? - - def country=: (bool) -> bool - - attr_reader line1: bool? - - def line1=: (bool) -> bool - - attr_reader line2: bool? - - def line2=: (bool) -> bool - - attr_reader postal_code: bool? - - def postal_code=: (bool) -> bool - - attr_reader state: bool? - - def state=: (bool) -> bool - - def initialize: ( - ?city: bool, - ?country: bool, - ?line1: bool, - ?line2: bool, - ?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 } - - class Manager < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - def initialize: (?id: bool) -> void - - def to_hash: -> { id: bool } - end - end - - type individual = - { - 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 - } - - class Individual < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - attr_reader dob: bool? - - def dob=: (bool) -> bool - - attr_reader emails: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails? - - def emails=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails - - attr_reader encrypted_ssn: bool? - - def encrypted_ssn=: (bool) -> bool - - attr_reader ethnicity: bool? - - def ethnicity=: (bool) -> bool - - attr_reader first_name: bool? - - def first_name=: (bool) -> bool - - attr_reader gender: bool? - - def gender=: (bool) -> bool - - attr_reader last_name: bool? - - def last_name=: (bool) -> bool - - attr_reader middle_name: bool? - - def middle_name=: (bool) -> bool - - attr_reader phone_numbers: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers? - - def phone_numbers=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers - - attr_reader preferred_name: bool? - - def preferred_name=: (bool) -> bool - - attr_reader residence: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence? - - def residence=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Residence - - attr_reader ssn: bool? - - def ssn=: (bool) -> bool - - def initialize: ( - ?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 - ) -> 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 - attr_reader data: bool? - - def data=: (bool) -> bool - - attr_reader type: bool? - - 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 } - - class PhoneNumbers < FinchAPI::Internal::Type::BaseModel - attr_reader data: bool? - - def data=: (bool) -> bool - - attr_reader type: bool? - - def type=: (bool) -> bool - - def initialize: (?data: bool, ?type: bool) -> void - - def to_hash: -> { data: bool, type: bool } - end - - type residence = - { - city: bool, - country: bool, - :line1 => bool, - :line2 => bool, - postal_code: bool, - state: bool - } - - class Residence < FinchAPI::Internal::Type::BaseModel - attr_reader city: bool? - - def city=: (bool) -> bool - - attr_reader country: bool? - - def country=: (bool) -> bool - - attr_reader line1: bool? - - def line1=: (bool) -> bool - - attr_reader line2: bool? - - def line2=: (bool) -> bool - - attr_reader postal_code: bool? - - def postal_code=: (bool) -> bool - - attr_reader state: bool? - - def state=: (bool) -> bool - - def initialize: ( - ?city: bool, - ?country: bool, - ?line1: bool, - ?line2: bool, - ?postal_code: bool, - ?state: bool - ) -> void - - def to_hash: -> { - city: bool, - country: bool, - :line1 => bool, - :line2 => bool, - postal_code: bool, - state: bool - } - end - end - - type pay_group = - { - id: bool, - individual_ids: bool, - name: bool, - pay_frequencies: bool - } - - class PayGroup < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - attr_reader individual_ids: bool? - - def individual_ids=: (bool) -> bool - - attr_reader name: bool? - - def name=: (bool) -> bool - - attr_reader pay_frequencies: bool? - - def pay_frequencies=: (bool) -> bool - - def initialize: ( - ?id: bool, - ?individual_ids: bool, - ?name: bool, - ?pay_frequencies: bool - ) -> void - - def to_hash: -> { - id: bool, - individual_ids: bool, - name: bool, - pay_frequencies: bool - } - end - - type pay_statement = - { - paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, - pay_statements: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - } - - class PayStatement < FinchAPI::Internal::Type::BaseModel - attr_reader paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging? - - def paging=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging - - attr_reader pay_statements: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements? - - def pay_statements=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - - def initialize: ( - ?paging: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, - ?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 - attr_accessor count: bool - - attr_accessor offset: bool - - def initialize: (count: bool, offset: bool) -> void - - def to_hash: -> { count: bool, offset: bool } - end - - type pay_statements = - { - 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 - } - - class PayStatements < FinchAPI::Internal::Type::BaseModel - attr_reader earnings: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings? - - def earnings=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings - - attr_reader employee_deductions: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions? - - def employee_deductions=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions - - attr_reader employer_contributions: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions? - - def employer_contributions=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions - - attr_reader gross_pay: bool? - - def gross_pay=: (bool) -> bool - - attr_reader individual_id: bool? - - def individual_id=: (bool) -> bool - - attr_reader net_pay: bool? - - def net_pay=: (bool) -> bool - - attr_reader payment_method: bool? - - def payment_method=: (bool) -> bool - - attr_reader taxes: FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes? - - def taxes=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes - - attr_reader total_hours: bool? - - def total_hours=: (bool) -> bool - - attr_reader type: bool? - - def type=: (bool) -> bool - - def initialize: ( - ?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 - ) -> 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 } - - class Earnings < FinchAPI::Internal::Type::BaseModel - attr_reader amount: bool? - - def amount=: (bool) -> bool - - attr_reader currency: bool? - - def currency=: (bool) -> bool - - attr_reader name: bool? - - def name=: (bool) -> bool - - attr_reader type: bool? - - def type=: (bool) -> bool - - def initialize: ( - ?amount: bool, - ?currency: bool, - ?name: bool, - ?type: bool - ) -> void - - def to_hash: -> { - amount: bool, - currency: bool, - name: bool, - type: bool - } - end - - type employee_deductions = - { - amount: bool, - currency: bool, - name: bool, - pre_tax: bool, - type: bool - } - - class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel - attr_reader amount: bool? - - def amount=: (bool) -> bool - - attr_reader currency: bool? - - def currency=: (bool) -> bool - - attr_reader name: bool? - - def name=: (bool) -> bool - - attr_reader pre_tax: bool? - - def pre_tax=: (bool) -> bool - - attr_reader type: bool? - - def type=: (bool) -> bool - - def initialize: ( - ?amount: bool, - ?currency: bool, - ?name: bool, - ?pre_tax: bool, - ?type: bool - ) -> void - - def to_hash: -> { - amount: bool, - currency: bool, - name: bool, - pre_tax: bool, - type: bool - } - end - - type employer_contributions = - { amount: bool, currency: bool, name: bool } - - class EmployerContributions < FinchAPI::Internal::Type::BaseModel - attr_reader amount: bool? - - def amount=: (bool) -> bool - - attr_reader currency: bool? - - def currency=: (bool) -> bool - - attr_reader name: bool? - - def name=: (bool) -> bool - - def initialize: ( - ?amount: bool, - ?currency: bool, - ?name: bool - ) -> void - - def to_hash: -> { amount: bool, currency: bool, name: bool } - end - - type taxes = - { - amount: bool, - currency: bool, - employer: bool, - name: bool, - type: bool - } - - class Taxes < FinchAPI::Internal::Type::BaseModel - attr_reader amount: bool? - - def amount=: (bool) -> bool - - attr_reader currency: bool? - - def currency=: (bool) -> bool - - attr_reader employer: bool? - - def employer=: (bool) -> bool - - attr_reader name: bool? - - def name=: (bool) -> bool - - attr_reader type: bool? - - def type=: (bool) -> bool - - def initialize: ( - ?amount: bool, - ?currency: bool, - ?employer: bool, - ?name: bool, - ?type: bool - ) -> void - - def to_hash: -> { - amount: bool, - currency: bool, - employer: bool, - name: bool, - type: bool - } - end - end - end - - type payment = - { - 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 - } - - class Payment < FinchAPI::Internal::Type::BaseModel - attr_reader id: bool? - - def id=: (bool) -> bool - - attr_reader company_debit: bool? - - def company_debit=: (bool) -> bool - - attr_reader debit_date: bool? - - def debit_date=: (bool) -> bool - - attr_reader employee_taxes: bool? - - def employee_taxes=: (bool) -> bool - - attr_reader employer_taxes: bool? - - def employer_taxes=: (bool) -> bool - - attr_reader gross_pay: bool? - - def gross_pay=: (bool) -> bool - - attr_reader individual_ids: bool? - - def individual_ids=: (bool) -> bool - - attr_reader net_pay: bool? - - def net_pay=: (bool) -> bool - - attr_reader pay_date: bool? - - def pay_date=: (bool) -> bool - - attr_reader pay_frequencies: bool? - - def pay_frequencies=: (bool) -> bool - - attr_reader pay_group_ids: bool? - - def pay_group_ids=: (bool) -> bool - - attr_reader pay_period: FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod? - - def pay_period=: ( - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod - ) -> FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod - - def initialize: ( - ?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 - ) -> 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 - attr_reader end_date: bool? - - def end_date=: (bool) -> bool - - attr_reader start_date: bool? - - 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 - type type_ = - :assisted | :credential | :api_token | :api_credential | :oauth + :assisted | :credential | :api_token | :api_credential | :oauth | :api module Type extend FinchAPI::Internal::Type::Enum @@ -1454,6 +118,7 @@ module FinchAPI API_TOKEN: :api_token API_CREDENTIAL: :api_credential OAUTH: :oauth + API: :api def self?.values: -> ::Array[FinchAPI::Models::Provider::AuthenticationMethod::type_] end diff --git a/sig/finch_api/models/provider_list_response.rbs b/sig/finch_api/models/provider_list_response.rbs new file mode 100644 index 00000000..0c54806f --- /dev/null +++ b/sig/finch_api/models/provider_list_response.rbs @@ -0,0 +1,128 @@ +module FinchAPI + module Models + type provider_list_response = + { + id: String, + display_name: String, + products: ::Array[String], + authentication_methods: ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod], + beta: bool, + icon: String, + logo: String, + manual: bool, + mfa_required: bool, + primary_color: String + } + + class ProviderListResponse < FinchAPI::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor display_name: String + + attr_accessor products: ::Array[String] + + attr_reader authentication_methods: ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod]? + + def authentication_methods=: ( + ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod] + ) -> ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod] + + attr_reader beta: bool? + + def beta=: (bool) -> bool + + attr_reader icon: String? + + def icon=: (String) -> String + + attr_reader logo: String? + + def logo=: (String) -> String + + attr_reader manual: bool? + + def manual=: (bool) -> bool + + attr_reader mfa_required: bool? + + def mfa_required=: (bool) -> bool + + attr_reader primary_color: String? + + def primary_color=: (String) -> String + + def initialize: ( + id: String, + display_name: String, + products: ::Array[String], + ?authentication_methods: ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod], + ?beta: bool, + ?icon: String, + ?logo: String, + ?manual: bool, + ?mfa_required: bool, + ?primary_color: String + ) -> void + + def to_hash: -> { + id: String, + display_name: String, + products: ::Array[String], + authentication_methods: ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod], + beta: bool, + icon: String, + logo: String, + manual: bool, + mfa_required: bool, + primary_color: String + } + + type authentication_method = + { + type: FinchAPI::Models::ProviderListResponse::AuthenticationMethod::type_, + benefits_support: ::Hash[Symbol, top?], + supported_fields: ::Hash[Symbol, top?] + } + + class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel + attr_accessor type: FinchAPI::Models::ProviderListResponse::AuthenticationMethod::type_ + + attr_reader benefits_support: ::Hash[Symbol, top?]? + + def benefits_support=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] + + attr_reader supported_fields: ::Hash[Symbol, top?]? + + def supported_fields=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?] + + def initialize: ( + type: FinchAPI::Models::ProviderListResponse::AuthenticationMethod::type_, + ?benefits_support: ::Hash[Symbol, top?], + ?supported_fields: ::Hash[Symbol, top?] + ) -> void + + def to_hash: -> { + type: FinchAPI::Models::ProviderListResponse::AuthenticationMethod::type_, + benefits_support: ::Hash[Symbol, top?], + supported_fields: ::Hash[Symbol, top?] + } + + type type_ = + :assisted | :credential | :api_token | :api_credential | :oauth | :api + + module Type + extend FinchAPI::Internal::Type::Enum + + ASSISTED: :assisted + CREDENTIAL: :credential + API_TOKEN: :api_token + API_CREDENTIAL: :api_credential + OAUTH: :oauth + API: :api + + def self?.values: -> ::Array[FinchAPI::Models::ProviderListResponse::AuthenticationMethod::type_] + end + end + 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 4076daaa..6473bc55 100644 --- a/sig/finch_api/models/request_forwarding_forward_params.rbs +++ b/sig/finch_api/models/request_forwarding_forward_params.rbs @@ -5,8 +5,8 @@ module FinchAPI method_: String, route: String, data: String?, - headers: top?, - params: top? + headers: ::Hash[Symbol, top?]?, + params: ::Hash[Symbol, top?]? } & FinchAPI::Internal::Type::request_parameters @@ -20,16 +20,16 @@ module FinchAPI attr_accessor data: String? - attr_accessor headers: top? + attr_accessor headers: ::Hash[Symbol, top?]? - attr_accessor params: top? + attr_accessor params: ::Hash[Symbol, top?]? def initialize: ( method_: String, route: String, ?data: String?, - ?headers: top?, - ?params: top?, + ?headers: ::Hash[Symbol, top?]?, + ?params: ::Hash[Symbol, top?]?, ?request_options: FinchAPI::request_opts ) -> void @@ -37,8 +37,8 @@ module FinchAPI method_: String, route: String, data: String?, - headers: top?, - params: top?, + headers: ::Hash[Symbol, top?]?, + params: ::Hash[Symbol, top?]?, request_options: FinchAPI::RequestOptions } end diff --git a/sig/finch_api/models/request_forwarding_forward_response.rbs b/sig/finch_api/models/request_forwarding_forward_response.rbs index 56cb9d24..7ab741f8 100644 --- a/sig/finch_api/models/request_forwarding_forward_response.rbs +++ b/sig/finch_api/models/request_forwarding_forward_response.rbs @@ -2,70 +2,80 @@ module FinchAPI module Models type request_forwarding_forward_response = { - data: String?, - headers: top?, request: FinchAPI::Models::RequestForwardingForwardResponse::Request, - status_code: Integer + status_code: Integer, + data: String?, + headers: ::Hash[Symbol, top?]? } class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel - attr_accessor data: String? - - attr_accessor headers: top? - attr_accessor request: FinchAPI::Models::RequestForwardingForwardResponse::Request attr_accessor status_code: Integer + attr_accessor data: String? + + attr_accessor headers: ::Hash[Symbol, top?]? + def initialize: ( - data: String?, - headers: top?, request: FinchAPI::Models::RequestForwardingForwardResponse::Request, - status_code: Integer + status_code: Integer, + ?data: String?, + ?headers: ::Hash[Symbol, top?]? ) -> void def to_hash: -> { - data: String?, - headers: top?, request: FinchAPI::Models::RequestForwardingForwardResponse::Request, - status_code: Integer + status_code: Integer, + data: String?, + headers: ::Hash[Symbol, top?]? } type request = { - data: String?, - headers: top?, method_: String, - params: top?, - route: String + route: String, + data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data?, + headers: ::Hash[Symbol, top?]?, + params: ::Hash[Symbol, top?]? } class Request < FinchAPI::Internal::Type::BaseModel - attr_accessor data: String? + attr_accessor method_: String - attr_accessor headers: top? + attr_accessor route: String - attr_accessor method_: String + attr_accessor data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data? - attr_accessor params: top? + attr_accessor headers: ::Hash[Symbol, top?]? - attr_accessor route: String + attr_accessor params: ::Hash[Symbol, top?]? def initialize: ( - data: String?, - headers: top?, method_: String, - params: top?, - route: String + route: String, + ?data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data?, + ?headers: ::Hash[Symbol, top?]?, + ?params: ::Hash[Symbol, top?]? ) -> void def to_hash: -> { - data: String?, - headers: top?, method_: String, - params: top?, - route: String + route: String, + data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data?, + headers: ::Hash[Symbol, top?]?, + params: ::Hash[Symbol, top?]? } + + type data = String | ::Hash[Symbol, top?] + + module Data + extend FinchAPI::Internal::Type::Union + + def self?.variants: -> ::Array[FinchAPI::Models::RequestForwardingForwardResponse::Request::data] + + UnionMember1Map: FinchAPI::Internal::Type::Converter + end end end end diff --git a/sig/finch_api/resources/connect/sessions.rbs b/sig/finch_api/resources/connect/sessions.rbs index bc282759..884fdd08 100644 --- a/sig/finch_api/resources/connect/sessions.rbs +++ b/sig/finch_api/resources/connect/sessions.rbs @@ -3,23 +3,23 @@ module FinchAPI class Connect class Sessions def new: ( + customer_email: String?, customer_id: String, customer_name: String, + integration: FinchAPI::Connect::SessionNewParams::Integration?, + manual: bool?, + minutes_to_expire: Float?, 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?, + redirect_uri: String?, + sandbox: FinchAPI::Models::Connect::SessionNewParams::sandbox?, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::Connect::SessionNewResponse def reauthenticate: ( connection_id: String, - ?minutes_to_expire: Integer?, - ?products: ::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::product]?, - ?redirect_uri: String?, + minutes_to_expire: Integer, + 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/benefits.rbs b/sig/finch_api/resources/hris/benefits.rbs index efbcdcf4..0efe0e12 100644 --- a/sig/finch_api/resources/hris/benefits.rbs +++ b/sig/finch_api/resources/hris/benefits.rbs @@ -5,6 +5,7 @@ module FinchAPI attr_reader individuals: FinchAPI::Resources::HRIS::Benefits::Individuals def create: ( + ?entity_ids: ::Array[String], ?company_contribution: FinchAPI::HRIS::BenefitCreateParams::CompanyContribution?, ?description: String, ?frequency: FinchAPI::Models::HRIS::benefit_frequency?, @@ -14,20 +15,24 @@ module FinchAPI def retrieve: ( String benefit_id, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::HRIS::CompanyBenefit def update: ( String benefit_id, + ?entity_ids: ::Array[String], ?description: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::HRIS::UpdateCompanyBenefitResponse def list: ( + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::SinglePage[FinchAPI::HRIS::CompanyBenefit] def list_supported_benefits: ( + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::SinglePage[FinchAPI::HRIS::SupportedBenefit] diff --git a/sig/finch_api/resources/hris/benefits/individuals.rbs b/sig/finch_api/resources/hris/benefits/individuals.rbs index a8349445..be6ef14e 100644 --- a/sig/finch_api/resources/hris/benefits/individuals.rbs +++ b/sig/finch_api/resources/hris/benefits/individuals.rbs @@ -5,23 +5,27 @@ module FinchAPI class Individuals def enroll_many: ( String benefit_id, + ?entity_ids: ::Array[String], ?individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual], ?request_options: FinchAPI::request_opts ) -> FinchAPI::HRIS::Benefits::EnrolledIndividualBenefitResponse def enrolled_ids: ( String benefit_id, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse def retrieve_many_benefits: ( String benefit_id, + ?entity_ids: ::Array[String], ?individual_ids: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::SinglePage[FinchAPI::HRIS::Benefits::IndividualBenefit] def unenroll_many: ( String benefit_id, + ?entity_ids: ::Array[String], ?individual_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::HRIS::Benefits::UnenrolledIndividualBenefitResponse diff --git a/sig/finch_api/resources/hris/company.rbs b/sig/finch_api/resources/hris/company.rbs index faeb18ce..9cc37e7c 100644 --- a/sig/finch_api/resources/hris/company.rbs +++ b/sig/finch_api/resources/hris/company.rbs @@ -5,6 +5,7 @@ module FinchAPI attr_reader pay_statement_item: FinchAPI::Resources::HRIS::Company::PayStatementItem def retrieve: ( + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::HRIS::HRISCompany 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 00da5c7b..a17ab6da 100644 --- a/sig/finch_api/resources/hris/company/pay_statement_item.rbs +++ b/sig/finch_api/resources/hris/company/pay_statement_item.rbs @@ -8,6 +8,7 @@ module FinchAPI def list: ( ?categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], ?end_date: Date, + ?entity_ids: ::Array[String], ?name: String, ?start_date: Date, ?type: String, diff --git a/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs b/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs index 1d171d88..da5da32c 100644 --- a/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs +++ b/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs @@ -5,6 +5,7 @@ module FinchAPI class PayStatementItem class Rules def create: ( + ?entity_ids: ::Array[String], ?attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, ?conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], ?effective_end_date: String?, @@ -15,16 +16,19 @@ module FinchAPI def update: ( String rule_id, + ?entity_ids: ::Array[String], ?optional_property: top, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse def list: ( + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse] def delete: ( String rule_id, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse diff --git a/sig/finch_api/resources/hris/directory.rbs b/sig/finch_api/resources/hris/directory.rbs index 448363a4..00c19349 100644 --- a/sig/finch_api/resources/hris/directory.rbs +++ b/sig/finch_api/resources/hris/directory.rbs @@ -3,6 +3,7 @@ module FinchAPI class HRIS class Directory def list: ( + ?entity_ids: ::Array[String], ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts diff --git a/sig/finch_api/resources/hris/documents.rbs b/sig/finch_api/resources/hris/documents.rbs index f760d678..a3c64945 100644 --- a/sig/finch_api/resources/hris/documents.rbs +++ b/sig/finch_api/resources/hris/documents.rbs @@ -3,6 +3,7 @@ module FinchAPI class HRIS class Documents def list: ( + ?entity_ids: ::Array[String], ?individual_ids: ::Array[String], ?limit: Integer, ?offset: Integer, @@ -12,6 +13,7 @@ module FinchAPI def retreive: ( String document_id, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::HRIS::document_retreive_response diff --git a/sig/finch_api/resources/hris/employments.rbs b/sig/finch_api/resources/hris/employments.rbs index 69df120c..ff19697d 100644 --- a/sig/finch_api/resources/hris/employments.rbs +++ b/sig/finch_api/resources/hris/employments.rbs @@ -4,6 +4,7 @@ module FinchAPI class Employments def retrieve_many: ( requests: ::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request], + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::HRIS::EmploymentDataResponse] diff --git a/sig/finch_api/resources/hris/individuals.rbs b/sig/finch_api/resources/hris/individuals.rbs index d1425ebc..7b6b60a8 100644 --- a/sig/finch_api/resources/hris/individuals.rbs +++ b/sig/finch_api/resources/hris/individuals.rbs @@ -3,6 +3,7 @@ module FinchAPI class HRIS class Individuals def retrieve_many: ( + ?entity_ids: ::Array[String], ?options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, ?requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], ?request_options: FinchAPI::request_opts diff --git a/sig/finch_api/resources/hris/pay_statements.rbs b/sig/finch_api/resources/hris/pay_statements.rbs index 2485acca..6db45da9 100644 --- a/sig/finch_api/resources/hris/pay_statements.rbs +++ b/sig/finch_api/resources/hris/pay_statements.rbs @@ -4,6 +4,7 @@ module FinchAPI class PayStatements def retrieve_many: ( requests: ::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request], + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::HRIS::PayStatementResponse] diff --git a/sig/finch_api/resources/hris/payments.rbs b/sig/finch_api/resources/hris/payments.rbs index d3a295af..cf2579df 100644 --- a/sig/finch_api/resources/hris/payments.rbs +++ b/sig/finch_api/resources/hris/payments.rbs @@ -5,6 +5,7 @@ module FinchAPI def list: ( end_date: Date, start_date: Date, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::SinglePage[FinchAPI::HRIS::Payment] diff --git a/sig/finch_api/resources/jobs/automated.rbs b/sig/finch_api/resources/jobs/automated.rbs index f97a6fad..f23f755c 100644 --- a/sig/finch_api/resources/jobs/automated.rbs +++ b/sig/finch_api/resources/jobs/automated.rbs @@ -10,12 +10,10 @@ module FinchAPI def retrieve: ( String job_id, - ?entity_id: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Jobs::AutomatedAsyncJob def list: ( - ?entity_id: String, ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts diff --git a/sig/finch_api/resources/jobs/manual.rbs b/sig/finch_api/resources/jobs/manual.rbs index 365fe1a7..41f4515e 100644 --- a/sig/finch_api/resources/jobs/manual.rbs +++ b/sig/finch_api/resources/jobs/manual.rbs @@ -4,7 +4,6 @@ module FinchAPI class Manual def retrieve: ( String job_id, - ?entity_id: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Jobs::ManualAsyncJob diff --git a/sig/finch_api/resources/payroll/pay_groups.rbs b/sig/finch_api/resources/payroll/pay_groups.rbs index 6c305dd0..55b93dc1 100644 --- a/sig/finch_api/resources/payroll/pay_groups.rbs +++ b/sig/finch_api/resources/payroll/pay_groups.rbs @@ -4,10 +4,12 @@ module FinchAPI class PayGroups def retrieve: ( String pay_group_id, + ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::Payroll::PayGroupRetrieveResponse def list: ( + ?entity_ids: ::Array[String], ?individual_id: String, ?pay_frequencies: ::Array[String], ?request_options: FinchAPI::request_opts diff --git a/sig/finch_api/resources/providers.rbs b/sig/finch_api/resources/providers.rbs index 6c4dfd04..5d643e2d 100644 --- a/sig/finch_api/resources/providers.rbs +++ b/sig/finch_api/resources/providers.rbs @@ -3,7 +3,7 @@ module FinchAPI class Providers def list: ( ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Internal::SinglePage[FinchAPI::Provider] + ) -> FinchAPI::Internal::SinglePage[FinchAPI::Models::ProviderListResponse] def initialize: (client: FinchAPI::Client) -> void end diff --git a/sig/finch_api/resources/request_forwarding.rbs b/sig/finch_api/resources/request_forwarding.rbs index a27debf7..1646cf97 100644 --- a/sig/finch_api/resources/request_forwarding.rbs +++ b/sig/finch_api/resources/request_forwarding.rbs @@ -5,8 +5,8 @@ module FinchAPI method_: String, route: String, ?data: String?, - ?headers: top?, - ?params: top?, + ?headers: ::Hash[Symbol, top?]?, + ?params: ::Hash[Symbol, top?]?, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::RequestForwardingForwardResponse diff --git a/test/finch_api/internal/util_test.rb b/test/finch_api/internal/util_test.rb index cf266dbf..f3cd1297 100644 --- a/test/finch_api/internal/util_test.rb +++ b/test/finch_api/internal/util_test.rb @@ -124,6 +124,14 @@ def test_joining path: "/c", query: {"d" => ["e"]} } + ], + [ + "h://a.b/c?d=e", + "h://nope", + { + path: "h://a.b/c", + query: {"d" => ["e"]} + } ] ] @@ -213,22 +221,38 @@ def env_table end end + def test_encoding_length + headers, = FinchAPI::Internal::Util.encode_content( + {"content-type" => "multipart/form-data"}, + Pathname(__FILE__) + ) + assert_pattern do + headers.fetch("content-type") => /boundary=(.+)$/ + end + field, = Regexp.last_match.captures + assert(field.length < 70 - 6) + end + def test_file_encode file = Pathname(__FILE__) + fileinput = FinchAPI::Internal::Type::Converter.dump(FinchAPI::Internal::Type::FileInput, "abc") headers = {"content-type" => "multipart/form-data"} cases = { - "abc" => "abc", - StringIO.new("abc") => "abc", - FinchAPI::FilePart.new("abc") => "abc", - FinchAPI::FilePart.new(StringIO.new("abc")) => "abc", - file => /^class FinchAPI/, - FinchAPI::FilePart.new(file) => /^class FinchAPI/ + "abc" => ["", "abc"], + StringIO.new("abc") => ["", "abc"], + fileinput => %w[upload abc], + FinchAPI::FilePart.new(StringIO.new("abc")) => ["", "abc"], + file => [file.basename.to_path, /^class FinchAPI/], + FinchAPI::FilePart.new(file, filename: "d o g") => ["d%20o%20g", /^class FinchAPI/] } - cases.each do |body, val| + cases.each do |body, testcase| + filename, val = testcase encoded = FinchAPI::Internal::Util.encode_content(headers, body) cgi = FakeCGI.new(*encoded) + io = cgi[""] assert_pattern do - cgi[""].read => ^val + io.original_filename => ^filename + io.read => ^val end end end @@ -249,7 +273,14 @@ def test_hash_encode cgi = FakeCGI.new(*encoded) testcase.each do |key, val| assert_pattern do - cgi[key] => ^val + parsed = + case (p = cgi[key]) + in StringIO + p.read + else + p + end + parsed => ^val end end end @@ -287,6 +318,54 @@ def test_copy_write end class FinchAPI::Test::UtilFusedEnumTest < Minitest::Test + def test_rewind_closing + touched = false + once = 0 + steps = 0 + enum = Enumerator.new do |y| + next if touched + + 10.times do + steps = _1 + y << _1 + end + ensure + once = once.succ + end + + fused = FinchAPI::Internal::Util.fused_enum(enum, external: true) do + touched = true + loop { enum.next } + end + FinchAPI::Internal::Util.close_fused!(fused) + + assert_equal(1, once) + assert_equal(0, steps) + end + + def test_thread_interrupts + once = 0 + que = Queue.new + enum = Enumerator.new do |y| + 10.times { y << _1 } + ensure + once = once.succ + end + + fused_1 = FinchAPI::Internal::Util.fused_enum(enum, external: true) { loop { enum.next } } + fused_2 = FinchAPI::Internal::Util.chain_fused(fused_1) { fused_1.each(&_1) } + fused_3 = FinchAPI::Internal::Util.chain_fused(fused_2) { fused_2.each(&_1) } + + th = ::Thread.new do + que << "🐶" + fused_3.each { sleep(10) } + end + + assert_equal("🐶", que.pop) + th.kill.join + assert_equal(1, once) + end + def test_closing arr = [1, 2, 3] once = 0 diff --git a/test/finch_api/resources/access_tokens_test.rb b/test/finch_api/resources/access_tokens_test.rb index 766e8cf7..ecc07d83 100644 --- a/test/finch_api/resources/access_tokens_test.rb +++ b/test/finch_api/resources/access_tokens_test.rb @@ -16,6 +16,7 @@ def test_create_required_params client_type: FinchAPI::CreateAccessTokenResponse::ClientType, connection_id: String, connection_type: FinchAPI::CreateAccessTokenResponse::ConnectionType, + entity_ids: ^(FinchAPI::Internal::Type::ArrayOf[String]), products: ^(FinchAPI::Internal::Type::ArrayOf[String]), provider_id: String, token_type: String, diff --git a/test/finch_api/resources/account_test.rb b/test/finch_api/resources/account_test.rb index 0918a3d3..4231a3c1 100644 --- a/test/finch_api/resources/account_test.rb +++ b/test/finch_api/resources/account_test.rb @@ -40,8 +40,7 @@ def test_introspect customer_email: String | nil, customer_id: String | nil, customer_name: String | nil, - entity_ids: ^(FinchAPI::Internal::Type::ArrayOf[String]) | nil, - entity_mode: FinchAPI::Introspection::EntityMode | nil, + entities: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Introspection::Entity]) | nil, manual: FinchAPI::Internal::Type::Boolean | nil, payroll_provider_id: String | nil, username: String | nil diff --git a/test/finch_api/resources/connect/sessions_test.rb b/test/finch_api/resources/connect/sessions_test.rb index 3d14e88c..e51c7d7f 100644 --- a/test/finch_api/resources/connect/sessions_test.rb +++ b/test/finch_api/resources/connect/sessions_test.rb @@ -6,7 +6,18 @@ class FinchAPI::Test::Resources::Connect::SessionsTest < FinchAPI::Test::Resourc def test_new_required_params skip("prism tests are broken") - response = @finch.connect.sessions.new(customer_id: "x", customer_name: "x", products: [:company]) + response = + @finch.connect.sessions.new( + customer_email: "dev@stainless.com", + customer_id: "x", + customer_name: "x", + integration: {auth_method: :assisted, provider: "provider"}, + manual: true, + minutes_to_expire: 1, + products: [:benefits], + redirect_uri: "redirect_uri", + sandbox: :finch + ) assert_pattern do response => FinchAPI::Models::Connect::SessionNewResponse @@ -23,7 +34,13 @@ def test_new_required_params def test_reauthenticate_required_params skip("prism tests are broken") - response = @finch.connect.sessions.reauthenticate(connection_id: "connection_id") + response = + @finch.connect.sessions.reauthenticate( + connection_id: "connection_id", + minutes_to_expire: 0, + products: [:benefits], + redirect_uri: "https://example.com" + ) assert_pattern do response => FinchAPI::Models::Connect::SessionReauthenticateResponse diff --git a/test/finch_api/resources/hris/documents_test.rb b/test/finch_api/resources/hris/documents_test.rb index 1c00da1b..47d68280 100644 --- a/test/finch_api/resources/hris/documents_test.rb +++ b/test/finch_api/resources/hris/documents_test.rb @@ -34,8 +34,8 @@ def test_retreive assert_pattern do case response - in {type: :w4_2020, data: FinchAPI::HRIS::W42020::Data | nil, year: Float | nil} - in {type: :w4_2005, data: FinchAPI::HRIS::W42005::Data | nil, year: Float | nil} + in {type: :w4_2020, data: FinchAPI::HRIS::W42020::Data, year: Float} + in {type: :w4_2005, data: FinchAPI::HRIS::W42005::Data, year: Float} end end end diff --git a/test/finch_api/resources/providers_test.rb b/test/finch_api/resources/providers_test.rb index 42c03b10..b8e7ec08 100644 --- a/test/finch_api/resources/providers_test.rb +++ b/test/finch_api/resources/providers_test.rb @@ -14,21 +14,21 @@ def test_list return if row.nil? assert_pattern do - row => FinchAPI::Provider + row => FinchAPI::Models::ProviderListResponse end assert_pattern do row => { - id: String | nil, - authentication_methods: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Provider::AuthenticationMethod]) | nil, + id: String, + display_name: String, + products: ^(FinchAPI::Internal::Type::ArrayOf[String]), + authentication_methods: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::ProviderListResponse::AuthenticationMethod]) | nil, beta: FinchAPI::Internal::Type::Boolean | nil, - display_name: String | nil, icon: String | nil, logo: String | nil, manual: FinchAPI::Internal::Type::Boolean | nil, mfa_required: FinchAPI::Internal::Type::Boolean | nil, - primary_color: String | nil, - products: ^(FinchAPI::Internal::Type::ArrayOf[String]) | nil + primary_color: String | nil } end end diff --git a/test/finch_api/resources/request_forwarding_test.rb b/test/finch_api/resources/request_forwarding_test.rb index 3420553a..9e14f87a 100644 --- a/test/finch_api/resources/request_forwarding_test.rb +++ b/test/finch_api/resources/request_forwarding_test.rb @@ -4,7 +4,7 @@ class FinchAPI::Test::Resources::RequestForwardingTest < FinchAPI::Test::ResourceTest def test_forward_required_params - response = @finch.request_forwarding.forward(method_: "POST", route: "/people/search") + response = @finch.request_forwarding.forward(method_: "method", route: "route") assert_pattern do response => FinchAPI::Models::RequestForwardingForwardResponse @@ -12,10 +12,10 @@ def test_forward_required_params assert_pattern do response => { - data: String | nil, - headers: FinchAPI::Internal::Type::Unknown | nil, request: FinchAPI::Models::RequestForwardingForwardResponse::Request, - status_code: Integer + status_code: Integer, + data: String | nil, + headers: ^(FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true]) | nil } end end