From 166381ebd49719646b7c0242605bd7caace4b780 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 22:04:57 +0000 Subject: [PATCH 1/2] fix: bump sorbet version and fix new type errors from the breaking change --- .rubocop.yml | 2 +- Gemfile.lock | 88 ++++++++------ .../transport/pooled_net_requester.rb | 10 +- lib/finch_api/internal/type/base_model.rb | 9 +- lib/finch_api/internal/util.rb | 2 +- lib/finch_api/models/account_update_event.rb | 112 +++++------------- .../models/hris/benefit_create_params.rb | 4 +- .../benefits/individual_enroll_many_params.rb | 24 +--- .../pay_statement_item/rule_create_params.rb | 13 +- .../company/pay_statement_item_list_params.rb | 4 +- lib/finch_api/models/hris/company_benefit.rb | 4 +- .../models/hris/document_list_params.rb | 5 +- .../hris/employment_retrieve_many_params.rb | 4 +- .../hris/individual_retrieve_many_params.rb | 4 +- lib/finch_api/models/hris/pay_statement.rb | 5 +- .../pay_statement_retrieve_many_params.rb | 4 +- lib/finch_api/models/provider.rb | 87 +++----------- .../sandbox/connection_create_params.rb | 5 +- .../models/sandbox/directory_create_params.rb | 5 +- .../models/sandbox/payment_create_params.rb | 29 ++--- rbi/finch_api/errors.rbi | 4 +- .../internal/type/base_model_test.rb | 6 + test/finch_api/internal/util_test.rb | 12 +- 23 files changed, 140 insertions(+), 302 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7734b33f..c8ce879e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -149,7 +149,7 @@ Naming/ClassAndModuleCamelCase: Naming/MethodParameterName: Enabled: false -Naming/PredicateName: +Naming/PredicatePrefix: Exclude: - "**/*.rbi" diff --git a/Gemfile.lock b/Gemfile.lock index 1bc75d40..2e1ee1f2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,7 +17,7 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (8.0.2) + activesupport (8.0.2.1) base64 benchmark (>= 0.3) bigdecimal @@ -33,45 +33,50 @@ GEM addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) ast (2.4.3) - async (2.24.0) + async (2.27.3) console (~> 1.29) fiber-annotation - io-event (~> 1.9) + io-event (~> 1.11) metrics (~> 0.12) traces (~> 0.15) - base64 (0.2.0) - benchmark (0.4.0) - bigdecimal (3.1.9) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.2) concurrent-ruby (1.3.5) connection_pool (2.5.3) - console (1.30.2) + console (1.33.0) fiber-annotation fiber-local (~> 1.1) json crack (1.0.0) bigdecimal rexml - csv (3.3.4) - drb (2.2.1) + csv (3.3.5) + drb (2.2.3) erubi (1.13.1) + ffi (1.17.2-aarch64-linux-gnu) + ffi (1.17.2-aarch64-linux-musl) + ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x86_64-darwin) ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.2-x86_64-linux-musl) fiber-annotation (0.2.0) fiber-local (1.1.0) fiber-storage fiber-storage (1.0.1) fileutils (1.7.3) - hashdiff (1.1.2) + hashdiff (1.2.0) i18n (1.14.7) concurrent-ruby (~> 1.0) - io-event (1.10.0) - json (2.11.3) - language_server-protocol (3.17.0.4) + io-event (1.11.2) + json (2.13.2) + language_server-protocol (3.17.0.5) lint_roller (1.1.0) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) logger (1.7.0) - metrics (0.12.2) + metrics (0.13.0) minitest (5.25.5) minitest-focus (1.4.0) minitest (>= 4, < 6) @@ -84,7 +89,7 @@ GEM mutex_m (0.3.0) netrc (0.11.0) parallel (1.27.0) - parser (3.3.8.0) + parser (3.3.9.0) ast (~> 2.4.1) racc prettier_print (1.2.1) @@ -92,20 +97,19 @@ GEM public_suffix (6.0.2) racc (1.8.1) rainbow (3.1.1) - rake (13.2.1) + rake (13.3.0) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rbi (0.3.2) + rbi (0.3.6) prism (~> 1.0) rbs (>= 3.4.4) - sorbet-runtime (>= 0.5.9204) - rbs (3.9.2) + rbs (3.9.4) logger redcarpet (3.6.1) - regexp_parser (2.10.0) + regexp_parser (2.11.2) rexml (3.4.1) - rubocop (1.75.5) + rubocop (1.79.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -113,25 +117,28 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.44.0, < 2.0) + rubocop-ast (>= 1.46.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.44.1) + rubocop-ast (1.46.0) parser (>= 3.3.7.2) prism (~> 1.4) ruby-progressbar (1.13.0) securerandom (0.4.1) - sorbet (0.5.12067) - sorbet-static (= 0.5.12067) - sorbet-runtime (0.5.12067) - sorbet-static (0.5.12067-x86_64-linux) - sorbet-static-and-runtime (0.5.12067) - sorbet (= 0.5.12067) - sorbet-runtime (= 0.5.12067) - spoom (1.6.1) + sorbet (0.5.12424) + sorbet-static (= 0.5.12424) + sorbet-runtime (0.5.12424) + sorbet-static (0.5.12424-aarch64-linux) + sorbet-static (0.5.12424-universal-darwin) + sorbet-static (0.5.12424-x86_64-linux) + sorbet-static-and-runtime (0.5.12424) + sorbet (= 0.5.12424) + sorbet-runtime (= 0.5.12424) + spoom (1.6.3) erubi (>= 1.10.0) prism (>= 0.28.0) - rbi (>= 0.2.3) + rbi (>= 0.3.3) + rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) steep (1.10.0) @@ -152,7 +159,7 @@ GEM terminal-table (>= 2, < 5) uri (>= 0.12.0) strscan (3.1.5) - syntax_tree (6.2.0) + syntax_tree (6.3.0) prettier_print (>= 1.2.0) tapioca (0.16.11) benchmark @@ -166,11 +173,11 @@ GEM yard-sorbet terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) - thor (1.3.2) - traces (0.15.2) + thor (1.4.0) + traces (0.17.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.4) + unicode-display_width (3.1.5) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uri (1.0.3) @@ -185,7 +192,14 @@ GEM yard PLATFORMS - x86_64-linux + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm64-darwin + universal-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES async diff --git a/lib/finch_api/internal/transport/pooled_net_requester.rb b/lib/finch_api/internal/transport/pooled_net_requester.rb index 453207f9..9ebb1bcf 100644 --- a/lib/finch_api/internal/transport/pooled_net_requester.rb +++ b/lib/finch_api/internal/transport/pooled_net_requester.rb @@ -193,15 +193,7 @@ def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS) end define_sorbet_constant!(:Request) do - T.type_alias do - { - method: Symbol, - url: URI::Generic, - headers: T::Hash[String, String], - body: T.anything, - deadline: Float - } - end + T.type_alias { {method: Symbol, url: URI::Generic, headers: T::Hash[String, String], body: T.anything, deadline: Float} } end end end diff --git a/lib/finch_api/internal/type/base_model.rb b/lib/finch_api/internal/type/base_model.rb index e7530b48..89f708c5 100644 --- a/lib/finch_api/internal/type/base_model.rb +++ b/lib/finch_api/internal/type/base_model.rb @@ -64,14 +64,7 @@ def fields setter = :"#{name_sym}=" api_name = info.fetch(:api_name, name_sym) nilable = info.fetch(:nil?, false) - const = if required && !nilable - info.fetch( - :const, - FinchAPI::Internal::OMIT - ) - else - FinchAPI::Internal::OMIT - end + const = required && !nilable ? info.fetch(:const, FinchAPI::Internal::OMIT) : FinchAPI::Internal::OMIT [name_sym, setter].each { undef_method(_1) } if known_fields.key?(name_sym) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index d20590e8..5b98a0d8 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -244,7 +244,7 @@ class << self # # @return [String] def uri_origin(uri) - "#{uri.scheme}://#{uri.host}#{uri.port == uri.default_port ? '' : ":#{uri.port}"}" + "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}" end # @api private diff --git a/lib/finch_api/models/account_update_event.rb b/lib/finch_api/models/account_update_event.rb index d2bca9c3..a39dfaff 100644 --- a/lib/finch_api/models/account_update_event.rb +++ b/lib/finch_api/models/account_update_event.rb @@ -78,41 +78,31 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory, nil] optional :directory, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory } # @!attribute employment # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment, nil] optional :employment, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment } # @!attribute individual # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual, nil] optional :individual, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual } # @!attribute pay_group # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup, nil] optional :pay_group, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayGroup } # @!attribute pay_statement # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement, nil] optional :pay_statement, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement } # @!attribute payment # @@ -142,17 +132,13 @@ class Company < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts, nil] optional :accounts, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Accounts } # @!attribute departments # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments, nil] optional :departments, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments } # @!attribute ein # @@ -163,9 +149,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity, nil] optional :entity, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Entity } # @!attribute legal_name # @@ -176,9 +160,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations, nil] optional :locations, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Locations } # @!attribute primary_email # @@ -247,9 +229,7 @@ class Departments < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] optional :parent, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Company::Departments::Parent } # @!method initialize(name: nil, parent: nil) # @param name [Boolean] @@ -332,17 +312,13 @@ class Directory < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals, nil] optional :individuals, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals } # @!attribute paging # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging, nil] optional :paging, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Paging } # @!method initialize(individuals: nil, paging: nil) # @param individuals [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals] @@ -379,9 +355,7 @@ class Individuals < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] optional :manager, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager } # @!attribute middle_name # @@ -448,17 +422,13 @@ class Employment < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department, nil] optional :department, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Department } # @!attribute employment # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment, nil] optional :employment, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Employment } # @!attribute employment_status # @@ -479,9 +449,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income, nil] optional :income, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Income } # @!attribute income_history # @@ -502,17 +470,13 @@ class Employment < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location, nil] optional :location, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Location } # @!attribute manager # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager, nil] optional :manager, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Employment::Manager } # @!attribute middle_name # @@ -668,9 +632,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails, nil] optional :emails, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Emails } # @!attribute encrypted_ssn # @@ -706,9 +668,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] optional :phone_numbers, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers } # @!attribute preferred_name # @@ -719,9 +679,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence, nil] optional :residence, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Individual::Residence } # @!attribute ssn # @@ -854,17 +812,13 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] optional :paging, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging } # @!attribute pay_statements # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] optional :pay_statements, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements } # @!method initialize(paging: nil, pay_statements: nil) # @param paging [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::Paging] @@ -893,25 +847,19 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] optional :earnings, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings } # @!attribute employee_deductions # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] optional :employee_deductions, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions } # @!attribute employer_contributions # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] optional :employer_contributions, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions } # @!attribute gross_pay # @@ -937,9 +885,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] optional :taxes, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes } # @!attribute total_hours # @@ -1148,9 +1094,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] optional :pay_period, - -> { - FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod - } + -> { FinchAPI::AccountUpdateEvent::Data::AuthenticationMethod::SupportedFields::Payment::PayPeriod } # @!method initialize(id: nil, company_debit: nil, debit_date: nil, employee_taxes: nil, employer_taxes: nil, gross_pay: nil, individual_ids: nil, net_pay: nil, pay_date: nil, pay_frequencies: nil, pay_group_ids: nil, pay_period: nil) # @param id [Boolean] diff --git a/lib/finch_api/models/hris/benefit_create_params.rb b/lib/finch_api/models/hris/benefit_create_params.rb index b8166356..f1811b2b 100644 --- a/lib/finch_api/models/hris/benefit_create_params.rb +++ b/lib/finch_api/models/hris/benefit_create_params.rb @@ -55,9 +55,7 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # # @return [Array] required :tiers, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier] } # @!attribute type # 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 a41fee7b..89e9674c 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 @@ -14,9 +14,7 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :individuals, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] } # @!method initialize(individuals: nil, request_options: {}) # @param individuals [Array] Array of the individual_id to enroll and a configuration object. @@ -49,9 +47,7 @@ class Configuration < FinchAPI::Internal::Type::BaseModel # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit, nil] optional :annual_contribution_limit, - enum: -> { - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit - } + enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::AnnualContributionLimit } # @!attribute annual_maximum # Maximum annual amount in cents @@ -69,9 +65,7 @@ class Configuration < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution, nil] optional :company_contribution, - -> { - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution - } + -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution } # @!attribute effective_date # The date the enrollment will take effect @@ -83,9 +77,7 @@ class Configuration < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction, nil] optional :employee_deduction, - -> { - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction - } + -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction } # @!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 @@ -131,9 +123,7 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type, nil] optional :type, - enum: -> { - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type - } + enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::CompanyContribution::Type } # @!method initialize(amount: nil, type: nil) # Some parameter documentations has been truncated, see @@ -169,9 +159,7 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type, nil] optional :type, - enum: -> { - FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type - } + enum: -> { FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual::Configuration::EmployeeDeduction::Type } # @!method initialize(amount: nil, type: nil) # Some parameter documentations has been truncated, see 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 0eb0fe6b..03504d56 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 @@ -14,18 +14,13 @@ class RuleCreateParams < FinchAPI::Internal::Type::BaseModel # Specifies the fields to be applied when the condition is met. # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, nil] - optional :attributes, - -> { - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes - } + optional :attributes, -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes } # @!attribute conditions # # @return [Array, nil] optional :conditions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] } # @!attribute effective_end_date # Specifies when the rules should stop applying rules based on the date. @@ -89,9 +84,7 @@ class Condition < FinchAPI::Internal::Type::BaseModel # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator, nil] optional :operator, - enum: -> { - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator - } + enum: -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator } # @!attribute value # The value of the field to be checked in the rule. 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 2f9971f0..b247d835 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 @@ -15,9 +15,7 @@ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :categories, - -> { - FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::Company::PayStatementItemListParams::Category] - } + -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::Company::PayStatementItemListParams::Category] } # @!attribute end_date # The end date to retrieve pay statement items by via their last seen pay date in diff --git a/lib/finch_api/models/hris/company_benefit.rb b/lib/finch_api/models/hris/company_benefit.rb index 767a47e5..85fb2de2 100644 --- a/lib/finch_api/models/hris/company_benefit.rb +++ b/lib/finch_api/models/hris/company_benefit.rb @@ -51,9 +51,7 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel # # @return [Array] required :tiers, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier] } # @!attribute type # diff --git a/lib/finch_api/models/hris/document_list_params.rb b/lib/finch_api/models/hris/document_list_params.rb index d3a6c129..a709b5b4 100644 --- a/lib/finch_api/models/hris/document_list_params.rb +++ b/lib/finch_api/models/hris/document_list_params.rb @@ -32,10 +32,7 @@ class DocumentListParams < FinchAPI::Internal::Type::BaseModel # types # # @return [Array, nil] - optional :types, - -> { - FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::DocumentListParams::Type] - } + optional :types, -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::DocumentListParams::Type] } # @!method initialize(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) # Some parameter documentations has been truncated, see 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 39ec2494..4f729227 100644 --- a/lib/finch_api/models/hris/employment_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/employment_retrieve_many_params.rb @@ -13,9 +13,7 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # # @return [Array] required :requests, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] } # @!method initialize(requests:, request_options: {}) # @param requests [Array] The array of batch requests. 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 1f7b6fa4..177c7483 100644 --- a/lib/finch_api/models/hris/individual_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/individual_retrieve_many_params.rb @@ -17,9 +17,7 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :requests, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] } # @!method initialize(options: nil, requests: nil, request_options: {}) # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] diff --git a/lib/finch_api/models/hris/pay_statement.rb b/lib/finch_api/models/hris/pay_statement.rb index 148a71d8..0483a523 100644 --- a/lib/finch_api/models/hris/pay_statement.rb +++ b/lib/finch_api/models/hris/pay_statement.rb @@ -334,10 +334,7 @@ class Attributes < FinchAPI::Internal::Type::BaseModel # @!attribute metadata # # @return [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] - required :metadata, - -> { - FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata - } + required :metadata, -> { FinchAPI::HRIS::PayStatement::EmployerContribution::Attributes::Metadata } # @!method initialize(metadata:) # @param metadata [FinchAPI::Models::HRIS::PayStatement::EmployerContribution::Attributes::Metadata] 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 86d8d47b..0f725d06 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 @@ -13,9 +13,7 @@ class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # # @return [Array] required :requests, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] } # @!method initialize(requests:, request_options: {}) # @param requests [Array] The array of batch requests. diff --git a/lib/finch_api/models/provider.rb b/lib/finch_api/models/provider.rb index c7e0351a..5e3f8a81 100644 --- a/lib/finch_api/models/provider.rb +++ b/lib/finch_api/models/provider.rb @@ -155,10 +155,7 @@ class SupportedFields < FinchAPI::Internal::Type::BaseModel # @!attribute pay_statement # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement, nil] - optional :pay_statement, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement - } + optional :pay_statement, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement } # @!attribute payment # @@ -186,10 +183,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute accounts # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Accounts, nil] - optional :accounts, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts - } + optional :accounts, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Accounts } # @!attribute departments # @@ -205,10 +199,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute entity # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Entity, nil] - optional :entity, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity - } + optional :entity, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Entity } # @!attribute legal_name # @@ -218,10 +209,7 @@ class Company < FinchAPI::Internal::Type::BaseModel # @!attribute locations # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Locations, nil] - optional :locations, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations - } + optional :locations, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Locations } # @!attribute primary_email # @@ -290,9 +278,7 @@ class Departments < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent, nil] optional :parent, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Company::Departments::Parent } # @!method initialize(name: nil, parent: nil) # @param name [Boolean] @@ -380,10 +366,7 @@ class Directory < FinchAPI::Internal::Type::BaseModel # @!attribute paging # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Paging, nil] - optional :paging, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging - } + optional :paging, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Paging } # @!method initialize(individuals: nil, paging: nil) # @param individuals [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals] @@ -420,9 +403,7 @@ class Individuals < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager, nil] optional :manager, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Directory::Individuals::Manager } # @!attribute middle_name # @@ -515,10 +496,7 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute income # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Income, nil] - optional :income, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income - } + optional :income, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Income } # @!attribute income_history # @@ -538,18 +516,12 @@ class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute location # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Location, nil] - optional :location, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location - } + optional :location, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Location } # @!attribute manager # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Employment::Manager, nil] - optional :manager, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager - } + optional :manager, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Employment::Manager } # @!attribute middle_name # @@ -704,10 +676,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute emails # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::Emails, nil] - optional :emails, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails - } + optional :emails, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::Emails } # @!attribute encrypted_ssn # @@ -743,9 +712,7 @@ class Individual < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers, nil] optional :phone_numbers, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Individual::PhoneNumbers } # @!attribute preferred_name # @@ -888,18 +855,13 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # @!attribute paging # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging, nil] - optional :paging, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging - } + optional :paging, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging } # @!attribute pay_statements # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements, nil] optional :pay_statements, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements } # @!method initialize(paging: nil, pay_statements: nil) # @param paging [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::Paging] @@ -928,25 +890,19 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings, nil] optional :earnings, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Earnings } # @!attribute employee_deductions # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions, nil] optional :employee_deductions, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployeeDeductions } # @!attribute employer_contributions # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions, nil] optional :employer_contributions, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::EmployerContributions } # @!attribute gross_pay # @@ -972,9 +928,7 @@ class PayStatements < FinchAPI::Internal::Type::BaseModel # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes, nil] optional :taxes, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes - } + -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::PayStatement::PayStatements::Taxes } # @!attribute total_hours # @@ -1182,10 +1136,7 @@ class Payment < FinchAPI::Internal::Type::BaseModel # @!attribute pay_period # # @return [FinchAPI::Models::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod, nil] - optional :pay_period, - -> { - FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod - } + optional :pay_period, -> { FinchAPI::Provider::AuthenticationMethod::SupportedFields::Payment::PayPeriod } # @!method initialize(id: nil, company_debit: nil, debit_date: nil, employee_taxes: nil, employer_taxes: nil, gross_pay: nil, individual_ids: nil, net_pay: nil, pay_date: nil, pay_frequencies: nil, pay_group_ids: nil, pay_period: nil) # @param id [Boolean] diff --git a/lib/finch_api/models/sandbox/connection_create_params.rb b/lib/finch_api/models/sandbox/connection_create_params.rb index d2e22e01..447ce9f7 100644 --- a/lib/finch_api/models/sandbox/connection_create_params.rb +++ b/lib/finch_api/models/sandbox/connection_create_params.rb @@ -17,10 +17,7 @@ class ConnectionCreateParams < FinchAPI::Internal::Type::BaseModel # @!attribute authentication_type # # @return [Symbol, FinchAPI::Models::Sandbox::ConnectionCreateParams::AuthenticationType, nil] - optional :authentication_type, - enum: -> { - FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType - } + optional :authentication_type, enum: -> { FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType } # @!attribute employee_size # Optional: the size of the employer to be created with this connection. Defaults diff --git a/lib/finch_api/models/sandbox/directory_create_params.rb b/lib/finch_api/models/sandbox/directory_create_params.rb index bc57710e..29fe73d5 100644 --- a/lib/finch_api/models/sandbox/directory_create_params.rb +++ b/lib/finch_api/models/sandbox/directory_create_params.rb @@ -13,10 +13,7 @@ class DirectoryCreateParams < FinchAPI::Internal::Type::BaseModel # `/employment` endpoints. All fields are optional. # # @return [Array, nil] - optional :body, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::DirectoryCreateParams::Body] - } + optional :body, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::DirectoryCreateParams::Body] } # @!method initialize(body: nil, request_options: {}) # Some parameter documentations has been truncated, see diff --git a/lib/finch_api/models/sandbox/payment_create_params.rb b/lib/finch_api/models/sandbox/payment_create_params.rb index a1785423..52f0c442 100644 --- a/lib/finch_api/models/sandbox/payment_create_params.rb +++ b/lib/finch_api/models/sandbox/payment_create_params.rb @@ -18,9 +18,7 @@ class PaymentCreateParams < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :pay_statements, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement] } # @!attribute start_date # @@ -46,25 +44,19 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :earnings, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Earning] } # @!attribute employee_deductions # # @return [Array, nil] optional :employee_deductions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction] } # @!attribute employer_contributions # # @return [Array, nil] optional :employer_contributions, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution] } # @!attribute gross_pay # @@ -87,9 +79,7 @@ class PayStatement < FinchAPI::Internal::Type::BaseModel # # @return [Array, nil] optional :taxes, - -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax] - } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::PaymentCreateParams::PayStatement::Tax] } # @!attribute total_hours # @@ -182,10 +172,7 @@ class EmployeeDeduction < FinchAPI::Internal::Type::BaseModel # @!attribute type # # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type, nil] - optional :type, - enum: -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type - } + optional :type, enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployeeDeduction::Type } # @!method initialize(amount: nil, name: nil, pre_tax: nil, type: nil) # @param amount [Integer] @@ -237,9 +224,7 @@ class EmployerContribution < FinchAPI::Internal::Type::BaseModel # # @return [Symbol, FinchAPI::Models::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type, nil] optional :type, - enum: -> { - FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type - } + enum: -> { FinchAPI::Sandbox::PaymentCreateParams::PayStatement::EmployerContribution::Type } # @!method initialize(amount: nil, name: nil, type: nil) # @param amount [Integer] diff --git a/rbi/finch_api/errors.rbi b/rbi/finch_api/errors.rbi index 1898896e..901283ea 100644 --- a/rbi/finch_api/errors.rbi +++ b/rbi/finch_api/errors.rbi @@ -59,10 +59,10 @@ module FinchAPI end class APIConnectionError < FinchAPI::Errors::APIError - sig { void } + sig { returns(NilClass) } attr_accessor :status - sig { void } + sig { returns(NilClass) } attr_accessor :body # @api private diff --git a/test/finch_api/internal/type/base_model_test.rb b/test/finch_api/internal/type/base_model_test.rb index 6cf9befe..8f3f906f 100644 --- a/test/finch_api/internal/type/base_model_test.rb +++ b/test/finch_api/internal/type/base_model_test.rb @@ -157,6 +157,7 @@ def test_dump_retry class FinchAPI::Test::EnumModelTest < Minitest::Test class E0 include FinchAPI::Internal::Type::Enum + attr_reader :values def initialize(*values) = (@values = values) @@ -476,6 +477,7 @@ def initialize(*variants) = variants.each { variant(_1) } module U1 extend FinchAPI::Internal::Type::Union + variant const: :a variant const: 2 end @@ -492,6 +494,7 @@ class M2 < FinchAPI::Internal::Type::BaseModel module U2 extend FinchAPI::Internal::Type::Union + discriminator :type variant :a, M1 @@ -500,6 +503,7 @@ module U2 module U3 extend FinchAPI::Internal::Type::Union + discriminator :type variant :a, M1 @@ -508,6 +512,7 @@ module U3 module U4 extend FinchAPI::Internal::Type::Union + discriminator :type variant String @@ -601,6 +606,7 @@ def test_coerce class FinchAPI::Test::BaseModelQoLTest < Minitest::Test class E0 include FinchAPI::Internal::Type::Enum + attr_reader :values def initialize(*values) = (@values = values) diff --git a/test/finch_api/internal/util_test.rb b/test/finch_api/internal/util_test.rb index 9f7c623c..cf266dbf 100644 --- a/test/finch_api/internal/util_test.rb +++ b/test/finch_api/internal/util_test.rb @@ -242,11 +242,7 @@ def test_hash_encode {strio: StringIO.new("a")} => {"strio" => "a"}, {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/ - } - } + {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) @@ -324,9 +320,9 @@ def test_rewind_chain end def test_external_iteration - it = [1, 2, 3].to_enum - first = it.next - fused = FinchAPI::Internal::Util.fused_enum(it, external: true) + iter = [1, 2, 3].to_enum + first = iter.next + fused = FinchAPI::Internal::Util.fused_enum(iter, external: true) assert_equal(1, first) assert_equal([2, 3], fused.to_a) From e2870cc921fc71670a23cbc6bce035502d3c92c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 22:05:18 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.27 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/finch_api/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 315f7d30..7657c56b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.26" + ".": "0.1.0-alpha.27" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2bf66d..7435d6ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.27 (2025-08-19) + +Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.26...v0.1.0-alpha.27) + +### Bug Fixes + +* bump sorbet version and fix new type errors from the breaking change ([166381e](https://github.com/Finch-API/finch-api-ruby/commit/166381ebd49719646b7c0242605bd7caace4b780)) + ## 0.1.0-alpha.26 (2025-08-14) Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.25...v0.1.0-alpha.26) diff --git a/Gemfile.lock b/Gemfile.lock index 2e1ee1f2..61c1461c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.26) + finch-api (0.1.0.pre.alpha.27) connection_pool GEM diff --git a/README.md b/README.md index e6568bfc..26ffb3ae 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.26" +gem "finch-api", "~> 0.1.0.pre.alpha.27" ``` diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 759d45df..0ef8fdc4 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.26" + VERSION = "0.1.0.pre.alpha.27" end