diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2c0c8f7..5c4aa874 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,19 @@ name: CI on: push: - branches: - - main - pull_request: - branches: - - main - - next + branches-ignore: + - 'generated' + - 'codegen/**' + - 'integrated/**' + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: + timeout-minutes: 10 name: lint - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + steps: - uses: actions/checkout@v4 - name: Set up Ruby @@ -25,8 +27,9 @@ jobs: - name: Run lints run: ./scripts/lint test: + timeout-minutes: 10 name: test - runs-on: ubuntu-latest + runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 - name: Set up Ruby diff --git a/.gitignore b/.gitignore index 8b1228a8..3d26ceed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ *.gem .idea/ +.ignore .prism.log .ruby-lsp/ .yardoc/ -Brewfile.lock.json bin/tapioca +Brewfile.lock.json doc/ -sorbet/* -!/sorbet/config +sorbet/tapioca/* diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fd0ccba9..000572ec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.12" + ".": "0.1.0-alpha.13" } \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml index 2b468d05..1792ec63 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -64,11 +64,19 @@ Layout/MultilineMethodParameterLineBreaks: Layout/SpaceInsideHashLiteralBraces: EnforcedStyle: no_space +Lint/BooleanSymbol: + Enabled: false + # This option occasionally mangles identifier names Lint/DeprecatedConstants: Exclude: - "**/*.rbi" +# We use pattern assertion in tests to ensure correctness. +Lint/DuplicateMatchPattern: + Exclude: + - "test/**/*" + # Fairly useful in tests for pattern assertions. Lint/EmptyInPattern: Exclude: @@ -119,6 +127,9 @@ Metrics/ParameterLists: Metrics/PerceivedComplexity: Enabled: false +Naming/AccessorMethodName: + Enabled: false + # Need to preserve block identifier for documentation. Naming/BlockForwarding: Enabled: false @@ -244,6 +255,7 @@ Style/SafeNavigation: Style/SignalException: Exclude: - Rakefile + - "**/*.rake" # We use these sparingly, where we anticipate future branches for the # inner conditional. diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..fd2a0186 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.0 diff --git a/.stats.yml b/.stats.yml index b6f7c20d..eae7b08e 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-46640c1b468813b828be61b1af5cb5450f9555c4c757c5a740189906a8d56672.yml -openapi_spec_hash: 1d5845ae61d2c0a143db43d579b048c5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e5ab676f0996530fe4c702d8cbb88862ab8382792d01197a9576e06f5a359d00.yml +openapi_spec_hash: 5c0dec3d2e1fea26d5f99560b226aedd config_hash: 53778a0b839c4f6ad34fbba051f5e8a6 diff --git a/.yardopts b/.yardopts index 004c697b..84c12f2a 100644 --- a/.yardopts +++ b/.yardopts @@ -1,3 +1,5 @@ +--type-name-tag generic:Generic +--default-return void --markup markdown --markup-provider redcarpet --exclude /rbi diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b0b852..aef36bb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## 0.1.0-alpha.13 (2025-04-29) + +Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.12...v0.1.0-alpha.13) + +### Features + +* **api:** api update ([2763397](https://github.com/Finch-API/finch-api-ruby/commit/2763397ba5fb250521e2670796fac35dab3e479d)) +* **api:** api update ([e8ea0b2](https://github.com/Finch-API/finch-api-ruby/commit/e8ea0b2f1288158944ee787612d3a7840212e728)) +* **api:** api update ([a8916c9](https://github.com/Finch-API/finch-api-ruby/commit/a8916c92f39f9cce9b8b1718e1651d9609b16bb8)) +* **api:** api update ([b5ceabb](https://github.com/Finch-API/finch-api-ruby/commit/b5ceabb5157f3cb177c292ac1db38fe2ee2398ed)) +* **api:** api update ([9f9b600](https://github.com/Finch-API/finch-api-ruby/commit/9f9b600482ef6c4c257877fab587338311202d1d)) +* **api:** api update ([9c98649](https://github.com/Finch-API/finch-api-ruby/commit/9c986495c3111434466d972f42477322385a7794)) +* **api:** api update ([7dcee57](https://github.com/Finch-API/finch-api-ruby/commit/7dcee57d8114c3c871e79f660bbf3d6d0aade886)) +* **api:** api update ([b0bc9bb](https://github.com/Finch-API/finch-api-ruby/commit/b0bc9bbb1660ee83252d2d646af79cf55dee8ce9)) +* **api:** api update ([106335f](https://github.com/Finch-API/finch-api-ruby/commit/106335f11705616838e59a848551c51ca73fec8d)) + + +### Bug Fixes + +* invalid enum names ([89de302](https://github.com/Finch-API/finch-api-ruby/commit/89de3026ca9a44c9b038caf0239d5eb1e04c17a1)) + + +### Chores + +* add generator safe directory ([7e8da29](https://github.com/Finch-API/finch-api-ruby/commit/7e8da298f02a5cfe40012daffd18ac439c426ff6)) +* **internal:** annotate request options with type aliases in sorbet ([6f63db8](https://github.com/Finch-API/finch-api-ruby/commit/6f63db86081f88b411261a50028c95ca16a29e65)) +* **internal:** remove unnecessary `rbi/lib` folder ([2238283](https://github.com/Finch-API/finch-api-ruby/commit/2238283c857c1a425133f6ff2f1b4f0ae8b1b84a)) +* loosen rubocop rules that don't always make sense ([6699ec0](https://github.com/Finch-API/finch-api-ruby/commit/6699ec06493bd11bd15ef59bdc5c0ba0413f6dba)) +* more accurate type annotations and aliases ([b6d3a80](https://github.com/Finch-API/finch-api-ruby/commit/b6d3a804a617710558f198d26947d57fdfefef14)) + ## 0.1.0-alpha.12 (2025-04-18) Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.11...v0.1.0-alpha.12) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..9173c51c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,125 @@ +## Setting up the environment + +This repository contains a `.ruby-version` file, which should work with either [rbenv](https://github.com/rbenv/rbenv) or [asdf](https://github.com/asdf-vm/asdf) with the [ruby plugin](https://github.com/asdf-vm/asdf-ruby). + +Please follow the instructions for your preferred version manager to install the Ruby version specified in the `.ruby-version` file. + +To set up the repository, run: + +```bash +$ ./scripts/bootstrap +``` + +This will install all the required dependencies. + +## Modifying/Adding code + +Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of `lib/finch_api/helpers/` and `examples/` directory. + +## Adding and running examples + +All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. + +```ruby +#!/usr/bin/env ruby +# frozen_string_literal: true + +require_relative "../lib/finch_api" + +# ... +``` + +```bash +$ chmod +x './examples/.rb' + +# run the example against your api +$ ruby './examples/.rb' +``` + +## Using the repository from source + +If you’d like to use the repository from source, you can either install from git or reference a cloned repository: + +To install via git in your `Gemfile`: + +```ruby +gem "finch-api", git: "https://www.github.com/Finch-API/finch-api-ruby" +``` + +Alternatively, reference local copy of the repo: + +```bash +$ git clone -- 'https://www.github.com/Finch-API/finch-api-ruby' '' +``` + +```ruby +gem "finch-api", path: "" +``` + +## Running commands + +Running `rake` by itself will show all runnable commands. + +```bash +$ bundle exec rake +``` + +## Running tests + +Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. + +```bash +$ npx prism mock path/to/your/openapi.yml +``` + +```bash +$ bundle exec rake test +``` + +## Linting and formatting + +This repository uses [rubocop](https://github.com/rubocop/rubocop) for linting and formatting of `*.rb` and `*.rbi` files. [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) is used for formatting `*.rbs` files. + +There are two separate type checkers supported by this library: [sorbet](https://github.com/sorbet/sorbet) and [steep](https://github.com/soutaro/steep) are used for verifying `*.rbi` and `*.rbs` files respectively. + +To lint and typecheck: + +```bash +$ bundle exec rake lint +``` + +To format and fix all lint issues automatically: + +```bash +$ bundle exec rake format +``` + +## Editor Support + +### Ruby LSP + +[Ruby LSP](https://github.com/Shopify/ruby-lsp) has quite good support for go to definition, but not auto-completion. + +This can be installed along side Solargraph. + +### Solargraph + +[Solargraph](https://solargraph.org) has quite good support for auto-completion, but not go to definition. + +This can be installed along side Ruby LSP. + +### Sorbet + +[Sorbet](https://sorbet.org) should mostly work out of the box when editing this library directly. However, there are a some caveats due to the colocation of `*.rb` and `*.rbi` files in the same project. These issues should not otherwise manifest when this library is used as a dependency. + +1. For go to definition usages, sorbet might get confused and may not always navigate to the correct location. + +2. For each generic type in `*.rbi` files, a spurious "Duplicate type member" error is present. + +## Documentation Preview + +To preview the documentation, run: + +```bash +$ bundle exec rake docs:preview [PORT=8808] +``` diff --git a/Gemfile b/Gemfile index e5ec01e9..0d76364b 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,7 @@ group :development, :test do gem "minitest-hooks" gem "minitest-proveit" gem "minitest-rg" + gem "webmock" end group :development, :docs do diff --git a/Gemfile.lock b/Gemfile.lock index 2f7b49bf..fe5156a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.11) + finch-api (0.1.0.pre.alpha.12) connection_pool GEM @@ -29,6 +29,8 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.3) async (2.23.1) console (~> 1.29) @@ -45,6 +47,9 @@ GEM fiber-annotation fiber-local (~> 1.1) json + crack (1.0.0) + bigdecimal + rexml csv (3.3.3) drb (2.2.1) erubi (1.13.1) @@ -54,6 +59,7 @@ GEM fiber-storage fiber-storage (1.0.0) fileutils (1.7.3) + hashdiff (1.1.2) i18n (1.14.7) concurrent-ruby (~> 1.0) io-event (1.10.0) @@ -82,6 +88,7 @@ GEM racc prettier_print (1.2.1) prism (1.4.0) + public_suffix (6.0.1) racc (1.8.1) rainbow (3.1.1) rake (13.2.1) @@ -96,6 +103,7 @@ GEM logger redcarpet (3.6.1) regexp_parser (2.10.0) + rexml (3.4.1) rubocop (1.75.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) @@ -165,6 +173,10 @@ GEM unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uri (1.0.3) + webmock (3.25.1) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) webrick (1.9.1) yard (0.9.37) yard-sorbet (0.9.0) @@ -191,6 +203,7 @@ DEPENDENCIES syntax_tree syntax_tree-rbs! tapioca + webmock webrick yard diff --git a/README.md b/README.md index 1f33e68f..f2893ac1 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ It is generated with [Stainless](https://www.stainless.com/). ## Documentation -Documentation for released of this gem can be found [on RubyDoc](https://gemdocs.org/gems/finch-api). +Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/finch-api). -The underlying REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). +The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). ## Installation @@ -17,22 +17,16 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.12" +gem "finch-api", "~> 0.1.0.pre.alpha.13" ``` -To fetch an initial copy of the gem: - -```sh -bundle install -``` - ## Usage ```ruby require "bundler/setup" -require "finch-api" +require "finch_api" finch = FinchAPI::Client.new(access_token: "My Access Token") @@ -41,6 +35,16 @@ page = finch.hris.directory.list puts(page.id) ``` +## Sorbet + +This library is written with [Sorbet type definitions](https://sorbet.org/docs/rbi). However, there is no runtime dependency on the `sorbet-runtime`. + +When using sorbet, it is recommended to use model classes as below. This provides stronger type checking and tooling integration. + +```ruby +finch.hris.directory.list +``` + ### Pagination List methods in the Finch API are paginated. @@ -62,7 +66,7 @@ end ### Errors -When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `FinchAPI::Error` will be thrown: +When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `FinchAPI::Errors::APIError` will be thrown: ```ruby begin @@ -124,61 +128,32 @@ finch = FinchAPI::Client.new( finch.hris.directory.list(request_options: {timeout: 5}) ``` -## LSP Support - -### Solargraph - -This library includes [Solargraph](https://solargraph.org) support for both auto completion and go to definition. - -```ruby -gem "solargraph", group: :development -``` - -After Solargraph is installed, **you must populate its index** either via the provided editor command, or by running the following in your terminal: - -```sh -bundle exec solargraph gems -``` - -Note: if you had installed the gem either using a `git:` or `github:` URL, or had vendored the gem using bundler, you will need to set up your [`.solargraph.yml`](https://solargraph.org/guides/configuration) to include the path to the gem's `lib` directory. - -```yaml -include: - - 'vendor/bundle/ruby/*/gems/finch-api-*/lib/**/*.rb' -``` - -Otherwise Solargraph will not be able to provide type information or auto-completion for any non-indexed libraries. - -### Sorbet - -This library is written with [Sorbet type definitions](https://sorbet.org/docs/rbi). However, there is no runtime dependency on the `sorbet-runtime`. +## Model DSL -What this means is that while you can use Sorbet to type check your code statically, and benefit from the [Sorbet Language Server](https://sorbet.org/docs/lsp) in your editor, there is no runtime type checking and execution overhead from Sorbet itself. +This library uses a simple DSL to represent request parameters and response shapes in `lib/finch_api/models`. -Due to limitations with the Sorbet type system, where a method otherwise can take an instance of `FinchAPI::BaseModel` class, you will need to use the `**` splat operator to pass the arguments: +With the right [editor plugins](https://shopify.github.io/ruby-lsp), you can ctrl-click on elements of the DSL to navigate around and explore the library. -Please follow Sorbet's [setup guides](https://sorbet.org/docs/adopting) for best experience. +In all places where a `BaseModel` type is specified, vanilla Ruby `Hash` can also be used. For example, the following are interchangeable as arguments: ```ruby +# This has tooling readability, for auto-completion, static analysis, and goto definition with supported language services params = FinchAPI::Models::HRIS::DirectoryListParams.new -finch.hris.directory.list(**params) -``` +# This also works +params = { -Note: **This library emits an intentional warning under the [`tapioca` toolchain](https://github.com/Shopify/tapioca)**. This is normal, and does not impact functionality. +} +``` -### Ruby LSP +## Editor support -The Ruby LSP has [best effort support](https://shopify.github.io/ruby-lsp/#guessed-types) for inferring type information from Ruby code, and as such it may not always be able to provide accurate type information. +A combination of [Shopify LSP](https://shopify.github.io/ruby-lsp) and [Solargraph](https://solargraph.org/) is recommended for non-[Sorbet](https://sorbet.org) users. The former is especially good at go to definition, while the latter has much better auto-completion support. -## Advanced +## Advanced concepts ### Making custom/undocumented requests -This library is typed for convenient access to the documented API. - -If you need to access undocumented endpoints, params, or response properties, the library can still be used. - #### Undocumented request params If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a requests as seen in examples above. @@ -188,17 +163,16 @@ If you want to explicitly send an extra param, you can do so with the `extra_que To make requests to undocumented endpoints, you can make requests using `client.request`. Options on the client will be respected (such as retries) when making this request. ```ruby -response = - client.request( - method: :post, - path: '/undocumented/endpoint', - query: {"dog": "woof"}, - headers: {"useful-header": "interesting-value"}, - body: {"he": "llo"}, - ) +response = client.request( + method: :post, + path: '/undocumented/endpoint', + query: {"dog": "woof"}, + headers: {"useful-header": "interesting-value"}, + body: {"he": "llo"}, +) ``` -### Concurrency & Connection Pooling +### Concurrency & connection pooling The `FinchAPI::Client` instances are thread-safe, and should be re-used across multiple threads. By default, each `Client` have their own HTTP connection pool, with a maximum number of connections equal to thread count. @@ -208,6 +182,30 @@ Unless otherwise specified, other classes in the SDK do not have locks protectin Currently, `FinchAPI::Client` instances are only fork-safe if there are no in-flight HTTP requests. +### Sorbet + +#### Enums + +Sorbet's typed enums require sub-classing of the [`T::Enum` class](https://sorbet.org/docs/tenum) from the `sorbet-runtime` gem. + +Since this library does not depend on `sorbet-runtime`, it uses a [`T.all` intersection type](https://sorbet.org/docs/intersection-types) with a ruby primitive type to construct a "tagged alias" instead. + +```ruby +module FinchAPI::Models::ConnectionStatusType + # This alias aids language service driven navigation. + TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::ConnectionStatusType) } +end +``` + +#### Argument passing trick + +It is possible to pass a compatible model / parameter class to a method that expects keyword arguments by using the `**` splat operator. + +```ruby +params = FinchAPI::Models::HRIS::DirectoryListParams.new +finch.hris.directory.list(**params) +``` + ## Versioning This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time. @@ -217,3 +215,7 @@ This package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` typ ## Requirements Ruby 3.1.0 or higher. + +## Contributing + +See [the contributing documentation](https://github.com/Finch-API/finch-api-ruby/tree/main/CONTRIBUTING.md). diff --git a/Rakefile b/Rakefile index c32d27f1..97b1805c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "pathname" require "securerandom" require "shellwords" @@ -7,33 +8,55 @@ require "minitest/test_task" require "rake/clean" require "rubocop/rake_task" -CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/]) +tapioca = "sorbet/tapioca" +ignore_file = ".ignore" -multitask(default: [:test]) +CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file) +CLOBBER.push(*%w[sorbet/rbi/annotations/ sorbet/rbi/gems/], tapioca) + +multitask(:default) do + sh(*%w[rake --tasks]) +end + +desc("Preview docs; use `PORT=` to change the port") +multitask(:"docs:preview") do + sh(*%w[yard server --reload --quiet --bind [::] --port], ENV.fetch("PORT", "8808")) +end + +desc("Run test suites; use `TEST=path/to/test.rb` to run a specific test file") multitask(:test) do rb = FileList[ENV.fetch("TEST", "./test/**/*_test.rb")] .map { "require_relative(#{_1.dump});" } .join - ruby(*%w[-w -e], rb, verbose: false) { fail unless _1 } + ruby(*%w[-e], rb, verbose: false) { fail unless _1 } end rubo_find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0] xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --] -multitask(:rubocop) do - lint = xargs + %w[rubocop --fail-level E] + (ENV.key?("CI") ? %w[--format github] : []) +desc("Lint `*.rb(i)`") +multitask(:"lint:rubocop") do + rubocop = %w[rubocop --fail-level E] + rubocop += %w[--format github] if ENV.key?("CI") + + # some lines cannot be shortened + rubocop += %w[--except Lint/RedundantCopDisableDirective,Layout/LineLength] + + lint = xargs + rubocop sh("#{rubo_find.shelljoin} | #{lint.shelljoin}") end -multitask(:ruboformat) do +desc("Format `*.rb(i)`") +multitask(:"format:rubocop") do fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --] sh("#{rubo_find.shelljoin} | #{fmt.shelljoin}") end -multitask(:syntax_tree) do +desc("Format `*.rbs`") +multitask(:"format:syntax_tree") do find = %w[find ./sig -type f -name *.rbs -print0] inplace = /darwin|bsd/ =~ RUBY_PLATFORM ? %w[-i''] : %w[-i] uuid = SecureRandom.uuid @@ -59,35 +82,64 @@ multitask(:syntax_tree) do # 2. at label `l1`, join previously annotated line with `class | module` information. pst = sed + [subst, "--"] + success = false + # transform class aliases to type aliases, which syntax tree has no trouble with sh("#{find.shelljoin} | #{pre.shelljoin}") # run syntax tree to format `*.rbs` files - sh("#{find.shelljoin} | #{fmt.shelljoin}") + sh("#{find.shelljoin} | #{fmt.shelljoin}") do + success = _1 + end # transform type aliases back to class aliases sh("#{find.shelljoin} | #{pst.shelljoin}") + + # always run post-processing to remove comment marker + fail unless success end -multitask(format: [:ruboformat, :syntax_tree]) +desc("Format everything") +multitask(format: [:"format:rubocop", :"format:syntax_tree"]) -multitask(:steep) do +desc("Typecheck `*.rbs`") +multitask(:"typecheck:steep") do sh(*%w[steep check]) end -multitask(:sorbet) do +desc("Typecheck `*.rbi`") +multitask(:"typecheck:sorbet") do sh(*%w[srb typecheck]) end -file("sorbet/tapioca") do +file(tapioca) do sh(*%w[tapioca init]) end -multitask(typecheck: [:steep, :sorbet]) -multitask(lint: [:rubocop, :typecheck]) +desc("Typecheck everything") +multitask(typecheck: [:"typecheck:steep", :"typecheck:sorbet"]) + +desc("Lint and typecheck") +multitask(lint: [:"lint:rubocop", :typecheck]) + +desc("Build yard docs") +multitask(:"build:docs") do + sh(*%w[yard]) +end -multitask(:build) do - sh(*%w[gem build -- finch_api.gemspec]) +desc("Build ruby gem") +multitask(:"build:gem") do + # optimizing for grepping through the gem bundle: many tools honour `.ignore` files, including VSCode + # + # both `rbi` and `sig` directories are navigable by their respective tool chains and therefore can be ignored by tools such as `rg` + Pathname(ignore_file).write(<<~GLOB) + rbi/* + sig/* + GLOB + + sh(*%w[gem build -- openai.gemspec]) + rm_rf(ignore_file) end -multitask(release: [:build]) do - sh(*%w[gem push], *FileList["finch_api-*.gem"]) +desc("Release ruby gem") +multitask(release: [:"build:gem"]) do + sh(*%w[gem push], *FileList["*.gem"]) end diff --git a/Steepfile b/Steepfile index 6e5d0ac5..d7aebca1 100644 --- a/Steepfile +++ b/Steepfile @@ -2,7 +2,7 @@ require "yaml" -target :lib do +target(:lib) do configure_code_diagnostics(Steep::Diagnostic::Ruby.strict) signature("sig") diff --git a/finch_api.gemspec b/finch_api.gemspec index 50ab3acb..b06d861a 100644 --- a/finch_api.gemspec +++ b/finch_api.gemspec @@ -8,12 +8,21 @@ Gem::Specification.new do |s| s.summary = "Ruby library to access the Finch API" s.authors = ["Finch"] s.email = "founders@tryfinch.com" - s.files = Dir["lib/**/*.rb", "rbi/**/*.rbi", "sig/**/*.rbs", "manifest.yaml"] - s.extra_rdoc_files = ["README.md"] - s.required_ruby_version = ">= 3.0.0" - s.add_dependency "connection_pool" s.homepage = "https://gemdocs.org/gems/finch-api" s.metadata["homepage_uri"] = s.homepage s.metadata["source_code_uri"] = "https://github.com/Finch-API/finch-api-ruby" s.metadata["rubygems_mfa_required"] = false.to_s + s.required_ruby_version = ">= 3.0.0" + + s.files = Dir[ + "lib/**/*.rb", + "rbi/**/*.rbi", + "sig/**/*.rbs", + "manifest.yaml", + "SECURITY.md", + "CHANGELOG.md", + ".ignore" + ] + s.extra_rdoc_files = ["README.md"] + s.add_dependency "connection_pool" end diff --git a/lib/finch_api.rb b/lib/finch_api.rb index 99cf3432..a59edacb 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -19,15 +19,6 @@ # We already ship the preferred sorbet manifests in the package itself. # `tapioca` currently does not offer us a way to opt out of unnecessary compilation. if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/) - Warning.warn( - <<~WARN - \n - ⚠️ skipped loading of "finch_api" gem under `tapioca`. - - This message is normal and expected if you are running a `tapioca` command, and does not impact `.rbi` generation. - \n - WARN - ) return end @@ -40,7 +31,7 @@ require_relative "finch_api/internal/type/converter" require_relative "finch_api/internal/type/unknown" require_relative "finch_api/internal/type/boolean" -require_relative "finch_api/internal/type/io_like" +require_relative "finch_api/internal/type/file_input" require_relative "finch_api/internal/type/enum" require_relative "finch_api/internal/type/union" require_relative "finch_api/internal/type/array_of" @@ -50,6 +41,7 @@ require_relative "finch_api/internal/type/request_parameters" require_relative "finch_api/internal" require_relative "finch_api/request_options" +require_relative "finch_api/file_part" require_relative "finch_api/errors" require_relative "finch_api/internal/transport/base_client" require_relative "finch_api/internal/transport/pooled_net_requester" diff --git a/lib/finch_api/client.rb b/lib/finch_api/client.rb index f9f95917..016325a2 100644 --- a/lib/finch_api/client.rb +++ b/lib/finch_api/client.rb @@ -88,7 +88,8 @@ class Client < FinchAPI::Internal::Transport::BaseClient # # @param access_token [String, nil] # - # @param base_url [String, nil] Override the default base URL for the API, e.g., `"https://api.example.com/v2/"` + # @param base_url [String, nil] Override the default base URL for the API, e.g., + # `"https://api.example.com/v2/"`. Defaults to `ENV["FINCH_BASE_URL"]` # # @param max_retries [Integer] Max number of retries to attempt after a failed retryable request. # @@ -101,11 +102,11 @@ def initialize( client_id: ENV["FINCH_CLIENT_ID"], client_secret: ENV["FINCH_CLIENT_SECRET"], access_token: nil, - base_url: nil, - max_retries: DEFAULT_MAX_RETRIES, - timeout: DEFAULT_TIMEOUT_IN_SECONDS, - initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY, - max_retry_delay: DEFAULT_MAX_RETRY_DELAY + base_url: ENV["FINCH_BASE_URL"], + max_retries: FinchAPI::Client::DEFAULT_MAX_RETRIES, + timeout: FinchAPI::Client::DEFAULT_TIMEOUT_IN_SECONDS, + initial_retry_delay: FinchAPI::Client::DEFAULT_INITIAL_RETRY_DELAY, + max_retry_delay: FinchAPI::Client::DEFAULT_MAX_RETRY_DELAY ) base_url ||= "https://api.tryfinch.com" diff --git a/lib/finch_api/errors.rb b/lib/finch_api/errors.rb index ff221b67..f11eb03d 100644 --- a/lib/finch_api/errors.rb +++ b/lib/finch_api/errors.rb @@ -3,9 +3,9 @@ module FinchAPI module Errors class Error < StandardError - # @!parse - # # @return [StandardError, nil] - # attr_accessor :cause + # @!attribute cause + # + # @return [StandardError, nil] end class ConversionError < FinchAPI::Errors::Error @@ -40,13 +40,13 @@ def initialize(url:, status: nil, body: nil, request: nil, response: nil, messag end class APIConnectionError < FinchAPI::Errors::APIError - # @!parse - # # @return [nil] - # attr_accessor :status + # @!attribute status + # + # @return [nil] - # @!parse - # # @return [nil] - # attr_accessor :body + # @!attribute body + # + # @return [nil] # @api private # diff --git a/lib/finch_api/file_part.rb b/lib/finch_api/file_part.rb new file mode 100644 index 00000000..f1e820a7 --- /dev/null +++ b/lib/finch_api/file_part.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +module FinchAPI + class FilePart + # @return [Pathname, StringIO, IO, String] + attr_reader :content + + # @return [String, nil] + attr_reader :content_type + + # @return [String, nil] + attr_reader :filename + + # @api private + # + # @return [String] + private def read + case content + in Pathname + content.read(binmode: true) + in StringIO + content.string + in IO + content.read + in String + content + end + end + + # @param a [Object] + # + # @return [String] + def to_json(*a) = read.to_json(*a) + + # @param a [Object] + # + # @return [String] + def to_yaml(*a) = read.to_yaml(*a) + + # @param content [Pathname, StringIO, IO, String] + # @param filename [String, nil] + # @param content_type [String, nil] + def initialize(content, filename: nil, content_type: nil) + @content = content + @filename = + case content + in Pathname + filename.nil? ? content.basename.to_path : File.basename(filename) + else + filename.nil? ? nil : File.basename(filename) + end + @content_type = content_type + end + end +end diff --git a/lib/finch_api/internal.rb b/lib/finch_api/internal.rb index 34eea5eb..ccc805f6 100644 --- a/lib/finch_api/internal.rb +++ b/lib/finch_api/internal.rb @@ -1,8 +1,11 @@ # frozen_string_literal: true module FinchAPI - # @api private module Internal - OMIT = Object.new.freeze + OMIT = + Object.new.tap do + _1.define_singleton_method(:inspect) { "#<#{FinchAPI::Internal}::OMIT>" } + end + .freeze end end diff --git a/lib/finch_api/internal/individuals_page.rb b/lib/finch_api/internal/individuals_page.rb index 0cf48ca0..fdf139ae 100644 --- a/lib/finch_api/internal/individuals_page.rb +++ b/lib/finch_api/internal/individuals_page.rb @@ -22,36 +22,13 @@ class IndividualsPage # @return [FinchAPI::Models::Paging] attr_accessor :paging - # @api private - # - # @param client [FinchAPI::Internal::Transport::BaseClient] - # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] - # @param page_data [Hash{Symbol=>Object}] - def initialize(client:, req:, headers:, page_data:) - super - model = req.fetch(:model) - - case page_data - in {individuals: Array | nil => individuals} - @individuals = individuals&.map { FinchAPI::Internal::Type::Converter.coerce(model, _1) } - else - end - - case page_data - in {paging: Hash | nil => paging} - @paging = FinchAPI::Internal::Type::Converter.coerce(FinchAPI::Models::Paging, paging) - else - end - end - # @return [Boolean] def next_page? paging&.offset.to_i + individuals.to_a.size < paging&.count.to_i end # @raise [FinchAPI::HTTP::Error] - # @return [FinchAPI::Internal::IndividualsPage] + # @return [self] def next_page unless next_page? message = "No more pages available. Please check #next_page? before calling ##{__method__}" @@ -72,17 +49,44 @@ def auto_paging_each(&blk) unless block_given? raise ArgumentError.new("A block must be given to ##{__method__}") end + page = self loop do - page.individuals&.each { blk.call(_1) } + page.individuals&.each(&blk) + break unless page.next_page? page = page.next_page end end + # @api private + # + # @param client [FinchAPI::Internal::Transport::BaseClient] + # @param req [Hash{Symbol=>Object}] + # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param page_data [Hash{Symbol=>Object}] + def initialize(client:, req:, headers:, page_data:) + super + + case page_data + in {individuals: Array | nil => individuals} + @individuals = individuals&.map { FinchAPI::Internal::Type::Converter.coerce(@model, _1) } + else + end + case page_data + in {paging: Hash | nil => paging} + @paging = FinchAPI::Internal::Type::Converter.coerce(FinchAPI::Models::Paging, paging) + else + end + end + + # @api private + # # @return [String] def inspect - "#<#{self.class}:0x#{object_id.to_s(16)} individuals=#{individuals.inspect} paging=#{paging.inspect}>" + model = FinchAPI::Internal::Type::Converter.inspect(@model, depth: 1) + + "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>" end end end diff --git a/lib/finch_api/internal/page.rb b/lib/finch_api/internal/page.rb index 69114f76..6f8c93e8 100644 --- a/lib/finch_api/internal/page.rb +++ b/lib/finch_api/internal/page.rb @@ -22,36 +22,13 @@ class Page # @return [FinchAPI::Models::Paging] attr_accessor :paging - # @api private - # - # @param client [FinchAPI::Internal::Transport::BaseClient] - # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] - # @param page_data [Hash{Symbol=>Object}] - def initialize(client:, req:, headers:, page_data:) - super - model = req.fetch(:model) - - case page_data - in {data: Array | nil => data} - @data = data&.map { FinchAPI::Internal::Type::Converter.coerce(model, _1) } - else - end - - case page_data - in {paging: Hash | nil => paging} - @paging = FinchAPI::Internal::Type::Converter.coerce(FinchAPI::Models::Paging, paging) - else - end - end - # @return [Boolean] def next_page? paging&.offset.to_i + data.to_a.size < paging&.count.to_i end # @raise [FinchAPI::HTTP::Error] - # @return [FinchAPI::Internal::Page] + # @return [self] def next_page unless next_page? message = "No more pages available. Please check #next_page? before calling ##{__method__}" @@ -72,17 +49,44 @@ def auto_paging_each(&blk) unless block_given? raise ArgumentError.new("A block must be given to ##{__method__}") end + page = self loop do - page.data&.each { blk.call(_1) } + page.data&.each(&blk) + break unless page.next_page? page = page.next_page end end + # @api private + # + # @param client [FinchAPI::Internal::Transport::BaseClient] + # @param req [Hash{Symbol=>Object}] + # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param page_data [Hash{Symbol=>Object}] + def initialize(client:, req:, headers:, page_data:) + super + + case page_data + in {data: Array | nil => data} + @data = data&.map { FinchAPI::Internal::Type::Converter.coerce(@model, _1) } + else + end + case page_data + in {paging: Hash | nil => paging} + @paging = FinchAPI::Internal::Type::Converter.coerce(FinchAPI::Models::Paging, paging) + else + end + end + + # @api private + # # @return [String] def inspect - "#<#{self.class}:0x#{object_id.to_s(16)} data=#{data.inspect} paging=#{paging.inspect}>" + model = FinchAPI::Internal::Type::Converter.inspect(@model, depth: 1) + + "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>" end end end diff --git a/lib/finch_api/internal/responses_page.rb b/lib/finch_api/internal/responses_page.rb index dbf6c63f..f8bf734e 100644 --- a/lib/finch_api/internal/responses_page.rb +++ b/lib/finch_api/internal/responses_page.rb @@ -19,30 +19,13 @@ class ResponsesPage # @return [Array>, nil] attr_accessor :responses - # @api private - # - # @param client [FinchAPI::Internal::Transport::BaseClient] - # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] - # @param page_data [Array] - def initialize(client:, req:, headers:, page_data:) - super - model = req.fetch(:model) - - case page_data - in {responses: Array | nil => responses} - @responses = responses&.map { FinchAPI::Internal::Type::Converter.coerce(model, _1) } - else - end - end - # @return [Boolean] def next_page? false end # @raise [FinchAPI::HTTP::Error] - # @return [FinchAPI::Internal::ResponsesPage] + # @return [self] def next_page RuntimeError.new("No more pages available.") end @@ -54,17 +37,39 @@ def auto_paging_each(&blk) unless block_given? raise ArgumentError.new("A block must be given to ##{__method__}") end + page = self loop do - page.responses&.each { blk.call(_1) } + page.responses&.each(&blk) + break unless page.next_page? page = page.next_page end end + # @api private + # + # @param client [FinchAPI::Internal::Transport::BaseClient] + # @param req [Hash{Symbol=>Object}] + # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param page_data [Array] + def initialize(client:, req:, headers:, page_data:) + super + + case page_data + in {responses: Array | nil => responses} + @responses = responses&.map { FinchAPI::Internal::Type::Converter.coerce(@model, _1) } + else + end + end + + # @api private + # # @return [String] def inspect - "#<#{self.class}:0x#{object_id.to_s(16)} responses=#{responses.inspect}>" + model = FinchAPI::Internal::Type::Converter.inspect(@model, depth: 1) + + "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>" end end end diff --git a/lib/finch_api/internal/single_page.rb b/lib/finch_api/internal/single_page.rb index e421bb66..5bcba837 100644 --- a/lib/finch_api/internal/single_page.rb +++ b/lib/finch_api/internal/single_page.rb @@ -16,30 +16,13 @@ module Internal class SinglePage < ::Array include FinchAPI::Internal::Type::BasePage - # @api private - # - # @param client [FinchAPI::Internal::Transport::BaseClient] - # @param req [Hash{Symbol=>Object}] - # @param headers [Hash{String=>String}, Net::HTTPHeader] - # @param page_data [Array] - def initialize(client:, req:, headers:, page_data:) - super - model = req.fetch(:model) - - case page_data - in Array - replace(page_data.map { FinchAPI::Internal::Type::Converter.coerce(model, _1) }) - else - end - end - # @return [Boolean] def next_page? false end # @raise [FinchAPI::HTTP::Error] - # @return [FinchAPI::Internal::SinglePage] + # @return [self] def next_page RuntimeError.new("No more pages available.") end @@ -51,17 +34,39 @@ def auto_paging_each(&blk) unless block_given? raise ArgumentError.new("A block must be given to ##{__method__}") end + page = self loop do - page.each { blk.call(_1) } + page.each(&blk) + break unless page.next_page? page = page.next_page end end + # @api private + # + # @param client [FinchAPI::Internal::Transport::BaseClient] + # @param req [Hash{Symbol=>Object}] + # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param page_data [Array] + def initialize(client:, req:, headers:, page_data:) + super + + case page_data + in Array + replace(page_data.map { FinchAPI::Internal::Type::Converter.coerce(@model, _1) }) + else + end + end + + # @api private + # # @return [String] def inspect - "#<#{self.class}:0x#{object_id.to_s(16)}>" + model = FinchAPI::Internal::Type::Converter.inspect(@model, depth: 1) + + "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>" end end end diff --git a/lib/finch_api/internal/transport/base_client.rb b/lib/finch_api/internal/transport/base_client.rb index e2e16fd8..a5a9fa69 100644 --- a/lib/finch_api/internal/transport/base_client.rb +++ b/lib/finch_api/internal/transport/base_client.rb @@ -93,7 +93,11 @@ def follow_redirect(request, status:, response_headers:) URI.join(url, response_headers["location"]) rescue ArgumentError message = "Server responded with status #{status} but no valid location header." - raise FinchAPI::Errors::APIConnectionError.new(url: url, message: message) + raise FinchAPI::Errors::APIConnectionError.new( + url: url, + response: response_headers, + message: message + ) end request = {**request, url: location} @@ -101,7 +105,11 @@ def follow_redirect(request, status:, response_headers:) case [url.scheme, location.scheme] in ["https", "http"] message = "Tried to redirect to a insecure URL" - raise FinchAPI::Errors::APIConnectionError.new(url: url, message: message) + raise FinchAPI::Errors::APIConnectionError.new( + url: url, + response: response_headers, + message: message + ) else nil end @@ -145,7 +153,7 @@ def reap_connection!(status, stream:) # @api private # @return [FinchAPI::Internal::Transport::PooledNetRequester] - attr_accessor :requester + attr_reader :requester # @api private # @@ -206,11 +214,11 @@ def initialize( # # @option req [Object, nil] :body # - # @option req [Symbol, nil] :unwrap + # @option req [Symbol, Integer, Array, Proc, nil] :unwrap # - # @option req [Class, nil] :page + # @option req [Class, nil] :page # - # @option req [Class, nil] :stream + # @option req [Class, nil] :stream # # @option req [FinchAPI::Internal::Type::Converter, Class, nil] :model # @@ -245,7 +253,7 @@ def initialize( if @idempotency_header && !headers.key?(@idempotency_header) && - !Net::HTTP::IDEMPOTENT_METHODS_.include?(method.to_s.upcase) + (!Net::HTTP::IDEMPOTENT_METHODS_.include?(method.to_s.upcase) || opts.key?(:idempotency_key)) headers[@idempotency_header] = opts.fetch(:idempotency_key) { generate_idempotency_key } end @@ -350,7 +358,7 @@ def initialize( self.class.reap_connection!(status, stream: stream) message = "Failed to complete the request within #{self.class::MAX_REDIRECTS} redirects." - raise FinchAPI::Errors::APIConnectionError.new(url: url, message: message) + raise FinchAPI::Errors::APIConnectionError.new(url: url, response: response, message: message) in 300..399 self.class.reap_connection!(status, stream: stream) @@ -407,11 +415,11 @@ def initialize( # # @param body [Object, nil] # - # @param unwrap [Symbol, nil] + # @param unwrap [Symbol, Integer, Array, Proc, nil] # - # @param page [Class, nil] + # @param page [Class, nil] # - # @param stream [Class, nil] + # @param stream [Class, nil] # # @param model [FinchAPI::Internal::Type::Converter, Class, nil] # @@ -460,6 +468,8 @@ def request(req) end end + # @api private + # # @return [String] def inspect # rubocop:disable Layout/LineLength diff --git a/lib/finch_api/internal/transport/pooled_net_requester.rb b/lib/finch_api/internal/transport/pooled_net_requester.rb index 491f8c28..82763091 100644 --- a/lib/finch_api/internal/transport/pooled_net_requester.rb +++ b/lib/finch_api/internal/transport/pooled_net_requester.rb @@ -61,7 +61,7 @@ def build_request(request, &blk) method.to_s.upcase, !body.nil?, method != :head, - url.to_s + URI(url.to_s) # ensure we construct a URI class of the right scheme ) headers.each { req[_1] = _2 } @@ -149,7 +149,7 @@ def execute(request) break if finished rsp.read_body do |bytes| - y << bytes + y << bytes.force_encoding(Encoding::BINARY) break if finished self.class.calibrate_socket_timeout(conn, deadline) @@ -176,7 +176,7 @@ def execute(request) conn.finish if !eof && conn&.started? closing&.call end - [Integer(response.code), response, (response.body = body)] + [Integer(response.code), response, body] end # @api private diff --git a/lib/finch_api/internal/type/array_of.rb b/lib/finch_api/internal/type/array_of.rb index 952fc1e5..aa6d250e 100644 --- a/lib/finch_api/internal/type/array_of.rb +++ b/lib/finch_api/internal/type/array_of.rb @@ -13,6 +13,10 @@ module Type class ArrayOf include FinchAPI::Internal::Type::Converter + private_class_method :new + + # @overload [](type_info, spec = {}) + # # @param type_info [Hash{Symbol=>Object}, Proc, FinchAPI::Internal::Type::Converter, Class] # # @param spec [Hash{Symbol=>Object}] . @@ -24,13 +28,19 @@ class ArrayOf # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - def self.[](type_info, spec = {}) = new(type_info, spec) + # + # @return [FinchAPI::Internal::Type::ArrayOf] + def self.[](...) = new(...) + # @api public + # # @param other [Object] # # @return [Boolean] def ===(other) = other.is_a?(Array) && other.all?(item_type) + # @api public + # # @param other [Object] # # @return [Boolean] @@ -40,6 +50,11 @@ def ==(other) # rubocop:enable Layout/LineLength end + # @api public + # + # @return [Integer] + def hash = [self.class, item_type].hash + # @api private # # @param value [Array, Object] @@ -120,7 +135,18 @@ def dump(value, state:) # @option spec [Boolean] :"nil?" def initialize(type_info, spec = {}) @item_type_fn = FinchAPI::Internal::Type::Converter.type_info(type_info || spec) - @nilable = spec[:nil?] + @nilable = spec.fetch(:nil?, false) + end + + # @api private + # + # @param depth [Integer] + # + # @return [String] + def inspect(depth: 0) + items = FinchAPI::Internal::Type::Converter.inspect(item_type, depth: depth.succ) + + "#{self.class}[#{[items, nilable? ? 'nil' : nil].compact.join(' | ')}]" end end end diff --git a/lib/finch_api/internal/type/base_model.rb b/lib/finch_api/internal/type/base_model.rb index 17f2c2a5..6282ca6f 100644 --- a/lib/finch_api/internal/type/base_model.rb +++ b/lib/finch_api/internal/type/base_model.rb @@ -4,14 +4,6 @@ module FinchAPI module Internal module Type # @abstract - # - # @example - # # `operation_support_matrix` is a `FinchAPI::Models::OperationSupportMatrix` - # operation_support_matrix => { - # create: create, - # delete: delete, - # read: read - # } class BaseModel extend FinchAPI::Internal::Type::Converter @@ -63,7 +55,7 @@ def fields setter = "#{name_sym}=" api_name = info.fetch(:api_name, name_sym) - nilable = info[:nil?] + nilable = info.fetch(:nil?, false) const = if required && !nilable info.fetch( :const, @@ -100,11 +92,13 @@ def fields state: state ) end - rescue StandardError + rescue StandardError => e cls = self.class.name.split("::").last - # rubocop:disable Layout/LineLength - message = "Failed to parse #{cls}.#{__method__} from #{value.class} to #{target.inspect}. To get the unparsed API response, use #{cls}[:#{__method__}]." - # rubocop:enable Layout/LineLength + message = [ + "Failed to parse #{cls}.#{__method__} from #{value.class} to #{target.inspect}.", + "To get the unparsed API response, use #{cls}[#{__method__.inspect}].", + "Cause: #{e.message}" + ].join(" ") raise FinchAPI::Errors::ConversionError.new(message) end end @@ -172,19 +166,33 @@ def optional(name_sym, type_info, spec = {}) @mode = nil end + # @api public + # # @param other [Object] # # @return [Boolean] def ==(other) other.is_a?(Class) && other <= FinchAPI::Internal::Type::BaseModel && other.fields == fields end + + # @api public + # + # @return [Integer] + def hash = fields.hash end + # @api public + # # @param other [Object] # # @return [Boolean] def ==(other) = self.class == other.class && @data == other.to_h + # @api public + # + # @return [Integer] + def hash = [self.class, @data].hash + class << self # @api private # @@ -298,6 +306,8 @@ def dump(value, state:) end end + # @api public + # # Returns the raw value associated with the given key, if found. Otherwise, nil is # returned. # @@ -316,6 +326,8 @@ def [](key) @data[key] end + # @api public + # # Returns a Hash of the data underlying this object. O(1) # # Keys are Symbols and values are the raw values from the response. The return @@ -345,11 +357,38 @@ def deconstruct_keys(keys) .to_h end + class << self + # @api private + # + # @param model [FinchAPI::Internal::Type::BaseModel] + # + # @return [Hash{Symbol=>Object}] + def walk(model) + walk = ->(x) do + case x + in FinchAPI::Internal::Type::BaseModel + walk.call(x.to_h) + in Hash + x.transform_values(&walk) + in Array + x.map(&walk) + else + x + end + end + walk.call(model) + end + end + + # @api public + # # @param a [Object] # # @return [String] def to_json(*a) = FinchAPI::Internal::Type::Converter.dump(self.class, self).to_json(*a) + # @api public + # # @param a [Object] # # @return [String] @@ -357,7 +396,7 @@ def to_yaml(*a) = FinchAPI::Internal::Type::Converter.dump(self.class, self).to_ # Create a new instance of a model. # - # @param data [Hash{Symbol=>Object}, FinchAPI::Internal::Type::BaseModel] + # @param data [Hash{Symbol=>Object}, self] def initialize(data = {}) case FinchAPI::Internal::Util.coerce_hash(data) in Hash => coerced @@ -368,15 +407,38 @@ def initialize(data = {}) end end - # @return [String] - def inspect - rows = self.class.known_fields.keys.map do - "#{_1}=#{@data.key?(_1) ? public_send(_1) : ''}" - rescue FinchAPI::Errors::ConversionError - "#{_1}=#{@data.fetch(_1)}" + class << self + # @api private + # + # @param depth [Integer] + # + # @return [String] + def inspect(depth: 0) + return super() if depth.positive? + + depth = depth.succ + deferred = fields.transform_values do |field| + type, required, nilable = field.fetch_values(:type, :required, :nilable) + inspected = [ + FinchAPI::Internal::Type::Converter.inspect(type, depth: depth), + !required || nilable ? "nil" : nil + ].compact.join(" | ") + -> { inspected }.tap { _1.define_singleton_method(:inspect) { call } } + end + + "#{name}[#{deferred.inspect}]" end - "#<#{self.class.name}:0x#{object_id.to_s(16)} #{rows.join(' ')}>" end + + # @api public + # + # @return [String] + def to_s = self.class.walk(@data).to_s + + # @api private + # + # @return [String] + def inspect = "#<#{self.class}:0x#{object_id.to_s(16)} #{self}>" end end end diff --git a/lib/finch_api/internal/type/base_page.rb b/lib/finch_api/internal/type/base_page.rb index 7ba6bbfd..803cd997 100644 --- a/lib/finch_api/internal/type/base_page.rb +++ b/lib/finch_api/internal/type/base_page.rb @@ -3,19 +3,27 @@ module FinchAPI module Internal module Type + # @api private + # # @generic Elem # # This module provides a base implementation for paginated responses in the SDK. module BasePage # rubocop:disable Lint/UnusedMethodArgument + # @api public + # # @return [Boolean] def next_page? = (raise NotImplementedError) + # @api public + # # @raise [FinchAPI::Errors::APIError] - # @return [FinchAPI::Internal::Type::BasePage] + # @return [self] def next_page = (raise NotImplementedError) + # @api public + # # @param blk [Proc] # # @yieldparam [generic] @@ -36,6 +44,7 @@ def to_enum = super(:auto_paging_each) def initialize(client:, req:, headers:, page_data:) @client = client @req = req + @model = req.fetch(:model) super() end diff --git a/lib/finch_api/internal/type/boolean.rb b/lib/finch_api/internal/type/boolean.rb index 162a8087..29b68a1d 100644 --- a/lib/finch_api/internal/type/boolean.rb +++ b/lib/finch_api/internal/type/boolean.rb @@ -11,11 +11,17 @@ module Type class Boolean extend FinchAPI::Internal::Type::Converter + private_class_method :new + + # @api public + # # @param other [Object] # # @return [Boolean] def self.===(other) = other == true || other == false + # @api public + # # @param other [Object] # # @return [Boolean] @@ -40,17 +46,16 @@ def coerce(value, state:) value end - # @!parse - # # @api private - # # - # # @param value [Boolean, Object] - # # - # # @param state [Hash{Symbol=>Object}] . - # # - # # @option state [Boolean] :can_retry - # # - # # @return [Boolean, Object] - # def dump(value, state:) = super + # @!method dump(value, state:) + # @api private + # + # @param value [Boolean, Object] + # + # @param state [Hash{Symbol=>Object}] . + # + # @option state [Boolean] :can_retry + # + # @return [Boolean, Object] end end end diff --git a/lib/finch_api/internal/type/converter.rb b/lib/finch_api/internal/type/converter.rb index bc2f1b9e..4cfcd47f 100644 --- a/lib/finch_api/internal/type/converter.rb +++ b/lib/finch_api/internal/type/converter.rb @@ -43,12 +43,24 @@ def dump(value, state:) value.string in Pathname | IO state[:can_retry] = false if value.is_a?(IO) - FinchAPI::Internal::Util::SerializationAdapter.new(value) + FinchAPI::FilePart.new(value) + in FinchAPI::FilePart + state[:can_retry] = false if value.content.is_a?(IO) + value else value end end + # @api private + # + # @param depth [Integer] + # + # @return [String] + def inspect(depth: 0) + super() + end + # rubocop:enable Lint/UnusedMethodArgument class << self @@ -240,6 +252,21 @@ def dump(target, value, state: {can_retry: true}) FinchAPI::Internal::Type::Unknown.dump(value, state: state) end end + + # @api private + # + # @param target [Object] + # @param depth [Integer] + # + # @return [String] + def inspect(target, depth:) + case target + in FinchAPI::Internal::Type::Converter + target.inspect(depth: depth.succ) + else + target.inspect + end + end end end end diff --git a/lib/finch_api/internal/type/enum.rb b/lib/finch_api/internal/type/enum.rb index e46c4286..56ec82e2 100644 --- a/lib/finch_api/internal/type/enum.rb +++ b/lib/finch_api/internal/type/enum.rb @@ -46,27 +46,31 @@ module Enum # All of the valid Symbol values for this enum. # # @return [Array] - def values = (@values ||= constants.map { const_get(_1) }) + def values = constants.map { const_get(_1) } - # @api private + # @api public # - # Guard against thread safety issues by instantiating `@values`. - private def finalize! = values - # @param other [Object] # # @return [Boolean] def ===(other) = values.include?(other) + # @api public + # # @param other [Object] # # @return [Boolean] def ==(other) - # rubocop:disable Layout/LineLength - other.is_a?(Module) && other.singleton_class <= FinchAPI::Internal::Type::Enum && other.values.to_set == values.to_set - # rubocop:enable Layout/LineLength + # rubocop:disable Style/CaseEquality + FinchAPI::Internal::Type::Enum === other && other.values.to_set == values.to_set + # rubocop:enable Style/CaseEquality end + # @api public + # + # @return [Integer] + def hash = values.to_set.hash + # @api private # # Unlike with primitives, `Enum` additionally validates that the value is a member @@ -96,17 +100,32 @@ def coerce(value, state:) end end - # @!parse - # # @api private - # # - # # @param value [Symbol, Object] - # # - # # @param state [Hash{Symbol=>Object}] . - # # - # # @option state [Boolean] :can_retry - # # - # # @return [Symbol, Object] - # def dump(value, state:) = super + # @!method dump(value, state:) + # @api private + # + # @param value [Symbol, Object] + # + # @param state [Hash{Symbol=>Object}] . + # + # @option state [Boolean] :can_retry + # + # @return [Symbol, Object] + + # @api private + # + # @param depth [Integer] + # + # @return [String] + def inspect(depth: 0) + if depth.positive? + return is_a?(Module) ? super() : self.class.name + end + + members = values.map { FinchAPI::Internal::Type::Converter.inspect(_1, depth: depth.succ) } + prefix = is_a?(Module) ? name : self.class.name + + "#{prefix}[#{members.join(' | ')}]" + end end end end diff --git a/lib/finch_api/internal/type/io_like.rb b/lib/finch_api/internal/type/file_input.rb similarity index 54% rename from lib/finch_api/internal/type/io_like.rb rename to lib/finch_api/internal/type/file_input.rb index 2a49dd80..64f546da 100644 --- a/lib/finch_api/internal/type/io_like.rb +++ b/lib/finch_api/internal/type/file_input.rb @@ -7,26 +7,36 @@ module Type # # @abstract # - # Either `Pathname` or `StringIO`. - class IOLike + # Either `Pathname` or `StringIO`, or `IO`, or + # `FinchAPI::Internal::Type::FileInput`. + # + # Note: when `IO` is used, all retries are disabled, since many IO` streams are + # not rewindable. + class FileInput extend FinchAPI::Internal::Type::Converter + private_class_method :new + + # @api public + # # @param other [Object] # # @return [Boolean] def self.===(other) case other - in StringIO | Pathname | IO + in Pathname | StringIO | IO | String | FinchAPI::FilePart true else false end end + # @api public + # # @param other [Object] # # @return [Boolean] - def self.==(other) = other.is_a?(Class) && other <= FinchAPI::Internal::Type::IOLike + def self.==(other) = other.is_a?(Class) && other <= FinchAPI::Internal::Type::FileInput class << self # @api private @@ -57,17 +67,28 @@ def coerce(value, state:) end end - # @!parse - # # @api private - # # - # # @param value [Pathname, StringIO, IO, String, Object] - # # - # # @param state [Hash{Symbol=>Object}] . - # # - # # @option state [Boolean] :can_retry - # # - # # @return [Pathname, StringIO, IO, String, Object] - # def dump(value, state:) = super + # @api private + # + # @param value [Pathname, StringIO, IO, String, Object] + # + # @param state [Hash{Symbol=>Object}] . + # + # @option state [Boolean] :can_retry + # + # @return [Pathname, StringIO, IO, String, Object] + def dump(value, state:) + # rubocop:disable Lint/DuplicateBranch + case value + in IO + state[:can_retry] = false + in FinchAPI::FilePart if value.content.is_a?(IO) + state[:can_retry] = false + else + end + # rubocop:enable Lint/DuplicateBranch + + value + end end end end diff --git a/lib/finch_api/internal/type/hash_of.rb b/lib/finch_api/internal/type/hash_of.rb index 449a6741..12c62224 100644 --- a/lib/finch_api/internal/type/hash_of.rb +++ b/lib/finch_api/internal/type/hash_of.rb @@ -13,6 +13,10 @@ module Type class HashOf include FinchAPI::Internal::Type::Converter + private_class_method :new + + # @overload [](type_info, spec = {}) + # # @param type_info [Hash{Symbol=>Object}, Proc, FinchAPI::Internal::Type::Converter, Class] # # @param spec [Hash{Symbol=>Object}] . @@ -24,8 +28,12 @@ class HashOf # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - def self.[](type_info, spec = {}) = new(type_info, spec) + # + # @return [FinchAPI::Internal::Type::HashOf] + def self.[](...) = new(...) + # @api public + # # @param other [Object] # # @return [Boolean] @@ -46,6 +54,8 @@ def ===(other) end end + # @api public + # # @param other [Object] # # @return [Boolean] @@ -55,6 +65,11 @@ def ==(other) # rubocop:enable Layout/LineLength end + # @api public + # + # @return [Integer] + def hash = [self.class, item_type].hash + # @api private # # @param value [Hash{Object=>Object}, Object] @@ -140,7 +155,18 @@ def dump(value, state:) # @option spec [Boolean] :"nil?" def initialize(type_info, spec = {}) @item_type_fn = FinchAPI::Internal::Type::Converter.type_info(type_info || spec) - @nilable = spec[:nil?] + @nilable = spec.fetch(:nil?, false) + end + + # @api private + # + # @param depth [Integer] + # + # @return [String] + def inspect(depth: 0) + items = FinchAPI::Internal::Type::Converter.inspect(item_type, depth: depth.succ) + + "#{self.class}[#{[items, nilable? ? 'nil' : nil].compact.join(' | ')}]" end end end diff --git a/lib/finch_api/internal/type/request_parameters.rb b/lib/finch_api/internal/type/request_parameters.rb index 6772d754..a1b81ba6 100644 --- a/lib/finch_api/internal/type/request_parameters.rb +++ b/lib/finch_api/internal/type/request_parameters.rb @@ -12,9 +12,8 @@ module RequestParameters # @param mod [Module] def self.included(mod) - return unless mod <= FinchAPI::Internal::Type::BaseModel + raise ArgumentError.new(mod) unless mod <= FinchAPI::Internal::Type::BaseModel - mod.extend(FinchAPI::Internal::Type::RequestParameters::Converter) mod.optional(:request_options, FinchAPI::RequestOptions) end diff --git a/lib/finch_api/internal/type/union.rb b/lib/finch_api/internal/type/union.rb index 228622cf..152aaa3e 100644 --- a/lib/finch_api/internal/type/union.rb +++ b/lib/finch_api/internal/type/union.rb @@ -39,7 +39,7 @@ module Union # # @return [Array] protected def derefed_variants - @known_variants.map { |key, variant_fn| [key, variant_fn.call] } + known_variants.map { |key, variant_fn| [key, variant_fn.call] } end # All of the specified variants for this union. @@ -108,6 +108,8 @@ def variants = derefed_variants.map(&:last) # rubocop:disable Style/HashEachMethods # rubocop:disable Style/CaseEquality + # @api public + # # @param other [Object] # # @return [Boolean] @@ -117,15 +119,20 @@ def ===(other) end end + # @api public + # # @param other [Object] # # @return [Boolean] def ==(other) - # rubocop:disable Layout/LineLength - other.is_a?(Module) && other.singleton_class <= FinchAPI::Internal::Type::Union && other.derefed_variants == derefed_variants - # rubocop:enable Layout/LineLength + FinchAPI::Internal::Type::Union === other && other.derefed_variants == derefed_variants end + # @api public + # + # @return [Integer] + def hash = variants.hash + # @api private # # @param value [Object] @@ -206,6 +213,22 @@ def dump(value, state:) # rubocop:enable Style/CaseEquality # rubocop:enable Style/HashEachMethods + + # @api private + # + # @param depth [Integer] + # + # @return [String] + def inspect(depth: 0) + if depth.positive? + return is_a?(Module) ? super() : self.class.name + end + + members = variants.map { FinchAPI::Internal::Type::Converter.inspect(_1, depth: depth.succ) } + prefix = is_a?(Module) ? name : self.class.name + + "#{prefix}[#{members.join(' | ')}]" + end end end end diff --git a/lib/finch_api/internal/type/unknown.rb b/lib/finch_api/internal/type/unknown.rb index 6088c41f..8efc1e0f 100644 --- a/lib/finch_api/internal/type/unknown.rb +++ b/lib/finch_api/internal/type/unknown.rb @@ -13,11 +13,17 @@ class Unknown # rubocop:disable Lint/UnusedMethodArgument + private_class_method :new + + # @api public + # # @param other [Object] # # @return [Boolean] def self.===(other) = true + # @api public + # # @param other [Object] # # @return [Boolean] @@ -42,17 +48,16 @@ def coerce(value, state:) value end - # @!parse - # # @api private - # # - # # @param value [Object] - # # - # # @param state [Hash{Symbol=>Object}] . - # # - # # @option state [Boolean] :can_retry - # # - # # @return [Object] - # def dump(value, state:) = super + # @!method dump(value, state:) + # @api private + # + # @param value [Object] + # + # @param state [Hash{Symbol=>Object}] . + # + # @option state [Boolean] :can_retry + # + # @return [Object] end # rubocop:enable Lint/UnusedMethodArgument diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index d50f000c..7004da5c 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -175,18 +175,17 @@ def deep_merge(*values, sentinel: nil, concat: false) # @api private # # @param data [Hash{Symbol=>Object}, Array, Object] - # @param pick [Symbol, Integer, Array, nil] - # @param sentinel [Object, nil] + # @param pick [Symbol, Integer, Array, Proc, nil] # @param blk [Proc, nil] # # @return [Object, nil] - def dig(data, pick, sentinel = nil, &blk) - case [data, pick, blk] - in [_, nil, nil] + def dig(data, pick, &blk) + case [data, pick] + in [_, nil] data - in [Hash, Symbol, _] | [Array, Integer, _] - blk.nil? ? data.fetch(pick, sentinel) : data.fetch(pick, &blk) - in [Hash | Array, Array, _] + in [Hash, Symbol] | [Array, Integer] + data.fetch(pick) { blk&.call } + in [Hash | Array, Array] pick.reduce(data) do |acc, key| case acc in Hash if acc.key?(key) @@ -194,11 +193,13 @@ def dig(data, pick, sentinel = nil, &blk) in Array if key.is_a?(Integer) && key < acc.length acc[key] else - return blk.nil? ? sentinel : blk.call + return blk&.call end end - in _ - blk.nil? ? sentinel : blk.call + in [_, Proc] + pick.call(data) + else + blk&.call end end end @@ -348,27 +349,6 @@ def normalized_headers(*headers) end end - # @api private - class SerializationAdapter - # @return [Pathname, IO] - attr_reader :inner - - # @param a [Object] - # - # @return [String] - def to_json(*a) = (inner.is_a?(IO) ? inner.read : inner.read(binmode: true)).to_json(*a) - - # @param a [Object] - # - # @return [String] - def to_yaml(*a) = (inner.is_a?(IO) ? inner.read : inner.read(binmode: true)).to_yaml(*a) - - # @api private - # - # @param inner [Pathname, IO] - def initialize(inner) = @inner = inner - end - # @api private # # An adapter that satisfies the IO interface required by `::IO.copy_stream` @@ -448,7 +428,7 @@ def initialize(src, &blk) else src end - @buf = String.new.b + @buf = String.new @blk = blk end end @@ -460,7 +440,7 @@ class << self # @return [Enumerable] def writable_enum(&blk) Enumerator.new do |y| - buf = String.new.b + buf = String.new y.define_singleton_method(:write) do self << buf.replace(_1) buf.bytesize @@ -471,46 +451,44 @@ def writable_enum(&blk) end end + # @type [Regexp] + JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)} + # @type [Regexp] + JSONL_CONTENT = %r{^application/(?:x-)?jsonl} + class << self # @api private # # @param y [Enumerator::Yielder] - # @param boundary [String] - # @param key [Symbol, String] # @param val [Object] # @param closing [Array] - private def write_multipart_chunk(y, boundary:, key:, val:, closing:) - val = val.inner if val.is_a?(FinchAPI::Internal::Util::SerializationAdapter) + # @param content_type [String, nil] + private def write_multipart_content(y, val:, closing:, content_type: nil) + content_type ||= "application/octet-stream" - y << "--#{boundary}\r\n" - y << "Content-Disposition: form-data" - unless key.nil? - name = ERB::Util.url_encode(key.to_s) - y << "; name=\"#{name}\"" - end - case val - in Pathname | IO - filename = ERB::Util.url_encode(File.basename(val.to_path)) - y << "; filename=\"#{filename}\"" - else - end - y << "\r\n" case val + in FinchAPI::FilePart + return write_multipart_content( + y, + val: val.content, + closing: closing, + content_type: val.content_type + ) in Pathname - y << "Content-Type: application/octet-stream\r\n\r\n" + y << "Content-Type: #{content_type}\r\n\r\n" io = val.open(binmode: true) closing << io.method(:close) IO.copy_stream(io, y) in IO - y << "Content-Type: application/octet-stream\r\n\r\n" + y << "Content-Type: #{content_type}\r\n\r\n" IO.copy_stream(val, y) in StringIO - y << "Content-Type: application/octet-stream\r\n\r\n" + y << "Content-Type: #{content_type}\r\n\r\n" y << val.string in String - y << "Content-Type: application/octet-stream\r\n\r\n" + y << "Content-Type: #{content_type}\r\n\r\n" y << val.to_s - in _ if primitive?(val) + in -> { primitive?(_1) } y << "Content-Type: text/plain\r\n\r\n" y << val.to_s else @@ -520,6 +498,36 @@ class << self y << "\r\n" end + # @api private + # + # @param y [Enumerator::Yielder] + # @param boundary [String] + # @param key [Symbol, String] + # @param val [Object] + # @param closing [Array] + private def write_multipart_chunk(y, boundary:, key:, val:, closing:) + y << "--#{boundary}\r\n" + y << "Content-Disposition: form-data" + + unless key.nil? + name = ERB::Util.url_encode(key.to_s) + y << "; name=\"#{name}\"" + end + + case val + in FinchAPI::FilePart unless val.filename.nil? + filename = ERB::Util.url_encode(val.filename) + y << "; filename=\"#{filename}\"" + in Pathname | IO + filename = ERB::Util.url_encode(File.basename(val.to_path)) + y << "; filename=\"#{filename}\"" + else + end + y << "\r\n" + + write_multipart_content(y, val: val, closing: closing) + end + # @api private # # @param body [Object] @@ -560,14 +568,12 @@ class << self # @return [Object] def encode_content(headers, body) content_type = headers["content-type"] - body = body.inner if body.is_a?(FinchAPI::Internal::Util::SerializationAdapter) - case [content_type, body] - in [%r{^application/(?:vnd\.api\+)?json}, Hash | Array | -> { primitive?(_1) }] + in [FinchAPI::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }] [headers, JSON.fast_generate(body)] - in [%r{^application/(?:x-)?jsonl}, Enumerable] unless body.is_a?(StringIO) || body.is_a?(IO) + in [FinchAPI::Internal::Util::JSONL_CONTENT, Enumerable] unless body.is_a?(FinchAPI::Internal::Type::FileInput) [headers, body.lazy.map { JSON.fast_generate(_1) }] - in [%r{^multipart/form-data}, Hash | Pathname | StringIO | IO] + in [%r{^multipart/form-data}, Hash | FinchAPI::Internal::Type::FileInput] boundary, strio = encode_multipart_streaming(body) headers = {**headers, "content-type" => "#{content_type}; boundary=#{boundary}"} [headers, strio] @@ -575,6 +581,8 @@ def encode_content(headers, body) [headers, body.to_s] in [_, StringIO] [headers, body.string] + in [_, FinchAPI::FilePart] + [headers, body.content] else [headers, body] end @@ -582,6 +590,27 @@ def encode_content(headers, body) # @api private # + # https://www.iana.org/assignments/character-sets/character-sets.xhtml + # + # @param content_type [String] + # @param text [String] + def force_charset!(content_type, text:) + charset = /charset=([^;\s]+)/.match(content_type)&.captures&.first + + return unless charset + + begin + encoding = Encoding.find(charset) + text.force_encoding(encoding) + rescue ArgumentError + nil + end + end + + # @api private + # + # Assumes each chunk in stream has `Encoding::BINARY`. + # # @param headers [Hash{String=>String}, Net::HTTPHeader] # @param stream [Enumerable] # @param suppress_error [Boolean] @@ -589,8 +618,8 @@ def encode_content(headers, body) # @raise [JSON::ParserError] # @return [Object] def decode_content(headers, stream:, suppress_error: false) - case headers["content-type"] - in %r{^application/(?:vnd\.api\+)?json} + case (content_type = headers["content-type"]) + in FinchAPI::Internal::Util::JSON_CONTENT json = stream.to_a.join begin JSON.parse(json, symbolize_names: true) @@ -598,7 +627,7 @@ def decode_content(headers, stream:, suppress_error: false) raise e unless suppress_error json end - in %r{^application/(?:x-)?jsonl} + in FinchAPI::Internal::Util::JSONL_CONTENT lines = decode_lines(stream) chain_fused(lines) do |y| lines.each { y << JSON.parse(_1, symbolize_names: true) } @@ -606,11 +635,10 @@ def decode_content(headers, stream:, suppress_error: false) in %r{^text/event-stream} lines = decode_lines(stream) decode_sse(lines) - in %r{^text/} - stream.to_a.join else - # TODO: parsing other response types - StringIO.new(stream.to_a.join) + text = stream.to_a.join + force_charset!(content_type, text: text) + StringIO.new(text) end end end @@ -675,12 +703,17 @@ def chain_fused(enum, &blk) class << self # @api private # + # Assumes Strings have been forced into having `Encoding::BINARY`. + # + # This decoder is responsible for reassembling lines split across multiple + # fragments. + # # @param enum [Enumerable] # # @return [Enumerable] def decode_lines(enum) re = /(\r\n|\r|\n)/ - buffer = String.new.b + buffer = String.new cr_seen = nil chain_fused(enum) do |y| @@ -711,6 +744,8 @@ def decode_lines(enum) # # https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream # + # Assumes that `lines` has been decoded with `#decode_lines`. + # # @param lines [Enumerable] # # @return [EnumerableObject}>] @@ -734,7 +769,7 @@ def decode_sse(lines) in "event" current.merge!(event: value) in "data" - (current[:data] ||= String.new.b) << (value << "\n") + (current[:data] ||= String.new) << (value << "\n") in "id" unless value.include?("\0") current.merge!(id: value) in "retry" if /^\d+$/ =~ value diff --git a/lib/finch_api/models/access_token_create_params.rb b/lib/finch_api/models/access_token_create_params.rb index eb27d419..6224b617 100644 --- a/lib/finch_api/models/access_token_create_params.rb +++ b/lib/finch_api/models/access_token_create_params.rb @@ -4,8 +4,7 @@ module FinchAPI module Models # @see FinchAPI::Resources::AccessTokens#create class AccessTokenCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute code @@ -13,43 +12,27 @@ class AccessTokenCreateParams < FinchAPI::Internal::Type::BaseModel # @return [String] required :code, String - # @!attribute [r] client_id + # @!attribute client_id # # @return [String, nil] optional :client_id, String - # @!parse - # # @return [String] - # attr_writer :client_id - - # @!attribute [r] client_secret + # @!attribute client_secret # # @return [String, nil] optional :client_secret, String - # @!parse - # # @return [String] - # attr_writer :client_secret - - # @!attribute [r] redirect_uri + # @!attribute redirect_uri # # @return [String, nil] optional :redirect_uri, String - # @!parse - # # @return [String] - # attr_writer :redirect_uri - - # @!parse - # # @param code [String] - # # @param client_id [String] - # # @param client_secret [String] - # # @param redirect_uri [String] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(code:, client_id: nil, client_secret: nil, redirect_uri: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(code:, client_id: nil, client_secret: nil, redirect_uri: nil, request_options: {}) + # @param code [String] + # @param client_id [String] + # @param client_secret [String] + # @param redirect_uri [String] + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/account_disconnect_params.rb b/lib/finch_api/models/account_disconnect_params.rb index 2381218b..3b854139 100644 --- a/lib/finch_api/models/account_disconnect_params.rb +++ b/lib/finch_api/models/account_disconnect_params.rb @@ -4,16 +4,11 @@ module FinchAPI module Models # @see FinchAPI::Resources::Account#disconnect class AccountDisconnectParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/account_introspect_params.rb b/lib/finch_api/models/account_introspect_params.rb index a7ffc921..f63a73cd 100644 --- a/lib/finch_api/models/account_introspect_params.rb +++ b/lib/finch_api/models/account_introspect_params.rb @@ -4,16 +4,11 @@ module FinchAPI module Models # @see FinchAPI::Resources::Account#introspect class AccountIntrospectParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/account_update_event.rb b/lib/finch_api/models/account_update_event.rb index 2fb4312f..09ce7f6b 100644 --- a/lib/finch_api/models/account_update_event.rb +++ b/lib/finch_api/models/account_update_event.rb @@ -3,31 +3,19 @@ module FinchAPI module Models class AccountUpdateEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::AccountUpdateEvent::Data, nil] optional :data, -> { FinchAPI::Models::AccountUpdateEvent::Data } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::AccountUpdateEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::AccountUpdateEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::AccountUpdateEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::AccountUpdateEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::AccountUpdateEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::AccountUpdateEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::AccountUpdateEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_method @@ -40,13 +28,9 @@ class Data < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::ConnectionStatusType] required :status, enum: -> { FinchAPI::Models::ConnectionStatusType } - # @!parse - # # @param authentication_method [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod] - # # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] - # # - # def initialize(authentication_method:, status:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(authentication_method:, status:) + # @param authentication_method [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod] + # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] # @see FinchAPI::Models::AccountUpdateEvent::Data#authentication_method class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel @@ -65,1359 +49,781 @@ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields }, nil?: true - # @!attribute [r] type + # @!attribute type # The type of authentication method. # # @return [Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type, nil] optional :type, enum: -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type] - # attr_writer :type - - # @!parse - # # @param benefits_support [FinchAPI::Models::HRIS::BenefitsSupport, nil] - # # @param supported_fields [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields, nil] - # # @param type [Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type] - # # - # def initialize(benefits_support: nil, supported_fields: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(benefits_support: nil, supported_fields: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::AccountUpdateEvent::Data::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 + # ... + # + # @param supported_fields [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints + # + # @param type [Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type] The type of authentication method. # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod#supported_fields class SupportedFields < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] company + # @!attribute company # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company, nil] optional :company, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company] - # attr_writer :company - - # @!attribute [r] directory + # @!attribute directory # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory, nil] optional :directory, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory] - # attr_writer :directory - - # @!attribute [r] employment + # @!attribute employment # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment, nil] optional :employment, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment] - # attr_writer :employment - - # @!attribute [r] individual + # @!attribute individual # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual, nil] optional :individual, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual] - # attr_writer :individual - - # @!attribute [r] pay_group + # @!attribute pay_group # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup, nil] optional :pay_group, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup] - # attr_writer :pay_group - - # @!attribute [r] pay_statement + # @!attribute pay_statement # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement, nil] optional :pay_statement, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement] - # attr_writer :pay_statement - - # @!attribute [r] payment + # @!attribute payment # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment, nil] optional :payment, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment] - # attr_writer :payment - - # @!parse - # # The supported data fields returned by our HR and payroll endpoints - # # - # # @param company [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company] - # # @param directory [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory] - # # @param employment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment] - # # @param individual [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual] - # # @param pay_group [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup] - # # @param pay_statement [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement] - # # @param payment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment] - # # - # def initialize( - # company: nil, - # directory: nil, - # employment: nil, - # individual: nil, - # pay_group: nil, - # pay_statement: nil, - # payment: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company] + # @param directory [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory] + # @param employment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment] + # @param individual [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual] + # @param pay_group [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup] + # @param pay_statement [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement] + # @param payment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#company class Company < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] accounts + # @!attribute accounts # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts, nil] optional :accounts, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts] - # attr_writer :accounts - - # @!attribute [r] departments + # @!attribute departments # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments, nil] optional :departments, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments] - # attr_writer :departments - - # @!attribute [r] ein + # @!attribute ein # # @return [Boolean, nil] optional :ein, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :ein - - # @!attribute [r] entity + # @!attribute entity # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity, nil] optional :entity, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity] - # attr_writer :entity - - # @!attribute [r] legal_name + # @!attribute legal_name # # @return [Boolean, nil] optional :legal_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :legal_name - - # @!attribute [r] locations + # @!attribute locations # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations, nil] optional :locations, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations] - # attr_writer :locations - - # @!attribute [r] primary_email + # @!attribute primary_email # # @return [Boolean, nil] optional :primary_email, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :primary_email - - # @!attribute [r] primary_phone_number + # @!attribute primary_phone_number # # @return [Boolean, nil] optional :primary_phone_number, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :primary_phone_number - - # @!parse - # # @param id [Boolean] - # # @param accounts [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts] - # # @param departments [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments] - # # @param ein [Boolean] - # # @param entity [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity] - # # @param legal_name [Boolean] - # # @param locations [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations] - # # @param primary_email [Boolean] - # # @param primary_phone_number [Boolean] - # # - # def initialize( - # id: nil, - # accounts: nil, - # departments: nil, - # ein: nil, - # entity: nil, - # legal_name: nil, - # locations: nil, - # primary_email: nil, - # primary_phone_number: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts] + # @param departments [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments] + # @param ein [Boolean] + # @param entity [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity] + # @param legal_name [Boolean] + # @param locations [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations] + # @param primary_email [Boolean] + # @param primary_phone_number [Boolean] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#accounts class Accounts < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] account_name + # @!attribute account_name # # @return [Boolean, nil] optional :account_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :account_name - - # @!attribute [r] account_number + # @!attribute account_number # # @return [Boolean, nil] optional :account_number, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :account_number - - # @!attribute [r] account_type + # @!attribute account_type # # @return [Boolean, nil] optional :account_type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :account_type - - # @!attribute [r] institution_name + # @!attribute institution_name # # @return [Boolean, nil] optional :institution_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :institution_name - - # @!attribute [r] routing_number + # @!attribute routing_number # # @return [Boolean, nil] optional :routing_number, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :routing_number - - # @!parse - # # @param account_name [Boolean] - # # @param account_number [Boolean] - # # @param account_type [Boolean] - # # @param institution_name [Boolean] - # # @param routing_number [Boolean] - # # - # def initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#departments class Departments < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] parent + # @!attribute parent # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] optional :parent, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - # attr_writer :parent - - # @!parse - # # @param name [Boolean] - # # @param parent [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - # # - # def initialize(name: nil, parent: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, parent: nil) + # @param name [Boolean] + # @param parent [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments#parent class Parent < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!parse - # # @param name [Boolean] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # @param name [Boolean] end end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#entity class Entity < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] subtype + # @!attribute subtype # # @return [Boolean, nil] optional :subtype, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :subtype - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param subtype [Boolean] - # # @param type [Boolean] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # @param subtype [Boolean] + # @param type [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company#locations class Locations < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] city + # @!attribute city # # @return [Boolean, nil] optional :city, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :city - - # @!attribute [r] country + # @!attribute country # # @return [Boolean, nil] optional :country, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :country - - # @!attribute [r] line1 + # @!attribute line1 # # @return [Boolean, nil] optional :line1, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line1 - - # @!attribute [r] line2 + # @!attribute line2 # # @return [Boolean, nil] optional :line2, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line2 - - # @!attribute [r] postal_code + # @!attribute postal_code # # @return [Boolean, nil] optional :postal_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :postal_code - - # @!attribute [r] state + # @!attribute state # # @return [Boolean, nil] optional :state, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :state - - # @!parse - # # @param city [Boolean] - # # @param country [Boolean] - # # @param line1 [Boolean] - # # @param line2 [Boolean] - # # @param postal_code [Boolean] - # # @param state [Boolean] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#directory class Directory < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individuals + # @!attribute individuals # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] optional :individuals, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals] - # attr_writer :individuals - - # @!attribute [r] paging + # @!attribute paging # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging, nil] optional :paging, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging] - # attr_writer :paging - - # @!parse - # # @param individuals [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals] - # # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging] - # # - # def initialize(individuals: nil, paging: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individuals: nil, paging: nil) + # @param individuals [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals] + # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory#individuals class Individuals < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] department + # @!attribute department # # @return [Boolean, nil] optional :department, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :department - - # @!attribute [r] first_name + # @!attribute first_name # # @return [Boolean, nil] optional :first_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :first_name - - # @!attribute [r] is_active + # @!attribute is_active # # @return [Boolean, nil] optional :is_active, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :is_active - - # @!attribute [r] last_name + # @!attribute last_name # # @return [Boolean, nil] optional :last_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :last_name - - # @!attribute [r] manager + # @!attribute manager # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] optional :manager, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] - # attr_writer :manager - - # @!attribute [r] middle_name + # @!attribute middle_name # # @return [Boolean, nil] optional :middle_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :middle_name - - # @!parse - # # @param id [Boolean] - # # @param department [Boolean] - # # @param first_name [Boolean] - # # @param is_active [Boolean] - # # @param last_name [Boolean] - # # @param manager [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] - # # @param middle_name [Boolean] - # # - # def initialize( - # id: nil, - # department: nil, - # first_name: nil, - # is_active: nil, - # last_name: nil, - # manager: nil, - # middle_name: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] + # @param middle_name [Boolean] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals#manager class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!parse - # # @param id [Boolean] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # @param id [Boolean] end end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory#paging class Paging < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] count + # @!attribute count # # @return [Boolean, nil] optional :count, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :count - - # @!attribute [r] offset + # @!attribute offset # # @return [Boolean, nil] optional :offset, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :offset - - # @!parse - # # @param count [Boolean] - # # @param offset [Boolean] - # # - # def initialize(count: nil, offset: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(count: nil, offset: nil) + # @param count [Boolean] + # @param offset [Boolean] end end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#employment class Employment < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] class_code + # @!attribute class_code # # @return [Boolean, nil] optional :class_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :class_code - - # @!attribute [r] custom_fields + # @!attribute custom_fields # # @return [Boolean, nil] optional :custom_fields, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :custom_fields - - # @!attribute [r] department + # @!attribute department # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department, nil] optional :department, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department] - # attr_writer :department - - # @!attribute [r] employment + # @!attribute employment # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment, nil] optional :employment, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment] - # attr_writer :employment - - # @!attribute [r] employment_status + # @!attribute employment_status # # @return [Boolean, nil] optional :employment_status, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employment_status - - # @!attribute [r] end_date + # @!attribute end_date # # @return [Boolean, nil] optional :end_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :end_date - - # @!attribute [r] first_name + # @!attribute first_name # # @return [Boolean, nil] optional :first_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :first_name - - # @!attribute [r] income + # @!attribute income # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income, nil] optional :income, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income] - # attr_writer :income - - # @!attribute [r] income_history + # @!attribute income_history # # @return [Boolean, nil] optional :income_history, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :income_history - - # @!attribute [r] is_active + # @!attribute is_active # # @return [Boolean, nil] optional :is_active, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :is_active - - # @!attribute [r] last_name + # @!attribute last_name # # @return [Boolean, nil] optional :last_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :last_name - - # @!attribute [r] location + # @!attribute location # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location, nil] optional :location, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location] - # attr_writer :location - - # @!attribute [r] manager + # @!attribute manager # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager, nil] optional :manager, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager] - # attr_writer :manager - - # @!attribute [r] middle_name + # @!attribute middle_name # # @return [Boolean, nil] optional :middle_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :middle_name - - # @!attribute [r] start_date + # @!attribute start_date # # @return [Boolean, nil] optional :start_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :start_date - - # @!attribute [r] title + # @!attribute title # # @return [Boolean, nil] optional :title, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :title - - # @!parse - # # @param id [Boolean] - # # @param class_code [Boolean] - # # @param custom_fields [Boolean] - # # @param department [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department] - # # @param employment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment] - # # @param employment_status [Boolean] - # # @param end_date [Boolean] - # # @param first_name [Boolean] - # # @param income [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income] - # # @param income_history [Boolean] - # # @param is_active [Boolean] - # # @param last_name [Boolean] - # # @param location [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location] - # # @param manager [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager] - # # @param middle_name [Boolean] - # # @param start_date [Boolean] - # # @param title [Boolean] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department] + # @param employment [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment] + # @param employment_status [Boolean] + # @param end_date [Boolean] + # @param first_name [Boolean] + # @param income [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income] + # @param income_history [Boolean] + # @param is_active [Boolean] + # @param last_name [Boolean] + # @param location [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location] + # @param manager [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager] + # @param middle_name [Boolean] + # @param start_date [Boolean] + # @param title [Boolean] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#department class Department < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!parse - # # @param name [Boolean] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # @param name [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#employment class Employment < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] subtype + # @!attribute subtype # # @return [Boolean, nil] optional :subtype, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :subtype - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param subtype [Boolean] - # # @param type [Boolean] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # @param subtype [Boolean] + # @param type [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#income class Income < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] unit + # @!attribute unit # # @return [Boolean, nil] optional :unit, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :unit - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param unit [Boolean] - # # - # def initialize(amount: nil, currency: nil, unit: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, currency: nil, unit: nil) + # @param amount [Boolean] + # @param currency [Boolean] + # @param unit [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#location class Location < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] city + # @!attribute city # # @return [Boolean, nil] optional :city, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :city - - # @!attribute [r] country + # @!attribute country # # @return [Boolean, nil] optional :country, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :country - - # @!attribute [r] line1 + # @!attribute line1 # # @return [Boolean, nil] optional :line1, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line1 - - # @!attribute [r] line2 + # @!attribute line2 # # @return [Boolean, nil] optional :line2, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line2 - - # @!attribute [r] postal_code + # @!attribute postal_code # # @return [Boolean, nil] optional :postal_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :postal_code - - # @!attribute [r] state + # @!attribute state # # @return [Boolean, nil] optional :state, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :state - - # @!parse - # # @param city [Boolean] - # # @param country [Boolean] - # # @param line1 [Boolean] - # # @param line2 [Boolean] - # # @param postal_code [Boolean] - # # @param state [Boolean] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment#manager class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!parse - # # @param id [Boolean] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # @param id [Boolean] end end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#individual class Individual < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] dob + # @!attribute dob # # @return [Boolean, nil] optional :dob, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :dob - - # @!attribute [r] emails + # @!attribute emails # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails, nil] optional :emails, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails] - # attr_writer :emails - - # @!attribute [r] encrypted_ssn + # @!attribute encrypted_ssn # # @return [Boolean, nil] optional :encrypted_ssn, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :encrypted_ssn - - # @!attribute [r] ethnicity + # @!attribute ethnicity # # @return [Boolean, nil] optional :ethnicity, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :ethnicity - - # @!attribute [r] first_name + # @!attribute first_name # # @return [Boolean, nil] optional :first_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :first_name - - # @!attribute [r] gender + # @!attribute gender # # @return [Boolean, nil] optional :gender, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :gender - - # @!attribute [r] last_name + # @!attribute last_name # # @return [Boolean, nil] optional :last_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :last_name - - # @!attribute [r] middle_name + # @!attribute middle_name # # @return [Boolean, nil] optional :middle_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :middle_name - - # @!attribute [r] phone_numbers + # @!attribute phone_numbers # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] optional :phone_numbers, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] - # attr_writer :phone_numbers - - # @!attribute [r] preferred_name + # @!attribute preferred_name # # @return [Boolean, nil] optional :preferred_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :preferred_name - - # @!attribute [r] residence + # @!attribute residence # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence, nil] optional :residence, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence] - # attr_writer :residence - - # @!attribute [r] ssn + # @!attribute ssn # # @return [Boolean, nil] optional :ssn, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :ssn - - # @!parse - # # @param id [Boolean] - # # @param dob [Boolean] - # # @param emails [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails] - # # @param encrypted_ssn [Boolean] - # # @param ethnicity [Boolean] - # # @param first_name [Boolean] - # # @param gender [Boolean] - # # @param last_name [Boolean] - # # @param middle_name [Boolean] - # # @param phone_numbers [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] - # # @param preferred_name [Boolean] - # # @param residence [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence] - # # @param ssn [Boolean] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails] + # @param encrypted_ssn [Boolean] + # @param ethnicity [Boolean] + # @param first_name [Boolean] + # @param gender [Boolean] + # @param last_name [Boolean] + # @param middle_name [Boolean] + # @param phone_numbers [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] + # @param preferred_name [Boolean] + # @param residence [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence] + # @param ssn [Boolean] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#emails class Emails < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # # @return [Boolean, nil] optional :data, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :data - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param data [Boolean] - # # @param type [Boolean] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [Boolean] + # @param type [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#phone_numbers class PhoneNumbers < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # # @return [Boolean, nil] optional :data, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :data - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param data [Boolean] - # # @param type [Boolean] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [Boolean] + # @param type [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual#residence class Residence < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] city + # @!attribute city # # @return [Boolean, nil] optional :city, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :city - - # @!attribute [r] country + # @!attribute country # # @return [Boolean, nil] optional :country, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :country - - # @!attribute [r] line1 + # @!attribute line1 # # @return [Boolean, nil] optional :line1, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line1 - - # @!attribute [r] line2 + # @!attribute line2 # # @return [Boolean, nil] optional :line2, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line2 - - # @!attribute [r] postal_code + # @!attribute postal_code # # @return [Boolean, nil] optional :postal_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :postal_code - - # @!attribute [r] state + # @!attribute state # # @return [Boolean, nil] optional :state, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :state - - # @!parse - # # @param city [Boolean] - # # @param country [Boolean] - # # @param line1 [Boolean] - # # @param line2 [Boolean] - # # @param postal_code [Boolean] - # # @param state [Boolean] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#pay_group class PayGroup < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] individual_ids + # @!attribute individual_ids # # @return [Boolean, nil] optional :individual_ids, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :individual_ids - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] pay_frequencies + # @!attribute pay_frequencies # # @return [Boolean, nil] optional :pay_frequencies, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_frequencies - - # @!parse - # # @param id [Boolean] - # # @param individual_ids [Boolean] - # # @param name [Boolean] - # # @param pay_frequencies [Boolean] - # # - # def initialize(id: nil, individual_ids: nil, name: nil, pay_frequencies: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#pay_statement class PayStatement < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] paging + # @!attribute paging # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] optional :paging, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # attr_writer :paging - - # @!attribute [r] pay_statements + # @!attribute pay_statements # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] optional :pay_statements, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - # attr_writer :pay_statements - - # @!parse - # # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # # @param pay_statements [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - # # - # def initialize(paging: nil, pay_statements: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(paging: nil, pay_statements: nil) + # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging] + # @param pay_statements [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement#paging class Paging < FinchAPI::Internal::Type::BaseModel @@ -1431,521 +837,295 @@ class Paging < FinchAPI::Internal::Type::BaseModel # @return [Boolean] required :offset, FinchAPI::Internal::Type::Boolean - # @!parse - # # @param count [Boolean] - # # @param offset [Boolean] - # # - # def initialize(count:, offset:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(count:, offset:) + # @param count [Boolean] + # @param offset [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement#pay_statements class PayStatements < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] earnings + # @!attribute earnings # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] optional :earnings, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] - # attr_writer :earnings - - # @!attribute [r] employee_deductions + # @!attribute employee_deductions # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] optional :employee_deductions, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] - # attr_writer :employee_deductions - - # @!attribute [r] employer_contributions + # @!attribute employer_contributions # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] optional :employer_contributions, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] - # attr_writer :employer_contributions - - # @!attribute [r] gross_pay + # @!attribute gross_pay # # @return [Boolean, nil] optional :gross_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :gross_pay - - # @!attribute [r] individual_id + # @!attribute individual_id # # @return [Boolean, nil] optional :individual_id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :individual_id - - # @!attribute [r] net_pay + # @!attribute net_pay # # @return [Boolean, nil] optional :net_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :net_pay - - # @!attribute [r] payment_method + # @!attribute payment_method # # @return [Boolean, nil] optional :payment_method, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :payment_method - - # @!attribute [r] taxes + # @!attribute taxes # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] optional :taxes, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] - # attr_writer :taxes - - # @!attribute [r] total_hours + # @!attribute total_hours # # @return [Boolean, nil] optional :total_hours, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :total_hours - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param earnings [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] - # # @param employee_deductions [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] - # # @param employer_contributions [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] - # # @param gross_pay [Boolean] - # # @param individual_id [Boolean] - # # @param net_pay [Boolean] - # # @param payment_method [Boolean] - # # @param taxes [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] - # # @param total_hours [Boolean] - # # @param type [Boolean] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] + # @param employee_deductions [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] + # @param employer_contributions [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] + # @param gross_pay [Boolean] + # @param individual_id [Boolean] + # @param net_pay [Boolean] + # @param payment_method [Boolean] + # @param taxes [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] + # @param total_hours [Boolean] + # @param type [Boolean] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#earnings class Earnings < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param name [Boolean] - # # @param type [Boolean] - # # - # def initialize(amount: nil, currency: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employee_deductions class EmployeeDeductions < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] pre_tax + # @!attribute pre_tax # # @return [Boolean, nil] optional :pre_tax, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pre_tax - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param name [Boolean] - # # @param pre_tax [Boolean] - # # @param type [Boolean] - # # - # def initialize(amount: nil, currency: nil, name: nil, pre_tax: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#employer_contributions class EmployerContributions < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param name [Boolean] - # # - # def initialize(amount: nil, currency: nil, name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, currency: nil, name: nil) + # @param amount [Boolean] + # @param currency [Boolean] + # @param name [Boolean] end # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements#taxes class Taxes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] employer + # @!attribute employer # # @return [Boolean, nil] optional :employer, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employer - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param employer [Boolean] - # # @param name [Boolean] - # # @param type [Boolean] - # # - # def initialize(amount: nil, currency: nil, employer: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields#payment class Payment < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] company_debit + # @!attribute company_debit # # @return [Boolean, nil] optional :company_debit, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :company_debit - - # @!attribute [r] debit_date + # @!attribute debit_date # # @return [Boolean, nil] optional :debit_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :debit_date - - # @!attribute [r] employee_taxes + # @!attribute employee_taxes # # @return [Boolean, nil] optional :employee_taxes, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employee_taxes - - # @!attribute [r] employer_taxes + # @!attribute employer_taxes # # @return [Boolean, nil] optional :employer_taxes, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employer_taxes - - # @!attribute [r] gross_pay + # @!attribute gross_pay # # @return [Boolean, nil] optional :gross_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :gross_pay - - # @!attribute [r] individual_ids + # @!attribute individual_ids # # @return [Boolean, nil] optional :individual_ids, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :individual_ids - - # @!attribute [r] net_pay + # @!attribute net_pay # # @return [Boolean, nil] optional :net_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :net_pay - - # @!attribute [r] pay_date + # @!attribute pay_date # # @return [Boolean, nil] optional :pay_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_date - - # @!attribute [r] pay_frequencies + # @!attribute pay_frequencies # # @return [Boolean, nil] optional :pay_frequencies, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_frequencies - - # @!attribute [r] pay_group_ids + # @!attribute pay_group_ids # # @return [Boolean, nil] optional :pay_group_ids, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_group_ids - - # @!attribute [r] pay_period + # @!attribute pay_period # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] optional :pay_period, -> { FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod } - # @!parse - # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod] - # attr_writer :pay_period - - # @!parse - # # @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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod] # @see FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment#pay_period class PayPeriod < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] end_date + # @!attribute end_date # # @return [Boolean, nil] optional :end_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :end_date - - # @!attribute [r] start_date + # @!attribute start_date # # @return [Boolean, nil] optional :start_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :start_date - - # @!parse - # # @param end_date [Boolean] - # # @param start_date [Boolean] - # # - # def initialize(end_date: nil, start_date: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(end_date: nil, start_date: nil) + # @param end_date [Boolean] + # @param start_date [Boolean] end end end @@ -1962,11 +1142,8 @@ module Type API_CREDENTIAL = :api_credential OAUTH = :oauth - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end @@ -1976,11 +1153,8 @@ module EventType ACCOUNT_UPDATED = :"account.updated" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/base_webhook_event.rb b/lib/finch_api/models/base_webhook_event.rb index 01d3fba8..009b90fe 100644 --- a/lib/finch_api/models/base_webhook_event.rb +++ b/lib/finch_api/models/base_webhook_event.rb @@ -4,6 +4,8 @@ module FinchAPI module Models class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @!attribute account_id + # @deprecated + # # [DEPRECATED] Unique Finch ID of the employer account used to make this # connection. Use `connection_id` instead to identify the connection associated # with this event. @@ -12,30 +14,31 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel required :account_id, String # @!attribute company_id + # @deprecated + # # [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use # `connection_id` instead to identify the connection associated with this event. # # @return [String] required :company_id, String - # @!attribute [r] connection_id + # @!attribute connection_id # Unique Finch ID of the connection associated with the webhook event. # # @return [String, nil] optional :connection_id, String - # @!parse - # # @return [String] - # attr_writer :connection_id - - # @!parse - # # @param account_id [String] - # # @param company_id [String] - # # @param connection_id [String] - # # - # def initialize(account_id:, company_id:, connection_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(account_id:, company_id:, connection_id: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::BaseWebhookEvent} for more details. + # + # @param account_id [String] [DEPRECATED] Unique Finch ID of the employer account used to make this connectio + # ... + # + # @param company_id [String] [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use + # ... + # + # @param connection_id [String] Unique Finch ID of the connection associated with the webhook event. end end end diff --git a/lib/finch_api/models/company_event.rb b/lib/finch_api/models/company_event.rb index fb0b6eb2..c7f0c78e 100644 --- a/lib/finch_api/models/company_event.rb +++ b/lib/finch_api/models/company_event.rb @@ -8,33 +8,22 @@ class CompanyEvent < FinchAPI::Models::BaseWebhookEvent # @return [Hash{Symbol=>Object}, nil] optional :data, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown], nil?: true - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::CompanyEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::CompanyEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::CompanyEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [Hash{Symbol=>Object}, nil] - # # @param event_type [Symbol, FinchAPI::Models::CompanyEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [Hash{Symbol=>Object}, nil] + # @param event_type [Symbol, FinchAPI::Models::CompanyEvent::EventType] module EventType extend FinchAPI::Internal::Type::Enum COMPANY_UPDATED = :"company.updated" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/connect/session_new_params.rb b/lib/finch_api/models/connect/session_new_params.rb index 884abf81..bc646240 100644 --- a/lib/finch_api/models/connect/session_new_params.rb +++ b/lib/finch_api/models/connect/session_new_params.rb @@ -5,8 +5,7 @@ module Models module Connect # @see FinchAPI::Resources::Connect::Sessions#new class SessionNewParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute customer_id @@ -57,35 +56,30 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] optional :sandbox, enum: -> { FinchAPI::Models::Connect::SessionNewParams::Sandbox }, nil?: true - # @!parse - # # @param customer_id [String] - # # @param customer_name [String] - # # @param products [Array] - # # @param customer_email [String, nil] - # # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] - # # @param manual [Boolean, nil] - # # @param minutes_to_expire [Float, nil] - # # @param redirect_uri [String, nil] - # # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize( - # customer_id:, - # customer_name:, - # products:, - # customer_email: nil, - # integration: nil, - # manual: nil, - # minutes_to_expire: nil, - # redirect_uri: nil, - # sandbox: nil, - # request_options: {}, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Connect::SessionNewParams} for more details. + # + # @param customer_id [String] + # + # @param customer_name [String] + # + # @param products [Array] + # + # @param customer_email [String, nil] + # + # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] + # + # @param manual [Boolean, nil] + # + # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 + # ... + # + # @param redirect_uri [String, nil] + # + # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] # The Finch products that can be requested during the Connect flow. module Product @@ -99,12 +93,11 @@ module Product PAY_STATEMENT = :pay_statement BENEFITS = :benefits SSN = :ssn + DEDUCTION = :deduction + DOCUMENTS = :documents - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class Integration < FinchAPI::Internal::Type::BaseModel @@ -120,13 +113,9 @@ class Integration < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :provider, String, nil?: true - # @!parse - # # @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] - # # @param provider [String, nil] - # # - # def initialize(auth_method: nil, provider: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(auth_method: nil, provider: nil) + # @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] + # @param provider [String, nil] # @see FinchAPI::Models::Connect::SessionNewParams::Integration#auth_method module AuthMethod @@ -137,11 +126,8 @@ module AuthMethod OAUTH = :oauth API_TOKEN = :api_token - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -151,11 +137,8 @@ module Sandbox FINCH = :finch PROVIDER = :provider - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/connect/session_new_response.rb b/lib/finch_api/models/connect/session_new_response.rb index bc3ddb43..8e794495 100644 --- a/lib/finch_api/models/connect/session_new_response.rb +++ b/lib/finch_api/models/connect/session_new_response.rb @@ -17,13 +17,10 @@ class SessionNewResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :session_id, String - # @!parse - # # @param connect_url [String] - # # @param session_id [String] - # # - # def initialize(connect_url:, session_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(connect_url:, session_id:) + # @param connect_url [String] The Connect URL to redirect the user to for authentication + # + # @param session_id [String] The unique identifier for the created connect session end end end diff --git a/lib/finch_api/models/connect/session_reauthenticate_params.rb b/lib/finch_api/models/connect/session_reauthenticate_params.rb index cdcca2b7..5bb61edf 100644 --- a/lib/finch_api/models/connect/session_reauthenticate_params.rb +++ b/lib/finch_api/models/connect/session_reauthenticate_params.rb @@ -5,8 +5,7 @@ module Models module Connect # @see FinchAPI::Resources::Connect::Sessions#reauthenticate class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute connection_id @@ -36,16 +35,20 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :redirect_uri, String, nil?: true - # @!parse - # # @param connection_id [String] - # # @param minutes_to_expire [Integer, nil] - # # @param products [Array, nil] - # # @param redirect_uri [String, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, 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 products [Array, nil] The products to request access to (optional for reauthentication) + # + # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] # The Finch products that can be requested during the Connect flow. module Product @@ -59,12 +62,11 @@ module Product PAY_STATEMENT = :pay_statement BENEFITS = :benefits SSN = :ssn + DEDUCTION = :deduction + DOCUMENTS = :documents - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/connect/session_reauthenticate_response.rb b/lib/finch_api/models/connect/session_reauthenticate_response.rb index 4970f6d1..3f560ca3 100644 --- a/lib/finch_api/models/connect/session_reauthenticate_response.rb +++ b/lib/finch_api/models/connect/session_reauthenticate_response.rb @@ -17,13 +17,10 @@ class SessionReauthenticateResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :session_id, String - # @!parse - # # @param connect_url [String] - # # @param session_id [String] - # # - # def initialize(connect_url:, session_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(connect_url:, session_id:) + # @param connect_url [String] The Connect URL to redirect the user to for reauthentication + # + # @param session_id [String] The unique identifier for the created connect session end end end diff --git a/lib/finch_api/models/connection_status_type.rb b/lib/finch_api/models/connection_status_type.rb index 4ab74521..eb00bee4 100644 --- a/lib/finch_api/models/connection_status_type.rb +++ b/lib/finch_api/models/connection_status_type.rb @@ -12,11 +12,8 @@ module ConnectionStatusType ERROR_PERMISSIONS = :error_permissions REAUTH = :reauth - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/create_access_token_response.rb b/lib/finch_api/models/create_access_token_response.rb index f6a05247..dfc7b2a5 100644 --- a/lib/finch_api/models/create_access_token_response.rb +++ b/lib/finch_api/models/create_access_token_response.rb @@ -11,6 +11,8 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel required :access_token, String # @!attribute account_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to identify the connection instead of this # account ID. # @@ -24,6 +26,8 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel required :client_type, enum: -> { FinchAPI::Models::CreateAccessTokenResponse::ClientType } # @!attribute company_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to identify the connection instead of this # company ID. # @@ -64,45 +68,38 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :customer_id, String, nil?: true - # @!attribute [r] token_type + # @!attribute token_type # The RFC 8693 token type (Finch uses `bearer` tokens) # # @return [String, nil] optional :token_type, String - # @!parse - # # @return [String] - # attr_writer :token_type - - # @!parse - # # @param access_token [String] - # # @param account_id [String] - # # @param client_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType] - # # @param company_id [String] - # # @param connection_id [String] - # # @param connection_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] - # # @param products [Array] - # # @param provider_id [String] - # # @param customer_id [String, nil] - # # @param token_type [String] - # # - # def initialize( - # access_token:, - # account_id:, - # client_type:, - # company_id:, - # connection_id:, - # connection_type:, - # products:, - # provider_id:, - # customer_id: nil, - # token_type: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(access_token:, account_id:, client_type:, company_id:, connection_id:, connection_type:, products:, provider_id:, customer_id: nil, token_type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::CreateAccessTokenResponse} for more details. + # + # @param access_token [String] The access token for the connection. + # + # @param account_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this acco + # ... + # + # @param client_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType] The type of application associated with a token. + # + # @param company_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this comp + # ... + # + # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`. + # + # @param connection_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] The type of the connection associated with the token. ... + # + # @param products [Array] An array of the authorized products associated with the `access_token`. + # + # @param provider_id [String] The ID of the provider associated with the `access_token`. + # + # @param customer_id [String, nil] The ID of your customer you provided to Finch when a connect session was created + # ... + # + # @param token_type [String] The RFC 8693 token type (Finch uses `bearer` tokens) # The type of application associated with a token. # @@ -114,11 +111,8 @@ module ClientType DEVELOPMENT = :development SANDBOX = :sandbox - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The type of the connection associated with the token. @@ -133,11 +127,8 @@ module ConnectionType PROVIDER = :provider FINCH = :finch - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/directory_event.rb b/lib/finch_api/models/directory_event.rb index c5eec46c..c9e5e027 100644 --- a/lib/finch_api/models/directory_event.rb +++ b/lib/finch_api/models/directory_event.rb @@ -3,49 +3,29 @@ module FinchAPI module Models class DirectoryEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::DirectoryEvent::Data, nil] optional :data, -> { FinchAPI::Models::DirectoryEvent::Data } - # @!parse - # # @return [FinchAPI::Models::DirectoryEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::DirectoryEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::DirectoryEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::DirectoryEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::DirectoryEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::DirectoryEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::DirectoryEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::DirectoryEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individual_id + # @!attribute individual_id # The ID of the individual related to the event. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param individual_id [String] - # # - # def initialize(individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil) + # @param individual_id [String] The ID of the individual related to the event. end module EventType @@ -55,11 +35,8 @@ module EventType DIRECTORY_UPDATED = :"directory.updated" DIRECTORY_DELETED = :"directory.deleted" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/disconnect_response.rb b/lib/finch_api/models/disconnect_response.rb index 2f29ea1b..645b548d 100644 --- a/lib/finch_api/models/disconnect_response.rb +++ b/lib/finch_api/models/disconnect_response.rb @@ -10,12 +10,8 @@ class DisconnectResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :status, String - # @!parse - # # @param status [String] - # # - # def initialize(status:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(status:) + # @param status [String] If the request is successful, Finch will return “success” (HTTP 200 status). end end end diff --git a/lib/finch_api/models/employment_event.rb b/lib/finch_api/models/employment_event.rb index f3ac983d..689a513e 100644 --- a/lib/finch_api/models/employment_event.rb +++ b/lib/finch_api/models/employment_event.rb @@ -3,49 +3,29 @@ module FinchAPI module Models class EmploymentEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::EmploymentEvent::Data, nil] optional :data, -> { FinchAPI::Models::EmploymentEvent::Data } - # @!parse - # # @return [FinchAPI::Models::EmploymentEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::EmploymentEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::EmploymentEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::EmploymentEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::EmploymentEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::EmploymentEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::EmploymentEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::EmploymentEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individual_id + # @!attribute individual_id # The ID of the individual related to the event. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param individual_id [String] - # # - # def initialize(individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil) + # @param individual_id [String] The ID of the individual related to the event. end module EventType @@ -55,11 +35,8 @@ module EventType EMPLOYMENT_UPDATED = :"employment.updated" EMPLOYMENT_DELETED = :"employment.deleted" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/benefit_contribution.rb b/lib/finch_api/models/hris/benefit_contribution.rb index ec5826a7..82dcd814 100644 --- a/lib/finch_api/models/hris/benefit_contribution.rb +++ b/lib/finch_api/models/hris/benefit_contribution.rb @@ -16,13 +16,10 @@ class BenefitContribution < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitContribution::Type }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] - # # - # def initialize(amount: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, type: nil) + # @param amount [Integer, nil] Contribution amount in cents (if `fixed`) or basis points (if `percent`). + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] Contribution type. # Contribution type. # @@ -33,11 +30,8 @@ module Type FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] 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 9eefce01..f4b34d7c 100644 --- a/lib/finch_api/models/hris/benefit_create_params.rb +++ b/lib/finch_api/models/hris/benefit_create_params.rb @@ -5,11 +5,18 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Benefits#create class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] description + # @!attribute company_contribution + # The company match for this benefit. + # + # @return [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] + optional :company_contribution, + -> { FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution }, + nil?: true + + # @!attribute description # 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). @@ -17,10 +24,6 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :description, String - # @!parse - # # @return [String] - # attr_writer :description - # @!attribute frequency # The frequency of the benefit deduction/contribution. # @@ -33,15 +36,65 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitType }, nil?: true - # @!parse - # # @param description [String] - # # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(description: nil, frequency: nil, type: nil, request_options: {}, **) = super + # @!method initialize(company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::BenefitCreateParams} for more details. + # + # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit. + # + # @param description [String] Name of the benefit as it appears in the provider and pay statements. Recommend + # ... + # + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + + class CompanyContribution < FinchAPI::Internal::Type::BaseModel + # @!attribute tiers + # + # @return [Array, nil] + optional :tiers, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier] } + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type, nil] + optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type } + + # @!method initialize(tiers: nil, type: nil) + # The company match for this benefit. + # + # @param tiers [Array] + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type] + + class Tier < FinchAPI::Internal::Type::BaseModel + # @!attribute match + # + # @return [Integer, nil] + optional :match, Integer + + # @!attribute threshold + # + # @return [Integer, nil] + optional :threshold, Integer + + # @!method initialize(match: nil, threshold: nil) + # @param match [Integer] + # @param threshold [Integer] + end + + # @see FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution#type + module Type + extend FinchAPI::Internal::Type::Enum + + MATCH = :match - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method self.values + # @return [Array] + end + end end end end diff --git a/lib/finch_api/models/hris/benefit_features_and_operations.rb b/lib/finch_api/models/hris/benefit_features_and_operations.rb index 85ca73d4..7e665a05 100644 --- a/lib/finch_api/models/hris/benefit_features_and_operations.rb +++ b/lib/finch_api/models/hris/benefit_features_and_operations.rb @@ -4,32 +4,20 @@ module FinchAPI module Models module HRIS class BenefitFeaturesAndOperations < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] supported_features + # @!attribute supported_features # # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures, nil] optional :supported_features, -> { FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures } - # @!parse - # # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures] - # attr_writer :supported_features - - # @!attribute [r] supported_operations + # @!attribute supported_operations # # @return [FinchAPI::Models::HRIS::SupportPerBenefitType, nil] optional :supported_operations, -> { FinchAPI::Models::HRIS::SupportPerBenefitType } - # @!parse - # # @return [FinchAPI::Models::HRIS::SupportPerBenefitType] - # attr_writer :supported_operations - - # @!parse - # # @param supported_features [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures] - # # @param supported_operations [FinchAPI::Models::HRIS::SupportPerBenefitType] - # # - # def initialize(supported_features: nil, supported_operations: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(supported_features: nil, supported_operations: nil) + # @param supported_features [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures] + # @param supported_operations [FinchAPI::Models::HRIS::SupportPerBenefitType] # @see FinchAPI::Models::HRIS::BenefitFeaturesAndOperations#supported_features class SupportedFeatures < FinchAPI::Internal::Type::BaseModel @@ -54,7 +42,8 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel optional :company_contribution, -> do FinchAPI::Internal::Type::ArrayOf[ - enum: FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution, nil?: true + enum: FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution, + nil?: true ] end, nil?: true @@ -70,24 +59,16 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :employee_deduction, - -> do - FinchAPI::Internal::Type::ArrayOf[ - enum: FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction, nil?: true - ] - end, + -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction, nil?: true] }, nil?: true - # @!attribute [r] frequencies + # @!attribute frequencies # The list of frequencies supported by the provider for this benefit # # @return [Array, nil] optional :frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitFrequency, nil?: true] } - # @!parse - # # @return [Array] - # attr_writer :frequencies - # @!attribute hsa_contribution_limit # Whether the provider supports HSA contribution limits. Empty if this feature is # not supported for the benefit. This array only has values for HSA benefits. @@ -96,34 +77,34 @@ class SupportedFeatures < FinchAPI::Internal::Type::BaseModel optional :hsa_contribution_limit, -> do FinchAPI::Internal::Type::ArrayOf[ - enum: FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit, nil?: true + enum: FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit, + nil?: true ] end, nil?: true - # @!parse - # # @param annual_maximum [Boolean, nil] - # # @param catch_up [Boolean, nil] - # # @param company_contribution [Array, nil] - # # @param description [String, nil] - # # @param employee_deduction [Array, nil] - # # @param frequencies [Array] - # # @param hsa_contribution_limit [Array, nil] - # # - # def initialize( - # annual_maximum: nil, - # catch_up: nil, - # company_contribution: nil, - # description: nil, - # employee_deduction: nil, - # frequencies: nil, - # hsa_contribution_limit: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures} for + # more details. + # + # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. + # + # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be + # ... + # + # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup + # ... + # + # @param description [String, nil] + # + # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported + # ... + # + # @param frequencies [Array] The list of frequencies supported by the provider for this benefit + # + # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is + # ... module CompanyContribution extend FinchAPI::Internal::Type::Enum @@ -131,11 +112,8 @@ module CompanyContribution FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end module EmployeeDeduction @@ -144,11 +122,8 @@ module EmployeeDeduction FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end module HsaContributionLimit @@ -157,11 +132,8 @@ module HsaContributionLimit INDIVIDUAL = :individual FAMILY = :family - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/benefit_frequency.rb b/lib/finch_api/models/hris/benefit_frequency.rb index 84a275c8..b81f385d 100644 --- a/lib/finch_api/models/hris/benefit_frequency.rb +++ b/lib/finch_api/models/hris/benefit_frequency.rb @@ -11,11 +11,8 @@ module BenefitFrequency EVERY_PAYCHECK = :every_paycheck MONTHLY = :monthly - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/benefit_list_params.rb b/lib/finch_api/models/hris/benefit_list_params.rb index 21c0e2d0..e6fd96b3 100644 --- a/lib/finch_api/models/hris/benefit_list_params.rb +++ b/lib/finch_api/models/hris/benefit_list_params.rb @@ -5,16 +5,11 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Benefits#list class BenefitListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end 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 4994b198..ab66dee1 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 @@ -5,16 +5,11 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Benefits#list_supported_benefits class BenefitListSupportedBenefitsParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb b/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb index 225bf8fe..bddbd036 100644 --- a/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb +++ b/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rb @@ -41,17 +41,13 @@ class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction, nil?: true] }, nil?: true - # @!attribute [r] frequencies + # @!attribute frequencies # The list of frequencies supported by the provider for this benefit # # @return [Array, nil] optional :frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitFrequency, nil?: true] } - # @!parse - # # @return [Array] - # attr_writer :frequencies - # @!attribute hsa_contribution_limit # Whether the provider supports HSA contribution limits. Empty if this feature is # not supported for the benefit. This array only has values for HSA benefits. @@ -61,29 +57,27 @@ class BenefitListSupportedBenefitsResponse < FinchAPI::Internal::Type::BaseModel -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit, nil?: true] }, nil?: true - # @!parse - # # @param annual_maximum [Boolean, nil] - # # @param catch_up [Boolean, nil] - # # @param company_contribution [Array, nil] - # # @param description [String, nil] - # # @param employee_deduction [Array, nil] - # # @param frequencies [Array] - # # @param hsa_contribution_limit [Array, nil] - # # - # def initialize( - # annual_maximum: nil, - # catch_up: nil, - # company_contribution: nil, - # description: nil, - # employee_deduction: nil, - # frequencies: nil, - # hsa_contribution_limit: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse} for more details. + # + # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. + # + # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be + # ... + # + # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup + # ... + # + # @param description [String, nil] + # + # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported + # ... + # + # @param frequencies [Array] The list of frequencies supported by the provider for this benefit + # + # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is + # ... module CompanyContribution extend FinchAPI::Internal::Type::Enum @@ -91,11 +85,8 @@ module CompanyContribution FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end module EmployeeDeduction @@ -104,11 +95,8 @@ module EmployeeDeduction FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end module HsaContributionLimit @@ -117,11 +105,8 @@ module HsaContributionLimit INDIVIDUAL = :individual FAMILY = :family - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 881287ce..092c4a31 100644 --- a/lib/finch_api/models/hris/benefit_retrieve_params.rb +++ b/lib/finch_api/models/hris/benefit_retrieve_params.rb @@ -5,16 +5,11 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Benefits#retrieve class BenefitRetrieveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/benefit_type.rb b/lib/finch_api/models/hris/benefit_type.rb index 569fcd4c..45873261 100644 --- a/lib/finch_api/models/hris/benefit_type.rb +++ b/lib/finch_api/models/hris/benefit_type.rb @@ -27,11 +27,8 @@ module BenefitType CUSTOM_POST_TAX = :custom_post_tax CUSTOM_PRE_TAX = :custom_pre_tax - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 43047dac..5b9291c9 100644 --- a/lib/finch_api/models/hris/benefit_update_params.rb +++ b/lib/finch_api/models/hris/benefit_update_params.rb @@ -5,27 +5,19 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Benefits#update class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] description + # @!attribute description # Updated name or description. # # @return [String, nil] optional :description, String - # @!parse - # # @return [String] - # attr_writer :description - - # @!parse - # # @param description [String] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(description: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(description: nil, request_options: {}) + # @param description [String] Updated name or description. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rb b/lib/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rb index 116dd384..2f66c750 100644 --- a/lib/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rb +++ b/lib/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rb @@ -11,12 +11,8 @@ class EnrolledIndividualBenefitResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :job_id, String - # @!parse - # # @param job_id [String] - # # - # def initialize(job_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(job_id:) + # @param job_id [String] end end end diff --git a/lib/finch_api/models/hris/benefits/individual_benefit.rb b/lib/finch_api/models/hris/benefits/individual_benefit.rb index b7c62aa9..c5aa4f4a 100644 --- a/lib/finch_api/models/hris/benefits/individual_benefit.rb +++ b/lib/finch_api/models/hris/benefits/individual_benefit.rb @@ -6,41 +6,25 @@ module HRIS module Benefits # @see FinchAPI::Resources::HRIS::Benefits::Individuals#retrieve_many_benefits class IndividualBenefit < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] body + # @!attribute body # # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body, nil] optional :body, -> { FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body } - # @!parse - # # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body] - # attr_writer :body - - # @!attribute [r] code + # @!attribute code # # @return [Integer, nil] optional :code, Integer - # @!parse - # # @return [Integer] - # attr_writer :code - - # @!attribute [r] individual_id + # @!attribute individual_id # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body] - # # @param code [Integer] - # # @param individual_id [String] - # # - # def initialize(body: nil, code: nil, individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(body: nil, code: nil, individual_id: nil) + # @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body] + # @param code [Integer] + # @param individual_id [String] # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit#body class Body < FinchAPI::Internal::Type::BaseModel @@ -75,25 +59,21 @@ class Body < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit }, nil?: true - # @!parse - # # @param annual_maximum [Integer, nil] - # # @param catch_up [Boolean, nil] - # # @param company_contribution [FinchAPI::Models::HRIS::BenefitContribution, nil] - # # @param employee_deduction [FinchAPI::Models::HRIS::BenefitContribution, nil] - # # @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] - # # - # def initialize( - # annual_maximum: nil, - # catch_up: nil, - # company_contribution: nil, - # employee_deduction: nil, - # hsa_contribution_limit: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, employee_deduction: nil, hsa_contribution_limit: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body} for more details. + # + # @param annual_maximum [Integer, nil] If the benefit supports annual maximum, the amount in cents for this individual. + # ... + # + # @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled + # ... + # + # @param company_contribution [FinchAPI::Models::HRIS::BenefitContribution, nil] + # + # @param employee_deduction [FinchAPI::Models::HRIS::BenefitContribution, nil] + # + # @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] Type for HSA contribution limit if the benefit is a HSA. # Type for HSA contribution limit if the benefit is a HSA. # @@ -104,11 +84,8 @@ module HsaContributionLimit INDIVIDUAL = :individual FAMILY = :family - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end 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 017f2b32..21eafedc 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 @@ -6,61 +6,42 @@ module HRIS module Benefits # @see FinchAPI::Resources::HRIS::Benefits::Individuals#enroll_many class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] individuals + # @!attribute individuals # Array of the individual_id to enroll and a configuration object. # # @return [Array, nil] optional :individuals, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual] } - # @!parse - # # @return [Array] - # attr_writer :individuals - - # @!parse - # # @param individuals [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(individuals: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individuals: nil, request_options: {}) + # @param individuals [Array] Array of the individual_id to enroll and a configuration object. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Individual < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] configuration + # @!attribute configuration # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration, nil] optional :configuration, -> { FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration } - # @!parse - # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration] - # attr_writer :configuration - - # @!attribute [r] individual_id + # @!attribute individual_id # Finch id (uuidv4) for the individual to enroll # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param configuration [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration] - # # @param individual_id [String] - # # - # def initialize(configuration: nil, individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(configuration: nil, individual_id: nil) + # @param configuration [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration] + # + # @param individual_id [String] Finch id (uuidv4) for the individual to enroll # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual#configuration class Configuration < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] annual_contribution_limit + # @!attribute annual_contribution_limit # For HSA benefits only - whether the contribution limit is for an individual or # family # @@ -68,77 +49,53 @@ class Configuration < FinchAPI::Internal::Type::BaseModel optional :annual_contribution_limit, enum: -> { FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit] - # attr_writer :annual_contribution_limit - # @!attribute annual_maximum # Maximum annual amount in cents # # @return [Integer, nil] optional :annual_maximum, Integer, nil?: true - # @!attribute [r] catch_up + # @!attribute catch_up # For retirement benefits only - whether catch up contributions are enabled # # @return [Boolean, nil] optional :catch_up, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :catch_up - - # @!attribute [r] company_contribution + # @!attribute company_contribution # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, nil] optional :company_contribution, -> { FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution } - # @!parse - # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution] - # attr_writer :company_contribution - - # @!attribute [r] effective_date + # @!attribute effective_date # The date the enrollment will take effect # # @return [Date, nil] optional :effective_date, Date - # @!parse - # # @return [Date] - # attr_writer :effective_date - - # @!attribute [r] employee_deduction + # @!attribute employee_deduction # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction, nil] optional :employee_deduction, -> { FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction } - # @!parse - # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction] - # attr_writer :employee_deduction - - # @!parse - # # @param annual_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit] - # # @param annual_maximum [Integer, nil] - # # @param catch_up [Boolean] - # # @param company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution] - # # @param effective_date [Date] - # # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction] - # # - # def initialize( - # annual_contribution_limit: nil, - # annual_maximum: nil, - # catch_up: nil, - # company_contribution: nil, - # effective_date: nil, - # employee_deduction: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(annual_contribution_limit: nil, annual_maximum: nil, catch_up: nil, company_contribution: nil, effective_date: nil, employee_deduction: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration} + # for more details. + # + # @param annual_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit] For HSA benefits only - whether the contribution limit is for an individual or f + # ... + # + # @param annual_maximum [Integer, nil] Maximum annual amount in cents + # + # @param catch_up [Boolean] For retirement benefits only - whether catch up contributions are enabled + # + # @param company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution] + # + # @param effective_date [Date] The date the enrollment will take effect + # + # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction] # For HSA benefits only - whether the contribution limit is for an individual or # family @@ -150,43 +107,34 @@ module AnnualContributionLimit INDIVIDUAL = :individual FAMILY = :family - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#company_contribution class CompanyContribution < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # Amount in cents for fixed type or basis points (1/100th of a percent) for # percent type # # @return [Integer, nil] optional :amount, Integer - # @!parse - # # @return [Integer] - # attr_writer :amount - - # @!attribute [r] type + # @!attribute type # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type] - # attr_writer :type - - # @!parse - # # @param amount [Integer] - # # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type] - # # - # def initialize(amount: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: 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 type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type] # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution#type module Type @@ -195,44 +143,35 @@ module Type FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration#employee_deduction class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] amount + # @!attribute amount # Amount in cents for fixed type or basis points (1/100th of a percent) for # percent type # # @return [Integer, nil] optional :amount, Integer - # @!parse - # # @return [Integer] - # attr_writer :amount - - # @!attribute [r] type + # @!attribute type # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type] - # attr_writer :type - - # @!parse - # # @param amount [Integer] - # # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type] - # # - # def initialize(amount: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction} + # for more details. + # + # @param amount [Integer] Amount in cents for fixed type or basis points (1/100th of a percent) for percen + # ... + # + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type] # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction#type module Type @@ -241,11 +180,8 @@ module Type FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end 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 f474ecfe..eb2e8035 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 @@ -6,16 +6,11 @@ module HRIS module Benefits # @see FinchAPI::Resources::HRIS::Benefits::Individuals#enrolled_ids class IndividualEnrolledIDsParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rb b/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rb index 3d108db4..2d3764c8 100644 --- a/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rb +++ b/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rb @@ -17,13 +17,10 @@ class IndividualEnrolledIDsResponse < FinchAPI::Internal::Type::BaseModel # @return [Array] required :individual_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @param benefit_id [String] - # # @param individual_ids [Array] - # # - # def initialize(benefit_id:, individual_ids:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(benefit_id:, individual_ids:) + # @param benefit_id [String] The id of the benefit. + # + # @param individual_ids [Array] end 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 f7cf6c21..4f9ee37c 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 @@ -6,28 +6,25 @@ module HRIS module Benefits # @see FinchAPI::Resources::HRIS::Benefits::Individuals#retrieve_many_benefits class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] individual_ids + # @!attribute individual_ids # comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals # # @return [String, nil] optional :individual_ids, String - # @!parse - # # @return [String] - # attr_writer :individual_ids - - # @!parse - # # @param individual_ids [String] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(individual_ids: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_ids: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams} for + # more details. + # + # @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}] end end end 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 8bbec29f..37f08e13 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 @@ -6,27 +6,19 @@ module HRIS module Benefits # @see FinchAPI::Resources::HRIS::Benefits::Individuals#unenroll_many class IndividualUnenrollManyParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] individual_ids + # @!attribute individual_ids # Array of individual_ids to unenroll. # # @return [Array, nil] optional :individual_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :individual_ids - - # @!parse - # # @param individual_ids [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(individual_ids: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_ids: nil, request_options: {}) + # @param individual_ids [Array] Array of individual_ids to unenroll. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rb b/lib/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rb index 307626e8..c5a33d89 100644 --- a/lib/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rb +++ b/lib/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rb @@ -11,12 +11,8 @@ class UnenrolledIndividualBenefitResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :job_id, String - # @!parse - # # @param job_id [String] - # # - # def initialize(job_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(job_id:) + # @param job_id [String] end end end diff --git a/lib/finch_api/models/hris/benefits_support.rb b/lib/finch_api/models/hris/benefits_support.rb index c5a246ea..4a07fc55 100644 --- a/lib/finch_api/models/hris/benefits_support.rb +++ b/lib/finch_api/models/hris/benefits_support.rb @@ -64,42 +64,22 @@ class BenefitsSupport < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] optional :simple_ira, -> { FinchAPI::Models::HRIS::BenefitFeaturesAndOperations }, nil?: true - # @!parse - # # Each benefit type and their supported features. If the benefit type is not - # # supported, the property will be null - # # - # # @param commuter [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param custom_post_tax [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param custom_pre_tax [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param fsa_dependent_care [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param fsa_medical [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param hsa_post [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param hsa_pre [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param s125_dental [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param s125_medical [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param s125_vision [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param simple [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # @param simple_ira [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] - # # - # def initialize( - # commuter: nil, - # custom_post_tax: nil, - # custom_pre_tax: nil, - # fsa_dependent_care: nil, - # fsa_medical: nil, - # hsa_post: nil, - # hsa_pre: nil, - # s125_dental: nil, - # s125_medical: nil, - # s125_vision: nil, - # simple: nil, - # simple_ira: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(commuter: nil, custom_post_tax: nil, custom_pre_tax: nil, fsa_dependent_care: nil, fsa_medical: nil, hsa_post: nil, hsa_pre: nil, s125_dental: nil, s125_medical: nil, s125_vision: nil, simple: nil, simple_ira: nil) + # Each benefit type and their supported features. If the benefit type is not + # supported, the property will be null + # + # @param commuter [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param custom_post_tax [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param custom_pre_tax [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param fsa_dependent_care [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param fsa_medical [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param hsa_post [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param hsa_pre [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param s125_dental [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param s125_medical [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param s125_vision [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param simple [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] + # @param simple_ira [FinchAPI::Models::HRIS::BenefitFeaturesAndOperations, nil] end end end diff --git a/lib/finch_api/models/hris/company.rb b/lib/finch_api/models/hris/company.rb index 22075389..5c92f3bf 100644 --- a/lib/finch_api/models/hris/company.rb +++ b/lib/finch_api/models/hris/company.rb @@ -65,76 +65,75 @@ class HRISCompany < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :primary_phone_number, String, nil?: true - # @!parse - # # @param id [String] - # # @param accounts [Array, nil] - # # @param departments [Array, nil] - # # @param ein [String, nil] - # # @param entity [FinchAPI::Models::HRIS::HRISCompany::Entity, nil] - # # @param legal_name [String, nil] - # # @param locations [Array, nil] - # # @param primary_email [String, nil] - # # @param primary_phone_number [String, nil] - # # - # def initialize( - # id:, - # accounts:, - # departments:, - # ein:, - # entity:, - # legal_name:, - # locations:, - # primary_email:, - # primary_phone_number:, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id:, accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::HRISCompany} for more details. + # + # @param id [String] A stable Finch `id` (UUID v4) for the company. + # + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # + # @param departments [Array, nil] The array of company departments. + # + # @param ein [String, nil] The employer identification number. + # + # @param entity [FinchAPI::Models::HRIS::HRISCompany::Entity, nil] The entity type object. + # + # @param legal_name [String, nil] The legal name of the company. + # + # @param locations [Array, nil] + # + # @param primary_email [String, nil] The email of the main administrator on the account. + # + # @param primary_phone_number [String, nil] The phone number of the main administrator on the account. Format: E.164, with e + # ... class Account < FinchAPI::Internal::Type::BaseModel # @!attribute account_name # The name of the bank associated in the payroll/HRIS system. # # @return [String, nil] - optional :account_name, String, nil?: true + required :account_name, String, nil?: true # @!attribute account_number # 10-12 digit number to specify the bank account # # @return [String, nil] - optional :account_number, String, nil?: true + required :account_number, String, nil?: true # @!attribute account_type # The type of bank account. # # @return [Symbol, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType, nil] - optional :account_type, enum: -> { FinchAPI::Models::HRIS::HRISCompany::Account::AccountType }, nil?: true + required :account_type, enum: -> { FinchAPI::Models::HRIS::HRISCompany::Account::AccountType }, nil?: true # @!attribute institution_name # Name of the banking institution. # # @return [String, nil] - optional :institution_name, String, nil?: true + required :institution_name, String, nil?: true # @!attribute routing_number # A nine-digit code that's based on the U.S. Bank location where your account was # opened. # # @return [String, nil] - optional :routing_number, String, nil?: true - - # @!parse - # # @param account_name [String, nil] - # # @param account_number [String, nil] - # # @param account_type [Symbol, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType, nil] - # # @param institution_name [String, nil] - # # @param routing_number [String, nil] - # # - # def initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil, **) = super + required :routing_number, String, nil?: true - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(account_name:, account_number:, account_type:, institution_name:, routing_number:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::HRISCompany::Account} for more details. + # + # @param account_name [String, nil] The name of the bank associated in the payroll/HRIS system. + # + # @param account_number [String, nil] 10-12 digit number to specify the bank account + # + # @param account_type [Symbol, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType, nil] The type of bank account. + # + # @param institution_name [String, nil] Name of the banking institution. + # + # @param routing_number [String, nil] A nine-digit code that's based on the U.S. Bank location where your account was + # ... # The type of bank account. # @@ -145,11 +144,8 @@ module AccountType CHECKING = :checking SAVINGS = :savings - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -158,21 +154,18 @@ class Department < FinchAPI::Internal::Type::BaseModel # The department name. # # @return [String, nil] - optional :name, String, nil?: true + required :name, String, nil?: true # @!attribute parent # The parent department, if present. # # @return [FinchAPI::Models::HRIS::HRISCompany::Department::Parent, nil] - optional :parent, -> { FinchAPI::Models::HRIS::HRISCompany::Department::Parent }, nil?: true + required :parent, -> { FinchAPI::Models::HRIS::HRISCompany::Department::Parent }, nil?: true - # @!parse - # # @param name [String, nil] - # # @param parent [FinchAPI::Models::HRIS::HRISCompany::Department::Parent, nil] - # # - # def initialize(name: nil, parent: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name:, parent:) + # @param name [String, nil] The department name. + # + # @param parent [FinchAPI::Models::HRIS::HRISCompany::Department::Parent, nil] The parent department, if present. # @see FinchAPI::Models::HRIS::HRISCompany::Department#parent class Parent < FinchAPI::Internal::Type::BaseModel @@ -180,16 +173,12 @@ class Parent < FinchAPI::Internal::Type::BaseModel # The parent department's name. # # @return [String, nil] - optional :name, String, nil?: true - - # @!parse - # # The parent department, if present. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super + required :name, String, nil?: true - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name:) + # The parent department, if present. + # + # @param name [String, nil] The parent department's name. end end @@ -199,23 +188,20 @@ class Entity < FinchAPI::Internal::Type::BaseModel # The tax payer subtype of the company. # # @return [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype, nil] - optional :subtype, enum: -> { FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype }, nil?: true + required :subtype, enum: -> { FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype }, nil?: true # @!attribute type # The tax payer type of the company. # # @return [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Type, nil] - optional :type, enum: -> { FinchAPI::Models::HRIS::HRISCompany::Entity::Type }, nil?: true - - # @!parse - # # The entity type object. - # # - # # @param subtype [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super + required :type, enum: -> { FinchAPI::Models::HRIS::HRISCompany::Entity::Type }, nil?: true - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype:, type:) + # The entity type object. + # + # @param subtype [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype, nil] The tax payer subtype of the company. + # + # @param type [Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Type, nil] The tax payer type of the company. # The tax payer subtype of the company. # @@ -227,11 +213,8 @@ module Subtype C_CORPORATION = :c_corporation B_CORPORATION = :b_corporation - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The tax payer type of the company. @@ -248,11 +231,8 @@ module Type PARTNERSHIP = :partnership COOPERATIVE = :cooperative - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end 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 8478c728..fdb6dab0 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 @@ -7,31 +7,22 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#create class RuleCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] attributes + # @!attribute attributes # Specifies the fields to be applied when the condition is met. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, nil] optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes } - # @!parse - # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] - # attr_writer :attributes - - # @!attribute [r] conditions + # @!attribute conditions # # @return [Array, nil] optional :conditions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] } - # @!parse - # # @return [Array] - # attr_writer :conditions - # @!attribute effective_end_date # Specifies when the rules should stop applying rules based on the date. # @@ -44,101 +35,71 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :effective_start_date, String, nil?: true - # @!attribute [r] entity_type + # @!attribute entity_type # The entity type to which the rule is applied. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType, nil] optional :entity_type, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] - # attr_writer :entity_type - - # @!parse - # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] - # # @param conditions [Array] - # # @param effective_end_date [String, nil] - # # @param effective_start_date [String, nil] - # # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize( - # attributes: nil, - # conditions: nil, - # effective_end_date: nil, - # effective_start_date: nil, - # entity_type: nil, - # request_options: {}, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached in the entity. It is a key-value pairs where the # values can be of any type (string, number, boolean, object, array, etc.). # # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # Specifies the fields to be applied when the condition is met. - # # - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes} + # for more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + # ... end class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] field + # @!attribute field # The field to be checked in the rule. # # @return [String, nil] optional :field, String - # @!parse - # # @return [String] - # attr_writer :field - - # @!attribute [r] operator + # @!attribute operator # The operator to be used in the rule. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator, nil] optional :operator, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] - # attr_writer :operator - - # @!attribute [r] value + # @!attribute value # The value of the field to be checked in the rule. # # @return [String, nil] optional :value, String - # @!parse - # # @return [String] - # attr_writer :value - - # @!parse - # # @param field [String] - # # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] - # # @param value [String] - # # - # def initialize(field: nil, operator: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. # The operator to be used in the rule. # @@ -148,11 +109,8 @@ module Operator EQUALS = :equals - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -162,11 +120,8 @@ module EntityType PAY_STATEMENT_ITEM = :pay_statement_item - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb index 7ef56692..4ce2bf1a 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb @@ -7,47 +7,31 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#create class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # Finch id (uuidv4) for the rule. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute [r] attributes + # @!attribute attributes # Specifies the fields to be applied when the condition is met. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, nil] optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes } - # @!parse - # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes] - # attr_writer :attributes - - # @!attribute [r] conditions + # @!attribute conditions # # @return [Array, nil] optional :conditions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition] } - # @!parse - # # @return [Array] - # attr_writer :conditions - - # @!attribute [r] created_at + # @!attribute created_at # The datetime when the rule was created. # # @return [Time, nil] optional :created_at, Time - # @!parse - # # @return [Time] - # attr_writer :created_at - # @!attribute effective_end_date # Specifies when the rules should stop applying rules based on the date. # @@ -60,128 +44,90 @@ class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :effective_start_date, String, nil?: true - # @!attribute [r] entity_type + # @!attribute entity_type # The entity type to which the rule is applied. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType, nil] optional :entity_type, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType] - # attr_writer :entity_type - - # @!attribute [r] priority + # @!attribute priority # The priority of the rule. # # @return [Integer, nil] optional :priority, Integer - # @!parse - # # @return [Integer] - # attr_writer :priority - - # @!attribute [r] updated_at + # @!attribute updated_at # The datetime when the rule was last updated. # # @return [Time, nil] optional :updated_at, Time - # @!parse - # # @return [Time] - # attr_writer :updated_at - - # @!parse - # # @param id [String] - # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes] - # # @param conditions [Array] - # # @param created_at [Time] - # # @param effective_end_date [String, nil] - # # @param effective_start_date [String, nil] - # # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType] - # # @param priority [Integer] - # # @param updated_at [Time] - # # - # def initialize( - # id: nil, - # attributes: nil, - # conditions: nil, - # created_at: nil, - # effective_end_date: nil, - # effective_start_date: nil, - # entity_type: nil, - # priority: nil, - # updated_at: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached in the entity. It is a key-value pairs where the # values can be of any type (string, number, boolean, object, array, etc.). # # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # Specifies the fields to be applied when the condition is met. - # # - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes} + # for more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + # ... end class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] field + # @!attribute field # The field to be checked in the rule. # # @return [String, nil] optional :field, String - # @!parse - # # @return [String] - # attr_writer :field - - # @!attribute [r] operator + # @!attribute operator # The operator to be used in the rule. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator, nil] optional :operator, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator] - # attr_writer :operator - - # @!attribute [r] value + # @!attribute value # The value of the field to be checked in the rule. # # @return [String, nil] optional :value, String - # @!parse - # # @return [String] - # attr_writer :value - - # @!parse - # # @param field [String] - # # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator] - # # @param value [String] - # # - # def initialize(field: nil, operator: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. # The operator to be used in the rule. # @@ -191,11 +137,8 @@ module Operator EQUALS = :equals - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -207,11 +150,8 @@ module EntityType PAY_STATEMENT_ITEM = :pay_statement_item - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end 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 274c9d57..45153cd0 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 @@ -7,16 +7,11 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#delete class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb index c4c2d3f9..598c1f18 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb @@ -7,57 +7,37 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#delete class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # Finch id (uuidv4) for the rule. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute [r] attributes + # @!attribute attributes # Specifies the fields to be applied when the condition is met. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, nil] optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes } - # @!parse - # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes] - # attr_writer :attributes - - # @!attribute [r] conditions + # @!attribute conditions # # @return [Array, nil] optional :conditions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition] } - # @!parse - # # @return [Array] - # attr_writer :conditions - - # @!attribute [r] created_at + # @!attribute created_at # The datetime when the rule was created. # # @return [Time, nil] optional :created_at, Time - # @!parse - # # @return [Time] - # attr_writer :created_at - - # @!attribute [r] deleted_at + # @!attribute deleted_at # The datetime when the rule was deleted. # # @return [Time, nil] optional :deleted_at, Time - # @!parse - # # @return [Time] - # attr_writer :deleted_at - # @!attribute effective_end_date # Specifies when the rules should stop applying rules based on the date. # @@ -70,130 +50,92 @@ class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :effective_start_date, String, nil?: true - # @!attribute [r] entity_type + # @!attribute entity_type # The entity type to which the rule is applied. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType, nil] optional :entity_type, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType] - # attr_writer :entity_type - - # @!attribute [r] priority + # @!attribute priority # The priority of the rule. # # @return [Integer, nil] optional :priority, Integer - # @!parse - # # @return [Integer] - # attr_writer :priority - - # @!attribute [r] updated_at + # @!attribute updated_at # The datetime when the rule was last updated. # # @return [Time, nil] optional :updated_at, Time - # @!parse - # # @return [Time] - # attr_writer :updated_at - - # @!parse - # # @param id [String] - # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes] - # # @param conditions [Array] - # # @param created_at [Time] - # # @param deleted_at [Time] - # # @param effective_end_date [String, nil] - # # @param effective_start_date [String, nil] - # # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType] - # # @param priority [Integer] - # # @param updated_at [Time] - # # - # def initialize( - # id: nil, - # attributes: nil, - # conditions: nil, - # created_at: nil, - # deleted_at: nil, - # effective_end_date: nil, - # effective_start_date: nil, - # entity_type: nil, - # priority: nil, - # updated_at: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, deleted_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param deleted_at [Time] The datetime when the rule was deleted. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached in the entity. It is a key-value pairs where the # values can be of any type (string, number, boolean, object, array, etc.). # # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # Specifies the fields to be applied when the condition is met. - # # - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes} + # for more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + # ... end class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] field + # @!attribute field # The field to be checked in the rule. # # @return [String, nil] optional :field, String - # @!parse - # # @return [String] - # attr_writer :field - - # @!attribute [r] operator + # @!attribute operator # The operator to be used in the rule. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator, nil] optional :operator, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator] - # attr_writer :operator - - # @!attribute [r] value + # @!attribute value # The value of the field to be checked in the rule. # # @return [String, nil] optional :value, String - # @!parse - # # @return [String] - # attr_writer :value - - # @!parse - # # @param field [String] - # # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator] - # # @param value [String] - # # - # def initialize(field: nil, operator: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. # The operator to be used in the rule. # @@ -203,11 +145,8 @@ module Operator EQUALS = :equals - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -219,11 +158,8 @@ module EntityType PAY_STATEMENT_ITEM = :pay_statement_item - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 c8f42f92..21ee756f 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 @@ -7,16 +7,11 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#list class RuleListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb index 94b99919..f0fcc954 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb @@ -7,47 +7,31 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#list class RuleListResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # Finch id (uuidv4) for the rule. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute [r] attributes + # @!attribute attributes # Specifies the fields to be applied when the condition is met. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, nil] optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes } - # @!parse - # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes] - # attr_writer :attributes - - # @!attribute [r] conditions + # @!attribute conditions # # @return [Array, nil] optional :conditions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition] } - # @!parse - # # @return [Array] - # attr_writer :conditions - - # @!attribute [r] created_at + # @!attribute created_at # The datetime when the rule was created. # # @return [Time, nil] optional :created_at, Time - # @!parse - # # @return [Time] - # attr_writer :created_at - # @!attribute effective_end_date # Specifies when the rules should stop applying rules based on the date. # @@ -60,128 +44,90 @@ class RuleListResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :effective_start_date, String, nil?: true - # @!attribute [r] entity_type + # @!attribute entity_type # The entity type to which the rule is applied. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType, nil] optional :entity_type, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType] - # attr_writer :entity_type - - # @!attribute [r] priority + # @!attribute priority # The priority of the rule. # # @return [Integer, nil] optional :priority, Integer - # @!parse - # # @return [Integer] - # attr_writer :priority - - # @!attribute [r] updated_at + # @!attribute updated_at # The datetime when the rule was last updated. # # @return [Time, nil] optional :updated_at, Time - # @!parse - # # @return [Time] - # attr_writer :updated_at - - # @!parse - # # @param id [String] - # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes] - # # @param conditions [Array] - # # @param created_at [Time] - # # @param effective_end_date [String, nil] - # # @param effective_start_date [String, nil] - # # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType] - # # @param priority [Integer] - # # @param updated_at [Time] - # # - # def initialize( - # id: nil, - # attributes: nil, - # conditions: nil, - # created_at: nil, - # effective_end_date: nil, - # effective_start_date: nil, - # entity_type: nil, - # priority: nil, - # updated_at: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached in the entity. It is a key-value pairs where the # values can be of any type (string, number, boolean, object, array, etc.). # # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # Specifies the fields to be applied when the condition is met. - # # - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes} + # for more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + # ... end class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] field + # @!attribute field # The field to be checked in the rule. # # @return [String, nil] optional :field, String - # @!parse - # # @return [String] - # attr_writer :field - - # @!attribute [r] operator + # @!attribute operator # The operator to be used in the rule. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator, nil] optional :operator, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator] - # attr_writer :operator - - # @!attribute [r] value + # @!attribute value # The value of the field to be checked in the rule. # # @return [String, nil] optional :value, String - # @!parse - # # @return [String] - # attr_writer :value - - # @!parse - # # @param field [String] - # # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator] - # # @param value [String] - # # - # def initialize(field: nil, operator: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. # The operator to be used in the rule. # @@ -191,11 +137,8 @@ module Operator EQUALS = :equals - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -207,11 +150,8 @@ module EntityType PAY_STATEMENT_ITEM = :pay_statement_item - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 08b67c91..ec5d0ea9 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 @@ -7,26 +7,17 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#update class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] optional_property + # @!attribute optional_property # # @return [Object, nil] optional :optional_property, FinchAPI::Internal::Type::Unknown, api_name: :optionalProperty - # @!parse - # # @return [Object] - # attr_writer :optional_property - - # @!parse - # # @param optional_property [Object] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(optional_property: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(optional_property: nil, request_options: {}) + # @param optional_property [Object] + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb index 6fd6442a..9eb95556 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb @@ -7,47 +7,31 @@ module Company module PayStatementItem # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#update class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # Finch id (uuidv4) for the rule. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute [r] attributes + # @!attribute attributes # Specifies the fields to be applied when the condition is met. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, nil] optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes } - # @!parse - # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes] - # attr_writer :attributes - - # @!attribute [r] conditions + # @!attribute conditions # # @return [Array, nil] optional :conditions, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition] } - # @!parse - # # @return [Array] - # attr_writer :conditions - - # @!attribute [r] created_at + # @!attribute created_at # The datetime when the rule was created. # # @return [Time, nil] optional :created_at, Time - # @!parse - # # @return [Time] - # attr_writer :created_at - # @!attribute effective_end_date # Specifies when the rules should stop applying rules based on the date. # @@ -60,128 +44,90 @@ class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :effective_start_date, String, nil?: true - # @!attribute [r] entity_type + # @!attribute entity_type # The entity type to which the rule is applied. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType, nil] optional :entity_type, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType] - # attr_writer :entity_type - - # @!attribute [r] priority + # @!attribute priority # The priority of the rule. # # @return [Integer, nil] optional :priority, Integer - # @!parse - # # @return [Integer] - # attr_writer :priority - - # @!attribute [r] updated_at + # @!attribute updated_at # The datetime when the rule was last updated. # # @return [Time, nil] optional :updated_at, Time - # @!parse - # # @return [Time] - # attr_writer :updated_at - - # @!parse - # # @param id [String] - # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes] - # # @param conditions [Array] - # # @param created_at [Time] - # # @param effective_end_date [String, nil] - # # @param effective_start_date [String, nil] - # # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType] - # # @param priority [Integer] - # # @param updated_at [Time] - # # - # def initialize( - # id: nil, - # attributes: nil, - # conditions: nil, - # created_at: nil, - # effective_end_date: nil, - # effective_start_date: nil, - # entity_type: nil, - # priority: nil, - # updated_at: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached in the entity. It is a key-value pairs where the # values can be of any type (string, number, boolean, object, array, etc.). # # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # Specifies the fields to be applied when the condition is met. - # # - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes} + # for more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + # ... end class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] field + # @!attribute field # The field to be checked in the rule. # # @return [String, nil] optional :field, String - # @!parse - # # @return [String] - # attr_writer :field - - # @!attribute [r] operator + # @!attribute operator # The operator to be used in the rule. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator, nil] optional :operator, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator] - # attr_writer :operator - - # @!attribute [r] value + # @!attribute value # The value of the field to be checked in the rule. # # @return [String, nil] optional :value, String - # @!parse - # # @return [String] - # attr_writer :value - - # @!parse - # # @param field [String] - # # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator] - # # @param value [String] - # # - # def initialize(field: nil, operator: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. # The operator to be used in the rule. # @@ -191,11 +137,8 @@ module Operator EQUALS = :equals - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -207,11 +150,8 @@ module EntityType PAY_STATEMENT_ITEM = :pay_statement_item - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 09fd6395..9114e620 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 @@ -6,11 +6,10 @@ module HRIS module Company # @see FinchAPI::Resources::HRIS::Company::PayStatementItem#list class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] categories + # @!attribute categories # Comma-delimited list of pay statement item categories to filter on. If empty, # defaults to all categories. # @@ -18,63 +17,50 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel optional :categories, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::Company::PayStatementItemListParams::Category] } - # @!parse - # # @return [Array] - # attr_writer :categories - - # @!attribute [r] end_date + # @!attribute end_date # The end date to retrieve pay statement items by via their last seen pay date in # `YYYY-MM-DD` format. # # @return [Date, nil] optional :end_date, Date - # @!parse - # # @return [Date] - # attr_writer :end_date - - # @!attribute [r] name + # @!attribute name # Case-insensitive partial match search by pay statement item name. # # @return [String, nil] optional :name, String - # @!parse - # # @return [String] - # attr_writer :name - - # @!attribute [r] start_date + # @!attribute start_date # The start date to retrieve pay statement items by via their last seen pay date # (inclusive) in `YYYY-MM-DD` format. # # @return [Date, nil] optional :start_date, Date - # @!parse - # # @return [Date] - # attr_writer :start_date - - # @!attribute [r] type + # @!attribute type # String search by pay statement item type. # # @return [String, nil] optional :type, String - # @!parse - # # @return [String] - # attr_writer :type - - # @!parse - # # @param categories [Array] - # # @param end_date [Date] - # # @param name [String] - # # @param start_date [Date] - # # @param type [String] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(categories: nil, end_date: nil, name: nil, start_date: nil, type: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(categories: nil, end_date: 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. + # + # @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 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 ( + # ... + # + # @param type [String] String search by pay statement item type. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] module Category extend FinchAPI::Internal::Type::Enum @@ -84,11 +70,8 @@ module Category EMPLOYEE_DEDUCTIONS = :employee_deductions EMPLOYER_CONTRIBUTIONS = :employer_contributions - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb b/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb index c6a91045..6cd3030f 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb @@ -6,44 +6,30 @@ module HRIS module Company # @see FinchAPI::Resources::HRIS::Company::PayStatementItem#list class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] attributes + # @!attribute attributes # The attributes of the pay statement item. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, nil] optional :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes } - # @!parse - # # @return [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] - # attr_writer :attributes - - # @!attribute [r] category + # @!attribute category # The category of the pay statement item. # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category, nil] optional :category, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] - # attr_writer :category - - # @!attribute [r] name + # @!attribute name # The name of the pay statement item. # # @return [String, nil] optional :name, String - # @!parse - # # @return [String] - # attr_writer :name - - # @!parse - # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] - # # @param category [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] - # # @param name [String] - # # - # def initialize(attributes: nil, category: nil, name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(attributes: nil, category: nil, name: nil) + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] The attributes of the pay statement item. + # + # @param category [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] The category of the pay statement item. + # + # @param name [String] The name of the pay statement item. # @see FinchAPI::Models::HRIS::Company::PayStatementItemListResponse#attributes class Attributes < FinchAPI::Internal::Type::BaseModel @@ -58,8 +44,10 @@ class Attributes < FinchAPI::Internal::Type::BaseModel # The metadata of the pay statement item derived by the rules engine if available. # Each attribute will be a key-value pair defined by a rule. # - # @return [Object, nil] - optional :metadata, FinchAPI::Internal::Type::Unknown, nil?: true + # @return [Hash{Symbol=>Object, nil}, nil] + optional :metadata, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true # @!attribute pre_tax # `true` if the pay statement item is pre-tax. This field is only available for @@ -74,17 +62,23 @@ class Attributes < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :type, String, nil?: true - # @!parse - # # The attributes of the pay statement item. - # # - # # @param employer [Boolean, nil] - # # @param metadata [Object, nil] - # # @param pre_tax [Boolean, nil] - # # @param type [String, nil] - # # - # def initialize(employer: nil, metadata: nil, pre_tax: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(employer: nil, metadata: nil, pre_tax: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes} for + # more details. + # + # The attributes of the pay statement item. + # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. This field is only available for + # ... + # + # @param metadata [Hash{Symbol=>Object, nil}, nil] The metadata of the pay statement item derived by the rules engine if available. + # ... + # + # @param pre_tax [Boolean, nil] `true` if the pay statement item is pre-tax. This field is only available for em + # ... + # + # @param type [String, nil] The type of the pay statement item. end # The category of the pay statement item. @@ -98,11 +92,8 @@ module Category EMPLOYEE_DEDUCTIONS = :employee_deductions EMPLOYER_CONTRIBUTIONS = :employer_contributions - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/company_benefit.rb b/lib/finch_api/models/hris/company_benefit.rb index ca971403..5727be60 100644 --- a/lib/finch_api/models/hris/company_benefit.rb +++ b/lib/finch_api/models/hris/company_benefit.rb @@ -11,6 +11,14 @@ class CompanyBenefit < FinchAPI::Internal::Type::BaseModel # @return [String] required :benefit_id, String + # @!attribute company_contribution + # The company match for this benefit. + # + # @return [FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution, nil] + required :company_contribution, + -> { FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution }, + nil?: true + # @!attribute description # # @return [String, nil] @@ -28,15 +36,62 @@ class CompanyBenefit < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] required :type, enum: -> { FinchAPI::Models::HRIS::BenefitType }, nil?: true - # @!parse - # # @param benefit_id [String] - # # @param description [String, nil] - # # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - # # - # def initialize(benefit_id:, description:, frequency:, type:, **) = super + # @!method initialize(benefit_id:, company_contribution:, description:, frequency:, type:) + # @param benefit_id [String] The id of the benefit. + # + # @param company_contribution [FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution, nil] The company match for this benefit. + # + # @param description [String, nil] + # + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. + + # @see FinchAPI::Models::HRIS::CompanyBenefit#company_contribution + class CompanyContribution < FinchAPI::Internal::Type::BaseModel + # @!attribute tiers + # + # @return [Array, nil] + optional :tiers, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier] } + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type, nil] + optional :type, enum: -> { FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type } + + # @!method initialize(tiers: nil, type: nil) + # The company match for this benefit. + # + # @param tiers [Array] + # @param type [Symbol, FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type] + + class Tier < FinchAPI::Internal::Type::BaseModel + # @!attribute match + # + # @return [Integer, nil] + optional :match, Integer + + # @!attribute threshold + # + # @return [Integer, nil] + optional :threshold, Integer + + # @!method initialize(match: nil, threshold: nil) + # @param match [Integer] + # @param threshold [Integer] + end + + # @see FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution#type + module Type + extend FinchAPI::Internal::Type::Enum + + MATCH = :match - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method self.values + # @return [Array] + end + end end end end diff --git a/lib/finch_api/models/hris/company_retrieve_params.rb b/lib/finch_api/models/hris/company_retrieve_params.rb index 31b410bf..1d6ac43f 100644 --- a/lib/finch_api/models/hris/company_retrieve_params.rb +++ b/lib/finch_api/models/hris/company_retrieve_params.rb @@ -5,16 +5,11 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Company#retrieve class CompanyRetrieveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/create_company_benefits_response.rb b/lib/finch_api/models/hris/create_company_benefits_response.rb index b8da4d62..4ca1c534 100644 --- a/lib/finch_api/models/hris/create_company_benefits_response.rb +++ b/lib/finch_api/models/hris/create_company_benefits_response.rb @@ -16,13 +16,10 @@ class CreateCompanyBenefitsResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :job_id, String - # @!parse - # # @param benefit_id [String] - # # @param job_id [String] - # # - # def initialize(benefit_id:, job_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(benefit_id:, job_id:) + # @param benefit_id [String] The id of the benefit. + # + # @param job_id [String] end 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 f25027d2..b5dedf8f 100644 --- a/lib/finch_api/models/hris/directory_list_individuals_params.rb +++ b/lib/finch_api/models/hris/directory_list_individuals_params.rb @@ -5,38 +5,27 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Directory#list_individuals class DirectoryListIndividualsParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] limit + # @!attribute limit # Number of employees to return (defaults to all) # # @return [Integer, nil] optional :limit, Integer - # @!parse - # # @return [Integer] - # attr_writer :limit - - # @!attribute [r] offset + # @!attribute offset # Index to start from (defaults to 0) # # @return [Integer, nil] optional :offset, Integer - # @!parse - # # @return [Integer] - # attr_writer :offset - - # @!parse - # # @param limit [Integer] - # # @param offset [Integer] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(limit: nil, offset: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(limit: nil, offset: nil, request_options: {}) + # @param limit [Integer] Number of employees to return (defaults to all) + # + # @param offset [Integer] Index to start from (defaults to 0) + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/directory_list_params.rb b/lib/finch_api/models/hris/directory_list_params.rb index 069babc3..26d4d990 100644 --- a/lib/finch_api/models/hris/directory_list_params.rb +++ b/lib/finch_api/models/hris/directory_list_params.rb @@ -5,38 +5,27 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Directory#list class DirectoryListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] limit + # @!attribute limit # Number of employees to return (defaults to all) # # @return [Integer, nil] optional :limit, Integer - # @!parse - # # @return [Integer] - # attr_writer :limit - - # @!attribute [r] offset + # @!attribute offset # Index to start from (defaults to 0) # # @return [Integer, nil] optional :offset, Integer - # @!parse - # # @return [Integer] - # attr_writer :offset - - # @!parse - # # @param limit [Integer] - # # @param offset [Integer] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(limit: nil, offset: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(limit: nil, offset: nil, request_options: {}) + # @param limit [Integer] Number of employees to return (defaults to all) + # + # @param offset [Integer] Index to start from (defaults to 0) + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/document_list_params.rb b/lib/finch_api/models/hris/document_list_params.rb index 5f035ba6..ba9cf0b3 100644 --- a/lib/finch_api/models/hris/document_list_params.rb +++ b/lib/finch_api/models/hris/document_list_params.rb @@ -5,42 +5,29 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Documents#list class DocumentListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] individual_ids + # @!attribute individual_ids # Comma-delimited list of stable Finch uuids for each individual. If empty, # defaults to all individuals # # @return [Array, nil] optional :individual_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :individual_ids - - # @!attribute [r] limit + # @!attribute limit # Number of documents to return (defaults to all) # # @return [Integer, nil] optional :limit, Integer - # @!parse - # # @return [Integer] - # attr_writer :limit - - # @!attribute [r] offset + # @!attribute offset # Index to start from (defaults to 0) # # @return [Integer, nil] optional :offset, Integer - # @!parse - # # @return [Integer] - # attr_writer :offset - - # @!attribute [r] types + # @!attribute types # Comma-delimited list of document types to filter on. If empty, defaults to all # types # @@ -48,20 +35,21 @@ class DocumentListParams < FinchAPI::Internal::Type::BaseModel optional :types, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::DocumentListParams::Type] } - # @!parse - # # @return [Array] - # attr_writer :types - - # @!parse - # # @param individual_ids [Array] - # # @param limit [Integer] - # # @param offset [Integer] - # # @param types [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(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 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) + # + # @param offset [Integer] Index to start from (defaults to 0) + # + # @param types [Array] Comma-delimited list of document types to filter on. If empty, defaults to all t + # ... + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] module Type extend FinchAPI::Internal::Type::Enum @@ -69,11 +57,8 @@ module Type W4_2020 = :w4_2020 W4_2005 = :w4_2005 - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/document_list_response.rb b/lib/finch_api/models/hris/document_list_response.rb index 7614278f..f4803b98 100644 --- a/lib/finch_api/models/hris/document_list_response.rb +++ b/lib/finch_api/models/hris/document_list_response.rb @@ -15,13 +15,9 @@ class DocumentListResponse < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Paging] required :paging, -> { FinchAPI::Models::Paging } - # @!parse - # # @param documents [Array] - # # @param paging [FinchAPI::Models::Paging] - # # - # def initialize(documents:, paging:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(documents:, paging:) + # @param documents [Array] + # @param paging [FinchAPI::Models::Paging] end end end diff --git a/lib/finch_api/models/hris/document_response.rb b/lib/finch_api/models/hris/document_response.rb index ce7de77a..171dfddb 100644 --- a/lib/finch_api/models/hris/document_response.rb +++ b/lib/finch_api/models/hris/document_response.rb @@ -4,16 +4,12 @@ module FinchAPI module Models module HRIS class DocumentResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch id for the document. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - # @!attribute individual_id # The ID of the individual associated with the document. This will be null for # employer-level documents. @@ -21,43 +17,40 @@ class DocumentResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :individual_id, String, nil?: true - # @!attribute [r] type + # @!attribute type # The type of document. # # @return [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::DocumentResponse::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type] - # attr_writer :type - - # @!attribute [r] url + # @!attribute url # A URL to access the document. Format: # `https://api.tryfinch.com/employer/documents/:document_id`. # # @return [String, nil] optional :url, String - # @!parse - # # @return [String] - # attr_writer :url - # @!attribute year # The year the document applies to, if available. # # @return [Float, nil] optional :year, Float, nil?: true - # @!parse - # # @param id [String] - # # @param individual_id [String, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type] - # # @param url [String] - # # @param year [Float, nil] - # # - # def initialize(id: nil, individual_id: nil, type: nil, url: nil, year: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, individual_id: nil, type: nil, url: nil, year: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::DocumentResponse} for more details. + # + # @param id [String] A stable Finch id for the document. + # + # @param individual_id [String, nil] The ID of the individual associated with the document. This will be null for emp + # ... + # + # @param type [Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type] The type of document. + # + # @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. # The type of document. # @@ -68,11 +61,8 @@ module Type W4_2020 = :w4_2020 W4_2005 = :w4_2005 - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/document_retreive_params.rb b/lib/finch_api/models/hris/document_retreive_params.rb index 7ded5dbb..0991ec54 100644 --- a/lib/finch_api/models/hris/document_retreive_params.rb +++ b/lib/finch_api/models/hris/document_retreive_params.rb @@ -5,16 +5,11 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Documents#retreive class DocumentRetreiveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/document_retreive_response.rb b/lib/finch_api/models/hris/document_retreive_response.rb index 065f2af3..1ee01198 100644 --- a/lib/finch_api/models/hris/document_retreive_response.rb +++ b/lib/finch_api/models/hris/document_retreive_response.rb @@ -18,9 +18,8 @@ module DocumentRetreiveResponse # A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. variant :w4_2005, -> { FinchAPI::Models::HRIS::W42005 } - # @!parse - # # @return [Array(FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005)] - # def self.variants; end + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005)] end end end diff --git a/lib/finch_api/models/hris/employment_data.rb b/lib/finch_api/models/hris/employment_data.rb index 4a7bb993..138d21bc 100644 --- a/lib/finch_api/models/hris/employment_data.rb +++ b/lib/finch_api/models/hris/employment_data.rb @@ -4,16 +4,12 @@ module FinchAPI module Models module HRIS class EmploymentData < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - # @!attribute class_code # Worker's compensation classification code for this employee # @@ -129,87 +125,74 @@ class EmploymentData < FinchAPI::Internal::Type::BaseModel optional :title, String, nil?: true # @!attribute work_id + # @deprecated + # # This field is deprecated in favour of `source_id` # # @return [String, nil] optional :work_id, String, nil?: true - # @!parse - # # @param id [String] - # # @param class_code [String, nil] - # # @param custom_fields [Array, nil] - # # @param department [FinchAPI::Models::HRIS::EmploymentData::Department, nil] - # # @param employment [FinchAPI::Models::HRIS::EmploymentData::Employment, nil] - # # @param employment_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentStatus, nil] - # # @param end_date [String, nil] - # # @param first_name [String, nil] - # # @param income [FinchAPI::Models::Income, nil] - # # @param income_history [Array, nil] - # # @param is_active [Boolean, nil] - # # @param last_name [String, nil] - # # @param latest_rehire_date [String, nil] - # # @param location [FinchAPI::Models::Location, nil] - # # @param manager [FinchAPI::Models::HRIS::EmploymentData::Manager, nil] - # # @param middle_name [String, nil] - # # @param source_id [String, nil] - # # @param start_date [String, nil] - # # @param title [String, nil] - # # @param work_id [String, nil] - # # - # def 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, - # latest_rehire_date: nil, - # location: nil, - # manager: nil, - # middle_name: nil, - # source_id: nil, - # start_date: nil, - # title: nil, - # work_id: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, work_id: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::EmploymentData} for more details. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. + # + # @param class_code [String, nil] Worker's compensation classification code for this employee + # + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl + # ... + # + # @param department [FinchAPI::Models::HRIS::EmploymentData::Department, nil] The department object. + # + # @param employment [FinchAPI::Models::HRIS::EmploymentData::Employment, nil] The employment object. + # + # @param employment_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentStatus, nil] The detailed employment status of the individual. Available options: `active`, ` + # ... + # + # @param end_date [String, nil] + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual + # ... + # + # @param income_history [Array, nil] The array of income history. + # + # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param latest_rehire_date [String, nil] + # + # @param location [FinchAPI::Models::Location, nil] + # + # @param manager [FinchAPI::Models::HRIS::EmploymentData::Manager, nil] The manager object representing the manager of the individual within the org. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param source_id [String, nil] The source system's unique employment identifier for this individual + # + # @param start_date [String, nil] + # + # @param title [String, nil] The current title of the individual. + # + # @param work_id [String, nil] This field is deprecated in favour of `source_id` class CustomField < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] name + # @!attribute name # # @return [String, nil] optional :name, String - # @!parse - # # @return [String] - # attr_writer :name - - # @!attribute [r] value + # @!attribute value # # @return [Object, nil] optional :value, FinchAPI::Internal::Type::Unknown - # @!parse - # # @return [Object] - # attr_writer :value - - # @!parse - # # @param name [String] - # # @param value [Object] - # # - # def initialize(name: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, value: nil) + # @param name [String] + # @param value [Object] end # @see FinchAPI::Models::HRIS::EmploymentData#department @@ -220,14 +203,10 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The department object. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The department object. + # + # @param name [String, nil] The name of the department associated with the individual. end # @see FinchAPI::Models::HRIS::EmploymentData#employment @@ -245,15 +224,16 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::EmploymentData::Employment::Type }, nil?: true - # @!parse - # # The employment object. - # # - # # @param subtype [Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::EmploymentData::Employment} for more details. + # + # The employment object. + # + # @param subtype [Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim + # ... + # + # @param type [Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. @@ -269,11 +249,8 @@ module Subtype SEASONAL = :seasonal INDIVIDUAL_CONTRACTOR = :individual_contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The main employment type of the individual. @@ -285,11 +262,8 @@ module Type EMPLOYEE = :employee CONTRACTOR = :contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -308,33 +282,22 @@ module EmploymentStatus RETIRED = :retired TERMINATED = :terminated - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::HRIS::EmploymentData#manager class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!parse - # # The manager object representing the manager of the individual within the org. - # # - # # @param id [String] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # The manager object representing the manager of the individual within the org. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. end end end diff --git a/lib/finch_api/models/hris/employment_data_response.rb b/lib/finch_api/models/hris/employment_data_response.rb index 26f529f4..afdfe168 100644 --- a/lib/finch_api/models/hris/employment_data_response.rb +++ b/lib/finch_api/models/hris/employment_data_response.rb @@ -5,42 +5,28 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Employments#retrieve_many class EmploymentDataResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] body + # @!attribute body # # @return [FinchAPI::Models::HRIS::EmploymentData, nil] optional :body, -> { FinchAPI::Models::HRIS::EmploymentData } - # @!parse - # # @return [FinchAPI::Models::HRIS::EmploymentData] - # attr_writer :body - - # @!attribute [r] code + # @!attribute code # # @return [Integer, nil] optional :code, Integer - # @!parse - # # @return [Integer] - # attr_writer :code - - # @!attribute [r] individual_id + # @!attribute individual_id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param body [FinchAPI::Models::HRIS::EmploymentData] - # # @param code [Integer] - # # @param individual_id [String] - # # - # def initialize(body: nil, code: nil, individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(body: nil, code: nil, individual_id: nil) + # @param body [FinchAPI::Models::HRIS::EmploymentData] + # + # @param code [Integer] + # + # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company. end 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 c1f52d85..b15bf79b 100644 --- a/lib/finch_api/models/hris/employment_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/employment_retrieve_many_params.rb @@ -5,8 +5,7 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Employments#retrieve_many class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute requests @@ -16,13 +15,10 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel required :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request] } - # @!parse - # # @param requests [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(requests:, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(requests:, request_options: {}) + # @param requests [Array] The array of batch requests. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Request < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id @@ -33,12 +29,13 @@ class Request < FinchAPI::Internal::Type::BaseModel # @return [String] required :individual_id, String - # @!parse - # # @param individual_id [String] - # # - # def initialize(individual_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request} for more + # details. + # + # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company. There is no limi + # ... end end end diff --git a/lib/finch_api/models/hris/individual.rb b/lib/finch_api/models/hris/individual.rb index dcbb2db4..0f8fdff8 100644 --- a/lib/finch_api/models/hris/individual.rb +++ b/lib/finch_api/models/hris/individual.rb @@ -3,241 +3,250 @@ module FinchAPI module Models module HRIS - class Individual < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id - # A stable Finch `id` (UUID v4) for an individual in the company. - # - # @return [String, nil] - optional :id, String - - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute dob - # - # @return [String, nil] - optional :dob, String, nil?: true - - # @!attribute emails - # - # @return [Array, nil] - optional :emails, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Individual::Email] }, - nil?: true - - # @!attribute encrypted_ssn - # Social Security Number of the individual in **encrypted** format. This field is - # only available with the `ssn` scope enabled and the - # `options: { include: ['ssn'] }` param set in the body. - # - # @return [String, nil] - optional :encrypted_ssn, String, nil?: true - - # @!attribute ethnicity - # The EEOC-defined ethnicity of the individual. - # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::Ethnicity, nil] - optional :ethnicity, enum: -> { FinchAPI::Models::HRIS::Individual::Ethnicity }, nil?: true - - # @!attribute first_name - # The legal first name of the individual. - # - # @return [String, nil] - optional :first_name, String, nil?: true - - # @!attribute gender - # The gender of the individual. - # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::Gender, nil] - optional :gender, enum: -> { FinchAPI::Models::HRIS::Individual::Gender }, nil?: true - - # @!attribute last_name - # The legal last name of the individual. - # - # @return [String, nil] - optional :last_name, String, nil?: true - - # @!attribute middle_name - # The legal middle name of the individual. - # - # @return [String, nil] - optional :middle_name, String, nil?: true - - # @!attribute phone_numbers - # - # @return [Array, nil] - optional :phone_numbers, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Individual::PhoneNumber, nil?: true] }, - nil?: true - - # @!attribute preferred_name - # The preferred name of the individual. - # - # @return [String, nil] - optional :preferred_name, String, nil?: true - - # @!attribute residence - # - # @return [FinchAPI::Models::Location, nil] - optional :residence, -> { FinchAPI::Models::Location }, nil?: true - - # @!attribute ssn - # Social Security Number of the individual. This field is only available with the - # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the - # body. - # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). - # - # @return [String, nil] - optional :ssn, String, nil?: true - - # @!parse - # # @param id [String] - # # @param dob [String, nil] - # # @param emails [Array, nil] - # # @param encrypted_ssn [String, nil] - # # @param ethnicity [Symbol, FinchAPI::Models::HRIS::Individual::Ethnicity, nil] - # # @param first_name [String, nil] - # # @param gender [Symbol, FinchAPI::Models::HRIS::Individual::Gender, nil] - # # @param last_name [String, nil] - # # @param middle_name [String, nil] - # # @param phone_numbers [Array, nil] - # # @param preferred_name [String, nil] - # # @param residence [FinchAPI::Models::Location, nil] - # # @param ssn [String, nil] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void - - class Email < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data - # - # @return [String, nil] - optional :data, String + module Individual + extend FinchAPI::Internal::Type::Union - # @!parse - # # @return [String] - # attr_writer :data + variant -> { FinchAPI::Models::HRIS::Individual::UnionMember0 } - # @!attribute type - # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::Email::Type, nil] - optional :type, enum: -> { FinchAPI::Models::HRIS::Individual::Email::Type }, nil?: true + variant -> { FinchAPI::Models::HRIS::Individual::BatchError } - # @!parse - # # @param data [String] - # # @param type [Symbol, FinchAPI::Models::HRIS::Individual::Email::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # A stable Finch `id` (UUID v4) for an individual in the company. + # + # @return [String] + required :id, String - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!attribute dob + # + # @return [String, nil] + required :dob, String, nil?: true - # @see FinchAPI::Models::HRIS::Individual::Email#type - module Type - extend FinchAPI::Internal::Type::Enum + # @!attribute ethnicity + # The EEOC-defined ethnicity of the individual. + # + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity, nil] + required :ethnicity, enum: -> { FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity }, nil?: true - WORK = :work - PERSONAL = :personal + # @!attribute first_name + # The legal first name of the individual. + # + # @return [String, nil] + required :first_name, String, nil?: true - finalize! + # @!attribute gender + # The gender of the individual. + # + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender, nil] + required :gender, enum: -> { FinchAPI::Models::HRIS::Individual::UnionMember0::Gender }, nil?: true - # @!parse - # # @return [Array] - # def self.values; end - end - end + # @!attribute last_name + # The legal last name of the individual. + # + # @return [String, nil] + required :last_name, String, nil?: true - # The EEOC-defined ethnicity of the individual. - # - # @see FinchAPI::Models::HRIS::Individual#ethnicity - module Ethnicity - extend FinchAPI::Internal::Type::Enum - - ASIAN = :asian - WHITE = :white - BLACK_OR_AFRICAN_AMERICAN = :black_or_african_american - NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = :native_hawaiian_or_pacific_islander - AMERICAN_INDIAN_OR_ALASKA_NATIVE = :american_indian_or_alaska_native - HISPANIC_OR_LATINO = :hispanic_or_latino - TWO_OR_MORE_RACES = :two_or_more_races - DECLINE_TO_SPECIFY = :decline_to_specify - - finalize! - - # @!parse - # # @return [Array] - # def self.values; end - end + # @!attribute middle_name + # The legal middle name of the individual. + # + # @return [String, nil] + required :middle_name, String, nil?: true - # The gender of the individual. - # - # @see FinchAPI::Models::HRIS::Individual#gender - module Gender - extend FinchAPI::Internal::Type::Enum + # @!attribute phone_numbers + # + # @return [Array, nil] + required :phone_numbers, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber, nil?: true] }, + nil?: true - FEMALE = :female - MALE = :male - OTHER = :other - DECLINE_TO_SPECIFY = :decline_to_specify + # @!attribute preferred_name + # The preferred name of the individual. + # + # @return [String, nil] + required :preferred_name, String, nil?: true - finalize! + # @!attribute residence + # + # @return [FinchAPI::Models::Location, nil] + required :residence, -> { FinchAPI::Models::Location }, nil?: true - # @!parse - # # @return [Array] - # def self.values; end - end + # @!attribute emails + # + # @return [Array, nil] + optional :emails, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Individual::UnionMember0::Email] }, + nil?: true + + # @!attribute encrypted_ssn + # Social Security Number of the individual in **encrypted** format. This field is + # only available with the `ssn` scope enabled and the + # `options: { include: ['ssn'] }` param set in the body. + # + # @return [String, nil] + optional :encrypted_ssn, String, nil?: true - class PhoneNumber < FinchAPI::Internal::Type::BaseModel - # @!attribute data + # @!attribute ssn + # Social Security Number of the individual. This field is only available with the + # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the + # body. + # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). # # @return [String, nil] - optional :data, String, nil?: true + optional :ssn, String, nil?: true - # @!attribute type + # @!method initialize(id:, dob:, ethnicity:, first_name:, gender:, last_name:, middle_name:, phone_numbers:, preferred_name:, residence:, emails: nil, encrypted_ssn: nil, ssn: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Individual::UnionMember0} for more details. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. + # + # @param dob [String, nil] + # + # @param ethnicity [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param gender [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender, nil] The gender of the individual. # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::PhoneNumber::Type, nil] - optional :type, enum: -> { FinchAPI::Models::HRIS::Individual::PhoneNumber::Type }, nil?: true + # @param last_name [String, nil] The legal last name of the individual. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param phone_numbers [Array, nil] + # + # @param preferred_name [String, nil] The preferred name of the individual. + # + # @param residence [FinchAPI::Models::Location, nil] + # + # @param emails [Array, nil] + # + # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is + # ... + # + # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the + # ... - # @!parse - # # @param data [String, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::Individual::PhoneNumber::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super + # The EEOC-defined ethnicity of the individual. + # + # @see FinchAPI::Models::HRIS::Individual::UnionMember0#ethnicity + module Ethnicity + extend FinchAPI::Internal::Type::Enum - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + ASIAN = :asian + WHITE = :white + BLACK_OR_AFRICAN_AMERICAN = :black_or_african_american + NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = :native_hawaiian_or_pacific_islander + AMERICAN_INDIAN_OR_ALASKA_NATIVE = :american_indian_or_alaska_native + HISPANIC_OR_LATINO = :hispanic_or_latino + TWO_OR_MORE_RACES = :two_or_more_races + DECLINE_TO_SPECIFY = :decline_to_specify + + # @!method self.values + # @return [Array] + end - # @see FinchAPI::Models::HRIS::Individual::PhoneNumber#type - module Type + # The gender of the individual. + # + # @see FinchAPI::Models::HRIS::Individual::UnionMember0#gender + module Gender extend FinchAPI::Internal::Type::Enum - WORK = :work - PERSONAL = :personal + FEMALE = :female + MALE = :male + OTHER = :other + DECLINE_TO_SPECIFY = :decline_to_specify - finalize! + # @!method self.values + # @return [Array] + end - # @!parse - # # @return [Array] - # def self.values; end + class PhoneNumber < FinchAPI::Internal::Type::BaseModel + # @!attribute data + # + # @return [String, nil] + required :data, String, nil?: true + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] + required :type, + enum: -> { FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type }, + nil?: true + + # @!method initialize(data:, type:) + # @param data [String, nil] + # @param type [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] + + # @see FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber#type + module Type + extend FinchAPI::Internal::Type::Enum + + WORK = :work + PERSONAL = :personal + + # @!method self.values + # @return [Array] + end + end + + class Email < FinchAPI::Internal::Type::BaseModel + # @!attribute data + # + # @return [String] + required :data, String + + # @!attribute type + # + # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type, nil] + required :type, enum: -> { FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type }, nil?: true + + # @!method initialize(data:, type:) + # @param data [String] + # @param type [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type, nil] + + # @see FinchAPI::Models::HRIS::Individual::UnionMember0::Email#type + module Type + extend FinchAPI::Internal::Type::Enum + + WORK = :work + PERSONAL = :personal + + # @!method self.values + # @return [Array] + end end end + + class BatchError < FinchAPI::Internal::Type::BaseModel + # @!attribute code + # + # @return [Float] + required :code, Float + + # @!attribute message + # + # @return [String] + required :message, String + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute finch_code + # + # @return [String, nil] + optional :finch_code, String + + # @!method initialize(code:, message:, name:, finch_code: nil) + # @param code [Float] + # @param message [String] + # @param name [String] + # @param finch_code [String] + end + + # @!method self.variants + # @return [Array(FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError)] end end end diff --git a/lib/finch_api/models/hris/individual_in_directory.rb b/lib/finch_api/models/hris/individual_in_directory.rb index ff10fb65..987c5d38 100644 --- a/lib/finch_api/models/hris/individual_in_directory.rb +++ b/lib/finch_api/models/hris/individual_in_directory.rb @@ -5,75 +5,62 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Directory#list class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # - # @return [String, nil] - optional :id, String - - # @!parse - # # @return [String] - # attr_writer :id + # @return [String] + required :id, String # @!attribute department # The department object. # # @return [FinchAPI::Models::HRIS::IndividualInDirectory::Department, nil] - optional :department, -> { FinchAPI::Models::HRIS::IndividualInDirectory::Department }, nil?: true + required :department, -> { FinchAPI::Models::HRIS::IndividualInDirectory::Department }, nil?: true # @!attribute first_name # The legal first name of the individual. # # @return [String, nil] - optional :first_name, String, nil?: true + required :first_name, String, nil?: true # @!attribute is_active # `true` if the individual is an active employee or contractor at the company. # # @return [Boolean, nil] - optional :is_active, FinchAPI::Internal::Type::Boolean, nil?: true + required :is_active, FinchAPI::Internal::Type::Boolean, nil?: true # @!attribute last_name # The legal last name of the individual. # # @return [String, nil] - optional :last_name, String, nil?: true + required :last_name, String, nil?: true # @!attribute manager # The manager object. # # @return [FinchAPI::Models::HRIS::IndividualInDirectory::Manager, nil] - optional :manager, -> { FinchAPI::Models::HRIS::IndividualInDirectory::Manager }, nil?: true + required :manager, -> { FinchAPI::Models::HRIS::IndividualInDirectory::Manager }, nil?: true # @!attribute middle_name # The legal middle name of the individual. # # @return [String, nil] - optional :middle_name, String, nil?: true + required :middle_name, String, nil?: true - # @!parse - # # @param id [String] - # # @param department [FinchAPI::Models::HRIS::IndividualInDirectory::Department, nil] - # # @param first_name [String, nil] - # # @param is_active [Boolean, nil] - # # @param last_name [String, nil] - # # @param manager [FinchAPI::Models::HRIS::IndividualInDirectory::Manager, nil] - # # @param middle_name [String, nil] - # # - # def initialize( - # id: nil, - # department: nil, - # first_name: nil, - # is_active: nil, - # last_name: nil, - # manager: nil, - # middle_name: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id:, department:, first_name:, is_active:, last_name:, manager:, middle_name:) + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. + # + # @param department [FinchAPI::Models::HRIS::IndividualInDirectory::Department, nil] The department object. + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param is_active [Boolean, nil] `true` if the individual is an active employee or contractor at the company. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param manager [FinchAPI::Models::HRIS::IndividualInDirectory::Manager, nil] The manager object. + # + # @param middle_name [String, nil] The legal middle name of the individual. # @see FinchAPI::Models::HRIS::IndividualInDirectory#department class Department < FinchAPI::Internal::Type::BaseModel @@ -83,36 +70,24 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The department object. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The department object. + # + # @param name [String, nil] The name of the department. end # @see FinchAPI::Models::HRIS::IndividualInDirectory#manager class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # - # @return [String, nil] - optional :id, String + # @return [String] + required :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!parse - # # The manager object. - # # - # # @param id [String] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id:) + # The manager object. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. end end end diff --git a/lib/finch_api/models/hris/individual_response.rb b/lib/finch_api/models/hris/individual_response.rb index bd486b17..eea6bdc0 100644 --- a/lib/finch_api/models/hris/individual_response.rb +++ b/lib/finch_api/models/hris/individual_response.rb @@ -5,41 +5,25 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Individuals#retrieve_many class IndividualResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] body + # @!attribute body # - # @return [FinchAPI::Models::HRIS::Individual, nil] - optional :body, -> { FinchAPI::Models::HRIS::Individual } + # @return [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] + required :body, union: -> { FinchAPI::Models::HRIS::Individual } - # @!parse - # # @return [FinchAPI::Models::HRIS::Individual] - # attr_writer :body - - # @!attribute [r] code + # @!attribute code # - # @return [Integer, nil] - optional :code, Integer - - # @!parse - # # @return [Integer] - # attr_writer :code + # @return [Integer] + required :code, Integer - # @!attribute [r] individual_id + # @!attribute individual_id # - # @return [String, nil] - optional :individual_id, String - - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param body [FinchAPI::Models::HRIS::Individual] - # # @param code [Integer] - # # @param individual_id [String] - # # - # def initialize(body: nil, code: nil, individual_id: nil, **) = super + # @return [String] + required :individual_id, String - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(body:, code:, individual_id:) + # @param body [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] + # @param code [Integer] + # @param individual_id [String] end end end diff --git a/lib/finch_api/models/hris/individual_retrieve_many_params.rb b/lib/finch_api/models/hris/individual_retrieve_many_params.rb index 778fa101..00a9f6d3 100644 --- a/lib/finch_api/models/hris/individual_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/individual_retrieve_many_params.rb @@ -5,8 +5,7 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Individuals#retrieve_many class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute options @@ -14,59 +13,35 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] optional :options, -> { FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options }, nil?: true - # @!attribute [r] requests + # @!attribute requests # # @return [Array, nil] optional :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Request] } - # @!parse - # # @return [Array] - # attr_writer :requests - - # @!parse - # # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] - # # @param requests [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(options: nil, requests: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(options: nil, requests: nil, request_options: {}) + # @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 - # @!attribute [r] include + # @!attribute include # # @return [Array, nil] optional :include, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :include - - # @!parse - # # @param include [Array] - # # - # def initialize(include: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(include: nil) + # @param include [Array] end class Request < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individual_id + # @!attribute individual_id # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param individual_id [String] - # # - # def initialize(individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil) + # @param individual_id [String] end end end diff --git a/lib/finch_api/models/hris/pay_statement.rb b/lib/finch_api/models/hris/pay_statement.rb index 38dfe4ae..2d36f3b1 100644 --- a/lib/finch_api/models/hris/pay_statement.rb +++ b/lib/finch_api/models/hris/pay_statement.rb @@ -32,16 +32,12 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Money, nil] optional :gross_pay, -> { FinchAPI::Models::Money }, nil?: true - # @!attribute [r] individual_id + # @!attribute individual_id # A stable Finch `id` (UUID v4) for an individual in the company # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - # @!attribute net_pay # # @return [FinchAPI::Models::Money, nil] @@ -73,35 +69,26 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::PayStatement::Type }, nil?: true - # @!parse - # # @param earnings [Array, nil] - # # @param employee_deductions [Array, nil] - # # @param employer_contributions [Array, nil] - # # @param gross_pay [FinchAPI::Models::Money, nil] - # # @param individual_id [String] - # # @param net_pay [FinchAPI::Models::Money, nil] - # # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] - # # @param taxes [Array, nil] - # # @param total_hours [Float, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) + # @param earnings [Array, nil] The array of earnings objects associated with this pay statement + # + # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. + # + # @param employer_contributions [Array, nil] + # + # @param gross_pay [FinchAPI::Models::Money, nil] + # + # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company + # + # @param net_pay [FinchAPI::Models::Money, nil] + # + # @param payment_method [Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod, nil] The payment method. + # + # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. + # + # @param total_hours [Float, nil] The number of hours worked for this pay period + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Type, nil] The type of the payment associated with the pay statement. class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute amount @@ -140,39 +127,36 @@ class Earning < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Earning::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::PayStatement::Earning::Type }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes, nil] - # # @param currency [String, nil] - # # @param hours [Float, nil] - # # @param name [String, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Earning::Type, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatement::Earning} for more details. + # + # @param amount [Integer, nil] The earnings amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes, nil] + # + # @param currency [String, nil] The earnings currency code. + # + # @param hours [Float, nil] The number of hours associated with this earning. (For salaried employees, this + # ... + # + # @param name [String, nil] The exact name of the deduction from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Earning::Type, nil] The type of earning. # @see FinchAPI::Models::HRIS::PayStatement::Earning#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata] # @see FinchAPI::Models::HRIS::PayStatement::Earning::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -180,16 +164,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatement::Earning::Attributes::Metadata} for more + # details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end @@ -213,11 +194,8 @@ module Type TYPE_1099 = :"1099" OTHER = :other - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -259,39 +237,32 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitType }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] - # # @param currency [String, nil] - # # @param name [String, nil] - # # @param pre_tax [Boolean, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil) + # @param amount [Integer, nil] The deduction amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes, nil] + # + # @param currency [String, nil] The deduction currency. + # + # @param name [String, nil] The deduction name from the pay statement. + # + # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata] # @see FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -299,16 +270,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatement::EmployeeDeduction::Attributes::Metadata} + # for more details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end end @@ -345,39 +313,31 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitType }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] - # # @param currency [String, nil] - # # @param name [String, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil) + # @param amount [Integer, nil] The contribution amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes, nil] + # + # @param currency [String, nil] The contribution currency. + # + # @param name [String, nil] The contribution name from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] # @see FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -385,16 +345,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata} + # for more details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end end @@ -408,11 +365,8 @@ module PaymentMethod CHECK = :check DIRECT_DEPOSIT = :direct_deposit - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class Tax < FinchAPI::Internal::Type::BaseModel @@ -451,39 +405,32 @@ class Tax < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::PayStatement::Tax::Type }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] - # # @param currency [String, nil] - # # @param employer [Boolean, nil] - # # @param name [String, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) + # @param amount [Integer, nil] The tax amount in cents. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes, nil] + # + # @param currency [String, nil] The currency code. + # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. + # + # @param name [String, nil] The exact name of tax from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type, nil] The type of taxes. # @see FinchAPI::Models::HRIS::PayStatement::Tax#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata] # @see FinchAPI::Models::HRIS::PayStatement::Tax::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -491,16 +438,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatement::Tax::Attributes::Metadata} for more + # details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end @@ -515,11 +459,8 @@ module Type LOCAL = :local FICA = :fica - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -533,11 +474,8 @@ module Type OFF_CYCLE_PAYROLL = :off_cycle_payroll ONE_TIME_PAYMENT = :one_time_payment - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/pay_statement_response.rb b/lib/finch_api/models/hris/pay_statement_response.rb index 07dfda54..b2449a2c 100644 --- a/lib/finch_api/models/hris/pay_statement_response.rb +++ b/lib/finch_api/models/hris/pay_statement_response.rb @@ -5,41 +5,25 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::PayStatements#retrieve_many class PayStatementResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] body + # @!attribute body # # @return [FinchAPI::Models::HRIS::PayStatementResponseBody, nil] optional :body, -> { FinchAPI::Models::HRIS::PayStatementResponseBody } - # @!parse - # # @return [FinchAPI::Models::HRIS::PayStatementResponseBody] - # attr_writer :body - - # @!attribute [r] code + # @!attribute code # # @return [Integer, nil] optional :code, Integer - # @!parse - # # @return [Integer] - # attr_writer :code - - # @!attribute [r] payment_id + # @!attribute payment_id # # @return [String, nil] optional :payment_id, String - # @!parse - # # @return [String] - # attr_writer :payment_id - - # @!parse - # # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody] - # # @param code [Integer] - # # @param payment_id [String] - # # - # def initialize(body: nil, code: nil, payment_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(body: nil, code: nil, payment_id: nil) + # @param body [FinchAPI::Models::HRIS::PayStatementResponseBody] + # @param code [Integer] + # @param payment_id [String] end end end diff --git a/lib/finch_api/models/hris/pay_statement_response_body.rb b/lib/finch_api/models/hris/pay_statement_response_body.rb index 70c2593e..f75da51c 100644 --- a/lib/finch_api/models/hris/pay_statement_response_body.rb +++ b/lib/finch_api/models/hris/pay_statement_response_body.rb @@ -4,32 +4,21 @@ module FinchAPI module Models module HRIS class PayStatementResponseBody < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] paging + # @!attribute paging # # @return [FinchAPI::Models::Paging, nil] optional :paging, -> { FinchAPI::Models::Paging } - # @!parse - # # @return [FinchAPI::Models::Paging] - # attr_writer :paging - - # @!attribute [r] pay_statements + # @!attribute pay_statements # The array of pay statements for the current payment. # # @return [Array, nil] optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatement] } - # @!parse - # # @return [Array] - # attr_writer :pay_statements - - # @!parse - # # @param paging [FinchAPI::Models::Paging] - # # @param pay_statements [Array] - # # - # def initialize(paging: nil, pay_statements: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(paging: nil, pay_statements: nil) + # @param paging [FinchAPI::Models::Paging] + # + # @param pay_statements [Array] The array of pay statements for the current payment. end end end diff --git a/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb b/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb index 30d02261..2d3ef084 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 @@ -5,8 +5,7 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::PayStatements#retrieve_many class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute requests @@ -16,13 +15,10 @@ class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel required :requests, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementRetrieveManyParams::Request] } - # @!parse - # # @param requests [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(requests:, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(requests:, request_options: {}) + # @param requests [Array] The array of batch requests. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Request < FinchAPI::Internal::Type::BaseModel # @!attribute payment_id @@ -31,34 +27,24 @@ class Request < FinchAPI::Internal::Type::BaseModel # @return [String] required :payment_id, String - # @!attribute [r] limit + # @!attribute limit # Number of pay statements to return (defaults to all). # # @return [Integer, nil] optional :limit, Integer - # @!parse - # # @return [Integer] - # attr_writer :limit - - # @!attribute [r] offset + # @!attribute offset # Index to start from. # # @return [Integer, nil] optional :offset, Integer - # @!parse - # # @return [Integer] - # attr_writer :offset - - # @!parse - # # @param payment_id [String] - # # @param limit [Integer] - # # @param offset [Integer] - # # - # def initialize(payment_id:, limit: nil, offset: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(payment_id:, limit: nil, offset: nil) + # @param payment_id [String] A stable Finch `id` (UUID v4) for a payment. + # + # @param limit [Integer] Number of pay statements to return (defaults to all). + # + # @param offset [Integer] Index to start from. end end end diff --git a/lib/finch_api/models/hris/payment.rb b/lib/finch_api/models/hris/payment.rb index 126ab9d7..52787aae 100644 --- a/lib/finch_api/models/hris/payment.rb +++ b/lib/finch_api/models/hris/payment.rb @@ -5,16 +5,12 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Payments#list class Payment < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # The unique id for the payment. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - # @!attribute company_debit # # @return [FinchAPI::Models::Money, nil] @@ -76,39 +72,30 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::HRIS::Payment::PayPeriod, nil] optional :pay_period, -> { FinchAPI::Models::HRIS::Payment::PayPeriod }, nil?: true - # @!parse - # # @param id [String] - # # @param company_debit [FinchAPI::Models::Money, nil] - # # @param debit_date [String, nil] - # # @param employee_taxes [FinchAPI::Models::Money, nil] - # # @param employer_taxes [FinchAPI::Models::Money, nil] - # # @param gross_pay [FinchAPI::Models::Money, nil] - # # @param individual_ids [Array, nil] - # # @param net_pay [FinchAPI::Models::Money, nil] - # # @param pay_date [String, nil] - # # @param pay_frequencies [Array, nil] - # # @param pay_group_ids [Array, nil] - # # @param pay_period [FinchAPI::Models::HRIS::Payment::PayPeriod, nil] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, company_debit: nil, debit_date: nil, employee_taxes: nil, employer_taxes: nil, gross_pay: nil, individual_ids: nil, net_pay: nil, pay_date: nil, pay_frequencies: nil, pay_group_ids: nil, pay_period: nil) + # @param id [String] The unique id for the payment. + # + # @param company_debit [FinchAPI::Models::Money, nil] + # + # @param debit_date [String, nil] + # + # @param employee_taxes [FinchAPI::Models::Money, nil] + # + # @param employer_taxes [FinchAPI::Models::Money, nil] + # + # @param gross_pay [FinchAPI::Models::Money, nil] + # + # @param individual_ids [Array, nil] Array of every individual on this payment. + # + # @param net_pay [FinchAPI::Models::Money, nil] + # + # @param pay_date [String, nil] + # + # @param pay_frequencies [Array, nil] List of pay frequencies associated with this payment. + # + # @param pay_group_ids [Array, nil] Array of the Finch id (uuidv4) of every pay group associated with this payment. + # + # @param pay_period [FinchAPI::Models::HRIS::Payment::PayPeriod, nil] The pay period object. module PayFrequency extend FinchAPI::Internal::Type::Enum @@ -123,11 +110,8 @@ module PayFrequency DAILY = :daily OTHER = :other - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::HRIS::Payment#pay_period @@ -142,15 +126,11 @@ class PayPeriod < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :start_date, String, nil?: true - # @!parse - # # The pay period object. - # # - # # @param end_date [String, nil] - # # @param start_date [String, nil] - # # - # def initialize(end_date: nil, start_date: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(end_date: nil, start_date: nil) + # The pay period object. + # + # @param end_date [String, nil] + # @param start_date [String, nil] end end end diff --git a/lib/finch_api/models/hris/payment_list_params.rb b/lib/finch_api/models/hris/payment_list_params.rb index fda048b7..e9d5eeff 100644 --- a/lib/finch_api/models/hris/payment_list_params.rb +++ b/lib/finch_api/models/hris/payment_list_params.rb @@ -5,8 +5,7 @@ module Models module HRIS # @see FinchAPI::Resources::HRIS::Payments#list class PaymentListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute end_date @@ -23,14 +22,17 @@ class PaymentListParams < FinchAPI::Internal::Type::BaseModel # @return [Date] required :start_date, Date - # @!parse - # # @param end_date [Date] - # # @param start_date [Date] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(end_date:, start_date:, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(end_date:, start_date:, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PaymentListParams} for more details. + # + # @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 request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/hris/support_per_benefit_type.rb b/lib/finch_api/models/hris/support_per_benefit_type.rb index 8a1df902..d477263c 100644 --- a/lib/finch_api/models/hris/support_per_benefit_type.rb +++ b/lib/finch_api/models/hris/support_per_benefit_type.rb @@ -4,31 +4,19 @@ module FinchAPI module Models module HRIS class SupportPerBenefitType < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] company_benefits + # @!attribute company_benefits # # @return [FinchAPI::Models::OperationSupportMatrix, nil] optional :company_benefits, -> { FinchAPI::Models::OperationSupportMatrix } - # @!parse - # # @return [FinchAPI::Models::OperationSupportMatrix] - # attr_writer :company_benefits - - # @!attribute [r] individual_benefits + # @!attribute individual_benefits # # @return [FinchAPI::Models::OperationSupportMatrix, nil] optional :individual_benefits, -> { FinchAPI::Models::OperationSupportMatrix } - # @!parse - # # @return [FinchAPI::Models::OperationSupportMatrix] - # attr_writer :individual_benefits - - # @!parse - # # @param company_benefits [FinchAPI::Models::OperationSupportMatrix] - # # @param individual_benefits [FinchAPI::Models::OperationSupportMatrix] - # # - # def initialize(company_benefits: nil, individual_benefits: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(company_benefits: nil, individual_benefits: nil) + # @param company_benefits [FinchAPI::Models::OperationSupportMatrix] + # @param individual_benefits [FinchAPI::Models::OperationSupportMatrix] end end end diff --git a/lib/finch_api/models/hris/supported_benefit.rb b/lib/finch_api/models/hris/supported_benefit.rb index cc5cac2a..03bf35e3 100644 --- a/lib/finch_api/models/hris/supported_benefit.rb +++ b/lib/finch_api/models/hris/supported_benefit.rb @@ -40,17 +40,13 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::SupportedBenefit::EmployeeDeduction, nil?: true] }, nil?: true - # @!attribute [r] frequencies + # @!attribute frequencies # The list of frequencies supported by the provider for this benefit # # @return [Array, nil] optional :frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::BenefitFrequency, nil?: true] } - # @!parse - # # @return [Array] - # attr_writer :frequencies - # @!attribute hsa_contribution_limit # Whether the provider supports HSA contribution limits. Empty if this feature is # not supported for the benefit. This array only has values for HSA benefits. @@ -60,29 +56,27 @@ class SupportedBenefit < FinchAPI::Internal::Type::BaseModel -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::HRIS::SupportedBenefit::HsaContributionLimit, nil?: true] }, nil?: true - # @!parse - # # @param annual_maximum [Boolean, nil] - # # @param catch_up [Boolean, nil] - # # @param company_contribution [Array, nil] - # # @param description [String, nil] - # # @param employee_deduction [Array, nil] - # # @param frequencies [Array] - # # @param hsa_contribution_limit [Array, nil] - # # - # def initialize( - # annual_maximum: nil, - # catch_up: nil, - # company_contribution: nil, - # description: nil, - # employee_deduction: nil, - # frequencies: nil, - # hsa_contribution_limit: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, description: nil, employee_deduction: nil, frequencies: nil, hsa_contribution_limit: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::SupportedBenefit} for more details. + # + # @param annual_maximum [Boolean, nil] Whether the provider supports an annual maximum for this benefit. + # + # @param catch_up [Boolean, nil] Whether the provider supports catch up for this benefit. This field will only be + # ... + # + # @param company_contribution [Array, nil] Supported contribution types. An empty array indicates contributions are not sup + # ... + # + # @param description [String, nil] + # + # @param employee_deduction [Array, nil] Supported deduction types. An empty array indicates deductions are not supported + # ... + # + # @param frequencies [Array] The list of frequencies supported by the provider for this benefit + # + # @param hsa_contribution_limit [Array, nil] Whether the provider supports HSA contribution limits. Empty if this feature is + # ... module CompanyContribution extend FinchAPI::Internal::Type::Enum @@ -90,11 +84,8 @@ module CompanyContribution FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end module EmployeeDeduction @@ -103,11 +94,8 @@ module EmployeeDeduction FIXED = :fixed PERCENT = :percent - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end module HsaContributionLimit @@ -116,11 +104,8 @@ module HsaContributionLimit INDIVIDUAL = :individual FAMILY = :family - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/update_company_benefit_response.rb b/lib/finch_api/models/hris/update_company_benefit_response.rb index ae7a6b55..46fbadbd 100644 --- a/lib/finch_api/models/hris/update_company_benefit_response.rb +++ b/lib/finch_api/models/hris/update_company_benefit_response.rb @@ -16,13 +16,10 @@ class UpdateCompanyBenefitResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :job_id, String - # @!parse - # # @param benefit_id [String] - # # @param job_id [String] - # # - # def initialize(benefit_id:, job_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(benefit_id:, job_id:) + # @param benefit_id [String] The id of the benefit. + # + # @param job_id [String] end end end diff --git a/lib/finch_api/models/hris/w42005.rb b/lib/finch_api/models/hris/w42005.rb index 5f6c3c84..63bae18f 100644 --- a/lib/finch_api/models/hris/w42005.rb +++ b/lib/finch_api/models/hris/w42005.rb @@ -4,43 +4,33 @@ module FinchAPI module Models module HRIS class W42005 < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # Detailed information specific to the 2005 W4 form. # # @return [FinchAPI::Models::HRIS::W42005::Data, nil] optional :data, -> { FinchAPI::Models::HRIS::W42005::Data } - # @!parse - # # @return [FinchAPI::Models::HRIS::W42005::Data] - # attr_writer :data - - # @!attribute [r] type + # @!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::Models::HRIS::W42005::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::W42005::Type] - # attr_writer :type - # @!attribute year # The tax year this W4 document applies to. # # @return [Float, nil] optional :year, Float, nil?: true - # @!parse - # # A 2005 version of the W-4 tax form containing information on an individual's - # # filing status, dependents, and withholding details. - # # - # # @param data [FinchAPI::Models::HRIS::W42005::Data] - # # @param type [Symbol, FinchAPI::Models::HRIS::W42005::Type] - # # @param year [Float, nil] - # # - # def initialize(data: nil, type: nil, year: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil, year: nil) + # A 2005 version of the W-4 tax form containing information on an individual's + # filing status, dependents, and withholding details. + # + # @param data [FinchAPI::Models::HRIS::W42005::Data] Detailed information specific to the 2005 W4 form. + # + # @param type [Symbol, FinchAPI::Models::HRIS::W42005::Type] Specifies the form type, indicating that this document is a 2005 W4 form. + # + # @param year [Float, nil] The tax year this W4 document applies to. # @see FinchAPI::Models::HRIS::W42005#data class Data < FinchAPI::Internal::Type::BaseModel @@ -50,59 +40,42 @@ class Data < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :additional_withholding, Integer, nil?: true - # @!attribute [r] exemption + # @!attribute exemption # Indicates exemption status from federal tax withholding. # # @return [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption, nil] optional :exemption, enum: -> { FinchAPI::Models::HRIS::W42005::Data::Exemption } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption] - # attr_writer :exemption - # @!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::Models::HRIS::W42005::Data::FilingStatus }, nil?: true - # @!attribute [r] individual_id + # @!attribute individual_id # The unique identifier for the individual associated with this 2005 W4 form. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - # @!attribute total_number_of_allowances # Total number of allowances claimed (in cents). # # @return [Integer, nil] optional :total_number_of_allowances, Integer, nil?: true - # @!parse - # # Detailed information specific to the 2005 W4 form. - # # - # # @param additional_withholding [Integer, nil] - # # @param exemption [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption] - # # @param filing_status [Symbol, FinchAPI::Models::HRIS::W42005::Data::FilingStatus, nil] - # # @param individual_id [String] - # # @param total_number_of_allowances [Integer, nil] - # # - # def initialize( - # additional_withholding: nil, - # exemption: nil, - # filing_status: nil, - # individual_id: nil, - # total_number_of_allowances: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(additional_withholding: nil, exemption: nil, filing_status: nil, individual_id: nil, total_number_of_allowances: nil) + # Detailed information specific to the 2005 W4 form. + # + # @param additional_withholding [Integer, nil] Additional withholding amount (in cents). + # + # @param exemption [Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption] 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). # Indicates exemption status from federal tax withholding. # @@ -113,11 +86,8 @@ module Exemption EXEMPT = :exempt NON_EXEMPT = :non_exempt - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The individual's filing status for tax purposes. @@ -130,11 +100,8 @@ module FilingStatus MARRIED_BUT_WITHHOLD_AT_HIGHER_SINGLE_RATE = :married_but_withhold_at_higher_single_rate SINGLE = :single - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -146,11 +113,8 @@ module Type W4_2005 = :w4_2005 - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/hris/w42020.rb b/lib/finch_api/models/hris/w42020.rb index 3b3018c6..4aa9af3a 100644 --- a/lib/finch_api/models/hris/w42020.rb +++ b/lib/finch_api/models/hris/w42020.rb @@ -4,43 +4,33 @@ module FinchAPI module Models module HRIS class W42020 < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # Detailed information specific to the 2020 W4 form. # # @return [FinchAPI::Models::HRIS::W42020::Data, nil] optional :data, -> { FinchAPI::Models::HRIS::W42020::Data } - # @!parse - # # @return [FinchAPI::Models::HRIS::W42020::Data] - # attr_writer :data - - # @!attribute [r] type + # @!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::Models::HRIS::W42020::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::HRIS::W42020::Type] - # attr_writer :type - # @!attribute year # The tax year this W4 document applies to. # # @return [Float, nil] optional :year, Float, nil?: true - # @!parse - # # A 2020 version of the W-4 tax form containing information on an individual's - # # filing status, dependents, and withholding details. - # # - # # @param data [FinchAPI::Models::HRIS::W42020::Data] - # # @param type [Symbol, FinchAPI::Models::HRIS::W42020::Type] - # # @param year [Float, nil] - # # - # def initialize(data: nil, type: nil, year: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil, year: nil) + # A 2020 version of the W-4 tax form containing information on an individual's + # filing status, dependents, and withholding details. + # + # @param data [FinchAPI::Models::HRIS::W42020::Data] Detailed information specific to the 2020 W4 form. + # + # @param type [Symbol, FinchAPI::Models::HRIS::W42020::Type] Specifies the form type, indicating that this document is a 2020 W4 form. + # + # @param year [Float, nil] The tax year this W4 document applies to. # @see FinchAPI::Models::HRIS::W42020#data class Data < FinchAPI::Internal::Type::BaseModel @@ -75,16 +65,12 @@ class Data < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::W42020::Data::FilingStatus, nil] optional :filing_status, enum: -> { FinchAPI::Models::HRIS::W42020::Data::FilingStatus }, nil?: true - # @!attribute [r] individual_id + # @!attribute individual_id # The unique identifier for the individual associated with this document. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - # @!attribute other_income # Additional income from sources outside of primary employment (in cents). # @@ -97,33 +83,28 @@ class Data < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :total_claim_dependent_and_other_credits, Integer, nil?: true - # @!parse - # # Detailed information specific to the 2020 W4 form. - # # - # # @param amount_for_other_dependents [Integer, nil] - # # @param amount_for_qualifying_children_under_17 [Integer, nil] - # # @param deductions [Integer, nil] - # # @param extra_withholding [Integer, nil] - # # @param filing_status [Symbol, FinchAPI::Models::HRIS::W42020::Data::FilingStatus, nil] - # # @param individual_id [String] - # # @param other_income [Integer, nil] - # # @param total_claim_dependent_and_other_credits [Integer, nil] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount_for_other_dependents: nil, amount_for_qualifying_children_under_17: nil, deductions: nil, extra_withholding: nil, filing_status: nil, individual_id: nil, other_income: nil, total_claim_dependent_and_other_credits: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::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_qualifying_children_under_17 [Integer, nil] Amount claimed for dependents under 17 years old (in cents). + # + # @param deductions [Integer, nil] Deductible expenses (in cents). + # + # @param extra_withholding [Integer, nil] 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 total_claim_dependent_and_other_credits [Integer, nil] Total amount claimed for dependents and other credits (in cents). # The individual's filing status for tax purposes. # @@ -136,11 +117,8 @@ module FilingStatus :married_filing_jointly_or_qualifying_surviving_spouse SINGLE_OR_MARRIED_FILING_SEPARATELY = :single_or_married_filing_separately - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -152,11 +130,8 @@ module Type W4_2020 = :w4_2020 - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/income.rb b/lib/finch_api/models/income.rb index bf621c47..a5242cd6 100644 --- a/lib/finch_api/models/income.rb +++ b/lib/finch_api/models/income.rb @@ -28,19 +28,22 @@ class Income < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Income::Unit, nil] optional :unit, enum: -> { FinchAPI::Models::Income::Unit }, nil?: true - # @!parse - # # The employee's income as reported by the provider. This may not always be - # # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, - # # depending on what information the provider returns. - # # - # # @param amount [Integer, nil] - # # @param currency [String, nil] - # # @param effective_date [String, nil] - # # @param unit [Symbol, FinchAPI::Models::Income::Unit, nil] - # # - # def initialize(amount: nil, currency: nil, effective_date: nil, unit: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, currency: nil, effective_date: nil, unit: nil) + # Some parameter documentations has been truncated, see {FinchAPI::Models::Income} + # for more details. + # + # The employee's income as reported by the provider. This may not always be + # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, + # depending on what information the provider returns. + # + # @param amount [Integer, nil] The income amount in cents. + # + # @param currency [String, nil] The currency code. + # + # @param effective_date [String, nil] The date the income amount went into effect. + # + # @param unit [Symbol, FinchAPI::Models::Income::Unit, nil] The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, `semi_mon + # ... # The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, # `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`. @@ -59,11 +62,8 @@ module Unit HOURLY = :hourly FIXED = :fixed - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/individual_event.rb b/lib/finch_api/models/individual_event.rb index e0519eb8..5eaf3eb4 100644 --- a/lib/finch_api/models/individual_event.rb +++ b/lib/finch_api/models/individual_event.rb @@ -3,49 +3,29 @@ module FinchAPI module Models class IndividualEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::IndividualEvent::Data, nil] optional :data, -> { FinchAPI::Models::IndividualEvent::Data } - # @!parse - # # @return [FinchAPI::Models::IndividualEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::IndividualEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::IndividualEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::IndividualEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::IndividualEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::IndividualEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::IndividualEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::IndividualEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individual_id + # @!attribute individual_id # The ID of the individual related to the event. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # @param individual_id [String] - # # - # def initialize(individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil) + # @param individual_id [String] The ID of the individual related to the event. end module EventType @@ -55,11 +35,8 @@ module EventType INDIVIDUAL_UPDATED = :"individual.updated" INDIVIDUAL_DELETED = :"individual.deleted" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/introspection.rb b/lib/finch_api/models/introspection.rb index 8411bead..dfc705b2 100644 --- a/lib/finch_api/models/introspection.rb +++ b/lib/finch_api/models/introspection.rb @@ -11,6 +11,8 @@ class Introspection < FinchAPI::Internal::Type::BaseModel required :id, String # @!attribute account_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection # instead of this account ID. # @@ -36,6 +38,8 @@ class Introspection < FinchAPI::Internal::Type::BaseModel required :client_type, enum: -> { FinchAPI::Models::Introspection::ClientType } # @!attribute company_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection # instead of this company ID. # @@ -92,6 +96,8 @@ class Introspection < FinchAPI::Internal::Type::BaseModel required :manual, FinchAPI::Internal::Type::Boolean # @!attribute payroll_provider_id + # @deprecated + # # [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll # provider ID. # @@ -116,117 +122,92 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @return [String] required :username, String - # @!parse - # # @param id [String] - # # @param account_id [String] - # # @param authentication_methods [Array] - # # @param client_id [String] - # # @param client_type [Symbol, FinchAPI::Models::Introspection::ClientType] - # # @param company_id [String] - # # @param connection_id [String] - # # @param connection_status [FinchAPI::Models::Introspection::ConnectionStatus] - # # @param connection_type [Symbol, FinchAPI::Models::Introspection::ConnectionType] - # # @param customer_email [String, nil] - # # @param customer_id [String, nil] - # # @param customer_name [String, nil] - # # @param manual [Boolean] - # # @param payroll_provider_id [String] - # # @param products [Array] - # # @param provider_id [String] - # # @param username [String] - # # - # def initialize( - # id:, - # account_id:, - # authentication_methods:, - # client_id:, - # client_type:, - # company_id:, - # connection_id:, - # connection_status:, - # connection_type:, - # customer_email:, - # customer_id:, - # customer_name:, - # manual:, - # payroll_provider_id:, - # products:, - # provider_id:, - # username:, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id:, account_id:, authentication_methods:, client_id:, client_type:, company_id:, connection_id:, connection_status:, connection_type:, customer_email:, customer_id:, customer_name:, manual:, payroll_provider_id:, products:, provider_id:, username:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Introspection} for more details. + # + # @param id [String] The Finch UUID of the token being introspected. + # + # @param account_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins + # ... + # + # @param authentication_methods [Array] + # + # @param client_id [String] The client ID of the application associated with the `access_token`. + # + # @param client_type [Symbol, FinchAPI::Models::Introspection::ClientType] The type of application associated with a token. + # + # @param company_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins + # ... + # + # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`. + # + # @param connection_status [FinchAPI::Models::Introspection::ConnectionStatus] + # + # @param connection_type [Symbol, FinchAPI::Models::Introspection::ConnectionType] The type of the connection associated with the token. ... + # + # @param customer_email [String, nil] The email of your customer you provided to Finch when a connect session was crea + # ... + # + # @param customer_id [String, nil] The ID of your customer you provided to Finch when a connect session was created + # ... + # + # @param customer_name [String, nil] The name of your customer you provided to Finch when a connect session was creat + # ... + # + # @param manual [Boolean] Whether the connection associated with the `access_token` uses the Assisted Conn + # ... + # + # @param payroll_provider_id [String] [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll + # ... + # + # @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`. + # + # @param username [String] The account username used for login associated with the `access_token`. class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] connection_status + # @!attribute connection_status # # @return [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus, nil] optional :connection_status, -> { FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus } - # @!parse - # # @return [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus] - # attr_writer :connection_status - - # @!attribute [r] products + # @!attribute products # An array of the authorized products associated with the `access_token`. # # @return [Array, nil] optional :products, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :products - - # @!attribute [r] type + # @!attribute type # The type of authentication method. # # @return [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type, nil] optional :type, enum: -> { FinchAPI::Models::Introspection::AuthenticationMethod::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type] - # attr_writer :type - - # @!parse - # # @param connection_status [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus] - # # @param products [Array] - # # @param type [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type] - # # - # def initialize(connection_status: nil, products: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(connection_status: nil, products: nil, type: nil) + # @param connection_status [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus] + # + # @param products [Array] An array of the authorized products associated with the `access_token`. + # + # @param type [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type] The type of authentication method. # @see FinchAPI::Models::Introspection::AuthenticationMethod#connection_status class ConnectionStatus < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] message + # @!attribute message # # @return [String, nil] optional :message, String - # @!parse - # # @return [String] - # attr_writer :message - - # @!attribute [r] status + # @!attribute status # # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil] optional :status, enum: -> { FinchAPI::Models::ConnectionStatusType } - # @!parse - # # @return [Symbol, FinchAPI::Models::ConnectionStatusType] - # attr_writer :status - - # @!parse - # # @param message [String] - # # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] - # # - # def initialize(message: nil, status: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(message: nil, status: nil) + # @param message [String] + # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] end # The type of authentication method. @@ -241,11 +222,8 @@ module Type API_CREDENTIAL = :api_credential OAUTH = :oauth - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -259,51 +237,34 @@ module ClientType DEVELOPMENT = :development SANDBOX = :sandbox - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::Introspection#connection_status class ConnectionStatus < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] last_successful_sync + # @!attribute last_successful_sync # The datetime when the connection was last successfully synced. # # @return [Time, nil] optional :last_successful_sync, Time - # @!parse - # # @return [Time] - # attr_writer :last_successful_sync - - # @!attribute [r] message + # @!attribute message # # @return [String, nil] optional :message, String - # @!parse - # # @return [String] - # attr_writer :message - - # @!attribute [r] status + # @!attribute status # # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil] optional :status, enum: -> { FinchAPI::Models::ConnectionStatusType } - # @!parse - # # @return [Symbol, FinchAPI::Models::ConnectionStatusType] - # attr_writer :status - - # @!parse - # # @param last_successful_sync [Time] - # # @param message [String] - # # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] - # # - # def initialize(last_successful_sync: nil, message: nil, status: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(last_successful_sync: nil, message: nil, status: nil) + # @param last_successful_sync [Time] The datetime when the connection was last successfully synced. + # + # @param message [String] + # + # @param status [Symbol, FinchAPI::Models::ConnectionStatusType] end # The type of the connection associated with the token. @@ -318,11 +279,8 @@ module ConnectionType PROVIDER = :provider FINCH = :finch - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/job_completion_event.rb b/lib/finch_api/models/job_completion_event.rb index c6bddc73..6ead185c 100644 --- a/lib/finch_api/models/job_completion_event.rb +++ b/lib/finch_api/models/job_completion_event.rb @@ -3,31 +3,19 @@ module FinchAPI module Models class JobCompletionEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::JobCompletionEvent::Data, nil] optional :data, -> { FinchAPI::Models::JobCompletionEvent::Data } - # @!parse - # # @return [FinchAPI::Models::JobCompletionEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::JobCompletionEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::JobCompletionEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::JobCompletionEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::JobCompletionEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::JobCompletionEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::JobCompletionEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::JobCompletionEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute job_id @@ -42,13 +30,10 @@ class Data < FinchAPI::Internal::Type::BaseModel # @return [String] required :job_url, String - # @!parse - # # @param job_id [String] - # # @param job_url [String] - # # - # def initialize(job_id:, job_url:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(job_id:, job_url:) + # @param job_id [String] The id of the job which has completed. + # + # @param job_url [String] The url to query the result of the job. end module EventType @@ -61,11 +46,8 @@ module EventType JOB_BENEFIT_UPDATE_COMPLETED = :"job.benefit_update.completed" JOB_DATA_SYNC_ALL_COMPLETED = :"job.data_sync_all.completed" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/jobs/automated_async_job.rb b/lib/finch_api/models/jobs/automated_async_job.rb index 1ebd8222..d10b7bfb 100644 --- a/lib/finch_api/models/jobs/automated_async_job.rb +++ b/lib/finch_api/models/jobs/automated_async_job.rb @@ -62,41 +62,42 @@ class AutomatedAsyncJob < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type] required :type, enum: -> { FinchAPI::Models::Jobs::AutomatedAsyncJob::Type } - # @!parse - # # @param completed_at [Time, nil] - # # @param created_at [Time] - # # @param job_id [String] - # # @param job_url [String] - # # @param params [FinchAPI::Models::Jobs::AutomatedAsyncJob::Params, nil] - # # @param scheduled_at [Time, nil] - # # @param started_at [Time, nil] - # # @param status [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status] - # # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type] - # # - # def initialize(completed_at:, created_at:, job_id:, job_url:, params:, scheduled_at:, started_at:, status:, type:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(completed_at:, created_at:, job_id:, job_url:, params:, scheduled_at:, started_at:, status:, type:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::AutomatedAsyncJob} for more details. + # + # @param completed_at [Time, nil] The datetime the job completed. + # + # @param created_at [Time] The datetime when the job was created. for scheduled jobs, this will be the init + # ... + # + # @param job_id [String] The id of the job that has been created. + # + # @param job_url [String] The url that can be used to retrieve the job status + # + # @param params [FinchAPI::Models::Jobs::AutomatedAsyncJob::Params, nil] The input parameters for the job. + # + # @param scheduled_at [Time, nil] The datetime a job is scheduled to be run. For scheduled jobs, this datetime can + # ... + # + # @param started_at [Time, nil] The datetime a job entered into the job queue. + # + # @param status [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status] + # + # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type] The type of automated job # @see FinchAPI::Models::Jobs::AutomatedAsyncJob#params class Params < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individual_id + # @!attribute individual_id # The ID of the individual that the job was completed for. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!parse - # # The input parameters for the job. - # # - # # @param individual_id [String] - # # - # def initialize(individual_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil) + # The input parameters for the job. + # + # @param individual_id [String] The ID of the individual that the job was completed for. end # @see FinchAPI::Models::Jobs::AutomatedAsyncJob#status @@ -110,11 +111,8 @@ module Status REAUTH_ERROR = :reauth_error PERMISSIONS_ERROR = :permissions_error - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The type of automated job @@ -126,11 +124,8 @@ module Type DATA_SYNC_ALL = :data_sync_all W4_FORM_EMPLOYEE_SYNC = :w4_form_employee_sync - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/jobs/automated_create_params.rb b/lib/finch_api/models/jobs/automated_create_params.rb index ef11fac9..d26c0136 100644 --- a/lib/finch_api/models/jobs/automated_create_params.rb +++ b/lib/finch_api/models/jobs/automated_create_params.rb @@ -5,8 +5,7 @@ module Models module Jobs # @see FinchAPI::Resources::Jobs::Automated#create class AutomatedCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute type @@ -20,14 +19,12 @@ class AutomatedCreateParams < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] required :params, -> { FinchAPI::Models::Jobs::AutomatedCreateParams::Params } - # @!parse - # # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] - # # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(type:, params:, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(type:, params:, request_options: {}) + # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] The type of job to start. + # + # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] # The type of job to start. module Type @@ -35,11 +32,8 @@ module Type W4_FORM_EMPLOYEE_SYNC = :w4_form_employee_sync - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class Params < FinchAPI::Internal::Type::BaseModel @@ -49,12 +43,8 @@ class Params < FinchAPI::Internal::Type::BaseModel # @return [String] required :individual_id, String - # @!parse - # # @param individual_id [String] - # # - # def initialize(individual_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id:) + # @param individual_id [String] The unique ID of the individual for W-4 data sync. end end end diff --git a/lib/finch_api/models/jobs/automated_create_response.rb b/lib/finch_api/models/jobs/automated_create_response.rb index a3a2ef75..2c46869e 100644 --- a/lib/finch_api/models/jobs/automated_create_response.rb +++ b/lib/finch_api/models/jobs/automated_create_response.rb @@ -29,15 +29,14 @@ class AutomatedCreateResponse < FinchAPI::Internal::Type::BaseModel # @return [Integer] required :remaining_refreshes, Integer - # @!parse - # # @param allowed_refreshes [Integer] - # # @param job_id [String] - # # @param job_url [String] - # # @param remaining_refreshes [Integer] - # # - # def initialize(allowed_refreshes:, job_id:, job_url:, remaining_refreshes:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(allowed_refreshes:, job_id:, job_url:, remaining_refreshes:) + # @param allowed_refreshes [Integer] The number of allowed refreshes per hour (per hour, fixed window) + # + # @param job_id [String] The id of the job that has been created. + # + # @param job_url [String] The url that can be used to retrieve the job status + # + # @param remaining_refreshes [Integer] The number of remaining refreshes available (per hour, fixed window) 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 b4335ddc..5d7fd632 100644 --- a/lib/finch_api/models/jobs/automated_list_params.rb +++ b/lib/finch_api/models/jobs/automated_list_params.rb @@ -5,38 +5,27 @@ module Models module Jobs # @see FinchAPI::Resources::Jobs::Automated#list class AutomatedListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] limit + # @!attribute limit # Number of items to return # # @return [Integer, nil] optional :limit, Integer - # @!parse - # # @return [Integer] - # attr_writer :limit - - # @!attribute [r] offset + # @!attribute offset # Index to start from (defaults to 0) # # @return [Integer, nil] optional :offset, Integer - # @!parse - # # @return [Integer] - # attr_writer :offset - - # @!parse - # # @param limit [Integer] - # # @param offset [Integer] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(limit: nil, offset: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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) + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/jobs/automated_list_response.rb b/lib/finch_api/models/jobs/automated_list_response.rb index 93005bba..45618365 100644 --- a/lib/finch_api/models/jobs/automated_list_response.rb +++ b/lib/finch_api/models/jobs/automated_list_response.rb @@ -15,17 +15,13 @@ class AutomatedListResponse < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Jobs::AutomatedListResponse::Meta] required :meta, -> { FinchAPI::Models::Jobs::AutomatedListResponse::Meta } - # @!parse - # # @param data [Array] - # # @param meta [FinchAPI::Models::Jobs::AutomatedListResponse::Meta] - # # - # def initialize(data:, meta:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data:, meta:) + # @param data [Array] + # @param meta [FinchAPI::Models::Jobs::AutomatedListResponse::Meta] # @see FinchAPI::Models::Jobs::AutomatedListResponse#meta class Meta < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] quotas + # @!attribute quotas # Information about remaining quotas for this connection. Only applicable for # customers opted in to use Finch's Data Sync Refresh endpoint # (`POST /jobs/automated`). Please contact a Finch representative for more @@ -34,67 +30,43 @@ class Meta < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas, nil] optional :quotas, -> { FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas } - # @!parse - # # @return [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas] - # attr_writer :quotas - - # @!parse - # # @param quotas [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas] - # # - # def initialize(quotas: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(quotas: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::AutomatedListResponse::Meta} for more details. + # + # @param quotas [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas] Information about remaining quotas for this connection. Only applicable for cust + # ... # @see FinchAPI::Models::Jobs::AutomatedListResponse::Meta#quotas class Quotas < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data_sync_all + # @!attribute data_sync_all # # @return [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll, nil] optional :data_sync_all, -> { FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll } - # @!parse - # # @return [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll] - # attr_writer :data_sync_all - - # @!parse - # # Information about remaining quotas for this connection. Only applicable for - # # customers opted in to use Finch's Data Sync Refresh endpoint - # # (`POST /jobs/automated`). Please contact a Finch representative for more - # # details. - # # - # # @param data_sync_all [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll] - # # - # def initialize(data_sync_all: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data_sync_all: nil) + # Information about remaining quotas for this connection. Only applicable for + # customers opted in to use Finch's Data Sync Refresh endpoint + # (`POST /jobs/automated`). Please contact a Finch representative for more + # details. + # + # @param data_sync_all [FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas::DataSyncAll] # @see FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas#data_sync_all class DataSyncAll < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] allowed_refreshes + # @!attribute allowed_refreshes # # @return [Integer, nil] optional :allowed_refreshes, Integer - # @!parse - # # @return [Integer] - # attr_writer :allowed_refreshes - - # @!attribute [r] remaining_refreshes + # @!attribute remaining_refreshes # # @return [Integer, nil] optional :remaining_refreshes, Integer - # @!parse - # # @return [Integer] - # attr_writer :remaining_refreshes - - # @!parse - # # @param allowed_refreshes [Integer] - # # @param remaining_refreshes [Integer] - # # - # def initialize(allowed_refreshes: nil, remaining_refreshes: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(allowed_refreshes: nil, remaining_refreshes: nil) + # @param allowed_refreshes [Integer] + # @param remaining_refreshes [Integer] end end end diff --git a/lib/finch_api/models/jobs/automated_retrieve_params.rb b/lib/finch_api/models/jobs/automated_retrieve_params.rb index d6b1cfdb..dc698f82 100644 --- a/lib/finch_api/models/jobs/automated_retrieve_params.rb +++ b/lib/finch_api/models/jobs/automated_retrieve_params.rb @@ -5,16 +5,11 @@ module Models module Jobs # @see FinchAPI::Resources::Jobs::Automated#retrieve class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/jobs/manual_async_job.rb b/lib/finch_api/models/jobs/manual_async_job.rb index 4d0c0109..9ac49c07 100644 --- a/lib/finch_api/models/jobs/manual_async_job.rb +++ b/lib/finch_api/models/jobs/manual_async_job.rb @@ -21,14 +21,12 @@ class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Jobs::ManualAsyncJob::Status] required :status, enum: -> { FinchAPI::Models::Jobs::ManualAsyncJob::Status } - # @!parse - # # @param body [Array, nil] - # # @param job_id [String] - # # @param status [Symbol, FinchAPI::Models::Jobs::ManualAsyncJob::Status] - # # - # def initialize(body:, job_id:, status:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(body:, job_id:, status:) + # @param body [Array, nil] Specific information about the job, such as individual statuses for batch jobs. + # + # @param job_id [String] + # + # @param status [Symbol, FinchAPI::Models::Jobs::ManualAsyncJob::Status] # @see FinchAPI::Models::Jobs::ManualAsyncJob#status module Status @@ -39,11 +37,8 @@ module Status ERROR = :error COMPLETE = :complete - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 07b0e2e2..321c5aa6 100644 --- a/lib/finch_api/models/jobs/manual_retrieve_params.rb +++ b/lib/finch_api/models/jobs/manual_retrieve_params.rb @@ -5,16 +5,11 @@ module Models module Jobs # @see FinchAPI::Resources::Jobs::Manual#retrieve class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/location.rb b/lib/finch_api/models/location.rb index ad306bda..b67e58ac 100644 --- a/lib/finch_api/models/location.rb +++ b/lib/finch_api/models/location.rb @@ -7,73 +7,64 @@ class Location < FinchAPI::Internal::Type::BaseModel # City, district, suburb, town, or village. # # @return [String, nil] - optional :city, String, nil?: true + required :city, String, nil?: true # @!attribute country # The 2-letter ISO 3166 country code. # # @return [String, nil] - optional :country, String, nil?: true + required :country, String, nil?: true # @!attribute line1 # Street address or PO box. # # @return [String, nil] - optional :line1, String, nil?: true + required :line1, String, nil?: true # @!attribute line2 # Apartment, suite, unit, or building. # # @return [String, nil] - optional :line2, String, nil?: true - - # @!attribute name - # - # @return [String, nil] - optional :name, String, nil?: true + required :line2, String, nil?: true # @!attribute postal_code # The postal code or zip code. # # @return [String, nil] - optional :postal_code, String, nil?: true + required :postal_code, String, nil?: true - # @!attribute source_id + # @!attribute state + # The state code. # # @return [String, nil] - optional :source_id, String, nil?: true + required :state, String, nil?: true - # @!attribute state - # The state code. + # @!attribute name # # @return [String, nil] - optional :state, String, nil?: true + optional :name, String, nil?: true - # @!parse - # # @param city [String, nil] - # # @param country [String, nil] - # # @param line1 [String, nil] - # # @param line2 [String, nil] - # # @param name [String, nil] - # # @param postal_code [String, nil] - # # @param source_id [String, nil] - # # @param state [String, nil] - # # - # def initialize( - # city: nil, - # country: nil, - # line1: nil, - # line2: nil, - # name: nil, - # postal_code: nil, - # source_id: nil, - # state: nil, - # ** - # ) - # super - # end + # @!attribute source_id + # + # @return [String, nil] + optional :source_id, String, nil?: true - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(city:, country:, line1:, line2:, postal_code:, state:, name: nil, source_id: nil) + # @param city [String, nil] City, district, suburb, town, or village. + # + # @param country [String, nil] The 2-letter ISO 3166 country code. + # + # @param line1 [String, nil] Street address or PO box. + # + # @param line2 [String, nil] Apartment, suite, unit, or building. + # + # @param postal_code [String, nil] The postal code or zip code. + # + # @param state [String, nil] The state code. + # + # @param name [String, nil] + # + # @param source_id [String, nil] end end end diff --git a/lib/finch_api/models/money.rb b/lib/finch_api/models/money.rb index 10ca8165..153d11a9 100644 --- a/lib/finch_api/models/money.rb +++ b/lib/finch_api/models/money.rb @@ -9,22 +9,15 @@ class Money < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :amount, Integer, nil?: true - # @!attribute [r] currency + # @!attribute currency # # @return [String, nil] optional :currency, String - # @!parse - # # @return [String] - # attr_writer :currency - - # @!parse - # # @param amount [Integer, nil] - # # @param currency [String] - # # - # def initialize(amount: nil, currency: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, currency: nil) + # @param amount [Integer, nil] Amount for money object (in cents) + # + # @param currency [String] end end end diff --git a/lib/finch_api/models/operation_support.rb b/lib/finch_api/models/operation_support.rb index 4986e267..b0934f3b 100644 --- a/lib/finch_api/models/operation_support.rb +++ b/lib/finch_api/models/operation_support.rb @@ -17,11 +17,8 @@ module OperationSupport NOT_SUPPORTED_BY_PROVIDER = :not_supported_by_provider CLIENT_ACCESS_ONLY = :client_access_only - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/operation_support_matrix.rb b/lib/finch_api/models/operation_support_matrix.rb index cb9d9b08..67cee4ed 100644 --- a/lib/finch_api/models/operation_support_matrix.rb +++ b/lib/finch_api/models/operation_support_matrix.rb @@ -3,7 +3,7 @@ module FinchAPI module Models class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] create + # @!attribute create # - `supported`: This operation is supported by both the provider and Finch # - `not_supported_by_finch`: This operation is not supported by Finch but # supported by the provider @@ -15,11 +15,7 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :create, enum: -> { FinchAPI::Models::OperationSupport } - # @!parse - # # @return [Symbol, FinchAPI::Models::OperationSupport] - # attr_writer :create - - # @!attribute [r] delete + # @!attribute delete # - `supported`: This operation is supported by both the provider and Finch # - `not_supported_by_finch`: This operation is not supported by Finch but # supported by the provider @@ -31,11 +27,7 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :delete, enum: -> { FinchAPI::Models::OperationSupport } - # @!parse - # # @return [Symbol, FinchAPI::Models::OperationSupport] - # attr_writer :delete - - # @!attribute [r] read + # @!attribute read # - `supported`: This operation is supported by both the provider and Finch # - `not_supported_by_finch`: This operation is not supported by Finch but # supported by the provider @@ -47,11 +39,7 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :read, enum: -> { FinchAPI::Models::OperationSupport } - # @!parse - # # @return [Symbol, FinchAPI::Models::OperationSupport] - # attr_writer :read - - # @!attribute [r] update + # @!attribute update # - `supported`: This operation is supported by both the provider and Finch # - `not_supported_by_finch`: This operation is not supported by Finch but # supported by the provider @@ -63,19 +51,17 @@ class OperationSupportMatrix < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::OperationSupport, nil] optional :update, enum: -> { FinchAPI::Models::OperationSupport } - # @!parse - # # @return [Symbol, FinchAPI::Models::OperationSupport] - # attr_writer :update - - # @!parse - # # @param create [Symbol, FinchAPI::Models::OperationSupport] - # # @param delete [Symbol, FinchAPI::Models::OperationSupport] - # # @param read [Symbol, FinchAPI::Models::OperationSupport] - # # @param update [Symbol, FinchAPI::Models::OperationSupport] - # # - # def initialize(create: nil, delete: nil, read: nil, update: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(create: nil, delete: nil, read: nil, update: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::OperationSupportMatrix} for more details. + # + # @param create [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch ... + # + # @param delete [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch ... + # + # @param read [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch ... + # + # @param update [Symbol, FinchAPI::Models::OperationSupport] - `supported`: This operation is supported by both the provider and Finch ... end end end diff --git a/lib/finch_api/models/paging.rb b/lib/finch_api/models/paging.rb index 527bdf67..c8480f6a 100644 --- a/lib/finch_api/models/paging.rb +++ b/lib/finch_api/models/paging.rb @@ -3,33 +3,22 @@ module FinchAPI module Models class Paging < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] count + # @!attribute offset + # The current start index of the returned list of elements + # + # @return [Integer] + required :offset, Integer + + # @!attribute count # The total number of elements for the entire query (not just the given page) # # @return [Integer, nil] optional :count, Integer - # @!parse - # # @return [Integer] - # attr_writer :count - - # @!attribute [r] offset - # The current start index of the returned list of elements + # @!method initialize(offset:, count: nil) + # @param offset [Integer] The current start index of the returned list of elements # - # @return [Integer, nil] - optional :offset, Integer - - # @!parse - # # @return [Integer] - # attr_writer :offset - - # @!parse - # # @param count [Integer] - # # @param offset [Integer] - # # - # def initialize(count: nil, offset: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @param count [Integer] The total number of elements for the entire query (not just the given page) end end end diff --git a/lib/finch_api/models/pay_statement_event.rb b/lib/finch_api/models/pay_statement_event.rb index 6f36fd6a..0ae2096a 100644 --- a/lib/finch_api/models/pay_statement_event.rb +++ b/lib/finch_api/models/pay_statement_event.rb @@ -3,60 +3,37 @@ module FinchAPI module Models class PayStatementEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::PayStatementEvent::Data, nil] optional :data, -> { FinchAPI::Models::PayStatementEvent::Data } - # @!parse - # # @return [FinchAPI::Models::PayStatementEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::PayStatementEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::PayStatementEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::PayStatementEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::PayStatementEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::PayStatementEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::PayStatementEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::PayStatementEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] individual_id + # @!attribute individual_id # The ID of the individual associated with the pay statement. # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!attribute [r] payment_id + # @!attribute payment_id # The ID of the payment associated with the pay statement. # # @return [String, nil] optional :payment_id, String - # @!parse - # # @return [String] - # attr_writer :payment_id - - # @!parse - # # @param individual_id [String] - # # @param payment_id [String] - # # - # def initialize(individual_id: nil, payment_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil, payment_id: nil) + # @param individual_id [String] The ID of the individual associated with the pay statement. + # + # @param payment_id [String] The ID of the payment associated with the pay statement. end module EventType @@ -66,11 +43,8 @@ module EventType PAY_STATEMENT_UPDATED = :"pay_statement.updated" PAY_STATEMENT_DELETED = :"pay_statement.deleted" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/payment_event.rb b/lib/finch_api/models/payment_event.rb index 6b0b35f9..c231659d 100644 --- a/lib/finch_api/models/payment_event.rb +++ b/lib/finch_api/models/payment_event.rb @@ -3,31 +3,19 @@ module FinchAPI module Models class PaymentEvent < FinchAPI::Models::BaseWebhookEvent - # @!attribute [r] data + # @!attribute data # # @return [FinchAPI::Models::PaymentEvent::Data, nil] optional :data, -> { FinchAPI::Models::PaymentEvent::Data } - # @!parse - # # @return [FinchAPI::Models::PaymentEvent::Data] - # attr_writer :data - - # @!attribute [r] event_type + # @!attribute event_type # # @return [Symbol, FinchAPI::Models::PaymentEvent::EventType, nil] optional :event_type, enum: -> { FinchAPI::Models::PaymentEvent::EventType } - # @!parse - # # @return [Symbol, FinchAPI::Models::PaymentEvent::EventType] - # attr_writer :event_type - - # @!parse - # # @param data [FinchAPI::Models::PaymentEvent::Data] - # # @param event_type [Symbol, FinchAPI::Models::PaymentEvent::EventType] - # # - # def initialize(data: nil, event_type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, event_type: nil) + # @param data [FinchAPI::Models::PaymentEvent::Data] + # @param event_type [Symbol, FinchAPI::Models::PaymentEvent::EventType] class Data < FinchAPI::Internal::Type::BaseModel # @!attribute pay_date @@ -42,13 +30,10 @@ class Data < FinchAPI::Internal::Type::BaseModel # @return [String] required :payment_id, String - # @!parse - # # @param pay_date [String] - # # @param payment_id [String] - # # - # def initialize(pay_date:, payment_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(pay_date:, payment_id:) + # @param pay_date [String] The date of the payment. + # + # @param payment_id [String] The ID of the payment. end module EventType @@ -58,11 +43,8 @@ module EventType PAYMENT_UPDATED = :"payment.updated" PAYMENT_DELETED = :"payment.deleted" - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 cb24de50..da5be761 100644 --- a/lib/finch_api/models/payroll/pay_group_list_params.rb +++ b/lib/finch_api/models/payroll/pay_group_list_params.rb @@ -5,36 +5,23 @@ module Models module Payroll # @see FinchAPI::Resources::Payroll::PayGroups#list class PayGroupListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] individual_id + # @!attribute individual_id # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - - # @!attribute [r] pay_frequencies + # @!attribute pay_frequencies # # @return [Array, nil] optional :pay_frequencies, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :pay_frequencies - - # @!parse - # # @param individual_id [String] - # # @param pay_frequencies [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(individual_id: nil, pay_frequencies: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(individual_id: nil, pay_frequencies: nil, request_options: {}) + # @param individual_id [String] + # @param pay_frequencies [Array] + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/payroll/pay_group_list_response.rb b/lib/finch_api/models/payroll/pay_group_list_response.rb index d679a575..1d24b6ba 100644 --- a/lib/finch_api/models/payroll/pay_group_list_response.rb +++ b/lib/finch_api/models/payroll/pay_group_list_response.rb @@ -5,45 +5,31 @@ module Models module Payroll # @see FinchAPI::Resources::Payroll::PayGroups#list class PayGroupListResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # Finch id (uuidv4) for the pay group # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute [r] name + # @!attribute name # Name of the pay group # # @return [String, nil] optional :name, String - # @!parse - # # @return [String] - # attr_writer :name - - # @!attribute [r] pay_frequencies + # @!attribute pay_frequencies # List of pay frequencies associated with this pay group # # @return [Array, nil] optional :pay_frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency] } - # @!parse - # # @return [Array] - # attr_writer :pay_frequencies - - # @!parse - # # @param id [String] - # # @param name [String] - # # @param pay_frequencies [Array] - # # - # def initialize(id: nil, name: nil, pay_frequencies: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, name: nil, pay_frequencies: nil) + # @param id [String] Finch id (uuidv4) for the pay group + # + # @param name [String] Name of the pay group + # + # @param pay_frequencies [Array] List of pay frequencies associated with this pay group module PayFrequency extend FinchAPI::Internal::Type::Enum @@ -58,11 +44,8 @@ module PayFrequency DAILY = :daily OTHER = :other - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end 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 692f7a43..fb2f8114 100644 --- a/lib/finch_api/models/payroll/pay_group_retrieve_params.rb +++ b/lib/finch_api/models/payroll/pay_group_retrieve_params.rb @@ -5,16 +5,11 @@ module Models module Payroll # @see FinchAPI::Resources::Payroll::PayGroups#retrieve class PayGroupRetrieveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/payroll/pay_group_retrieve_response.rb b/lib/finch_api/models/payroll/pay_group_retrieve_response.rb index 9362bb71..d5c9e924 100644 --- a/lib/finch_api/models/payroll/pay_group_retrieve_response.rb +++ b/lib/finch_api/models/payroll/pay_group_retrieve_response.rb @@ -29,15 +29,14 @@ class PayGroupRetrieveResponse < FinchAPI::Internal::Type::BaseModel required :pay_frequencies, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency] } - # @!parse - # # @param id [String] - # # @param individual_ids [Array] - # # @param name [String] - # # @param pay_frequencies [Array] - # # - # def initialize(id:, individual_ids:, name:, pay_frequencies:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id:, individual_ids:, name:, pay_frequencies:) + # @param id [String] Finch id (uuidv4) for the pay group + # + # @param individual_ids [Array] + # + # @param name [String] Name of the pay group + # + # @param pay_frequencies [Array] List of pay frequencies associated with this pay group module PayFrequency extend FinchAPI::Internal::Type::Enum @@ -52,11 +51,8 @@ module PayFrequency DAILY = :daily OTHER = :other - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/provider.rb b/lib/finch_api/models/provider.rb index b027dc86..45bf7446 100644 --- a/lib/finch_api/models/provider.rb +++ b/lib/finch_api/models/provider.rb @@ -4,68 +4,44 @@ module FinchAPI module Models # @see FinchAPI::Resources::Providers#list class Provider < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # The id of the payroll provider used in Connect. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!attribute [r] authentication_methods + # @!attribute authentication_methods # The list of authentication methods supported by the provider. # # @return [Array, nil] optional :authentication_methods, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::Provider::AuthenticationMethod] } - # @!parse - # # @return [Array] - # attr_writer :authentication_methods - - # @!attribute [r] beta + # @!attribute beta # `true` if the integration is in a beta state, `false` otherwise # # @return [Boolean, nil] optional :beta, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :beta - - # @!attribute [r] display_name + # @!attribute display_name # The display name of the payroll provider. # # @return [String, nil] optional :display_name, String - # @!parse - # # @return [String] - # attr_writer :display_name - - # @!attribute [r] icon + # @!attribute icon # The url to the official icon of the payroll provider. # # @return [String, nil] optional :icon, String - # @!parse - # # @return [String] - # attr_writer :icon - - # @!attribute [r] logo + # @!attribute logo # The url to the official logo of the payroll provider. # # @return [String, nil] optional :logo, String - # @!parse - # # @return [String] - # attr_writer :logo - - # @!attribute [r] manual + # @!attribute manual # [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. @@ -73,69 +49,48 @@ class Provider < FinchAPI::Internal::Type::BaseModel # @return [Boolean, nil] optional :manual, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :manual - - # @!attribute [r] mfa_required + # @!attribute mfa_required # whether MFA is required for the provider. # # @return [Boolean, nil] optional :mfa_required, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :mfa_required - - # @!attribute [r] primary_color + # @!attribute primary_color # The hex code for the primary color of the payroll provider. # # @return [String, nil] optional :primary_color, String - # @!parse - # # @return [String] - # attr_writer :primary_color - - # @!attribute [r] products + # @!attribute products # The list of Finch products supported on this payroll provider. # # @return [Array, nil] optional :products, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :products - - # @!parse - # # @param id [String] - # # @param authentication_methods [Array] - # # @param beta [Boolean] - # # @param display_name [String] - # # @param icon [String] - # # @param logo [String] - # # @param manual [Boolean] - # # @param mfa_required [Boolean] - # # @param primary_color [String] - # # @param products [Array] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil, authentication_methods: nil, beta: nil, display_name: nil, icon: nil, logo: nil, manual: nil, mfa_required: nil, primary_color: nil, products: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::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 beta [Boolean] `true` if the integration is in a beta state, `false` otherwise + # + # @param display_name [String] The display name of the payroll provider. + # + # @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. + # + # @param products [Array] The list of Finch products supported on this payroll provider. class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel # @!attribute benefits_support @@ -153,1353 +108,774 @@ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields }, nil?: true - # @!attribute [r] type + # @!attribute type # The type of authentication method. # # @return [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type, nil] optional :type, enum: -> { FinchAPI::Models::Provider::AuthenticationMethod::Type } - # @!parse - # # @return [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type] - # attr_writer :type - - # @!parse - # # @param benefits_support [FinchAPI::Models::HRIS::BenefitsSupport, nil] - # # @param supported_fields [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields, nil] - # # @param type [Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type] - # # - # def initialize(benefits_support: nil, supported_fields: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 + # ... + # + # @param supported_fields [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields, nil] The supported data fields returned by our HR and payroll endpoints + # + # @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 [r] company + # @!attribute company # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company, nil] optional :company, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company] - # attr_writer :company - - # @!attribute [r] directory + # @!attribute directory # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory, nil] optional :directory, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory] - # attr_writer :directory - - # @!attribute [r] employment + # @!attribute employment # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment, nil] optional :employment, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment] - # attr_writer :employment - - # @!attribute [r] individual + # @!attribute individual # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual, nil] optional :individual, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual] - # attr_writer :individual - - # @!attribute [r] pay_group + # @!attribute pay_group # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayGroup, nil] optional :pay_group, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayGroup } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayGroup] - # attr_writer :pay_group - - # @!attribute [r] pay_statement + # @!attribute pay_statement # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement, nil] optional :pay_statement, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement] - # attr_writer :pay_statement - - # @!attribute [r] payment + # @!attribute payment # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment, nil] optional :payment, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment] - # attr_writer :payment - - # @!parse - # # 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] - # # - # def initialize( - # company: nil, - # directory: nil, - # employment: nil, - # individual: nil, - # pay_group: nil, - # pay_statement: nil, - # payment: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] accounts + # @!attribute accounts # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, nil] optional :accounts, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts] - # attr_writer :accounts - - # @!attribute [r] departments + # @!attribute departments # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments, nil] optional :departments, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments] - # attr_writer :departments - - # @!attribute [r] ein + # @!attribute ein # # @return [Boolean, nil] optional :ein, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :ein - - # @!attribute [r] entity + # @!attribute entity # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity, nil] optional :entity, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity] - # attr_writer :entity - - # @!attribute [r] legal_name + # @!attribute legal_name # # @return [Boolean, nil] optional :legal_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :legal_name - - # @!attribute [r] locations + # @!attribute locations # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations, nil] optional :locations, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations] - # attr_writer :locations - - # @!attribute [r] primary_email + # @!attribute primary_email # # @return [Boolean, nil] optional :primary_email, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :primary_email - - # @!attribute [r] primary_phone_number + # @!attribute primary_phone_number # # @return [Boolean, nil] optional :primary_phone_number, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :primary_phone_number - - # @!parse - # # @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] - # # - # def initialize( - # id: nil, - # accounts: nil, - # departments: nil, - # ein: nil, - # entity: nil, - # legal_name: nil, - # locations: nil, - # primary_email: nil, - # primary_phone_number: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] account_name + # @!attribute account_name # # @return [Boolean, nil] optional :account_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :account_name - - # @!attribute [r] account_number + # @!attribute account_number # # @return [Boolean, nil] optional :account_number, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :account_number - - # @!attribute [r] account_type + # @!attribute account_type # # @return [Boolean, nil] optional :account_type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :account_type - - # @!attribute [r] institution_name + # @!attribute institution_name # # @return [Boolean, nil] optional :institution_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :institution_name - - # @!attribute [r] routing_number + # @!attribute routing_number # # @return [Boolean, nil] optional :routing_number, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :routing_number - - # @!parse - # # @param account_name [Boolean] - # # @param account_number [Boolean] - # # @param account_type [Boolean] - # # @param institution_name [Boolean] - # # @param routing_number [Boolean] - # # - # def initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] parent + # @!attribute parent # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] optional :parent, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - # attr_writer :parent - - # @!parse - # # @param name [Boolean] - # # @param parent [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent] - # # - # def initialize(name: nil, parent: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!parse - # # @param name [Boolean] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # @param name [Boolean] end end # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company#entity class Entity < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] subtype + # @!attribute subtype # # @return [Boolean, nil] optional :subtype, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :subtype - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param subtype [Boolean] - # # @param type [Boolean] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] city + # @!attribute city # # @return [Boolean, nil] optional :city, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :city - - # @!attribute [r] country + # @!attribute country # # @return [Boolean, nil] optional :country, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :country - - # @!attribute [r] line1 + # @!attribute line1 # # @return [Boolean, nil] optional :line1, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line1 - - # @!attribute [r] line2 + # @!attribute line2 # # @return [Boolean, nil] optional :line2, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line2 - - # @!attribute [r] postal_code + # @!attribute postal_code # # @return [Boolean, nil] optional :postal_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :postal_code - - # @!attribute [r] state + # @!attribute state # # @return [Boolean, nil] optional :state, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :state - - # @!parse - # # @param city [Boolean] - # # @param country [Boolean] - # # @param line1 [Boolean] - # # @param line2 [Boolean] - # # @param postal_code [Boolean] - # # @param state [Boolean] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] individuals + # @!attribute individuals # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] optional :individuals, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals] - # attr_writer :individuals - - # @!attribute [r] paging + # @!attribute paging # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging, nil] optional :paging, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging] - # attr_writer :paging - - # @!parse - # # @param individuals [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals] - # # @param paging [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging] - # # - # def initialize(individuals: nil, paging: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] department + # @!attribute department # # @return [Boolean, nil] optional :department, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :department - - # @!attribute [r] first_name + # @!attribute first_name # # @return [Boolean, nil] optional :first_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :first_name - - # @!attribute [r] is_active + # @!attribute is_active # # @return [Boolean, nil] optional :is_active, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :is_active - - # @!attribute [r] last_name + # @!attribute last_name # # @return [Boolean, nil] optional :last_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :last_name - - # @!attribute [r] manager + # @!attribute manager # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] optional :manager, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager] - # attr_writer :manager - - # @!attribute [r] middle_name + # @!attribute middle_name # # @return [Boolean, nil] optional :middle_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :middle_name - - # @!parse - # # @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] - # # - # def initialize( - # id: nil, - # department: nil, - # first_name: nil, - # is_active: nil, - # last_name: nil, - # manager: nil, - # middle_name: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!parse - # # @param id [Boolean] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # @param id [Boolean] end end # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory#paging class Paging < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] count + # @!attribute count # # @return [Boolean, nil] optional :count, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :count - - # @!attribute [r] offset + # @!attribute offset # # @return [Boolean, nil] optional :offset, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :offset - - # @!parse - # # @param count [Boolean] - # # @param offset [Boolean] - # # - # def initialize(count: nil, offset: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] class_code + # @!attribute class_code # # @return [Boolean, nil] optional :class_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :class_code - - # @!attribute [r] custom_fields + # @!attribute custom_fields # # @return [Boolean, nil] optional :custom_fields, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :custom_fields - - # @!attribute [r] department + # @!attribute department # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Department, nil] optional :department, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Department } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Department] - # attr_writer :department - - # @!attribute [r] employment + # @!attribute employment # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Employment, nil] optional :employment, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Employment } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Employment] - # attr_writer :employment - - # @!attribute [r] employment_status + # @!attribute employment_status # # @return [Boolean, nil] optional :employment_status, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employment_status - - # @!attribute [r] end_date + # @!attribute end_date # # @return [Boolean, nil] optional :end_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :end_date - - # @!attribute [r] first_name + # @!attribute first_name # # @return [Boolean, nil] optional :first_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :first_name - - # @!attribute [r] income + # @!attribute income # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income, nil] optional :income, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income] - # attr_writer :income - - # @!attribute [r] income_history + # @!attribute income_history # # @return [Boolean, nil] optional :income_history, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :income_history - - # @!attribute [r] is_active + # @!attribute is_active # # @return [Boolean, nil] optional :is_active, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :is_active - - # @!attribute [r] last_name + # @!attribute last_name # # @return [Boolean, nil] optional :last_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :last_name - - # @!attribute [r] location + # @!attribute location # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location, nil] optional :location, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location] - # attr_writer :location - - # @!attribute [r] manager + # @!attribute manager # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, nil] optional :manager, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager] - # attr_writer :manager - - # @!attribute [r] middle_name + # @!attribute middle_name # # @return [Boolean, nil] optional :middle_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :middle_name - - # @!attribute [r] start_date + # @!attribute start_date # # @return [Boolean, nil] optional :start_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :start_date - - # @!attribute [r] title + # @!attribute title # # @return [Boolean, nil] optional :title, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :title - - # @!parse - # # @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] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!parse - # # @param name [Boolean] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # @param name [Boolean] end # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment#employment class Employment < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] subtype + # @!attribute subtype # # @return [Boolean, nil] optional :subtype, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :subtype - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param subtype [Boolean] - # # @param type [Boolean] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] unit + # @!attribute unit # # @return [Boolean, nil] optional :unit, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :unit - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param unit [Boolean] - # # - # def initialize(amount: nil, currency: nil, unit: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] city + # @!attribute city # # @return [Boolean, nil] optional :city, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :city - - # @!attribute [r] country + # @!attribute country # # @return [Boolean, nil] optional :country, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :country - - # @!attribute [r] line1 + # @!attribute line1 # # @return [Boolean, nil] optional :line1, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line1 - - # @!attribute [r] line2 + # @!attribute line2 # # @return [Boolean, nil] optional :line2, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line2 - - # @!attribute [r] postal_code + # @!attribute postal_code # # @return [Boolean, nil] optional :postal_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :postal_code - - # @!attribute [r] state + # @!attribute state # # @return [Boolean, nil] optional :state, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :state - - # @!parse - # # @param city [Boolean] - # # @param country [Boolean] - # # @param line1 [Boolean] - # # @param line2 [Boolean] - # # @param postal_code [Boolean] - # # @param state [Boolean] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!parse - # # @param id [Boolean] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # @param id [Boolean] end end # @see FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields#individual class Individual < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] dob + # @!attribute dob # # @return [Boolean, nil] optional :dob, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :dob - - # @!attribute [r] emails + # @!attribute emails # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, nil] optional :emails, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails] - # attr_writer :emails - - # @!attribute [r] encrypted_ssn + # @!attribute encrypted_ssn # # @return [Boolean, nil] optional :encrypted_ssn, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :encrypted_ssn - - # @!attribute [r] ethnicity + # @!attribute ethnicity # # @return [Boolean, nil] optional :ethnicity, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :ethnicity - - # @!attribute [r] first_name + # @!attribute first_name # # @return [Boolean, nil] optional :first_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :first_name - - # @!attribute [r] gender + # @!attribute gender # # @return [Boolean, nil] optional :gender, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :gender - - # @!attribute [r] last_name + # @!attribute last_name # # @return [Boolean, nil] optional :last_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :last_name - - # @!attribute [r] middle_name + # @!attribute middle_name # # @return [Boolean, nil] optional :middle_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :middle_name - - # @!attribute [r] phone_numbers + # @!attribute phone_numbers # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] optional :phone_numbers, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers] - # attr_writer :phone_numbers - - # @!attribute [r] preferred_name + # @!attribute preferred_name # # @return [Boolean, nil] optional :preferred_name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :preferred_name - - # @!attribute [r] residence + # @!attribute residence # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence, nil] optional :residence, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Residence] - # attr_writer :residence - - # @!attribute [r] ssn + # @!attribute ssn # # @return [Boolean, nil] optional :ssn, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :ssn - - # @!parse - # # @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] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] data + # @!attribute data # # @return [Boolean, nil] optional :data, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :data - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param data [Boolean] - # # @param type [Boolean] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] data + # @!attribute data # # @return [Boolean, nil] optional :data, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :data - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param data [Boolean] - # # @param type [Boolean] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] city + # @!attribute city # # @return [Boolean, nil] optional :city, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :city - - # @!attribute [r] country + # @!attribute country # # @return [Boolean, nil] optional :country, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :country - - # @!attribute [r] line1 + # @!attribute line1 # # @return [Boolean, nil] optional :line1, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line1 - - # @!attribute [r] line2 + # @!attribute line2 # # @return [Boolean, nil] optional :line2, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :line2 - - # @!attribute [r] postal_code + # @!attribute postal_code # # @return [Boolean, nil] optional :postal_code, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :postal_code - - # @!attribute [r] state + # @!attribute state # # @return [Boolean, nil] optional :state, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :state - - # @!parse - # # @param city [Boolean] - # # @param country [Boolean] - # # @param line1 [Boolean] - # # @param line2 [Boolean] - # # @param postal_code [Boolean] - # # @param state [Boolean] - # # - # def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] individual_ids + # @!attribute individual_ids # # @return [Boolean, nil] optional :individual_ids, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :individual_ids - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] pay_frequencies + # @!attribute pay_frequencies # # @return [Boolean, nil] optional :pay_frequencies, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_frequencies - - # @!parse - # # @param id [Boolean] - # # @param individual_ids [Boolean] - # # @param name [Boolean] - # # @param pay_frequencies [Boolean] - # # - # def initialize(id: nil, individual_ids: nil, name: nil, pay_frequencies: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] paging + # @!attribute paging # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] optional :paging, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # attr_writer :paging - - # @!attribute [r] pay_statements + # @!attribute pay_statements # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] optional :pay_statements, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - # attr_writer :pay_statements - - # @!parse - # # @param paging [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging] - # # @param pay_statements [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements] - # # - # def initialize(paging: nil, pay_statements: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 @@ -1513,521 +889,295 @@ class Paging < FinchAPI::Internal::Type::BaseModel # @return [Boolean] required :offset, FinchAPI::Internal::Type::Boolean - # @!parse - # # @param count [Boolean] - # # @param offset [Boolean] - # # - # def initialize(count:, offset:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] earnings + # @!attribute earnings # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] optional :earnings, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings] - # attr_writer :earnings - - # @!attribute [r] employee_deductions + # @!attribute employee_deductions # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] optional :employee_deductions, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions] - # attr_writer :employee_deductions - - # @!attribute [r] employer_contributions + # @!attribute employer_contributions # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] optional :employer_contributions, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions] - # attr_writer :employer_contributions - - # @!attribute [r] gross_pay + # @!attribute gross_pay # # @return [Boolean, nil] optional :gross_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :gross_pay - - # @!attribute [r] individual_id + # @!attribute individual_id # # @return [Boolean, nil] optional :individual_id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :individual_id - - # @!attribute [r] net_pay + # @!attribute net_pay # # @return [Boolean, nil] optional :net_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :net_pay - - # @!attribute [r] payment_method + # @!attribute payment_method # # @return [Boolean, nil] optional :payment_method, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :payment_method - - # @!attribute [r] taxes + # @!attribute taxes # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] optional :taxes, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes] - # attr_writer :taxes - - # @!attribute [r] total_hours + # @!attribute total_hours # # @return [Boolean, nil] optional :total_hours, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :total_hours - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @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] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param name [Boolean] - # # @param type [Boolean] - # # - # def initialize(amount: nil, currency: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] pre_tax + # @!attribute pre_tax # # @return [Boolean, nil] optional :pre_tax, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pre_tax - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param name [Boolean] - # # @param pre_tax [Boolean] - # # @param type [Boolean] - # # - # def initialize(amount: nil, currency: nil, name: nil, pre_tax: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param name [Boolean] - # # - # def initialize(amount: nil, currency: nil, name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] amount + # @!attribute amount # # @return [Boolean, nil] optional :amount, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :amount - - # @!attribute [r] currency + # @!attribute currency # # @return [Boolean, nil] optional :currency, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :currency - - # @!attribute [r] employer + # @!attribute employer # # @return [Boolean, nil] optional :employer, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employer - - # @!attribute [r] name + # @!attribute name # # @return [Boolean, nil] optional :name, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :name - - # @!attribute [r] type + # @!attribute type # # @return [Boolean, nil] optional :type, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :type - - # @!parse - # # @param amount [Boolean] - # # @param currency [Boolean] - # # @param employer [Boolean] - # # @param name [Boolean] - # # @param type [Boolean] - # # - # def initialize(amount: nil, currency: nil, employer: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] id + # @!attribute id # # @return [Boolean, nil] optional :id, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :id - - # @!attribute [r] company_debit + # @!attribute company_debit # # @return [Boolean, nil] optional :company_debit, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :company_debit - - # @!attribute [r] debit_date + # @!attribute debit_date # # @return [Boolean, nil] optional :debit_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :debit_date - - # @!attribute [r] employee_taxes + # @!attribute employee_taxes # # @return [Boolean, nil] optional :employee_taxes, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employee_taxes - - # @!attribute [r] employer_taxes + # @!attribute employer_taxes # # @return [Boolean, nil] optional :employer_taxes, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :employer_taxes - - # @!attribute [r] gross_pay + # @!attribute gross_pay # # @return [Boolean, nil] optional :gross_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :gross_pay - - # @!attribute [r] individual_ids + # @!attribute individual_ids # # @return [Boolean, nil] optional :individual_ids, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :individual_ids - - # @!attribute [r] net_pay + # @!attribute net_pay # # @return [Boolean, nil] optional :net_pay, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :net_pay - - # @!attribute [r] pay_date + # @!attribute pay_date # # @return [Boolean, nil] optional :pay_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_date - - # @!attribute [r] pay_frequencies + # @!attribute pay_frequencies # # @return [Boolean, nil] optional :pay_frequencies, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_frequencies - - # @!attribute [r] pay_group_ids + # @!attribute pay_group_ids # # @return [Boolean, nil] optional :pay_group_ids, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :pay_group_ids - - # @!attribute [r] pay_period + # @!attribute pay_period # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] optional :pay_period, -> { FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod } - # @!parse - # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod] - # attr_writer :pay_period - - # @!parse - # # @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] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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 [r] end_date + # @!attribute end_date # # @return [Boolean, nil] optional :end_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :end_date - - # @!attribute [r] start_date + # @!attribute start_date # # @return [Boolean, nil] optional :start_date, FinchAPI::Internal::Type::Boolean - # @!parse - # # @return [Boolean] - # attr_writer :start_date - - # @!parse - # # @param end_date [Boolean] - # # @param start_date [Boolean] - # # - # def initialize(end_date: nil, start_date: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(end_date: nil, start_date: nil) + # @param end_date [Boolean] + # @param start_date [Boolean] end end end @@ -2044,11 +1194,8 @@ module Type API_CREDENTIAL = :api_credential OAUTH = :oauth - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/provider_list_params.rb b/lib/finch_api/models/provider_list_params.rb index 24968b19..80f9b52e 100644 --- a/lib/finch_api/models/provider_list_params.rb +++ b/lib/finch_api/models/provider_list_params.rb @@ -4,16 +4,11 @@ module FinchAPI module Models # @see FinchAPI::Resources::Providers#list class ProviderListParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] 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 81186e5d..d6f7ac99 100644 --- a/lib/finch_api/models/request_forwarding_forward_params.rb +++ b/lib/finch_api/models/request_forwarding_forward_params.rb @@ -4,8 +4,7 @@ module FinchAPI module Models # @see FinchAPI::Resources::RequestForwarding#forward class RequestForwardingForwardParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute method_ @@ -45,17 +44,26 @@ class RequestForwardingForwardParams < FinchAPI::Internal::Type::BaseModel # @return [Object, nil] optional :params, FinchAPI::Internal::Type::Unknown, nil?: true - # @!parse - # # @param method_ [String] - # # @param route [String] - # # @param data [String, nil] - # # @param headers [Object, nil] - # # @param params [Object, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(method_:, route:, data: nil, headers: nil, params: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(method_:, route:, data: nil, headers: nil, params: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::RequestForwardingForwardParams} for more details. + # + # @param method_ [String] The HTTP method for the forwarded request. Valid values include: `GET` , `POST` + # ... + # + # @param route [String] The URL route path for the forwarded request. This value must begin with a forwa + # ... + # + # @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 params [Object, nil] The query parameters for the forwarded request. This value must be specified as + # ... + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/request_forwarding_forward_response.rb b/lib/finch_api/models/request_forwarding_forward_response.rb index 10f0b88d..f71fb2c0 100644 --- a/lib/finch_api/models/request_forwarding_forward_response.rb +++ b/lib/finch_api/models/request_forwarding_forward_response.rb @@ -33,15 +33,21 @@ class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel # @return [Integer] required :status_code, Integer, api_name: :statusCode - # @!parse - # # @param data [String, nil] - # # @param headers [Object, nil] - # # @param request [FinchAPI::Models::RequestForwardingForwardResponse::Request] - # # @param status_code [Integer] - # # - # def initialize(data:, headers:, request:, status_code:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data:, headers:, request:, status_code:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::RequestForwardingForwardResponse} for more details. + # + # @param data [String, nil] A string representation of the HTTP response body of the forwarded request’s res + # ... + # + # @param headers [Object, nil] The HTTP headers of the forwarded request’s response, exactly as received from t + # ... + # + # @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 + # ... # @see FinchAPI::Models::RequestForwardingForwardResponse#request class Request < FinchAPI::Internal::Type::BaseModel @@ -80,19 +86,26 @@ class Request < FinchAPI::Internal::Type::BaseModel # @return [String] required :route, String - # @!parse - # # An object containing details of your original forwarded request, for your ease - # # of reference. - # # - # # @param data [String, nil] - # # @param headers [Object, nil] - # # @param method_ [String] - # # @param params [Object, nil] - # # @param route [String] - # # - # def initialize(data:, headers:, method_:, params:, route:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data:, headers:, method_:, params:, route:) + # 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 headers [Object, nil] The specified HTTP headers that were included in the forwarded request. If no he + # ... + # + # @param method_ [String] The HTTP method that was specified for the forwarded request. Valid values inclu + # ... + # + # @param params [Object, nil] The query parameters that were included in the forwarded request. If no query pa + # ... + # + # @param route [String] The URL route path that was specified for the forwarded request. end end end diff --git a/lib/finch_api/models/sandbox/company_update_params.rb b/lib/finch_api/models/sandbox/company_update_params.rb index 1d5aa38c..927e7027 100644 --- a/lib/finch_api/models/sandbox/company_update_params.rb +++ b/lib/finch_api/models/sandbox/company_update_params.rb @@ -5,8 +5,7 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Company#update class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute accounts @@ -63,33 +62,28 @@ class CompanyUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :primary_phone_number, String, nil?: true - # @!parse - # # @param accounts [Array, nil] - # # @param departments [Array, nil] - # # @param ein [String, nil] - # # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] - # # @param legal_name [String, nil] - # # @param locations [Array, nil] - # # @param primary_email [String, nil] - # # @param primary_phone_number [String, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize( - # accounts:, - # departments:, - # ein:, - # entity:, - # legal_name:, - # locations:, - # primary_email:, - # primary_phone_number:, - # request_options: {}, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::CompanyUpdateParams} for more details. + # + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # + # @param departments [Array, nil] The array of company departments. + # + # @param ein [String, nil] The employer identification number. + # + # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] The entity type object. + # + # @param legal_name [String, nil] The legal name of the company. + # + # @param locations [Array, nil] + # + # @param primary_email [String, nil] The email of the main administrator on the account. + # + # @param primary_phone_number [String, nil] The phone number of the main administrator on the account. Format: E.164, with e + # ... + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Account < FinchAPI::Internal::Type::BaseModel # @!attribute account_name @@ -125,16 +119,20 @@ class Account < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :routing_number, String, nil?: true - # @!parse - # # @param account_name [String, nil] - # # @param account_number [String, nil] - # # @param account_type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType, nil] - # # @param institution_name [String, nil] - # # @param routing_number [String, nil] - # # - # def initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::CompanyUpdateParams::Account} for more details. + # + # @param account_name [String, nil] The name of the bank associated in the payroll/HRIS system. + # + # @param account_number [String, nil] 10-12 digit number to specify the bank account + # + # @param account_type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType, nil] The type of bank account. + # + # @param institution_name [String, nil] Name of the banking institution. + # + # @param routing_number [String, nil] A nine-digit code that's based on the U.S. Bank location where your account was + # ... # The type of bank account. # @@ -145,11 +143,8 @@ module AccountType CHECKING = :checking SAVINGS = :savings - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -166,13 +161,10 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Sandbox::CompanyUpdateParams::Department::Parent, nil] optional :parent, -> { FinchAPI::Models::Sandbox::CompanyUpdateParams::Department::Parent }, nil?: true - # @!parse - # # @param name [String, nil] - # # @param parent [FinchAPI::Models::Sandbox::CompanyUpdateParams::Department::Parent, nil] - # # - # def initialize(name: nil, parent: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, parent: nil) + # @param name [String, nil] The department name. + # + # @param parent [FinchAPI::Models::Sandbox::CompanyUpdateParams::Department::Parent, nil] The parent department, if present. # @see FinchAPI::Models::Sandbox::CompanyUpdateParams::Department#parent class Parent < FinchAPI::Internal::Type::BaseModel @@ -182,14 +174,10 @@ class Parent < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The parent department, if present. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The parent department, if present. + # + # @param name [String, nil] The parent department's name. end end @@ -208,15 +196,12 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type, nil] optional :type, enum: -> { FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type }, nil?: true - # @!parse - # # The entity type object. - # # - # # @param subtype [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # The entity type object. + # + # @param subtype [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype, nil] The tax payer subtype of the company. + # + # @param type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type, nil] The tax payer type of the company. # The tax payer subtype of the company. # @@ -228,11 +213,8 @@ module Subtype C_CORPORATION = :c_corporation B_CORPORATION = :b_corporation - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The tax payer type of the company. @@ -249,11 +231,8 @@ module Type PARTNERSHIP = :partnership COOPERATIVE = :cooperative - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/company_update_response.rb b/lib/finch_api/models/sandbox/company_update_response.rb index 81a79d43..51e0a483 100644 --- a/lib/finch_api/models/sandbox/company_update_response.rb +++ b/lib/finch_api/models/sandbox/company_update_response.rb @@ -59,19 +59,26 @@ class CompanyUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :primary_phone_number, String, nil?: true - # @!parse - # # @param accounts [Array, nil] - # # @param departments [Array, nil] - # # @param ein [String, nil] - # # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity, nil] - # # @param legal_name [String, nil] - # # @param locations [Array, nil] - # # @param primary_email [String, nil] - # # @param primary_phone_number [String, nil] - # # - # def initialize(accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::CompanyUpdateResponse} for more details. + # + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # + # @param departments [Array, nil] The array of company departments. + # + # @param ein [String, nil] The employer identification number. + # + # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity, nil] The entity type object. + # + # @param legal_name [String, nil] The legal name of the company. + # + # @param locations [Array, nil] + # + # @param primary_email [String, nil] The email of the main administrator on the account. + # + # @param primary_phone_number [String, nil] The phone number of the main administrator on the account. Format: E.164, with e + # ... class Account < FinchAPI::Internal::Type::BaseModel # @!attribute account_name @@ -107,16 +114,20 @@ class Account < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :routing_number, String, nil?: true - # @!parse - # # @param account_name [String, nil] - # # @param account_number [String, nil] - # # @param account_type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account::AccountType, nil] - # # @param institution_name [String, nil] - # # @param routing_number [String, nil] - # # - # def initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(account_name: nil, account_number: nil, account_type: nil, institution_name: nil, routing_number: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account} for more details. + # + # @param account_name [String, nil] The name of the bank associated in the payroll/HRIS system. + # + # @param account_number [String, nil] 10-12 digit number to specify the bank account + # + # @param account_type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account::AccountType, nil] The type of bank account. + # + # @param institution_name [String, nil] Name of the banking institution. + # + # @param routing_number [String, nil] A nine-digit code that's based on the U.S. Bank location where your account was + # ... # The type of bank account. # @@ -127,11 +138,8 @@ module AccountType CHECKING = :checking SAVINGS = :savings - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -148,13 +156,10 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department::Parent, nil] optional :parent, -> { FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department::Parent }, nil?: true - # @!parse - # # @param name [String, nil] - # # @param parent [FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department::Parent, nil] - # # - # def initialize(name: nil, parent: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, parent: nil) + # @param name [String, nil] The department name. + # + # @param parent [FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department::Parent, nil] The parent department, if present. # @see FinchAPI::Models::Sandbox::CompanyUpdateResponse::Department#parent class Parent < FinchAPI::Internal::Type::BaseModel @@ -164,14 +169,10 @@ class Parent < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The parent department, if present. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The parent department, if present. + # + # @param name [String, nil] The parent department's name. end end @@ -191,15 +192,12 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type, nil] optional :type, enum: -> { FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type }, nil?: true - # @!parse - # # The entity type object. - # # - # # @param subtype [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # The entity type object. + # + # @param subtype [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Subtype, nil] The tax payer subtype of the company. + # + # @param type [Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type, nil] The tax payer type of the company. # The tax payer subtype of the company. # @@ -211,11 +209,8 @@ module Subtype C_CORPORATION = :c_corporation B_CORPORATION = :b_corporation - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The tax payer type of the company. @@ -232,11 +227,8 @@ module Type PARTNERSHIP = :partnership COOPERATIVE = :cooperative - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/connection_create_params.rb b/lib/finch_api/models/sandbox/connection_create_params.rb index 3f11f4c4..9e8d475b 100644 --- a/lib/finch_api/models/sandbox/connection_create_params.rb +++ b/lib/finch_api/models/sandbox/connection_create_params.rb @@ -5,8 +5,7 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Connections#create class ConnectionCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute provider_id @@ -15,17 +14,13 @@ class ConnectionCreateParams < FinchAPI::Internal::Type::BaseModel # @return [String] required :provider_id, String - # @!attribute [r] authentication_type + # @!attribute authentication_type # # @return [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType, nil] optional :authentication_type, enum: -> { FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType } - # @!parse - # # @return [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType] - # attr_writer :authentication_type - - # @!attribute [r] employee_size + # @!attribute employee_size # Optional: the size of the employer to be created with this connection. Defaults # to 20. Note that if this is higher than 100, historical payroll data will not be # generated, and instead only one pay period will be created. @@ -33,29 +28,25 @@ class ConnectionCreateParams < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :employee_size, Integer - # @!parse - # # @return [Integer] - # attr_writer :employee_size - - # @!attribute [r] products + # @!attribute products # # @return [Array, nil] optional :products, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :products - - # @!parse - # # @param provider_id [String] - # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType] - # # @param employee_size [Integer] - # # @param products [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(provider_id:, authentication_type: nil, employee_size: nil, products: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(provider_id:, authentication_type: nil, employee_size: nil, products: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::ConnectionCreateParams} for more details. + # + # @param provider_id [String] The provider associated with the connection + # + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType] + # + # @param employee_size [Integer] Optional: the size of the employer to be created with this connection. Defaults + # ... + # + # @param products [Array] + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] module AuthenticationType extend FinchAPI::Internal::Type::Enum @@ -65,11 +56,8 @@ module AuthenticationType OAUTH = :oauth ASSISTED = :assisted - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/connection_create_response.rb b/lib/finch_api/models/sandbox/connection_create_response.rb index b14d0819..204cfac4 100644 --- a/lib/finch_api/models/sandbox/connection_create_response.rb +++ b/lib/finch_api/models/sandbox/connection_create_response.rb @@ -11,6 +11,8 @@ class ConnectionCreateResponse < FinchAPI::Internal::Type::BaseModel required :access_token, String # @!attribute account_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate a connection with an access token # # @return [String] @@ -23,6 +25,8 @@ class ConnectionCreateResponse < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::ConnectionCreateResponse::AuthenticationType } # @!attribute company_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate a connection with an access token # # @return [String] @@ -45,40 +49,27 @@ class ConnectionCreateResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :provider_id, String - # @!attribute [r] token_type + # @!attribute token_type # # @return [String, nil] optional :token_type, String - # @!parse - # # @return [String] - # attr_writer :token_type - - # @!parse - # # @param access_token [String] - # # @param account_id [String] - # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateResponse::AuthenticationType] - # # @param company_id [String] - # # @param connection_id [String] - # # @param products [Array] - # # @param provider_id [String] - # # @param token_type [String] - # # - # def initialize( - # access_token:, - # account_id:, - # authentication_type:, - # company_id:, - # connection_id:, - # products:, - # provider_id:, - # token_type: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(access_token:, account_id:, authentication_type:, company_id:, connection_id:, products:, provider_id:, token_type: nil) + # @param access_token [String] + # + # @param account_id [String] [DEPRECATED] Use `connection_id` to associate a connection with an access token + # + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateResponse::AuthenticationType] + # + # @param company_id [String] [DEPRECATED] Use `connection_id` to associate a connection with an access token + # + # @param connection_id [String] The ID of the new connection + # + # @param products [Array] + # + # @param provider_id [String] The ID of the provider associated with the `access_token`. + # + # @param token_type [String] # @see FinchAPI::Models::Sandbox::ConnectionCreateResponse#authentication_type module AuthenticationType @@ -89,11 +80,8 @@ module AuthenticationType OAUTH = :oauth ASSISTED = :assisted - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/connections/account_create_params.rb b/lib/finch_api/models/sandbox/connections/account_create_params.rb index bbd8a933..be276a3c 100644 --- a/lib/finch_api/models/sandbox/connections/account_create_params.rb +++ b/lib/finch_api/models/sandbox/connections/account_create_params.rb @@ -6,8 +6,7 @@ module Sandbox module Connections # @see FinchAPI::Resources::Sandbox::Connections::Accounts#create class AccountCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute company_id @@ -21,37 +20,33 @@ class AccountCreateParams < FinchAPI::Internal::Type::BaseModel # @return [String] required :provider_id, String - # @!attribute [r] authentication_type + # @!attribute authentication_type # # @return [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType, nil] optional :authentication_type, enum: -> { FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType } - # @!parse - # # @return [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType] - # attr_writer :authentication_type - - # @!attribute [r] products + # @!attribute products # Optional, defaults to Organization products (`company`, `directory`, # `employment`, `individual`) # # @return [Array, nil] optional :products, FinchAPI::Internal::Type::ArrayOf[String] - # @!parse - # # @return [Array] - # attr_writer :products - - # @!parse - # # @param company_id [String] - # # @param provider_id [String] - # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType] - # # @param products [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(company_id:, provider_id:, authentication_type: nil, products: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(company_id:, provider_id:, authentication_type: nil, products: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::Connections::AccountCreateParams} for more details. + # + # @param company_id [String] + # + # @param provider_id [String] The provider associated with the `access_token` + # + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType] + # + # @param products [Array] Optional, defaults to Organization products (`company`, `directory`, `employment + # ... + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] module AuthenticationType extend FinchAPI::Internal::Type::Enum @@ -61,11 +56,8 @@ module AuthenticationType OAUTH = :oauth ASSISTED = :assisted - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/connections/account_create_response.rb b/lib/finch_api/models/sandbox/connections/account_create_response.rb index c2ef25fd..ebcd494b 100644 --- a/lib/finch_api/models/sandbox/connections/account_create_response.rb +++ b/lib/finch_api/models/sandbox/connections/account_create_response.rb @@ -12,6 +12,8 @@ class AccountCreateResponse < FinchAPI::Internal::Type::BaseModel required :access_token, String # @!attribute account_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate a connection with an access token # # @return [String] @@ -24,6 +26,8 @@ class AccountCreateResponse < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::Connections::AccountCreateResponse::AuthenticationType } # @!attribute company_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate a connection with an access token # # @return [String] @@ -46,18 +50,20 @@ class AccountCreateResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :provider_id, String - # @!parse - # # @param access_token [String] - # # @param account_id [String] - # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateResponse::AuthenticationType] - # # @param company_id [String] - # # @param connection_id [String] - # # @param products [Array] - # # @param provider_id [String] - # # - # def initialize(access_token:, account_id:, authentication_type:, company_id:, connection_id:, products:, provider_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(access_token:, account_id:, authentication_type:, company_id:, connection_id:, products:, provider_id:) + # @param access_token [String] + # + # @param account_id [String] [DEPRECATED] Use `connection_id` to associate a connection with an access token + # + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateResponse::AuthenticationType] + # + # @param company_id [String] [DEPRECATED] Use `connection_id` to associate a connection with an access token + # + # @param connection_id [String] The ID of the new connection + # + # @param products [Array] + # + # @param provider_id [String] The ID of the provider associated with the `access_token` # @see FinchAPI::Models::Sandbox::Connections::AccountCreateResponse#authentication_type module AuthenticationType @@ -68,11 +74,8 @@ module AuthenticationType OAUTH = :oauth ASSISTED = :assisted - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/connections/account_update_params.rb b/lib/finch_api/models/sandbox/connections/account_update_params.rb index 5ace5408..2bae7b74 100644 --- a/lib/finch_api/models/sandbox/connections/account_update_params.rb +++ b/lib/finch_api/models/sandbox/connections/account_update_params.rb @@ -6,26 +6,17 @@ module Sandbox module Connections # @see FinchAPI::Resources::Sandbox::Connections::Accounts#update class AccountUpdateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] connection_status + # @!attribute connection_status # # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil] optional :connection_status, enum: -> { FinchAPI::Models::ConnectionStatusType } - # @!parse - # # @return [Symbol, FinchAPI::Models::ConnectionStatusType] - # attr_writer :connection_status - - # @!parse - # # @param connection_status [Symbol, FinchAPI::Models::ConnectionStatusType] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(connection_status: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(connection_status: nil, request_options: {}) + # @param connection_status [Symbol, FinchAPI::Models::ConnectionStatusType] + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/sandbox/connections/account_update_response.rb b/lib/finch_api/models/sandbox/connections/account_update_response.rb index 6b8b9285..d6b3276c 100644 --- a/lib/finch_api/models/sandbox/connections/account_update_response.rb +++ b/lib/finch_api/models/sandbox/connections/account_update_response.rb @@ -7,6 +7,8 @@ module Connections # @see FinchAPI::Resources::Sandbox::Connections::Accounts#update class AccountUpdateResponse < FinchAPI::Internal::Type::BaseModel # @!attribute account_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate a connection with an access token # # @return [String] @@ -19,6 +21,8 @@ class AccountUpdateResponse < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse::AuthenticationType } # @!attribute company_id + # @deprecated + # # [DEPRECATED] Use `connection_id` to associate a connection with an access token # # @return [String] @@ -35,27 +39,24 @@ class AccountUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :provider_id, String - # @!attribute [r] connection_id + # @!attribute connection_id # The ID of the new connection # # @return [String, nil] optional :connection_id, String - # @!parse - # # @return [String] - # attr_writer :connection_id - - # @!parse - # # @param account_id [String] - # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse::AuthenticationType] - # # @param company_id [String] - # # @param products [Array] - # # @param provider_id [String] - # # @param connection_id [String] - # # - # def initialize(account_id:, authentication_type:, company_id:, products:, provider_id:, connection_id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(account_id:, authentication_type:, company_id:, products:, provider_id:, connection_id: nil) + # @param account_id [String] [DEPRECATED] Use `connection_id` to associate a connection with an access token + # + # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse::AuthenticationType] + # + # @param company_id [String] [DEPRECATED] Use `connection_id` to associate a connection with an access token + # + # @param products [Array] + # + # @param provider_id [String] The ID of the provider associated with the `access_token` + # + # @param connection_id [String] The ID of the new connection # @see FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse#authentication_type module AuthenticationType @@ -66,11 +67,8 @@ module AuthenticationType OAUTH = :oauth ASSISTED = :assisted - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/directory_create_params.rb b/lib/finch_api/models/sandbox/directory_create_params.rb index e751f61a..e0fd9429 100644 --- a/lib/finch_api/models/sandbox/directory_create_params.rb +++ b/lib/finch_api/models/sandbox/directory_create_params.rb @@ -5,11 +5,10 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Directory#create class DirectoryCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] body + # @!attribute body # Array of individuals to create. Takes all combined fields from `/individual` and # `/employment` endpoints. All fields are optional. # @@ -17,17 +16,14 @@ class DirectoryCreateParams < FinchAPI::Internal::Type::BaseModel optional :body, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body] } - # @!parse - # # @return [Array] - # attr_writer :body - - # @!parse - # # @param body [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(body: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(body: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::DirectoryCreateParams} for more details. + # + # @param body [Array] Array of individuals to create. Takes all combined fields from `/individual` and + # ... + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Body < FinchAPI::Internal::Type::BaseModel # @!attribute class_code @@ -36,7 +32,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :class_code, String, nil?: true - # @!attribute [r] custom_fields + # @!attribute custom_fields # Custom fields for the individual. These are fields which are defined by the # employer in the system. Custom fields are not currently supported for assisted # connections. @@ -45,10 +41,6 @@ class Body < FinchAPI::Internal::Type::BaseModel optional :custom_fields, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::CustomField] } - # @!parse - # # @return [Array] - # attr_writer :custom_fields - # @!attribute department # The department object. # @@ -186,16 +178,12 @@ class Body < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Location, nil] optional :residence, -> { FinchAPI::Models::Location }, nil?: true - # @!attribute [r] source_id + # @!attribute source_id # The source system's unique employment identifier for this individual # # @return [String, nil] optional :source_id, String - # @!parse - # # @return [String] - # attr_writer :source_id - # @!attribute ssn # Social Security Number of the individual. This field is only available with the # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the @@ -216,69 +204,67 @@ class Body < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!parse - # # @param class_code [String, nil] - # # @param custom_fields [Array] - # # @param department [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Department, nil] - # # @param dob [String, nil] - # # @param emails [Array, nil] - # # @param employment [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment, nil] - # # @param employment_status [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus, nil] - # # @param encrypted_ssn [String, nil] - # # @param end_date [String, nil] - # # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity, nil] - # # @param first_name [String, nil] - # # @param gender [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender, nil] - # # @param income [FinchAPI::Models::Income, nil] - # # @param income_history [Array, nil] - # # @param is_active [Boolean, nil] - # # @param last_name [String, nil] - # # @param latest_rehire_date [String, nil] - # # @param location [FinchAPI::Models::Location, nil] - # # @param manager [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Manager, nil] - # # @param middle_name [String, nil] - # # @param phone_numbers [Array, nil] - # # @param preferred_name [String, nil] - # # @param residence [FinchAPI::Models::Location, nil] - # # @param source_id [String] - # # @param ssn [String, nil] - # # @param start_date [String, nil] - # # @param title [String, nil] - # # - # def initialize( - # class_code: nil, - # custom_fields: nil, - # department: nil, - # dob: nil, - # emails: nil, - # employment: nil, - # employment_status: nil, - # encrypted_ssn: nil, - # end_date: nil, - # ethnicity: nil, - # first_name: nil, - # gender: nil, - # income: nil, - # income_history: nil, - # is_active: nil, - # last_name: nil, - # latest_rehire_date: nil, - # location: nil, - # manager: nil, - # middle_name: nil, - # phone_numbers: nil, - # preferred_name: nil, - # residence: nil, - # source_id: nil, - # ssn: nil, - # start_date: nil, - # title: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(class_code: nil, custom_fields: nil, department: nil, dob: nil, emails: nil, employment: nil, employment_status: nil, encrypted_ssn: nil, end_date: nil, ethnicity: nil, first_name: nil, gender: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, source_id: nil, ssn: nil, start_date: nil, title: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::DirectoryCreateParams::Body} for more details. + # + # @param class_code [String, nil] Worker's compensation classification code for this employee + # + # @param custom_fields [Array] Custom fields for the individual. These are fields which are defined by the empl + # ... + # + # @param department [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Department, nil] The department object. + # + # @param dob [String, nil] + # + # @param emails [Array, nil] + # + # @param employment [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment, nil] The employment object. + # + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus, nil] The detailed employment status of the individual. + # + # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is + # ... + # + # @param end_date [String, nil] + # + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param gender [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender, nil] The gender of the individual. + # + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual + # ... + # + # @param income_history [Array, nil] The array of income history. + # + # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param latest_rehire_date [String, nil] + # + # @param location [FinchAPI::Models::Location, nil] + # + # @param manager [FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Manager, nil] The manager object representing the manager of the individual within the org. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param phone_numbers [Array, nil] + # + # @param preferred_name [String, nil] The preferred name of the individual. + # + # @param residence [FinchAPI::Models::Location, nil] + # + # @param source_id [String] The source system's unique employment identifier for this individual + # + # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the + # ... + # + # @param start_date [String, nil] + # + # @param title [String, nil] The current title of the individual. class CustomField < FinchAPI::Internal::Type::BaseModel # @!attribute name @@ -286,22 +272,14 @@ class CustomField < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!attribute [r] value + # @!attribute value # # @return [Object, nil] optional :value, FinchAPI::Internal::Type::Unknown - # @!parse - # # @return [Object] - # attr_writer :value - - # @!parse - # # @param name [String, nil] - # # @param value [Object] - # # - # def initialize(name: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, value: nil) + # @param name [String, nil] + # @param value [Object] end # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#department @@ -312,26 +290,18 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The department object. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The department object. + # + # @param name [String, nil] The name of the department associated with the individual. end class Email < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # # @return [String, nil] optional :data, String - # @!parse - # # @return [String] - # attr_writer :data - # @!attribute type # # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] @@ -339,13 +309,9 @@ class Email < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type }, nil?: true - # @!parse - # # @param data [String] - # # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [String] + # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type, nil] # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email#type module Type @@ -354,11 +320,8 @@ module Type WORK = :work PERSONAL = :personal - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -381,15 +344,17 @@ class Employment < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type }, nil?: true - # @!parse - # # The employment object. - # # - # # @param subtype [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment} for more + # details. + # + # The employment object. + # + # @param subtype [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_ti + # ... + # + # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. @@ -405,11 +370,8 @@ module Subtype SEASONAL = :seasonal INDIVIDUAL_CONTRACTOR = :individual_contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The main employment type of the individual. @@ -421,11 +383,8 @@ module Type EMPLOYEE = :employee CONTRACTOR = :contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -443,11 +402,8 @@ module EmploymentStatus RETIRED = :retired TERMINATED = :terminated - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The EEOC-defined ethnicity of the individual. @@ -465,11 +421,8 @@ module Ethnicity TWO_OR_MORE_RACES = :two_or_more_races DECLINE_TO_SPECIFY = :decline_to_specify - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The gender of the individual. @@ -483,33 +436,22 @@ module Gender OTHER = :other DECLINE_TO_SPECIFY = :decline_to_specify - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#manager class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!parse - # # The manager object representing the manager of the individual within the org. - # # - # # @param id [String] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # The manager object representing the manager of the individual within the org. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. end class PhoneNumber < FinchAPI::Internal::Type::BaseModel @@ -525,13 +467,9 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type }, nil?: true - # @!parse - # # @param data [String, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [String, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type, nil] # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber#type module Type @@ -540,11 +478,8 @@ module Type WORK = :work PERSONAL = :personal - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/directory_create_response.rb b/lib/finch_api/models/sandbox/directory_create_response.rb index 94ded54a..79740f6c 100644 --- a/lib/finch_api/models/sandbox/directory_create_response.rb +++ b/lib/finch_api/models/sandbox/directory_create_response.rb @@ -3,6 +3,7 @@ module FinchAPI module Models module Sandbox + # @type [FinchAPI::Internal::Type::Converter] DirectoryCreateResponse = FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown] end end diff --git a/lib/finch_api/models/sandbox/employment_update_params.rb b/lib/finch_api/models/sandbox/employment_update_params.rb index 97110833..e8322374 100644 --- a/lib/finch_api/models/sandbox/employment_update_params.rb +++ b/lib/finch_api/models/sandbox/employment_update_params.rb @@ -5,8 +5,7 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Employment#update class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute class_code @@ -15,7 +14,7 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :class_code, String, nil?: true - # @!attribute [r] custom_fields + # @!attribute custom_fields # Custom fields for the individual. These are fields which are defined by the # employer in the system. Custom fields are not currently supported for assisted # connections. @@ -24,10 +23,6 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel optional :custom_fields, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::Sandbox::EmploymentUpdateParams::CustomField] } - # @!parse - # # @return [Array] - # attr_writer :custom_fields - # @!attribute department # The department object. # @@ -109,16 +104,12 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :middle_name, String, nil?: true - # @!attribute [r] source_id + # @!attribute source_id # The source system's unique employment identifier for this individual # # @return [String, nil] optional :source_id, String - # @!parse - # # @return [String] - # attr_writer :source_id - # @!attribute start_date # # @return [String, nil] @@ -130,53 +121,49 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!parse - # # @param class_code [String, nil] - # # @param custom_fields [Array] - # # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] - # # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] - # # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] - # # @param end_date [String, nil] - # # @param first_name [String, nil] - # # @param income [FinchAPI::Models::Income, nil] - # # @param income_history [Array, nil] - # # @param is_active [Boolean, nil] - # # @param last_name [String, nil] - # # @param latest_rehire_date [String, nil] - # # @param location [FinchAPI::Models::Location, nil] - # # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] - # # @param middle_name [String, nil] - # # @param source_id [String] - # # @param start_date [String, nil] - # # @param title [String, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize( - # 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, - # latest_rehire_date: nil, - # location: nil, - # manager: nil, - # middle_name: nil, - # source_id: nil, - # start_date: nil, - # title: nil, - # request_options: {}, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(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, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::EmploymentUpdateParams} for more details. + # + # @param class_code [String, nil] Worker's compensation classification code for this employee + # + # @param custom_fields [Array] Custom fields for the individual. These are fields which are defined by the empl + # ... + # + # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] The department object. + # + # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] The employment object. + # + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] The detailed employment status of the individual. + # + # @param end_date [String, nil] + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual + # ... + # + # @param income_history [Array, nil] The array of income history. + # + # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param latest_rehire_date [String, nil] + # + # @param location [FinchAPI::Models::Location, nil] + # + # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] The manager object representing the manager of the individual within the org. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param source_id [String] The source system's unique employment identifier for this individual + # + # @param start_date [String, nil] + # + # @param title [String, nil] The current title of the individual. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class CustomField < FinchAPI::Internal::Type::BaseModel # @!attribute name @@ -184,22 +171,14 @@ class CustomField < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!attribute [r] value + # @!attribute value # # @return [Object, nil] optional :value, FinchAPI::Internal::Type::Unknown - # @!parse - # # @return [Object] - # attr_writer :value - - # @!parse - # # @param name [String, nil] - # # @param value [Object] - # # - # def initialize(name: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, value: nil) + # @param name [String, nil] + # @param value [Object] end class Department < FinchAPI::Internal::Type::BaseModel @@ -209,14 +188,10 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The department object. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The department object. + # + # @param name [String, nil] The name of the department associated with the individual. end class Employment < FinchAPI::Internal::Type::BaseModel @@ -237,15 +212,17 @@ class Employment < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type }, nil?: true - # @!parse - # # The employment object. - # # - # # @param subtype [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment} for more + # details. + # + # The employment object. + # + # @param subtype [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_ti + # ... + # + # @param type [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. @@ -261,11 +238,8 @@ module Subtype SEASONAL = :seasonal INDIVIDUAL_CONTRACTOR = :individual_contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The main employment type of the individual. @@ -277,11 +251,8 @@ module Type EMPLOYEE = :employee CONTRACTOR = :contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -297,32 +268,21 @@ module EmploymentStatus RETIRED = :retired TERMINATED = :terminated - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!parse - # # The manager object representing the manager of the individual within the org. - # # - # # @param id [String] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # The manager object representing the manager of the individual within the org. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. end end end diff --git a/lib/finch_api/models/sandbox/employment_update_response.rb b/lib/finch_api/models/sandbox/employment_update_response.rb index 955c2c56..82d6aa85 100644 --- a/lib/finch_api/models/sandbox/employment_update_response.rb +++ b/lib/finch_api/models/sandbox/employment_update_response.rb @@ -5,23 +5,19 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Employment#update class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - # @!attribute class_code # Worker's compensation classification code for this employee # # @return [String, nil] optional :class_code, String, nil?: true - # @!attribute [r] custom_fields + # @!attribute custom_fields # Custom fields for the individual. These are fields which are defined by the # employer in the system. Custom fields are not currently supported for assisted # connections. @@ -30,10 +26,6 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel optional :custom_fields, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::Sandbox::EmploymentUpdateResponse::CustomField] } - # @!parse - # # @return [Array] - # attr_writer :custom_fields - # @!attribute department # The department object. # @@ -115,16 +107,12 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :middle_name, String, nil?: true - # @!attribute [r] source_id + # @!attribute source_id # The source system's unique employment identifier for this individual # # @return [String, nil] optional :source_id, String - # @!parse - # # @return [String] - # attr_writer :source_id - # @!attribute start_date # # @return [String, nil] @@ -136,53 +124,49 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!parse - # # @param id [String] - # # @param class_code [String, nil] - # # @param custom_fields [Array] - # # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Department, nil] - # # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment, nil] - # # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::EmploymentStatus, nil] - # # @param end_date [String, nil] - # # @param first_name [String, nil] - # # @param income [FinchAPI::Models::Income, nil] - # # @param income_history [Array, nil] - # # @param is_active [Boolean, nil] - # # @param last_name [String, nil] - # # @param latest_rehire_date [String, nil] - # # @param location [FinchAPI::Models::Location, nil] - # # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Manager, nil] - # # @param middle_name [String, nil] - # # @param source_id [String] - # # @param start_date [String, nil] - # # @param title [String, nil] - # # - # def 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, - # latest_rehire_date: nil, - # location: nil, - # manager: nil, - # middle_name: nil, - # source_id: nil, - # start_date: nil, - # title: nil, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::EmploymentUpdateResponse} for more details. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. + # + # @param class_code [String, nil] Worker's compensation classification code for this employee + # + # @param custom_fields [Array] Custom fields for the individual. These are fields which are defined by the empl + # ... + # + # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Department, nil] The department object. + # + # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment, nil] The employment object. + # + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::EmploymentStatus, nil] The detailed employment status of the individual. + # + # @param end_date [String, nil] + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual + # ... + # + # @param income_history [Array, nil] The array of income history. + # + # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param latest_rehire_date [String, nil] + # + # @param location [FinchAPI::Models::Location, nil] + # + # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Manager, nil] The manager object representing the manager of the individual within the org. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param source_id [String] The source system's unique employment identifier for this individual + # + # @param start_date [String, nil] + # + # @param title [String, nil] The current title of the individual. class CustomField < FinchAPI::Internal::Type::BaseModel # @!attribute name @@ -190,22 +174,14 @@ class CustomField < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!attribute [r] value + # @!attribute value # # @return [Object, nil] optional :value, FinchAPI::Internal::Type::Unknown - # @!parse - # # @return [Object] - # attr_writer :value - - # @!parse - # # @param name [String, nil] - # # @param value [Object] - # # - # def initialize(name: nil, value: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil, value: nil) + # @param name [String, nil] + # @param value [Object] end # @see FinchAPI::Models::Sandbox::EmploymentUpdateResponse#department @@ -216,14 +192,10 @@ class Department < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!parse - # # The department object. - # # - # # @param name [String, nil] - # # - # def initialize(name: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(name: nil) + # The department object. + # + # @param name [String, nil] The name of the department associated with the individual. end # @see FinchAPI::Models::Sandbox::EmploymentUpdateResponse#employment @@ -245,15 +217,17 @@ class Employment < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Type }, nil?: true - # @!parse - # # The employment object. - # # - # # @param subtype [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Subtype, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Type, nil] - # # - # def initialize(subtype: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(subtype: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment} for more + # details. + # + # The employment object. + # + # @param subtype [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_ti + # ... + # + # @param type [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. @@ -269,11 +243,8 @@ module Subtype SEASONAL = :seasonal INDIVIDUAL_CONTRACTOR = :individual_contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The main employment type of the individual. @@ -285,11 +256,8 @@ module Type EMPLOYEE = :employee CONTRACTOR = :contractor - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -307,33 +275,22 @@ module EmploymentStatus RETIRED = :retired TERMINATED = :terminated - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::Sandbox::EmploymentUpdateResponse#manager class Manager < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - - # @!parse - # # The manager object representing the manager of the individual within the org. - # # - # # @param id [String] - # # - # def initialize(id: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(id: nil) + # The manager object representing the manager of the individual within the org. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. end end end diff --git a/lib/finch_api/models/sandbox/individual_update_params.rb b/lib/finch_api/models/sandbox/individual_update_params.rb index 3a70752e..242355c6 100644 --- a/lib/finch_api/models/sandbox/individual_update_params.rb +++ b/lib/finch_api/models/sandbox/individual_update_params.rb @@ -5,8 +5,7 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Individual#update class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute dob @@ -86,64 +85,52 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :ssn, String, nil?: true - # @!parse - # # @param dob [String, nil] - # # @param emails [Array, nil] - # # @param encrypted_ssn [String, nil] - # # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] - # # @param first_name [String, nil] - # # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] - # # @param last_name [String, nil] - # # @param middle_name [String, nil] - # # @param phone_numbers [Array, nil] - # # @param preferred_name [String, nil] - # # @param residence [FinchAPI::Models::Location, nil] - # # @param ssn [String, nil] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize( - # 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, - # request_options: {}, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(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, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::IndividualUpdateParams} for more details. + # + # @param dob [String, nil] + # + # @param emails [Array, nil] + # + # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is + # ... + # + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] The gender of the individual. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param phone_numbers [Array, nil] + # + # @param preferred_name [String, nil] The preferred name of the individual. + # + # @param residence [FinchAPI::Models::Location, nil] + # + # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the + # ... + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class Email < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # # @return [String, nil] optional :data, String - # @!parse - # # @return [String] - # attr_writer :data - # @!attribute type # # @return [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type, nil] optional :type, enum: -> { FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type }, nil?: true - # @!parse - # # @param data [String] - # # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [String] + # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type, nil] # @see FinchAPI::Models::Sandbox::IndividualUpdateParams::Email#type module Type @@ -152,11 +139,8 @@ module Type WORK = :work PERSONAL = :personal - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -173,11 +157,8 @@ module Ethnicity TWO_OR_MORE_RACES = :two_or_more_races DECLINE_TO_SPECIFY = :decline_to_specify - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The gender of the individual. @@ -189,11 +170,8 @@ module Gender OTHER = :other DECLINE_TO_SPECIFY = :decline_to_specify - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class PhoneNumber < FinchAPI::Internal::Type::BaseModel @@ -209,13 +187,9 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type }, nil?: true - # @!parse - # # @param data [String, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [String, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type, nil] # @see FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber#type module Type @@ -224,11 +198,8 @@ module Type WORK = :work PERSONAL = :personal - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/individual_update_response.rb b/lib/finch_api/models/sandbox/individual_update_response.rb index 97770ced..cdc36aaa 100644 --- a/lib/finch_api/models/sandbox/individual_update_response.rb +++ b/lib/finch_api/models/sandbox/individual_update_response.rb @@ -5,16 +5,12 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Individual#update class IndividualUpdateResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] id + # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String, nil] optional :id, String - # @!parse - # # @return [String] - # attr_writer :id - # @!attribute dob # # @return [String, nil] @@ -94,64 +90,52 @@ class IndividualUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :ssn, String, nil?: true - # @!parse - # # @param id [String] - # # @param dob [String, nil] - # # @param emails [Array, nil] - # # @param encrypted_ssn [String, nil] - # # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Ethnicity, nil] - # # @param first_name [String, nil] - # # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Gender, nil] - # # @param last_name [String, nil] - # # @param middle_name [String, nil] - # # @param phone_numbers [Array, nil] - # # @param preferred_name [String, nil] - # # @param residence [FinchAPI::Models::Location, nil] - # # @param ssn [String, nil] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!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) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::IndividualUpdateResponse} for more details. + # + # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. + # + # @param dob [String, nil] + # + # @param emails [Array, nil] + # + # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is + # ... + # + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Gender, nil] The gender of the individual. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param phone_numbers [Array, nil] + # + # @param preferred_name [String, nil] The preferred name of the individual. + # + # @param residence [FinchAPI::Models::Location, nil] + # + # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the + # ... class Email < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] data + # @!attribute data # # @return [String, nil] optional :data, String - # @!parse - # # @return [String] - # attr_writer :data - # @!attribute type # # @return [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type, nil] optional :type, enum: -> { FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type }, nil?: true - # @!parse - # # @param data [String] - # # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [String] + # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type, nil] # @see FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email#type module Type @@ -160,11 +144,8 @@ module Type WORK = :work PERSONAL = :personal - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -183,11 +164,8 @@ module Ethnicity TWO_OR_MORE_RACES = :two_or_more_races DECLINE_TO_SPECIFY = :decline_to_specify - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # The gender of the individual. @@ -201,11 +179,8 @@ module Gender OTHER = :other DECLINE_TO_SPECIFY = :decline_to_specify - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class PhoneNumber < FinchAPI::Internal::Type::BaseModel @@ -221,13 +196,9 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::Type }, nil?: true - # @!parse - # # @param data [String, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::Type, nil] - # # - # def initialize(data: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(data: nil, type: nil) + # @param data [String, nil] + # @param type [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::Type, nil] # @see FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber#type module Type @@ -236,11 +207,8 @@ module Type WORK = :work PERSONAL = :personal - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/job_create_params.rb b/lib/finch_api/models/sandbox/job_create_params.rb index 279c51fb..dd8669dc 100644 --- a/lib/finch_api/models/sandbox/job_create_params.rb +++ b/lib/finch_api/models/sandbox/job_create_params.rb @@ -5,8 +5,7 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Jobs#create class JobCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters # @!attribute type @@ -15,13 +14,10 @@ class JobCreateParams < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] required :type, enum: -> { FinchAPI::Models::Sandbox::JobCreateParams::Type } - # @!parse - # # @param type [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(type:, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(type:, request_options: {}) + # @param type [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] The type of job to start. Currently the only supported type is `data_sync_all` + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] # The type of job to start. Currently the only supported type is `data_sync_all` module Type @@ -29,11 +25,8 @@ module Type DATA_SYNC_ALL = :data_sync_all - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/job_create_response.rb b/lib/finch_api/models/sandbox/job_create_response.rb index 15c1f2bf..42a5c417 100644 --- a/lib/finch_api/models/sandbox/job_create_response.rb +++ b/lib/finch_api/models/sandbox/job_create_response.rb @@ -29,15 +29,14 @@ class JobCreateResponse < FinchAPI::Internal::Type::BaseModel # @return [Integer] required :remaining_refreshes, Integer - # @!parse - # # @param allowed_refreshes [Integer] - # # @param job_id [String] - # # @param job_url [String] - # # @param remaining_refreshes [Integer] - # # - # def initialize(allowed_refreshes:, job_id:, job_url:, remaining_refreshes:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(allowed_refreshes:, job_id:, job_url:, remaining_refreshes:) + # @param allowed_refreshes [Integer] The number of allowed refreshes per hour (per hour, fixed window) + # + # @param job_id [String] The id of the job that has been created. + # + # @param job_url [String] The url that can be used to retrieve the job status + # + # @param remaining_refreshes [Integer] The number of remaining refreshes available (per hour, fixed window) end end end diff --git a/lib/finch_api/models/sandbox/jobs/configuration_retrieve_params.rb b/lib/finch_api/models/sandbox/jobs/configuration_retrieve_params.rb index 217d2114..1fb7e83c 100644 --- a/lib/finch_api/models/sandbox/jobs/configuration_retrieve_params.rb +++ b/lib/finch_api/models/sandbox/jobs/configuration_retrieve_params.rb @@ -6,16 +6,11 @@ module Sandbox module Jobs # @see FinchAPI::Resources::Sandbox::Jobs::Configuration#retrieve class ConfigurationRetrieveParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/sandbox/jobs/configuration_retrieve_response.rb b/lib/finch_api/models/sandbox/jobs/configuration_retrieve_response.rb index 874348c7..ab09268c 100644 --- a/lib/finch_api/models/sandbox/jobs/configuration_retrieve_response.rb +++ b/lib/finch_api/models/sandbox/jobs/configuration_retrieve_response.rb @@ -4,6 +4,7 @@ module FinchAPI module Models module Sandbox module Jobs + # @type [FinchAPI::Internal::Type::Converter] ConfigurationRetrieveResponse = FinchAPI::Internal::Type::ArrayOf[-> { FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration }] end diff --git a/lib/finch_api/models/sandbox/jobs/configuration_update_params.rb b/lib/finch_api/models/sandbox/jobs/configuration_update_params.rb index 06d8cbcc..aa330f52 100644 --- a/lib/finch_api/models/sandbox/jobs/configuration_update_params.rb +++ b/lib/finch_api/models/sandbox/jobs/configuration_update_params.rb @@ -6,16 +6,11 @@ module Sandbox module Jobs # @see FinchAPI::Resources::Sandbox::Jobs::Configuration#update class ConfigurationUpdateParams < FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!parse - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(request_options: {}) + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end end diff --git a/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb b/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb index 33678927..5be58d24 100644 --- a/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb +++ b/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rb @@ -17,13 +17,9 @@ class SandboxJobConfiguration < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type] required :type, enum: -> { FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type } - # @!parse - # # @param completion_status [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] - # # @param type [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type] - # # - # def initialize(completion_status:, type:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(completion_status:, type:) + # @param completion_status [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus] + # @param type [Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type] # @see FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration#completion_status module CompletionStatus @@ -34,11 +30,8 @@ module CompletionStatus PERMISSIONS_ERROR = :permissions_error ERROR = :error - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end # @see FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration#type @@ -47,11 +40,8 @@ module Type DATA_SYNC_ALL = :data_sync_all - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/payment_create_params.rb b/lib/finch_api/models/sandbox/payment_create_params.rb index f8eed62a..2ee13453 100644 --- a/lib/finch_api/models/sandbox/payment_create_params.rb +++ b/lib/finch_api/models/sandbox/payment_create_params.rb @@ -5,47 +5,30 @@ module Models module Sandbox # @see FinchAPI::Resources::Sandbox::Payment#create class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel - # @!parse - # extend FinchAPI::Internal::Type::RequestParameters::Converter + extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute [r] end_date + # @!attribute end_date # # @return [String, nil] optional :end_date, String - # @!parse - # # @return [String] - # attr_writer :end_date - - # @!attribute [r] pay_statements + # @!attribute pay_statements # # @return [Array, nil] optional :pay_statements, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement] } - # @!parse - # # @return [Array] - # attr_writer :pay_statements - - # @!attribute [r] start_date + # @!attribute start_date # # @return [String, nil] optional :start_date, String - # @!parse - # # @return [String] - # attr_writer :start_date - - # @!parse - # # @param end_date [String] - # # @param pay_statements [Array] - # # @param start_date [String] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # # - # def initialize(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(end_date: nil, pay_statements: nil, start_date: nil, request_options: {}) + # @param end_date [String] + # @param pay_statements [Array] + # @param start_date [String] + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute earnings @@ -76,16 +59,12 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::Money, nil] optional :gross_pay, -> { FinchAPI::Models::Money }, nil?: true - # @!attribute [r] individual_id + # @!attribute individual_id # A stable Finch `id` (UUID v4) for an individual in the company # # @return [String, nil] optional :individual_id, String - # @!parse - # # @return [String] - # attr_writer :individual_id - # @!attribute net_pay # # @return [FinchAPI::Models::Money, nil] @@ -121,35 +100,26 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type }, nil?: true - # @!parse - # # @param earnings [Array, nil] - # # @param employee_deductions [Array, nil] - # # @param employer_contributions [Array, nil] - # # @param gross_pay [FinchAPI::Models::Money, nil] - # # @param individual_id [String] - # # @param net_pay [FinchAPI::Models::Money, nil] - # # @param payment_method [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] - # # @param taxes [Array, nil] - # # @param total_hours [Float, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] - # # - # def 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, - # ** - # ) - # super - # end - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(earnings: nil, employee_deductions: nil, employer_contributions: nil, gross_pay: nil, individual_id: nil, net_pay: nil, payment_method: nil, taxes: nil, total_hours: nil, type: nil) + # @param earnings [Array, nil] The array of earnings objects associated with this pay statement + # + # @param employee_deductions [Array, nil] The array of deductions objects associated with this pay statement. + # + # @param employer_contributions [Array, nil] + # + # @param gross_pay [FinchAPI::Models::Money, nil] + # + # @param individual_id [String] A stable Finch `id` (UUID v4) for an individual in the company + # + # @param net_pay [FinchAPI::Models::Money, nil] + # + # @param payment_method [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod, nil] The payment method. + # + # @param taxes [Array, nil] The array of taxes objects associated with this pay statement. + # + # @param total_hours [Float, nil] The number of hours worked for this pay period + # + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type, nil] The type of the payment associated with the pay statement. class Earning < FinchAPI::Internal::Type::BaseModel # @!attribute amount @@ -192,40 +162,38 @@ class Earning < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] - # # @param currency [String, nil] - # # @param hours [Float, nil] - # # @param name [String, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning} for more + # details. + # + # @param amount [Integer, nil] The earnings amount in cents. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes, nil] + # + # @param currency [String, nil] The earnings currency code. + # + # @param hours [Float, nil] The number of hours associated with this earning. (For salaried employees, this + # ... + # + # @param name [String, nil] The exact name of the deduction from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type, nil] The type of earning. # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -233,16 +201,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Attributes::Metadata} + # for more details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end @@ -266,11 +231,8 @@ module Type TYPE_1099 = :"1099" OTHER = :other - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -312,40 +274,33 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitType }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] - # # @param currency [String, nil] - # # @param name [String, nil] - # # @param pre_tax [Boolean, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil) + # @param amount [Integer, nil] The deduction amount in cents. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes, nil] + # + # @param currency [String, nil] The deduction currency. + # + # @param name [String, nil] The deduction name from the pay statement. + # + # @param pre_tax [Boolean, nil] Boolean indicating if the deduction is pre-tax. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -353,16 +308,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Attributes::Metadata} + # for more details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end end @@ -399,39 +351,31 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] optional :type, enum: -> { FinchAPI::Models::HRIS::BenefitType }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] - # # @param currency [String, nil] - # # @param name [String, nil] - # # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, name: nil, type: nil) + # @param amount [Integer, nil] The contribution amount in cents. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes, nil] + # + # @param currency [String, nil] The contribution currency. + # + # @param name [String, nil] The contribution name from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -439,16 +383,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Attributes::Metadata} + # for more details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end end @@ -462,11 +403,8 @@ module PaymentMethod CHECK = :check DIRECT_DEPOSIT = :direct_deposit - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end class Tax < FinchAPI::Internal::Type::BaseModel @@ -509,40 +447,33 @@ class Tax < FinchAPI::Internal::Type::BaseModel enum: -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type }, nil?: true - # @!parse - # # @param amount [Integer, nil] - # # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] - # # @param currency [String, nil] - # # @param employer [Boolean, nil] - # # @param name [String, nil] - # # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] - # # - # def initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) + # @param amount [Integer, nil] The tax amount in cents. + # + # @param attributes [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes, nil] + # + # @param currency [String, nil] The currency code. + # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. + # + # @param name [String, nil] The exact name of tax from the pay statement. + # + # @param type [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type, nil] The type of taxes. # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax#attributes class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata, nil] optional :metadata, -> { FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata } - # @!parse - # # @return [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] - # attr_writer :metadata - - # @!parse - # # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # @param metadata [FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata] # @see FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes#metadata class Metadata < FinchAPI::Internal::Type::BaseModel - # @!attribute [r] metadata + # @!attribute metadata # The metadata to be attached to the entity by existing rules. It is a key-value # pairs where the values can be of any type (string, number, boolean, object, # array, etc.). @@ -550,16 +481,13 @@ class Metadata < FinchAPI::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - # @!parse - # # @return [Hash{Symbol=>Object}] - # attr_writer :metadata - - # @!parse - # # @param metadata [Hash{Symbol=>Object}] - # # - # def initialize(metadata: nil, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Attributes::Metadata} + # for more details. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached to the entity by existing rules. It is a key-value p + # ... end end @@ -574,11 +502,8 @@ module Type LOCAL = :local FICA = :fica - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end @@ -592,11 +517,8 @@ module Type OFF_CYCLE_PAYROLL = :off_cycle_payroll ONE_TIME_PAYMENT = :one_time_payment - finalize! - - # @!parse - # # @return [Array] - # def self.values; end + # @!method self.values + # @return [Array] end end end diff --git a/lib/finch_api/models/sandbox/payment_create_response.rb b/lib/finch_api/models/sandbox/payment_create_response.rb index e7359edf..417194c5 100644 --- a/lib/finch_api/models/sandbox/payment_create_response.rb +++ b/lib/finch_api/models/sandbox/payment_create_response.rb @@ -17,13 +17,10 @@ class PaymentCreateResponse < FinchAPI::Internal::Type::BaseModel # @return [String] required :payment_id, String - # @!parse - # # @param pay_date [String] - # # @param payment_id [String] - # # - # def initialize(pay_date:, payment_id:, **) = super - - # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void + # @!method initialize(pay_date:, payment_id:) + # @param pay_date [String] The date of the payment. + # + # @param payment_id [String] The ID of the payment. end end end diff --git a/lib/finch_api/models/webhook_event.rb b/lib/finch_api/models/webhook_event.rb index 96650689..5a8f9d4a 100644 --- a/lib/finch_api/models/webhook_event.rb +++ b/lib/finch_api/models/webhook_event.rb @@ -23,9 +23,8 @@ module WebhookEvent variant -> { FinchAPI::Models::PayStatementEvent } - # @!parse - # # @return [Array(FinchAPI::Models::AccountUpdateEvent, FinchAPI::Models::CompanyEvent, FinchAPI::Models::JobCompletionEvent, FinchAPI::Models::DirectoryEvent, FinchAPI::Models::EmploymentEvent, FinchAPI::Models::IndividualEvent, FinchAPI::Models::PaymentEvent, FinchAPI::Models::PayStatementEvent)] - # def self.variants; end + # @!method self.variants + # @return [Array(FinchAPI::Models::AccountUpdateEvent, FinchAPI::Models::CompanyEvent, FinchAPI::Models::JobCompletionEvent, FinchAPI::Models::DirectoryEvent, FinchAPI::Models::EmploymentEvent, FinchAPI::Models::IndividualEvent, FinchAPI::Models::PaymentEvent, FinchAPI::Models::PayStatementEvent)] end end end diff --git a/lib/finch_api/request_options.rb b/lib/finch_api/request_options.rb index df8b9c7e..31804441 100644 --- a/lib/finch_api/request_options.rb +++ b/lib/finch_api/request_options.rb @@ -65,11 +65,9 @@ def self.validate!(opts) # @return [Float, nil] optional :timeout, Float - # @!parse - # # Returns a new instance of RequestOptions. - # # - # # @param values [Hash{Symbol=>Object}] - # # - # def initialize(values = {}) = super + # @!method initialize(values = {}) + # Returns a new instance of RequestOptions. + # + # @param values [Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/resources/connect/sessions.rb b/lib/finch_api/resources/connect/sessions.rb index a02bc17b..158b2e18 100644 --- a/lib/finch_api/resources/connect/sessions.rb +++ b/lib/finch_api/resources/connect/sessions.rb @@ -4,19 +4,32 @@ module FinchAPI module Resources class Connect class Sessions + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Connect::SessionNewParams} for more details. + # # 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: {}) # # @param customer_id [String] + # # @param customer_name [String] + # # @param products [Array] + # # @param customer_email [String, nil] + # # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] + # # @param manual [Boolean, nil] - # @param minutes_to_expire [Float, nil] + # + # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 43,200, which is 30 + # ... + # # @param redirect_uri [String, nil] + # # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Connect::SessionNewResponse] @@ -33,14 +46,22 @@ def new(params) ) end + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Connect::SessionReauthenticateParams} for more details. + # # 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: {}) # - # @param connection_id [String] - # @param minutes_to_expire [Integer, nil] - # @param products [Array, nil] - # @param redirect_uri [String, nil] + # @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 products [Array, nil] The products to request access to (optional for reauthentication) + # + # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Connect::SessionReauthenticateResponse] diff --git a/lib/finch_api/resources/hris/benefits.rb b/lib/finch_api/resources/hris/benefits.rb index e44d8d4d..03243f9b 100644 --- a/lib/finch_api/resources/hris/benefits.rb +++ b/lib/finch_api/resources/hris/benefits.rb @@ -7,14 +7,23 @@ class Benefits # @return [FinchAPI::Resources::HRIS::Benefits::Individuals] attr_reader :individuals + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::BenefitCreateParams} for more details. + # # Creates a new company-wide deduction or contribution. Please use the # `/providers` endpoint to view available types for each provider. # - # @overload create(description: nil, frequency: nil, type: nil, request_options: {}) + # @overload create(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 description [String] Name of the benefit as it appears in the provider and pay statements. Recommend + # ... + # + # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution. + # + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit. # - # @param description [String] - # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::CreateCompanyBenefitsResponse] @@ -55,7 +64,9 @@ def retrieve(benefit_id, params = {}) # @overload update(benefit_id, description: nil, request_options: {}) # # @param benefit_id [String] - # @param description [String] + # + # @param description [String] Updated name or description. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::UpdateCompanyBenefitResponse] diff --git a/lib/finch_api/resources/hris/benefits/individuals.rb b/lib/finch_api/resources/hris/benefits/individuals.rb index 1979f3f3..92e713a6 100644 --- a/lib/finch_api/resources/hris/benefits/individuals.rb +++ b/lib/finch_api/resources/hris/benefits/individuals.rb @@ -13,7 +13,9 @@ class Individuals # @overload enroll_many(benefit_id, individuals: nil, request_options: {}) # # @param benefit_id [String] - # @param individuals [Array] + # + # @param individuals [Array] Array of the individual_id to enroll and a configuration object. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::Benefits::EnrolledIndividualBenefitResponse] @@ -49,12 +51,19 @@ def enrolled_ids(benefit_id, params = {}) ) end + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams} for + # more details. + # # Get enrollment information for the given individuals. # # @overload retrieve_many_benefits(benefit_id, individual_ids: nil, request_options: {}) # # @param benefit_id [String] - # @param individual_ids [String] + # + # @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] # # @return [FinchAPI::Internal::SinglePage] @@ -78,7 +87,9 @@ def retrieve_many_benefits(benefit_id, params = {}) # @overload unenroll_many(benefit_id, individual_ids: nil, request_options: {}) # # @param benefit_id [String] - # @param individual_ids [Array] + # + # @param individual_ids [Array] Array of individual_ids to unenroll. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::Benefits::UnenrolledIndividualBenefitResponse] 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 02b107df..4501ddc7 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item.rb @@ -8,17 +8,28 @@ class PayStatementItem # @return [FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules] attr_reader :rules + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Company::PayStatementItemListParams} for more details. + # # **Beta:** this endpoint currently serves employers onboarded after March 4th and # 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: {}) # - # @param categories [Array] - # @param end_date [Date] - # @param name [String] - # @param start_date [Date] - # @param type [String] + # @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 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 ( + # ... + # + # @param type [String] String search by pay statement item type. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::ResponsesPage] 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 420ff27d..aac7c66b 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb @@ -15,11 +15,16 @@ class Rules # # @overload create(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] + # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. + # # @param conditions [Array] - # @param effective_end_date [String, nil] - # @param effective_start_date [String, nil] - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse] diff --git a/lib/finch_api/resources/hris/directory.rb b/lib/finch_api/resources/hris/directory.rb index a9bc5b30..1eb9f1f6 100644 --- a/lib/finch_api/resources/hris/directory.rb +++ b/lib/finch_api/resources/hris/directory.rb @@ -8,8 +8,10 @@ class Directory # # @overload list(limit: nil, offset: nil, request_options: {}) # - # @param limit [Integer] - # @param offset [Integer] + # @param limit [Integer] Number of employees to return (defaults to all) + # + # @param offset [Integer] Index to start from (defaults to 0) + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::IndividualsPage] diff --git a/lib/finch_api/resources/hris/documents.rb b/lib/finch_api/resources/hris/documents.rb index 5ff8f92d..f1b75120 100644 --- a/lib/finch_api/resources/hris/documents.rb +++ b/lib/finch_api/resources/hris/documents.rb @@ -4,15 +4,24 @@ module FinchAPI module Resources class HRIS class Documents + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::DocumentListParams} for more details. + # # **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: {}) # - # @param individual_ids [Array] - # @param limit [Integer] - # @param offset [Integer] - # @param types [Array] + # @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) + # + # @param offset [Integer] Index to start from (defaults to 0) + # + # @param types [Array] Comma-delimited list of document types to filter on. If empty, defaults to all t + # ... + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::DocumentListResponse] @@ -34,7 +43,8 @@ def list(params = {}) # # @overload retreive(document_id, request_options: {}) # - # @param document_id [String] + # @param document_id [String] The unique identifier of the document. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005] diff --git a/lib/finch_api/resources/hris/employments.rb b/lib/finch_api/resources/hris/employments.rb index dc70cec9..61253061 100644 --- a/lib/finch_api/resources/hris/employments.rb +++ b/lib/finch_api/resources/hris/employments.rb @@ -8,7 +8,8 @@ class Employments # # @overload retrieve_many(requests:, request_options: {}) # - # @param requests [Array] + # @param requests [Array] The array of batch requests. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::ResponsesPage] diff --git a/lib/finch_api/resources/hris/pay_statements.rb b/lib/finch_api/resources/hris/pay_statements.rb index c76827de..6ef7c846 100644 --- a/lib/finch_api/resources/hris/pay_statements.rb +++ b/lib/finch_api/resources/hris/pay_statements.rb @@ -11,7 +11,8 @@ class PayStatements # # @overload retrieve_many(requests:, request_options: {}) # - # @param requests [Array] + # @param requests [Array] The array of batch requests. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::ResponsesPage] diff --git a/lib/finch_api/resources/hris/payments.rb b/lib/finch_api/resources/hris/payments.rb index 9c27d2f7..8309cb79 100644 --- a/lib/finch_api/resources/hris/payments.rb +++ b/lib/finch_api/resources/hris/payments.rb @@ -4,12 +4,19 @@ module FinchAPI module Resources class HRIS class Payments + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PaymentListParams} for more details. + # # Read payroll and contractor related payments by the company. # # @overload list(end_date:, start_date:, request_options: {}) # - # @param end_date [Date] - # @param start_date [Date] + # @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 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 17f9d8bc..be320175 100644 --- a/lib/finch_api/resources/jobs/automated.rb +++ b/lib/finch_api/resources/jobs/automated.rb @@ -21,8 +21,10 @@ class Automated # # @overload create(type:, params:, request_options: {}) # - # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] + # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] The type of job to start. + # # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::AutomatedCreateResponse] @@ -64,8 +66,10 @@ def retrieve(job_id, params = {}) # # @overload list(limit: nil, offset: nil, request_options: {}) # - # @param limit [Integer] - # @param offset [Integer] + # @param limit [Integer] Number of items to return + # + # @param offset [Integer] Index to start from (defaults to 0) + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::AutomatedListResponse] diff --git a/lib/finch_api/resources/request_forwarding.rb b/lib/finch_api/resources/request_forwarding.rb index 2b0d420d..244d606a 100644 --- a/lib/finch_api/resources/request_forwarding.rb +++ b/lib/finch_api/resources/request_forwarding.rb @@ -3,6 +3,9 @@ module FinchAPI module Resources class RequestForwarding + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::RequestForwardingForwardParams} for more details. + # # The Forward API allows you to make direct requests to an employment system. If # Finch’s unified API doesn’t have a data model that cleanly fits your needs, then # Forward allows you to push or pull data models directly against an integration’s @@ -10,11 +13,21 @@ class RequestForwarding # # @overload forward(method_:, route:, data: nil, headers: nil, params: nil, request_options: {}) # - # @param method_ [String] - # @param route [String] - # @param data [String, nil] - # @param headers [Object, nil] - # @param params [Object, nil] + # @param method_ [String] The HTTP method for the forwarded request. Valid values include: `GET` , `POST` + # ... + # + # @param route [String] The URL route path for the forwarded request. This value must begin with a forwa + # ... + # + # @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 params [Object, nil] The query parameters for the forwarded request. This value must be specified as + # ... + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::RequestForwardingForwardResponse] diff --git a/lib/finch_api/resources/sandbox/company.rb b/lib/finch_api/resources/sandbox/company.rb index 352ac149..90cbe1ed 100644 --- a/lib/finch_api/resources/sandbox/company.rb +++ b/lib/finch_api/resources/sandbox/company.rb @@ -4,18 +4,30 @@ module FinchAPI module Resources class Sandbox class Company + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::CompanyUpdateParams} for more details. + # # Update a sandbox company's data # # @overload update(accounts:, departments:, ein:, entity:, legal_name:, locations:, primary_email:, primary_phone_number:, request_options: {}) # - # @param accounts [Array, nil] - # @param departments [Array, nil] - # @param ein [String, nil] - # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] - # @param legal_name [String, nil] + # @param accounts [Array, nil] An array of bank account objects associated with the payroll/HRIS system. + # + # @param departments [Array, nil] The array of company departments. + # + # @param ein [String, nil] The employer identification number. + # + # @param entity [FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity, nil] The entity type object. + # + # @param legal_name [String, nil] The legal name of the company. + # # @param locations [Array, nil] - # @param primary_email [String, nil] - # @param primary_phone_number [String, nil] + # + # @param primary_email [String, nil] The email of the main administrator on the account. + # + # @param primary_phone_number [String, nil] The phone number of the main administrator on the account. Format: E.164, with e + # ... + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::CompanyUpdateResponse] diff --git a/lib/finch_api/resources/sandbox/connections.rb b/lib/finch_api/resources/sandbox/connections.rb index e8fbe3f5..cf6fba3e 100644 --- a/lib/finch_api/resources/sandbox/connections.rb +++ b/lib/finch_api/resources/sandbox/connections.rb @@ -7,14 +7,22 @@ class Connections # @return [FinchAPI::Resources::Sandbox::Connections::Accounts] attr_reader :accounts + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::ConnectionCreateParams} for more details. + # # Create a new connection (new company/provider pair) with a new account # # @overload create(provider_id:, authentication_type: nil, employee_size: nil, products: nil, request_options: {}) # - # @param provider_id [String] + # @param provider_id [String] The provider associated with the connection + # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType] - # @param employee_size [Integer] + # + # @param employee_size [Integer] Optional: the size of the employer to be created with this connection. Defaults + # ... + # # @param products [Array] + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::ConnectionCreateResponse] diff --git a/lib/finch_api/resources/sandbox/connections/accounts.rb b/lib/finch_api/resources/sandbox/connections/accounts.rb index ed5dec20..ac39037b 100644 --- a/lib/finch_api/resources/sandbox/connections/accounts.rb +++ b/lib/finch_api/resources/sandbox/connections/accounts.rb @@ -5,14 +5,22 @@ module Resources class Sandbox class Connections class Accounts + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::Connections::AccountCreateParams} for more details. + # # Create a new account for an existing connection (company/provider pair) # # @overload create(company_id:, provider_id:, authentication_type: nil, products: nil, request_options: {}) # # @param company_id [String] - # @param provider_id [String] + # + # @param provider_id [String] The provider associated with the `access_token` + # # @param authentication_type [Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType] - # @param products [Array] + # + # @param products [Array] Optional, defaults to Organization products (`company`, `directory`, `employment + # ... + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::Connections::AccountCreateResponse] diff --git a/lib/finch_api/resources/sandbox/directory.rb b/lib/finch_api/resources/sandbox/directory.rb index ad2da90e..3f5616c0 100644 --- a/lib/finch_api/resources/sandbox/directory.rb +++ b/lib/finch_api/resources/sandbox/directory.rb @@ -4,11 +4,16 @@ module FinchAPI module Resources class Sandbox class Directory + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::DirectoryCreateParams} for more details. + # # Add new individuals to a sandbox company # # @overload create(body: nil, request_options: {}) # - # @param body [Array] + # @param body [Array] Array of individuals to create. Takes all combined fields from `/individual` and + # ... + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Array] diff --git a/lib/finch_api/resources/sandbox/employment.rb b/lib/finch_api/resources/sandbox/employment.rb index 61152a87..8cebfdce 100644 --- a/lib/finch_api/resources/sandbox/employment.rb +++ b/lib/finch_api/resources/sandbox/employment.rb @@ -4,29 +4,53 @@ module FinchAPI module Resources class Sandbox class Employment + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::EmploymentUpdateParams} for more details. + # # Update sandbox employment # # @overload update(individual_id, 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, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) # # @param individual_id [String] - # @param class_code [String, nil] - # @param custom_fields [Array] - # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] - # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] - # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] + # + # @param class_code [String, nil] Worker's compensation classification code for this employee + # + # @param custom_fields [Array] Custom fields for the individual. These are fields which are defined by the empl + # ... + # + # @param department [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Department, nil] The department object. + # + # @param employment [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment, nil] The employment object. + # + # @param employment_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus, nil] The detailed employment status of the individual. + # # @param end_date [String, nil] - # @param first_name [String, nil] - # @param income [FinchAPI::Models::Income, nil] - # @param income_history [Array, nil] - # @param is_active [Boolean, nil] - # @param last_name [String, nil] + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual + # ... + # + # @param income_history [Array, nil] The array of income history. + # + # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. + # + # @param last_name [String, nil] The legal last name of the individual. + # # @param latest_rehire_date [String, nil] + # # @param location [FinchAPI::Models::Location, nil] - # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] - # @param middle_name [String, nil] - # @param source_id [String] + # + # @param manager [FinchAPI::Models::Sandbox::EmploymentUpdateParams::Manager, nil] The manager object representing the manager of the individual within the org. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # + # @param source_id [String] The source system's unique employment identifier for this individual + # # @param start_date [String, nil] - # @param title [String, nil] + # + # @param title [String, nil] The current title of the individual. + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::EmploymentUpdateResponse] diff --git a/lib/finch_api/resources/sandbox/individual.rb b/lib/finch_api/resources/sandbox/individual.rb index 0ad5ddeb..d35a783d 100644 --- a/lib/finch_api/resources/sandbox/individual.rb +++ b/lib/finch_api/resources/sandbox/individual.rb @@ -4,23 +4,41 @@ module FinchAPI module Resources class Sandbox class Individual + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Sandbox::IndividualUpdateParams} for more details. + # # Update sandbox individual # # @overload update(individual_id, 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, request_options: {}) # # @param individual_id [String] + # # @param dob [String, nil] + # # @param emails [Array, nil] - # @param encrypted_ssn [String, nil] - # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] - # @param first_name [String, nil] - # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] - # @param last_name [String, nil] - # @param middle_name [String, nil] + # + # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is + # ... + # + # @param ethnicity [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # + # @param first_name [String, nil] The legal first name of the individual. + # + # @param gender [Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender, nil] The gender of the individual. + # + # @param last_name [String, nil] The legal last name of the individual. + # + # @param middle_name [String, nil] The legal middle name of the individual. + # # @param phone_numbers [Array, nil] - # @param preferred_name [String, nil] + # + # @param preferred_name [String, nil] The preferred name of the individual. + # # @param residence [FinchAPI::Models::Location, nil] - # @param ssn [String, nil] + # + # @param ssn [String, nil] Social Security Number of the individual. This field is only available with the + # ... + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::IndividualUpdateResponse] diff --git a/lib/finch_api/resources/sandbox/jobs.rb b/lib/finch_api/resources/sandbox/jobs.rb index 09501e74..822ad5f2 100644 --- a/lib/finch_api/resources/sandbox/jobs.rb +++ b/lib/finch_api/resources/sandbox/jobs.rb @@ -11,7 +11,8 @@ class Jobs # # @overload create(type:, request_options: {}) # - # @param type [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] + # @param type [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] The type of job to start. Currently the only supported type is `data_sync_all` + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Sandbox::JobCreateResponse] diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index a271af28..54901568 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.12" + VERSION = "0.1.0.pre.alpha.13" end diff --git a/rbi/lib/finch_api/client.rbi b/rbi/finch_api/client.rbi similarity index 84% rename from rbi/lib/finch_api/client.rbi rename to rbi/finch_api/client.rbi index a62418dd..2033f8b4 100644 --- a/rbi/lib/finch_api/client.rbi +++ b/rbi/finch_api/client.rbi @@ -81,13 +81,14 @@ module FinchAPI # Defaults to `ENV["FINCH_CLIENT_SECRET"]` client_secret: ENV["FINCH_CLIENT_SECRET"], access_token: nil, - # Override the default base URL for the API, e.g., `"https://api.example.com/v2/"` - base_url: nil, + # Override the default base URL for the API, e.g., + # `"https://api.example.com/v2/"`. Defaults to `ENV["FINCH_BASE_URL"]` + base_url: ENV["FINCH_BASE_URL"], # Max number of retries to attempt after a failed retryable request. - max_retries: DEFAULT_MAX_RETRIES, - timeout: DEFAULT_TIMEOUT_IN_SECONDS, - initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY, - max_retry_delay: DEFAULT_MAX_RETRY_DELAY + max_retries: FinchAPI::Client::DEFAULT_MAX_RETRIES, + timeout: FinchAPI::Client::DEFAULT_TIMEOUT_IN_SECONDS, + initial_retry_delay: FinchAPI::Client::DEFAULT_INITIAL_RETRY_DELAY, + max_retry_delay: FinchAPI::Client::DEFAULT_MAX_RETRY_DELAY ); end end end diff --git a/rbi/lib/finch_api/errors.rbi b/rbi/finch_api/errors.rbi similarity index 100% rename from rbi/lib/finch_api/errors.rbi rename to rbi/finch_api/errors.rbi diff --git a/rbi/finch_api/file_part.rbi b/rbi/finch_api/file_part.rbi new file mode 100644 index 00000000..4d9108e5 --- /dev/null +++ b/rbi/finch_api/file_part.rbi @@ -0,0 +1,34 @@ +# typed: strong + +module FinchAPI + class FilePart + sig { returns(T.any(Pathname, StringIO, IO, String)) } + attr_reader :content + + sig { returns(T.nilable(String)) } + attr_reader :content_type + + sig { returns(T.nilable(String)) } + attr_reader :filename + + # @api private + sig { returns(String) } + private def read; end + + sig { params(a: T.anything).returns(String) } + def to_json(*a); end + + sig { params(a: T.anything).returns(String) } + def to_yaml(*a); end + + sig do + params( + content: T.any(Pathname, StringIO, IO, String), + filename: T.nilable(String), + content_type: T.nilable(String) + ) + .returns(T.attached_class) + end + def self.new(content, filename: nil, content_type: nil); end + end +end diff --git a/rbi/lib/finch_api/internal.rbi b/rbi/finch_api/internal.rbi similarity index 81% rename from rbi/lib/finch_api/internal.rbi rename to rbi/finch_api/internal.rbi index cf92b7f1..1ee4ba64 100644 --- a/rbi/lib/finch_api/internal.rbi +++ b/rbi/finch_api/internal.rbi @@ -1,12 +1,11 @@ # typed: strong module FinchAPI - # @api private module Internal # Due to the current WIP status of Shapes support in Sorbet, types referencing # this alias might be refined in the future. AnyHash = T.type_alias { T::Hash[Symbol, T.anything] } - OMIT = T.let(T.anything, T.anything) + OMIT = T.let(Object.new.freeze, T.anything) end end diff --git a/rbi/lib/finch_api/internal/individuals_page.rbi b/rbi/finch_api/internal/individuals_page.rbi similarity index 94% rename from rbi/lib/finch_api/internal/individuals_page.rbi rename to rbi/finch_api/internal/individuals_page.rbi index 22e792f5..4446c707 100644 --- a/rbi/lib/finch_api/internal/individuals_page.rbi +++ b/rbi/finch_api/internal/individuals_page.rbi @@ -13,6 +13,7 @@ module FinchAPI sig { returns(FinchAPI::Models::Paging) } attr_accessor :paging + # @api private sig { returns(String) } def inspect; end end diff --git a/rbi/lib/finch_api/internal/page.rbi b/rbi/finch_api/internal/page.rbi similarity index 94% rename from rbi/lib/finch_api/internal/page.rbi rename to rbi/finch_api/internal/page.rbi index 9b70a280..ed1e89d2 100644 --- a/rbi/lib/finch_api/internal/page.rbi +++ b/rbi/finch_api/internal/page.rbi @@ -13,6 +13,7 @@ module FinchAPI sig { returns(FinchAPI::Models::Paging) } attr_accessor :paging + # @api private sig { returns(String) } def inspect; end end diff --git a/rbi/lib/finch_api/internal/responses_page.rbi b/rbi/finch_api/internal/responses_page.rbi similarity index 93% rename from rbi/lib/finch_api/internal/responses_page.rbi rename to rbi/finch_api/internal/responses_page.rbi index f284f7ff..9985f5a2 100644 --- a/rbi/lib/finch_api/internal/responses_page.rbi +++ b/rbi/finch_api/internal/responses_page.rbi @@ -10,6 +10,7 @@ module FinchAPI sig { returns(T.nilable(T::Array[Elem])) } attr_accessor :responses + # @api private sig { returns(String) } def inspect; end end diff --git a/rbi/lib/finch_api/internal/single_page.rbi b/rbi/finch_api/internal/single_page.rbi similarity index 95% rename from rbi/lib/finch_api/internal/single_page.rbi rename to rbi/finch_api/internal/single_page.rbi index d3c93e16..6c407582 100644 --- a/rbi/lib/finch_api/internal/single_page.rbi +++ b/rbi/finch_api/internal/single_page.rbi @@ -16,6 +16,7 @@ module FinchAPI sig { override.params(blk: T.proc.params(arg0: Elem).void).void } def auto_paging_each(&blk); end + # @api private sig { returns(String) } def inspect; end end diff --git a/rbi/lib/finch_api/internal/transport/base_client.rbi b/rbi/finch_api/internal/transport/base_client.rbi similarity index 90% rename from rbi/lib/finch_api/internal/transport/base_client.rbi rename to rbi/finch_api/internal/transport/base_client.rbi index 97064ad4..e2fbb421 100644 --- a/rbi/lib/finch_api/internal/transport/base_client.rbi +++ b/rbi/finch_api/internal/transport/base_client.rbi @@ -24,11 +24,18 @@ module FinchAPI )] ), body: T.nilable(T.anything), - unwrap: T.nilable(Symbol), + unwrap: T.nilable( + T.any( + Symbol, + Integer, + T::Array[T.any(Symbol, Integer)], + T.proc.params(arg0: T.anything).returns(T.anything) + ) + ), page: T.nilable(T::Class[FinchAPI::Internal::Type::BasePage[FinchAPI::Internal::Type::BaseModel]]), stream: T.nilable(T::Class[T.anything]), model: T.nilable(FinchAPI::Internal::Type::Converter::Input), - options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + options: T.nilable(FinchAPI::RequestOpts) } end @@ -90,7 +97,7 @@ module FinchAPI # @api private sig { returns(FinchAPI::Internal::Transport::PooledNetRequester) } - attr_accessor :requester + attr_reader :requester # @api private sig do @@ -170,11 +177,18 @@ module FinchAPI )] ), body: T.nilable(T.anything), - unwrap: T.nilable(Symbol), + unwrap: T.nilable( + T.any( + Symbol, + Integer, + T::Array[T.any(Symbol, Integer)], + T.proc.params(arg0: T.anything).returns(T.anything) + ) + ), page: T.nilable(T::Class[FinchAPI::Internal::Type::BasePage[FinchAPI::Internal::Type::BaseModel]]), stream: T.nilable(T::Class[T.anything]), model: T.nilable(FinchAPI::Internal::Type::Converter::Input), - options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + options: T.nilable(FinchAPI::RequestOpts) ) .returns(T.anything) end @@ -190,6 +204,7 @@ module FinchAPI model: FinchAPI::Internal::Type::Unknown, options: {} ); end + # @api private sig { returns(String) } def inspect; end end diff --git a/rbi/lib/finch_api/internal/transport/pooled_net_requester.rbi b/rbi/finch_api/internal/transport/pooled_net_requester.rbi similarity index 100% rename from rbi/lib/finch_api/internal/transport/pooled_net_requester.rbi rename to rbi/finch_api/internal/transport/pooled_net_requester.rbi diff --git a/rbi/lib/finch_api/internal/type/array_of.rbi b/rbi/finch_api/internal/type/array_of.rbi similarity index 81% rename from rbi/lib/finch_api/internal/type/array_of.rbi rename to rbi/finch_api/internal/type/array_of.rbi index 7c072578..ede086f7 100644 --- a/rbi/lib/finch_api/internal/type/array_of.rbi +++ b/rbi/finch_api/internal/type/array_of.rbi @@ -10,11 +10,10 @@ module FinchAPI include FinchAPI::Internal::Type::Converter abstract! - final! Elem = type_member(:out) - sig(:final) do + sig do params( type_info: T.any( FinchAPI::Internal::AnyHash, @@ -27,14 +26,17 @@ module FinchAPI end def self.[](type_info, spec = {}); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def ===(other); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def ==(other); end + sig { returns(Integer) } + def hash; end + # @api private - sig(:final) do + sig do override .params( value: T.any(T::Array[T.anything], T.anything), @@ -45,7 +47,7 @@ module FinchAPI def coerce(value, state:); end # @api private - sig(:final) do + sig do override .params( value: T.any(T::Array[T.anything], T.anything), @@ -56,15 +58,15 @@ module FinchAPI def dump(value, state:); end # @api private - sig(:final) { returns(Elem) } + sig { returns(Elem) } protected def item_type; end # @api private - sig(:final) { returns(T::Boolean) } + sig { returns(T::Boolean) } protected def nilable?; end # @api private - sig(:final) do + sig do params( type_info: T.any( FinchAPI::Internal::AnyHash, @@ -76,6 +78,10 @@ module FinchAPI .void end def initialize(type_info, spec = {}); end + + # @api private + sig { params(depth: Integer).returns(String) } + def inspect(depth: 0); end end end end diff --git a/rbi/lib/finch_api/internal/type/base_model.rbi b/rbi/finch_api/internal/type/base_model.rbi similarity index 92% rename from rbi/lib/finch_api/internal/type/base_model.rbi rename to rbi/finch_api/internal/type/base_model.rbi index d799fd41..52ec1fc0 100644 --- a/rbi/lib/finch_api/internal/type/base_model.rbi +++ b/rbi/finch_api/internal/type/base_model.rbi @@ -111,11 +111,17 @@ module FinchAPI sig { params(other: T.anything).returns(T::Boolean) } def ==(other); end + + sig { returns(Integer) } + def hash; end end sig { params(other: T.anything).returns(T::Boolean) } def ==(other); end + sig { returns(Integer) } + def hash; end + class << self # @api private sig do @@ -179,6 +185,12 @@ module FinchAPI sig { params(keys: T.nilable(T::Array[Symbol])).returns(FinchAPI::Internal::AnyHash) } def deconstruct_keys(keys); end + class << self + # @api private + sig { params(model: FinchAPI::Internal::Type::BaseModel).returns(FinchAPI::Internal::AnyHash) } + def walk(model); end + end + sig { params(a: T.anything).returns(String) } def to_json(*a); end @@ -189,6 +201,16 @@ module FinchAPI sig { params(data: T.any(T::Hash[Symbol, T.anything], T.self_type)).returns(T.attached_class) } def self.new(data = {}); end + class << self + # @api private + sig { params(depth: Integer).returns(String) } + def inspect(depth: 0); end + end + + sig { returns(String) } + def to_s; end + + # @api private sig { returns(String) } def inspect; end end diff --git a/rbi/lib/finch_api/internal/type/base_page.rbi b/rbi/finch_api/internal/type/base_page.rbi similarity index 97% rename from rbi/lib/finch_api/internal/type/base_page.rbi rename to rbi/finch_api/internal/type/base_page.rbi index 837c9cd0..8f400a8f 100644 --- a/rbi/lib/finch_api/internal/type/base_page.rbi +++ b/rbi/finch_api/internal/type/base_page.rbi @@ -3,6 +3,8 @@ module FinchAPI module Internal module Type + # @api private + # # This module provides a base implementation for paginated responses in the SDK. module BasePage Elem = type_member(:out) diff --git a/rbi/lib/finch_api/internal/type/boolean.rbi b/rbi/finch_api/internal/type/boolean.rbi similarity index 83% rename from rbi/lib/finch_api/internal/type/boolean.rbi rename to rbi/finch_api/internal/type/boolean.rbi index 63c9bafc..b3bbeda4 100644 --- a/rbi/lib/finch_api/internal/type/boolean.rbi +++ b/rbi/finch_api/internal/type/boolean.rbi @@ -10,17 +10,16 @@ module FinchAPI extend FinchAPI::Internal::Type::Converter abstract! - final! - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def self.===(other); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def self.==(other); end class << self # @api private - sig(:final) do + sig do override .params(value: T.any( T::Boolean, @@ -32,7 +31,7 @@ module FinchAPI def coerce(value, state:); end # @api private - sig(:final) do + sig do override .params(value: T.any( T::Boolean, diff --git a/rbi/lib/finch_api/internal/type/converter.rbi b/rbi/finch_api/internal/type/converter.rbi similarity index 94% rename from rbi/lib/finch_api/internal/type/converter.rbi rename to rbi/finch_api/internal/type/converter.rbi index 1aec8d3e..d12c681e 100644 --- a/rbi/lib/finch_api/internal/type/converter.rbi +++ b/rbi/finch_api/internal/type/converter.rbi @@ -34,6 +34,10 @@ module FinchAPI end def dump(value, state:); end + # @api private + sig { params(depth: Integer).returns(String) } + def inspect(depth: 0); end + class << self # @api private sig do @@ -105,6 +109,10 @@ module FinchAPI .returns(T.anything) end def self.dump(target, value, state: {can_retry: true}); end + + # @api private + sig { params(target: T.anything, depth: Integer).returns(String) } + def self.inspect(target, depth:); end end end end diff --git a/rbi/lib/finch_api/internal/type/enum.rbi b/rbi/finch_api/internal/type/enum.rbi similarity index 92% rename from rbi/lib/finch_api/internal/type/enum.rbi rename to rbi/finch_api/internal/type/enum.rbi index e6228160..ecc84141 100644 --- a/rbi/lib/finch_api/internal/type/enum.rbi +++ b/rbi/finch_api/internal/type/enum.rbi @@ -22,18 +22,15 @@ module FinchAPI sig { overridable.returns(T::Array[T.any(NilClass, T::Boolean, Integer, Float, Symbol)]) } def values; end - # @api private - # - # Guard against thread safety issues by instantiating `@values`. - sig { void } - private def finalize!; end - sig { params(other: T.anything).returns(T::Boolean) } def ===(other); end sig { params(other: T.anything).returns(T::Boolean) } def ==(other); end + sig { returns(Integer) } + def hash; end + # @api private # # Unlike with primitives, `Enum` additionally validates that the value is a member @@ -57,6 +54,10 @@ module FinchAPI .returns(T.any(Symbol, T.anything)) end def dump(value, state:); end + + # @api private + sig { params(depth: Integer).returns(String) } + def inspect(depth: 0); end end end end diff --git a/rbi/lib/finch_api/internal/type/io_like.rbi b/rbi/finch_api/internal/type/file_input.rbi similarity index 71% rename from rbi/lib/finch_api/internal/type/io_like.rbi rename to rbi/finch_api/internal/type/file_input.rbi index 8635fe28..f2cafc93 100644 --- a/rbi/lib/finch_api/internal/type/io_like.rbi +++ b/rbi/finch_api/internal/type/file_input.rbi @@ -5,22 +5,25 @@ module FinchAPI module Type # @api private # - # Either `Pathname` or `StringIO`. - class IOLike + # Either `Pathname` or `StringIO`, or `IO`, or + # `FinchAPI::Internal::Type::FileInput`. + # + # Note: when `IO` is used, all retries are disabled, since many IO` streams are + # not rewindable. + class FileInput extend FinchAPI::Internal::Type::Converter abstract! - final! - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def self.===(other); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def self.==(other); end class << self # @api private - sig(:final) do + sig do override .params( value: T.any(StringIO, String, T.anything), @@ -31,7 +34,7 @@ module FinchAPI def coerce(value, state:); end # @api private - sig(:final) do + sig do override .params( value: T.any(Pathname, StringIO, IO, String, T.anything), diff --git a/rbi/lib/finch_api/internal/type/hash_of.rbi b/rbi/finch_api/internal/type/hash_of.rbi similarity index 82% rename from rbi/lib/finch_api/internal/type/hash_of.rbi rename to rbi/finch_api/internal/type/hash_of.rbi index 6fb70602..8fb3c136 100644 --- a/rbi/lib/finch_api/internal/type/hash_of.rbi +++ b/rbi/finch_api/internal/type/hash_of.rbi @@ -10,11 +10,10 @@ module FinchAPI include FinchAPI::Internal::Type::Converter abstract! - final! Elem = type_member(:out) - sig(:final) do + sig do params( type_info: T.any( FinchAPI::Internal::AnyHash, @@ -27,14 +26,17 @@ module FinchAPI end def self.[](type_info, spec = {}); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def ===(other); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def ==(other); end + sig { returns(Integer) } + def hash; end + # @api private - sig(:final) do + sig do override .params( value: T.any(T::Hash[T.anything, T.anything], T.anything), @@ -45,7 +47,7 @@ module FinchAPI def coerce(value, state:); end # @api private - sig(:final) do + sig do override .params( value: T.any(T::Hash[T.anything, T.anything], T.anything), @@ -56,15 +58,15 @@ module FinchAPI def dump(value, state:); end # @api private - sig(:final) { returns(Elem) } + sig { returns(Elem) } protected def item_type; end # @api private - sig(:final) { returns(T::Boolean) } + sig { returns(T::Boolean) } protected def nilable?; end # @api private - sig(:final) do + sig do params( type_info: T.any( FinchAPI::Internal::AnyHash, @@ -76,6 +78,10 @@ module FinchAPI .void end def initialize(type_info, spec = {}); end + + # @api private + sig { params(depth: Integer).returns(String) } + def inspect(depth: 0); end end end end diff --git a/rbi/lib/finch_api/internal/type/request_parameters.rbi b/rbi/finch_api/internal/type/request_parameters.rbi similarity index 84% rename from rbi/lib/finch_api/internal/type/request_parameters.rbi rename to rbi/finch_api/internal/type/request_parameters.rbi index e884b3f9..31f1b420 100644 --- a/rbi/lib/finch_api/internal/type/request_parameters.rbi +++ b/rbi/finch_api/internal/type/request_parameters.rbi @@ -6,7 +6,7 @@ module FinchAPI # @api private module RequestParameters # Options to specify HTTP behaviour for this request. - sig { returns(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) } + sig { returns(FinchAPI::RequestOpts) } attr_accessor :request_options # @api private diff --git a/rbi/lib/finch_api/internal/type/union.rbi b/rbi/finch_api/internal/type/union.rbi similarity index 92% rename from rbi/lib/finch_api/internal/type/union.rbi rename to rbi/finch_api/internal/type/union.rbi index cc4e46c6..20511c1d 100644 --- a/rbi/lib/finch_api/internal/type/union.rbi +++ b/rbi/finch_api/internal/type/union.rbi @@ -47,6 +47,9 @@ module FinchAPI sig { params(other: T.anything).returns(T::Boolean) } def ==(other); end + sig { returns(Integer) } + def hash; end + # @api private sig do override @@ -62,6 +65,10 @@ module FinchAPI .returns(T.anything) end def dump(value, state:); end + + # @api private + sig { params(depth: Integer).returns(String) } + def inspect(depth: 0); end end end end diff --git a/rbi/lib/finch_api/internal/type/unknown.rbi b/rbi/finch_api/internal/type/unknown.rbi similarity index 80% rename from rbi/lib/finch_api/internal/type/unknown.rbi rename to rbi/finch_api/internal/type/unknown.rbi index 678caaf8..b83ec62d 100644 --- a/rbi/lib/finch_api/internal/type/unknown.rbi +++ b/rbi/finch_api/internal/type/unknown.rbi @@ -10,17 +10,16 @@ module FinchAPI extend FinchAPI::Internal::Type::Converter abstract! - final! - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def self.===(other); end - sig(:final) { params(other: T.anything).returns(T::Boolean) } + sig { params(other: T.anything).returns(T::Boolean) } def self.==(other); end class << self # @api private - sig(:final) do + sig do override .params(value: T.anything, state: FinchAPI::Internal::Type::Converter::CoerceState) .returns(T.anything) @@ -28,7 +27,7 @@ module FinchAPI def coerce(value, state:); end # @api private - sig(:final) do + sig do override .params(value: T.anything, state: FinchAPI::Internal::Type::Converter::DumpState) .returns(T.anything) diff --git a/rbi/lib/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi similarity index 85% rename from rbi/lib/finch_api/internal/util.rbi rename to rbi/finch_api/internal/util.rbi index 3eb17e54..ce58cf64 100644 --- a/rbi/lib/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -68,13 +68,19 @@ module FinchAPI sig do params( data: T.any(FinchAPI::Internal::AnyHash, T::Array[T.anything], T.anything), - pick: T.nilable(T.any(Symbol, Integer, T::Array[T.any(Symbol, Integer)])), - sentinel: T.nilable(T.anything), + pick: T.nilable( + T.any( + Symbol, + Integer, + T::Array[T.any(Symbol, Integer)], + T.proc.params(arg0: T.anything).returns(T.anything) + ) + ), blk: T.nilable(T.proc.returns(T.anything)) ) .returns(T.nilable(T.anything)) end - def dig(data, pick, sentinel = nil, &blk); end + def dig(data, pick, &blk); end end class << self @@ -140,22 +146,6 @@ module FinchAPI def normalized_headers(*headers); end end - # @api private - class SerializationAdapter - sig { returns(T.any(Pathname, IO)) } - attr_reader :inner - - sig { params(a: T.anything).returns(String) } - def to_json(*a); end - - sig { params(a: T.anything).returns(String) } - def to_yaml(*a); end - - # @api private - sig { params(inner: T.any(Pathname, IO)).returns(T.attached_class) } - def self.new(inner); end - end - # @api private # # An adapter that satisfies the IO interface required by `::IO.copy_stream` @@ -192,7 +182,22 @@ module FinchAPI def writable_enum(&blk); end end + JSON_CONTENT = T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp) + JSONL_CONTENT = T.let(%r{^application/(?:x-)?jsonl}, Regexp) + class << self + # @api private + sig do + params( + y: Enumerator::Yielder, + val: T.anything, + closing: T::Array[T.proc.void], + content_type: T.nilable(String) + ) + .void + end + private def write_multipart_content(y, val:, closing:, content_type: nil); end + # @api private sig do params( @@ -215,6 +220,14 @@ module FinchAPI def encode_content(headers, body); end # @api private + # + # https://www.iana.org/assignments/character-sets/character-sets.xhtml + sig { params(content_type: String, text: String).void } + def force_charset!(content_type, text:); end + + # @api private + # + # Assumes each chunk in stream has `Encoding::BINARY`. sig do params( headers: T.any(T::Hash[String, String], Net::HTTPHeader), @@ -263,12 +276,19 @@ module FinchAPI class << self # @api private + # + # Assumes Strings have been forced into having `Encoding::BINARY`. + # + # This decoder is responsible for reassembling lines split across multiple + # fragments. sig { params(enum: T::Enumerable[String]).returns(T::Enumerable[String]) } def decode_lines(enum); end # @api private # # https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream + # + # Assumes that `lines` has been decoded with `#decode_lines`. sig do params(lines: T::Enumerable[String]).returns(T::Enumerable[FinchAPI::Internal::Util::ServerSentEvent]) end diff --git a/rbi/lib/finch_api/models/access_token_create_params.rbi b/rbi/finch_api/models/access_token_create_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/access_token_create_params.rbi rename to rbi/finch_api/models/access_token_create_params.rbi diff --git a/rbi/lib/finch_api/models/account_disconnect_params.rbi b/rbi/finch_api/models/account_disconnect_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/account_disconnect_params.rbi rename to rbi/finch_api/models/account_disconnect_params.rbi diff --git a/rbi/lib/finch_api/models/account_introspect_params.rbi b/rbi/finch_api/models/account_introspect_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/account_introspect_params.rbi rename to rbi/finch_api/models/account_introspect_params.rbi diff --git a/rbi/lib/finch_api/models/account_update_event.rbi b/rbi/finch_api/models/account_update_event.rbi similarity index 99% rename from rbi/lib/finch_api/models/account_update_event.rbi rename to rbi/finch_api/models/account_update_event.rbi index 2f3efb72..97337d63 100644 --- a/rbi/lib/finch_api/models/account_update_event.rbi +++ b/rbi/finch_api/models/account_update_event.rbi @@ -121,8 +121,15 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(benefits_support: nil, supported_fields: nil, type: nil); end - + def self.new( + # Each benefit type and their supported features. If the benefit type is not + # supported, the property will be null + benefits_support: nil, + # The supported data fields returned by our HR and payroll endpoints + supported_fields: nil, + # The type of authentication method. + type: nil + ); end sig do override .returns( @@ -2267,14 +2274,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } ASSISTED = T.let(:assisted, FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::Type::TaggedSymbol) @@ -2303,8 +2303,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::AccountUpdateEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::AccountUpdateEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ACCOUNT_UPDATED = T.let(:"account.updated", FinchAPI::Models::AccountUpdateEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/base_webhook_event.rbi b/rbi/finch_api/models/base_webhook_event.rbi similarity index 66% rename from rbi/lib/finch_api/models/base_webhook_event.rbi rename to rbi/finch_api/models/base_webhook_event.rbi index 18ed7194..28b132fc 100644 --- a/rbi/lib/finch_api/models/base_webhook_event.rbi +++ b/rbi/finch_api/models/base_webhook_event.rbi @@ -22,8 +22,17 @@ module FinchAPI attr_writer :connection_id sig { params(account_id: String, company_id: String, connection_id: String).returns(T.attached_class) } - def self.new(account_id:, company_id:, connection_id: nil); end - + def self.new( + # [DEPRECATED] Unique Finch ID of the employer account used to make this + # connection. Use `connection_id` instead to identify the connection associated + # with this event. + account_id:, + # [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use + # `connection_id` instead to identify the connection associated with this event. + company_id:, + # Unique Finch ID of the connection associated with the webhook event. + connection_id: nil + ); end sig { override.returns({account_id: String, company_id: String, connection_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/company_event.rbi b/rbi/finch_api/models/company_event.rbi similarity index 91% rename from rbi/lib/finch_api/models/company_event.rbi rename to rbi/finch_api/models/company_event.rbi index 604252eb..3c45659a 100644 --- a/rbi/lib/finch_api/models/company_event.rbi +++ b/rbi/finch_api/models/company_event.rbi @@ -36,8 +36,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::CompanyEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::CompanyEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } COMPANY_UPDATED = T.let(:"company.updated", FinchAPI::Models::CompanyEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/connect/session_new_params.rbi b/rbi/finch_api/models/connect/session_new_params.rbi similarity index 93% rename from rbi/lib/finch_api/models/connect/session_new_params.rbi rename to rbi/finch_api/models/connect/session_new_params.rbi index 753f77c5..b71fc21e 100644 --- a/rbi/lib/finch_api/models/connect/session_new_params.rbi +++ b/rbi/finch_api/models/connect/session_new_params.rbi @@ -66,6 +66,8 @@ module FinchAPI customer_email: nil, integration: nil, manual: nil, + # The number of minutes until the session expires (defaults to 43,200, which is 30 + # days) minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, @@ -95,8 +97,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Connect::SessionNewParams::Product) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } COMPANY = T.let(:company, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) DIRECTORY = T.let(:directory, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) @@ -106,6 +107,8 @@ module FinchAPI PAY_STATEMENT = T.let(:pay_statement, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) BENEFITS = T.let(:benefits, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) SSN = T.let(:ssn, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) + DEDUCTION = T.let(:deduction, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) + DOCUMENTS = T.let(:documents, FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol) sig { override.returns(T::Array[FinchAPI::Models::Connect::SessionNewParams::Product::TaggedSymbol]) } def self.values; end @@ -143,8 +146,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ASSISTED = T.let(:assisted, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod::TaggedSymbol) @@ -166,8 +168,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Connect::SessionNewParams::Sandbox::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FINCH = T.let(:finch, FinchAPI::Models::Connect::SessionNewParams::Sandbox::TaggedSymbol) PROVIDER = T.let(:provider, FinchAPI::Models::Connect::SessionNewParams::Sandbox::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/connect/session_new_response.rbi b/rbi/finch_api/models/connect/session_new_response.rbi similarity index 73% rename from rbi/lib/finch_api/models/connect/session_new_response.rbi rename to rbi/finch_api/models/connect/session_new_response.rbi index 01675281..ad3bdf70 100644 --- a/rbi/lib/finch_api/models/connect/session_new_response.rbi +++ b/rbi/finch_api/models/connect/session_new_response.rbi @@ -13,8 +13,12 @@ module FinchAPI attr_accessor :session_id sig { params(connect_url: String, session_id: String).returns(T.attached_class) } - def self.new(connect_url:, session_id:); end - + def self.new( + # The Connect URL to redirect the user to for authentication + connect_url:, + # The unique identifier for the created connect session + session_id: + ); end sig { override.returns({connect_url: String, session_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/connect/session_reauthenticate_params.rbi b/rbi/finch_api/models/connect/session_reauthenticate_params.rbi similarity index 84% rename from rbi/lib/finch_api/models/connect/session_reauthenticate_params.rbi rename to rbi/finch_api/models/connect/session_reauthenticate_params.rbi index 255caef8..d7cef6ee 100644 --- a/rbi/lib/finch_api/models/connect/session_reauthenticate_params.rbi +++ b/rbi/finch_api/models/connect/session_reauthenticate_params.rbi @@ -35,14 +35,17 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The ID of the existing connection to reauthenticate connection_id:, + # The number of minutes until the session expires (defaults to 43,200, which is 30 + # days) minutes_to_expire: nil, + # The products to request access to (optional for reauthentication) products: nil, + # The URI to redirect to after the Connect flow is completed redirect_uri: nil, request_options: {} - ) - end - + ); end sig do override .returns( @@ -63,8 +66,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } COMPANY = T.let(:company, FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol) DIRECTORY = @@ -79,6 +81,10 @@ module FinchAPI BENEFITS = T.let(:benefits, FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol) SSN = T.let(:ssn, FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol) + DEDUCTION = + T.let(:deduction, FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol) + DOCUMENTS = + T.let(:documents, FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol) sig { override.returns(T::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::Product::TaggedSymbol]) } def self.values; end diff --git a/rbi/lib/finch_api/models/connect/session_reauthenticate_response.rbi b/rbi/finch_api/models/connect/session_reauthenticate_response.rbi similarity index 74% rename from rbi/lib/finch_api/models/connect/session_reauthenticate_response.rbi rename to rbi/finch_api/models/connect/session_reauthenticate_response.rbi index ad857fa3..d872dfad 100644 --- a/rbi/lib/finch_api/models/connect/session_reauthenticate_response.rbi +++ b/rbi/finch_api/models/connect/session_reauthenticate_response.rbi @@ -13,8 +13,12 @@ module FinchAPI attr_accessor :session_id sig { params(connect_url: String, session_id: String).returns(T.attached_class) } - def self.new(connect_url:, session_id:); end - + def self.new( + # The Connect URL to redirect the user to for reauthentication + connect_url:, + # The unique identifier for the created connect session + session_id: + ); end sig { override.returns({connect_url: String, session_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/connection_status_type.rbi b/rbi/finch_api/models/connection_status_type.rbi similarity index 89% rename from rbi/lib/finch_api/models/connection_status_type.rbi rename to rbi/finch_api/models/connection_status_type.rbi index 5a57ba98..16851dcd 100644 --- a/rbi/lib/finch_api/models/connection_status_type.rbi +++ b/rbi/finch_api/models/connection_status_type.rbi @@ -6,7 +6,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::ConnectionStatusType) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::ConnectionStatusType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PENDING = T.let(:pending, FinchAPI::Models::ConnectionStatusType::TaggedSymbol) PROCESSING = T.let(:processing, FinchAPI::Models::ConnectionStatusType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/create_access_token_response.rbi b/rbi/finch_api/models/create_access_token_response.rbi similarity index 82% rename from rbi/lib/finch_api/models/create_access_token_response.rbi rename to rbi/finch_api/models/create_access_token_response.rbi index 77fa21fa..2e99f04d 100644 --- a/rbi/lib/finch_api/models/create_access_token_response.rbi +++ b/rbi/finch_api/models/create_access_token_response.rbi @@ -68,15 +68,31 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The access token for the connection. access_token:, + # [DEPRECATED] Use `connection_id` to identify the connection instead of this + # account ID. account_id:, + # The type of application associated with a token. client_type:, + # [DEPRECATED] Use `connection_id` to identify the connection instead of this + # company ID. company_id:, + # The Finch UUID of the connection associated with the `access_token`. connection_id:, + # The type of the connection associated with the token. + # + # - `provider` - connection to an external provider + # - `finch` - finch-generated data. connection_type:, + # An array of the authorized products associated with the `access_token`. products:, + # The ID of the provider associated with the `access_token`. provider_id:, + # The ID of your customer you provided to Finch when a connect session was created + # for this connection. customer_id: nil, + # The RFC 8693 token type (Finch uses `bearer` tokens) token_type: nil ); end sig do @@ -103,8 +119,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::CreateAccessTokenResponse::ClientType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PRODUCTION = T.let(:production, FinchAPI::Models::CreateAccessTokenResponse::ClientType::TaggedSymbol) DEVELOPMENT = T.let(:development, FinchAPI::Models::CreateAccessTokenResponse::ClientType::TaggedSymbol) @@ -123,8 +138,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PROVIDER = T.let(:provider, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType::TaggedSymbol) FINCH = T.let(:finch, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/directory_event.rbi b/rbi/finch_api/models/directory_event.rbi similarity index 92% rename from rbi/lib/finch_api/models/directory_event.rbi rename to rbi/finch_api/models/directory_event.rbi index 8b792f0b..dc1aeb79 100644 --- a/rbi/lib/finch_api/models/directory_event.rbi +++ b/rbi/finch_api/models/directory_event.rbi @@ -44,8 +44,10 @@ module FinchAPI attr_writer :individual_id sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id: nil); end - + def self.new( + # The ID of the individual related to the event. + individual_id: nil + ); end sig { override.returns({individual_id: String}) } def to_hash; end end @@ -54,8 +56,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::DirectoryEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::DirectoryEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } DIRECTORY_CREATED = T.let(:"directory.created", FinchAPI::Models::DirectoryEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/disconnect_response.rbi b/rbi/finch_api/models/disconnect_response.rbi similarity index 74% rename from rbi/lib/finch_api/models/disconnect_response.rbi rename to rbi/finch_api/models/disconnect_response.rbi index 1bfa81d0..06dbcaa2 100644 --- a/rbi/lib/finch_api/models/disconnect_response.rbi +++ b/rbi/finch_api/models/disconnect_response.rbi @@ -8,8 +8,10 @@ module FinchAPI attr_accessor :status sig { params(status: String).returns(T.attached_class) } - def self.new(status:); end - + def self.new( + # If the request is successful, Finch will return “success” (HTTP 200 status). + status: + ); end sig { override.returns({status: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/employment_event.rbi b/rbi/finch_api/models/employment_event.rbi similarity index 92% rename from rbi/lib/finch_api/models/employment_event.rbi rename to rbi/finch_api/models/employment_event.rbi index e68b6e4f..fceadeca 100644 --- a/rbi/lib/finch_api/models/employment_event.rbi +++ b/rbi/finch_api/models/employment_event.rbi @@ -44,8 +44,10 @@ module FinchAPI attr_writer :individual_id sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id: nil); end - + def self.new( + # The ID of the individual related to the event. + individual_id: nil + ); end sig { override.returns({individual_id: String}) } def to_hash; end end @@ -54,8 +56,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::EmploymentEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::EmploymentEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } EMPLOYMENT_CREATED = T.let(:"employment.created", FinchAPI::Models::EmploymentEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/benefit_contribution.rbi b/rbi/finch_api/models/hris/benefit_contribution.rbi similarity index 85% rename from rbi/lib/finch_api/models/hris/benefit_contribution.rbi rename to rbi/finch_api/models/hris/benefit_contribution.rbi index 55ebb143..24236d19 100644 --- a/rbi/lib/finch_api/models/hris/benefit_contribution.rbi +++ b/rbi/finch_api/models/hris/benefit_contribution.rbi @@ -19,8 +19,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, type: nil); end - + def self.new( + # Contribution amount in cents (if `fixed`) or basis points (if `percent`). + amount: nil, + # Contribution type. + type: nil + ); end sig do override .returns( @@ -34,8 +38,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::BenefitContribution::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let(:fixed, FinchAPI::Models::HRIS::BenefitContribution::Type::TaggedSymbol) PERCENT = T.let(:percent, FinchAPI::Models::HRIS::BenefitContribution::Type::TaggedSymbol) diff --git a/rbi/finch_api/models/hris/benefit_create_params.rbi b/rbi/finch_api/models/hris/benefit_create_params.rbi new file mode 100644 index 00000000..c531d7f0 --- /dev/null +++ b/rbi/finch_api/models/hris/benefit_create_params.rbi @@ -0,0 +1,159 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + # The company match for this benefit. + sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution)) } + attr_reader :company_contribution + + sig do + params( + company_contribution: T.nilable( + T.any(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, FinchAPI::Internal::AnyHash) + ) + ) + .void + end + attr_writer :company_contribution + + # 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). + sig { returns(T.nilable(String)) } + attr_reader :description + + sig { params(description: String).void } + attr_writer :description + + # The frequency of the benefit deduction/contribution. + sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol)) } + attr_accessor :frequency + + # Type of benefit. + sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol)) } + attr_accessor :type + + sig do + params( + company_contribution: T.nilable( + T.any(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, FinchAPI::Internal::AnyHash) + ), + description: String, + frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), + type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol), + request_options: T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash) + ) + .returns(T.attached_class) + end + def self.new( + # 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). + description: nil, + # The frequency of the benefit deduction/contribution. + frequency: nil, + # Type of benefit. + type: nil, + request_options: {} + ); end + sig do + override + .returns( + { + company_contribution: T.nilable(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution), + description: String, + frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), + type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol), + request_options: FinchAPI::RequestOptions + } + ) + end + def to_hash; end + + class CompanyContribution < FinchAPI::Internal::Type::BaseModel + sig { returns(T.nilable(T::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier])) } + attr_reader :tiers + + sig do + params( + tiers: T::Array[T.any(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier, FinchAPI::Internal::AnyHash)] + ) + .void + end + attr_writer :tiers + + sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol)) } + attr_reader :type + + sig { params(type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol).void } + attr_writer :type + + # The company match for this benefit. + sig do + params( + tiers: T::Array[T.any(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier, FinchAPI::Internal::AnyHash)], + type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol + ) + .returns(T.attached_class) + end + def self.new(tiers: nil, type: nil); end + + sig do + override + .returns( + { + tiers: T::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier], + type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol + } + ) + end + def to_hash; end + + class Tier < FinchAPI::Internal::Type::BaseModel + sig { returns(T.nilable(Integer)) } + attr_reader :match + + sig { params(match: Integer).void } + attr_writer :match + + sig { returns(T.nilable(Integer)) } + attr_reader :threshold + + sig { params(threshold: Integer).void } + attr_writer :threshold + + sig { params(match: Integer, threshold: Integer).returns(T.attached_class) } + def self.new(match: nil, threshold: nil); end + + sig { override.returns({match: Integer, threshold: Integer}) } + def to_hash; end + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MATCH = + T.let(:match, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type::TaggedSymbol) + + sig do + override + .returns(T::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type::TaggedSymbol]) + end + def self.values; end + end + end + end + end + end +end diff --git a/rbi/lib/finch_api/models/hris/benefit_features_and_operations.rbi b/rbi/finch_api/models/hris/benefit_features_and_operations.rbi similarity index 91% rename from rbi/lib/finch_api/models/hris/benefit_features_and_operations.rbi rename to rbi/finch_api/models/hris/benefit_features_and_operations.rbi index d9ca53a7..9b95d085 100644 --- a/rbi/lib/finch_api/models/hris/benefit_features_and_operations.rbi +++ b/rbi/finch_api/models/hris/benefit_features_and_operations.rbi @@ -148,12 +148,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Whether the provider supports an annual maximum for this benefit. annual_maximum: nil, + # Whether the provider supports catch up for this benefit. This field will only be + # true for retirement benefits. catch_up: nil, + # Supported contribution types. An empty array indicates contributions are not + # supported. company_contribution: nil, description: nil, + # Supported deduction types. An empty array indicates deductions are not + # supported. employee_deduction: nil, + # The list of frequencies supported by the provider for this benefit frequencies: nil, + # Whether the provider supports HSA contribution limits. Empty if this feature is + # not supported for the benefit. This array only has values for HSA benefits. hsa_contribution_limit: nil ); end sig do @@ -197,14 +207,7 @@ module FinchAPI T.type_alias do T.all(Symbol, FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution) end - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::CompanyContribution::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let( @@ -231,14 +234,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::EmployeeDeduction::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let( @@ -267,14 +263,7 @@ module FinchAPI T.type_alias do T.all(Symbol, FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit) end - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::BenefitFeaturesAndOperations::SupportedFeatures::HsaContributionLimit::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } INDIVIDUAL = T.let( diff --git a/rbi/lib/finch_api/models/hris/benefit_frequency.rbi b/rbi/finch_api/models/hris/benefit_frequency.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/benefit_frequency.rbi rename to rbi/finch_api/models/hris/benefit_frequency.rbi index 7efa1068..355d69c8 100644 --- a/rbi/lib/finch_api/models/hris/benefit_frequency.rbi +++ b/rbi/finch_api/models/hris/benefit_frequency.rbi @@ -8,7 +8,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitFrequency) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let(:one_time, FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol) EVERY_PAYCHECK = T.let(:every_paycheck, FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/benefit_list_params.rbi b/rbi/finch_api/models/hris/benefit_list_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefit_list_params.rbi rename to rbi/finch_api/models/hris/benefit_list_params.rbi diff --git a/rbi/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rbi b/rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rbi rename to rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi diff --git a/rbi/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rbi b/rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi similarity index 89% rename from rbi/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rbi rename to rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi index 62a82f60..2d5369b5 100644 --- a/rbi/lib/finch_api/models/hris/benefit_list_supported_benefits_response.rbi +++ b/rbi/finch_api/models/hris/benefit_list_supported_benefits_response.rbi @@ -79,12 +79,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Whether the provider supports an annual maximum for this benefit. annual_maximum: nil, + # Whether the provider supports catch up for this benefit. This field will only be + # true for retirement benefits. catch_up: nil, + # Supported contribution types. An empty array indicates contributions are not + # supported. company_contribution: nil, description: nil, + # Supported deduction types. An empty array indicates deductions are not + # supported. employee_deduction: nil, + # The list of frequencies supported by the provider for this benefit frequencies: nil, + # Whether the provider supports HSA contribution limits. Empty if this feature is + # not supported for the benefit. This array only has values for HSA benefits. hsa_contribution_limit: nil ); end sig do @@ -118,14 +128,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::CompanyContribution::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let( @@ -152,14 +155,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::EmployeeDeduction::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let( @@ -186,14 +182,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse::HsaContributionLimit::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } INDIVIDUAL = T.let( diff --git a/rbi/lib/finch_api/models/hris/benefit_retrieve_params.rbi b/rbi/finch_api/models/hris/benefit_retrieve_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefit_retrieve_params.rbi rename to rbi/finch_api/models/hris/benefit_retrieve_params.rbi diff --git a/rbi/lib/finch_api/models/hris/benefit_type.rbi b/rbi/finch_api/models/hris/benefit_type.rbi similarity index 95% rename from rbi/lib/finch_api/models/hris/benefit_type.rbi rename to rbi/finch_api/models/hris/benefit_type.rbi index 83e9c371..63eb8214 100644 --- a/rbi/lib/finch_api/models/hris/benefit_type.rbi +++ b/rbi/finch_api/models/hris/benefit_type.rbi @@ -8,7 +8,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::BenefitType) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::BenefitType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } BENEFIT_TYPE_401K = T.let(:"401k", FinchAPI::Models::HRIS::BenefitType::TaggedSymbol) BENEFIT_TYPE_401K_ROTH = T.let(:"401k_roth", FinchAPI::Models::HRIS::BenefitType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/benefit_update_params.rbi b/rbi/finch_api/models/hris/benefit_update_params.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/benefit_update_params.rbi rename to rbi/finch_api/models/hris/benefit_update_params.rbi index 5dbcda7d..b194fc28 100644 --- a/rbi/lib/finch_api/models/hris/benefit_update_params.rbi +++ b/rbi/finch_api/models/hris/benefit_update_params.rbi @@ -24,8 +24,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(description: nil, request_options: {}); end - + def self.new( + # Updated name or description. + description: nil, + request_options: {} + ); end sig { override.returns({description: String, request_options: FinchAPI::RequestOptions}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbi b/rbi/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbi rename to rbi/finch_api/models/hris/benefits/enrolled_individual_benefit_response.rbi diff --git a/rbi/lib/finch_api/models/hris/benefits/individual_benefit.rbi b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi similarity index 93% rename from rbi/lib/finch_api/models/hris/benefits/individual_benefit.rbi rename to rbi/finch_api/models/hris/benefits/individual_benefit.rbi index 6a86304d..40dc160d 100644 --- a/rbi/lib/finch_api/models/hris/benefits/individual_benefit.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi @@ -97,10 +97,14 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # If the benefit supports annual maximum, the amount in cents for this individual. annual_maximum: nil, + # If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled + # for this individual. catch_up: nil, company_contribution: nil, employee_deduction: nil, + # Type for HSA contribution limit if the benefit is a HSA. hsa_contribution_limit: nil ); end sig do @@ -123,14 +127,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } INDIVIDUAL = T.let( diff --git a/rbi/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rbi b/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi similarity index 91% rename from rbi/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rbi rename to rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi index 714f9075..58de6361 100644 --- a/rbi/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi @@ -37,8 +37,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(individuals: nil, request_options: {}); end - + def self.new( + # Array of the individual_id to enroll and a configuration object. + individuals: nil, + request_options: {} + ); end sig do override .returns( @@ -86,8 +89,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(configuration: nil, individual_id: nil); end - + def self.new( + configuration: nil, + # Finch id (uuidv4) for the individual to enroll + individual_id: nil + ); end sig do override .returns( @@ -195,10 +201,15 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # For HSA benefits only - whether the contribution limit is for an individual or + # family annual_contribution_limit: nil, + # Maximum annual amount in cents annual_maximum: nil, + # For retirement benefits only - whether catch up contributions are enabled catch_up: nil, company_contribution: nil, + # The date the enrollment will take effect effective_date: nil, employee_deduction: nil ); end @@ -226,14 +237,7 @@ module FinchAPI T.type_alias do T.all(Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit) end - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } INDIVIDUAL = T.let( @@ -290,8 +294,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, type: nil); end - + def self.new( + # Amount in cents for fixed type or basis points (1/100th of a percent) for + # percent type + amount: nil, + type: nil + ); end sig do override .returns( @@ -310,14 +318,7 @@ module FinchAPI T.type_alias do T.all(Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type) end - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let( @@ -375,8 +376,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, type: nil); end - + def self.new( + # Amount in cents for fixed type or basis points (1/100th of a percent) for + # percent type + amount: nil, + type: nil + ); end sig do override .returns( @@ -395,14 +400,7 @@ module FinchAPI T.type_alias do T.all(Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type) end - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let( diff --git a/rbi/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi rename to rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi diff --git a/rbi/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbi b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbi similarity index 82% rename from rbi/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbi rename to rbi/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbi index e1b94b8b..0b0cc1e7 100644 --- a/rbi/lib/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_response.rbi @@ -13,8 +13,11 @@ module FinchAPI attr_accessor :individual_ids sig { params(benefit_id: String, individual_ids: T::Array[String]).returns(T.attached_class) } - def self.new(benefit_id:, individual_ids:); end - + def self.new( + # The id of the benefit. + benefit_id:, + individual_ids: + ); end sig { override.returns({benefit_id: String, individual_ids: T::Array[String]}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi b/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi similarity index 81% rename from rbi/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi rename to rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi index 95fa46dd..87a02a46 100644 --- a/rbi/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi @@ -23,8 +23,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(individual_ids: nil, request_options: {}); end - + def self.new( + # comma-delimited list of stable Finch uuids for each individual. If empty, + # defaults to all individuals + individual_ids: nil, + request_options: {} + ); end sig { override.returns({individual_ids: String, request_options: FinchAPI::RequestOptions}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi b/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi rename to rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi index 849fd684..f03f50a6 100644 --- a/rbi/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi @@ -22,8 +22,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(individual_ids: nil, request_options: {}); end - + def self.new( + # Array of individual_ids to unenroll. + individual_ids: nil, + request_options: {} + ); end sig do override.returns({individual_ids: T::Array[String], request_options: FinchAPI::RequestOptions}) end diff --git a/rbi/lib/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbi b/rbi/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbi rename to rbi/finch_api/models/hris/benefits/unenrolled_individual_benefit_response.rbi diff --git a/rbi/lib/finch_api/models/hris/benefits_support.rbi b/rbi/finch_api/models/hris/benefits_support.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benefits_support.rbi rename to rbi/finch_api/models/hris/benefits_support.rbi diff --git a/rbi/lib/finch_api/models/hris/benfit_contribution.rbi b/rbi/finch_api/models/hris/benfit_contribution.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/benfit_contribution.rbi rename to rbi/finch_api/models/hris/benfit_contribution.rbi diff --git a/rbi/lib/finch_api/models/hris/company.rbi b/rbi/finch_api/models/hris/company.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/company.rbi rename to rbi/finch_api/models/hris/company.rbi index aeeaee83..37c0455b 100644 --- a/rbi/lib/finch_api/models/hris/company.rbi +++ b/rbi/finch_api/models/hris/company.rbi @@ -63,14 +63,23 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # A stable Finch `id` (UUID v4) for the company. id:, + # An array of bank account objects associated with the payroll/HRIS system. accounts:, + # The array of company departments. departments:, + # The employer identification number. ein:, + # The entity type object. entity:, + # The legal name of the company. legal_name:, locations:, + # The email of the main administrator on the account. primary_email:, + # The phone number of the main administrator on the account. Format: E.164, with + # extension where applicable, e.g. `+NNNNNNNNNNN xExtension` primary_phone_number: ); end sig do @@ -124,14 +133,18 @@ module FinchAPI .returns(T.attached_class) end def self.new( - account_name: nil, - account_number: nil, - account_type: nil, - institution_name: nil, - routing_number: nil - ) - end - + # The name of the bank associated in the payroll/HRIS system. + account_name:, + # 10-12 digit number to specify the bank account + account_number:, + # The type of bank account. + account_type:, + # Name of the banking institution. + institution_name:, + # A nine-digit code that's based on the U.S. Bank location where your account was + # opened. + routing_number: + ); end sig do override .returns( @@ -151,8 +164,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } CHECKING = T.let(:checking, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType::TaggedSymbol) SAVINGS = T.let(:savings, FinchAPI::Models::HRIS::HRISCompany::Account::AccountType::TaggedSymbol) @@ -186,8 +198,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(name: nil, parent: nil); end - + def self.new( + # The department name. + name:, + # The parent department, if present. + parent: + ); end sig do override .returns( @@ -203,8 +219,10 @@ module FinchAPI # The parent department, if present. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The parent department's name. + name: + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -227,8 +245,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The tax payer subtype of the company. + subtype:, + # The tax payer type of the company. + type: + ); end sig do override .returns( @@ -245,8 +267,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } S_CORPORATION = T.let(:s_corporation, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype::TaggedSymbol) C_CORPORATION = T.let(:c_corporation, FinchAPI::Models::HRIS::HRISCompany::Entity::Subtype::TaggedSymbol) @@ -261,8 +282,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::HRISCompany::Entity::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::HRISCompany::Entity::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } LLC = T.let(:llc, FinchAPI::Models::HRIS::HRISCompany::Entity::Type::TaggedSymbol) LP = T.let(:lp, FinchAPI::Models::HRIS::HRISCompany::Entity::Type::TaggedSymbol) diff --git a/rbi/lib/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 similarity index 89% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi index 7d05d70a..b01a6c02 100644 --- a/rbi/lib/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 @@ -88,10 +88,14 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Specifies the fields to be applied when the condition is met. attributes: nil, conditions: nil, + # 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. effective_start_date: nil, + # The entity type to which the rule is applied. entity_type: nil, request_options: {} ); end @@ -121,8 +125,11 @@ module FinchAPI # Specifies the fields to be applied when the condition is met. sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -168,8 +175,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(field: nil, operator: nil, value: nil); end - + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ); end sig do override .returns( @@ -188,14 +201,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EQUALS = T.let( @@ -219,14 +225,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } PAY_STATEMENT_ITEM = T.let( diff --git a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi similarity index 88% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi index 0ccb847a..736ce24e 100644 --- a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi @@ -116,14 +116,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Finch id (uuidv4) for the rule. id: nil, + # Specifies the fields to be applied when the condition is met. attributes: nil, conditions: nil, + # The datetime when the rule was created. created_at: nil, + # 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. effective_start_date: nil, + # The entity type to which the rule is applied. entity_type: nil, + # The priority of the rule. priority: nil, + # The datetime when the rule was last updated. updated_at: nil ); end sig do @@ -155,8 +163,11 @@ module FinchAPI # Specifies the fields to be applied when the condition is met. sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -202,8 +213,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(field: nil, operator: nil, value: nil); end - + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ); end sig do override .returns( @@ -222,14 +239,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EQUALS = T.let( @@ -253,14 +263,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } PAY_STATEMENT_ITEM = T.let( diff --git a/rbi/lib/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 similarity index 100% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi diff --git a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi similarity index 88% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi index fa98c441..1d6f52ad 100644 --- a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi @@ -124,15 +124,24 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Finch id (uuidv4) for the rule. id: nil, + # Specifies the fields to be applied when the condition is met. attributes: nil, conditions: nil, + # The datetime when the rule was created. created_at: nil, + # The datetime when the rule was deleted. deleted_at: nil, + # 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. effective_start_date: nil, + # The entity type to which the rule is applied. entity_type: nil, + # The priority of the rule. priority: nil, + # The datetime when the rule was last updated. updated_at: nil ); end sig do @@ -165,8 +174,11 @@ module FinchAPI # Specifies the fields to be applied when the condition is met. sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -212,8 +224,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(field: nil, operator: nil, value: nil); end - + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ); end sig do override .returns( @@ -232,14 +250,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EQUALS = T.let( @@ -263,14 +274,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } PAY_STATEMENT_ITEM = T.let( diff --git a/rbi/lib/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 similarity index 100% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi diff --git a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi similarity index 88% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi index 853dafc4..2d129ac7 100644 --- a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi @@ -116,14 +116,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Finch id (uuidv4) for the rule. id: nil, + # Specifies the fields to be applied when the condition is met. attributes: nil, conditions: nil, + # The datetime when the rule was created. created_at: nil, + # 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. effective_start_date: nil, + # The entity type to which the rule is applied. entity_type: nil, + # The priority of the rule. priority: nil, + # The datetime when the rule was last updated. updated_at: nil ); end sig do @@ -155,8 +163,11 @@ module FinchAPI # Specifies the fields to be applied when the condition is met. sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -202,8 +213,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(field: nil, operator: nil, value: nil); end - + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ); end sig do override .returns( @@ -222,14 +239,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EQUALS = T.let( @@ -253,14 +263,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } PAY_STATEMENT_ITEM = T.let( diff --git a/rbi/lib/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 similarity index 100% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi diff --git a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi similarity index 88% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi index 39e98ac6..cfeb9adf 100644 --- a/rbi/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi @@ -116,14 +116,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Finch id (uuidv4) for the rule. id: nil, + # Specifies the fields to be applied when the condition is met. attributes: nil, conditions: nil, + # The datetime when the rule was created. created_at: nil, + # 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. effective_start_date: nil, + # The entity type to which the rule is applied. entity_type: nil, + # The priority of the rule. priority: nil, + # The datetime when the rule was last updated. updated_at: nil ); end sig do @@ -155,8 +163,11 @@ module FinchAPI # Specifies the fields to be applied when the condition is met. sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -202,8 +213,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(field: nil, operator: nil, value: nil); end - + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ); end sig do override .returns( @@ -222,14 +239,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EQUALS = T.let( @@ -253,14 +263,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } PAY_STATEMENT_ITEM = T.let( diff --git a/rbi/lib/finch_api/models/hris/company/pay_statement_item_list_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi similarity index 87% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item_list_params.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi index e2765a6a..9a55e783 100644 --- a/rbi/lib/finch_api/models/hris/company/pay_statement_item_list_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi @@ -67,15 +67,21 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Comma-delimited list of pay statement item categories to filter on. If empty, + # defaults to all categories. categories: nil, + # The end date to retrieve pay statement items by via their last seen pay date in + # `YYYY-MM-DD` format. end_date: 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 + # (inclusive) in `YYYY-MM-DD` format. start_date: nil, + # String search by pay statement item type. type: nil, request_options: {} - ) - end - + ); end sig do override .returns( @@ -96,8 +102,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListParams::Category) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } EARNINGS = T.let(:earnings, FinchAPI::Models::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/company/pay_statement_item_list_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi similarity index 79% rename from rbi/lib/finch_api/models/hris/company/pay_statement_item_list_response.rbi rename to rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi index af9de71d..88ca704a 100644 --- a/rbi/lib/finch_api/models/hris/company/pay_statement_item_list_response.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi @@ -45,8 +45,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(attributes: nil, category: nil, name: nil); end - + def self.new( + # The attributes of the pay statement item. + attributes: nil, + # The category of the pay statement item. + category: nil, + # The name of the pay statement item. + name: nil + ); end sig do override .returns( @@ -67,7 +73,7 @@ module FinchAPI # The metadata of the pay statement item derived by the rules engine if available. # Each attribute will be a key-value pair defined by a rule. - sig { returns(T.nilable(T.anything)) } + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } attr_accessor :metadata # `true` if the pay statement item is pre-tax. This field is only available for @@ -83,20 +89,31 @@ module FinchAPI sig do params( employer: T.nilable(T::Boolean), - metadata: T.nilable(T.anything), + metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), pre_tax: T.nilable(T::Boolean), type: T.nilable(String) ) .returns(T.attached_class) end - def self.new(employer: nil, metadata: nil, pre_tax: nil, type: nil); end - + def self.new( + # `true` if the amount is paid by the employers. This field is only available for + # taxes. + employer: nil, + # The metadata of the pay statement item derived by the rules engine if available. + # Each attribute will be a key-value pair defined by a rule. + metadata: nil, + # `true` if the pay statement item is pre-tax. This field is only available for + # employee deductions. + pre_tax: nil, + # The type of the pay statement item. + type: nil + ); end sig do override .returns( { employer: T.nilable(T::Boolean), - metadata: T.nilable(T.anything), + metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), pre_tax: T.nilable(T::Boolean), type: T.nilable(String) } @@ -111,14 +128,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EARNINGS = T.let(:earnings, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol) diff --git a/rbi/finch_api/models/hris/company_benefit.rbi b/rbi/finch_api/models/hris/company_benefit.rbi new file mode 100644 index 00000000..b8391fa1 --- /dev/null +++ b/rbi/finch_api/models/hris/company_benefit.rbi @@ -0,0 +1,146 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class CompanyBenefit < FinchAPI::Internal::Type::BaseModel + # The id of the benefit. + sig { returns(String) } + attr_accessor :benefit_id + + # The company match for this benefit. + sig { returns(T.nilable(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution)) } + attr_reader :company_contribution + + sig do + params( + company_contribution: T.nilable(T.any(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution, FinchAPI::Internal::AnyHash)) + ) + .void + end + attr_writer :company_contribution + + sig { returns(T.nilable(String)) } + attr_accessor :description + + # The frequency of the benefit deduction/contribution. + sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol)) } + attr_accessor :frequency + + # Type of benefit. + sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitType::TaggedSymbol)) } + attr_accessor :type + + sig do + params( + benefit_id: String, + company_contribution: T.nilable(T.any(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution, FinchAPI::Internal::AnyHash)), + description: T.nilable(String), + frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), + type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol) + ) + .returns(T.attached_class) + end + def self.new( + # The id of the benefit. + benefit_id:, + # The company match for this benefit. + company_contribution:, + description:, + # The frequency of the benefit deduction/contribution. + frequency:, + # Type of benefit. + type: + ); end + sig do + override + .returns( + { + benefit_id: String, + company_contribution: T.nilable(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution), + description: T.nilable(String), + frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol), + type: T.nilable(FinchAPI::Models::HRIS::BenefitType::TaggedSymbol) + } + ) + end + def to_hash; end + + class CompanyContribution < FinchAPI::Internal::Type::BaseModel + sig { returns(T.nilable(T::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier])) } + attr_reader :tiers + + sig do + params( + tiers: T::Array[T.any(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier, FinchAPI::Internal::AnyHash)] + ) + .void + end + attr_writer :tiers + + sig { returns(T.nilable(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type::TaggedSymbol)) } + attr_reader :type + + sig { params(type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type::OrSymbol).void } + attr_writer :type + + # The company match for this benefit. + sig do + params( + tiers: T::Array[T.any(FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier, FinchAPI::Internal::AnyHash)], + type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type::OrSymbol + ) + .returns(T.attached_class) + end + def self.new(tiers: nil, type: nil); end + + sig do + override + .returns( + { + tiers: T::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier], + type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type::TaggedSymbol + } + ) + end + def to_hash; end + + class Tier < FinchAPI::Internal::Type::BaseModel + sig { returns(T.nilable(Integer)) } + attr_reader :match + + sig { params(match: Integer).void } + attr_writer :match + + sig { returns(T.nilable(Integer)) } + attr_reader :threshold + + sig { params(threshold: Integer).void } + attr_writer :threshold + + sig { params(match: Integer, threshold: Integer).returns(T.attached_class) } + def self.new(match: nil, threshold: nil); end + + sig { override.returns({match: Integer, threshold: Integer}) } + def to_hash; end + end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MATCH = T.let(:match, FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type::TaggedSymbol) + + sig do + override.returns(T::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Type::TaggedSymbol]) + end + def self.values; end + end + end + end + end + end +end diff --git a/rbi/lib/finch_api/models/hris/company_retrieve_params.rbi b/rbi/finch_api/models/hris/company_retrieve_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/company_retrieve_params.rbi rename to rbi/finch_api/models/hris/company_retrieve_params.rbi diff --git a/rbi/lib/finch_api/models/hris/create_company_benefits_response.rbi b/rbi/finch_api/models/hris/create_company_benefits_response.rbi similarity index 82% rename from rbi/lib/finch_api/models/hris/create_company_benefits_response.rbi rename to rbi/finch_api/models/hris/create_company_benefits_response.rbi index 0c7c7576..c25b617a 100644 --- a/rbi/lib/finch_api/models/hris/create_company_benefits_response.rbi +++ b/rbi/finch_api/models/hris/create_company_benefits_response.rbi @@ -12,8 +12,11 @@ module FinchAPI attr_accessor :job_id sig { params(benefit_id: String, job_id: String).returns(T.attached_class) } - def self.new(benefit_id:, job_id:); end - + def self.new( + # The id of the benefit. + benefit_id:, + job_id: + ); end sig { override.returns({benefit_id: String, job_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/directory_list_individuals_params.rbi b/rbi/finch_api/models/hris/directory_list_individuals_params.rbi similarity index 83% rename from rbi/lib/finch_api/models/hris/directory_list_individuals_params.rbi rename to rbi/finch_api/models/hris/directory_list_individuals_params.rbi index 1dba399e..aaae2515 100644 --- a/rbi/lib/finch_api/models/hris/directory_list_individuals_params.rbi +++ b/rbi/finch_api/models/hris/directory_list_individuals_params.rbi @@ -29,8 +29,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(limit: nil, offset: nil, request_options: {}); end - + def self.new( + # Number of employees to return (defaults to all) + limit: nil, + # Index to start from (defaults to 0) + offset: nil, + request_options: {} + ); end sig { override.returns({limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/directory_list_params.rbi b/rbi/finch_api/models/hris/directory_list_params.rbi similarity index 82% rename from rbi/lib/finch_api/models/hris/directory_list_params.rbi rename to rbi/finch_api/models/hris/directory_list_params.rbi index 837cecb0..c3140167 100644 --- a/rbi/lib/finch_api/models/hris/directory_list_params.rbi +++ b/rbi/finch_api/models/hris/directory_list_params.rbi @@ -29,8 +29,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(limit: nil, offset: nil, request_options: {}); end - + def self.new( + # Number of employees to return (defaults to all) + limit: nil, + # Index to start from (defaults to 0) + offset: nil, + request_options: {} + ); end sig { override.returns({limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/document_list_params.rbi b/rbi/finch_api/models/hris/document_list_params.rbi similarity index 82% rename from rbi/lib/finch_api/models/hris/document_list_params.rbi rename to rbi/finch_api/models/hris/document_list_params.rbi index 6b5889fb..d72a7487 100644 --- a/rbi/lib/finch_api/models/hris/document_list_params.rbi +++ b/rbi/finch_api/models/hris/document_list_params.rbi @@ -47,8 +47,19 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}); end - + def self.new( + # Comma-delimited list of stable Finch uuids for each individual. If empty, + # defaults to all individuals + individual_ids: nil, + # Number of documents to return (defaults to all) + limit: nil, + # Index to start from (defaults to 0) + offset: nil, + # Comma-delimited list of document types to filter on. If empty, defaults to all + # types + types: nil, + request_options: {} + ); end sig do override .returns( @@ -67,8 +78,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::DocumentListParams::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::DocumentListParams::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } W4_2020 = T.let(:w4_2020, FinchAPI::Models::HRIS::DocumentListParams::Type::TaggedSymbol) W4_2005 = T.let(:w4_2005, FinchAPI::Models::HRIS::DocumentListParams::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/document_list_response.rbi b/rbi/finch_api/models/hris/document_list_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/document_list_response.rbi rename to rbi/finch_api/models/hris/document_list_response.rbi diff --git a/rbi/lib/finch_api/models/hris/document_response.rbi b/rbi/finch_api/models/hris/document_response.rbi similarity index 80% rename from rbi/lib/finch_api/models/hris/document_response.rbi rename to rbi/finch_api/models/hris/document_response.rbi index 984f58f3..633ebb89 100644 --- a/rbi/lib/finch_api/models/hris/document_response.rbi +++ b/rbi/finch_api/models/hris/document_response.rbi @@ -45,8 +45,20 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(id: nil, individual_id: nil, type: nil, url: nil, year: nil); end - + def self.new( + # A stable Finch id for the document. + id: nil, + # The ID of the individual associated with the document. This will be null for + # employer-level documents. + individual_id: nil, + # The type of document. + type: nil, + # A URL to access the document. Format: + # `https://api.tryfinch.com/employer/documents/:document_id`. + url: nil, + # The year the document applies to, if available. + year: nil + ); end sig do override .returns( @@ -66,8 +78,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::DocumentResponse::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::DocumentResponse::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } W4_2020 = T.let(:w4_2020, FinchAPI::Models::HRIS::DocumentResponse::Type::TaggedSymbol) W4_2005 = T.let(:w4_2005, FinchAPI::Models::HRIS::DocumentResponse::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/document_retreive_params.rbi b/rbi/finch_api/models/hris/document_retreive_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/document_retreive_params.rbi rename to rbi/finch_api/models/hris/document_retreive_params.rbi diff --git a/rbi/lib/finch_api/models/hris/document_retreive_response.rbi b/rbi/finch_api/models/hris/document_retreive_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/document_retreive_response.rbi rename to rbi/finch_api/models/hris/document_retreive_response.rbi diff --git a/rbi/lib/finch_api/models/hris/employment_data.rbi b/rbi/finch_api/models/hris/employment_data.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/employment_data.rbi rename to rbi/finch_api/models/hris/employment_data.rbi index 9e79e163..ef5bad4e 100644 --- a/rbi/lib/finch_api/models/hris/employment_data.rbi +++ b/rbi/finch_api/models/hris/employment_data.rbi @@ -145,25 +145,45 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. id: nil, + # Worker's compensation classification code for this employee class_code: nil, + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. custom_fields: nil, + # The department object. department: nil, + # The employment object. employment: nil, + # The detailed employment status of the individual. Available options: `active`, + # `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`. employment_status: nil, end_date: nil, + # The legal first name of the individual. first_name: nil, + # The employee's income as reported by the provider. This may not always be + # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, + # depending on what information the provider returns. income: nil, + # The array of income history. income_history: nil, + # `true` if the individual an an active employee or contractor at the company. is_active: nil, + # The legal last name of the individual. last_name: nil, latest_rehire_date: nil, location: nil, + # The manager object representing the manager of the individual within the org. manager: nil, + # The legal middle name of the individual. middle_name: nil, + # The source system's unique employment identifier for this individual source_id: nil, start_date: nil, + # The current title of the individual. title: nil, + # This field is deprecated in favour of `source_id` work_id: nil ); end sig do @@ -222,8 +242,10 @@ module FinchAPI # The department object. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The name of the department associated with the individual. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -246,8 +268,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The secondary employment type of the individual. Options: `full_time`, + # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. + subtype: nil, + # The main employment type of the individual. + type: nil + ); end sig do override .returns( @@ -266,8 +293,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Subtype) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::EmploymentData::Employment::Subtype::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FULL_TIME = T.let(:full_time, FinchAPI::Models::HRIS::EmploymentData::Employment::Subtype::TaggedSymbol) INTERN = T.let(:intern, FinchAPI::Models::HRIS::EmploymentData::Employment::Subtype::TaggedSymbol) @@ -286,8 +312,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::EmploymentData::Employment::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::EmploymentData::Employment::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } EMPLOYEE = T.let(:employee, FinchAPI::Models::HRIS::EmploymentData::Employment::Type::TaggedSymbol) CONTRACTOR = T.let(:contractor, FinchAPI::Models::HRIS::EmploymentData::Employment::Type::TaggedSymbol) @@ -303,8 +328,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentStatus) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::EmploymentData::EmploymentStatus::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ACTIVE = T.let(:active, FinchAPI::Models::HRIS::EmploymentData::EmploymentStatus::TaggedSymbol) DECEASED = T.let(:deceased, FinchAPI::Models::HRIS::EmploymentData::EmploymentStatus::TaggedSymbol) @@ -328,8 +352,10 @@ module FinchAPI # The manager object representing the manager of the individual within the org. sig { params(id: String).returns(T.attached_class) } - def self.new(id: nil); end - + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. + id: nil + ); end sig { override.returns({id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/employment_data_response.rbi b/rbi/finch_api/models/hris/employment_data_response.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/employment_data_response.rbi rename to rbi/finch_api/models/hris/employment_data_response.rbi index 308b696e..91564a01 100644 --- a/rbi/lib/finch_api/models/hris/employment_data_response.rbi +++ b/rbi/finch_api/models/hris/employment_data_response.rbi @@ -31,8 +31,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(body: nil, code: nil, individual_id: nil); end - + def self.new( + body: nil, + code: nil, + # A stable Finch `id` (UUID v4) for an individual in the company. + individual_id: nil + ); end sig { override.returns({body: FinchAPI::Models::HRIS::EmploymentData, code: Integer, individual_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/employment_retrieve_many_params.rbi b/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi similarity index 77% rename from rbi/lib/finch_api/models/hris/employment_retrieve_many_params.rbi rename to rbi/finch_api/models/hris/employment_retrieve_many_params.rbi index de2b394c..6a59e73a 100644 --- a/rbi/lib/finch_api/models/hris/employment_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi @@ -18,8 +18,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(requests:, request_options: {}); end - + def self.new( + # The array of batch requests. + requests:, + request_options: {} + ); end sig do override .returns( @@ -39,8 +42,12 @@ module FinchAPI attr_accessor :individual_id sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id:); end - + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. There is no + # limit to the number of `individual_id` to send per request. It is preferantial + # to send all ids in a single request for Finch to optimize provider rate-limits. + individual_id: + ); end sig { override.returns({individual_id: String}) } def to_hash; end end diff --git a/rbi/finch_api/models/hris/individual.rbi b/rbi/finch_api/models/hris/individual.rbi new file mode 100644 index 00000000..2b52ef67 --- /dev/null +++ b/rbi/finch_api/models/hris/individual.rbi @@ -0,0 +1,317 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module Individual + extend FinchAPI::Internal::Type::Union + + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + # A stable Finch `id` (UUID v4) for an individual in the company. + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(String)) } + attr_accessor :dob + + # The EEOC-defined ethnicity of the individual. + sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol)) } + attr_accessor :ethnicity + + # The legal first name of the individual. + sig { returns(T.nilable(String)) } + attr_accessor :first_name + + # The gender of the individual. + sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol)) } + attr_accessor :gender + + # The legal last name of the individual. + sig { returns(T.nilable(String)) } + attr_accessor :last_name + + # The legal middle name of the individual. + sig { returns(T.nilable(String)) } + attr_accessor :middle_name + + sig { returns(T.nilable(T::Array[T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber)])) } + attr_accessor :phone_numbers + + # The preferred name of the individual. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_name + + sig { returns(T.nilable(FinchAPI::Models::Location)) } + attr_reader :residence + + sig { params(residence: T.nilable(T.any(FinchAPI::Models::Location, FinchAPI::Internal::AnyHash))).void } + attr_writer :residence + + sig { returns(T.nilable(T::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email])) } + attr_accessor :emails + + # Social Security Number of the individual in **encrypted** format. This field is + # only available with the `ssn` scope enabled and the + # `options: { include: ['ssn'] }` param set in the body. + sig { returns(T.nilable(String)) } + attr_accessor :encrypted_ssn + + # Social Security Number of the individual. This field is only available with the + # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the + # body. + # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). + sig { returns(T.nilable(String)) } + attr_accessor :ssn + + sig do + params( + id: String, + dob: T.nilable(String), + ethnicity: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::OrSymbol), + first_name: T.nilable(String), + gender: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::OrSymbol), + last_name: T.nilable(String), + middle_name: T.nilable(String), + phone_numbers: T.nilable( + T::Array[ + T.nilable( + T.any(FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber, FinchAPI::Internal::AnyHash) + ) + ] + ), + preferred_name: T.nilable(String), + residence: T.nilable(T.any(FinchAPI::Models::Location, FinchAPI::Internal::AnyHash)), + emails: T.nilable( + T::Array[T.any(FinchAPI::Models::HRIS::Individual::UnionMember0::Email, FinchAPI::Internal::AnyHash)] + ), + encrypted_ssn: T.nilable(String), + ssn: T.nilable(String) + ) + .returns(T.attached_class) + end + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. + id:, + dob:, + # The EEOC-defined ethnicity of the individual. + ethnicity:, + # The legal first name of the individual. + first_name:, + # The gender of the individual. + gender:, + # The legal last name of the individual. + last_name:, + # The legal middle name of the individual. + middle_name:, + phone_numbers:, + # The preferred name of the individual. + preferred_name:, + residence:, + emails: nil, + # Social Security Number of the individual in **encrypted** format. This field is + # only available with the `ssn` scope enabled and the + # `options: { include: ['ssn'] }` param set in the body. + encrypted_ssn: nil, + # Social Security Number of the individual. This field is only available with the + # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the + # body. + # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). + ssn: nil + ); end + sig do + override + .returns( + { + id: String, + dob: T.nilable(String), + ethnicity: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol), + first_name: T.nilable(String), + gender: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol), + last_name: T.nilable(String), + middle_name: T.nilable(String), + phone_numbers: T.nilable(T::Array[T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber)]), + preferred_name: T.nilable(String), + residence: T.nilable(FinchAPI::Models::Location), + emails: T.nilable(T::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email]), + encrypted_ssn: T.nilable(String), + ssn: T.nilable(String) + } + ) + end + def to_hash; end + + # The EEOC-defined ethnicity of the individual. + module Ethnicity + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ASIAN = T.let(:asian, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol) + WHITE = T.let(:white, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol) + BLACK_OR_AFRICAN_AMERICAN = + T.let( + :black_or_african_american, + FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + ) + NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = + T.let( + :native_hawaiian_or_pacific_islander, + FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + ) + AMERICAN_INDIAN_OR_ALASKA_NATIVE = + T.let( + :american_indian_or_alaska_native, + FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + ) + HISPANIC_OR_LATINO = + T.let(:hispanic_or_latino, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol) + TWO_OR_MORE_RACES = + T.let(:two_or_more_races, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol) + DECLINE_TO_SPECIFY = + T.let(:decline_to_specify, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol) + + sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol]) } + def self.values; end + end + + # The gender of the individual. + module Gender + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FEMALE = T.let(:female, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol) + MALE = T.let(:male, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol) + OTHER = T.let(:other, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol) + DECLINE_TO_SPECIFY = + T.let(:decline_to_specify, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol) + + sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Gender::TaggedSymbol]) } + def self.values; end + end + + class PhoneNumber < FinchAPI::Internal::Type::BaseModel + sig { returns(T.nilable(String)) } + attr_accessor :data + + sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol)) } + attr_accessor :type + + sig do + params( + data: T.nilable(String), + type: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type::OrSymbol) + ) + .returns(T.attached_class) + end + def self.new(data:, type:); end + + sig do + override + .returns( + { + data: T.nilable(String), + type: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol) + } + ) + end + def to_hash; end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WORK = T.let(:work, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol) + PERSONAL = + T.let(:personal, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol) + + sig do + override + .returns(T::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol]) + end + def self.values; end + end + end + + class Email < FinchAPI::Internal::Type::BaseModel + sig { returns(String) } + attr_accessor :data + + sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol)) } + attr_accessor :type + + sig do + params( + data: String, + type: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type::OrSymbol) + ) + .returns(T.attached_class) + end + def self.new(data:, type:); end + + sig do + override + .returns( + {data: String, type: T.nilable(FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol)} + ) + end + def to_hash; end + + module Type + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WORK = T.let(:work, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol) + PERSONAL = T.let(:personal, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol) + + sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol]) } + def self.values; end + end + end + end + + class BatchError < FinchAPI::Internal::Type::BaseModel + sig { returns(Float) } + attr_accessor :code + + sig { returns(String) } + attr_accessor :message + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(String)) } + attr_reader :finch_code + + sig { params(finch_code: String).void } + attr_writer :finch_code + + sig do + params(code: Float, message: String, name: String, finch_code: String).returns(T.attached_class) + end + def self.new(code:, message:, name:, finch_code: nil); end + + sig { override.returns({code: Float, message: String, name: String, finch_code: String}) } + def to_hash; end + end + + sig do + override + .returns( + [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] + ) + end + def self.variants; end + end + end + end +end diff --git a/rbi/lib/finch_api/models/hris/individual_in_directory.rbi b/rbi/finch_api/models/hris/individual_in_directory.rbi similarity index 78% rename from rbi/lib/finch_api/models/hris/individual_in_directory.rbi rename to rbi/finch_api/models/hris/individual_in_directory.rbi index c96894ca..139492e6 100644 --- a/rbi/lib/finch_api/models/hris/individual_in_directory.rbi +++ b/rbi/finch_api/models/hris/individual_in_directory.rbi @@ -5,11 +5,8 @@ module FinchAPI module HRIS class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel # A stable Finch `id` (UUID v4) for an individual in the company. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id + sig { returns(String) } + attr_accessor :id # The department object. sig { returns(T.nilable(FinchAPI::Models::HRIS::IndividualInDirectory::Department)) } @@ -64,16 +61,21 @@ module FinchAPI .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 - + # A stable Finch `id` (UUID v4) for an individual in the company. + id:, + # The department object. + department:, + # The legal first name of the individual. + first_name:, + # `true` if the individual is an active employee or contractor at the company. + is_active:, + # The legal last name of the individual. + last_name:, + # The manager object. + manager:, + # The legal middle name of the individual. + middle_name: + ); end sig do override .returns( @@ -97,24 +99,25 @@ module FinchAPI # The department object. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The name of the department. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end class Manager < FinchAPI::Internal::Type::BaseModel # A stable Finch `id` (UUID v4) for an individual in the company. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id + sig { returns(String) } + attr_accessor :id # The manager object. sig { params(id: String).returns(T.attached_class) } - def self.new(id: nil); end - + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. + id: + ); end sig { override.returns({id: String}) } def to_hash; end end diff --git a/rbi/finch_api/models/hris/individual_response.rbi b/rbi/finch_api/models/hris/individual_response.rbi new file mode 100644 index 00000000..791c5217 --- /dev/null +++ b/rbi/finch_api/models/hris/individual_response.rbi @@ -0,0 +1,48 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class IndividualResponse < FinchAPI::Internal::Type::BaseModel + sig do + returns( + T.any(FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError) + ) + end + attr_accessor :body + + sig { returns(Integer) } + attr_accessor :code + + sig { returns(String) } + attr_accessor :individual_id + + sig do + params( + body: T.any( + FinchAPI::Models::HRIS::Individual::UnionMember0, + FinchAPI::Internal::AnyHash, + FinchAPI::Models::HRIS::Individual::BatchError + ), + code: Integer, + individual_id: String + ) + .returns(T.attached_class) + end + def self.new(body:, code:, individual_id:); end + + sig do + override + .returns( + { + body: T.any(FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError), + code: Integer, + individual_id: String + } + ) + end + def to_hash; end + end + end + end +end diff --git a/rbi/lib/finch_api/models/hris/individual_retrieve_many_params.rbi b/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/individual_retrieve_many_params.rbi rename to rbi/finch_api/models/hris/individual_retrieve_many_params.rbi diff --git a/rbi/lib/finch_api/models/hris/pay_statement.rbi b/rbi/finch_api/models/hris/pay_statement.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/pay_statement.rbi rename to rbi/finch_api/models/hris/pay_statement.rbi index d914ae3d..ceeb2a50 100644 --- a/rbi/lib/finch_api/models/hris/pay_statement.rbi +++ b/rbi/finch_api/models/hris/pay_statement.rbi @@ -74,15 +74,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The array of earnings objects associated with this pay statement earnings: nil, + # The array of deductions objects associated with this pay statement. employee_deductions: nil, employer_contributions: nil, gross_pay: nil, + # A stable Finch `id` (UUID v4) for an individual in the company individual_id: nil, net_pay: nil, + # The payment method. payment_method: nil, + # The array of taxes objects associated with this pay statement. taxes: nil, + # The number of hours worked for this pay period total_hours: nil, + # The type of the payment associated with the pay statement. type: nil ); end sig do @@ -148,8 +155,20 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil); end - + def self.new( + # The earnings amount in cents. + amount: nil, + attributes: nil, + # The earnings currency code. + currency: nil, + # The number of hours associated with this earning. (For salaried employees, this + # could be hours per pay period, `0` or `null`, depending on the provider). + hours: nil, + # The exact name of the deduction from the pay statement. + name: nil, + # The type of earning. + type: nil + ); end sig do override .returns( @@ -199,8 +218,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -211,8 +234,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::PayStatement::Earning::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::PayStatement::Earning::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } SALARY = T.let(:salary, FinchAPI::Models::HRIS::PayStatement::Earning::Type::TaggedSymbol) WAGE = T.let(:wage, FinchAPI::Models::HRIS::PayStatement::Earning::Type::TaggedSymbol) @@ -281,8 +303,19 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil); end - + def self.new( + # The deduction amount in cents. + amount: nil, + attributes: nil, + # The deduction currency. + currency: nil, + # The deduction name from the pay statement. + name: nil, + # Boolean indicating if the deduction is pre-tax. + pre_tax: nil, + # Type of benefit. + type: nil + ); end sig do override .returns( @@ -340,8 +373,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -390,8 +427,17 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, name: nil, type: nil); end - + def self.new( + # The contribution amount in cents. + amount: nil, + attributes: nil, + # The contribution currency. + currency: nil, + # The contribution name from the pay statement. + name: nil, + # Type of benefit. + type: nil + ); end sig do override .returns( @@ -449,8 +495,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -462,8 +512,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::PayStatement::PaymentMethod) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::PayStatement::PaymentMethod::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } CHECK = T.let(:check, FinchAPI::Models::HRIS::PayStatement::PaymentMethod::TaggedSymbol) DIRECT_DEPOSIT = @@ -516,8 +565,19 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil); end - + def self.new( + # The tax amount in cents. + amount: nil, + attributes: nil, + # The currency code. + currency: nil, + # `true` if the amount is paid by the employers. + employer: nil, + # The exact name of tax from the pay statement. + name: nil, + # The type of taxes. + type: nil + ); end sig do override .returns( @@ -567,8 +627,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -579,8 +643,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::PayStatement::Tax::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::PayStatement::Tax::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } STATE = T.let(:state, FinchAPI::Models::HRIS::PayStatement::Tax::Type::TaggedSymbol) FEDERAL = T.let(:federal, FinchAPI::Models::HRIS::PayStatement::Tax::Type::TaggedSymbol) @@ -597,8 +660,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::PayStatement::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::PayStatement::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } REGULAR_PAYROLL = T.let(:regular_payroll, FinchAPI::Models::HRIS::PayStatement::Type::TaggedSymbol) OFF_CYCLE_PAYROLL = T.let(:off_cycle_payroll, FinchAPI::Models::HRIS::PayStatement::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/pay_statement_response.rbi b/rbi/finch_api/models/hris/pay_statement_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/pay_statement_response.rbi rename to rbi/finch_api/models/hris/pay_statement_response.rbi diff --git a/rbi/lib/finch_api/models/hris/pay_statement_response_body.rbi b/rbi/finch_api/models/hris/pay_statement_response_body.rbi similarity index 89% rename from rbi/lib/finch_api/models/hris/pay_statement_response_body.rbi rename to rbi/finch_api/models/hris/pay_statement_response_body.rbi index a3f8efd0..49aa13ae 100644 --- a/rbi/lib/finch_api/models/hris/pay_statement_response_body.rbi +++ b/rbi/finch_api/models/hris/pay_statement_response_body.rbi @@ -27,8 +27,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(paging: nil, pay_statements: nil); end - + def self.new( + paging: nil, + # The array of pay statements for the current payment. + pay_statements: nil + ); end sig do override .returns( diff --git a/rbi/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rbi b/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi similarity index 82% rename from rbi/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rbi rename to rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi index 8b7f29d9..705f8db9 100644 --- a/rbi/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi @@ -18,8 +18,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(requests:, request_options: {}); end - + def self.new( + # The array of batch requests. + requests:, + request_options: {} + ); end sig do override .returns( @@ -51,8 +54,14 @@ module FinchAPI attr_writer :offset sig { params(payment_id: String, limit: Integer, offset: Integer).returns(T.attached_class) } - def self.new(payment_id:, limit: nil, offset: nil); end - + def self.new( + # A stable Finch `id` (UUID v4) for a payment. + payment_id:, + # Number of pay statements to return (defaults to all). + limit: nil, + # Index to start from. + offset: nil + ); end sig { override.returns({payment_id: String, limit: Integer, offset: Integer}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/payment.rbi b/rbi/finch_api/models/hris/payment.rbi similarity index 95% rename from rbi/lib/finch_api/models/hris/payment.rbi rename to rbi/finch_api/models/hris/payment.rbi index af8c794d..916dc9b2 100644 --- a/rbi/lib/finch_api/models/hris/payment.rbi +++ b/rbi/finch_api/models/hris/payment.rbi @@ -89,17 +89,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The unique id for the payment. id: nil, company_debit: nil, debit_date: nil, employee_taxes: nil, employer_taxes: nil, gross_pay: nil, + # Array of every individual on this payment. individual_ids: nil, net_pay: nil, pay_date: nil, + # List of pay frequencies associated with this payment. pay_frequencies: nil, + # Array of the Finch id (uuidv4) of every pay group associated with this payment. pay_group_ids: nil, + # The pay period object. pay_period: nil ); end sig do @@ -127,8 +132,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Payment::PayFrequency) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::Payment::PayFrequency::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ANNUALLY = T.let(:annually, FinchAPI::Models::HRIS::Payment::PayFrequency::TaggedSymbol) SEMI_ANNUALLY = T.let(:semi_annually, FinchAPI::Models::HRIS::Payment::PayFrequency::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/payment_list_params.rbi b/rbi/finch_api/models/hris/payment_list_params.rbi similarity index 75% rename from rbi/lib/finch_api/models/hris/payment_list_params.rbi rename to rbi/finch_api/models/hris/payment_list_params.rbi index 0856ac74..2f72d87d 100644 --- a/rbi/lib/finch_api/models/hris/payment_list_params.rbi +++ b/rbi/finch_api/models/hris/payment_list_params.rbi @@ -25,8 +25,15 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(end_date:, start_date:, request_options: {}); end - + def self.new( + # The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` + # format. + end_date:, + # The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` + # format. + start_date:, + request_options: {} + ); end sig do override.returns({end_date: Date, start_date: Date, request_options: FinchAPI::RequestOptions}) end diff --git a/rbi/lib/finch_api/models/hris/support_per_benefit_type.rbi b/rbi/finch_api/models/hris/support_per_benefit_type.rbi similarity index 100% rename from rbi/lib/finch_api/models/hris/support_per_benefit_type.rbi rename to rbi/finch_api/models/hris/support_per_benefit_type.rbi diff --git a/rbi/lib/finch_api/models/hris/supported_benefit.rbi b/rbi/finch_api/models/hris/supported_benefit.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/supported_benefit.rbi rename to rbi/finch_api/models/hris/supported_benefit.rbi index dc0d7a2f..61a8de11 100644 --- a/rbi/lib/finch_api/models/hris/supported_benefit.rbi +++ b/rbi/finch_api/models/hris/supported_benefit.rbi @@ -63,12 +63,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Whether the provider supports an annual maximum for this benefit. annual_maximum: nil, + # Whether the provider supports catch up for this benefit. This field will only be + # true for retirement benefits. catch_up: nil, + # Supported contribution types. An empty array indicates contributions are not + # supported. company_contribution: nil, description: nil, + # Supported deduction types. An empty array indicates deductions are not + # supported. employee_deduction: nil, + # The list of frequencies supported by the provider for this benefit frequencies: nil, + # Whether the provider supports HSA contribution limits. Empty if this feature is + # not supported for the benefit. This array only has values for HSA benefits. hsa_contribution_limit: nil ); end sig do @@ -92,8 +102,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::SupportedBenefit::CompanyContribution) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let(:fixed, FinchAPI::Models::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol) PERCENT = T.let(:percent, FinchAPI::Models::HRIS::SupportedBenefit::CompanyContribution::TaggedSymbol) @@ -107,8 +116,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::SupportedBenefit::EmployeeDeduction) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::SupportedBenefit::EmployeeDeduction::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FIXED = T.let(:fixed, FinchAPI::Models::HRIS::SupportedBenefit::EmployeeDeduction::TaggedSymbol) PERCENT = T.let(:percent, FinchAPI::Models::HRIS::SupportedBenefit::EmployeeDeduction::TaggedSymbol) @@ -122,8 +130,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::SupportedBenefit::HsaContributionLimit) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::SupportedBenefit::HsaContributionLimit::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } INDIVIDUAL = T.let(:individual, FinchAPI::Models::HRIS::SupportedBenefit::HsaContributionLimit::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/update_company_benefit_response.rbi b/rbi/finch_api/models/hris/update_company_benefit_response.rbi similarity index 82% rename from rbi/lib/finch_api/models/hris/update_company_benefit_response.rbi rename to rbi/finch_api/models/hris/update_company_benefit_response.rbi index 546ce417..b14deafd 100644 --- a/rbi/lib/finch_api/models/hris/update_company_benefit_response.rbi +++ b/rbi/finch_api/models/hris/update_company_benefit_response.rbi @@ -12,8 +12,11 @@ module FinchAPI attr_accessor :job_id sig { params(benefit_id: String, job_id: String).returns(T.attached_class) } - def self.new(benefit_id:, job_id:); end - + def self.new( + # The id of the benefit. + benefit_id:, + job_id: + ); end sig { override.returns({benefit_id: String, job_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/hris/w42005.rbi b/rbi/finch_api/models/hris/w42005.rbi similarity index 87% rename from rbi/lib/finch_api/models/hris/w42005.rbi rename to rbi/finch_api/models/hris/w42005.rbi index d3e4cb1a..7b45d542 100644 --- a/rbi/lib/finch_api/models/hris/w42005.rbi +++ b/rbi/finch_api/models/hris/w42005.rbi @@ -32,8 +32,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(data: nil, type: nil, year: nil); end - + def self.new( + # Detailed information specific to the 2005 W4 form. + data: nil, + # Specifies the form type, indicating that this document is a 2005 W4 form. + type: nil, + # The tax year this W4 document applies to. + year: nil + ); end sig do override .returns( @@ -85,10 +91,15 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Additional withholding amount (in cents). additional_withholding: nil, + # Indicates exemption status from federal tax withholding. exemption: nil, + # The individual's filing status for tax purposes. filing_status: nil, + # The unique identifier for the individual associated with this 2005 W4 form. individual_id: nil, + # Total number of allowances claimed (in cents). total_number_of_allowances: nil ); end sig do @@ -110,8 +121,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::W42005::Data::Exemption) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::W42005::Data::Exemption::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } EXEMPT = T.let(:exempt, FinchAPI::Models::HRIS::W42005::Data::Exemption::TaggedSymbol) NON_EXEMPT = T.let(:non_exempt, FinchAPI::Models::HRIS::W42005::Data::Exemption::TaggedSymbol) @@ -125,8 +135,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::W42005::Data::FilingStatus) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::W42005::Data::FilingStatus::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } MARRIED = T.let(:married, FinchAPI::Models::HRIS::W42005::Data::FilingStatus::TaggedSymbol) MARRIED_BUT_WITHHOLD_AT_HIGHER_SINGLE_RATE = @@ -146,7 +155,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::W42005::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::W42005::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } W4_2005 = T.let(:w4_2005, FinchAPI::Models::HRIS::W42005::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/hris/w42020.rbi b/rbi/finch_api/models/hris/w42020.rbi similarity index 86% rename from rbi/lib/finch_api/models/hris/w42020.rbi rename to rbi/finch_api/models/hris/w42020.rbi index 3f00c1b7..a54f9700 100644 --- a/rbi/lib/finch_api/models/hris/w42020.rbi +++ b/rbi/finch_api/models/hris/w42020.rbi @@ -32,8 +32,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(data: nil, type: nil, year: nil); end - + def self.new( + # Detailed information specific to the 2020 W4 form. + data: nil, + # Specifies the form type, indicating that this document is a 2020 W4 form. + type: nil, + # The tax year this W4 document applies to. + year: nil + ); end sig do override .returns( @@ -98,13 +104,22 @@ module FinchAPI .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 claimed for dependents under 17 years old (in cents). amount_for_qualifying_children_under_17: nil, + # Deductible expenses (in cents). deductions: nil, + # Additional withholding amount (in cents). extra_withholding: nil, + # The individual's filing status for tax purposes. filing_status: nil, + # The unique identifier for the individual associated with this document. individual_id: nil, + # Additional income from sources outside of primary employment (in cents). other_income: nil, + # Total amount claimed for dependents and other credits (in cents). total_claim_dependent_and_other_credits: nil ); end sig do @@ -129,8 +144,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::W42020::Data::FilingStatus) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::W42020::Data::FilingStatus::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } HEAD_OF_HOUSEHOLD = T.let(:head_of_household, FinchAPI::Models::HRIS::W42020::Data::FilingStatus::TaggedSymbol) @@ -155,7 +169,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::W42020::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::W42020::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } W4_2020 = T.let(:w4_2020, FinchAPI::Models::HRIS::W42020::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/income.rbi b/rbi/finch_api/models/income.rbi similarity index 85% rename from rbi/lib/finch_api/models/income.rbi rename to rbi/finch_api/models/income.rbi index 8b3c3822..da871030 100644 --- a/rbi/lib/finch_api/models/income.rbi +++ b/rbi/finch_api/models/income.rbi @@ -32,8 +32,17 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, currency: nil, effective_date: nil, unit: nil); end - + def self.new( + # The income amount in cents. + amount: nil, + # The currency code. + currency: nil, + # The date the income amount went into effect. + effective_date: nil, + # The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, + # `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`. + unit: nil + ); end sig do override .returns( @@ -53,7 +62,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Income::Unit) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::Income::Unit::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } YEARLY = T.let(:yearly, FinchAPI::Models::Income::Unit::TaggedSymbol) QUARTERLY = T.let(:quarterly, FinchAPI::Models::Income::Unit::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/individual_event.rbi b/rbi/finch_api/models/individual_event.rbi similarity index 92% rename from rbi/lib/finch_api/models/individual_event.rbi rename to rbi/finch_api/models/individual_event.rbi index 98b67158..6f3e556e 100644 --- a/rbi/lib/finch_api/models/individual_event.rbi +++ b/rbi/finch_api/models/individual_event.rbi @@ -44,8 +44,10 @@ module FinchAPI attr_writer :individual_id sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id: nil); end - + def self.new( + # The ID of the individual related to the event. + individual_id: nil + ); end sig { override.returns({individual_id: String}) } def to_hash; end end @@ -54,8 +56,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::IndividualEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::IndividualEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } INDIVIDUAL_CREATED = T.let(:"individual.created", FinchAPI::Models::IndividualEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/introspection.rbi b/rbi/finch_api/models/introspection.rbi similarity index 84% rename from rbi/lib/finch_api/models/introspection.rbi rename to rbi/finch_api/models/introspection.rbi index 4da49a38..4aa1ccfd 100644 --- a/rbi/lib/finch_api/models/introspection.rbi +++ b/rbi/finch_api/models/introspection.rbi @@ -111,22 +111,48 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The Finch UUID of the token being introspected. id:, + # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection + # instead of this account ID. account_id:, authentication_methods:, + # The client ID of the application associated with the `access_token`. client_id:, + # The type of application associated with a token. client_type:, + # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection + # instead of this company ID. company_id:, + # The Finch UUID of the connection associated with the `access_token`. connection_id:, connection_status:, + # The type of the connection associated with the token. + # + # - `provider` - connection to an external provider + # - `finch` - finch-generated data. connection_type:, + # The email of your customer you provided to Finch when a connect session was + # created for this connection. customer_email:, + # The ID of your customer you provided to Finch when a connect session was created + # for this connection. customer_id:, + # The name of your customer you provided to Finch when a connect session was + # created for this connection. customer_name:, + # Whether the connection associated with the `access_token` uses the Assisted + # Connect Flow. (`true` if using Assisted Connect, `false` if connection is + # automated) manual:, + # [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll + # provider ID. payroll_provider_id:, + # An array of the authorized products associated with the `access_token`. products:, + # The ID of the provider associated with the `access_token`. provider_id:, + # The account username used for login associated with the `access_token`. username: ); end sig do @@ -195,8 +221,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(connection_status: nil, products: nil, type: nil); end - + def self.new( + connection_status: nil, + # An array of the authorized products associated with the `access_token`. + products: nil, + # The type of authentication method. + type: nil + ); end sig do override .returns( @@ -237,8 +268,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Introspection::AuthenticationMethod::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ASSISTED = T.let(:assisted, FinchAPI::Models::Introspection::AuthenticationMethod::Type::TaggedSymbol) CREDENTIAL = @@ -258,8 +288,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Introspection::ClientType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Introspection::ClientType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PRODUCTION = T.let(:production, FinchAPI::Models::Introspection::ClientType::TaggedSymbol) DEVELOPMENT = T.let(:development, FinchAPI::Models::Introspection::ClientType::TaggedSymbol) @@ -297,8 +326,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(last_successful_sync: nil, message: nil, status: nil); end - + def self.new( + # The datetime when the connection was last successfully synced. + last_successful_sync: nil, + message: nil, + status: nil + ); end sig do override .returns( @@ -316,8 +349,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Introspection::ConnectionType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Introspection::ConnectionType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PROVIDER = T.let(:provider, FinchAPI::Models::Introspection::ConnectionType::TaggedSymbol) FINCH = T.let(:finch, FinchAPI::Models::Introspection::ConnectionType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/job_completion_event.rbi b/rbi/finch_api/models/job_completion_event.rbi similarity index 92% rename from rbi/lib/finch_api/models/job_completion_event.rbi rename to rbi/finch_api/models/job_completion_event.rbi index 969f4418..79ae71ea 100644 --- a/rbi/lib/finch_api/models/job_completion_event.rbi +++ b/rbi/finch_api/models/job_completion_event.rbi @@ -45,8 +45,12 @@ module FinchAPI attr_accessor :job_url sig { params(job_id: String, job_url: String).returns(T.attached_class) } - def self.new(job_id:, job_url:); end - + def self.new( + # The id of the job which has completed. + job_id:, + # The url to query the result of the job. + job_url: + ); end sig { override.returns({job_id: String, job_url: String}) } def to_hash; end end @@ -55,8 +59,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::JobCompletionEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::JobCompletionEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } JOB_BENEFIT_CREATE_COMPLETED = T.let(:"job.benefit_create.completed", FinchAPI::Models::JobCompletionEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/jobs/automated_async_job.rbi b/rbi/finch_api/models/jobs/automated_async_job.rbi similarity index 84% rename from rbi/lib/finch_api/models/jobs/automated_async_job.rbi rename to rbi/finch_api/models/jobs/automated_async_job.rbi index 354cbf09..bd896185 100644 --- a/rbi/lib/finch_api/models/jobs/automated_async_job.rbi +++ b/rbi/finch_api/models/jobs/automated_async_job.rbi @@ -66,18 +66,28 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The datetime the job completed. completed_at:, + # The datetime when the job was created. for scheduled jobs, this will be the + # initial connection time. For ad-hoc jobs, this will be the time the creation + # request was received. created_at:, + # The id of the job that has been created. job_id:, + # The url that can be used to retrieve the job status job_url:, + # The input parameters for the job. params:, + # The datetime a job is scheduled to be run. For scheduled jobs, this datetime can + # be in the future if the job has not yet been enqueued. For ad-hoc jobs, this + # field will be null. scheduled_at:, + # The datetime a job entered into the job queue. started_at:, status:, + # The type of automated job type: - ) - end - + ); end sig do override .returns( @@ -106,8 +116,10 @@ module FinchAPI # The input parameters for the job. sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id: nil); end - + def self.new( + # The ID of the individual that the job was completed for. + individual_id: nil + ); end sig { override.returns({individual_id: String}) } def to_hash; end end @@ -116,8 +128,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PENDING = T.let(:pending, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status::TaggedSymbol) IN_PROGRESS = T.let(:in_progress, FinchAPI::Models::Jobs::AutomatedAsyncJob::Status::TaggedSymbol) @@ -136,8 +147,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } DATA_SYNC_ALL = T.let(:data_sync_all, FinchAPI::Models::Jobs::AutomatedAsyncJob::Type::TaggedSymbol) W4_FORM_EMPLOYEE_SYNC = diff --git a/rbi/lib/finch_api/models/jobs/automated_create_params.rbi b/rbi/finch_api/models/jobs/automated_create_params.rbi similarity index 87% rename from rbi/lib/finch_api/models/jobs/automated_create_params.rbi rename to rbi/finch_api/models/jobs/automated_create_params.rbi index 91d88190..d91f393b 100644 --- a/rbi/lib/finch_api/models/jobs/automated_create_params.rbi +++ b/rbi/finch_api/models/jobs/automated_create_params.rbi @@ -28,8 +28,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(type:, params:, request_options: {}); end - + def self.new( + # The type of job to start. + type:, + params:, + request_options: {} + ); end sig do override .returns( @@ -47,8 +51,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Jobs::AutomatedCreateParams::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } W4_FORM_EMPLOYEE_SYNC = T.let(:w4_form_employee_sync, FinchAPI::Models::Jobs::AutomatedCreateParams::Type::TaggedSymbol) @@ -63,8 +66,10 @@ module FinchAPI attr_accessor :individual_id sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id:); end - + def self.new( + # The unique ID of the individual for W-4 data sync. + individual_id: + ); end sig { override.returns({individual_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/jobs/automated_create_response.rbi b/rbi/finch_api/models/jobs/automated_create_response.rbi similarity index 74% rename from rbi/lib/finch_api/models/jobs/automated_create_response.rbi rename to rbi/finch_api/models/jobs/automated_create_response.rbi index 3b963e91..5fe8e92a 100644 --- a/rbi/lib/finch_api/models/jobs/automated_create_response.rbi +++ b/rbi/finch_api/models/jobs/automated_create_response.rbi @@ -24,8 +24,16 @@ module FinchAPI params(allowed_refreshes: Integer, job_id: String, job_url: String, remaining_refreshes: Integer) .returns(T.attached_class) end - def self.new(allowed_refreshes:, job_id:, job_url:, remaining_refreshes:); end - + def self.new( + # The number of allowed refreshes per hour (per hour, fixed window) + allowed_refreshes:, + # The id of the job that has been created. + job_id:, + # The url that can be used to retrieve the job status + job_url:, + # The number of remaining refreshes available (per hour, fixed window) + remaining_refreshes: + ); end sig do override .returns({ diff --git a/rbi/lib/finch_api/models/jobs/automated_list_params.rbi b/rbi/finch_api/models/jobs/automated_list_params.rbi similarity index 84% rename from rbi/lib/finch_api/models/jobs/automated_list_params.rbi rename to rbi/finch_api/models/jobs/automated_list_params.rbi index 174fc6e7..9adb93fd 100644 --- a/rbi/lib/finch_api/models/jobs/automated_list_params.rbi +++ b/rbi/finch_api/models/jobs/automated_list_params.rbi @@ -29,8 +29,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(limit: nil, offset: nil, request_options: {}); end - + def self.new( + # Number of items to return + limit: nil, + # Index to start from (defaults to 0) + offset: nil, + request_options: {} + ); end sig { override.returns({limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/jobs/automated_list_response.rbi b/rbi/finch_api/models/jobs/automated_list_response.rbi similarity index 92% rename from rbi/lib/finch_api/models/jobs/automated_list_response.rbi rename to rbi/finch_api/models/jobs/automated_list_response.rbi index ad992a0c..805f1893 100644 --- a/rbi/lib/finch_api/models/jobs/automated_list_response.rbi +++ b/rbi/finch_api/models/jobs/automated_list_response.rbi @@ -55,8 +55,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(quotas: nil); end - + def self.new( + # Information about remaining quotas for this connection. Only applicable for + # customers opted in to use Finch's Data Sync Refresh endpoint + # (`POST /jobs/automated`). Please contact a Finch representative for more + # details. + quotas: nil + ); end sig { override.returns({quotas: FinchAPI::Models::Jobs::AutomatedListResponse::Meta::Quotas}) } def to_hash; end diff --git a/rbi/lib/finch_api/models/jobs/automated_retrieve_params.rbi b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/jobs/automated_retrieve_params.rbi rename to rbi/finch_api/models/jobs/automated_retrieve_params.rbi diff --git a/rbi/lib/finch_api/models/jobs/manual_async_job.rbi b/rbi/finch_api/models/jobs/manual_async_job.rbi similarity index 88% rename from rbi/lib/finch_api/models/jobs/manual_async_job.rbi rename to rbi/finch_api/models/jobs/manual_async_job.rbi index 575d3382..b771145c 100644 --- a/rbi/lib/finch_api/models/jobs/manual_async_job.rbi +++ b/rbi/finch_api/models/jobs/manual_async_job.rbi @@ -22,8 +22,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(body:, job_id:, status:); end - + def self.new( + # Specific information about the job, such as individual statuses for batch jobs. + body:, + job_id:, + status: + ); end sig do override .returns( @@ -40,8 +44,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Jobs::ManualAsyncJob::Status) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Jobs::ManualAsyncJob::Status::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PENDING = T.let(:pending, FinchAPI::Models::Jobs::ManualAsyncJob::Status::TaggedSymbol) IN_PROGRESS = T.let(:in_progress, FinchAPI::Models::Jobs::ManualAsyncJob::Status::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/jobs/manual_retrieve_params.rbi b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/jobs/manual_retrieve_params.rbi rename to rbi/finch_api/models/jobs/manual_retrieve_params.rbi diff --git a/rbi/lib/finch_api/models/location.rbi b/rbi/finch_api/models/location.rbi similarity index 75% rename from rbi/lib/finch_api/models/location.rbi rename to rbi/finch_api/models/location.rbi index 25b204a6..2538e92e 100644 --- a/rbi/lib/finch_api/models/location.rbi +++ b/rbi/finch_api/models/location.rbi @@ -19,45 +19,49 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :line2 - sig { returns(T.nilable(String)) } - attr_accessor :name - # The postal code or zip code. sig { returns(T.nilable(String)) } attr_accessor :postal_code - sig { returns(T.nilable(String)) } - attr_accessor :source_id - # The state code. sig { returns(T.nilable(String)) } attr_accessor :state + sig { returns(T.nilable(String)) } + attr_accessor :name + + sig { returns(T.nilable(String)) } + attr_accessor :source_id + sig do params( city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), - name: T.nilable(String), postal_code: T.nilable(String), - source_id: T.nilable(String), - state: T.nilable(String) + state: T.nilable(String), + name: T.nilable(String), + source_id: T.nilable(String) ) .returns(T.attached_class) end def self.new( - city: nil, - country: nil, - line1: nil, - line2: nil, + # City, district, suburb, town, or village. + city:, + # The 2-letter ISO 3166 country code. + country:, + # Street address or PO box. + line1:, + # Apartment, suite, unit, or building. + line2:, + # The postal code or zip code. + postal_code:, + # The state code. + state:, name: nil, - postal_code: nil, - source_id: nil, - state: nil - ) - end - + source_id: nil + ); end sig do override .returns( @@ -66,10 +70,10 @@ module FinchAPI country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), - name: T.nilable(String), postal_code: T.nilable(String), - source_id: T.nilable(String), - state: T.nilable(String) + state: T.nilable(String), + name: T.nilable(String), + source_id: T.nilable(String) } ) end diff --git a/rbi/lib/finch_api/models/money.rbi b/rbi/finch_api/models/money.rbi similarity index 82% rename from rbi/lib/finch_api/models/money.rbi rename to rbi/finch_api/models/money.rbi index 33aefef7..ac69e9d6 100644 --- a/rbi/lib/finch_api/models/money.rbi +++ b/rbi/finch_api/models/money.rbi @@ -14,8 +14,11 @@ module FinchAPI attr_writer :currency sig { params(amount: T.nilable(Integer), currency: String).returns(T.attached_class) } - def self.new(amount: nil, currency: nil); end - + def self.new( + # Amount for money object (in cents) + amount: nil, + currency: nil + ); end sig { override.returns({amount: T.nilable(Integer), currency: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/operation_support.rbi b/rbi/finch_api/models/operation_support.rbi similarity index 92% rename from rbi/lib/finch_api/models/operation_support.rbi rename to rbi/finch_api/models/operation_support.rbi index 8ace05d6..ac4bb062 100644 --- a/rbi/lib/finch_api/models/operation_support.rbi +++ b/rbi/finch_api/models/operation_support.rbi @@ -13,7 +13,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::OperationSupport) } - OrSymbol = T.type_alias { T.any(Symbol, String, FinchAPI::Models::OperationSupport::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } SUPPORTED = T.let(:supported, FinchAPI::Models::OperationSupport::TaggedSymbol) NOT_SUPPORTED_BY_FINCH = T.let(:not_supported_by_finch, FinchAPI::Models::OperationSupport::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/operation_support_matrix.rbi b/rbi/finch_api/models/operation_support_matrix.rbi similarity index 64% rename from rbi/lib/finch_api/models/operation_support_matrix.rbi rename to rbi/finch_api/models/operation_support_matrix.rbi index 3587ec0e..7cc5c414 100644 --- a/rbi/lib/finch_api/models/operation_support_matrix.rbi +++ b/rbi/finch_api/models/operation_support_matrix.rbi @@ -64,8 +64,40 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(create: nil, delete: nil, read: nil, update: nil); end - + def self.new( + # - `supported`: This operation is supported by both the provider and Finch + # - `not_supported_by_finch`: This operation is not supported by Finch but + # supported by the provider + # - `not_supported_by_provider`: This operation is not supported by the provider, + # so Finch cannot support + # - `client_access_only`: This behavior is supported by the provider, but only + # available to the client and not to Finch + create: nil, + # - `supported`: This operation is supported by both the provider and Finch + # - `not_supported_by_finch`: This operation is not supported by Finch but + # supported by the provider + # - `not_supported_by_provider`: This operation is not supported by the provider, + # so Finch cannot support + # - `client_access_only`: This behavior is supported by the provider, but only + # available to the client and not to Finch + delete: nil, + # - `supported`: This operation is supported by both the provider and Finch + # - `not_supported_by_finch`: This operation is not supported by Finch but + # supported by the provider + # - `not_supported_by_provider`: This operation is not supported by the provider, + # so Finch cannot support + # - `client_access_only`: This behavior is supported by the provider, but only + # available to the client and not to Finch + read: nil, + # - `supported`: This operation is supported by both the provider and Finch + # - `not_supported_by_finch`: This operation is not supported by Finch but + # supported by the provider + # - `not_supported_by_provider`: This operation is not supported by the provider, + # so Finch cannot support + # - `client_access_only`: This behavior is supported by the provider, but only + # available to the client and not to Finch + update: nil + ); end sig do override .returns( diff --git a/rbi/lib/finch_api/models/paging.rbi b/rbi/finch_api/models/paging.rbi similarity index 52% rename from rbi/lib/finch_api/models/paging.rbi rename to rbi/finch_api/models/paging.rbi index 512a05eb..3da75819 100644 --- a/rbi/lib/finch_api/models/paging.rbi +++ b/rbi/finch_api/models/paging.rbi @@ -3,6 +3,10 @@ module FinchAPI module Models class Paging < FinchAPI::Internal::Type::BaseModel + # The current start index of the returned list of elements + sig { returns(Integer) } + attr_accessor :offset + # The total number of elements for the entire query (not just the given page) sig { returns(T.nilable(Integer)) } attr_reader :count @@ -10,17 +14,14 @@ module FinchAPI sig { params(count: Integer).void } attr_writer :count - # The current start index of the returned list of elements - sig { returns(T.nilable(Integer)) } - attr_reader :offset - - sig { params(offset: Integer).void } - attr_writer :offset - - sig { params(count: Integer, offset: Integer).returns(T.attached_class) } - def self.new(count: nil, offset: nil); end - - sig { override.returns({count: Integer, offset: Integer}) } + sig { params(offset: Integer, count: Integer).returns(T.attached_class) } + def self.new( + # The current start index of the returned list of elements + offset:, + # The total number of elements for the entire query (not just the given page) + count: nil + ); end + sig { override.returns({offset: Integer, count: Integer}) } def to_hash; end end end diff --git a/rbi/lib/finch_api/models/pay_statement_event.rbi b/rbi/finch_api/models/pay_statement_event.rbi similarity index 90% rename from rbi/lib/finch_api/models/pay_statement_event.rbi rename to rbi/finch_api/models/pay_statement_event.rbi index 19bd7204..919d48b0 100644 --- a/rbi/lib/finch_api/models/pay_statement_event.rbi +++ b/rbi/finch_api/models/pay_statement_event.rbi @@ -51,8 +51,12 @@ module FinchAPI attr_writer :payment_id sig { params(individual_id: String, payment_id: String).returns(T.attached_class) } - def self.new(individual_id: nil, payment_id: nil); end - + def self.new( + # The ID of the individual associated with the pay statement. + individual_id: nil, + # The ID of the payment associated with the pay statement. + payment_id: nil + ); end sig { override.returns({individual_id: String, payment_id: String}) } def to_hash; end end @@ -61,8 +65,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::PayStatementEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::PayStatementEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PAY_STATEMENT_CREATED = T.let(:"pay_statement.created", FinchAPI::Models::PayStatementEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/payment_event.rbi b/rbi/finch_api/models/payment_event.rbi similarity index 91% rename from rbi/lib/finch_api/models/payment_event.rbi rename to rbi/finch_api/models/payment_event.rbi index c75076b8..fcb2570e 100644 --- a/rbi/lib/finch_api/models/payment_event.rbi +++ b/rbi/finch_api/models/payment_event.rbi @@ -45,8 +45,12 @@ module FinchAPI attr_accessor :payment_id sig { params(pay_date: String, payment_id: String).returns(T.attached_class) } - def self.new(pay_date:, payment_id:); end - + def self.new( + # The date of the payment. + pay_date:, + # The ID of the payment. + payment_id: + ); end sig { override.returns({pay_date: String, payment_id: String}) } def to_hash; end end @@ -55,8 +59,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::PaymentEvent::EventType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::PaymentEvent::EventType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } PAYMENT_CREATED = T.let(:"payment.created", FinchAPI::Models::PaymentEvent::EventType::TaggedSymbol) PAYMENT_UPDATED = T.let(:"payment.updated", FinchAPI::Models::PaymentEvent::EventType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/payroll/pay_group_list_params.rbi b/rbi/finch_api/models/payroll/pay_group_list_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/payroll/pay_group_list_params.rbi rename to rbi/finch_api/models/payroll/pay_group_list_params.rbi diff --git a/rbi/lib/finch_api/models/payroll/pay_group_list_response.rbi b/rbi/finch_api/models/payroll/pay_group_list_response.rbi similarity index 90% rename from rbi/lib/finch_api/models/payroll/pay_group_list_response.rbi rename to rbi/finch_api/models/payroll/pay_group_list_response.rbi index afb43535..1f30b8ec 100644 --- a/rbi/lib/finch_api/models/payroll/pay_group_list_response.rbi +++ b/rbi/finch_api/models/payroll/pay_group_list_response.rbi @@ -36,8 +36,14 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(id: nil, name: nil, pay_frequencies: nil); end - + def self.new( + # Finch id (uuidv4) for the pay group + id: nil, + # Name of the pay group + name: nil, + # List of pay frequencies associated with this pay group + pay_frequencies: nil + ); end sig do override .returns( @@ -55,8 +61,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ANNUALLY = T.let(:annually, FinchAPI::Models::Payroll::PayGroupListResponse::PayFrequency::TaggedSymbol) SEMI_ANNUALLY = diff --git a/rbi/lib/finch_api/models/payroll/pay_group_retrieve_params.rbi b/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/payroll/pay_group_retrieve_params.rbi rename to rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi diff --git a/rbi/lib/finch_api/models/payroll/pay_group_retrieve_response.rbi b/rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi similarity index 89% rename from rbi/lib/finch_api/models/payroll/pay_group_retrieve_response.rbi rename to rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi index cc1a35dd..593960e2 100644 --- a/rbi/lib/finch_api/models/payroll/pay_group_retrieve_response.rbi +++ b/rbi/finch_api/models/payroll/pay_group_retrieve_response.rbi @@ -28,8 +28,15 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(id:, individual_ids:, name:, pay_frequencies:); end - + def self.new( + # Finch id (uuidv4) for the pay group + id:, + individual_ids:, + # Name of the pay group + name:, + # List of pay frequencies associated with this pay group + pay_frequencies: + ); end sig do override .returns( @@ -48,8 +55,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ANNUALLY = T.let(:annually, FinchAPI::Models::Payroll::PayGroupRetrieveResponse::PayFrequency::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/provider.rbi b/rbi/finch_api/models/provider.rbi similarity index 98% rename from rbi/lib/finch_api/models/provider.rbi rename to rbi/finch_api/models/provider.rbi index 658e5081..85337c58 100644 --- a/rbi/lib/finch_api/models/provider.rbi +++ b/rbi/finch_api/models/provider.rbi @@ -96,15 +96,27 @@ module FinchAPI .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. 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. 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, + # The list of Finch products supported on this payroll provider. products: nil ); end sig do @@ -171,8 +183,15 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(benefits_support: nil, supported_fields: nil, type: nil); end - + def self.new( + # Each benefit type and their supported features. If the benefit type is not + # supported, the property will be null + benefits_support: nil, + # The supported data fields returned by our HR and payroll endpoints + supported_fields: nil, + # The type of authentication method. + type: nil + ); end sig do override .returns( @@ -2213,8 +2232,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Provider::AuthenticationMethod::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Provider::AuthenticationMethod::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ASSISTED = T.let(:assisted, FinchAPI::Models::Provider::AuthenticationMethod::Type::TaggedSymbol) CREDENTIAL = T.let(:credential, FinchAPI::Models::Provider::AuthenticationMethod::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/provider_list_params.rbi b/rbi/finch_api/models/provider_list_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/provider_list_params.rbi rename to rbi/finch_api/models/provider_list_params.rbi diff --git a/rbi/lib/finch_api/models/request_forwarding_forward_params.rbi b/rbi/finch_api/models/request_forwarding_forward_params.rbi similarity index 68% rename from rbi/lib/finch_api/models/request_forwarding_forward_params.rbi rename to rbi/finch_api/models/request_forwarding_forward_params.rbi index 41f4e0b5..ec09ce79 100644 --- a/rbi/lib/finch_api/models/request_forwarding_forward_params.rbi +++ b/rbi/finch_api/models/request_forwarding_forward_params.rbi @@ -44,8 +44,26 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(method_:, route:, data: nil, headers: nil, params: nil, request_options: {}); end - + def self.new( + # The HTTP method for the forwarded request. Valid values include: `GET` , `POST` + # , `PUT` , `DELETE` , and `PATCH`. + method_:, + # The URL route path for the forwarded request. This value must begin with a + # forward-slash ( / ) and may only contain alphanumeric characters, hyphens, and + # underscores. + route:, + # The body for the forwarded request. This value must be specified as either a + # string or a valid JSON object. + data: nil, + # 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" }` + headers: nil, + # The query parameters for the forwarded request. This value must be specified as + # a valid JSON object rather than a query string. + params: nil, + request_options: {} + ); end sig do override .returns( diff --git a/rbi/lib/finch_api/models/request_forwarding_forward_response.rbi b/rbi/finch_api/models/request_forwarding_forward_response.rbi similarity index 69% rename from rbi/lib/finch_api/models/request_forwarding_forward_response.rbi rename to rbi/finch_api/models/request_forwarding_forward_response.rbi index 128548f8..b1b653a7 100644 --- a/rbi/lib/finch_api/models/request_forwarding_forward_response.rbi +++ b/rbi/finch_api/models/request_forwarding_forward_response.rbi @@ -41,8 +41,21 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(data:, headers:, request:, status_code:); 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: + ); end sig do override .returns( @@ -94,8 +107,23 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(data:, headers:, method_:, params:, route:); 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: + ); end sig do override .returns( diff --git a/rbi/lib/finch_api/models/sandbox/company_update_params.rbi b/rbi/finch_api/models/sandbox/company_update_params.rbi similarity index 88% rename from rbi/lib/finch_api/models/sandbox/company_update_params.rbi rename to rbi/finch_api/models/sandbox/company_update_params.rbi index ac659434..adf10910 100644 --- a/rbi/lib/finch_api/models/sandbox/company_update_params.rbi +++ b/rbi/finch_api/models/sandbox/company_update_params.rbi @@ -66,13 +66,21 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # An array of bank account objects associated with the payroll/HRIS system. accounts:, + # The array of company departments. departments:, + # The employer identification number. ein:, + # The entity type object. entity:, + # The legal name of the company. legal_name:, locations:, + # The email of the main administrator on the account. primary_email:, + # The phone number of the main administrator on the account. Format: E.164, with + # extension where applicable, e.g. `+NNNNNNNNNNN xExtension` primary_phone_number:, request_options: {} ); end @@ -127,14 +135,18 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The name of the bank associated in the payroll/HRIS system. account_name: nil, + # 10-12 digit number to specify the bank account account_number: nil, + # The type of bank account. account_type: nil, + # Name of the banking institution. institution_name: nil, + # A nine-digit code that's based on the U.S. Bank location where your account was + # opened. routing_number: nil - ) - end - + ); end sig do override .returns( @@ -155,8 +167,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } CHECKING = T.let(:checking, FinchAPI::Models::Sandbox::CompanyUpdateParams::Account::AccountType::TaggedSymbol) @@ -199,8 +210,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(name: nil, parent: nil); end - + def self.new( + # The department name. + name: nil, + # The parent department, if present. + parent: nil + ); end sig do override .returns( @@ -219,8 +234,10 @@ module FinchAPI # The parent department, if present. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The parent department's name. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -243,8 +260,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The tax payer subtype of the company. + subtype: nil, + # The tax payer type of the company. + type: nil + ); end sig do override .returns( @@ -262,8 +283,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } S_CORPORATION = T.let(:s_corporation, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Subtype::TaggedSymbol) @@ -282,8 +302,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } LLC = T.let(:llc, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type::TaggedSymbol) LP = T.let(:lp, FinchAPI::Models::Sandbox::CompanyUpdateParams::Entity::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/company_update_response.rbi b/rbi/finch_api/models/sandbox/company_update_response.rbi similarity index 88% rename from rbi/lib/finch_api/models/sandbox/company_update_response.rbi rename to rbi/finch_api/models/sandbox/company_update_response.rbi index 92e24330..7b0ec543 100644 --- a/rbi/lib/finch_api/models/sandbox/company_update_response.rbi +++ b/rbi/finch_api/models/sandbox/company_update_response.rbi @@ -66,17 +66,23 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # An array of bank account objects associated with the payroll/HRIS system. accounts:, + # The array of company departments. departments:, + # The employer identification number. ein:, + # The entity type object. entity:, + # The legal name of the company. legal_name:, locations:, + # The email of the main administrator on the account. primary_email:, + # The phone number of the main administrator on the account. Format: E.164, with + # extension where applicable, e.g. `+NNNNNNNNNNN xExtension` primary_phone_number: - ) - end - + ); end sig do override .returns( @@ -127,14 +133,18 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The name of the bank associated in the payroll/HRIS system. account_name: nil, + # 10-12 digit number to specify the bank account account_number: nil, + # The type of bank account. account_type: nil, + # Name of the banking institution. institution_name: nil, + # A nine-digit code that's based on the U.S. Bank location where your account was + # opened. routing_number: nil - ) - end - + ); end sig do override .returns( @@ -155,14 +165,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account::AccountType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account::AccountType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } CHECKING = T.let(:checking, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Account::AccountType::TaggedSymbol) @@ -205,8 +208,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(name: nil, parent: nil); end - + def self.new( + # The department name. + name: nil, + # The parent department, if present. + parent: nil + ); end sig do override .returns( @@ -225,8 +232,10 @@ module FinchAPI # The parent department, if present. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The parent department's name. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -249,8 +258,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The tax payer subtype of the company. + subtype: nil, + # The tax payer type of the company. + type: nil + ); end sig do override .returns( @@ -268,8 +281,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Subtype) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Subtype::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } S_CORPORATION = T.let(:s_corporation, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Subtype::TaggedSymbol) @@ -290,8 +302,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } LLC = T.let(:llc, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type::TaggedSymbol) LP = T.let(:lp, FinchAPI::Models::Sandbox::CompanyUpdateResponse::Entity::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/connection_create_params.rbi b/rbi/finch_api/models/sandbox/connection_create_params.rbi similarity index 89% rename from rbi/lib/finch_api/models/sandbox/connection_create_params.rbi rename to rbi/finch_api/models/sandbox/connection_create_params.rbi index 007d8b88..e7eefc04 100644 --- a/rbi/lib/finch_api/models/sandbox/connection_create_params.rbi +++ b/rbi/finch_api/models/sandbox/connection_create_params.rbi @@ -48,14 +48,16 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The provider associated with the connection provider_id:, authentication_type: nil, + # Optional: the size of the employer to be created with this connection. Defaults + # to 20. Note that if this is higher than 100, historical payroll data will not be + # generated, and instead only one pay period will be created. employee_size: nil, products: nil, request_options: {} - ) - end - + ); end sig do override .returns( @@ -75,8 +77,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } CREDENTIAL = T.let(:credential, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/connection_create_response.rbi b/rbi/finch_api/models/sandbox/connection_create_response.rbi similarity index 90% rename from rbi/lib/finch_api/models/sandbox/connection_create_response.rbi rename to rbi/finch_api/models/sandbox/connection_create_response.rbi index 17fdab9e..48c4b5bd 100644 --- a/rbi/lib/finch_api/models/sandbox/connection_create_response.rbi +++ b/rbi/finch_api/models/sandbox/connection_create_response.rbi @@ -50,11 +50,15 @@ module FinchAPI end def self.new( access_token:, + # [DEPRECATED] Use `connection_id` to associate a connection with an access token account_id:, authentication_type:, + # [DEPRECATED] Use `connection_id` to associate a connection with an access token company_id:, + # The ID of the new connection connection_id:, products:, + # The ID of the provider associated with the `access_token`. provider_id:, token_type: nil ); end @@ -80,14 +84,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::ConnectionCreateResponse::AuthenticationType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::ConnectionCreateResponse::AuthenticationType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } CREDENTIAL = T.let(:credential, FinchAPI::Models::Sandbox::ConnectionCreateResponse::AuthenticationType::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/connections/account_create_params.rbi b/rbi/finch_api/models/sandbox/connections/account_create_params.rbi similarity index 92% rename from rbi/lib/finch_api/models/sandbox/connections/account_create_params.rbi rename to rbi/finch_api/models/sandbox/connections/account_create_params.rbi index ded540b8..cfe1afc5 100644 --- a/rbi/lib/finch_api/models/sandbox/connections/account_create_params.rbi +++ b/rbi/finch_api/models/sandbox/connections/account_create_params.rbi @@ -50,13 +50,14 @@ module FinchAPI end def self.new( company_id:, + # The provider associated with the `access_token` provider_id:, authentication_type: nil, + # Optional, defaults to Organization products (`company`, `directory`, + # `employment`, `individual`) products: nil, request_options: {} - ) - end - + ); end sig do override .returns( @@ -76,14 +77,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } CREDENTIAL = T.let( diff --git a/rbi/lib/finch_api/models/sandbox/connections/account_create_response.rbi b/rbi/finch_api/models/sandbox/connections/account_create_response.rbi similarity index 90% rename from rbi/lib/finch_api/models/sandbox/connections/account_create_response.rbi rename to rbi/finch_api/models/sandbox/connections/account_create_response.rbi index 8008d45f..b6d64402 100644 --- a/rbi/lib/finch_api/models/sandbox/connections/account_create_response.rbi +++ b/rbi/finch_api/models/sandbox/connections/account_create_response.rbi @@ -44,15 +44,17 @@ module FinchAPI end def self.new( access_token:, + # [DEPRECATED] Use `connection_id` to associate a connection with an access token account_id:, authentication_type:, + # [DEPRECATED] Use `connection_id` to associate a connection with an access token company_id:, + # The ID of the new connection connection_id:, products:, + # The ID of the provider associated with the `access_token` provider_id: - ) - end - + ); end sig do override .returns( @@ -74,14 +76,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::Connections::AccountCreateResponse::AuthenticationType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::Connections::AccountCreateResponse::AuthenticationType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } CREDENTIAL = T.let( diff --git a/rbi/lib/finch_api/models/sandbox/connections/account_update_params.rbi b/rbi/finch_api/models/sandbox/connections/account_update_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/sandbox/connections/account_update_params.rbi rename to rbi/finch_api/models/sandbox/connections/account_update_params.rbi diff --git a/rbi/lib/finch_api/models/sandbox/connections/account_update_response.rbi b/rbi/finch_api/models/sandbox/connections/account_update_response.rbi similarity index 90% rename from rbi/lib/finch_api/models/sandbox/connections/account_update_response.rbi rename to rbi/finch_api/models/sandbox/connections/account_update_response.rbi index e440071d..08600c69 100644 --- a/rbi/lib/finch_api/models/sandbox/connections/account_update_response.rbi +++ b/rbi/finch_api/models/sandbox/connections/account_update_response.rbi @@ -42,15 +42,17 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # [DEPRECATED] Use `connection_id` to associate a connection with an access token account_id:, authentication_type:, + # [DEPRECATED] Use `connection_id` to associate a connection with an access token company_id:, products:, + # The ID of the provider associated with the `access_token` provider_id:, + # The ID of the new connection connection_id: nil - ) - end - + ); end sig do override .returns( @@ -71,14 +73,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse::AuthenticationType) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse::AuthenticationType::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } CREDENTIAL = T.let( diff --git a/rbi/lib/finch_api/models/sandbox/directory_create_params.rbi b/rbi/finch_api/models/sandbox/directory_create_params.rbi similarity index 89% rename from rbi/lib/finch_api/models/sandbox/directory_create_params.rbi rename to rbi/finch_api/models/sandbox/directory_create_params.rbi index c9429eed..5cc54de6 100644 --- a/rbi/lib/finch_api/models/sandbox/directory_create_params.rbi +++ b/rbi/finch_api/models/sandbox/directory_create_params.rbi @@ -27,8 +27,12 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(body: nil, request_options: {}); end - + def self.new( + # Array of individuals to create. Takes all combined fields from `/individual` and + # `/employment` endpoints. All fields are optional. + body: nil, + request_options: {} + ); end sig do override .returns( @@ -251,32 +255,60 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Worker's compensation classification code for this employee class_code: nil, + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. Custom fields are not currently supported for assisted + # connections. custom_fields: nil, + # The department object. department: nil, dob: nil, emails: nil, + # The employment object. employment: nil, + # The detailed employment status of the individual. employment_status: nil, + # Social Security Number of the individual in **encrypted** format. This field is + # only available with the `ssn` scope enabled and the + # `options: { include: ['ssn'] }` param set in the body. encrypted_ssn: nil, end_date: nil, + # The EEOC-defined ethnicity of the individual. ethnicity: nil, + # The legal first name of the individual. first_name: nil, + # The gender of the individual. gender: nil, + # The employee's income as reported by the provider. This may not always be + # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, + # depending on what information the provider returns. income: nil, + # The array of income history. income_history: nil, + # `true` if the individual an an active employee or contractor at the company. is_active: nil, + # The legal last name of the individual. last_name: nil, latest_rehire_date: nil, location: nil, + # The manager object representing the manager of the individual within the org. manager: nil, + # The legal middle name of the individual. middle_name: nil, phone_numbers: nil, + # The preferred name of the individual. preferred_name: nil, residence: nil, + # The source system's unique employment identifier for this individual source_id: nil, + # Social Security Number of the individual. This field is only available with the + # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the + # body. + # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). ssn: nil, start_date: nil, + # The current title of the individual. title: nil ); end sig do @@ -339,8 +371,10 @@ module FinchAPI # The department object. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The name of the department associated with the individual. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -377,8 +411,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } WORK = T.let(:work, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Email::Type::TaggedSymbol) PERSONAL = @@ -410,8 +443,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The secondary employment type of the individual. Options: `full_time`, + # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. + subtype: nil, + # The main employment type of the individual. + type: nil + ); end sig do override .returns( @@ -430,14 +468,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Subtype) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Subtype::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FULL_TIME = T.let( @@ -479,14 +510,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } EMPLOYEE = T.let(:employee, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Employment::Type::TaggedSymbol) @@ -507,14 +531,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } ACTIVE = T.let(:active, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::EmploymentStatus::TaggedSymbol) @@ -544,8 +561,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ASIAN = T.let(:asian, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity::TaggedSymbol) WHITE = T.let(:white, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Ethnicity::TaggedSymbol) @@ -589,8 +605,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FEMALE = T.let(:female, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender::TaggedSymbol) MALE = T.let(:male, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender::TaggedSymbol) @@ -612,8 +627,10 @@ module FinchAPI # The manager object representing the manager of the individual within the org. sig { params(id: String).returns(T.attached_class) } - def self.new(id: nil); end - + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. + id: nil + ); end sig { override.returns({id: String}) } def to_hash; end end @@ -650,14 +667,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } WORK = T.let(:work, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::PhoneNumber::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/directory_create_response.rbi b/rbi/finch_api/models/sandbox/directory_create_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/sandbox/directory_create_response.rbi rename to rbi/finch_api/models/sandbox/directory_create_response.rbi diff --git a/rbi/lib/finch_api/models/sandbox/employment_update_params.rbi b/rbi/finch_api/models/sandbox/employment_update_params.rbi similarity index 88% rename from rbi/lib/finch_api/models/sandbox/employment_update_params.rbi rename to rbi/finch_api/models/sandbox/employment_update_params.rbi index 81fc885f..d314aef3 100644 --- a/rbi/lib/finch_api/models/sandbox/employment_update_params.rbi +++ b/rbi/finch_api/models/sandbox/employment_update_params.rbi @@ -153,23 +153,41 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # Worker's compensation classification code for this employee class_code: nil, + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. Custom fields are not currently supported for assisted + # connections. custom_fields: nil, + # The department object. department: nil, + # The employment object. employment: nil, + # The detailed employment status of the individual. employment_status: nil, end_date: nil, + # The legal first name of the individual. first_name: nil, + # The employee's income as reported by the provider. This may not always be + # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, + # depending on what information the provider returns. income: nil, + # The array of income history. income_history: nil, + # `true` if the individual an an active employee or contractor at the company. is_active: nil, + # The legal last name of the individual. last_name: nil, latest_rehire_date: nil, location: nil, + # The manager object representing the manager of the individual within the org. manager: nil, + # The legal middle name of the individual. middle_name: nil, + # The source system's unique employment identifier for this individual source_id: nil, start_date: nil, + # The current title of the individual. title: nil, request_options: {} ); end @@ -225,8 +243,10 @@ module FinchAPI # The department object. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The name of the department associated with the individual. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -249,8 +269,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The secondary employment type of the individual. Options: `full_time`, + # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. + subtype: nil, + # The main employment type of the individual. + type: nil + ); end sig do override .returns( @@ -269,14 +294,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FULL_TIME = T.let(:full_time, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Subtype::TaggedSymbol) @@ -306,8 +324,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } EMPLOYEE = T.let(:employee, FinchAPI::Models::Sandbox::EmploymentUpdateParams::Employment::Type::TaggedSymbol) @@ -328,8 +345,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ACTIVE = T.let(:active, FinchAPI::Models::Sandbox::EmploymentUpdateParams::EmploymentStatus::TaggedSymbol) @@ -362,8 +378,10 @@ module FinchAPI # The manager object representing the manager of the individual within the org. sig { params(id: String).returns(T.attached_class) } - def self.new(id: nil); end - + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. + id: nil + ); end sig { override.returns({id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/sandbox/employment_update_response.rbi b/rbi/finch_api/models/sandbox/employment_update_response.rbi similarity index 88% rename from rbi/lib/finch_api/models/sandbox/employment_update_response.rbi rename to rbi/finch_api/models/sandbox/employment_update_response.rbi index 24c39502..12c464aa 100644 --- a/rbi/lib/finch_api/models/sandbox/employment_update_response.rbi +++ b/rbi/finch_api/models/sandbox/employment_update_response.rbi @@ -161,24 +161,43 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. id: nil, + # Worker's compensation classification code for this employee class_code: nil, + # Custom fields for the individual. These are fields which are defined by the + # employer in the system. Custom fields are not currently supported for assisted + # connections. custom_fields: nil, + # The department object. department: nil, + # The employment object. employment: nil, + # The detailed employment status of the individual. employment_status: nil, end_date: nil, + # The legal first name of the individual. first_name: nil, + # The employee's income as reported by the provider. This may not always be + # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, + # depending on what information the provider returns. income: nil, + # The array of income history. income_history: nil, + # `true` if the individual an an active employee or contractor at the company. is_active: nil, + # The legal last name of the individual. last_name: nil, latest_rehire_date: nil, location: nil, + # The manager object representing the manager of the individual within the org. manager: nil, + # The legal middle name of the individual. middle_name: nil, + # The source system's unique employment identifier for this individual source_id: nil, start_date: nil, + # The current title of the individual. title: nil ); end sig do @@ -233,8 +252,10 @@ module FinchAPI # The department object. sig { params(name: T.nilable(String)).returns(T.attached_class) } - def self.new(name: nil); end - + def self.new( + # The name of the department associated with the individual. + name: nil + ); end sig { override.returns({name: T.nilable(String)}) } def to_hash; end end @@ -257,8 +278,13 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(subtype: nil, type: nil); end - + def self.new( + # The secondary employment type of the individual. Options: `full_time`, + # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. + subtype: nil, + # The main employment type of the individual. + type: nil + ); end sig do override .returns( @@ -277,14 +303,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Subtype) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Subtype::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } FULL_TIME = T.let(:full_time, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Subtype::TaggedSymbol) @@ -315,8 +334,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } EMPLOYEE = T.let(:employee, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::Employment::Type::TaggedSymbol) @@ -337,8 +355,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::EmploymentStatus) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::EmploymentStatus::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ACTIVE = T.let(:active, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::EmploymentStatus::TaggedSymbol) @@ -372,8 +389,10 @@ module FinchAPI # The manager object representing the manager of the individual within the org. sig { params(id: String).returns(T.attached_class) } - def self.new(id: nil); end - + def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. + id: nil + ); end sig { override.returns({id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/sandbox/individual_update_params.rbi b/rbi/finch_api/models/sandbox/individual_update_params.rbi similarity index 90% rename from rbi/lib/finch_api/models/sandbox/individual_update_params.rbi rename to rbi/finch_api/models/sandbox/individual_update_params.rbi index 96de9fad..b0c642d6 100644 --- a/rbi/lib/finch_api/models/sandbox/individual_update_params.rbi +++ b/rbi/finch_api/models/sandbox/individual_update_params.rbi @@ -88,15 +88,28 @@ module FinchAPI def self.new( dob: nil, emails: nil, + # Social Security Number of the individual in **encrypted** format. This field is + # only available with the `ssn` scope enabled and the + # `options: { include: ['ssn'] }` param set in the body. encrypted_ssn: nil, + # The EEOC-defined ethnicity of the individual. ethnicity: nil, + # The legal first name of the individual. first_name: nil, + # The gender of the individual. gender: nil, + # The legal last name of the individual. last_name: nil, + # The legal middle name of the individual. middle_name: nil, phone_numbers: nil, + # The preferred name of the individual. preferred_name: nil, residence: nil, + # Social Security Number of the individual. This field is only available with the + # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the + # body. + # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). ssn: nil, request_options: {} ); end @@ -154,8 +167,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } WORK = T.let(:work, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type::TaggedSymbol) PERSONAL = T.let(:personal, FinchAPI::Models::Sandbox::IndividualUpdateParams::Email::Type::TaggedSymbol) @@ -171,8 +183,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ASIAN = T.let(:asian, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity::TaggedSymbol) WHITE = T.let(:white, FinchAPI::Models::Sandbox::IndividualUpdateParams::Ethnicity::TaggedSymbol) @@ -207,8 +218,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FEMALE = T.let(:female, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender::TaggedSymbol) MALE = T.let(:male, FinchAPI::Models::Sandbox::IndividualUpdateParams::Gender::TaggedSymbol) @@ -252,8 +262,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } WORK = T.let(:work, FinchAPI::Models::Sandbox::IndividualUpdateParams::PhoneNumber::Type::TaggedSymbol) PERSONAL = diff --git a/rbi/lib/finch_api/models/sandbox/individual_update_response.rbi b/rbi/finch_api/models/sandbox/individual_update_response.rbi similarity index 90% rename from rbi/lib/finch_api/models/sandbox/individual_update_response.rbi rename to rbi/finch_api/models/sandbox/individual_update_response.rbi index 04e8f7d4..cd1b6a13 100644 --- a/rbi/lib/finch_api/models/sandbox/individual_update_response.rbi +++ b/rbi/finch_api/models/sandbox/individual_update_response.rbi @@ -90,18 +90,32 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # A stable Finch `id` (UUID v4) for an individual in the company. id: nil, dob: nil, emails: nil, + # Social Security Number of the individual in **encrypted** format. This field is + # only available with the `ssn` scope enabled and the + # `options: { include: ['ssn'] }` param set in the body. encrypted_ssn: nil, + # The EEOC-defined ethnicity of the individual. ethnicity: nil, + # The legal first name of the individual. first_name: nil, + # The gender of the individual. gender: nil, + # The legal last name of the individual. last_name: nil, + # The legal middle name of the individual. middle_name: nil, phone_numbers: nil, + # The preferred name of the individual. preferred_name: nil, residence: nil, + # Social Security Number of the individual. This field is only available with the + # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the + # body. + # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). ssn: nil ); end sig do @@ -161,8 +175,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } WORK = T.let(:work, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Email::Type::TaggedSymbol) PERSONAL = @@ -179,8 +192,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Ethnicity) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Ethnicity::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } ASIAN = T.let(:asian, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Ethnicity::TaggedSymbol) WHITE = T.let(:white, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Ethnicity::TaggedSymbol) @@ -216,8 +228,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Gender) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Gender::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } FEMALE = T.let(:female, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Gender::TaggedSymbol) MALE = T.let(:male, FinchAPI::Models::Sandbox::IndividualUpdateResponse::Gender::TaggedSymbol) @@ -261,14 +272,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::Type) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } WORK = T.let(:work, FinchAPI::Models::Sandbox::IndividualUpdateResponse::PhoneNumber::Type::TaggedSymbol) PERSONAL = diff --git a/rbi/lib/finch_api/models/sandbox/job_create_params.rbi b/rbi/finch_api/models/sandbox/job_create_params.rbi similarity index 86% rename from rbi/lib/finch_api/models/sandbox/job_create_params.rbi rename to rbi/finch_api/models/sandbox/job_create_params.rbi index ad133db6..97d80c3b 100644 --- a/rbi/lib/finch_api/models/sandbox/job_create_params.rbi +++ b/rbi/finch_api/models/sandbox/job_create_params.rbi @@ -18,8 +18,11 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(type:, request_options: {}); end - + def self.new( + # The type of job to start. Currently the only supported type is `data_sync_all` + type:, + request_options: {} + ); end sig do override .returns( @@ -33,8 +36,7 @@ module FinchAPI extend FinchAPI::Internal::Type::Enum TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::JobCreateParams::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } DATA_SYNC_ALL = T.let(:data_sync_all, FinchAPI::Models::Sandbox::JobCreateParams::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/job_create_response.rbi b/rbi/finch_api/models/sandbox/job_create_response.rbi similarity index 74% rename from rbi/lib/finch_api/models/sandbox/job_create_response.rbi rename to rbi/finch_api/models/sandbox/job_create_response.rbi index 40b3da87..d9319124 100644 --- a/rbi/lib/finch_api/models/sandbox/job_create_response.rbi +++ b/rbi/finch_api/models/sandbox/job_create_response.rbi @@ -24,8 +24,16 @@ module FinchAPI params(allowed_refreshes: Integer, job_id: String, job_url: String, remaining_refreshes: Integer) .returns(T.attached_class) end - def self.new(allowed_refreshes:, job_id:, job_url:, remaining_refreshes:); end - + def self.new( + # The number of allowed refreshes per hour (per hour, fixed window) + allowed_refreshes:, + # The id of the job that has been created. + job_id:, + # The url that can be used to retrieve the job status + job_url:, + # The number of remaining refreshes available (per hour, fixed window) + remaining_refreshes: + ); end sig do override .returns({ diff --git a/rbi/lib/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbi b/rbi/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbi rename to rbi/finch_api/models/sandbox/jobs/configuration_retrieve_params.rbi diff --git a/rbi/lib/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbi b/rbi/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbi similarity index 100% rename from rbi/lib/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbi rename to rbi/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbi diff --git a/rbi/lib/finch_api/models/sandbox/jobs/configuration_update_params.rbi b/rbi/finch_api/models/sandbox/jobs/configuration_update_params.rbi similarity index 100% rename from rbi/lib/finch_api/models/sandbox/jobs/configuration_update_params.rbi rename to rbi/finch_api/models/sandbox/jobs/configuration_update_params.rbi diff --git a/rbi/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbi b/rbi/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbi similarity index 87% rename from rbi/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbi rename to rbi/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbi index 0a6be35e..75f49956 100644 --- a/rbi/lib/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbi +++ b/rbi/finch_api/models/sandbox/jobs/sandbox_job_configuration.rbi @@ -36,14 +36,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } COMPLETE = T.let(:complete, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus::TaggedSymbol) @@ -74,8 +67,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } DATA_SYNC_ALL = T.let(:data_sync_all, FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/payment_create_params.rbi b/rbi/finch_api/models/sandbox/payment_create_params.rbi similarity index 89% rename from rbi/lib/finch_api/models/sandbox/payment_create_params.rbi rename to rbi/finch_api/models/sandbox/payment_create_params.rbi index 1676a4bf..0475f5b9 100644 --- a/rbi/lib/finch_api/models/sandbox/payment_create_params.rbi +++ b/rbi/finch_api/models/sandbox/payment_create_params.rbi @@ -163,15 +163,22 @@ module FinchAPI .returns(T.attached_class) end def self.new( + # The array of earnings objects associated with this pay statement earnings: nil, + # The array of deductions objects associated with this pay statement. employee_deductions: nil, employer_contributions: nil, gross_pay: nil, + # A stable Finch `id` (UUID v4) for an individual in the company individual_id: nil, net_pay: nil, + # The payment method. payment_method: nil, + # The array of taxes objects associated with this pay statement. taxes: nil, + # The number of hours worked for this pay period total_hours: nil, + # The type of the payment associated with the pay statement. type: nil ); end sig do @@ -251,8 +258,20 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, hours: nil, name: nil, type: nil); end - + def self.new( + # The earnings amount in cents. + amount: nil, + attributes: nil, + # The earnings currency code. + currency: nil, + # The number of hours associated with this earning. (For salaried employees, this + # could be hours per pay period, `0` or `null`, depending on the provider). + hours: nil, + # The exact name of the deduction from the pay statement. + name: nil, + # The type of earning. + type: nil + ); end sig do override .returns( @@ -317,8 +336,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -330,14 +353,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } SALARY = T.let(:salary, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Earning::Type::TaggedSymbol) @@ -448,8 +464,19 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, name: nil, pre_tax: nil, type: nil); end - + def self.new( + # The deduction amount in cents. + amount: nil, + attributes: nil, + # The deduction currency. + currency: nil, + # The deduction name from the pay statement. + name: nil, + # Boolean indicating if the deduction is pre-tax. + pre_tax: nil, + # Type of benefit. + type: nil + ); end sig do override .returns( @@ -518,8 +545,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -578,8 +609,17 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, name: nil, type: nil); end - + def self.new( + # The contribution amount in cents. + amount: nil, + attributes: nil, + # The contribution currency. + currency: nil, + # The contribution name from the pay statement. + name: nil, + # Type of benefit. + type: nil + ); end sig do override .returns( @@ -647,8 +687,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -661,14 +705,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } CHECK = T.let(:check, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::PaymentMethod::TaggedSymbol) @@ -740,9 +777,19 @@ module FinchAPI ) .returns(T.attached_class) end - def self.new(amount: nil, attributes: nil, currency: nil, employer: nil, name: nil, type: nil) - end - + def self.new( + # The tax amount in cents. + amount: nil, + attributes: nil, + # The currency code. + currency: nil, + # `true` if the amount is paid by the employers. + employer: nil, + # The exact name of tax from the pay statement. + name: nil, + # The type of taxes. + type: nil + ); end sig do override .returns( @@ -807,8 +854,12 @@ module FinchAPI attr_writer :metadata sig { params(metadata: T::Hash[Symbol, T.anything]).returns(T.attached_class) } - def self.new(metadata: nil); end - + def self.new( + # The metadata to be attached to the entity by existing rules. It is a key-value + # pairs where the values can be of any type (string, number, boolean, object, + # array, etc.). + metadata: nil + ); end sig { override.returns({metadata: T::Hash[Symbol, T.anything]}) } def to_hash; end end @@ -820,14 +871,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type) } - OrSymbol = - T.type_alias do - T.any( - Symbol, - String, - FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol - ) - end + OrSymbol = T.type_alias { T.any(Symbol, String) } STATE = T.let(:state, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Tax::Type::TaggedSymbol) @@ -852,8 +896,7 @@ module FinchAPI TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol) } + OrSymbol = T.type_alias { T.any(Symbol, String) } REGULAR_PAYROLL = T.let(:regular_payroll, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::Type::TaggedSymbol) diff --git a/rbi/lib/finch_api/models/sandbox/payment_create_response.rbi b/rbi/finch_api/models/sandbox/payment_create_response.rbi similarity index 78% rename from rbi/lib/finch_api/models/sandbox/payment_create_response.rbi rename to rbi/finch_api/models/sandbox/payment_create_response.rbi index 177179a9..b2258095 100644 --- a/rbi/lib/finch_api/models/sandbox/payment_create_response.rbi +++ b/rbi/finch_api/models/sandbox/payment_create_response.rbi @@ -13,8 +13,12 @@ module FinchAPI attr_accessor :payment_id sig { params(pay_date: String, payment_id: String).returns(T.attached_class) } - def self.new(pay_date:, payment_id:); end - + def self.new( + # The date of the payment. + pay_date:, + # The ID of the payment. + payment_id: + ); end sig { override.returns({pay_date: String, payment_id: String}) } def to_hash; end end diff --git a/rbi/lib/finch_api/models/webhook_event.rbi b/rbi/finch_api/models/webhook_event.rbi similarity index 100% rename from rbi/lib/finch_api/models/webhook_event.rbi rename to rbi/finch_api/models/webhook_event.rbi diff --git a/rbi/lib/finch_api/request_options.rbi b/rbi/finch_api/request_options.rbi similarity index 95% rename from rbi/lib/finch_api/request_options.rbi rename to rbi/finch_api/request_options.rbi index 7c3a77f2..535d75f1 100644 --- a/rbi/lib/finch_api/request_options.rbi +++ b/rbi/finch_api/request_options.rbi @@ -1,6 +1,8 @@ # typed: strong module FinchAPI + RequestOpts = T.type_alias { T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash) } + # Specify HTTP behaviour to use for a specific request. These options supplement # or override those provided at the client level. # diff --git a/rbi/lib/finch_api/resources/access_tokens.rbi b/rbi/finch_api/resources/access_tokens.rbi similarity index 86% rename from rbi/lib/finch_api/resources/access_tokens.rbi rename to rbi/finch_api/resources/access_tokens.rbi index 6fa1e342..2c98bc9f 100644 --- a/rbi/lib/finch_api/resources/access_tokens.rbi +++ b/rbi/finch_api/resources/access_tokens.rbi @@ -10,7 +10,7 @@ module FinchAPI client_id: String, client_secret: String, redirect_uri: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::CreateAccessTokenResponse) end diff --git a/rbi/lib/finch_api/resources/account.rbi b/rbi/finch_api/resources/account.rbi similarity index 55% rename from rbi/lib/finch_api/resources/account.rbi rename to rbi/finch_api/resources/account.rbi index b23f9674..22b98cb5 100644 --- a/rbi/lib/finch_api/resources/account.rbi +++ b/rbi/finch_api/resources/account.rbi @@ -4,17 +4,11 @@ module FinchAPI module Resources class Account # Disconnect one or more `access_token`s from your application. - sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) - .returns(FinchAPI::Models::DisconnectResponse) - end + sig { params(request_options: FinchAPI::RequestOpts).returns(FinchAPI::Models::DisconnectResponse) } def disconnect(request_options: {}); end # Read account information associated with an `access_token` - sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) - .returns(FinchAPI::Models::Introspection) - end + sig { params(request_options: FinchAPI::RequestOpts).returns(FinchAPI::Models::Introspection) } def introspect(request_options: {}); end # @api private diff --git a/rbi/lib/finch_api/resources/connect.rbi b/rbi/finch_api/resources/connect.rbi similarity index 100% rename from rbi/lib/finch_api/resources/connect.rbi rename to rbi/finch_api/resources/connect.rbi diff --git a/rbi/lib/finch_api/resources/connect/sessions.rbi b/rbi/finch_api/resources/connect/sessions.rbi similarity index 92% rename from rbi/lib/finch_api/resources/connect/sessions.rbi rename to rbi/finch_api/resources/connect/sessions.rbi index fb09e4c0..2e633a67 100644 --- a/rbi/lib/finch_api/resources/connect/sessions.rbi +++ b/rbi/finch_api/resources/connect/sessions.rbi @@ -16,7 +16,7 @@ module FinchAPI minutes_to_expire: T.nilable(Float), redirect_uri: T.nilable(String), sandbox: T.nilable(FinchAPI::Models::Connect::SessionNewParams::Sandbox::OrSymbol), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Connect::SessionNewResponse) end @@ -41,7 +41,7 @@ module FinchAPI minutes_to_expire: T.nilable(Integer), products: T.nilable(T::Array[FinchAPI::Models::Connect::SessionReauthenticateParams::Product::OrSymbol]), redirect_uri: T.nilable(String), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Connect::SessionReauthenticateResponse) end diff --git a/rbi/lib/finch_api/resources/hris.rbi b/rbi/finch_api/resources/hris.rbi similarity index 100% rename from rbi/lib/finch_api/resources/hris.rbi rename to rbi/finch_api/resources/hris.rbi diff --git a/rbi/lib/finch_api/resources/hris/benefits.rbi b/rbi/finch_api/resources/hris/benefits.rbi similarity index 77% rename from rbi/lib/finch_api/resources/hris/benefits.rbi rename to rbi/finch_api/resources/hris/benefits.rbi index 7bc3794e..f580b301 100644 --- a/rbi/lib/finch_api/resources/hris/benefits.rbi +++ b/rbi/finch_api/resources/hris/benefits.rbi @@ -11,14 +11,19 @@ module FinchAPI # `/providers` endpoint to view available types for each provider. sig do params( + company_contribution: T.nilable( + T.any(FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, FinchAPI::Internal::AnyHash) + ), description: String, frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::HRIS::CreateCompanyBenefitsResponse) end def create( + # 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). @@ -31,21 +36,14 @@ module FinchAPI ); end # Lists deductions and contributions information for a given item sig do - params( - benefit_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(benefit_id: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::HRIS::CompanyBenefit) end def retrieve(benefit_id, request_options: {}); end # Updates an existing company-wide deduction or contribution sig do - params( - benefit_id: String, - description: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(benefit_id: String, description: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::HRIS::UpdateCompanyBenefitResponse) end def update( @@ -56,14 +54,14 @@ module FinchAPI ); end # List all company-wide deductions and contributions. sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) + params(request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Internal::SinglePage[FinchAPI::Models::HRIS::CompanyBenefit]) end def list(request_options: {}); end # Get deductions metadata sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) + params(request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Internal::SinglePage[FinchAPI::Models::HRIS::BenefitListSupportedBenefitsResponse]) end def list_supported_benefits(request_options: {}); end diff --git a/rbi/lib/finch_api/resources/hris/benefits/individuals.rbi b/rbi/finch_api/resources/hris/benefits/individuals.rbi similarity index 81% rename from rbi/lib/finch_api/resources/hris/benefits/individuals.rbi rename to rbi/finch_api/resources/hris/benefits/individuals.rbi index b4a7c9e0..151e0eb7 100644 --- a/rbi/lib/finch_api/resources/hris/benefits/individuals.rbi +++ b/rbi/finch_api/resources/hris/benefits/individuals.rbi @@ -18,7 +18,7 @@ module FinchAPI FinchAPI::Internal::AnyHash ) ], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::HRIS::Benefits::EnrolledIndividualBenefitResponse) end @@ -30,21 +30,14 @@ module FinchAPI ); end # Lists individuals currently enrolled in a given deduction. sig do - params( - benefit_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(benefit_id: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse) end def enrolled_ids(benefit_id, request_options: {}); end # Get enrollment information for the given individuals. sig do - params( - benefit_id: String, - individual_ids: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(benefit_id: String, individual_ids: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Internal::SinglePage[FinchAPI::Models::HRIS::Benefits::IndividualBenefit]) end def retrieve_many_benefits( @@ -59,7 +52,7 @@ module FinchAPI params( benefit_id: String, individual_ids: T::Array[String], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::HRIS::Benefits::UnenrolledIndividualBenefitResponse) end diff --git a/rbi/lib/finch_api/resources/hris/company.rbi b/rbi/finch_api/resources/hris/company.rbi similarity index 70% rename from rbi/lib/finch_api/resources/hris/company.rbi rename to rbi/finch_api/resources/hris/company.rbi index 9e924600..d4645081 100644 --- a/rbi/lib/finch_api/resources/hris/company.rbi +++ b/rbi/finch_api/resources/hris/company.rbi @@ -8,10 +8,7 @@ module FinchAPI attr_reader :pay_statement_item # Read basic company data - sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) - .returns(FinchAPI::Models::HRIS::HRISCompany) - end + sig { params(request_options: FinchAPI::RequestOpts).returns(FinchAPI::Models::HRIS::HRISCompany) } def retrieve(request_options: {}); end # @api private diff --git a/rbi/lib/finch_api/resources/hris/company/pay_statement_item.rbi b/rbi/finch_api/resources/hris/company/pay_statement_item.rbi similarity index 94% rename from rbi/lib/finch_api/resources/hris/company/pay_statement_item.rbi rename to rbi/finch_api/resources/hris/company/pay_statement_item.rbi index 88080728..e8265f07 100644 --- a/rbi/lib/finch_api/resources/hris/company/pay_statement_item.rbi +++ b/rbi/finch_api/resources/hris/company/pay_statement_item.rbi @@ -18,7 +18,7 @@ module FinchAPI name: String, start_date: Date, type: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::Company::PayStatementItemListResponse]) end diff --git a/rbi/lib/finch_api/resources/hris/company/pay_statement_item/rules.rbi b/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi similarity index 84% rename from rbi/lib/finch_api/resources/hris/company/pay_statement_item/rules.rbi rename to rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi index 8878dfaf..73c99e6f 100644 --- a/rbi/lib/finch_api/resources/hris/company/pay_statement_item/rules.rbi +++ b/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi @@ -27,7 +27,7 @@ module FinchAPI effective_end_date: T.nilable(String), effective_start_date: T.nilable(String), entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse) end @@ -46,11 +46,7 @@ module FinchAPI # **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. sig do - params( - rule_id: String, - optional_property: T.anything, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(rule_id: String, optional_property: T.anything, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse) end def update(rule_id, optional_property: nil, request_options: {}); end @@ -58,7 +54,7 @@ module FinchAPI # **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: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) + params(request_options: FinchAPI::RequestOpts) .returns( FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse] ) @@ -68,10 +64,7 @@ module FinchAPI # **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. sig do - params( - rule_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(rule_id: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse) end def delete(rule_id, request_options: {}); end diff --git a/rbi/lib/finch_api/resources/hris/directory.rbi b/rbi/finch_api/resources/hris/directory.rbi similarity index 77% rename from rbi/lib/finch_api/resources/hris/directory.rbi rename to rbi/finch_api/resources/hris/directory.rbi index e51a57a4..f0bb912c 100644 --- a/rbi/lib/finch_api/resources/hris/directory.rbi +++ b/rbi/finch_api/resources/hris/directory.rbi @@ -6,11 +6,7 @@ module FinchAPI class Directory # Read company directory and organization structure sig do - params( - limit: Integer, - offset: Integer, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(limit: Integer, offset: Integer, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Internal::IndividualsPage[FinchAPI::Models::HRIS::IndividualInDirectory]) end def list( diff --git a/rbi/lib/finch_api/resources/hris/documents.rbi b/rbi/finch_api/resources/hris/documents.rbi similarity index 85% rename from rbi/lib/finch_api/resources/hris/documents.rbi rename to rbi/finch_api/resources/hris/documents.rbi index a53b9c30..8200b6a9 100644 --- a/rbi/lib/finch_api/resources/hris/documents.rbi +++ b/rbi/finch_api/resources/hris/documents.rbi @@ -12,7 +12,7 @@ module FinchAPI limit: Integer, offset: Integer, types: T::Array[FinchAPI::Models::HRIS::DocumentListParams::Type::OrSymbol], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::HRIS::DocumentListResponse) end @@ -32,10 +32,7 @@ module FinchAPI # **Beta:** This endpoint is in beta and may change. Retrieve details of a # specific document by its ID. sig do - params( - document_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(document_id: String, request_options: FinchAPI::RequestOpts) .returns(T.any(FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005)) end def retreive( diff --git a/rbi/lib/finch_api/resources/hris/employments.rbi b/rbi/finch_api/resources/hris/employments.rbi similarity index 87% rename from rbi/lib/finch_api/resources/hris/employments.rbi rename to rbi/finch_api/resources/hris/employments.rbi index 3c3989f7..bcb56451 100644 --- a/rbi/lib/finch_api/resources/hris/employments.rbi +++ b/rbi/finch_api/resources/hris/employments.rbi @@ -8,7 +8,7 @@ module FinchAPI sig do params( requests: T::Array[T.any(FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request, FinchAPI::Internal::AnyHash)], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::EmploymentDataResponse]) end diff --git a/rbi/lib/finch_api/resources/hris/individuals.rbi b/rbi/finch_api/resources/hris/individuals.rbi similarity index 89% rename from rbi/lib/finch_api/resources/hris/individuals.rbi rename to rbi/finch_api/resources/hris/individuals.rbi index 411cd091..9a2e2ddb 100644 --- a/rbi/lib/finch_api/resources/hris/individuals.rbi +++ b/rbi/finch_api/resources/hris/individuals.rbi @@ -11,7 +11,7 @@ module FinchAPI T.any(FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, FinchAPI::Internal::AnyHash) ), requests: T::Array[T.any(FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Request, FinchAPI::Internal::AnyHash)], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::IndividualResponse]) end diff --git a/rbi/lib/finch_api/resources/hris/pay_statements.rbi b/rbi/finch_api/resources/hris/pay_statements.rbi similarity index 89% rename from rbi/lib/finch_api/resources/hris/pay_statements.rbi rename to rbi/finch_api/resources/hris/pay_statements.rbi index a41306ad..bc3493bd 100644 --- a/rbi/lib/finch_api/resources/hris/pay_statements.rbi +++ b/rbi/finch_api/resources/hris/pay_statements.rbi @@ -11,7 +11,7 @@ module FinchAPI sig do params( requests: T::Array[T.any(FinchAPI::Models::HRIS::PayStatementRetrieveManyParams::Request, FinchAPI::Internal::AnyHash)], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::PayStatementResponse]) end diff --git a/rbi/lib/finch_api/resources/hris/payments.rbi b/rbi/finch_api/resources/hris/payments.rbi similarity index 80% rename from rbi/lib/finch_api/resources/hris/payments.rbi rename to rbi/finch_api/resources/hris/payments.rbi index 400b58e0..a25c643b 100644 --- a/rbi/lib/finch_api/resources/hris/payments.rbi +++ b/rbi/finch_api/resources/hris/payments.rbi @@ -6,11 +6,7 @@ module FinchAPI class Payments # Read payroll and contractor related payments by the company. sig do - params( - end_date: Date, - start_date: Date, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(end_date: Date, start_date: Date, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Internal::SinglePage[FinchAPI::Models::HRIS::Payment]) end def list( diff --git a/rbi/lib/finch_api/resources/jobs.rbi b/rbi/finch_api/resources/jobs.rbi similarity index 100% rename from rbi/lib/finch_api/resources/jobs.rbi rename to rbi/finch_api/resources/jobs.rbi diff --git a/rbi/lib/finch_api/resources/jobs/automated.rbi b/rbi/finch_api/resources/jobs/automated.rbi similarity index 83% rename from rbi/lib/finch_api/resources/jobs/automated.rbi rename to rbi/finch_api/resources/jobs/automated.rbi index 38304e69..e17be991 100644 --- a/rbi/lib/finch_api/resources/jobs/automated.rbi +++ b/rbi/finch_api/resources/jobs/automated.rbi @@ -22,7 +22,7 @@ module FinchAPI params( type: FinchAPI::Models::Jobs::AutomatedCreateParams::Type::OrSymbol, params: T.any(FinchAPI::Models::Jobs::AutomatedCreateParams::Params, FinchAPI::Internal::AnyHash), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Jobs::AutomatedCreateResponse) end @@ -34,10 +34,7 @@ module FinchAPI ); end # Get an automated job by `job_id`. sig do - params( - job_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(job_id: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::Jobs::AutomatedAsyncJob) end def retrieve(job_id, request_options: {}); end @@ -46,11 +43,7 @@ module FinchAPI # jobs are sorted in descending order by submission time. For scheduled jobs such # as data syncs, only the next scheduled job is shown. sig do - params( - limit: Integer, - offset: Integer, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(limit: Integer, offset: Integer, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::Jobs::AutomatedListResponse) end def list( diff --git a/rbi/lib/finch_api/resources/jobs/manual.rbi b/rbi/finch_api/resources/jobs/manual.rbi similarity index 76% rename from rbi/lib/finch_api/resources/jobs/manual.rbi rename to rbi/finch_api/resources/jobs/manual.rbi index ecfd3d00..b9a14846 100644 --- a/rbi/lib/finch_api/resources/jobs/manual.rbi +++ b/rbi/finch_api/resources/jobs/manual.rbi @@ -7,10 +7,7 @@ module FinchAPI # Get a manual job by `job_id`. Manual jobs are completed by a human and include # Assisted Benefits jobs. sig do - params( - job_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(job_id: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::Jobs::ManualAsyncJob) end def retrieve(job_id, request_options: {}); end diff --git a/rbi/lib/finch_api/resources/payroll.rbi b/rbi/finch_api/resources/payroll.rbi similarity index 100% rename from rbi/lib/finch_api/resources/payroll.rbi rename to rbi/finch_api/resources/payroll.rbi diff --git a/rbi/lib/finch_api/resources/payroll/pay_groups.rbi b/rbi/finch_api/resources/payroll/pay_groups.rbi similarity index 76% rename from rbi/lib/finch_api/resources/payroll/pay_groups.rbi rename to rbi/finch_api/resources/payroll/pay_groups.rbi index 1d11e921..ee91bcba 100644 --- a/rbi/lib/finch_api/resources/payroll/pay_groups.rbi +++ b/rbi/finch_api/resources/payroll/pay_groups.rbi @@ -6,10 +6,7 @@ module FinchAPI class PayGroups # Read information from a single pay group sig do - params( - pay_group_id: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) - ) + params(pay_group_id: String, request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Models::Payroll::PayGroupRetrieveResponse) end def retrieve(pay_group_id, request_options: {}); end @@ -19,7 +16,7 @@ module FinchAPI params( individual_id: String, pay_frequencies: T::Array[String], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Internal::SinglePage[FinchAPI::Models::Payroll::PayGroupListResponse]) end diff --git a/rbi/lib/finch_api/resources/providers.rbi b/rbi/finch_api/resources/providers.rbi similarity index 80% rename from rbi/lib/finch_api/resources/providers.rbi rename to rbi/finch_api/resources/providers.rbi index 257d2793..f52f0f02 100644 --- a/rbi/lib/finch_api/resources/providers.rbi +++ b/rbi/finch_api/resources/providers.rbi @@ -5,7 +5,7 @@ module FinchAPI class Providers # Return details on all available payroll and HR systems. sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) + params(request_options: FinchAPI::RequestOpts) .returns(FinchAPI::Internal::SinglePage[FinchAPI::Models::Provider]) end def list(request_options: {}); end diff --git a/rbi/lib/finch_api/resources/request_forwarding.rbi b/rbi/finch_api/resources/request_forwarding.rbi similarity index 94% rename from rbi/lib/finch_api/resources/request_forwarding.rbi rename to rbi/finch_api/resources/request_forwarding.rbi index 2c49e5cc..92d3c5cf 100644 --- a/rbi/lib/finch_api/resources/request_forwarding.rbi +++ b/rbi/finch_api/resources/request_forwarding.rbi @@ -14,7 +14,7 @@ module FinchAPI data: T.nilable(String), headers: T.nilable(T.anything), params: T.nilable(T.anything), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::RequestForwardingForwardResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox.rbi b/rbi/finch_api/resources/sandbox.rbi similarity index 100% rename from rbi/lib/finch_api/resources/sandbox.rbi rename to rbi/finch_api/resources/sandbox.rbi diff --git a/rbi/lib/finch_api/resources/sandbox/company.rbi b/rbi/finch_api/resources/sandbox/company.rbi similarity index 95% rename from rbi/lib/finch_api/resources/sandbox/company.rbi rename to rbi/finch_api/resources/sandbox/company.rbi index 6e34f381..7c53b8b0 100644 --- a/rbi/lib/finch_api/resources/sandbox/company.rbi +++ b/rbi/finch_api/resources/sandbox/company.rbi @@ -19,7 +19,7 @@ module FinchAPI locations: T.nilable(T::Array[T.nilable(T.any(FinchAPI::Models::Location, FinchAPI::Internal::AnyHash))]), primary_email: T.nilable(String), primary_phone_number: T.nilable(String), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::CompanyUpdateResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox/connections.rbi b/rbi/finch_api/resources/sandbox/connections.rbi similarity index 92% rename from rbi/lib/finch_api/resources/sandbox/connections.rbi rename to rbi/finch_api/resources/sandbox/connections.rbi index d64f618b..50e79c72 100644 --- a/rbi/lib/finch_api/resources/sandbox/connections.rbi +++ b/rbi/finch_api/resources/sandbox/connections.rbi @@ -14,7 +14,7 @@ module FinchAPI authentication_type: FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType::OrSymbol, employee_size: Integer, products: T::Array[String], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::ConnectionCreateResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox/connections/accounts.rbi b/rbi/finch_api/resources/sandbox/connections/accounts.rbi similarity index 88% rename from rbi/lib/finch_api/resources/sandbox/connections/accounts.rbi rename to rbi/finch_api/resources/sandbox/connections/accounts.rbi index df64fc2c..373baf4b 100644 --- a/rbi/lib/finch_api/resources/sandbox/connections/accounts.rbi +++ b/rbi/finch_api/resources/sandbox/connections/accounts.rbi @@ -12,7 +12,7 @@ module FinchAPI provider_id: String, authentication_type: FinchAPI::Models::Sandbox::Connections::AccountCreateParams::AuthenticationType::OrSymbol, products: T::Array[String], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::Connections::AccountCreateResponse) end @@ -31,7 +31,7 @@ module FinchAPI sig do params( connection_status: FinchAPI::Models::ConnectionStatusType::OrSymbol, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox/directory.rbi b/rbi/finch_api/resources/sandbox/directory.rbi similarity index 88% rename from rbi/lib/finch_api/resources/sandbox/directory.rbi rename to rbi/finch_api/resources/sandbox/directory.rbi index 352da20b..f01f2b8c 100644 --- a/rbi/lib/finch_api/resources/sandbox/directory.rbi +++ b/rbi/finch_api/resources/sandbox/directory.rbi @@ -8,7 +8,7 @@ module FinchAPI sig do params( body: T::Array[T.any(FinchAPI::Models::Sandbox::DirectoryCreateParams::Body, FinchAPI::Internal::AnyHash)], - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(T::Array[T.anything]) end diff --git a/rbi/lib/finch_api/resources/sandbox/employment.rbi b/rbi/finch_api/resources/sandbox/employment.rbi similarity index 97% rename from rbi/lib/finch_api/resources/sandbox/employment.rbi rename to rbi/finch_api/resources/sandbox/employment.rbi index 8d9bf2a4..c2eb27b5 100644 --- a/rbi/lib/finch_api/resources/sandbox/employment.rbi +++ b/rbi/finch_api/resources/sandbox/employment.rbi @@ -30,7 +30,7 @@ module FinchAPI source_id: String, start_date: T.nilable(String), title: T.nilable(String), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::EmploymentUpdateResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox/individual.rbi b/rbi/finch_api/resources/sandbox/individual.rbi similarity index 96% rename from rbi/lib/finch_api/resources/sandbox/individual.rbi rename to rbi/finch_api/resources/sandbox/individual.rbi index 8742f5e8..a7a1ff98 100644 --- a/rbi/lib/finch_api/resources/sandbox/individual.rbi +++ b/rbi/finch_api/resources/sandbox/individual.rbi @@ -28,7 +28,7 @@ module FinchAPI preferred_name: T.nilable(String), residence: T.nilable(T.any(FinchAPI::Models::Location, FinchAPI::Internal::AnyHash)), ssn: T.nilable(String), - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::IndividualUpdateResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox/jobs.rbi b/rbi/finch_api/resources/sandbox/jobs.rbi similarity index 88% rename from rbi/lib/finch_api/resources/sandbox/jobs.rbi rename to rbi/finch_api/resources/sandbox/jobs.rbi index 35f09b57..90cc1e68 100644 --- a/rbi/lib/finch_api/resources/sandbox/jobs.rbi +++ b/rbi/finch_api/resources/sandbox/jobs.rbi @@ -11,7 +11,7 @@ module FinchAPI sig do params( type: FinchAPI::Models::Sandbox::JobCreateParams::Type::OrSymbol, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::JobCreateResponse) end diff --git a/rbi/lib/finch_api/resources/sandbox/jobs/configuration.rbi b/rbi/finch_api/resources/sandbox/jobs/configuration.rbi similarity index 82% rename from rbi/lib/finch_api/resources/sandbox/jobs/configuration.rbi rename to rbi/finch_api/resources/sandbox/jobs/configuration.rbi index 7f34336f..e7acc227 100644 --- a/rbi/lib/finch_api/resources/sandbox/jobs/configuration.rbi +++ b/rbi/finch_api/resources/sandbox/jobs/configuration.rbi @@ -7,7 +7,7 @@ module FinchAPI class Configuration # Get configurations for sandbox jobs sig do - params(request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash))) + params(request_options: FinchAPI::RequestOpts) .returns(T::Array[FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration]) end def retrieve(request_options: {}); end @@ -17,7 +17,7 @@ module FinchAPI params( completion_status: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::CompletionStatus::OrSymbol, type: FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration::Type::OrSymbol, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration) end diff --git a/rbi/lib/finch_api/resources/sandbox/payment.rbi b/rbi/finch_api/resources/sandbox/payment.rbi similarity index 87% rename from rbi/lib/finch_api/resources/sandbox/payment.rbi rename to rbi/finch_api/resources/sandbox/payment.rbi index 08b09383..f2b57247 100644 --- a/rbi/lib/finch_api/resources/sandbox/payment.rbi +++ b/rbi/finch_api/resources/sandbox/payment.rbi @@ -10,7 +10,7 @@ module FinchAPI end_date: String, pay_statements: T::Array[T.any(FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement, FinchAPI::Internal::AnyHash)], start_date: String, - request_options: T.nilable(T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash)) + request_options: FinchAPI::RequestOpts ) .returns(FinchAPI::Models::Sandbox::PaymentCreateResponse) end diff --git a/rbi/lib/finch_api/resources/webhooks.rbi b/rbi/finch_api/resources/webhooks.rbi similarity index 100% rename from rbi/lib/finch_api/resources/webhooks.rbi rename to rbi/finch_api/resources/webhooks.rbi diff --git a/rbi/lib/finch_api/version.rbi b/rbi/finch_api/version.rbi similarity index 100% rename from rbi/lib/finch_api/version.rbi rename to rbi/finch_api/version.rbi diff --git a/rbi/lib/finch_api/models/hris/benefit_create_params.rbi b/rbi/lib/finch_api/models/hris/benefit_create_params.rbi deleted file mode 100644 index d3769b9b..00000000 --- a/rbi/lib/finch_api/models/hris/benefit_create_params.rbi +++ /dev/null @@ -1,53 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - # 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). - sig { returns(T.nilable(String)) } - attr_reader :description - - sig { params(description: String).void } - attr_writer :description - - # The frequency of the benefit deduction/contribution. - sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol)) } - attr_accessor :frequency - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol)) } - attr_accessor :type - - sig do - params( - description: String, - frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), - type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol), - request_options: T.any(FinchAPI::RequestOptions, FinchAPI::Internal::AnyHash) - ) - .returns(T.attached_class) - end - def self.new(description: nil, frequency: nil, type: nil, request_options: {}); end - - sig do - override - .returns( - { - description: String, - frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), - type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol), - request_options: FinchAPI::RequestOptions - } - ) - end - def to_hash; end - end - end - end -end diff --git a/rbi/lib/finch_api/models/hris/company_benefit.rbi b/rbi/lib/finch_api/models/hris/company_benefit.rbi deleted file mode 100644 index 33a71b36..00000000 --- a/rbi/lib/finch_api/models/hris/company_benefit.rbi +++ /dev/null @@ -1,48 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - class CompanyBenefit < FinchAPI::Internal::Type::BaseModel - # The id of the benefit. - sig { returns(String) } - attr_accessor :benefit_id - - sig { returns(T.nilable(String)) } - attr_accessor :description - - # The frequency of the benefit deduction/contribution. - sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol)) } - attr_accessor :frequency - - # Type of benefit. - sig { returns(T.nilable(FinchAPI::Models::HRIS::BenefitType::TaggedSymbol)) } - attr_accessor :type - - sig do - params( - benefit_id: String, - description: T.nilable(String), - frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::OrSymbol), - type: T.nilable(FinchAPI::Models::HRIS::BenefitType::OrSymbol) - ) - .returns(T.attached_class) - end - def self.new(benefit_id:, description:, frequency:, type:); end - - sig do - override - .returns( - { - benefit_id: String, - description: T.nilable(String), - frequency: T.nilable(FinchAPI::Models::HRIS::BenefitFrequency::TaggedSymbol), - type: T.nilable(FinchAPI::Models::HRIS::BenefitType::TaggedSymbol) - } - ) - end - def to_hash; end - end - end - end -end diff --git a/rbi/lib/finch_api/models/hris/individual.rbi b/rbi/lib/finch_api/models/hris/individual.rbi deleted file mode 100644 index b6d21ee5..00000000 --- a/rbi/lib/finch_api/models/hris/individual.rbi +++ /dev/null @@ -1,248 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - class Individual < FinchAPI::Internal::Type::BaseModel - # A stable Finch `id` (UUID v4) for an individual in the company. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id - - sig { returns(T.nilable(String)) } - attr_accessor :dob - - sig { returns(T.nilable(T::Array[FinchAPI::Models::HRIS::Individual::Email])) } - attr_accessor :emails - - # Social Security Number of the individual in **encrypted** format. This field is - # only available with the `ssn` scope enabled and the - # `options: { include: ['ssn'] }` param set in the body. - sig { returns(T.nilable(String)) } - attr_accessor :encrypted_ssn - - # The EEOC-defined ethnicity of the individual. - sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol)) } - attr_accessor :ethnicity - - # The legal first name of the individual. - sig { returns(T.nilable(String)) } - attr_accessor :first_name - - # The gender of the individual. - sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol)) } - attr_accessor :gender - - # The legal last name of the individual. - sig { returns(T.nilable(String)) } - attr_accessor :last_name - - # The legal middle name of the individual. - sig { returns(T.nilable(String)) } - attr_accessor :middle_name - - sig { returns(T.nilable(T::Array[T.nilable(FinchAPI::Models::HRIS::Individual::PhoneNumber)])) } - attr_accessor :phone_numbers - - # The preferred name of the individual. - sig { returns(T.nilable(String)) } - attr_accessor :preferred_name - - sig { returns(T.nilable(FinchAPI::Models::Location)) } - attr_reader :residence - - sig { params(residence: T.nilable(T.any(FinchAPI::Models::Location, FinchAPI::Internal::AnyHash))).void } - attr_writer :residence - - # Social Security Number of the individual. This field is only available with the - # `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the - # body. - # [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field). - sig { returns(T.nilable(String)) } - attr_accessor :ssn - - sig do - params( - id: String, - dob: T.nilable(String), - emails: T.nilable(T::Array[T.any(FinchAPI::Models::HRIS::Individual::Email, FinchAPI::Internal::AnyHash)]), - encrypted_ssn: T.nilable(String), - ethnicity: T.nilable(FinchAPI::Models::HRIS::Individual::Ethnicity::OrSymbol), - first_name: T.nilable(String), - gender: T.nilable(FinchAPI::Models::HRIS::Individual::Gender::OrSymbol), - last_name: T.nilable(String), - middle_name: T.nilable(String), - phone_numbers: T.nilable( - T::Array[T.nilable(T.any(FinchAPI::Models::HRIS::Individual::PhoneNumber, FinchAPI::Internal::AnyHash))] - ), - preferred_name: T.nilable(String), - residence: T.nilable(T.any(FinchAPI::Models::Location, FinchAPI::Internal::AnyHash)), - ssn: T.nilable(String) - ) - .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: String, - dob: T.nilable(String), - emails: T.nilable(T::Array[FinchAPI::Models::HRIS::Individual::Email]), - encrypted_ssn: T.nilable(String), - ethnicity: T.nilable(FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol), - first_name: T.nilable(String), - gender: T.nilable(FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol), - last_name: T.nilable(String), - middle_name: T.nilable(String), - phone_numbers: T.nilable(T::Array[T.nilable(FinchAPI::Models::HRIS::Individual::PhoneNumber)]), - preferred_name: T.nilable(String), - residence: T.nilable(FinchAPI::Models::Location), - ssn: T.nilable(String) - } - ) - end - def to_hash; end - - class Email < FinchAPI::Internal::Type::BaseModel - sig { returns(T.nilable(String)) } - attr_reader :data - - sig { params(data: String).void } - attr_writer :data - - sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::Email::Type::TaggedSymbol)) } - attr_accessor :type - - sig do - params(data: String, type: T.nilable(FinchAPI::Models::HRIS::Individual::Email::Type::OrSymbol)) - .returns(T.attached_class) - end - def self.new(data: nil, type: nil); end - - sig do - override - .returns({data: String, type: T.nilable(FinchAPI::Models::HRIS::Individual::Email::Type::TaggedSymbol)}) - end - def to_hash; end - - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::Email::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::Individual::Email::Type::TaggedSymbol) } - - WORK = T.let(:work, FinchAPI::Models::HRIS::Individual::Email::Type::TaggedSymbol) - PERSONAL = T.let(:personal, FinchAPI::Models::HRIS::Individual::Email::Type::TaggedSymbol) - - sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::Email::Type::TaggedSymbol]) } - def self.values; end - end - end - - # The EEOC-defined ethnicity of the individual. - module Ethnicity - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::Ethnicity) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) } - - ASIAN = T.let(:asian, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - WHITE = T.let(:white, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - BLACK_OR_AFRICAN_AMERICAN = - T.let(:black_or_african_american, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = - T.let(:native_hawaiian_or_pacific_islander, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - AMERICAN_INDIAN_OR_ALASKA_NATIVE = - T.let(:american_indian_or_alaska_native, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - HISPANIC_OR_LATINO = - T.let(:hispanic_or_latino, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - TWO_OR_MORE_RACES = - T.let(:two_or_more_races, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - DECLINE_TO_SPECIFY = - T.let(:decline_to_specify, FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol) - - sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::Ethnicity::TaggedSymbol]) } - def self.values; end - end - - # The gender of the individual. - module Gender - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::Gender) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol) } - - FEMALE = T.let(:female, FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol) - MALE = T.let(:male, FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol) - OTHER = T.let(:other, FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol) - DECLINE_TO_SPECIFY = T.let(:decline_to_specify, FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol) - - sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::Gender::TaggedSymbol]) } - def self.values; end - end - - class PhoneNumber < FinchAPI::Internal::Type::BaseModel - sig { returns(T.nilable(String)) } - attr_accessor :data - - sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::TaggedSymbol)) } - attr_accessor :type - - sig do - params( - data: T.nilable(String), - type: T.nilable(FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::OrSymbol) - ) - .returns(T.attached_class) - end - def self.new(data: nil, type: nil); end - - sig do - override - .returns( - { - data: T.nilable(String), - type: T.nilable(FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::TaggedSymbol) - } - ) - end - def to_hash; end - - module Type - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::HRIS::Individual::PhoneNumber::Type) } - OrSymbol = - T.type_alias { T.any(Symbol, String, FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::TaggedSymbol) } - - WORK = T.let(:work, FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::TaggedSymbol) - PERSONAL = T.let(:personal, FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::TaggedSymbol) - - sig { override.returns(T::Array[FinchAPI::Models::HRIS::Individual::PhoneNumber::Type::TaggedSymbol]) } - def self.values; end - end - end - end - end - end -end diff --git a/rbi/lib/finch_api/models/hris/individual_response.rbi b/rbi/lib/finch_api/models/hris/individual_response.rbi deleted file mode 100644 index e613f20d..00000000 --- a/rbi/lib/finch_api/models/hris/individual_response.rbi +++ /dev/null @@ -1,40 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - class IndividualResponse < FinchAPI::Internal::Type::BaseModel - sig { returns(T.nilable(FinchAPI::Models::HRIS::Individual)) } - attr_reader :body - - sig { params(body: T.any(FinchAPI::Models::HRIS::Individual, FinchAPI::Internal::AnyHash)).void } - attr_writer :body - - sig { returns(T.nilable(Integer)) } - attr_reader :code - - sig { params(code: Integer).void } - attr_writer :code - - sig { returns(T.nilable(String)) } - attr_reader :individual_id - - sig { params(individual_id: String).void } - attr_writer :individual_id - - sig do - params( - body: T.any(FinchAPI::Models::HRIS::Individual, FinchAPI::Internal::AnyHash), - code: Integer, - individual_id: String - ) - .returns(T.attached_class) - end - def self.new(body: nil, code: nil, individual_id: nil); end - - sig { override.returns({body: FinchAPI::Models::HRIS::Individual, code: Integer, individual_id: String}) } - def to_hash; end - end - end - end -end diff --git a/scripts/bootstrap b/scripts/bootstrap index 88566757..cc31aa85 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -2,7 +2,7 @@ set -e -cd "$(dirname "$0")/.." +cd -- "$(dirname -- "$0")/.." if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then brew bundle check >/dev/null 2>&1 || { @@ -13,4 +13,4 @@ fi echo "==> Installing Ruby dependencies…" -bundle install +exec -- bundle install "$@" diff --git a/scripts/format b/scripts/format index 67b400de..177d1e63 100755 --- a/scripts/format +++ b/scripts/format @@ -5,4 +5,5 @@ set -e cd -- "$(dirname -- "$0")/.." echo "==> Running formatters" + exec -- bundle exec rake format "$@" diff --git a/scripts/lint b/scripts/lint index 39581dc1..08b0dbeb 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,4 +4,6 @@ set -e cd -- "$(dirname -- "$0")/.." +echo "==> Running linters" + exec -- bundle exec rake lint "$@" diff --git a/scripts/test b/scripts/test index 2e1fe093..8e5d35cd 100755 --- a/scripts/test +++ b/scripts/test @@ -2,7 +2,7 @@ set -e -cd "$(dirname "$0")/.." +cd -- "$(dirname -- "$0")/.." RED='\033[0;31m' GREEN='\033[0;32m' diff --git a/sig/finch_api/file_part.rbs b/sig/finch_api/file_part.rbs new file mode 100644 index 00000000..31ed4ca6 --- /dev/null +++ b/sig/finch_api/file_part.rbs @@ -0,0 +1,21 @@ +module FinchAPI + class FilePart + attr_reader content: Pathname | StringIO | IO | String + + attr_reader content_type: String? + + attr_reader filename: String? + + private def read: -> String + + def to_json: (*top a) -> String + + def to_yaml: (*top a) -> String + + def initialize: ( + Pathname | StringIO | IO | String content, + ?filename: String?, + ?content_type: String? + ) -> void + end +end diff --git a/sig/finch_api/internal.rbs b/sig/finch_api/internal.rbs index 65178856..2705b868 100644 --- a/sig/finch_api/internal.rbs +++ b/sig/finch_api/internal.rbs @@ -1,5 +1,5 @@ module FinchAPI module Internal - OMIT: top + OMIT: Object end end diff --git a/sig/finch_api/internal/transport/base_client.rbs b/sig/finch_api/internal/transport/base_client.rbs index 78f5718c..2d9858d4 100644 --- a/sig/finch_api/internal/transport/base_client.rbs +++ b/sig/finch_api/internal/transport/base_client.rbs @@ -11,7 +11,10 @@ module FinchAPI | Integer | ::Array[(String | Integer)?])?]?, body: top?, - unwrap: Symbol?, + unwrap: (Symbol + | Integer + | ::Array[(Symbol | Integer)] + | (^(top arg0) -> top))?, page: Class?, stream: Class?, model: FinchAPI::Internal::Type::Converter::input?, @@ -53,7 +56,7 @@ module FinchAPI ) -> void # @api private - attr_accessor requester: FinchAPI::Internal::Transport::PooledNetRequester + attr_reader requester: FinchAPI::Internal::Transport::PooledNetRequester def initialize: ( base_url: String, @@ -96,7 +99,10 @@ module FinchAPI | Integer | ::Array[(String | Integer)?])?]?, ?body: top?, - ?unwrap: Symbol?, + ?unwrap: (Symbol + | Integer + | ::Array[(Symbol | Integer)] + | (^(top arg0) -> top))?, ?page: Class?, ?stream: Class?, ?model: FinchAPI::Internal::Type::Converter::input?, diff --git a/sig/finch_api/internal/type/array_of.rbs b/sig/finch_api/internal/type/array_of.rbs index 78fff754..c35944b7 100644 --- a/sig/finch_api/internal/type/array_of.rbs +++ b/sig/finch_api/internal/type/array_of.rbs @@ -15,6 +15,8 @@ module FinchAPI def ==: (top other) -> bool + def hash: -> Integer + def coerce: ( ::Array[top] | top value, state: FinchAPI::Internal::Type::Converter::coerce_state @@ -35,6 +37,8 @@ module FinchAPI | FinchAPI::Internal::Type::Converter::input type_info, ?::Hash[Symbol, top] spec ) -> void + + def inspect: (?depth: Integer) -> String end end end diff --git a/sig/finch_api/internal/type/base_model.rbs b/sig/finch_api/internal/type/base_model.rbs index 64386130..031f5ff8 100644 --- a/sig/finch_api/internal/type/base_model.rbs +++ b/sig/finch_api/internal/type/base_model.rbs @@ -49,8 +49,12 @@ module FinchAPI def self.==: (top other) -> bool + def self.hash: -> Integer + def ==: (top other) -> bool + def hash: -> Integer + def self.coerce: ( FinchAPI::Internal::Type::BaseModel | ::Hash[top, top] | top value, state: FinchAPI::Internal::Type::Converter::coerce_state @@ -69,12 +73,20 @@ module FinchAPI def deconstruct_keys: (::Array[Symbol]? keys) -> ::Hash[Symbol, top] + def self.walk: ( + FinchAPI::Internal::Type::BaseModel model + ) -> ::Hash[Symbol, top] + def to_json: (*top a) -> String def to_yaml: (*top a) -> String def initialize: (?::Hash[Symbol, top] | self data) -> void + def self.inspect: (?depth: Integer) -> String + + def to_s: -> String + def inspect: -> String end end diff --git a/sig/finch_api/internal/type/converter.rbs b/sig/finch_api/internal/type/converter.rbs index d0c218c2..a99d5e89 100644 --- a/sig/finch_api/internal/type/converter.rbs +++ b/sig/finch_api/internal/type/converter.rbs @@ -23,6 +23,8 @@ module FinchAPI state: FinchAPI::Internal::Type::Converter::dump_state ) -> top + def inspect: (?depth: Integer) -> String + def self.type_info: ( { const: (nil | bool | Integer | Float | Symbol)?, @@ -44,6 +46,8 @@ module FinchAPI top value, ?state: FinchAPI::Internal::Type::Converter::dump_state ) -> top + + def self.inspect: (top target, depth: Integer) -> String end end end diff --git a/sig/finch_api/internal/type/enum.rbs b/sig/finch_api/internal/type/enum.rbs index 78acebb2..9db0a5e5 100644 --- a/sig/finch_api/internal/type/enum.rbs +++ b/sig/finch_api/internal/type/enum.rbs @@ -6,12 +6,12 @@ module FinchAPI def self.values: -> ::Array[(nil | bool | Integer | Float | Symbol)] - private def self.finalize!: -> void - def ===: (top other) -> bool def ==: (top other) -> bool + def hash: -> Integer + def coerce: ( String | Symbol | top value, state: FinchAPI::Internal::Type::Converter::coerce_state @@ -21,6 +21,8 @@ module FinchAPI Symbol | top value, state: FinchAPI::Internal::Type::Converter::dump_state ) -> (Symbol | top) + + def inspect: (?depth: Integer) -> String end end end diff --git a/sig/finch_api/internal/type/io_like.rbs b/sig/finch_api/internal/type/file_input.rbs similarity index 96% rename from sig/finch_api/internal/type/io_like.rbs rename to sig/finch_api/internal/type/file_input.rbs index 3af3baed..d653cbf9 100644 --- a/sig/finch_api/internal/type/io_like.rbs +++ b/sig/finch_api/internal/type/file_input.rbs @@ -1,7 +1,7 @@ module FinchAPI module Internal module Type - class IOLike + class FileInput extend FinchAPI::Internal::Type::Converter def self.===: (top other) -> bool diff --git a/sig/finch_api/internal/type/hash_of.rbs b/sig/finch_api/internal/type/hash_of.rbs index 9add22eb..88c30184 100644 --- a/sig/finch_api/internal/type/hash_of.rbs +++ b/sig/finch_api/internal/type/hash_of.rbs @@ -15,6 +15,8 @@ module FinchAPI def ==: (top other) -> bool + def hash: -> Integer + def coerce: ( ::Hash[top, top] | top value, state: FinchAPI::Internal::Type::Converter::coerce_state @@ -35,6 +37,8 @@ module FinchAPI | FinchAPI::Internal::Type::Converter::input type_info, ?::Hash[Symbol, top] spec ) -> void + + def inspect: (?depth: Integer) -> String end end end diff --git a/sig/finch_api/internal/type/union.rbs b/sig/finch_api/internal/type/union.rbs index d0678994..2b42c3ef 100644 --- a/sig/finch_api/internal/type/union.rbs +++ b/sig/finch_api/internal/type/union.rbs @@ -30,6 +30,8 @@ module FinchAPI def ==: (top other) -> bool + def hash: -> Integer + def coerce: ( top value, state: FinchAPI::Internal::Type::Converter::coerce_state @@ -39,6 +41,8 @@ module FinchAPI top value, state: FinchAPI::Internal::Type::Converter::dump_state ) -> top + + def inspect: (?depth: Integer) -> String end end end diff --git a/sig/finch_api/internal/util.rbs b/sig/finch_api/internal/util.rbs index 5a653254..c8dbe6cf 100644 --- a/sig/finch_api/internal/util.rbs +++ b/sig/finch_api/internal/util.rbs @@ -29,8 +29,10 @@ module FinchAPI def self?.dig: ( ::Hash[Symbol, top] | ::Array[top] | top data, - (Symbol | Integer | ::Array[(Symbol | Integer)])? pick, - ?top? sentinel + (Symbol + | Integer + | ::Array[(Symbol | Integer)] + | (^(top arg0) -> top))? pick ) { -> top? } -> top? @@ -73,16 +75,6 @@ module FinchAPI | ::Array[(String | Integer)?])?] headers ) -> ::Hash[String, String] - class SerializationAdapter - attr_reader inner: Pathname | IO - - def to_json: (*top a) -> String - - def to_yaml: (*top a) -> String - - def initialize: (Pathname | IO inner) -> void - end - class ReadIOAdapter def close?: -> bool? @@ -103,6 +95,16 @@ module FinchAPI (Enumerator::Yielder y) -> void } -> Enumerable[String] + JSON_CONTENT: Regexp + JSONL_CONTENT: Regexp + + def self?.write_multipart_content: ( + Enumerator::Yielder y, + val: top, + closing: ::Array[^-> void], + ?content_type: String? + ) -> void + def self?.write_multipart_chunk: ( Enumerator::Yielder y, boundary: String, @@ -120,6 +122,8 @@ module FinchAPI top body ) -> top + def self?.force_charset!: (String content_type, text: String) -> void + def self?.decode_content: ( ::Hash[String, String] headers, stream: Enumerable[String], diff --git a/sig/finch_api/models/connect/session_new_params.rbs b/sig/finch_api/models/connect/session_new_params.rbs index 60d4ecac..b1e1b6a5 100644 --- a/sig/finch_api/models/connect/session_new_params.rbs +++ b/sig/finch_api/models/connect/session_new_params.rbs @@ -61,6 +61,8 @@ module FinchAPI | :pay_statement | :benefits | :ssn + | :deduction + | :documents module Product extend FinchAPI::Internal::Type::Enum @@ -73,6 +75,8 @@ module FinchAPI PAY_STATEMENT: :pay_statement BENEFITS: :benefits SSN: :ssn + DEDUCTION: :deduction + DOCUMENTS: :documents def self?.values: -> ::Array[FinchAPI::Models::Connect::SessionNewParams::product] end diff --git a/sig/finch_api/models/connect/session_reauthenticate_params.rbs b/sig/finch_api/models/connect/session_reauthenticate_params.rbs index e5698732..6745d6f8 100644 --- a/sig/finch_api/models/connect/session_reauthenticate_params.rbs +++ b/sig/finch_api/models/connect/session_reauthenticate_params.rbs @@ -41,6 +41,8 @@ module FinchAPI | :pay_statement | :benefits | :ssn + | :deduction + | :documents module Product extend FinchAPI::Internal::Type::Enum @@ -53,6 +55,8 @@ module FinchAPI 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/hris/benefit_create_params.rbs b/sig/finch_api/models/hris/benefit_create_params.rbs index 5d2904cf..7b8ef2b1 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 = { + company_contribution: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution?, description: String, frequency: FinchAPI::Models::HRIS::benefit_frequency?, type: FinchAPI::Models::HRIS::benefit_type? @@ -13,6 +14,8 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor company_contribution: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution? + attr_reader description: String? def description=: (String) -> String @@ -22,6 +25,7 @@ module FinchAPI attr_accessor type: FinchAPI::Models::HRIS::benefit_type? def initialize: ( + ?company_contribution: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution?, ?description: String, ?frequency: FinchAPI::Models::HRIS::benefit_frequency?, ?type: FinchAPI::Models::HRIS::benefit_type?, @@ -29,6 +33,59 @@ module FinchAPI ) -> void def to_hash: -> FinchAPI::Models::HRIS::benefit_create_params + + type company_contribution = + { + tiers: ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier], + type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ + } + + class CompanyContribution < FinchAPI::Internal::Type::BaseModel + attr_reader tiers: ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier]? + + def tiers=: ( + ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier] + ) -> ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier] + + attr_reader type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_? + + def type=: ( + FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ + ) -> FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ + + def initialize: ( + ?tiers: ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier], + ?type: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_ + ) -> void + + def to_hash: -> FinchAPI::Models::HRIS::BenefitCreateParams::company_contribution + + type tier = { match: Integer, threshold: Integer } + + class Tier < FinchAPI::Internal::Type::BaseModel + attr_reader match: Integer? + + def match=: (Integer) -> Integer + + attr_reader threshold: Integer? + + def threshold=: (Integer) -> Integer + + def initialize: (?match: Integer, ?threshold: Integer) -> void + + def to_hash: -> FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::tier + end + + type type_ = :match + + module Type + extend FinchAPI::Internal::Type::Enum + + MATCH: :match + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::type_] + end + end end end end diff --git a/sig/finch_api/models/hris/company.rbs b/sig/finch_api/models/hris/company.rbs index 18841ee6..ec3cc7e9 100644 --- a/sig/finch_api/models/hris/company.rbs +++ b/sig/finch_api/models/hris/company.rbs @@ -68,11 +68,11 @@ module FinchAPI attr_accessor routing_number: String? def initialize: ( - ?account_name: String?, - ?account_number: String?, - ?account_type: FinchAPI::Models::HRIS::HRISCompany::Account::account_type?, - ?institution_name: String?, - ?routing_number: String? + account_name: String?, + account_number: String?, + account_type: FinchAPI::Models::HRIS::HRISCompany::Account::account_type?, + institution_name: String?, + routing_number: String? ) -> void def to_hash: -> FinchAPI::Models::HRIS::HRISCompany::account @@ -101,8 +101,8 @@ module FinchAPI attr_accessor parent: FinchAPI::Models::HRIS::HRISCompany::Department::Parent? def initialize: ( - ?name: String?, - ?parent: FinchAPI::Models::HRIS::HRISCompany::Department::Parent? + name: String?, + parent: FinchAPI::Models::HRIS::HRISCompany::Department::Parent? ) -> void def to_hash: -> FinchAPI::Models::HRIS::HRISCompany::department @@ -112,7 +112,7 @@ module FinchAPI class Parent < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? - def initialize: (?name: String?) -> void + def initialize: (name: String?) -> void def to_hash: -> FinchAPI::Models::HRIS::HRISCompany::Department::parent end @@ -130,8 +130,8 @@ module FinchAPI attr_accessor type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? def initialize: ( - ?subtype: FinchAPI::Models::HRIS::HRISCompany::Entity::subtype?, - ?type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? + subtype: FinchAPI::Models::HRIS::HRISCompany::Entity::subtype?, + type: FinchAPI::Models::HRIS::HRISCompany::Entity::type_? ) -> void def to_hash: -> FinchAPI::Models::HRIS::HRISCompany::entity diff --git a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs index d0851b80..44eb6bc6 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs @@ -35,12 +35,17 @@ module FinchAPI def to_hash: -> FinchAPI::Models::HRIS::Company::pay_statement_item_list_response type attributes = - { employer: bool?, metadata: top?, pre_tax: bool?, type: String? } + { + employer: bool?, + metadata: ::Hash[Symbol, top?]?, + pre_tax: bool?, + type: String? + } class Attributes < FinchAPI::Internal::Type::BaseModel attr_accessor employer: bool? - attr_accessor metadata: top? + attr_accessor metadata: ::Hash[Symbol, top?]? attr_accessor pre_tax: bool? @@ -48,7 +53,7 @@ module FinchAPI def initialize: ( ?employer: bool?, - ?metadata: top?, + ?metadata: ::Hash[Symbol, top?]?, ?pre_tax: bool?, ?type: String? ) -> void diff --git a/sig/finch_api/models/hris/company_benefit.rbs b/sig/finch_api/models/hris/company_benefit.rbs index 2dc49a0f..6cacbce7 100644 --- a/sig/finch_api/models/hris/company_benefit.rbs +++ b/sig/finch_api/models/hris/company_benefit.rbs @@ -4,6 +4,7 @@ module FinchAPI type company_benefit = { benefit_id: String, + company_contribution: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution?, description: String?, frequency: FinchAPI::Models::HRIS::benefit_frequency?, type: FinchAPI::Models::HRIS::benefit_type? @@ -12,6 +13,8 @@ module FinchAPI class CompanyBenefit < FinchAPI::Internal::Type::BaseModel attr_accessor benefit_id: String + attr_accessor company_contribution: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution? + attr_accessor description: String? attr_accessor frequency: FinchAPI::Models::HRIS::benefit_frequency? @@ -20,12 +23,66 @@ module FinchAPI def initialize: ( benefit_id: String, + company_contribution: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution?, description: String?, frequency: FinchAPI::Models::HRIS::benefit_frequency?, type: FinchAPI::Models::HRIS::benefit_type? ) -> void def to_hash: -> FinchAPI::Models::HRIS::company_benefit + + type company_contribution = + { + tiers: ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier], + type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ + } + + class CompanyContribution < FinchAPI::Internal::Type::BaseModel + attr_reader tiers: ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier]? + + def tiers=: ( + ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier] + ) -> ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier] + + attr_reader type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_? + + def type=: ( + FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ + ) -> FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ + + def initialize: ( + ?tiers: ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::Tier], + ?type: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_ + ) -> void + + def to_hash: -> FinchAPI::Models::HRIS::CompanyBenefit::company_contribution + + type tier = { match: Integer, threshold: Integer } + + class Tier < FinchAPI::Internal::Type::BaseModel + attr_reader match: Integer? + + def match=: (Integer) -> Integer + + attr_reader threshold: Integer? + + def threshold=: (Integer) -> Integer + + def initialize: (?match: Integer, ?threshold: Integer) -> void + + def to_hash: -> FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::tier + end + + type type_ = :match + + module Type + extend FinchAPI::Internal::Type::Enum + + MATCH: :match + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution::type_] + end + end end end end diff --git a/sig/finch_api/models/hris/individual.rbs b/sig/finch_api/models/hris/individual.rbs index e6121ae4..03ef68f5 100644 --- a/sig/finch_api/models/hris/individual.rbs +++ b/sig/finch_api/models/hris/individual.rbs @@ -2,168 +2,198 @@ module FinchAPI module Models module HRIS type individual = - { - id: String, - dob: String?, - emails: ::Array[FinchAPI::Models::HRIS::Individual::Email]?, - encrypted_ssn: String?, - ethnicity: FinchAPI::Models::HRIS::Individual::ethnicity?, - first_name: String?, - gender: FinchAPI::Models::HRIS::Individual::gender?, - last_name: String?, - middle_name: String?, - phone_numbers: ::Array[FinchAPI::Models::HRIS::Individual::PhoneNumber?]?, - preferred_name: String?, - residence: FinchAPI::Models::Location?, - ssn: String? - } + FinchAPI::Models::HRIS::Individual::UnionMember0 + | FinchAPI::Models::HRIS::Individual::BatchError - class Individual < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? + module Individual + extend FinchAPI::Internal::Type::Union - def id=: (String) -> String - - attr_accessor dob: String? + type union_member0 = + { + id: String, + dob: String?, + ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, + first_name: String?, + gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, + last_name: String?, + middle_name: String?, + phone_numbers: ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber?]?, + preferred_name: String?, + residence: FinchAPI::Models::Location?, + emails: ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email]?, + encrypted_ssn: String?, + ssn: String? + } - attr_accessor emails: ::Array[FinchAPI::Models::HRIS::Individual::Email]? + class UnionMember0 < FinchAPI::Internal::Type::BaseModel + attr_accessor id: String - attr_accessor encrypted_ssn: String? + attr_accessor dob: String? - attr_accessor ethnicity: FinchAPI::Models::HRIS::Individual::ethnicity? + attr_accessor ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity? - attr_accessor first_name: String? + attr_accessor first_name: String? - attr_accessor gender: FinchAPI::Models::HRIS::Individual::gender? + attr_accessor gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender? - attr_accessor last_name: String? + attr_accessor last_name: String? - attr_accessor middle_name: String? + attr_accessor middle_name: String? - attr_accessor phone_numbers: ::Array[FinchAPI::Models::HRIS::Individual::PhoneNumber?]? + attr_accessor phone_numbers: ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber?]? - attr_accessor preferred_name: String? + attr_accessor preferred_name: String? - attr_accessor residence: FinchAPI::Models::Location? + attr_accessor residence: FinchAPI::Models::Location? - attr_accessor ssn: String? + attr_accessor emails: ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email]? - def initialize: ( - ?id: String, - ?dob: String?, - ?emails: ::Array[FinchAPI::Models::HRIS::Individual::Email]?, - ?encrypted_ssn: String?, - ?ethnicity: FinchAPI::Models::HRIS::Individual::ethnicity?, - ?first_name: String?, - ?gender: FinchAPI::Models::HRIS::Individual::gender?, - ?last_name: String?, - ?middle_name: String?, - ?phone_numbers: ::Array[FinchAPI::Models::HRIS::Individual::PhoneNumber?]?, - ?preferred_name: String?, - ?residence: FinchAPI::Models::Location?, - ?ssn: String? - ) -> void + attr_accessor encrypted_ssn: String? - def to_hash: -> FinchAPI::Models::HRIS::individual + attr_accessor ssn: String? - type email = - { - data: String, - type: FinchAPI::Models::HRIS::Individual::Email::type_? - } + def initialize: ( + id: String, + dob: String?, + ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, + first_name: String?, + gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, + last_name: String?, + middle_name: String?, + phone_numbers: ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber?]?, + preferred_name: String?, + residence: FinchAPI::Models::Location?, + ?emails: ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email]?, + ?encrypted_ssn: String?, + ?ssn: String? + ) -> void - class Email < FinchAPI::Internal::Type::BaseModel - attr_reader data: String? + def to_hash: -> FinchAPI::Models::HRIS::Individual::union_member0 - def data=: (String) -> String + type ethnicity = + :asian + | :white + | :black_or_african_american + | :native_hawaiian_or_pacific_islander + | :american_indian_or_alaska_native + | :hispanic_or_latino + | :two_or_more_races + | :decline_to_specify - attr_accessor type: FinchAPI::Models::HRIS::Individual::Email::type_? + module Ethnicity + extend FinchAPI::Internal::Type::Enum - def initialize: ( - ?data: String, - ?type: FinchAPI::Models::HRIS::Individual::Email::type_? - ) -> void + ASIAN: :asian + WHITE: :white + BLACK_OR_AFRICAN_AMERICAN: :black_or_african_american + NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER: :native_hawaiian_or_pacific_islander + AMERICAN_INDIAN_OR_ALASKA_NATIVE: :american_indian_or_alaska_native + HISPANIC_OR_LATINO: :hispanic_or_latino + TWO_OR_MORE_RACES: :two_or_more_races + DECLINE_TO_SPECIFY: :decline_to_specify - def to_hash: -> FinchAPI::Models::HRIS::Individual::email + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity] + end - type type_ = :work | :personal + type gender = :female | :male | :other | :decline_to_specify - module Type + module Gender extend FinchAPI::Internal::Type::Enum - WORK: :work - PERSONAL: :personal + FEMALE: :female + MALE: :male + OTHER: :other + DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::Email::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::gender] end - end - type ethnicity = - :asian - | :white - | :black_or_african_american - | :native_hawaiian_or_pacific_islander - | :american_indian_or_alaska_native - | :hispanic_or_latino - | :two_or_more_races - | :decline_to_specify - - module Ethnicity - extend FinchAPI::Internal::Type::Enum - - ASIAN: :asian - WHITE: :white - BLACK_OR_AFRICAN_AMERICAN: :black_or_african_american - NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER: :native_hawaiian_or_pacific_islander - AMERICAN_INDIAN_OR_ALASKA_NATIVE: :american_indian_or_alaska_native - HISPANIC_OR_LATINO: :hispanic_or_latino - TWO_OR_MORE_RACES: :two_or_more_races - DECLINE_TO_SPECIFY: :decline_to_specify - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::ethnicity] - end + type phone_number = + { + data: String?, + type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + } - type gender = :female | :male | :other | :decline_to_specify + class PhoneNumber < FinchAPI::Internal::Type::BaseModel + attr_accessor data: String? - module Gender - extend FinchAPI::Internal::Type::Enum + attr_accessor type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? - FEMALE: :female - MALE: :male - OTHER: :other - DECLINE_TO_SPECIFY: :decline_to_specify + def initialize: ( + data: String?, + type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + ) -> void - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::gender] - end + def to_hash: -> FinchAPI::Models::HRIS::Individual::UnionMember0::phone_number - type phone_number = - { - data: String?, - type: FinchAPI::Models::HRIS::Individual::PhoneNumber::type_? - } + type type_ = :work | :personal - class PhoneNumber < FinchAPI::Internal::Type::BaseModel - attr_accessor data: String? + module Type + extend FinchAPI::Internal::Type::Enum - attr_accessor type: FinchAPI::Models::HRIS::Individual::PhoneNumber::type_? + WORK: :work + PERSONAL: :personal - def initialize: ( - ?data: String?, - ?type: FinchAPI::Models::HRIS::Individual::PhoneNumber::type_? - ) -> void + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_] + end + end - def to_hash: -> FinchAPI::Models::HRIS::Individual::phone_number + type email = + { + data: String, + type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + } - type type_ = :work | :personal + class Email < FinchAPI::Internal::Type::BaseModel + attr_accessor data: String - module Type - extend FinchAPI::Internal::Type::Enum + attr_accessor type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + + def initialize: ( + data: String, + type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + ) -> void + + def to_hash: -> FinchAPI::Models::HRIS::Individual::UnionMember0::email + + type type_ = :work | :personal - WORK: :work - PERSONAL: :personal + module Type + extend FinchAPI::Internal::Type::Enum - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::PhoneNumber::type_] + WORK: :work + PERSONAL: :personal + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_] + end end end + + type batch_error = + { code: Float, message: String, name: String, finch_code: String } + + class BatchError < FinchAPI::Internal::Type::BaseModel + attr_accessor code: Float + + attr_accessor message: String + + attr_accessor name: String + + attr_reader finch_code: String? + + def finch_code=: (String) -> String + + def initialize: ( + code: Float, + message: String, + name: String, + ?finch_code: String + ) -> void + + def to_hash: -> FinchAPI::Models::HRIS::Individual::batch_error + end + + def self?.variants: -> [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] end end end diff --git a/sig/finch_api/models/hris/individual_in_directory.rbs b/sig/finch_api/models/hris/individual_in_directory.rbs index b031c4c1..4a19aa5b 100644 --- a/sig/finch_api/models/hris/individual_in_directory.rbs +++ b/sig/finch_api/models/hris/individual_in_directory.rbs @@ -13,9 +13,7 @@ module FinchAPI } class IndividualInDirectory < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String + attr_accessor id: String attr_accessor department: FinchAPI::Models::HRIS::IndividualInDirectory::Department? @@ -30,13 +28,13 @@ module FinchAPI attr_accessor middle_name: String? def initialize: ( - ?id: String, - ?department: FinchAPI::Models::HRIS::IndividualInDirectory::Department?, - ?first_name: String?, - ?is_active: bool?, - ?last_name: String?, - ?manager: FinchAPI::Models::HRIS::IndividualInDirectory::Manager?, - ?middle_name: String? + id: String, + department: FinchAPI::Models::HRIS::IndividualInDirectory::Department?, + first_name: String?, + is_active: bool?, + last_name: String?, + manager: FinchAPI::Models::HRIS::IndividualInDirectory::Manager?, + middle_name: String? ) -> void def to_hash: -> FinchAPI::Models::HRIS::individual_in_directory @@ -54,11 +52,9 @@ module FinchAPI type manager = { id: String } class Manager < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String + attr_accessor id: String - def initialize: (?id: String) -> void + def initialize: (id: String) -> void def to_hash: -> FinchAPI::Models::HRIS::IndividualInDirectory::manager end diff --git a/sig/finch_api/models/hris/individual_response.rbs b/sig/finch_api/models/hris/individual_response.rbs index 9cc359fe..27936a73 100644 --- a/sig/finch_api/models/hris/individual_response.rbs +++ b/sig/finch_api/models/hris/individual_response.rbs @@ -3,30 +3,22 @@ module FinchAPI module HRIS type individual_response = { - body: FinchAPI::Models::HRIS::Individual, + body: FinchAPI::Models::HRIS::individual, code: Integer, individual_id: String } class IndividualResponse < FinchAPI::Internal::Type::BaseModel - attr_reader body: FinchAPI::Models::HRIS::Individual? + attr_accessor body: FinchAPI::Models::HRIS::individual - def body=: ( - FinchAPI::Models::HRIS::Individual - ) -> FinchAPI::Models::HRIS::Individual + attr_accessor code: Integer - attr_reader code: Integer? - - def code=: (Integer) -> Integer - - attr_reader individual_id: String? - - def individual_id=: (String) -> String + attr_accessor individual_id: String def initialize: ( - ?body: FinchAPI::Models::HRIS::Individual, - ?code: Integer, - ?individual_id: String + body: FinchAPI::Models::HRIS::individual, + code: Integer, + individual_id: String ) -> void def to_hash: -> FinchAPI::Models::HRIS::individual_response diff --git a/sig/finch_api/models/location.rbs b/sig/finch_api/models/location.rbs index ab01e614..79f676da 100644 --- a/sig/finch_api/models/location.rbs +++ b/sig/finch_api/models/location.rbs @@ -6,10 +6,10 @@ module FinchAPI country: String?, :line1 => String?, :line2 => String?, - name: String?, postal_code: String?, - source_id: String?, - state: String? + state: String?, + name: String?, + source_id: String? } class Location < FinchAPI::Internal::Type::BaseModel @@ -21,23 +21,23 @@ module FinchAPI attr_accessor line2: String? - attr_accessor name: String? - attr_accessor postal_code: String? - attr_accessor source_id: String? - attr_accessor state: String? + attr_accessor name: String? + + attr_accessor source_id: String? + def initialize: ( - ?city: String?, - ?country: String?, - ?line1: String?, - ?line2: String?, + city: String?, + country: String?, + line1: String?, + line2: String?, + postal_code: String?, + state: String?, ?name: String?, - ?postal_code: String?, - ?source_id: String?, - ?state: String? + ?source_id: String? ) -> void def to_hash: -> FinchAPI::Models::location diff --git a/sig/finch_api/models/paging.rbs b/sig/finch_api/models/paging.rbs index c5b3918c..b3a15999 100644 --- a/sig/finch_api/models/paging.rbs +++ b/sig/finch_api/models/paging.rbs @@ -1,17 +1,15 @@ module FinchAPI module Models - type paging = { count: Integer, offset: Integer } + type paging = { offset: Integer, count: Integer } class Paging < FinchAPI::Internal::Type::BaseModel + attr_accessor offset: Integer + attr_reader count: Integer? def count=: (Integer) -> Integer - attr_reader offset: Integer? - - def offset=: (Integer) -> Integer - - def initialize: (?count: Integer, ?offset: Integer) -> void + def initialize: (offset: Integer, ?count: Integer) -> void def to_hash: -> FinchAPI::Models::paging end diff --git a/sig/finch_api/models/sandbox/directory_create_response.rbs b/sig/finch_api/models/sandbox/directory_create_response.rbs index 9c4fd761..48d7ba9c 100644 --- a/sig/finch_api/models/sandbox/directory_create_response.rbs +++ b/sig/finch_api/models/sandbox/directory_create_response.rbs @@ -3,7 +3,7 @@ module FinchAPI module Sandbox type directory_create_response = ::Array[top] - DirectoryCreateResponse: directory_create_response + DirectoryCreateResponse: FinchAPI::Internal::Type::Converter end end end diff --git a/sig/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbs b/sig/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbs index e8d47232..e45f57ab 100644 --- a/sig/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbs +++ b/sig/finch_api/models/sandbox/jobs/configuration_retrieve_response.rbs @@ -5,7 +5,7 @@ module FinchAPI type configuration_retrieve_response = ::Array[FinchAPI::Models::Sandbox::Jobs::SandboxJobConfiguration] - ConfigurationRetrieveResponse: configuration_retrieve_response + ConfigurationRetrieveResponse: FinchAPI::Internal::Type::Converter end end end diff --git a/sig/finch_api/resources/hris/benefits.rbs b/sig/finch_api/resources/hris/benefits.rbs index 4233471f..59133348 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: ( + ?company_contribution: FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution?, ?description: String, ?frequency: FinchAPI::Models::HRIS::benefit_frequency?, ?type: FinchAPI::Models::HRIS::benefit_type?, diff --git a/sorbet/rbi/.gitignore b/sorbet/rbi/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/sorbet/rbi/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/test/finch_api/client_test.rb b/test/finch_api/client_test.rb index 9b832cd2..54a36d04 100644 --- a/test/finch_api/client_test.rb +++ b/test/finch_api/client_test.rb @@ -3,115 +3,112 @@ require_relative "test_helper" class FinchAPITest < Minitest::Test + include WebMock::API + + class << self + def test_order = :random + + def run_one_method(...) = Minitest::Runnable.run_one_method(...) + end + + def before_all + super + WebMock.enable! + end + def setup + super Thread.current.thread_variable_set(:mock_sleep, []) end def teardown Thread.current.thread_variable_set(:mock_sleep, nil) + WebMock.reset! + super end - class MockRequester - # @return [Integer] - attr_reader :response_code - - # @return [Hash{String=>String}] - attr_reader :response_headers - - # @return [Object] - attr_reader :response_data - - # @return [ArrayObject}>] - attr_accessor :attempts - - # @param response_code [Integer] - # @param response_headers [Hash{String=>String}] - # @param response_data [Object] - def initialize(response_code, response_headers, response_data) - @response_code = response_code - @response_headers = response_headers - @response_data = JSON.fast_generate(response_data) - @attempts = [] - end - - # @param req [Hash{Symbol=>Object}] - def execute(req) - # Deep copy the request because it is mutated on each retry. - attempts.push(Marshal.load(Marshal.dump(req))) - headers = {"content-type" => "application/json", **response_headers} - [response_code, headers, response_data.grapheme_clusters] - end + def after_all + WebMock.disable! + super end def test_client_default_request_default_retry_attempts - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list end - assert_equal(3, requester.attempts.length) + assert_requested(:any, /./, times: 3) end def test_client_given_request_default_retry_attempts + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + finch = - FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token", max_retries: 3) - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 3) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list end - assert_equal(4, requester.attempts.length) + assert_requested(:any, /./, times: 4) end def test_client_default_request_given_retry_attempts - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {max_retries: 3}) end - assert_equal(4, requester.attempts.length) + assert_requested(:any, /./, times: 4) end def test_client_given_request_given_retry_attempts + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + finch = - FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token", max_retries: 3) - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 3) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {max_retries: 4}) end - assert_equal(5, requester.attempts.length) + assert_requested(:any, /./, times: 5) end def test_client_retry_after_seconds + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 500, + headers: {"retry-after" => "1.3"}, + body: {} + ) + finch = - FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token", max_retries: 1) - requester = MockRequester.new(500, {"retry-after" => "1.3"}, {}) - finch.requester = requester + FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 1) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list end - assert_equal(2, requester.attempts.length) + assert_requested(:any, /./, times: 2) assert_equal(1.3, Thread.current.thread_variable_get(:mock_sleep).last) end def test_client_retry_after_date + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 500, + headers: {"retry-after" => (Time.now + 10).httpdate}, + body: {} + ) + finch = - FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token", max_retries: 1) - requester = MockRequester.new(500, {"retry-after" => (Time.now + 10).httpdate}, {}) - finch.requester = requester + FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 1) assert_raises(FinchAPI::Errors::InternalServerError) do Thread.current.thread_variable_set(:time_now, Time.now) @@ -119,140 +116,181 @@ def test_client_retry_after_date Thread.current.thread_variable_set(:time_now, nil) end - assert_equal(2, requester.attempts.length) + assert_requested(:any, /./, times: 2) assert_in_delta(10, Thread.current.thread_variable_get(:mock_sleep).last, 1.0) end def test_client_retry_after_ms + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 500, + headers: {"retry-after-ms" => "1300"}, + body: {} + ) + finch = - FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token", max_retries: 1) - requester = MockRequester.new(500, {"retry-after-ms" => "1300"}, {}) - finch.requester = requester + FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 1) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list end - assert_equal(2, requester.attempts.length) + assert_requested(:any, /./, times: 2) assert_equal(1.3, Thread.current.thread_variable_get(:mock_sleep).last) end def test_retry_count_header - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list end - retry_count_headers = requester.attempts.map do - _1.fetch(:headers).fetch("x-stainless-retry-count") + 3.times do + assert_requested(:any, /./, headers: {"x-stainless-retry-count" => _1}) end - - assert_equal(%w[0 1 2], retry_count_headers) end def test_omit_retry_count_header - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {extra_headers: {"x-stainless-retry-count" => nil}}) end - retry_count_headers = requester.attempts.map do - _1.fetch(:headers).fetch("x-stainless-retry-count", nil) + assert_requested(:any, /./, times: 3) do + refute_includes(_1.headers.keys.map(&:downcase), "x-stainless-retry-count") end - - assert_equal([nil, nil, nil], retry_count_headers) end def test_overwrite_retry_count_header - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(500, {}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {extra_headers: {"x-stainless-retry-count" => "42"}}) end - retry_count_headers = requester.attempts.map do - _1.fetch(:headers).fetch("x-stainless-retry-count") - end - - assert_equal(%w[42 42 42], retry_count_headers) + assert_requested(:any, /./, headers: {"x-stainless-retry-count" => "42"}, times: 3) end def test_client_redirect_307 - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(307, {"location" => "/redirected"}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 307, + headers: {"location" => "/redirected"}, + body: {} + ) + stub_request(:any, "http://localhost/redirected").to_return( + status: 307, + headers: {"location" => "/redirected"} + ) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {}}) end - assert_equal("/redirected", requester.attempts.last.fetch(:url).path) - assert_equal(requester.attempts.first.fetch(:method), requester.attempts.last.fetch(:method)) - assert_equal(requester.attempts.first.fetch(:body), requester.attempts.last.fetch(:body)) - assert_equal( - requester.attempts.first.fetch(:headers)["content-type"], - requester.attempts.last.fetch(:headers)["content-type"] - ) + recorded, = WebMock::RequestRegistry.instance.requested_signatures.hash.first + + assert_requested(:any, "http://localhost/redirected", times: FinchAPI::Client::MAX_REDIRECTS) do + assert_equal(recorded.method, _1.method) + assert_equal(recorded.body, _1.body) + assert_equal( + recorded.headers.transform_keys(&:downcase).fetch("content-type"), + _1.headers.transform_keys(&:downcase).fetch("content-type") + ) + end end def test_client_redirect_303 - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(303, {"location" => "/redirected"}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 303, + headers: {"location" => "/redirected"}, + body: {} + ) + stub_request(:get, "http://localhost/redirected").to_return( + status: 303, + headers: {"location" => "/redirected"} + ) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {}}) end - assert_equal("/redirected", requester.attempts.last.fetch(:url).path) - assert_equal(:get, requester.attempts.last.fetch(:method)) - assert_nil(requester.attempts.last.fetch(:body)) - assert_nil(requester.attempts.last.fetch(:headers)["content-type"]) + assert_requested(:get, "http://localhost/redirected", times: FinchAPI::Client::MAX_REDIRECTS) do + headers = _1.headers.keys.map(&:downcase) + refute_includes(headers, "content-type") + assert_nil(_1.body) + end end def test_client_redirect_auth_keep_same_origin - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(307, {"location" => "/redirected"}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 307, + headers: {"location" => "/redirected"}, + body: {} + ) + stub_request(:any, "http://localhost/redirected").to_return( + status: 307, + headers: {"location" => "/redirected"} + ) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {"authorization" => "Bearer xyz"}}) end - assert_equal( - requester.attempts.first.fetch(:headers)["authorization"], - requester.attempts.last.fetch(:headers)["authorization"] - ) + recorded, = WebMock::RequestRegistry.instance.requested_signatures.hash.first + auth_header = recorded.headers.transform_keys(&:downcase).fetch("authorization") + + assert_equal("Bearer xyz", auth_header) + assert_requested(:any, "http://localhost/redirected", times: FinchAPI::Client::MAX_REDIRECTS) do + auth_header = _1.headers.transform_keys(&:downcase).fetch("authorization") + assert_equal("Bearer xyz", auth_header) + end end def test_client_redirect_auth_strip_cross_origin - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(307, {"location" => "https://example.com/redirected"}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json( + status: 307, + headers: {"location" => "https://example.com/redirected"}, + body: {} + ) + stub_request(:any, "https://example.com/redirected").to_return( + status: 307, + headers: {"location" => "https://example.com/redirected"} + ) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {"authorization" => "Bearer xyz"}}) end - assert_nil(requester.attempts.last.fetch(:headers)["authorization"]) + assert_requested(:any, "https://example.com/redirected", times: FinchAPI::Client::MAX_REDIRECTS) do + headers = _1.headers.keys.map(&:downcase) + refute_includes(headers, "authorization") + end end def test_default_headers - finch = FinchAPI::Client.new(base_url: "http://localhost:4010", access_token: "My Access Token") - requester = MockRequester.new(200, {}, {}) - finch.requester = requester + stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 200, body: {}) + + finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch.hris.directory.list - headers = requester.attempts.first.fetch(:headers) - refute_empty(headers["accept"]) - refute_empty(headers["content-type"]) + assert_requested(:any, /./) do |req| + headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") + headers.each { refute_empty(_1) } + end end end diff --git a/test/finch_api/file_part_test.rb b/test/finch_api/file_part_test.rb new file mode 100644 index 00000000..961333a2 --- /dev/null +++ b/test/finch_api/file_part_test.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require_relative "test_helper" + +class FinchAPI::Test::FilePartTest < Minitest::Test + def test_to_json + text = "gray" + filepart = FinchAPI::FilePart.new(StringIO.new(text)) + + assert_equal(text.to_json, filepart.to_json) + assert_equal(text.to_yaml, filepart.to_yaml) + end +end diff --git a/test/finch_api/internal/type/base_model_test.rb b/test/finch_api/internal/type/base_model_test.rb index 978ef2c0..7da74cc3 100644 --- a/test/finch_api/internal/type/base_model_test.rb +++ b/test/finch_api/internal/type/base_model_test.rb @@ -94,7 +94,7 @@ def test_dump [:a, :b] => :b, [:a, "a"] => "a", [String, StringIO.new("one")] => "one", - [String, Pathname(__FILE__)] => FinchAPI::Internal::Util::SerializationAdapter + [String, Pathname(__FILE__)] => FinchAPI::FilePart } cases.each do @@ -154,6 +154,13 @@ def test_dump_retry end class FinchAPI::Test::EnumModelTest < Minitest::Test + class E0 + include FinchAPI::Internal::Type::Enum + attr_reader :values + + def initialize(*values) = (@values = values) + end + module E1 extend FinchAPI::Internal::Type::Enum @@ -183,11 +190,13 @@ module E4 def test_coerce cases = { - # rubocop:disable Lint/BooleanSymbol + [E0.new, "one"] => [{no: 1}, "one"], + [E0.new(:one), "one"] => [{yes: 1}, :one], + [E0.new(:two), "one"] => [{maybe: 1}, "one"], + [E1, true] => [{yes: 1}, true], [E1, false] => [{no: 1}, false], [E1, :true] => [{no: 1}, :true], - # rubocop:enable Lint/BooleanSymbol [E2, 1] => [{yes: 1}, 1], [E2, 1.0] => [{yes: 1}, 1], @@ -432,8 +441,10 @@ def test_accessors end class FinchAPI::Test::UnionTest < Minitest::Test - module U0 - extend FinchAPI::Internal::Type::Union + class U0 + include FinchAPI::Internal::Type::Union + + def initialize(*variants) = variants.each { variant(_1) } end module U1 @@ -519,6 +530,11 @@ def test_coerce cases = { [U0, :""] => [{no: 1}, 0, :""], + [U0.new(Integer, Float), "one"] => [{no: 1}, 2, "one"], + [U0.new(Integer, Float), 1.0] => [{yes: 1}, 2, 1.0], + [U0.new({const: :a}), "a"] => [{yes: 1}, 1, :a], + [U0.new({const: :a}), "2"] => [{maybe: 1}, 1, "2"], + [U1, "a"] => [{yes: 1}, 1, :a], [U1, "2"] => [{maybe: 1}, 2, "2"], [U1, :b] => [{maybe: 1}, 2, :b], @@ -556,6 +572,13 @@ def test_coerce end class FinchAPI::Test::BaseModelQoLTest < Minitest::Test + class E0 + include FinchAPI::Internal::Type::Enum + attr_reader :values + + def initialize(*values) = (@values = values) + end + module E1 extend FinchAPI::Internal::Type::Enum @@ -575,6 +598,26 @@ module E3 B = 3 end + class U0 + include FinchAPI::Internal::Type::Union + + def initialize(*variants) = variants.each { variant(_1) } + end + + module U1 + extend FinchAPI::Internal::Type::Union + + variant String + variant Integer + end + + module U2 + extend FinchAPI::Internal::Type::Union + + variant String + variant Integer + end + class M1 < FinchAPI::Internal::Type::BaseModel required :a, Integer end @@ -592,17 +635,27 @@ def test_equality [FinchAPI::Internal::Type::Unknown, FinchAPI::Internal::Type::Unknown] => true, [FinchAPI::Internal::Type::Boolean, FinchAPI::Internal::Type::Boolean] => true, [FinchAPI::Internal::Type::Unknown, FinchAPI::Internal::Type::Boolean] => false, + [E0.new(:a, :b), E0.new(:a, :b)] => true, + [E0.new(:a, :b), E0.new(:b, :a)] => true, + [E0.new(:a, :b), E0.new(:b, :c)] => false, [E1, E2] => true, [E1, E3] => false, + [U0.new(String, Integer), U0.new(String, Integer)] => true, + [U0.new(String, Integer), U0.new(Integer, String)] => false, + [U0.new(String, Float), U0.new(String, Integer)] => false, + [U1, U2] => true, [M1, M2] => false, - [M1, M3] => true + [M1, M3] => true, + [M1.new(a: 1), M1.new(a: 1)] => true } cases.each do if _2 assert_equal(*_1) + assert_equal(*_1.map(&:hash)) else refute_equal(*_1) + refute_equal(*_1.map(&:hash)) end end end diff --git a/test/finch_api/internal/util_test.rb b/test/finch_api/internal/util_test.rb index e981a2c7..065bfa53 100644 --- a/test/finch_api/internal/util_test.rb +++ b/test/finch_api/internal/util_test.rb @@ -87,8 +87,9 @@ def test_dig FinchAPI::Internal::Util.dig([], 1.0) => nil FinchAPI::Internal::Util.dig(Object, 1) => nil - FinchAPI::Internal::Util.dig([], 1.0, 2) => 2 FinchAPI::Internal::Util.dig([], 1.0) { 2 } => 2 + FinchAPI::Internal::Util.dig([], ->(_) { 2 }) => 2 + FinchAPI::Internal::Util.dig([1], -> { _1 in [1] }) => true end end end @@ -157,6 +158,22 @@ def test_joining_queries end end +class FinchAPI::Test::RegexMatchTest < Minitest::Test + def test_json_content + cases = { + "application/json" => true, + "application/jsonl" => false, + "application/vnd.github.v3+json" => true, + "application/vnd.api+json" => true + } + cases.each do |header, verdict| + assert_pattern do + FinchAPI::Internal::Util::JSON_CONTENT.match?(header) => ^verdict + end + end + end +end + class FinchAPI::Test::UtilFormDataEncodingTest < Minitest::Test class FakeCGI < CGI def initialize(headers, io) @@ -184,8 +201,12 @@ def test_file_encode file = Pathname(__FILE__) headers = {"content-type" => "multipart/form-data"} cases = { + "abc" => "abc", StringIO.new("abc") => "abc", - file => /^class FinchAPI/ + FinchAPI::FilePart.new("abc") => "abc", + FinchAPI::FilePart.new(StringIO.new("abc")) => "abc", + file => /^class FinchAPI/, + FinchAPI::FilePart.new(file) => /^class FinchAPI/ } cases.each do |body, val| encoded = FinchAPI::Internal::Util.encode_content(headers, body) @@ -203,7 +224,13 @@ def test_hash_encode {a: 2, b: nil} => {"a" => "2", "b" => "null"}, {a: 2, b: [1, 2, 3]} => {"a" => "2", "b" => "1"}, {strio: StringIO.new("a")} => {"strio" => "a"}, - {pathname: Pathname(__FILE__)} => {"pathname" => -> { _1.read in /^class FinchAPI/ }} + {strio: FinchAPI::FilePart.new("a")} => {"strio" => "a"}, + {pathname: Pathname(__FILE__)} => {"pathname" => -> { _1.read in /^class FinchAPI/ }}, + {pathname: FinchAPI::FilePart.new(Pathname(__FILE__))} => { + "pathname" => -> { + _1.read in /^class FinchAPI/ + } + } } cases.each do |body, testcase| encoded = FinchAPI::Internal::Util.encode_content(headers, body) @@ -368,6 +395,24 @@ def test_close_fused_sse_chain end end +class FinchAPI::Test::UtilContentDecodingTest < Minitest::Test + def test_charset + cases = { + "application/json" => Encoding::BINARY, + "application/json; charset=utf-8" => Encoding::UTF_8, + "charset=uTf-8 application/json; " => Encoding::UTF_8, + "charset=UTF-8; application/json; " => Encoding::UTF_8, + "charset=ISO-8859-1 ;application/json; " => Encoding::ISO_8859_1, + "charset=EUC-KR ;application/json; " => Encoding::EUC_KR + } + text = String.new.force_encoding(Encoding::BINARY) + cases.each do |content_type, encoding| + FinchAPI::Internal::Util.force_charset!(content_type, text: text) + assert_equal(encoding, text.encoding) + end + end +end + class FinchAPI::Test::UtilSseTest < Minitest::Test def test_decode_lines cases = { @@ -381,7 +426,9 @@ def test_decode_lines %W[\na b\n\n] => %W[\n ab\n \n], %W[\na b] => %W[\n ab], %W[\u1F62E\u200D\u1F4A8] => %W[\u1F62E\u200D\u1F4A8], - %W[\u1F62E \u200D \u1F4A8] => %W[\u1F62E\u200D\u1F4A8] + %W[\u1F62E \u200D \u1F4A8] => %W[\u1F62E\u200D\u1F4A8], + ["\xf0\x9f".b, "\xa5\xba".b] => ["\xf0\x9f\xa5\xba".b], + ["\xf0".b, "\x9f".b, "\xa5".b, "\xba".b] => ["\xf0\x9f\xa5\xba".b] } eols = %W[\n \r \r\n] cases.each do |enum, expected| diff --git a/test/finch_api/resources/hris/benefits_test.rb b/test/finch_api/resources/hris/benefits_test.rb index 8e2b5516..78a50038 100644 --- a/test/finch_api/resources/hris/benefits_test.rb +++ b/test/finch_api/resources/hris/benefits_test.rb @@ -28,6 +28,7 @@ def test_retrieve assert_pattern do response => { benefit_id: String, + company_contribution: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution | nil, description: String | nil, frequency: FinchAPI::Models::HRIS::BenefitFrequency | nil, type: FinchAPI::Models::HRIS::BenefitType | nil @@ -67,6 +68,7 @@ def test_list assert_pattern do row => { benefit_id: String, + company_contribution: FinchAPI::Models::HRIS::CompanyBenefit::CompanyContribution | nil, description: String | nil, frequency: FinchAPI::Models::HRIS::BenefitFrequency | nil, type: FinchAPI::Models::HRIS::BenefitType | nil diff --git a/test/finch_api/resources/hris/directory_test.rb b/test/finch_api/resources/hris/directory_test.rb index 50d17ef8..e4699700 100644 --- a/test/finch_api/resources/hris/directory_test.rb +++ b/test/finch_api/resources/hris/directory_test.rb @@ -19,7 +19,7 @@ def test_list assert_pattern do row => { - id: String | nil, + id: String, department: FinchAPI::Models::HRIS::IndividualInDirectory::Department | nil, first_name: String | nil, is_active: FinchAPI::Internal::Type::Boolean | nil, @@ -46,7 +46,7 @@ def test_list_individuals assert_pattern do row => { - id: String | nil, + id: String, department: FinchAPI::Models::HRIS::IndividualInDirectory::Department | nil, first_name: String | nil, is_active: FinchAPI::Internal::Type::Boolean | nil, diff --git a/test/finch_api/resources/hris/individuals_test.rb b/test/finch_api/resources/hris/individuals_test.rb index f8890ab3..37197cba 100644 --- a/test/finch_api/resources/hris/individuals_test.rb +++ b/test/finch_api/resources/hris/individuals_test.rb @@ -19,9 +19,9 @@ def test_retrieve_many assert_pattern do row => { - body: FinchAPI::Models::HRIS::Individual | nil, - code: Integer | nil, - individual_id: String | nil + body: FinchAPI::Models::HRIS::Individual, + code: Integer, + individual_id: String } end end diff --git a/test/finch_api/resources/sandbox/company_test.rb b/test/finch_api/resources/sandbox/company_test.rb index 68bbbfcc..1057671a 100644 --- a/test/finch_api/resources/sandbox/company_test.rb +++ b/test/finch_api/resources/sandbox/company_test.rb @@ -11,7 +11,16 @@ def test_update_required_params ein: "ein", entity: {}, legal_name: "legal_name", - locations: [{}], + locations: [ + { + city: "city", + country: "country", + line1: "line1", + line2: "line2", + postal_code: "postal_code", + state: "state" + } + ], primary_email: "dev@stainless.com", primary_phone_number: "primary_phone_number" ) diff --git a/test/finch_api/test_helper.rb b/test/finch_api/test_helper.rb index f130f981..3f5ffc15 100644 --- a/test/finch_api/test_helper.rb +++ b/test/finch_api/test_helper.rb @@ -15,6 +15,7 @@ require "minitest/hooks/test" require "minitest/proveit" require "minitest/rg" +require "webmock" require_relative "../../lib/finch_api" require_relative "resource_namespaces" @@ -44,8 +45,10 @@ def self.now = Thread.current.thread_variable_get(:time_now) || _now class FinchAPI::Test::SingletonClient < FinchAPI::Client include Singleton + TEST_API_BASE_URL = ENV.fetch("TEST_API_BASE_URL", "http://localhost:4010") + def initialize - super(base_url: ENV.fetch("TEST_API_BASE_URL", "http://localhost:4010"), access_token: "My Access Token") + super(base_url: FinchAPI::Test::SingletonClient::TEST_API_BASE_URL, access_token: "My Access Token") end end @@ -72,3 +75,7 @@ def around_all = async? ? Sync { super } : super def around = async? ? Async { super }.wait : super end + +module WebMock + AssertionFailure.error_class = Minitest::Assertion +end