From 69e8027b72120985c9e601d517162a0225f3dd6d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 17:24:09 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- .../hris/directory_list_individuals_params.rb | 4 +- .../models/hris/directory_list_params.rb | 4 +- .../hris/employment_retrieve_many_params.rb | 14 ++-- .../hris/individual_retrieve_many_params.rb | 37 +++++----- .../pay_statement_retrieve_many_params.rb | 8 +-- lib/finch_api/resources/hris/directory.rb | 2 +- lib/finch_api/resources/hris/employments.rb | 2 +- lib/finch_api/resources/hris/individuals.rb | 8 +-- .../resources/hris/pay_statements.rb | 2 +- .../directory_list_individuals_params.rbi | 4 +- .../models/hris/directory_list_params.rbi | 4 +- .../hris/employment_retrieve_many_params.rbi | 12 ++-- .../hris/individual_retrieve_many_params.rbi | 71 ++++++++----------- .../pay_statement_retrieve_many_params.rbi | 8 +-- rbi/finch_api/resources/hris/directory.rbi | 2 +- rbi/finch_api/resources/hris/employments.rbi | 2 +- rbi/finch_api/resources/hris/individuals.rbi | 12 ++-- .../resources/hris/pay_statements.rbi | 2 +- .../hris/individual_retrieve_many_params.rbs | 38 +++++----- sig/finch_api/resources/hris/individuals.rbs | 2 +- .../resources/hris/individuals_test.rb | 4 +- .../resources/hris/pay_statements_test.rb | 2 +- 23 files changed, 110 insertions(+), 138 deletions(-) diff --git a/.stats.yml b/.stats.yml index 861514c9..6d130acd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-3cd1346947fabfca2aa9c6f821170c8d945a82667fb20a15644d5c77f8e98c10.yml -openapi_spec_hash: 642e04e90d37c0e4875d154abd06eb54 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-a6b05e51c46366a54466c2009f5fdde74e0fa40bbcc6568601a4e3342dd16937.yml +openapi_spec_hash: 084797c220144df17d98eb984dd4cba2 config_hash: 9ae56f40cec7304896138bfad5caf748 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 bbfc5cb3..946567dc 100644 --- a/lib/finch_api/models/hris/directory_list_individuals_params.rb +++ b/lib/finch_api/models/hris/directory_list_individuals_params.rb @@ -15,7 +15,7 @@ class DirectoryListIndividualsParams < FinchAPI::Internal::Type::BaseModel optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] # @!attribute limit - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) # # @return [Integer, nil] optional :limit, Integer @@ -29,7 +29,7 @@ class DirectoryListIndividualsParams < FinchAPI::Internal::Type::BaseModel # @!method initialize(entity_ids: nil, limit: nil, offset: nil, request_options: {}) # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # - # @param limit [Integer] Number of employees to return (defaults to all) + # @param limit [Integer] Number of employees to return (defaults to 100, maximum 10000) # # @param offset [Integer] Index to start from (defaults to 0) # diff --git a/lib/finch_api/models/hris/directory_list_params.rb b/lib/finch_api/models/hris/directory_list_params.rb index b24a78db..5f85aca0 100644 --- a/lib/finch_api/models/hris/directory_list_params.rb +++ b/lib/finch_api/models/hris/directory_list_params.rb @@ -15,7 +15,7 @@ class DirectoryListParams < FinchAPI::Internal::Type::BaseModel optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] # @!attribute limit - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) # # @return [Integer, nil] optional :limit, Integer @@ -29,7 +29,7 @@ class DirectoryListParams < FinchAPI::Internal::Type::BaseModel # @!method initialize(entity_ids: nil, limit: nil, offset: nil, request_options: {}) # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # - # @param limit [Integer] Number of employees to return (defaults to all) + # @param limit [Integer] Number of employees to return (defaults to 100, maximum 10000) # # @param offset [Integer] Index to start from (defaults to 0) # 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 6dce3306..d52eaf07 100644 --- a/lib/finch_api/models/hris/employment_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/employment_retrieve_many_params.rb @@ -9,7 +9,7 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel include FinchAPI::Internal::Type::RequestParameters # @!attribute requests - # The array of batch requests. + # The array of batch requests. Maximum 10000 items per request. # # @return [Array] required :requests, @@ -22,7 +22,7 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] # @!method initialize(requests:, entity_ids: nil, request_options: {}) - # @param requests [Array] The array of batch requests. + # @param requests [Array] The array of batch requests. Maximum 10000 items per request. # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # @@ -30,19 +30,13 @@ class EmploymentRetrieveManyParams < FinchAPI::Internal::Type::BaseModel class Request < FinchAPI::Internal::Type::BaseModel # @!attribute individual_id - # 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. + # A stable Finch `id` (UUID v4) for an individual in the company. # # @return [String] required :individual_id, String # @!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 + # @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/individual_retrieve_many_params.rb b/lib/finch_api/models/hris/individual_retrieve_many_params.rb index 92e7c3af..3d11e454 100644 --- a/lib/finch_api/models/hris/individual_retrieve_many_params.rb +++ b/lib/finch_api/models/hris/individual_retrieve_many_params.rb @@ -8,6 +8,13 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute requests + # The array of batch requests. Maximum 10000 items per request. + # + # @return [Array] + required :requests, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] } + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # @@ -19,21 +26,25 @@ class IndividualRetrieveManyParams < FinchAPI::Internal::Type::BaseModel # @return [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] optional :options, -> { FinchAPI::HRIS::IndividualRetrieveManyParams::Options }, nil?: true - # @!attribute requests + # @!method initialize(requests:, entity_ids: nil, options: nil, request_options: {}) + # @param requests [Array] The array of batch requests. Maximum 10000 items per request. # - # @return [Array, nil] - optional :requests, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] } - - # @!method initialize(entity_ids: nil, options: nil, requests: nil, request_options: {}) # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] # - # @param requests [Array] - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + class Request < FinchAPI::Internal::Type::BaseModel + # @!attribute individual_id + # + # @return [String] + required :individual_id, String + + # @!method initialize(individual_id:) + # @param individual_id [String] + end + class Options < FinchAPI::Internal::Type::BaseModel # @!attribute include # @@ -43,16 +54,6 @@ class Options < FinchAPI::Internal::Type::BaseModel # @!method initialize(include: nil) # @param include [Array] end - - class Request < FinchAPI::Internal::Type::BaseModel - # @!attribute individual_id - # - # @return [String, nil] - optional :individual_id, String - - # @!method initialize(individual_id: nil) - # @param individual_id [String] - end 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 176e07f5..87ae6960 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 @@ -9,7 +9,7 @@ class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel include FinchAPI::Internal::Type::RequestParameters # @!attribute requests - # The array of batch requests. + # The array of batch requests. Maximum 10 payment_ids per request. # # @return [Array] required :requests, @@ -22,7 +22,7 @@ class PayStatementRetrieveManyParams < FinchAPI::Internal::Type::BaseModel optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] # @!method initialize(requests:, entity_ids: nil, request_options: {}) - # @param requests [Array] The array of batch requests. + # @param requests [Array] The array of batch requests. Maximum 10 payment_ids per request. # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # @@ -36,7 +36,7 @@ class Request < FinchAPI::Internal::Type::BaseModel required :payment_id, String # @!attribute limit - # Number of pay statements to return (defaults to all). + # Number of pay statements to return (defaults to 100, maximum 5000). # # @return [Integer, nil] optional :limit, Integer @@ -50,7 +50,7 @@ class Request < FinchAPI::Internal::Type::BaseModel # @!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 limit [Integer] Number of pay statements to return (defaults to 100, maximum 5000). # # @param offset [Integer] Index to start from. end diff --git a/lib/finch_api/resources/hris/directory.rb b/lib/finch_api/resources/hris/directory.rb index cafe53a2..a85f5fc3 100644 --- a/lib/finch_api/resources/hris/directory.rb +++ b/lib/finch_api/resources/hris/directory.rb @@ -10,7 +10,7 @@ class Directory # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # - # @param limit [Integer] Number of employees to return (defaults to all) + # @param limit [Integer] Number of employees to return (defaults to 100, maximum 10000) # # @param offset [Integer] Index to start from (defaults to 0) # diff --git a/lib/finch_api/resources/hris/employments.rb b/lib/finch_api/resources/hris/employments.rb index a9921f85..75457678 100644 --- a/lib/finch_api/resources/hris/employments.rb +++ b/lib/finch_api/resources/hris/employments.rb @@ -8,7 +8,7 @@ class Employments # # @overload retrieve_many(requests:, entity_ids: nil, request_options: {}) # - # @param requests [Array] Body param: The array of batch requests. + # @param requests [Array] Body param: The array of batch requests. Maximum 10000 items per request. # # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # diff --git a/lib/finch_api/resources/hris/individuals.rb b/lib/finch_api/resources/hris/individuals.rb index e9c8f4a7..1baa4ba6 100644 --- a/lib/finch_api/resources/hris/individuals.rb +++ b/lib/finch_api/resources/hris/individuals.rb @@ -6,20 +6,20 @@ class HRIS class Individuals # Read individual data, excluding income and employment data # - # @overload retrieve_many(entity_ids: nil, options: nil, requests: nil, request_options: {}) + # @overload retrieve_many(requests:, entity_ids: nil, options: nil, request_options: {}) + # + # @param requests [Array] Body param: The array of batch requests. Maximum 10000 items per request. # # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] Body param # - # @param requests [Array] Body param - # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Internal::ResponsesPage] # # @see FinchAPI::Models::HRIS::IndividualRetrieveManyParams - def retrieve_many(params = {}) + def retrieve_many(params) query_params = [:entity_ids] parsed, options = FinchAPI::HRIS::IndividualRetrieveManyParams.dump_request(params) query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) diff --git a/lib/finch_api/resources/hris/pay_statements.rb b/lib/finch_api/resources/hris/pay_statements.rb index e875d15d..e1e599ba 100644 --- a/lib/finch_api/resources/hris/pay_statements.rb +++ b/lib/finch_api/resources/hris/pay_statements.rb @@ -11,7 +11,7 @@ class PayStatements # # @overload retrieve_many(requests:, entity_ids: nil, request_options: {}) # - # @param requests [Array] Body param: The array of batch requests. + # @param requests [Array] Body param: The array of batch requests. Maximum 10 payment_ids per request. # # @param entity_ids [Array] Query param: The entity IDs to specify which entities' data to access. # diff --git a/rbi/finch_api/models/hris/directory_list_individuals_params.rbi b/rbi/finch_api/models/hris/directory_list_individuals_params.rbi index f223b29c..4a1c62d0 100644 --- a/rbi/finch_api/models/hris/directory_list_individuals_params.rbi +++ b/rbi/finch_api/models/hris/directory_list_individuals_params.rbi @@ -22,7 +22,7 @@ module FinchAPI sig { params(entity_ids: T::Array[String]).void } attr_writer :entity_ids - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -47,7 +47,7 @@ module FinchAPI def self.new( # The entity IDs to specify which entities' data to access. entity_ids: nil, - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) limit: nil, # Index to start from (defaults to 0) offset: nil, diff --git a/rbi/finch_api/models/hris/directory_list_params.rbi b/rbi/finch_api/models/hris/directory_list_params.rbi index 4c0b8bed..078b9688 100644 --- a/rbi/finch_api/models/hris/directory_list_params.rbi +++ b/rbi/finch_api/models/hris/directory_list_params.rbi @@ -22,7 +22,7 @@ module FinchAPI sig { params(entity_ids: T::Array[String]).void } attr_writer :entity_ids - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -47,7 +47,7 @@ module FinchAPI def self.new( # The entity IDs to specify which entities' data to access. entity_ids: nil, - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) limit: nil, # Index to start from (defaults to 0) offset: nil, diff --git a/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi b/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi index 50f5ad67..b9e47d3b 100644 --- a/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi @@ -15,7 +15,7 @@ module FinchAPI ) end - # The array of batch requests. + # The array of batch requests. Maximum 10000 items per request. sig do returns( T::Array[FinchAPI::HRIS::EmploymentRetrieveManyParams::Request] @@ -41,7 +41,7 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # The array of batch requests. + # The array of batch requests. Maximum 10000 items per request. requests:, # The entity IDs to specify which entities' data to access. entity_ids: nil, @@ -71,17 +71,13 @@ module FinchAPI ) end - # 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. + # A stable Finch `id` (UUID v4) for an individual in the company. sig { returns(String) } attr_accessor :individual_id sig { params(individual_id: String).returns(T.attached_class) } 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. + # A stable Finch `id` (UUID v4) for an individual in the company. individual_id: ) end diff --git a/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi b/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi index 356451f3..91e36601 100644 --- a/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi @@ -15,6 +15,14 @@ module FinchAPI ) end + # The array of batch requests. Maximum 10000 items per request. + sig do + returns( + T::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] + ) + end + attr_accessor :requests + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -39,44 +47,26 @@ module FinchAPI end attr_writer :options - sig do - returns( - T.nilable( - T::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] - ) - ) - end - attr_reader :requests - sig do params( requests: T::Array[ FinchAPI::HRIS::IndividualRetrieveManyParams::Request::OrHash - ] - ).void - end - attr_writer :requests - - sig do - params( + ], entity_ids: T::Array[String], options: T.nilable( FinchAPI::HRIS::IndividualRetrieveManyParams::Options::OrHash ), - requests: - T::Array[ - FinchAPI::HRIS::IndividualRetrieveManyParams::Request::OrHash - ], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The array of batch requests. Maximum 10000 items per request. + requests:, # The entity IDs to specify which entities' data to access. entity_ids: nil, options: nil, - requests: nil, request_options: {} ) end @@ -84,13 +74,13 @@ module FinchAPI sig do override.returns( { + requests: + T::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], entity_ids: T::Array[String], options: T.nilable( FinchAPI::HRIS::IndividualRetrieveManyParams::Options ), - requests: - T::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], request_options: FinchAPI::RequestOptions } ) @@ -98,50 +88,47 @@ module FinchAPI def to_hash end - class Options < FinchAPI::Internal::Type::BaseModel + class Request < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::IndividualRetrieveManyParams::Options, + FinchAPI::HRIS::IndividualRetrieveManyParams::Request, FinchAPI::Internal::AnyHash ) end - sig { returns(T.nilable(T::Array[String])) } - attr_reader :include + sig { returns(String) } + attr_accessor :individual_id - sig { params(include: T::Array[String]).void } - attr_writer :include - - sig { params(include: T::Array[String]).returns(T.attached_class) } - def self.new(include: nil) + sig { params(individual_id: String).returns(T.attached_class) } + def self.new(individual_id:) end - sig { override.returns({ include: T::Array[String] }) } + sig { override.returns({ individual_id: String }) } def to_hash end end - class Request < FinchAPI::Internal::Type::BaseModel + class Options < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::IndividualRetrieveManyParams::Request, + FinchAPI::HRIS::IndividualRetrieveManyParams::Options, FinchAPI::Internal::AnyHash ) end - sig { returns(T.nilable(String)) } - attr_reader :individual_id + sig { returns(T.nilable(T::Array[String])) } + attr_reader :include - sig { params(individual_id: String).void } - attr_writer :individual_id + sig { params(include: T::Array[String]).void } + attr_writer :include - sig { params(individual_id: String).returns(T.attached_class) } - def self.new(individual_id: nil) + sig { params(include: T::Array[String]).returns(T.attached_class) } + def self.new(include: nil) end - sig { override.returns({ individual_id: String }) } + sig { override.returns({ include: T::Array[String] }) } def to_hash end end diff --git a/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi b/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi index 2e8a90f4..cb66ca44 100644 --- a/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi +++ b/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi @@ -15,7 +15,7 @@ module FinchAPI ) end - # The array of batch requests. + # The array of batch requests. Maximum 10 payment_ids per request. sig do returns( T::Array[FinchAPI::HRIS::PayStatementRetrieveManyParams::Request] @@ -41,7 +41,7 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # The array of batch requests. + # The array of batch requests. Maximum 10 payment_ids per request. requests:, # The entity IDs to specify which entities' data to access. entity_ids: nil, @@ -77,7 +77,7 @@ module FinchAPI sig { returns(String) } attr_accessor :payment_id - # Number of pay statements to return (defaults to all). + # Number of pay statements to return (defaults to 100, maximum 5000). sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -99,7 +99,7 @@ module FinchAPI def self.new( # A stable Finch `id` (UUID v4) for a payment. payment_id:, - # Number of pay statements to return (defaults to all). + # Number of pay statements to return (defaults to 100, maximum 5000). limit: nil, # Index to start from. offset: nil diff --git a/rbi/finch_api/resources/hris/directory.rbi b/rbi/finch_api/resources/hris/directory.rbi index cfca5e62..900809ea 100644 --- a/rbi/finch_api/resources/hris/directory.rbi +++ b/rbi/finch_api/resources/hris/directory.rbi @@ -20,7 +20,7 @@ module FinchAPI def list( # The entity IDs to specify which entities' data to access. entity_ids: nil, - # Number of employees to return (defaults to all) + # Number of employees to return (defaults to 100, maximum 10000) limit: nil, # Index to start from (defaults to 0) offset: nil, diff --git a/rbi/finch_api/resources/hris/employments.rbi b/rbi/finch_api/resources/hris/employments.rbi index b5e16764..40b109a5 100644 --- a/rbi/finch_api/resources/hris/employments.rbi +++ b/rbi/finch_api/resources/hris/employments.rbi @@ -20,7 +20,7 @@ module FinchAPI ) end def retrieve_many( - # Body param: The array of batch requests. + # Body param: The array of batch requests. Maximum 10000 items per request. requests:, # Query param: The entity IDs to specify which entities' data to access. entity_ids: nil, diff --git a/rbi/finch_api/resources/hris/individuals.rbi b/rbi/finch_api/resources/hris/individuals.rbi index 50b4843d..7d0e40b1 100644 --- a/rbi/finch_api/resources/hris/individuals.rbi +++ b/rbi/finch_api/resources/hris/individuals.rbi @@ -7,15 +7,15 @@ module FinchAPI # Read individual data, excluding income and employment data sig do params( + requests: + T::Array[ + FinchAPI::HRIS::IndividualRetrieveManyParams::Request::OrHash + ], entity_ids: T::Array[String], options: T.nilable( FinchAPI::HRIS::IndividualRetrieveManyParams::Options::OrHash ), - requests: - T::Array[ - FinchAPI::HRIS::IndividualRetrieveManyParams::Request::OrHash - ], request_options: FinchAPI::RequestOptions::OrHash ).returns( FinchAPI::Internal::ResponsesPage[ @@ -24,12 +24,12 @@ module FinchAPI ) end def retrieve_many( + # Body param: The array of batch requests. Maximum 10000 items per request. + requests:, # Query param: The entity IDs to specify which entities' data to access. entity_ids: nil, # Body param options: nil, - # Body param - requests: nil, request_options: {} ) end diff --git a/rbi/finch_api/resources/hris/pay_statements.rbi b/rbi/finch_api/resources/hris/pay_statements.rbi index 8118945a..96679354 100644 --- a/rbi/finch_api/resources/hris/pay_statements.rbi +++ b/rbi/finch_api/resources/hris/pay_statements.rbi @@ -23,7 +23,7 @@ module FinchAPI ) end def retrieve_many( - # Body param: The array of batch requests. + # Body param: The array of batch requests. Maximum 10 payment_ids per request. requests:, # Query param: The entity IDs to specify which entities' data to access. entity_ids: nil, diff --git a/sig/finch_api/models/hris/individual_retrieve_many_params.rbs b/sig/finch_api/models/hris/individual_retrieve_many_params.rbs index 6530e92d..3f0578b0 100644 --- a/sig/finch_api/models/hris/individual_retrieve_many_params.rbs +++ b/sig/finch_api/models/hris/individual_retrieve_many_params.rbs @@ -3,9 +3,9 @@ module FinchAPI module HRIS type individual_retrieve_many_params = { + requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], entity_ids: ::Array[String], - options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, - requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] + options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options? } & FinchAPI::Internal::Type::request_parameters @@ -13,32 +13,38 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] attr_accessor options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options? - attr_reader requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request]? - - def requests=: ( - ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] - ) -> ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request] - def initialize: ( + requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], ?entity_ids: ::Array[String], ?options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, - ?requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], entity_ids: ::Array[String], options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, - requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], request_options: FinchAPI::RequestOptions } + type request = { individual_id: String } + + class Request < FinchAPI::Internal::Type::BaseModel + attr_accessor individual_id: String + + def initialize: (individual_id: String) -> void + + def to_hash: -> { individual_id: String } + end + type options = { include: ::Array[String] } class Options < FinchAPI::Internal::Type::BaseModel @@ -50,18 +56,6 @@ module FinchAPI def to_hash: -> { include: ::Array[String] } end - - type request = { individual_id: String } - - class Request < FinchAPI::Internal::Type::BaseModel - attr_reader individual_id: String? - - def individual_id=: (String) -> String - - def initialize: (?individual_id: String) -> void - - def to_hash: -> { individual_id: String } - end end end end diff --git a/sig/finch_api/resources/hris/individuals.rbs b/sig/finch_api/resources/hris/individuals.rbs index 7b6b60a8..13e0bf82 100644 --- a/sig/finch_api/resources/hris/individuals.rbs +++ b/sig/finch_api/resources/hris/individuals.rbs @@ -3,9 +3,9 @@ module FinchAPI class HRIS class Individuals def retrieve_many: ( + requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], ?entity_ids: ::Array[String], ?options: FinchAPI::HRIS::IndividualRetrieveManyParams::Options?, - ?requests: ::Array[FinchAPI::HRIS::IndividualRetrieveManyParams::Request], ?request_options: FinchAPI::request_opts ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::HRIS::IndividualResponse] diff --git a/test/finch_api/resources/hris/individuals_test.rb b/test/finch_api/resources/hris/individuals_test.rb index a568a197..188d18d2 100644 --- a/test/finch_api/resources/hris/individuals_test.rb +++ b/test/finch_api/resources/hris/individuals_test.rb @@ -3,8 +3,8 @@ require_relative "../../test_helper" class FinchAPI::Test::Resources::HRIS::IndividualsTest < FinchAPI::Test::ResourceTest - def test_retrieve_many - response = @finch.hris.individuals.retrieve_many + def test_retrieve_many_required_params + response = @finch.hris.individuals.retrieve_many(requests: [{individual_id: "individual_id"}]) assert_pattern do response => FinchAPI::Internal::ResponsesPage diff --git a/test/finch_api/resources/hris/pay_statements_test.rb b/test/finch_api/resources/hris/pay_statements_test.rb index 5090346f..9ddf8b43 100644 --- a/test/finch_api/resources/hris/pay_statements_test.rb +++ b/test/finch_api/resources/hris/pay_statements_test.rb @@ -5,7 +5,7 @@ class FinchAPI::Test::Resources::HRIS::PayStatementsTest < FinchAPI::Test::ResourceTest def test_retrieve_many_required_params response = - @finch.hris.pay_statements.retrieve_many(requests: [{payment_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}]) + @finch.hris.pay_statements.retrieve_many(requests: [{payment_id: "fc8b024e-d373-4c9c-80fc-f1625383d142"}]) assert_pattern do response => FinchAPI::Internal::ResponsesPage From 85c181b99cfc180f02a4da5b3dd3e7102f65747b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 17:24:27 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.48 --- .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 a9e92226..21a705e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.47" + ".": "0.1.0-alpha.48" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index aefc8bf7..1d44f202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.48 (2026-07-13) + +Full Changelog: [v0.1.0-alpha.47...v0.1.0-alpha.48](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.47...v0.1.0-alpha.48) + +### Features + +* **api:** api update ([69e8027](https://github.com/Finch-API/finch-api-ruby/commit/69e8027b72120985c9e601d517162a0225f3dd6d)) + ## 0.1.0-alpha.47 (2026-07-01) Full Changelog: [v0.1.0-alpha.46...v0.1.0-alpha.47](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.46...v0.1.0-alpha.47) diff --git a/Gemfile.lock b/Gemfile.lock index 43c6f1e0..4b53d247 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.47) + finch-api (0.1.0.pre.alpha.48) cgi connection_pool diff --git a/README.md b/README.md index 3b0f78e9..3fbaec0f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.47" +gem "finch-api", "~> 0.1.0.pre.alpha.48" ``` diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 6f6f9131..8895b174 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.47" + VERSION = "0.1.0.pre.alpha.48" end