diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 36b2affb..f9963500 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.34" + ".": "0.1.0-alpha.35" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 14e5d14c..8d224370 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-b817e7a30a6366c063a8c9a334d5be281eb8d93e21acc8c8219d3bdc95043deb.yml -openapi_spec_hash: d4cc4a5cba9f13986e38d148d330aa00 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-970ab04a97244c68824c0c52e06925cba14fb7dbfc36c03167c1afe74cd1b150.yml +openapi_spec_hash: 315e7859c3f77311261fb824b74a8247 config_hash: f2846563903bf75ab0858872154df0f7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 991bd212..c97d9fac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.1.0-alpha.35 (2025-11-09) + +Full Changelog: [v0.1.0-alpha.34...v0.1.0-alpha.35](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.34...v0.1.0-alpha.35) + +### Features + +* **api:** api update ([9ef0063](https://github.com/Finch-API/finch-api-ruby/commit/9ef0063aae5d7d717450833073f81fc6f9834566)) +* **api:** api update ([edeff3b](https://github.com/Finch-API/finch-api-ruby/commit/edeff3bdb90eb9cecbc26b3a6c0c569e594425dd)) + + +### Bug Fixes + +* better thread safety via early initializing SSL store during HTTP client creation ([ed1ac81](https://github.com/Finch-API/finch-api-ruby/commit/ed1ac81b9f90890405a00c49b23239dbd1d088dd)) + ## 0.1.0-alpha.34 (2025-11-04) Full Changelog: [v0.1.0-alpha.33...v0.1.0-alpha.34](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.33...v0.1.0-alpha.34) diff --git a/Gemfile.lock b/Gemfile.lock index 831f49ed..a734e283 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.34) + finch-api (0.1.0.pre.alpha.35) connection_pool GEM diff --git a/README.md b/README.md index 7bc9f0af..85ac440f 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.34" +gem "finch-api", "~> 0.1.0.pre.alpha.35" ``` diff --git a/lib/finch_api.rb b/lib/finch_api.rb index 54c1b933..45dd13fe 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -9,6 +9,7 @@ require "etc" require "json" require "net/http" +require "openssl" require "pathname" require "rbconfig" require "securerandom" diff --git a/lib/finch_api/internal/transport/pooled_net_requester.rb b/lib/finch_api/internal/transport/pooled_net_requester.rb index 17fa4942..fe3b0dd7 100644 --- a/lib/finch_api/internal/transport/pooled_net_requester.rb +++ b/lib/finch_api/internal/transport/pooled_net_requester.rb @@ -16,10 +16,11 @@ class PooledNetRequester class << self # @api private # + # @param cert_store [OpenSSL::X509::Store] # @param url [URI::Generic] # # @return [Net::HTTP] - def connect(url) + def connect(cert_store:, url:) port = case [url.port, url.scheme] in [Integer, _] @@ -33,6 +34,8 @@ def connect(url) Net::HTTP.new(url.host, port).tap do _1.use_ssl = %w[https wss].include?(url.scheme) _1.max_retries = 0 + + (_1.cert_store = cert_store) if _1.use_ssl? end end @@ -102,7 +105,7 @@ def build_request(request, &blk) pool = @mutex.synchronize do @pools[origin] ||= ConnectionPool.new(size: @size) do - self.class.connect(url) + self.class.connect(cert_store: @cert_store, url: url) end end @@ -192,6 +195,7 @@ def execute(request) def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS) @mutex = Mutex.new @size = size + @cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths) @pools = {} end diff --git a/lib/finch_api/models/hris/benefits/individual_benefit.rb b/lib/finch_api/models/hris/benefits/individual_benefit.rb index 3542d4b4..5fb82617 100644 --- a/lib/finch_api/models/hris/benefits/individual_benefit.rb +++ b/lib/finch_api/models/hris/benefits/individual_benefit.rb @@ -49,6 +49,9 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel required :catch_up, FinchAPI::Internal::Type::Boolean, nil?: true # @!attribute company_contribution + # Company contribution configuration. Supports fixed amounts (in cents), + # percentage-based contributions (in basis points where 100 = 1%), or tiered + # matching structures. # # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, nil] required :company_contribution, @@ -58,6 +61,8 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel nil?: true # @!attribute employee_deduction + # Employee deduction configuration. Supports both fixed amounts (in cents) and + # percentage-based contributions (in basis points where 100 = 1%). # # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, nil] required :employee_deduction, @@ -85,12 +90,16 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled # - # @param company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, nil] + # @param company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, nil] Company contribution configuration. Supports fixed amounts (in cents), percentag # - # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, nil] + # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, nil] Employee deduction configuration. Supports both fixed amounts (in cents) and per # # @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit, nil] Type for HSA contribution limit if the benefit is a HSA. + # Company contribution configuration. Supports fixed amounts (in cents), + # percentage-based contributions (in basis points where 100 = 1%), or tiered + # matching structures. + # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#company_contribution module CompanyContribution extend FinchAPI::Internal::Type::Union @@ -103,24 +112,31 @@ module CompanyContribution class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute amount - # Contribution amount in cents. + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). Not used for type=tiered. # # @return [Integer] required :amount, Integer # @!attribute type - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type] required :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type } # @!method initialize(amount:, type:) - # @param amount [Integer] Contribution amount in cents. + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0} + # for more details. + # + # @param amount [Integer] Contribution amount in cents (for type=fixed) or basis points (for type=percent, # - # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type] Fixed contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0#type module Type @@ -135,24 +151,31 @@ module Type class UnionMember1 < FinchAPI::Internal::Type::BaseModel # @!attribute amount - # Contribution amount in basis points (1/100th of a percent). + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). Not used for type=tiered. # # @return [Integer] required :amount, Integer # @!attribute type - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type] required :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type } # @!method initialize(amount:, type:) - # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1} + # for more details. + # + # @param amount [Integer] Contribution amount in cents (for type=fixed) or basis points (for type=percent, # - # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type] Percentage contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1#type module Type @@ -168,14 +191,15 @@ module Type class UnionMember2 < FinchAPI::Internal::Type::BaseModel # @!attribute tiers # Array of tier objects defining employer match tiers based on employee - # contribution thresholds. + # contribution thresholds. Required when type=tiered. # # @return [Array] required :tiers, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier] } # @!attribute type - # Tiered contribution type (only valid for company_contribution). + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type] required :type, @@ -188,7 +212,7 @@ class UnionMember2 < FinchAPI::Internal::Type::BaseModel # # @param tiers [Array] Array of tier objects defining employer match tiers based on employee contributi # - # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type] Tiered contribution type (only valid for company_contribution). + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun class Tier < FinchAPI::Internal::Type::BaseModel # @!attribute match @@ -206,7 +230,8 @@ class Tier < FinchAPI::Internal::Type::BaseModel # @param threshold [Integer] end - # Tiered contribution type (only valid for company_contribution). + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2#type module Type @@ -223,6 +248,9 @@ module Type # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2)] end + # Employee deduction configuration. Supports both fixed amounts (in cents) and + # percentage-based contributions (in basis points where 100 = 1%). + # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#employee_deduction module EmployeeDeduction extend FinchAPI::Internal::Type::Union @@ -233,24 +261,31 @@ module EmployeeDeduction class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute amount - # Contribution amount in cents. + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). # # @return [Integer] required :amount, Integer # @!attribute type - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type] required :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type } # @!method initialize(amount:, type:) - # @param amount [Integer] Contribution amount in cents. + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0} + # for more details. + # + # @param amount [Integer] Contribution amount in cents (for type=fixed) or basis points (for type=percent, # - # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type] Fixed contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type] Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amo - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0#type module Type @@ -265,24 +300,31 @@ module Type class UnionMember1 < FinchAPI::Internal::Type::BaseModel # @!attribute amount - # Contribution amount in basis points (1/100th of a percent). + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). # # @return [Integer] required :amount, Integer # @!attribute type - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). # # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type] required :type, enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type } # @!method initialize(amount:, type:) - # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1} + # for more details. + # + # @param amount [Integer] Contribution amount in cents (for type=fixed) or basis points (for type=percent, # - # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type] Percentage contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type] Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amo - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). # # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1#type module Type diff --git a/lib/finch_api/models/introspection.rb b/lib/finch_api/models/introspection.rb index 83f47db6..0f8bf1bb 100644 --- a/lib/finch_api/models/introspection.rb +++ b/lib/finch_api/models/introspection.rb @@ -346,20 +346,12 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :source_id, String, nil?: true - # @!attribute type - # The type of entity - # - # @return [String, nil] - required :type, String, nil?: true - - # @!method initialize(id:, name:, source_id:, type:) + # @!method initialize(id:, name:, source_id:) # @param id [String] The connection account ID for this entity # # @param name [String, nil] The name of the entity (payroll provider company name) # # @param source_id [String, nil] The source ID of the entity - # - # @param type [String, nil] The type of entity end end end diff --git a/lib/finch_api/models/request_forwarding_forward_response.rb b/lib/finch_api/models/request_forwarding_forward_response.rb index 1ae7873a..d501e5ba 100644 --- a/lib/finch_api/models/request_forwarding_forward_response.rb +++ b/lib/finch_api/models/request_forwarding_forward_response.rb @@ -73,10 +73,8 @@ class Request < FinchAPI::Internal::Type::BaseModel # @!attribute headers # The HTTP headers that were specified for the forwarded request. # - # @return [Hash{Symbol=>Object, nil}, nil] - optional :headers, - FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], - nil?: true + # @return [Hash{Symbol=>String}, nil] + optional :headers, FinchAPI::Internal::Type::HashOf[String], nil?: true # @!attribute params # The query parameters that were specified for the forwarded request. @@ -99,7 +97,7 @@ class Request < FinchAPI::Internal::Type::BaseModel # # @param data [String, Hash{Symbol=>Object, nil}, nil] The body that was specified for the forwarded request. # - # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers that were specified for the forwarded request. + # @param headers [Hash{Symbol=>String}, nil] The HTTP headers that were specified for the forwarded request. # # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters that were specified for the forwarded request. diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 6b18c77d..0b786986 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.34" + VERSION = "0.1.0.pre.alpha.35" end diff --git a/manifest.yaml b/manifest.yaml index 556686f5..7853f4ab 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -6,6 +6,7 @@ dependencies: - etc - json - net/http + - openssl - pathname - rbconfig - securerandom diff --git a/rbi/finch_api/internal/transport/pooled_net_requester.rbi b/rbi/finch_api/internal/transport/pooled_net_requester.rbi index 3a30451f..d8361837 100644 --- a/rbi/finch_api/internal/transport/pooled_net_requester.rbi +++ b/rbi/finch_api/internal/transport/pooled_net_requester.rbi @@ -26,8 +26,12 @@ module FinchAPI class << self # @api private - sig { params(url: URI::Generic).returns(Net::HTTP) } - def connect(url) + sig do + params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns( + Net::HTTP + ) + end + def connect(cert_store:, url:) end # @api private diff --git a/rbi/finch_api/models/hris/benefits/individual_benefit.rbi b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi index 7a35fec2..b6d44885 100644 --- a/rbi/finch_api/models/hris/benefits/individual_benefit.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi @@ -82,6 +82,9 @@ module FinchAPI sig { returns(T.nilable(T::Boolean)) } attr_accessor :catch_up + # Company contribution configuration. Supports fixed amounts (in cents), + # percentage-based contributions (in basis points where 100 = 1%), or tiered + # matching structures. sig do returns( T.nilable( @@ -91,6 +94,8 @@ module FinchAPI end attr_accessor :company_contribution + # Employee deduction configuration. Supports both fixed amounts (in cents) and + # percentage-based contributions (in basis points where 100 = 1%). sig do returns( T.nilable( @@ -141,7 +146,12 @@ module FinchAPI # If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled # for this individual. catch_up:, + # Company contribution configuration. Supports fixed amounts (in cents), + # percentage-based contributions (in basis points where 100 = 1%), or tiered + # matching structures. company_contribution:, + # Employee deduction configuration. Supports both fixed amounts (in cents) and + # percentage-based contributions (in basis points where 100 = 1%). employee_deduction:, # Type for HSA contribution limit if the benefit is a HSA. hsa_contribution_limit: nil @@ -171,6 +181,9 @@ module FinchAPI def to_hash end + # Company contribution configuration. Supports fixed amounts (in cents), + # percentage-based contributions (in basis points where 100 = 1%), or tiered + # matching structures. module CompanyContribution extend FinchAPI::Internal::Type::Union @@ -192,11 +205,13 @@ module FinchAPI ) end - # Contribution amount in cents. + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). Not used for type=tiered. sig { returns(Integer) } attr_accessor :amount - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). sig do returns( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol @@ -212,9 +227,11 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # Contribution amount in cents. + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). Not used for type=tiered. amount:, - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). type: ) end @@ -231,7 +248,8 @@ module FinchAPI def to_hash end - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). module Type extend FinchAPI::Internal::Type::Enum @@ -271,11 +289,13 @@ module FinchAPI ) end - # Contribution amount in basis points (1/100th of a percent). + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). Not used for type=tiered. sig { returns(Integer) } attr_accessor :amount - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). sig do returns( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol @@ -291,9 +311,11 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # Contribution amount in basis points (1/100th of a percent). + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). Not used for type=tiered. amount:, - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). type: ) end @@ -310,7 +332,8 @@ module FinchAPI def to_hash end - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). module Type extend FinchAPI::Internal::Type::Enum @@ -351,7 +374,7 @@ module FinchAPI end # Array of tier objects defining employer match tiers based on employee - # contribution thresholds. + # contribution thresholds. Required when type=tiered. sig do returns( T::Array[ @@ -361,7 +384,8 @@ module FinchAPI end attr_accessor :tiers - # Tiered contribution type (only valid for company_contribution). + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). sig do returns( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol @@ -381,9 +405,10 @@ module FinchAPI end def self.new( # Array of tier objects defining employer match tiers based on employee - # contribution thresholds. + # contribution thresholds. Required when type=tiered. tiers:, - # Tiered contribution type (only valid for company_contribution). + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). type: ) end @@ -433,7 +458,8 @@ module FinchAPI end end - # Tiered contribution type (only valid for company_contribution). + # Contribution type. Supported values: "fixed" (amount in cents), "percent" + # (amount in basis points), or "tiered" (multi-tier matching). module Type extend FinchAPI::Internal::Type::Enum @@ -475,6 +501,8 @@ module FinchAPI end end + # Employee deduction configuration. Supports both fixed amounts (in cents) and + # percentage-based contributions (in basis points where 100 = 1%). module EmployeeDeduction extend FinchAPI::Internal::Type::Union @@ -495,11 +523,13 @@ module FinchAPI ) end - # Contribution amount in cents. + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). sig { returns(Integer) } attr_accessor :amount - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). sig do returns( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol @@ -515,9 +545,11 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # Contribution amount in cents. + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). amount:, - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). type: ) end @@ -534,7 +566,8 @@ module FinchAPI def to_hash end - # Fixed contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). module Type extend FinchAPI::Internal::Type::Enum @@ -574,11 +607,13 @@ module FinchAPI ) end - # Contribution amount in basis points (1/100th of a percent). + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). sig { returns(Integer) } attr_accessor :amount - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). sig do returns( FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol @@ -594,9 +629,11 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # Contribution amount in basis points (1/100th of a percent). + # Contribution amount in cents (for type=fixed) or basis points (for type=percent, + # where 100 = 1%). amount:, - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). type: ) end @@ -613,7 +650,8 @@ module FinchAPI def to_hash end - # Percentage contribution type. + # Contribution type. Supported values: "fixed" (amount in cents) or "percent" + # (amount in basis points). module Type extend FinchAPI::Internal::Type::Enum diff --git a/rbi/finch_api/models/introspection.rbi b/rbi/finch_api/models/introspection.rbi index 6863ea03..69347887 100644 --- a/rbi/finch_api/models/introspection.rbi +++ b/rbi/finch_api/models/introspection.rbi @@ -578,16 +578,11 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :source_id - # The type of entity - sig { returns(T.nilable(String)) } - attr_accessor :type - sig do params( id: String, name: T.nilable(String), - source_id: T.nilable(String), - type: T.nilable(String) + source_id: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -596,9 +591,7 @@ module FinchAPI # The name of the entity (payroll provider company name) name:, # The source ID of the entity - source_id:, - # The type of entity - type: + source_id: ) end @@ -607,8 +600,7 @@ module FinchAPI { id: String, name: T.nilable(String), - source_id: T.nilable(String), - type: T.nilable(String) + source_id: T.nilable(String) } ) end diff --git a/rbi/finch_api/models/request_forwarding_forward_response.rbi b/rbi/finch_api/models/request_forwarding_forward_response.rbi index 899f889b..e00be4b2 100644 --- a/rbi/finch_api/models/request_forwarding_forward_response.rbi +++ b/rbi/finch_api/models/request_forwarding_forward_response.rbi @@ -111,7 +111,7 @@ module FinchAPI attr_accessor :data # The HTTP headers that were specified for the forwarded request. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + sig { returns(T.nilable(T::Hash[Symbol, String])) } attr_accessor :headers # The query parameters that were specified for the forwarded request. @@ -128,7 +128,7 @@ module FinchAPI T.nilable( FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::Variants ), - headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + headers: T.nilable(T::Hash[Symbol, String]), params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]) ).returns(T.attached_class) end @@ -156,7 +156,7 @@ module FinchAPI T.nilable( FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::Variants ), - headers: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + headers: T.nilable(T::Hash[Symbol, String]), params: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]) } ) diff --git a/sig/finch_api/internal/transport/pooled_net_requester.rbs b/sig/finch_api/internal/transport/pooled_net_requester.rbs index 7274399e..dea7a9d6 100644 --- a/sig/finch_api/internal/transport/pooled_net_requester.rbs +++ b/sig/finch_api/internal/transport/pooled_net_requester.rbs @@ -17,7 +17,10 @@ module FinchAPI DEFAULT_MAX_CONNECTIONS: Integer - def self.connect: (URI::Generic url) -> top + def self.connect: ( + cert_store: OpenSSL::X509::Store, + url: URI::Generic + ) -> top def self.calibrate_socket_timeout: (top conn, Float deadline) -> void diff --git a/sig/finch_api/models/introspection.rbs b/sig/finch_api/models/introspection.rbs index 8fc7c9af..67b250ee 100644 --- a/sig/finch_api/models/introspection.rbs +++ b/sig/finch_api/models/introspection.rbs @@ -262,8 +262,7 @@ module FinchAPI end end - type entity = - { id: String, name: String?, source_id: String?, type: String? } + type entity = { id: String, name: String?, source_id: String? } class Entity < FinchAPI::Internal::Type::BaseModel attr_accessor id: String @@ -272,21 +271,9 @@ module FinchAPI attr_accessor source_id: String? - attr_accessor type: String? + def initialize: (id: String, name: String?, source_id: String?) -> void - def initialize: ( - id: String, - name: String?, - source_id: String?, - type: String? - ) -> void - - def to_hash: -> { - id: String, - name: String?, - source_id: String?, - type: String? - } + def to_hash: -> { id: String, name: String?, source_id: String? } end end end diff --git a/sig/finch_api/models/request_forwarding_forward_response.rbs b/sig/finch_api/models/request_forwarding_forward_response.rbs index 7ab741f8..45729eec 100644 --- a/sig/finch_api/models/request_forwarding_forward_response.rbs +++ b/sig/finch_api/models/request_forwarding_forward_response.rbs @@ -36,7 +36,7 @@ module FinchAPI method_: String, route: String, data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data?, - headers: ::Hash[Symbol, top?]?, + headers: ::Hash[Symbol, String]?, params: ::Hash[Symbol, top?]? } @@ -47,7 +47,7 @@ module FinchAPI attr_accessor data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data? - attr_accessor headers: ::Hash[Symbol, top?]? + attr_accessor headers: ::Hash[Symbol, String]? attr_accessor params: ::Hash[Symbol, top?]? @@ -55,7 +55,7 @@ module FinchAPI method_: String, route: String, ?data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data?, - ?headers: ::Hash[Symbol, top?]?, + ?headers: ::Hash[Symbol, String]?, ?params: ::Hash[Symbol, top?]? ) -> void @@ -63,7 +63,7 @@ module FinchAPI method_: String, route: String, data: FinchAPI::Models::RequestForwardingForwardResponse::Request::data?, - headers: ::Hash[Symbol, top?]?, + headers: ::Hash[Symbol, String]?, params: ::Hash[Symbol, top?]? }