From ac937c138291704137a33d18cea1571d2e6f96ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 17:39:43 +0000 Subject: [PATCH 01/46] feat(api): add per endpoint security --- .stats.yml | 2 +- lib/finch_api/client.rb | 8 +- .../internal/transport/base_client.rb | 28 +++- lib/finch_api/resources/access_tokens.rb | 1 + lib/finch_api/resources/account.rb | 2 + lib/finch_api/resources/connect/sessions.rb | 2 + lib/finch_api/resources/hris/benefits.rb | 5 + .../resources/hris/benefits/individuals.rb | 4 + lib/finch_api/resources/hris/company.rb | 1 + .../hris/company/pay_statement_item.rb | 1 + .../hris/company/pay_statement_item/rules.rb | 4 + lib/finch_api/resources/hris/directory.rb | 1 + lib/finch_api/resources/hris/documents.rb | 2 + lib/finch_api/resources/hris/employments.rb | 1 + lib/finch_api/resources/hris/individuals.rb | 1 + .../resources/hris/pay_statements.rb | 1 + lib/finch_api/resources/hris/payments.rb | 1 + lib/finch_api/resources/jobs/automated.rb | 3 + lib/finch_api/resources/jobs/manual.rb | 1 + lib/finch_api/resources/payroll/pay_groups.rb | 2 + lib/finch_api/resources/providers.rb | 1 + lib/finch_api/resources/request_forwarding.rb | 1 + lib/finch_api/resources/sandbox/company.rb | 1 + .../resources/sandbox/connections.rb | 1 + .../resources/sandbox/connections/accounts.rb | 2 + lib/finch_api/resources/sandbox/directory.rb | 1 + lib/finch_api/resources/sandbox/employment.rb | 1 + lib/finch_api/resources/sandbox/individual.rb | 1 + lib/finch_api/resources/sandbox/jobs.rb | 1 + .../resources/sandbox/jobs/configuration.rb | 2 + lib/finch_api/resources/sandbox/payment.rb | 1 + rbi/finch_api/client.rbi | 8 +- .../internal/transport/base_client.rbi | 7 +- sig/finch_api/client.rbs | 4 +- .../internal/transport/base_client.rbs | 2 + test/finch_api/client_test.rb | 120 +++++++++++++++--- test/finch_api/test_helper.rb | 7 +- 37 files changed, 204 insertions(+), 28 deletions(-) diff --git a/.stats.yml b/.stats.yml index b15bfab0..4db1b6f9 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-46f433f34d440aa1dfcc48cc8d822c598571b68be2f723ec99e1b4fba6c13b1e.yml openapi_spec_hash: 5b5cd728776723ac773900f7e8a32c05 -config_hash: 0892e2e0eeb0343a022afa62e9080dd1 +config_hash: 83522e0e335cf983f8d2119c1f2bba18 diff --git a/lib/finch_api/client.rb b/lib/finch_api/client.rb index f3330ed8..04735b96 100644 --- a/lib/finch_api/client.rb +++ b/lib/finch_api/client.rb @@ -56,11 +56,11 @@ class Client < FinchAPI::Internal::Transport::BaseClient # @api private # + # @param security [Hash{Symbol=>Boolean}] + # # @return [Hash{String=>String}] - private def auth_headers - return bearer_auth unless bearer_auth.empty? - return basic_auth unless basic_auth.empty? - {} + private def auth_headers(security:) + {bearer_auth:, basic_auth:}.slice(*security.keys).values.reduce({}, :merge) end # @api private diff --git a/lib/finch_api/internal/transport/base_client.rb b/lib/finch_api/internal/transport/base_client.rb index af133bbc..4b00c2be 100644 --- a/lib/finch_api/internal/transport/base_client.rb +++ b/lib/finch_api/internal/transport/base_client.rb @@ -31,7 +31,19 @@ class << self # # @raise [ArgumentError] def validate!(req) - keys = [:method, :path, :query, :headers, :body, :unwrap, :page, :stream, :model, :options] + keys = [ + :method, + :path, + :query, + :headers, + :body, + :unwrap, + :page, + :stream, + :model, + :security, + :options + ] case req in Hash req.each_key do |k| @@ -252,6 +264,8 @@ def initialize( # # @option req [FinchAPI::Internal::Type::Converter, Class, nil] :model # + # @option req [Hash{Symbol=>Boolean}, nil] :security + # # @param opts [Hash{Symbol=>Object}] . # # @option opts [String, nil] :idempotency_key @@ -276,7 +290,12 @@ def initialize( headers = FinchAPI::Internal::Util.normalized_headers( @headers, - auth_headers, + auth_headers( + security: req.fetch( + :security, + {bearer_auth: true, basic_auth: true} + ) + ), req[:headers].to_h, opts[:extra_headers].to_h ) @@ -439,7 +458,7 @@ def send_request(request, redirect_count:, retry_count:, send_retry_header:) # Execute the request specified by `req`. This is the method that all resource # methods call into. # - # @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, options: {}) + # @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, security: {bearer_auth: true, basic_auth: true}, options: {}) # # @param method [Symbol] # @@ -459,6 +478,8 @@ def send_request(request, redirect_count:, retry_count:, send_retry_header:) # # @param model [FinchAPI::Internal::Type::Converter, Class, nil] # + # @param security [Hash{Symbol=>Boolean}, nil] + # # @param options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] . # # @option options [String, nil] :idempotency_key @@ -551,6 +572,7 @@ def inspect page: T.nilable(T::Class[FinchAPI::Internal::Type::BasePage[FinchAPI::Internal::Type::BaseModel]]), stream: T.nilable(T::Class[T.anything]), model: T.nilable(FinchAPI::Internal::Type::Converter::Input), + security: T.nilable({bearer_auth: T::Boolean, basic_auth: T::Boolean}), options: T.nilable(FinchAPI::RequestOptions::OrHash) } end diff --git a/lib/finch_api/resources/access_tokens.rb b/lib/finch_api/resources/access_tokens.rb index 9efb267d..a3898776 100644 --- a/lib/finch_api/resources/access_tokens.rb +++ b/lib/finch_api/resources/access_tokens.rb @@ -27,6 +27,7 @@ def create(params) path: "auth/token", body: parsed, model: FinchAPI::CreateAccessTokenResponse, + security: {}, options: options ) end diff --git a/lib/finch_api/resources/account.rb b/lib/finch_api/resources/account.rb index 0a8ec282..ebaa9431 100644 --- a/lib/finch_api/resources/account.rb +++ b/lib/finch_api/resources/account.rb @@ -17,6 +17,7 @@ def disconnect(params = {}) method: :post, path: "disconnect", model: FinchAPI::DisconnectResponse, + security: {bearer_auth: true}, options: params[:request_options] ) end @@ -35,6 +36,7 @@ def introspect(params = {}) method: :get, path: "introspect", model: FinchAPI::Introspection, + security: {bearer_auth: true}, options: params[:request_options] ) end diff --git a/lib/finch_api/resources/connect/sessions.rb b/lib/finch_api/resources/connect/sessions.rb index 3d850a1f..625186cd 100644 --- a/lib/finch_api/resources/connect/sessions.rb +++ b/lib/finch_api/resources/connect/sessions.rb @@ -41,6 +41,7 @@ def new(params) path: "connect/sessions", body: parsed, model: FinchAPI::Models::Connect::SessionNewResponse, + security: {basic_auth: true}, options: options ) end @@ -72,6 +73,7 @@ def reauthenticate(params) path: "connect/sessions/reauthenticate", body: parsed, model: FinchAPI::Models::Connect::SessionReauthenticateResponse, + security: {basic_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/benefits.rb b/lib/finch_api/resources/hris/benefits.rb index 9f72a62d..c9e0ed4a 100644 --- a/lib/finch_api/resources/hris/benefits.rb +++ b/lib/finch_api/resources/hris/benefits.rb @@ -39,6 +39,7 @@ def create(params = {}) query: parsed.slice(*query_params), body: parsed.except(*query_params), model: FinchAPI::HRIS::CreateCompanyBenefitsResponse, + security: {bearer_auth: true}, options: options ) end @@ -63,6 +64,7 @@ def retrieve(benefit_id, params = {}) path: ["employer/benefits/%1$s", benefit_id], query: parsed, model: FinchAPI::HRIS::CompanyBenefit, + security: {bearer_auth: true}, options: options ) end @@ -91,6 +93,7 @@ def update(benefit_id, params = {}) query: parsed.slice(*query_params), body: parsed.except(*query_params), model: FinchAPI::HRIS::UpdateCompanyBenefitResponse, + security: {bearer_auth: true}, options: options ) end @@ -114,6 +117,7 @@ def list(params = {}) query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::CompanyBenefit, + security: {bearer_auth: true}, options: options ) end @@ -137,6 +141,7 @@ def list_supported_benefits(params = {}) query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::SupportedBenefit, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/benefits/individuals.rb b/lib/finch_api/resources/hris/benefits/individuals.rb index 8ec78fa6..5ca102e3 100644 --- a/lib/finch_api/resources/hris/benefits/individuals.rb +++ b/lib/finch_api/resources/hris/benefits/individuals.rb @@ -31,6 +31,7 @@ def enroll_many(benefit_id, params = {}) query: parsed.except(:individuals), body: parsed[:individuals], model: FinchAPI::HRIS::Benefits::EnrolledIndividualBenefitResponse, + security: {bearer_auth: true}, options: options ) end @@ -55,6 +56,7 @@ def enrolled_ids(benefit_id, params = {}) path: ["employer/benefits/%1$s/enrolled", benefit_id], query: parsed, model: FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse, + security: {bearer_auth: true}, options: options ) end @@ -86,6 +88,7 @@ def retrieve_many_benefits(benefit_id, params = {}) query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::Benefits::IndividualBenefit, + security: {bearer_auth: true}, options: options ) end @@ -114,6 +117,7 @@ def unenroll_many(benefit_id, params = {}) query: parsed.slice(*query_params), body: parsed.except(*query_params), model: FinchAPI::HRIS::Benefits::UnenrolledIndividualBenefitResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/company.rb b/lib/finch_api/resources/hris/company.rb index 6a93f9fb..11309297 100644 --- a/lib/finch_api/resources/hris/company.rb +++ b/lib/finch_api/resources/hris/company.rb @@ -25,6 +25,7 @@ def retrieve(params = {}) path: "employer/company", query: parsed, model: FinchAPI::HRIS::HRISCompany, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/company/pay_statement_item.rb b/lib/finch_api/resources/hris/company/pay_statement_item.rb index 26bb84ca..88b048b1 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item.rb @@ -41,6 +41,7 @@ def list(params = {}) query: parsed, page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb index c7085069..597bcc19 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb @@ -43,6 +43,7 @@ def create(params = {}) query: parsed.slice(*query_params), body: parsed.except(*query_params), model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse, + security: {bearer_auth: true}, options: options ) end @@ -71,6 +72,7 @@ def update(rule_id, params = {}) query: parsed.slice(*query_params), body: parsed.except(*query_params), model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse, + security: {bearer_auth: true}, options: options ) end @@ -94,6 +96,7 @@ def list(params = {}) query: parsed, page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse, + security: {bearer_auth: true}, options: options ) end @@ -118,6 +121,7 @@ def delete(rule_id, params = {}) path: ["employer/pay-statement-item/rule/%1$s", rule_id], query: parsed, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/directory.rb b/lib/finch_api/resources/hris/directory.rb index d04b348e..d46ee225 100644 --- a/lib/finch_api/resources/hris/directory.rb +++ b/lib/finch_api/resources/hris/directory.rb @@ -27,6 +27,7 @@ def list(params = {}) query: parsed, page: FinchAPI::Internal::IndividualsPage, model: FinchAPI::HRIS::IndividualInDirectory, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/documents.rb b/lib/finch_api/resources/hris/documents.rb index 02ac3131..4b9f78c6 100644 --- a/lib/finch_api/resources/hris/documents.rb +++ b/lib/finch_api/resources/hris/documents.rb @@ -34,6 +34,7 @@ def list(params = {}) path: "employer/documents", query: parsed, model: FinchAPI::Models::HRIS::DocumentListResponse, + security: {bearer_auth: true}, options: options ) end @@ -59,6 +60,7 @@ def retreive(document_id, params = {}) path: ["employer/documents/%1$s", document_id], query: parsed, model: FinchAPI::Models::HRIS::DocumentRetreiveResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/employments.rb b/lib/finch_api/resources/hris/employments.rb index 6609de72..8c04e613 100644 --- a/lib/finch_api/resources/hris/employments.rb +++ b/lib/finch_api/resources/hris/employments.rb @@ -27,6 +27,7 @@ def retrieve_many(params) body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::EmploymentDataResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/individuals.rb b/lib/finch_api/resources/hris/individuals.rb index 9f9182f6..20455946 100644 --- a/lib/finch_api/resources/hris/individuals.rb +++ b/lib/finch_api/resources/hris/individuals.rb @@ -29,6 +29,7 @@ def retrieve_many(params = {}) body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::IndividualResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/pay_statements.rb b/lib/finch_api/resources/hris/pay_statements.rb index 40b48832..53fac6aa 100644 --- a/lib/finch_api/resources/hris/pay_statements.rb +++ b/lib/finch_api/resources/hris/pay_statements.rb @@ -30,6 +30,7 @@ def retrieve_many(params) body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::PayStatementResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/hris/payments.rb b/lib/finch_api/resources/hris/payments.rb index 1079291c..489d73a6 100644 --- a/lib/finch_api/resources/hris/payments.rb +++ b/lib/finch_api/resources/hris/payments.rb @@ -30,6 +30,7 @@ def list(params) query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::Payment, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/jobs/automated.rb b/lib/finch_api/resources/jobs/automated.rb index 08853dd8..4e483b59 100644 --- a/lib/finch_api/resources/jobs/automated.rb +++ b/lib/finch_api/resources/jobs/automated.rb @@ -37,6 +37,7 @@ def create(params) path: "jobs/automated", body: parsed, model: FinchAPI::Models::Jobs::AutomatedCreateResponse, + security: {bearer_auth: true}, options: options ) end @@ -56,6 +57,7 @@ def retrieve(job_id, params = {}) method: :get, path: ["jobs/automated/%1$s", job_id], model: FinchAPI::Jobs::AutomatedAsyncJob, + security: {bearer_auth: true}, options: params[:request_options] ) end @@ -82,6 +84,7 @@ def list(params = {}) path: "jobs/automated", query: parsed, model: FinchAPI::Models::Jobs::AutomatedListResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/jobs/manual.rb b/lib/finch_api/resources/jobs/manual.rb index fa482da0..a0cafef7 100644 --- a/lib/finch_api/resources/jobs/manual.rb +++ b/lib/finch_api/resources/jobs/manual.rb @@ -20,6 +20,7 @@ def retrieve(job_id, params = {}) method: :get, path: ["jobs/manual/%1$s", job_id], model: FinchAPI::Jobs::ManualAsyncJob, + security: {bearer_auth: true}, options: params[:request_options] ) end diff --git a/lib/finch_api/resources/payroll/pay_groups.rb b/lib/finch_api/resources/payroll/pay_groups.rb index da14ff13..2db05d98 100644 --- a/lib/finch_api/resources/payroll/pay_groups.rb +++ b/lib/finch_api/resources/payroll/pay_groups.rb @@ -24,6 +24,7 @@ def retrieve(pay_group_id, params = {}) path: ["employer/pay-groups/%1$s", pay_group_id], query: parsed, model: FinchAPI::Models::Payroll::PayGroupRetrieveResponse, + security: {bearer_auth: true}, options: options ) end @@ -51,6 +52,7 @@ def list(params = {}) query: parsed, page: FinchAPI::Internal::SinglePage, model: FinchAPI::Models::Payroll::PayGroupListResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/providers.rb b/lib/finch_api/resources/providers.rb index 7c278011..d4bf5071 100644 --- a/lib/finch_api/resources/providers.rb +++ b/lib/finch_api/resources/providers.rb @@ -18,6 +18,7 @@ def list(params = {}) path: "providers", page: FinchAPI::Internal::SinglePage, model: FinchAPI::Models::ProviderListResponse, + security: {bearer_auth: true}, options: params[:request_options] ) end diff --git a/lib/finch_api/resources/request_forwarding.rb b/lib/finch_api/resources/request_forwarding.rb index 44222145..715a0a8d 100644 --- a/lib/finch_api/resources/request_forwarding.rb +++ b/lib/finch_api/resources/request_forwarding.rb @@ -35,6 +35,7 @@ def forward(params) path: "forward", body: parsed, model: FinchAPI::Models::RequestForwardingForwardResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/company.rb b/lib/finch_api/resources/sandbox/company.rb index 34f959df..68431a86 100644 --- a/lib/finch_api/resources/sandbox/company.rb +++ b/lib/finch_api/resources/sandbox/company.rb @@ -39,6 +39,7 @@ def update(params) path: "sandbox/company", body: parsed, model: FinchAPI::Models::Sandbox::CompanyUpdateResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/connections.rb b/lib/finch_api/resources/sandbox/connections.rb index a6c7389f..f8653157 100644 --- a/lib/finch_api/resources/sandbox/connections.rb +++ b/lib/finch_api/resources/sandbox/connections.rb @@ -34,6 +34,7 @@ def create(params) path: "sandbox/connections", body: parsed, model: FinchAPI::Models::Sandbox::ConnectionCreateResponse, + security: {basic_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/connections/accounts.rb b/lib/finch_api/resources/sandbox/connections/accounts.rb index e769c1dc..4b5e7028 100644 --- a/lib/finch_api/resources/sandbox/connections/accounts.rb +++ b/lib/finch_api/resources/sandbox/connections/accounts.rb @@ -32,6 +32,7 @@ def create(params) path: "sandbox/connections/accounts", body: parsed, model: FinchAPI::Models::Sandbox::Connections::AccountCreateResponse, + security: {basic_auth: true}, options: options ) end @@ -54,6 +55,7 @@ def update(params = {}) path: "sandbox/connections/accounts", body: parsed, model: FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/directory.rb b/lib/finch_api/resources/sandbox/directory.rb index 1589a91f..d046b784 100644 --- a/lib/finch_api/resources/sandbox/directory.rb +++ b/lib/finch_api/resources/sandbox/directory.rb @@ -25,6 +25,7 @@ def create(params = {}) path: "sandbox/directory", body: parsed[:body], model: FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown], + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/employment.rb b/lib/finch_api/resources/sandbox/employment.rb index 2a6b351c..efed725d 100644 --- a/lib/finch_api/resources/sandbox/employment.rb +++ b/lib/finch_api/resources/sandbox/employment.rb @@ -61,6 +61,7 @@ def update(individual_id, params = {}) path: ["sandbox/employment/%1$s", individual_id], body: parsed, model: FinchAPI::Models::Sandbox::EmploymentUpdateResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/individual.rb b/lib/finch_api/resources/sandbox/individual.rb index 37b0ab55..d7cf1b0c 100644 --- a/lib/finch_api/resources/sandbox/individual.rb +++ b/lib/finch_api/resources/sandbox/individual.rb @@ -49,6 +49,7 @@ def update(individual_id, params = {}) path: ["sandbox/individual/%1$s", individual_id], body: parsed, model: FinchAPI::Models::Sandbox::IndividualUpdateResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/jobs.rb b/lib/finch_api/resources/sandbox/jobs.rb index ee2b236f..0d7de510 100644 --- a/lib/finch_api/resources/sandbox/jobs.rb +++ b/lib/finch_api/resources/sandbox/jobs.rb @@ -25,6 +25,7 @@ def create(params) path: "sandbox/jobs", body: parsed, model: FinchAPI::Models::Sandbox::JobCreateResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/jobs/configuration.rb b/lib/finch_api/resources/sandbox/jobs/configuration.rb index 6e21c45e..c9a5800c 100644 --- a/lib/finch_api/resources/sandbox/jobs/configuration.rb +++ b/lib/finch_api/resources/sandbox/jobs/configuration.rb @@ -19,6 +19,7 @@ def retrieve(params = {}) method: :get, path: "sandbox/jobs/configuration", model: FinchAPI::Internal::Type::ArrayOf[FinchAPI::Sandbox::Jobs::SandboxJobConfiguration], + security: {bearer_auth: true}, options: params[:request_options] ) end @@ -41,6 +42,7 @@ def update(params) path: "sandbox/jobs/configuration", body: parsed, model: FinchAPI::Sandbox::Jobs::SandboxJobConfiguration, + security: {bearer_auth: true}, options: options ) end diff --git a/lib/finch_api/resources/sandbox/payment.rb b/lib/finch_api/resources/sandbox/payment.rb index ab0edb7d..e6e97027 100644 --- a/lib/finch_api/resources/sandbox/payment.rb +++ b/lib/finch_api/resources/sandbox/payment.rb @@ -26,6 +26,7 @@ def create(params = {}) path: "sandbox/payment", body: parsed, model: FinchAPI::Models::Sandbox::PaymentCreateResponse, + security: {bearer_auth: true}, options: options ) end diff --git a/rbi/finch_api/client.rbi b/rbi/finch_api/client.rbi index 4c795423..d72ce814 100644 --- a/rbi/finch_api/client.rbi +++ b/rbi/finch_api/client.rbi @@ -50,8 +50,12 @@ module FinchAPI attr_reader :connect # @api private - sig { override.returns(T::Hash[String, String]) } - private def auth_headers + sig do + override + .params(security: { bearer_auth: T::Boolean, basic_auth: T::Boolean }) + .returns(T::Hash[String, String]) + end + private def auth_headers(security:) end # @api private diff --git a/rbi/finch_api/internal/transport/base_client.rbi b/rbi/finch_api/internal/transport/base_client.rbi index 3f33b2f5..4f5573a1 100644 --- a/rbi/finch_api/internal/transport/base_client.rbi +++ b/rbi/finch_api/internal/transport/base_client.rbi @@ -51,6 +51,8 @@ module FinchAPI ), stream: T.nilable(T::Class[T.anything]), model: T.nilable(FinchAPI::Internal::Type::Converter::Input), + security: + T.nilable({ bearer_auth: T::Boolean, basic_auth: T::Boolean }), options: T.nilable(FinchAPI::RequestOptions::OrHash) } end @@ -228,7 +230,7 @@ module FinchAPI # Execute the request specified by `req`. This is the method that all resource # methods call into. # - # @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, options: {}) + # @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, security: {bearer_auth: true, basic_auth: true}, options: {}) sig do params( method: Symbol, @@ -270,6 +272,8 @@ module FinchAPI ), stream: T.nilable(T::Class[T.anything]), model: T.nilable(FinchAPI::Internal::Type::Converter::Input), + security: + T.nilable({ bearer_auth: T::Boolean, basic_auth: T::Boolean }), options: T.nilable(FinchAPI::RequestOptions::OrHash) ).returns(T.anything) end @@ -283,6 +287,7 @@ module FinchAPI page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, + security: { bearer_auth: true, basic_auth: true }, options: {} ) end diff --git a/sig/finch_api/client.rbs b/sig/finch_api/client.rbs index f7350df8..5935a270 100644 --- a/sig/finch_api/client.rbs +++ b/sig/finch_api/client.rbs @@ -34,7 +34,9 @@ module FinchAPI attr_reader connect: FinchAPI::Resources::Connect - private def auth_headers: -> ::Hash[String, String] + private def auth_headers: ( + security: { bearer_auth: bool, basic_auth: bool } + ) -> ::Hash[String, String] private def bearer_auth: -> ::Hash[String, String] diff --git a/sig/finch_api/internal/transport/base_client.rbs b/sig/finch_api/internal/transport/base_client.rbs index 70cd492e..ac0445bf 100644 --- a/sig/finch_api/internal/transport/base_client.rbs +++ b/sig/finch_api/internal/transport/base_client.rbs @@ -20,6 +20,7 @@ module FinchAPI page: Class?, stream: Class?, model: FinchAPI::Internal::Type::Converter::input?, + security: { bearer_auth: bool, basic_auth: bool }?, options: FinchAPI::request_opts? } type request_input = @@ -123,6 +124,7 @@ module FinchAPI ?page: Class?, ?stream: Class?, ?model: FinchAPI::Internal::Type::Converter::input?, + ?security: { bearer_auth: bool, basic_auth: bool }?, ?options: FinchAPI::request_opts? ) -> top diff --git a/test/finch_api/client_test.rb b/test/finch_api/client_test.rb index 5208163f..63e0a612 100644 --- a/test/finch_api/client_test.rb +++ b/test/finch_api/client_test.rb @@ -30,7 +30,13 @@ def after_all def test_client_default_request_default_retry_attempts stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list @@ -43,7 +49,13 @@ def test_client_given_request_default_retry_attempts stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) finch = - FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 3) + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret", + max_retries: 3 + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list @@ -55,7 +67,13 @@ def test_client_given_request_default_retry_attempts def test_client_default_request_given_retry_attempts stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {max_retries: 3}) @@ -68,7 +86,13 @@ def test_client_given_request_given_retry_attempts stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) finch = - FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 3) + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret", + max_retries: 3 + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {max_retries: 4}) @@ -85,7 +109,13 @@ def test_client_retry_after_seconds ) finch = - FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 1) + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret", + max_retries: 1 + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list @@ -103,7 +133,13 @@ def test_client_retry_after_date ) finch = - FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 1) + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret", + max_retries: 1 + ) assert_raises(FinchAPI::Errors::InternalServerError) do Thread.current.thread_variable_set(:time_now, Time.now) @@ -123,7 +159,13 @@ def test_client_retry_after_ms ) finch = - FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token", max_retries: 1) + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret", + max_retries: 1 + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list @@ -136,7 +178,13 @@ def test_client_retry_after_ms def test_retry_count_header stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list @@ -150,7 +198,13 @@ def test_retry_count_header def test_omit_retry_count_header stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {extra_headers: {"x-stainless-retry-count" => nil}}) @@ -164,7 +218,13 @@ def test_omit_retry_count_header def test_overwrite_retry_count_header stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 500, body: {}) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::InternalServerError) do finch.hris.directory.list(request_options: {extra_headers: {"x-stainless-retry-count" => "42"}}) @@ -184,7 +244,13 @@ def test_client_redirect_307 headers: {"location" => "/redirected"} ) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {}}) @@ -213,7 +279,13 @@ def test_client_redirect_303 headers: {"location" => "/redirected"} ) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {}}) @@ -237,7 +309,13 @@ def test_client_redirect_auth_keep_same_origin headers: {"location" => "/redirected"} ) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {"authorization" => "Bearer xyz"}}) @@ -264,7 +342,13 @@ def test_client_redirect_auth_strip_cross_origin headers: {"location" => "https://example.com/redirected"} ) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) assert_raises(FinchAPI::Errors::APIConnectionError) do finch.hris.directory.list(request_options: {extra_headers: {"authorization" => "Bearer xyz"}}) @@ -279,7 +363,13 @@ def test_client_redirect_auth_strip_cross_origin def test_default_headers stub_request(:get, "http://localhost/employer/directory").to_return_json(status: 200, body: {}) - finch = FinchAPI::Client.new(base_url: "http://localhost", access_token: "My Access Token") + finch = + FinchAPI::Client.new( + base_url: "http://localhost", + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) finch.hris.directory.list diff --git a/test/finch_api/test_helper.rb b/test/finch_api/test_helper.rb index 2f623e3b..825bb0cf 100644 --- a/test/finch_api/test_helper.rb +++ b/test/finch_api/test_helper.rb @@ -48,7 +48,12 @@ class FinchAPI::Test::SingletonClient < FinchAPI::Client TEST_API_BASE_URL = ENV.fetch("TEST_API_BASE_URL", "http://localhost:4010") def initialize - super(base_url: FinchAPI::Test::SingletonClient::TEST_API_BASE_URL, access_token: "My Access Token") + super( + base_url: FinchAPI::Test::SingletonClient::TEST_API_BASE_URL, + access_token: "My Access Token", + client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", + client_secret: "My Client Secret" + ) end end From a021ffb4eec64de459cb22c27b4c7c4592003d21 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:54:35 +0000 Subject: [PATCH 02/46] chore(internal): codegen related update --- .../resources/hris/directory_test.rb | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/test/finch_api/resources/hris/directory_test.rb b/test/finch_api/resources/hris/directory_test.rb index 07b3310d..95bbda88 100644 --- a/test/finch_api/resources/hris/directory_test.rb +++ b/test/finch_api/resources/hris/directory_test.rb @@ -34,25 +34,13 @@ def test_list_individuals response = @finch.hris.directory.list_individuals assert_pattern do - response => FinchAPI::Internal::IndividualsPage - end - - row = response.to_enum.first - return if row.nil? - - assert_pattern do - row => FinchAPI::HRIS::IndividualInDirectory + response => FinchAPI::UnnamedTypeWithNoPropertyInfoOrParent0 end assert_pattern do - row => { - id: String, - department: FinchAPI::HRIS::IndividualInDirectory::Department | nil, - first_name: String | nil, - is_active: FinchAPI::Internal::Type::Boolean | nil, - last_name: String | nil, - manager: FinchAPI::HRIS::IndividualInDirectory::Manager | nil, - middle_name: String | nil + response => { + individuals: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::IndividualInDirectory]), + paging: FinchAPI::Paging } end end From 2ee41c81ef9707aa7180723a283789a5bbaa041d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 18:34:44 +0000 Subject: [PATCH 03/46] fix(tests): skip broken date validation test --- .stats.yml | 2 +- test/finch_api/resources/access_tokens_test.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4db1b6f9..072a0a86 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-46f433f34d440aa1dfcc48cc8d822c598571b68be2f723ec99e1b4fba6c13b1e.yml openapi_spec_hash: 5b5cd728776723ac773900f7e8a32c05 -config_hash: 83522e0e335cf983f8d2119c1f2bba18 +config_hash: ccdf6a5b4aaa2a0897c89ac8685d8eb0 diff --git a/test/finch_api/resources/access_tokens_test.rb b/test/finch_api/resources/access_tokens_test.rb index ecc07d83..e57c33f9 100644 --- a/test/finch_api/resources/access_tokens_test.rb +++ b/test/finch_api/resources/access_tokens_test.rb @@ -4,6 +4,8 @@ class FinchAPI::Test::Resources::AccessTokensTest < FinchAPI::Test::ResourceTest def test_create_required_params + skip("prism doesnt like the format for the API-Version header") + response = @finch.access_tokens.create(code: "code") assert_pattern do From 8022436ca504321dffdb8eedabc0c9ee82e0bf45 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 16:36:32 +0000 Subject: [PATCH 04/46] fix(docs): fix mcp installation instructions for remote servers --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8085e54e..6877f1c4 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/). Use the Finch MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40tryfinch%2Ffinch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl19) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40tryfinch%2Ffinch-api-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tryfinch%2Ffinch-api-mcp%22%5D%7D) +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40tryfinch%2Ffinch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl0sImVudiI6eyJGSU5DSF9BQ0NFU1NfVE9LRU4iOiJNeSBBY2Nlc3MgVG9rZW4iLCJGSU5DSF9DTElFTlRfSUQiOiI0YWIxNWU1MS0xMWFkLTQ5ZjQtYWNhZS1mMzQzYjc3OTQzNzUiLCJGSU5DSF9DTElFTlRfU0VDUkVUIjoiTXkgQ2xpZW50IFNlY3JldCIsIkZJTkNIX1dFQkhPT0tfU0VDUkVUIjoiTXkgV2ViaG9vayBTZWNyZXQifX0) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40tryfinch%2Ffinch-api-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tryfinch%2Ffinch-api-mcp%22%5D%2C%22env%22%3A%7B%22FINCH_ACCESS_TOKEN%22%3A%22My%20Access%20Token%22%2C%22FINCH_CLIENT_ID%22%3A%224ab15e51-11ad-49f4-acae-f343b7794375%22%2C%22FINCH_CLIENT_SECRET%22%3A%22My%20Client%20Secret%22%2C%22FINCH_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D) > Note: You may need to set environment variables in your MCP client. From 66e8f668ba49f9959bd0067d4161d972ebad46ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 14:42:17 +0000 Subject: [PATCH 05/46] fix(client): always add content-length to post body, even when empty --- lib/finch_api/internal/transport/pooled_net_requester.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/finch_api/internal/transport/pooled_net_requester.rb b/lib/finch_api/internal/transport/pooled_net_requester.rb index 97752aef..d8edf1aa 100644 --- a/lib/finch_api/internal/transport/pooled_net_requester.rb +++ b/lib/finch_api/internal/transport/pooled_net_requester.rb @@ -75,7 +75,7 @@ def build_request(request, &blk) case body in nil - nil + req["content-length"] ||= 0 unless req["transfer-encoding"] in String req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"] req.body_stream = FinchAPI::Internal::Util::ReadIOAdapter.new(body, &blk) From 57bc88cdd60bfec535752170ffeeebe157a0bfce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:22:39 +0000 Subject: [PATCH 06/46] chore(docs): remove www prefix --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b1bc266a..7c49ee8a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g To install via git in your `Gemfile`: ```ruby -gem "finch-api", git: "https://www.github.com/Finch-API/finch-api-ruby" +gem "finch-api", git: "https://github.com/Finch-API/finch-api-ruby" ``` Alternatively, reference local copy of the repo: ```bash -$ git clone -- 'https://www.github.com/Finch-API/finch-api-ruby' '' +$ git clone -- 'https://github.com/Finch-API/finch-api-ruby' '' ``` ```ruby From 7bc3e6509545d52948558cc20180865f09e946dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 17:21:23 +0000 Subject: [PATCH 07/46] fix(client): loosen json header parsing --- lib/finch_api/internal/util.rb | 2 +- rbi/finch_api/internal/util.rbi | 2 +- test/finch_api/internal/util_test.rb | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 6c29c988..1123afb8 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -485,7 +485,7 @@ def writable_enum(&blk) end # @type [Regexp] - JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)} + JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)} # @type [Regexp] JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)} diff --git a/rbi/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi index 0bccd650..00a09891 100644 --- a/rbi/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -296,7 +296,7 @@ module FinchAPI end JSON_CONTENT = - T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp) + T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp) JSONL_CONTENT = T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp) diff --git a/test/finch_api/internal/util_test.rb b/test/finch_api/internal/util_test.rb index f3cd1297..c49c904d 100644 --- a/test/finch_api/internal/util_test.rb +++ b/test/finch_api/internal/util_test.rb @@ -171,6 +171,8 @@ def test_json_content cases = { "application/json" => true, "application/jsonl" => false, + "application/arbitrary+json" => true, + "application/ARBITRARY+json" => true, "application/vnd.github.v3+json" => true, "application/vnd.api+json" => true } From 47876a8821367b8d730229c8bf401bc92907d4f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:33:26 +0000 Subject: [PATCH 08/46] chore: update mock server docs --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c49ee8a..b62258da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,8 +68,8 @@ $ bundle exec rake Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. -```bash -$ npx prism mock path/to/your/openapi.yml +```sh +$ ./scripts/mock ``` ```bash From 86ece75b5fefd736c827c70dc7b6140ec67fdf35 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:30:25 +0000 Subject: [PATCH 09/46] fix: properly mock time in ruby ci tests --- test/finch_api/client_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/finch_api/client_test.rb b/test/finch_api/client_test.rb index 63e0a612..89eb7623 100644 --- a/test/finch_api/client_test.rb +++ b/test/finch_api/client_test.rb @@ -126,9 +126,11 @@ def test_client_retry_after_seconds end def test_client_retry_after_date + time_now = Time.now + stub_request(:get, "http://localhost/employer/directory").to_return_json( status: 500, - headers: {"retry-after" => (Time.now + 10).httpdate}, + headers: {"retry-after" => (time_now + 10).httpdate}, body: {} ) @@ -141,11 +143,11 @@ def test_client_retry_after_date max_retries: 1 ) + Thread.current.thread_variable_set(:time_now, time_now) assert_raises(FinchAPI::Errors::InternalServerError) do - Thread.current.thread_variable_set(:time_now, Time.now) finch.hris.directory.list - Thread.current.thread_variable_set(:time_now, nil) end + Thread.current.thread_variable_set(:time_now, nil) assert_requested(:any, /./, times: 2) assert_in_delta(10, Thread.current.thread_variable_get(:mock_sleep).last, 1.0) From 826feaab2ca5d0afd202b196f5da0910c029a591 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 17:24:15 +0000 Subject: [PATCH 10/46] fix(api): remove invalid transform config --- .stats.yml | 6 +++--- .../models/create_access_token_response.rb | 11 ++++++++++- .../models/create_access_token_response.rbi | 16 +++++++++++++--- .../models/create_access_token_response.rbs | 11 ++++++++--- test/finch_api/resources/access_tokens_test.rb | 3 ++- 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 072a0a86..0e843e51 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-46f433f34d440aa1dfcc48cc8d822c598571b68be2f723ec99e1b4fba6c13b1e.yml -openapi_spec_hash: 5b5cd728776723ac773900f7e8a32c05 -config_hash: ccdf6a5b4aaa2a0897c89ac8685d8eb0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-c012d034aaa88334d6748526b99a0c0e47b0257c515b35c656749ed8f3720b8a.yml +openapi_spec_hash: a3d3c013ebe997d22e08eea4d487ff03 +config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/lib/finch_api/models/create_access_token_response.rb b/lib/finch_api/models/create_access_token_response.rb index bc4d34c2..08a07ad8 100644 --- a/lib/finch_api/models/create_access_token_response.rb +++ b/lib/finch_api/models/create_access_token_response.rb @@ -80,7 +80,14 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :customer_id, String, nil?: true - # @!method initialize(access_token:, client_type:, connection_id:, connection_type:, entity_ids:, products:, provider_id:, token_type:, account_id: nil, company_id: nil, customer_id: nil) + # @!attribute customer_name + # The name of your customer you provided to Finch when a connect session was + # created for this connection + # + # @return [String, nil] + optional :customer_name, String, nil?: true + + # @!method initialize(access_token:, client_type:, connection_id:, connection_type:, entity_ids:, products:, provider_id:, token_type:, account_id: nil, company_id: nil, customer_id: nil, customer_name: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::CreateAccessTokenResponse} for more details. # @@ -105,6 +112,8 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel # @param company_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this comp # # @param customer_id [String, nil] The ID of your customer you provided to Finch when a connect session was created + # + # @param customer_name [String, nil] The name of your customer you provided to Finch when a connect session was creat # The type of application associated with a token. # diff --git a/rbi/finch_api/models/create_access_token_response.rbi b/rbi/finch_api/models/create_access_token_response.rbi index c2e95d72..42c8950c 100644 --- a/rbi/finch_api/models/create_access_token_response.rbi +++ b/rbi/finch_api/models/create_access_token_response.rbi @@ -73,6 +73,11 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :customer_id + # The name of your customer you provided to Finch when a connect session was + # created for this connection + sig { returns(T.nilable(String)) } + attr_accessor :customer_name + sig do params( access_token: String, @@ -87,7 +92,8 @@ module FinchAPI token_type: String, account_id: String, company_id: String, - customer_id: T.nilable(String) + customer_id: T.nilable(String), + customer_name: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -118,7 +124,10 @@ module FinchAPI company_id: nil, # The ID of your customer you provided to Finch when a connect session was created # for this connection - customer_id: nil + customer_id: nil, + # The name of your customer you provided to Finch when a connect session was + # created for this connection + customer_name: nil ) end @@ -137,7 +146,8 @@ module FinchAPI token_type: String, account_id: String, company_id: String, - customer_id: T.nilable(String) + customer_id: T.nilable(String), + customer_name: T.nilable(String) } ) end diff --git a/sig/finch_api/models/create_access_token_response.rbs b/sig/finch_api/models/create_access_token_response.rbs index ee20e257..8ea51c5a 100644 --- a/sig/finch_api/models/create_access_token_response.rbs +++ b/sig/finch_api/models/create_access_token_response.rbs @@ -12,7 +12,8 @@ module FinchAPI token_type: String, account_id: String, company_id: String, - customer_id: String? + customer_id: String?, + customer_name: String? } class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel @@ -42,6 +43,8 @@ module FinchAPI attr_accessor customer_id: String? + attr_accessor customer_name: String? + def initialize: ( access_token: String, client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type, @@ -53,7 +56,8 @@ module FinchAPI token_type: String, ?account_id: String, ?company_id: String, - ?customer_id: String? + ?customer_id: String?, + ?customer_name: String? ) -> void def to_hash: -> { @@ -67,7 +71,8 @@ module FinchAPI token_type: String, account_id: String, company_id: String, - customer_id: String? + customer_id: String?, + customer_name: String? } type client_type = :development | :production | :sandbox diff --git a/test/finch_api/resources/access_tokens_test.rb b/test/finch_api/resources/access_tokens_test.rb index e57c33f9..37cf96ff 100644 --- a/test/finch_api/resources/access_tokens_test.rb +++ b/test/finch_api/resources/access_tokens_test.rb @@ -24,7 +24,8 @@ def test_create_required_params token_type: String, account_id: String | nil, company_id: String | nil, - customer_id: String | nil + customer_id: String | nil, + customer_name: String | nil } end end From 04d90f03077ba6b6459e3a1ecbb41baffd1e9eb5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 17:41:01 +0000 Subject: [PATCH 11/46] feat(api): api update --- .stats.yml | 4 +- lib/finch_api/models/hris/employment_data.rb | 30 ++++++++- .../models/sandbox/directory_create_params.rb | 30 ++++++++- .../sandbox/employment_update_params.rb | 24 ++++++- .../sandbox/employment_update_response.rb | 28 ++++++++- lib/finch_api/resources/sandbox/employment.rb | 4 +- rbi/finch_api/models/hris/employment_data.rbi | 63 +++++++++++++++++++ .../sandbox/directory_create_params.rbi | 63 +++++++++++++++++++ .../sandbox/employment_update_params.rbi | 63 +++++++++++++++++++ .../sandbox/employment_update_response.rbi | 63 +++++++++++++++++++ .../resources/sandbox/employment.rbi | 7 +++ sig/finch_api/models/hris/employment_data.rbs | 17 +++++ .../sandbox/directory_create_params.rbs | 17 +++++ .../sandbox/employment_update_params.rbs | 17 +++++ .../sandbox/employment_update_response.rbs | 17 +++++ .../resources/sandbox/employment.rbs | 1 + .../resources/sandbox/employment_test.rb | 1 + 17 files changed, 442 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0e843e51..abcde50d 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-c012d034aaa88334d6748526b99a0c0e47b0257c515b35c656749ed8f3720b8a.yml -openapi_spec_hash: a3d3c013ebe997d22e08eea4d487ff03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-093ade6f1d3115b654a73b97855fbe334c9f9c5d906081dad2ec973ab0c0b24d.yml +openapi_spec_hash: 7cc27b8e483d9db9c411875289c42eb9 config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/lib/finch_api/models/hris/employment_data.rb b/lib/finch_api/models/hris/employment_data.rb index 83b576cc..b24e115a 100644 --- a/lib/finch_api/models/hris/employment_data.rb +++ b/lib/finch_api/models/hris/employment_data.rb @@ -54,6 +54,17 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :first_name, String, nil?: true + # @!attribute flsa_status + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::FlsaStatus, nil] + required :flsa_status, + enum: -> { + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus + }, + nil?: true + # @!attribute is_active # `true` if the individual an an active employee or contractor at the company. # @@ -141,7 +152,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :work_id, String, nil?: true - # @!method initialize(id:, class_code:, department:, employment:, employment_status:, end_date:, first_name:, is_active:, last_name:, latest_rehire_date:, location:, manager:, middle_name:, start_date:, title:, custom_fields: nil, income: nil, income_history: nil, source_id: nil, work_id: nil) + # @!method initialize(id:, class_code:, department:, employment:, employment_status:, end_date:, first_name:, flsa_status:, is_active:, last_name:, latest_rehire_date:, location:, manager:, middle_name:, start_date:, title:, custom_fields: nil, income: nil, income_history: nil, source_id: nil, work_id: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::EmploymentData::UnionMember0} for more details. # @@ -159,6 +170,8 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param first_name [String, nil] The legal first name of the individual. # + # @param flsa_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u + # # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. # # @param last_name [String, nil] The legal last name of the individual. @@ -281,6 +294,21 @@ module EmploymentStatus # @return [Array] end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#flsa_status + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT = :exempt + NON_EXEMPT = :non_exempt + UNKNOWN = :unknown + + # @!method self.values + # @return [Array] + end + # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id diff --git a/lib/finch_api/models/sandbox/directory_create_params.rb b/lib/finch_api/models/sandbox/directory_create_params.rb index 79bf039c..e3fd0506 100644 --- a/lib/finch_api/models/sandbox/directory_create_params.rb +++ b/lib/finch_api/models/sandbox/directory_create_params.rb @@ -105,6 +105,17 @@ class Body < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :first_name, String, nil?: true + # @!attribute flsa_status + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @return [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::FlsaStatus, nil] + optional :flsa_status, + enum: -> { + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus + }, + nil?: true + # @!attribute gender # The gender of the individual. # @@ -208,7 +219,7 @@ class Body < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!method initialize(class_code: nil, custom_fields: nil, department: nil, dob: nil, emails: nil, employment: nil, employment_status: nil, encrypted_ssn: nil, end_date: nil, ethnicity: nil, first_name: nil, gender: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, source_id: nil, ssn: nil, start_date: nil, title: nil) + # @!method initialize(class_code: nil, custom_fields: nil, department: nil, dob: nil, emails: nil, employment: nil, employment_status: nil, encrypted_ssn: nil, end_date: nil, ethnicity: nil, first_name: nil, flsa_status: nil, gender: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, source_id: nil, ssn: nil, start_date: nil, title: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::DirectoryCreateParams::Body} for more details. # @@ -234,6 +245,8 @@ class Body < FinchAPI::Internal::Type::BaseModel # # @param first_name [String, nil] The legal first name of the individual. # + # @param flsa_status [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u + # # @param gender [Symbol, FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::Gender, nil] The gender of the individual. # # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual @@ -428,6 +441,21 @@ module Ethnicity # @return [Array] end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#flsa_status + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT = :exempt + NON_EXEMPT = :non_exempt + UNKNOWN = :unknown + + # @!method self.values + # @return [Array] + end + # The gender of the individual. # # @see FinchAPI::Models::Sandbox::DirectoryCreateParams::Body#gender diff --git a/lib/finch_api/models/sandbox/employment_update_params.rb b/lib/finch_api/models/sandbox/employment_update_params.rb index 7989b35b..6c3e854a 100644 --- a/lib/finch_api/models/sandbox/employment_update_params.rb +++ b/lib/finch_api/models/sandbox/employment_update_params.rb @@ -57,6 +57,13 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :first_name, String, nil?: true + # @!attribute flsa_status + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @return [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::FlsaStatus, nil] + optional :flsa_status, enum: -> { FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus }, nil?: true + # @!attribute income # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, @@ -124,7 +131,7 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!method initialize(class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) + # @!method initialize(class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, flsa_status: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::EmploymentUpdateParams} for more details. # @@ -142,6 +149,8 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # # @param first_name [String, nil] The legal first name of the individual. # + # @param flsa_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u + # # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # # @param income_history [Array, nil] The array of income history. @@ -272,6 +281,19 @@ module EmploymentStatus # @return [Array] end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT = :exempt + NON_EXEMPT = :non_exempt + UNKNOWN = :unknown + + # @!method self.values + # @return [Array] + end + class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. diff --git a/lib/finch_api/models/sandbox/employment_update_response.rb b/lib/finch_api/models/sandbox/employment_update_response.rb index 446c273a..1a1112f3 100644 --- a/lib/finch_api/models/sandbox/employment_update_response.rb +++ b/lib/finch_api/models/sandbox/employment_update_response.rb @@ -58,6 +58,15 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :first_name, String, nil?: true + # @!attribute flsa_status + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @return [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus, nil] + optional :flsa_status, + enum: -> { FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus }, + nil?: true + # @!attribute income # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, @@ -125,7 +134,7 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!method initialize(id: nil, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil) + # @!method initialize(id: nil, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, flsa_status: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::EmploymentUpdateResponse} for more details. # @@ -145,6 +154,8 @@ class EmploymentUpdateResponse < FinchAPI::Internal::Type::BaseModel # # @param first_name [String, nil] The legal first name of the individual. # + # @param flsa_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u + # # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # # @param income_history [Array, nil] The array of income history. @@ -277,6 +288,21 @@ module EmploymentStatus # @return [Array] end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + # + # @see FinchAPI::Models::Sandbox::EmploymentUpdateResponse#flsa_status + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT = :exempt + NON_EXEMPT = :non_exempt + UNKNOWN = :unknown + + # @!method self.values + # @return [Array] + end + # @see FinchAPI::Models::Sandbox::EmploymentUpdateResponse#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id diff --git a/lib/finch_api/resources/sandbox/employment.rb b/lib/finch_api/resources/sandbox/employment.rb index efed725d..7e7ba659 100644 --- a/lib/finch_api/resources/sandbox/employment.rb +++ b/lib/finch_api/resources/sandbox/employment.rb @@ -9,7 +9,7 @@ class Employment # # Update sandbox employment # - # @overload update(individual_id, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) + # @overload update(individual_id, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, flsa_status: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) # # @param individual_id [String] # @@ -27,6 +27,8 @@ class Employment # # @param first_name [String, nil] The legal first name of the individual. # + # @param flsa_status [Symbol, FinchAPI::Models::Sandbox::EmploymentUpdateParams::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u + # # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # # @param income_history [Array, nil] The array of income history. diff --git a/rbi/finch_api/models/hris/employment_data.rbi b/rbi/finch_api/models/hris/employment_data.rbi index e8b8f715..ac9c8874 100644 --- a/rbi/finch_api/models/hris/employment_data.rbi +++ b/rbi/finch_api/models/hris/employment_data.rbi @@ -88,6 +88,17 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :first_name + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + sig do + returns( + T.nilable( + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + ) + ) + end + attr_accessor :flsa_status + # `true` if the individual an an active employee or contractor at the company. sig { returns(T.nilable(T::Boolean)) } attr_accessor :is_active @@ -187,6 +198,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::OrSymbol + ), is_active: T.nilable(T::Boolean), last_name: T.nilable(String), latest_rehire_date: T.nilable(String), @@ -225,6 +240,9 @@ module FinchAPI end_date:, # The legal first name of the individual. first_name:, + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + flsa_status:, # `true` if the individual an an active employee or contractor at the company. is_active:, # The legal last name of the individual. @@ -274,6 +292,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + ), is_active: T.nilable(T::Boolean), last_name: T.nilable(String), latest_rehire_date: T.nilable(String), @@ -549,6 +571,47 @@ module FinchAPI end end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EXEMPT = + T.let( + :exempt, + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + ) + NON_EXEMPT = + T.let( + :non_exempt, + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + ) + UNKNOWN = + T.let( + :unknown, + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + class Manager < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/finch_api/models/sandbox/directory_create_params.rbi b/rbi/finch_api/models/sandbox/directory_create_params.rbi index 6965cd51..9c95fac7 100644 --- a/rbi/finch_api/models/sandbox/directory_create_params.rbi +++ b/rbi/finch_api/models/sandbox/directory_create_params.rbi @@ -170,6 +170,17 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :first_name + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + sig do + returns( + T.nilable( + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::OrSymbol + ) + ) + end + attr_accessor :flsa_status + # The gender of the individual. sig do returns( @@ -308,6 +319,10 @@ module FinchAPI FinchAPI::Sandbox::DirectoryCreateParams::Body::Ethnicity::OrSymbol ), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::OrSymbol + ), gender: T.nilable( FinchAPI::Sandbox::DirectoryCreateParams::Body::Gender::OrSymbol @@ -364,6 +379,9 @@ module FinchAPI ethnicity: nil, # The legal first name of the individual. first_name: nil, + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + flsa_status: nil, # The gender of the individual. gender: nil, # The employee's income as reported by the provider. This may not always be @@ -435,6 +453,10 @@ module FinchAPI FinchAPI::Sandbox::DirectoryCreateParams::Body::Ethnicity::OrSymbol ), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::OrSymbol + ), gender: T.nilable( FinchAPI::Sandbox::DirectoryCreateParams::Body::Gender::OrSymbol @@ -901,6 +923,47 @@ module FinchAPI end end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EXEMPT = + T.let( + :exempt, + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::TaggedSymbol + ) + NON_EXEMPT = + T.let( + :non_exempt, + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::TaggedSymbol + ) + UNKNOWN = + T.let( + :unknown, + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::DirectoryCreateParams::Body::FlsaStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + # The gender of the individual. module Gender extend FinchAPI::Internal::Type::Enum diff --git a/rbi/finch_api/models/sandbox/employment_update_params.rbi b/rbi/finch_api/models/sandbox/employment_update_params.rbi index b190a9e5..de1e85a9 100644 --- a/rbi/finch_api/models/sandbox/employment_update_params.rbi +++ b/rbi/finch_api/models/sandbox/employment_update_params.rbi @@ -84,6 +84,17 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :first_name + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + sig do + returns( + T.nilable( + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::OrSymbol + ) + ) + end + attr_accessor :flsa_status + # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. @@ -168,6 +179,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::OrSymbol + ), income: T.nilable(FinchAPI::Income::OrHash), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income::OrHash)]), @@ -202,6 +217,9 @@ module FinchAPI end_date: nil, # The legal first name of the individual. first_name: nil, + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + flsa_status: nil, # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. @@ -251,6 +269,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::OrSymbol + ), income: T.nilable(FinchAPI::Income), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income)]), is_active: T.nilable(T::Boolean), @@ -550,6 +572,47 @@ module FinchAPI end end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EXEMPT = + T.let( + :exempt, + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::TaggedSymbol + ) + NON_EXEMPT = + T.let( + :non_exempt, + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::TaggedSymbol + ) + UNKNOWN = + T.let( + :unknown, + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + class Manager < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/finch_api/models/sandbox/employment_update_response.rbi b/rbi/finch_api/models/sandbox/employment_update_response.rbi index 62b5ff9a..094f3079 100644 --- a/rbi/finch_api/models/sandbox/employment_update_response.rbi +++ b/rbi/finch_api/models/sandbox/employment_update_response.rbi @@ -94,6 +94,17 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :first_name + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + sig do + returns( + T.nilable( + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::TaggedSymbol + ) + ) + end + attr_accessor :flsa_status + # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. @@ -183,6 +194,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::OrSymbol + ), income: T.nilable(FinchAPI::Income::OrHash), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income::OrHash)]), @@ -218,6 +233,9 @@ module FinchAPI end_date: nil, # The legal first name of the individual. first_name: nil, + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + flsa_status: nil, # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. @@ -267,6 +285,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::TaggedSymbol + ), income: T.nilable(FinchAPI::Income), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income)]), is_active: T.nilable(T::Boolean), @@ -567,6 +589,47 @@ module FinchAPI end end + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EXEMPT = + T.let( + :exempt, + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::TaggedSymbol + ) + NON_EXEMPT = + T.let( + :non_exempt, + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::TaggedSymbol + ) + UNKNOWN = + T.let( + :unknown, + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + class Manager < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/finch_api/resources/sandbox/employment.rbi b/rbi/finch_api/resources/sandbox/employment.rbi index df6a71dc..f501c8f0 100644 --- a/rbi/finch_api/resources/sandbox/employment.rbi +++ b/rbi/finch_api/resources/sandbox/employment.rbi @@ -29,6 +29,10 @@ module FinchAPI ), end_date: T.nilable(String), first_name: T.nilable(String), + flsa_status: + T.nilable( + FinchAPI::Sandbox::EmploymentUpdateParams::FlsaStatus::OrSymbol + ), income: T.nilable(FinchAPI::Income::OrHash), income_history: T.nilable(T::Array[T.nilable(FinchAPI::Income::OrHash)]), @@ -64,6 +68,9 @@ module FinchAPI end_date: nil, # The legal first name of the individual. first_name: nil, + # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, + # `unknown`. + flsa_status: nil, # The employee's income as reported by the provider. This may not always be # annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, # depending on what information the provider returns. diff --git a/sig/finch_api/models/hris/employment_data.rbs b/sig/finch_api/models/hris/employment_data.rbs index 515184e8..5705b8a1 100644 --- a/sig/finch_api/models/hris/employment_data.rbs +++ b/sig/finch_api/models/hris/employment_data.rbs @@ -17,6 +17,7 @@ module FinchAPI employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status?, is_active: bool?, last_name: String?, latest_rehire_date: String?, @@ -47,6 +48,8 @@ module FinchAPI attr_accessor first_name: String? + attr_accessor flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status? + attr_accessor is_active: bool? attr_accessor last_name: String? @@ -81,6 +84,7 @@ module FinchAPI employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status?, is_active: bool?, last_name: String?, latest_rehire_date: String?, @@ -104,6 +108,7 @@ module FinchAPI employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status?, is_active: bool?, last_name: String?, latest_rehire_date: String?, @@ -206,6 +211,18 @@ module FinchAPI def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status] end + type flsa_status = :exempt | :non_exempt | :unknown + + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT: :exempt + NON_EXEMPT: :non_exempt + UNKNOWN: :unknown + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status] + end + type manager = { id: String } class Manager < FinchAPI::Internal::Type::BaseModel diff --git a/sig/finch_api/models/sandbox/directory_create_params.rbs b/sig/finch_api/models/sandbox/directory_create_params.rbs index a5222df7..bdbac88e 100644 --- a/sig/finch_api/models/sandbox/directory_create_params.rbs +++ b/sig/finch_api/models/sandbox/directory_create_params.rbs @@ -38,6 +38,7 @@ module FinchAPI end_date: String?, ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity?, first_name: String?, + flsa_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::flsa_status?, gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, @@ -79,6 +80,8 @@ module FinchAPI attr_accessor first_name: String? + attr_accessor flsa_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::flsa_status? + attr_accessor gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender? attr_accessor income: FinchAPI::Income? @@ -123,6 +126,7 @@ module FinchAPI ?end_date: String?, ?ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity?, ?first_name: String?, + ?flsa_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::flsa_status?, ?gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, @@ -153,6 +157,7 @@ module FinchAPI end_date: String?, ethnicity: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity?, first_name: String?, + flsa_status: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::flsa_status?, gender: FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::gender?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, @@ -332,6 +337,18 @@ module FinchAPI def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::ethnicity] end + type flsa_status = :exempt | :non_exempt | :unknown + + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT: :exempt + NON_EXEMPT: :non_exempt + UNKNOWN: :unknown + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::DirectoryCreateParams::Body::flsa_status] + end + type gender = :female | :male | :other | :decline_to_specify module Gender diff --git a/sig/finch_api/models/sandbox/employment_update_params.rbs b/sig/finch_api/models/sandbox/employment_update_params.rbs index aee83ffe..6ddc6532 100644 --- a/sig/finch_api/models/sandbox/employment_update_params.rbs +++ b/sig/finch_api/models/sandbox/employment_update_params.rbs @@ -10,6 +10,7 @@ module FinchAPI employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::flsa_status?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, is_active: bool?, @@ -42,6 +43,8 @@ module FinchAPI attr_accessor first_name: String? + attr_accessor flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::flsa_status? + attr_accessor income: FinchAPI::Income? attr_accessor income_history: ::Array[FinchAPI::Income?]? @@ -72,6 +75,7 @@ module FinchAPI ?employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::employment_status?, ?end_date: String?, ?first_name: String?, + ?flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::flsa_status?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, ?is_active: bool?, @@ -94,6 +98,7 @@ module FinchAPI employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::flsa_status?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, is_active: bool?, @@ -209,6 +214,18 @@ module FinchAPI def self?.values: -> ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateParams::employment_status] end + type flsa_status = :exempt | :non_exempt | :unknown + + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT: :exempt + NON_EXEMPT: :non_exempt + UNKNOWN: :unknown + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateParams::flsa_status] + end + type manager = { id: String } class Manager < FinchAPI::Internal::Type::BaseModel diff --git a/sig/finch_api/models/sandbox/employment_update_response.rbs b/sig/finch_api/models/sandbox/employment_update_response.rbs index 77658df7..c3a0b4b1 100644 --- a/sig/finch_api/models/sandbox/employment_update_response.rbs +++ b/sig/finch_api/models/sandbox/employment_update_response.rbs @@ -11,6 +11,7 @@ module FinchAPI employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::flsa_status?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, is_active: bool?, @@ -43,6 +44,8 @@ module FinchAPI attr_accessor first_name: String? + attr_accessor flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::flsa_status? + attr_accessor income: FinchAPI::Income? attr_accessor income_history: ::Array[FinchAPI::Income?]? @@ -74,6 +77,7 @@ module FinchAPI ?employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::employment_status?, ?end_date: String?, ?first_name: String?, + ?flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::flsa_status?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, ?is_active: bool?, @@ -96,6 +100,7 @@ module FinchAPI employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::employment_status?, end_date: String?, first_name: String?, + flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::flsa_status?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, is_active: bool?, @@ -210,6 +215,18 @@ module FinchAPI def self?.values: -> ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateResponse::employment_status] end + type flsa_status = :exempt | :non_exempt | :unknown + + module FlsaStatus + extend FinchAPI::Internal::Type::Enum + + EXEMPT: :exempt + NON_EXEMPT: :non_exempt + UNKNOWN: :unknown + + def self?.values: -> ::Array[FinchAPI::Models::Sandbox::EmploymentUpdateResponse::flsa_status] + end + type manager = { id: String } class Manager < FinchAPI::Internal::Type::BaseModel diff --git a/sig/finch_api/resources/sandbox/employment.rbs b/sig/finch_api/resources/sandbox/employment.rbs index d0db36dd..2ce56e7f 100644 --- a/sig/finch_api/resources/sandbox/employment.rbs +++ b/sig/finch_api/resources/sandbox/employment.rbs @@ -11,6 +11,7 @@ module FinchAPI ?employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::employment_status?, ?end_date: String?, ?first_name: String?, + ?flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateParams::flsa_status?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, ?is_active: bool?, diff --git a/test/finch_api/resources/sandbox/employment_test.rb b/test/finch_api/resources/sandbox/employment_test.rb index 6ce72f34..31177729 100644 --- a/test/finch_api/resources/sandbox/employment_test.rb +++ b/test/finch_api/resources/sandbox/employment_test.rb @@ -20,6 +20,7 @@ def test_update employment_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::EmploymentStatus | nil, end_date: String | nil, first_name: String | nil, + flsa_status: FinchAPI::Models::Sandbox::EmploymentUpdateResponse::FlsaStatus | nil, income: FinchAPI::Income | nil, income_history: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Income, nil?: true]) | nil, is_active: FinchAPI::Internal::Type::Boolean | nil, From 796b4dba769b768e65dcff3921257f098d6ff9df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 19:03:27 +0000 Subject: [PATCH 12/46] chore(internal): codegen related update --- .github/workflows/ci.yml | 34 ++++ lib/finch_api/internal/util.rb | 31 +++ .../models/hris/benefit_retrieve_params.rb | 9 +- .../models/hris/benefit_update_params.rb | 9 +- .../benefits/individual_enroll_many_params.rb | 9 +- .../individual_enrolled_ids_params.rb | 9 +- ...ndividual_retrieve_many_benefits_params.rb | 9 +- .../individual_unenroll_many_params.rb | 9 +- .../pay_statement_item/rule_delete_params.rb | 9 +- .../pay_statement_item/rule_update_params.rb | 9 +- .../models/hris/document_retreive_params.rb | 9 +- .../models/jobs/automated_create_params.rb | 82 +++++--- .../models/jobs/automated_retrieve_params.rb | 8 +- .../models/jobs/manual_retrieve_params.rb | 8 +- .../payroll/pay_group_retrieve_params.rb | 9 +- .../sandbox/employment_update_params.rb | 9 +- .../sandbox/individual_update_params.rb | 9 +- lib/finch_api/resources/hris/benefits.rb | 19 +- .../resources/hris/benefits/individuals.rb | 14 +- lib/finch_api/resources/hris/company.rb | 3 +- .../hris/company/pay_statement_item.rb | 3 +- .../hris/company/pay_statement_item/rules.rb | 16 +- lib/finch_api/resources/hris/directory.rb | 3 +- lib/finch_api/resources/hris/documents.rb | 6 +- lib/finch_api/resources/hris/employments.rb | 5 +- lib/finch_api/resources/hris/individuals.rb | 5 +- .../resources/hris/pay_statements.rb | 5 +- lib/finch_api/resources/hris/payments.rb | 3 +- lib/finch_api/resources/jobs/automated.rb | 12 +- lib/finch_api/resources/payroll/pay_groups.rb | 6 +- rbi/finch_api/internal/util.rbi | 20 ++ .../models/hris/benefit_retrieve_params.rbi | 6 + .../models/hris/benefit_update_params.rbi | 6 + .../individual_enroll_many_params.rbi | 6 + .../individual_enrolled_ids_params.rbi | 6 + ...dividual_retrieve_many_benefits_params.rbi | 6 + .../individual_unenroll_many_params.rbi | 6 + .../pay_statement_item/rule_delete_params.rbi | 6 + .../pay_statement_item/rule_update_params.rbi | 6 + .../models/hris/document_retreive_params.rbi | 6 + .../models/jobs/automated_create_params.rbi | 182 ++++++++++++------ .../models/jobs/automated_retrieve_params.rbi | 18 +- .../models/jobs/manual_retrieve_params.rbi | 18 +- .../payroll/pay_group_retrieve_params.rbi | 6 + .../sandbox/employment_update_params.rbi | 6 + .../sandbox/individual_update_params.rbi | 6 + rbi/finch_api/resources/jobs/automated.rbi | 14 +- scripts/mock | 13 +- scripts/utils/upload-artifact.sh | 113 +++++++++++ sig/finch_api/internal/util.rbs | 10 + .../models/hris/benefit_retrieve_params.rbs | 6 +- .../models/hris/benefit_update_params.rbs | 6 +- .../individual_enroll_many_params.rbs | 5 + .../individual_enrolled_ids_params.rbs | 6 +- ...dividual_retrieve_many_benefits_params.rbs | 10 +- .../individual_unenroll_many_params.rbs | 10 +- .../pay_statement_item/rule_delete_params.rbs | 6 +- .../pay_statement_item/rule_update_params.rbs | 10 +- .../models/hris/document_retreive_params.rbs | 6 +- .../models/jobs/automated_create_params.rbs | 69 ++++--- .../models/jobs/automated_retrieve_params.rbs | 14 +- .../models/jobs/manual_retrieve_params.rbs | 14 +- .../payroll/pay_group_retrieve_params.rbs | 6 +- .../sandbox/employment_update_params.rbs | 5 + .../sandbox/individual_update_params.rbs | 5 + sig/finch_api/resources/jobs/automated.rbs | 3 +- .../resources/jobs/automated_test.rb | 3 +- 67 files changed, 817 insertions(+), 198 deletions(-) create mode 100755 scripts/utils/upload-artifact.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d58e0dc8..5dfb7d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,40 @@ on: - 'stl-preview-base/**' jobs: + build: + timeout-minutes: 10 + name: build + permissions: + contents: read + id-token: write + runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: |- + github.repository == 'stainless-sdks/finch-ruby' && + (github.event_name == 'push' || github.event.pull_request.head.repo.fork) + steps: + - uses: actions/checkout@v6 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: false + - run: |- + bundle install + + - name: Get GitHub OIDC Token + if: github.repository == 'stainless-sdks/finch-ruby' + id: github-oidc + uses: actions/github-script@v8 + with: + script: core.setOutput('github_token', await core.getIDToken()); + + - name: Build and upload gem artifacts + if: github.repository == 'stainless-sdks/finch-ruby' + env: + URL: https://pkg.stainless.com/s + AUTH: ${{ steps.github-oidc.outputs.github_token }} + SHA: ${{ github.sha }} + PACKAGE_NAME: finch_api + run: ./scripts/utils/upload-artifact.sh lint: timeout-minutes: 10 name: lint diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 1123afb8..55677cf8 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -490,6 +490,37 @@ def writable_enum(&blk) JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)} class << self + # @api private + # + # @param query [Hash{Symbol=>Object}] + # + # @return [Hash{Symbol=>Object}] + def encode_query_params(query) + out = {} + query.each { write_query_param_element!(out, _1, _2) } + out + end + + # @api private + # + # @param collection [Hash{Symbol=>Object}] + # @param key [String] + # @param element [Object] + # + # @return [nil] + private def write_query_param_element!(collection, key, element) + case element + in Hash + element.each do |name, value| + write_query_param_element!(collection, "#{key}[#{name}]", value) + end + in Array + collection["#{key}[]"] = element.map(&:to_s) + else + collection[key] = element.to_s + end + end + # @api private # # @param y [Enumerator::Yielder] diff --git a/lib/finch_api/models/hris/benefit_retrieve_params.rb b/lib/finch_api/models/hris/benefit_retrieve_params.rb index cd3246be..516ad2c9 100644 --- a/lib/finch_api/models/hris/benefit_retrieve_params.rb +++ b/lib/finch_api/models/hris/benefit_retrieve_params.rb @@ -8,13 +8,20 @@ class BenefitRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute benefit_id + # + # @return [String] + required :benefit_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # # @return [Array, nil] optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(entity_ids: nil, request_options: {}) + # @!method initialize(benefit_id:, entity_ids: nil, request_options: {}) + # @param benefit_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/benefit_update_params.rb b/lib/finch_api/models/hris/benefit_update_params.rb index 0168d703..87570857 100644 --- a/lib/finch_api/models/hris/benefit_update_params.rb +++ b/lib/finch_api/models/hris/benefit_update_params.rb @@ -8,6 +8,11 @@ class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute benefit_id + # + # @return [String] + required :benefit_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # @@ -20,7 +25,9 @@ class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :description, String - # @!method initialize(entity_ids: nil, description: nil, request_options: {}) + # @!method initialize(benefit_id:, entity_ids: nil, description: nil, request_options: {}) + # @param benefit_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param description [String] Updated name or description. 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 fd30add6..8d09b75b 100644 --- a/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb @@ -9,6 +9,11 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute benefit_id + # + # @return [String] + required :benefit_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # @@ -22,7 +27,9 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel optional :individuals, -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] } - # @!method initialize(entity_ids: nil, individuals: nil, request_options: {}) + # @!method initialize(benefit_id:, entity_ids: nil, individuals: nil, request_options: {}) + # @param benefit_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param individuals [Array] Array of the individual_id to enroll and a configuration object. diff --git a/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb b/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb index e44e8816..73d88625 100644 --- a/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb @@ -9,13 +9,20 @@ class IndividualEnrolledIDsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute benefit_id + # + # @return [String] + required :benefit_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # # @return [Array, nil] optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(entity_ids: nil, request_options: {}) + # @!method initialize(benefit_id:, entity_ids: nil, request_options: {}) + # @param benefit_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb b/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb index c3afb068..4fe70543 100644 --- a/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb @@ -9,6 +9,11 @@ class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute benefit_id + # + # @return [String] + required :benefit_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # @@ -22,11 +27,13 @@ class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :individual_ids, String - # @!method initialize(entity_ids: nil, individual_ids: nil, request_options: {}) + # @!method initialize(benefit_id:, entity_ids: nil, individual_ids: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams} for # more details. # + # @param benefit_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param individual_ids [String] comma-delimited list of stable Finch uuids for each individual. If empty, defaul diff --git a/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb b/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb index adba41a0..11c46653 100644 --- a/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb +++ b/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb @@ -9,6 +9,11 @@ class IndividualUnenrollManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute benefit_id + # + # @return [String] + required :benefit_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # @@ -21,7 +26,9 @@ class IndividualUnenrollManyParams < FinchAPI::Internal::Type::BaseModel # @return [Array, nil] optional :individual_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(entity_ids: nil, individual_ids: nil, request_options: {}) + # @!method initialize(benefit_id:, entity_ids: nil, individual_ids: nil, request_options: {}) + # @param benefit_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param individual_ids [Array] Array of individual_ids to unenroll. diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb index 4eb3d43e..45299bab 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb @@ -10,13 +10,20 @@ class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute rule_id + # + # @return [String] + required :rule_id, String + # @!attribute entity_ids # The entity IDs to delete the rule for. # # @return [Array, nil] optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(entity_ids: nil, request_options: {}) + # @!method initialize(rule_id:, entity_ids: nil, request_options: {}) + # @param rule_id [String] + # # @param entity_ids [Array] The entity IDs to delete the rule for. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb index 4dbc42ae..4e1d2c58 100644 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb +++ b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb @@ -10,6 +10,11 @@ class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute rule_id + # + # @return [String] + required :rule_id, String + # @!attribute entity_ids # The entity IDs to update the rule for. # @@ -21,7 +26,9 @@ class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [Object, nil] optional :optional_property, FinchAPI::Internal::Type::Unknown, api_name: :optionalProperty - # @!method initialize(entity_ids: nil, optional_property: nil, request_options: {}) + # @!method initialize(rule_id:, entity_ids: nil, optional_property: nil, request_options: {}) + # @param rule_id [String] + # # @param entity_ids [Array] The entity IDs to update the rule for. # # @param optional_property [Object] diff --git a/lib/finch_api/models/hris/document_retreive_params.rb b/lib/finch_api/models/hris/document_retreive_params.rb index 35684b7f..930d91eb 100644 --- a/lib/finch_api/models/hris/document_retreive_params.rb +++ b/lib/finch_api/models/hris/document_retreive_params.rb @@ -8,13 +8,20 @@ class DocumentRetreiveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute document_id + # + # @return [String] + required :document_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # # @return [Array, nil] optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(entity_ids: nil, request_options: {}) + # @!method initialize(document_id:, entity_ids: nil, request_options: {}) + # @param document_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/jobs/automated_create_params.rb b/lib/finch_api/models/jobs/automated_create_params.rb index e1568c6a..f7d674ce 100644 --- a/lib/finch_api/models/jobs/automated_create_params.rb +++ b/lib/finch_api/models/jobs/automated_create_params.rb @@ -8,43 +8,67 @@ class AutomatedCreateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!attribute type - # The type of job to start. + # @!attribute body # - # @return [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] - required :type, enum: -> { FinchAPI::Jobs::AutomatedCreateParams::Type } + # @return [FinchAPI::Models::Jobs::AutomatedCreateParams::Body::DataSyncAll, FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync] + required :body, union: -> { FinchAPI::Jobs::AutomatedCreateParams::Body } - # @!attribute params - # - # @return [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] - required :params, -> { FinchAPI::Jobs::AutomatedCreateParams::Params } - - # @!method initialize(type:, params:, request_options: {}) - # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] The type of job to start. - # - # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] - # + # @!method initialize(body:, request_options: {}) + # @param body [FinchAPI::Models::Jobs::AutomatedCreateParams::Body::DataSyncAll, FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # The type of job to start. - module Type - extend FinchAPI::Internal::Type::Enum + module Body + extend FinchAPI::Internal::Type::Union - W4_FORM_EMPLOYEE_SYNC = :w4_form_employee_sync + discriminator :type - # @!method self.values - # @return [Array] - end + variant :data_sync_all, -> { FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll } + + variant :w4_form_employee_sync, -> { FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync } + + class DataSyncAll < FinchAPI::Internal::Type::BaseModel + # @!attribute type + # The type of job to start. + # + # @return [Symbol, :data_sync_all] + required :type, const: :data_sync_all + + # @!method initialize(type: :data_sync_all) + # @param type [Symbol, :data_sync_all] The type of job to start. + end + + class W4FormEmployeeSync < FinchAPI::Internal::Type::BaseModel + # @!attribute params + # + # @return [FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params] + required :params, -> { FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params } + + # @!attribute type + # The type of job to start. + # + # @return [Symbol, :w4_form_employee_sync] + required :type, const: :w4_form_employee_sync + + # @!method initialize(params:, type: :w4_form_employee_sync) + # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params] + # + # @param type [Symbol, :w4_form_employee_sync] The type of job to start. + + # @see FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync#params + class Params < FinchAPI::Internal::Type::BaseModel + # @!attribute individual_id + # The unique ID of the individual for W-4 data sync. + # + # @return [String] + required :individual_id, String - class Params < FinchAPI::Internal::Type::BaseModel - # @!attribute individual_id - # The unique ID of the individual for W-4 data sync. - # - # @return [String] - required :individual_id, String + # @!method initialize(individual_id:) + # @param individual_id [String] The unique ID of the individual for W-4 data sync. + end + end - # @!method initialize(individual_id:) - # @param individual_id [String] The unique ID of the individual for W-4 data sync. + # @!method self.variants + # @return [Array(FinchAPI::Models::Jobs::AutomatedCreateParams::Body::DataSyncAll, FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync)] end end end diff --git a/lib/finch_api/models/jobs/automated_retrieve_params.rb b/lib/finch_api/models/jobs/automated_retrieve_params.rb index dc698f82..9fed61c3 100644 --- a/lib/finch_api/models/jobs/automated_retrieve_params.rb +++ b/lib/finch_api/models/jobs/automated_retrieve_params.rb @@ -8,7 +8,13 @@ class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute job_id + # + # @return [String] + required :job_id, String + + # @!method initialize(job_id:, request_options: {}) + # @param job_id [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/jobs/manual_retrieve_params.rb b/lib/finch_api/models/jobs/manual_retrieve_params.rb index 321c5aa6..e37866d3 100644 --- a/lib/finch_api/models/jobs/manual_retrieve_params.rb +++ b/lib/finch_api/models/jobs/manual_retrieve_params.rb @@ -8,7 +8,13 @@ class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute job_id + # + # @return [String] + required :job_id, String + + # @!method initialize(job_id:, request_options: {}) + # @param job_id [String] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/payroll/pay_group_retrieve_params.rb b/lib/finch_api/models/payroll/pay_group_retrieve_params.rb index 69858b28..6f1b7b55 100644 --- a/lib/finch_api/models/payroll/pay_group_retrieve_params.rb +++ b/lib/finch_api/models/payroll/pay_group_retrieve_params.rb @@ -8,13 +8,20 @@ class PayGroupRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute pay_group_id + # + # @return [String] + required :pay_group_id, String + # @!attribute entity_ids # The entity IDs to specify which entities' data to access. # # @return [Array, nil] optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - # @!method initialize(entity_ids: nil, request_options: {}) + # @!method initialize(pay_group_id:, entity_ids: nil, request_options: {}) + # @param pay_group_id [String] + # # @param entity_ids [Array] The entity IDs to specify which entities' data to access. # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/finch_api/models/sandbox/employment_update_params.rb b/lib/finch_api/models/sandbox/employment_update_params.rb index 6c3e854a..dd928436 100644 --- a/lib/finch_api/models/sandbox/employment_update_params.rb +++ b/lib/finch_api/models/sandbox/employment_update_params.rb @@ -8,6 +8,11 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute individual_id + # + # @return [String] + required :individual_id, String + # @!attribute class_code # Worker's compensation classification code for this employee # @@ -131,10 +136,12 @@ class EmploymentUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :title, String, nil?: true - # @!method initialize(class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, flsa_status: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) + # @!method initialize(individual_id:, class_code: nil, custom_fields: nil, department: nil, employment: nil, employment_status: nil, end_date: nil, first_name: nil, flsa_status: nil, income: nil, income_history: nil, is_active: nil, last_name: nil, latest_rehire_date: nil, location: nil, manager: nil, middle_name: nil, source_id: nil, start_date: nil, title: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::EmploymentUpdateParams} for more details. # + # @param individual_id [String] + # # @param class_code [String, nil] Worker's compensation classification code for this employee # # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl diff --git a/lib/finch_api/models/sandbox/individual_update_params.rb b/lib/finch_api/models/sandbox/individual_update_params.rb index 01a07c0d..6ed42b15 100644 --- a/lib/finch_api/models/sandbox/individual_update_params.rb +++ b/lib/finch_api/models/sandbox/individual_update_params.rb @@ -8,6 +8,11 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute individual_id + # + # @return [String] + required :individual_id, String + # @!attribute dob # # @return [String, nil] @@ -88,10 +93,12 @@ class IndividualUpdateParams < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :ssn, String, nil?: true - # @!method initialize(dob: nil, emails: nil, encrypted_ssn: nil, ethnicity: nil, first_name: nil, gender: nil, last_name: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, ssn: nil, request_options: {}) + # @!method initialize(individual_id:, dob: nil, emails: nil, encrypted_ssn: nil, ethnicity: nil, first_name: nil, gender: nil, last_name: nil, middle_name: nil, phone_numbers: nil, preferred_name: nil, residence: nil, ssn: nil, request_options: {}) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Sandbox::IndividualUpdateParams} for more details. # + # @param individual_id [String] + # # @param dob [String, nil] # # @param emails [Array, nil] diff --git a/lib/finch_api/resources/hris/benefits.rb b/lib/finch_api/resources/hris/benefits.rb index c9e0ed4a..6d2988e3 100644 --- a/lib/finch_api/resources/hris/benefits.rb +++ b/lib/finch_api/resources/hris/benefits.rb @@ -31,12 +31,13 @@ class Benefits # # @see FinchAPI::Models::HRIS::BenefitCreateParams def create(params = {}) - parsed, options = FinchAPI::HRIS::BenefitCreateParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::BenefitCreateParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "employer/benefits", - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), model: FinchAPI::HRIS::CreateCompanyBenefitsResponse, security: {bearer_auth: true}, @@ -59,10 +60,11 @@ def create(params = {}) # @see FinchAPI::Models::HRIS::BenefitRetrieveParams def retrieve(benefit_id, params = {}) parsed, options = FinchAPI::HRIS::BenefitRetrieveParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["employer/benefits/%1$s", benefit_id], - query: parsed, + query: query, model: FinchAPI::HRIS::CompanyBenefit, security: {bearer_auth: true}, options: options @@ -85,12 +87,13 @@ def retrieve(benefit_id, params = {}) # # @see FinchAPI::Models::HRIS::BenefitUpdateParams def update(benefit_id, params = {}) - parsed, options = FinchAPI::HRIS::BenefitUpdateParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::BenefitUpdateParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: ["employer/benefits/%1$s", benefit_id], - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), model: FinchAPI::HRIS::UpdateCompanyBenefitResponse, security: {bearer_auth: true}, @@ -111,10 +114,11 @@ def update(benefit_id, params = {}) # @see FinchAPI::Models::HRIS::BenefitListParams def list(params = {}) parsed, options = FinchAPI::HRIS::BenefitListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/benefits", - query: parsed, + query: query, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::CompanyBenefit, security: {bearer_auth: true}, @@ -135,10 +139,11 @@ def list(params = {}) # @see FinchAPI::Models::HRIS::BenefitListSupportedBenefitsParams def list_supported_benefits(params = {}) parsed, options = FinchAPI::HRIS::BenefitListSupportedBenefitsParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/benefits/meta", - query: parsed, + query: query, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::SupportedBenefit, security: {bearer_auth: true}, diff --git a/lib/finch_api/resources/hris/benefits/individuals.rb b/lib/finch_api/resources/hris/benefits/individuals.rb index 5ca102e3..fc4666c4 100644 --- a/lib/finch_api/resources/hris/benefits/individuals.rb +++ b/lib/finch_api/resources/hris/benefits/individuals.rb @@ -25,10 +25,11 @@ class Individuals # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams def enroll_many(benefit_id, params = {}) parsed, options = FinchAPI::HRIS::Benefits::IndividualEnrollManyParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.except(:individuals)) @client.request( method: :post, path: ["employer/benefits/%1$s/individuals", benefit_id], - query: parsed.except(:individuals), + query: query, body: parsed[:individuals], model: FinchAPI::HRIS::Benefits::EnrolledIndividualBenefitResponse, security: {bearer_auth: true}, @@ -51,10 +52,11 @@ def enroll_many(benefit_id, params = {}) # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsParams def enrolled_ids(benefit_id, params = {}) parsed, options = FinchAPI::HRIS::Benefits::IndividualEnrolledIDsParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["employer/benefits/%1$s/enrolled", benefit_id], - query: parsed, + query: query, model: FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse, security: {bearer_auth: true}, options: options @@ -82,10 +84,11 @@ def enrolled_ids(benefit_id, params = {}) # @see FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams def retrieve_many_benefits(benefit_id, params = {}) parsed, options = FinchAPI::HRIS::Benefits::IndividualRetrieveManyBenefitsParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["employer/benefits/%1$s/individuals", benefit_id], - query: parsed, + query: query, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::Benefits::IndividualBenefit, security: {bearer_auth: true}, @@ -109,12 +112,13 @@ def retrieve_many_benefits(benefit_id, params = {}) # # @see FinchAPI::Models::HRIS::Benefits::IndividualUnenrollManyParams def unenroll_many(benefit_id, params = {}) - parsed, options = FinchAPI::HRIS::Benefits::IndividualUnenrollManyParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::Benefits::IndividualUnenrollManyParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :delete, path: ["employer/benefits/%1$s/individuals", benefit_id], - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), model: FinchAPI::HRIS::Benefits::UnenrolledIndividualBenefitResponse, security: {bearer_auth: true}, diff --git a/lib/finch_api/resources/hris/company.rb b/lib/finch_api/resources/hris/company.rb index 11309297..94dfbd24 100644 --- a/lib/finch_api/resources/hris/company.rb +++ b/lib/finch_api/resources/hris/company.rb @@ -20,10 +20,11 @@ class Company # @see FinchAPI::Models::HRIS::CompanyRetrieveParams def retrieve(params = {}) parsed, options = FinchAPI::HRIS::CompanyRetrieveParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/company", - query: parsed, + query: query, model: FinchAPI::HRIS::HRISCompany, security: {bearer_auth: true}, options: options diff --git a/lib/finch_api/resources/hris/company/pay_statement_item.rb b/lib/finch_api/resources/hris/company/pay_statement_item.rb index 88b048b1..4e3d8f48 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item.rb @@ -35,10 +35,11 @@ class PayStatementItem # @see FinchAPI::Models::HRIS::Company::PayStatementItemListParams def list(params = {}) parsed, options = FinchAPI::HRIS::Company::PayStatementItemListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/pay-statement-item", - query: parsed, + query: query, page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse, security: {bearer_auth: true}, diff --git a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb index 597bcc19..d8c4bffa 100644 --- a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +++ b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb @@ -35,12 +35,13 @@ class Rules # # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams def create(params = {}) - parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "employer/pay-statement-item/rule", - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse, security: {bearer_auth: true}, @@ -64,12 +65,13 @@ def create(params = {}) # # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateParams def update(rule_id, params = {}) - parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :put, path: ["employer/pay-statement-item/rule/%1$s", rule_id], - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse, security: {bearer_auth: true}, @@ -90,10 +92,11 @@ def update(rule_id, params = {}) # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListParams def list(params = {}) parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/pay-statement-item/rule", - query: parsed, + query: query, page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse, security: {bearer_auth: true}, @@ -116,10 +119,11 @@ def list(params = {}) # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteParams def delete(rule_id, params = {}) parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleDeleteParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :delete, path: ["employer/pay-statement-item/rule/%1$s", rule_id], - query: parsed, + query: query, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse, security: {bearer_auth: true}, options: options diff --git a/lib/finch_api/resources/hris/directory.rb b/lib/finch_api/resources/hris/directory.rb index d46ee225..cafe53a2 100644 --- a/lib/finch_api/resources/hris/directory.rb +++ b/lib/finch_api/resources/hris/directory.rb @@ -21,10 +21,11 @@ class Directory # @see FinchAPI::Models::HRIS::DirectoryListParams def list(params = {}) parsed, options = FinchAPI::HRIS::DirectoryListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/directory", - query: parsed, + query: query, page: FinchAPI::Internal::IndividualsPage, model: FinchAPI::HRIS::IndividualInDirectory, security: {bearer_auth: true}, diff --git a/lib/finch_api/resources/hris/documents.rb b/lib/finch_api/resources/hris/documents.rb index 4b9f78c6..aa1bdbd9 100644 --- a/lib/finch_api/resources/hris/documents.rb +++ b/lib/finch_api/resources/hris/documents.rb @@ -29,10 +29,11 @@ class Documents # @see FinchAPI::Models::HRIS::DocumentListParams def list(params = {}) parsed, options = FinchAPI::HRIS::DocumentListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/documents", - query: parsed, + query: query, model: FinchAPI::Models::HRIS::DocumentListResponse, security: {bearer_auth: true}, options: options @@ -55,10 +56,11 @@ def list(params = {}) # @see FinchAPI::Models::HRIS::DocumentRetreiveParams def retreive(document_id, params = {}) parsed, options = FinchAPI::HRIS::DocumentRetreiveParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["employer/documents/%1$s", document_id], - query: parsed, + query: query, model: FinchAPI::Models::HRIS::DocumentRetreiveResponse, security: {bearer_auth: true}, options: options diff --git a/lib/finch_api/resources/hris/employments.rb b/lib/finch_api/resources/hris/employments.rb index 8c04e613..a9921f85 100644 --- a/lib/finch_api/resources/hris/employments.rb +++ b/lib/finch_api/resources/hris/employments.rb @@ -18,12 +18,13 @@ class Employments # # @see FinchAPI::Models::HRIS::EmploymentRetrieveManyParams def retrieve_many(params) - parsed, options = FinchAPI::HRIS::EmploymentRetrieveManyParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::EmploymentRetrieveManyParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "employer/employment", - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::EmploymentDataResponse, diff --git a/lib/finch_api/resources/hris/individuals.rb b/lib/finch_api/resources/hris/individuals.rb index 20455946..e9c8f4a7 100644 --- a/lib/finch_api/resources/hris/individuals.rb +++ b/lib/finch_api/resources/hris/individuals.rb @@ -20,12 +20,13 @@ class Individuals # # @see FinchAPI::Models::HRIS::IndividualRetrieveManyParams def retrieve_many(params = {}) - parsed, options = FinchAPI::HRIS::IndividualRetrieveManyParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::IndividualRetrieveManyParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "employer/individual", - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::IndividualResponse, diff --git a/lib/finch_api/resources/hris/pay_statements.rb b/lib/finch_api/resources/hris/pay_statements.rb index 53fac6aa..e875d15d 100644 --- a/lib/finch_api/resources/hris/pay_statements.rb +++ b/lib/finch_api/resources/hris/pay_statements.rb @@ -21,12 +21,13 @@ class PayStatements # # @see FinchAPI::Models::HRIS::PayStatementRetrieveManyParams def retrieve_many(params) - parsed, options = FinchAPI::HRIS::PayStatementRetrieveManyParams.dump_request(params) query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::PayStatementRetrieveManyParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "employer/pay-statement", - query: parsed.slice(*query_params), + query: query, body: parsed.except(*query_params), page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::HRIS::PayStatementResponse, diff --git a/lib/finch_api/resources/hris/payments.rb b/lib/finch_api/resources/hris/payments.rb index 489d73a6..ef2f5059 100644 --- a/lib/finch_api/resources/hris/payments.rb +++ b/lib/finch_api/resources/hris/payments.rb @@ -24,10 +24,11 @@ class Payments # @see FinchAPI::Models::HRIS::PaymentListParams def list(params) parsed, options = FinchAPI::HRIS::PaymentListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/payment", - query: parsed, + query: query, page: FinchAPI::Internal::SinglePage, model: FinchAPI::HRIS::Payment, security: {bearer_auth: true}, diff --git a/lib/finch_api/resources/jobs/automated.rb b/lib/finch_api/resources/jobs/automated.rb index 4e483b59..939b1082 100644 --- a/lib/finch_api/resources/jobs/automated.rb +++ b/lib/finch_api/resources/jobs/automated.rb @@ -19,12 +19,9 @@ class Automated # This endpoint is available for _Scale_ tier customers as an add-on. To request # access to this endpoint, please contact your Finch account manager. # - # @overload create(type:, params:, request_options: {}) - # - # @param type [Symbol, FinchAPI::Models::Jobs::AutomatedCreateParams::Type] The type of job to start. - # - # @param params [FinchAPI::Models::Jobs::AutomatedCreateParams::Params] + # @overload create(body:, request_options: {}) # + # @param body [FinchAPI::Models::Jobs::AutomatedCreateParams::Body::DataSyncAll, FinchAPI::Models::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync] # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::AutomatedCreateResponse] @@ -35,7 +32,7 @@ def create(params) @client.request( method: :post, path: "jobs/automated", - body: parsed, + body: parsed[:body], model: FinchAPI::Models::Jobs::AutomatedCreateResponse, security: {bearer_auth: true}, options: options @@ -79,10 +76,11 @@ def retrieve(job_id, params = {}) # @see FinchAPI::Models::Jobs::AutomatedListParams def list(params = {}) parsed, options = FinchAPI::Jobs::AutomatedListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "jobs/automated", - query: parsed, + query: query, model: FinchAPI::Models::Jobs::AutomatedListResponse, security: {bearer_auth: true}, options: options diff --git a/lib/finch_api/resources/payroll/pay_groups.rb b/lib/finch_api/resources/payroll/pay_groups.rb index 2db05d98..f887f8ac 100644 --- a/lib/finch_api/resources/payroll/pay_groups.rb +++ b/lib/finch_api/resources/payroll/pay_groups.rb @@ -19,10 +19,11 @@ class PayGroups # @see FinchAPI::Models::Payroll::PayGroupRetrieveParams def retrieve(pay_group_id, params = {}) parsed, options = FinchAPI::Payroll::PayGroupRetrieveParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["employer/pay-groups/%1$s", pay_group_id], - query: parsed, + query: query, model: FinchAPI::Models::Payroll::PayGroupRetrieveResponse, security: {bearer_auth: true}, options: options @@ -46,10 +47,11 @@ def retrieve(pay_group_id, params = {}) # @see FinchAPI::Models::Payroll::PayGroupListParams def list(params = {}) parsed, options = FinchAPI::Payroll::PayGroupListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/pay-groups", - query: parsed, + query: query, page: FinchAPI::Internal::SinglePage, model: FinchAPI::Models::Payroll::PayGroupListResponse, security: {bearer_auth: true}, diff --git a/rbi/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi index 00a09891..06b3b92b 100644 --- a/rbi/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -301,6 +301,26 @@ module FinchAPI T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp) class << self + # @api private + sig do + params(query: FinchAPI::Internal::AnyHash).returns( + FinchAPI::Internal::AnyHash + ) + end + def encode_query_params(query) + end + + # @api private + sig do + params( + collection: FinchAPI::Internal::AnyHash, + key: String, + element: T.anything + ).void + end + private def write_query_param_element!(collection, key, element) + end + # @api private sig do params( diff --git a/rbi/finch_api/models/hris/benefit_retrieve_params.rbi b/rbi/finch_api/models/hris/benefit_retrieve_params.rbi index 4d603cc8..35fbf017 100644 --- a/rbi/finch_api/models/hris/benefit_retrieve_params.rbi +++ b/rbi/finch_api/models/hris/benefit_retrieve_params.rbi @@ -15,6 +15,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :benefit_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -24,11 +27,13 @@ module FinchAPI sig do params( + benefit_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + benefit_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, request_options: {} @@ -38,6 +43,7 @@ module FinchAPI sig do override.returns( { + benefit_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/hris/benefit_update_params.rbi b/rbi/finch_api/models/hris/benefit_update_params.rbi index abd51115..5fa0d03f 100644 --- a/rbi/finch_api/models/hris/benefit_update_params.rbi +++ b/rbi/finch_api/models/hris/benefit_update_params.rbi @@ -15,6 +15,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :benefit_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -31,12 +34,14 @@ module FinchAPI sig do params( + benefit_id: String, entity_ids: T::Array[String], description: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + benefit_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, # Updated name or description. @@ -48,6 +53,7 @@ module FinchAPI sig do override.returns( { + benefit_id: String, entity_ids: T::Array[String], description: String, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi b/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi index 40c6886d..4686034c 100644 --- a/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi @@ -16,6 +16,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :benefit_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -47,6 +50,7 @@ module FinchAPI sig do params( + benefit_id: String, entity_ids: T::Array[String], individuals: T::Array[ @@ -56,6 +60,7 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + benefit_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, # Array of the individual_id to enroll and a configuration object. @@ -67,6 +72,7 @@ module FinchAPI sig do override.returns( { + benefit_id: String, entity_ids: T::Array[String], individuals: T::Array[ diff --git a/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi index cbca21d2..db6afa40 100644 --- a/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi @@ -16,6 +16,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :benefit_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -25,11 +28,13 @@ module FinchAPI sig do params( + benefit_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + benefit_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, request_options: {} @@ -39,6 +44,7 @@ module FinchAPI sig do override.returns( { + benefit_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi b/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi index 0f0252b0..c6c49169 100644 --- a/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi @@ -16,6 +16,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :benefit_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -33,12 +36,14 @@ module FinchAPI sig do params( + benefit_id: String, entity_ids: T::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + benefit_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, # comma-delimited list of stable Finch uuids for each individual. If empty, @@ -51,6 +56,7 @@ module FinchAPI sig do override.returns( { + benefit_id: String, entity_ids: T::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi b/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi index d578e596..c284593f 100644 --- a/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi @@ -16,6 +16,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :benefit_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -32,12 +35,14 @@ module FinchAPI sig do params( + benefit_id: String, entity_ids: T::Array[String], individual_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + benefit_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, # Array of individual_ids to unenroll. @@ -49,6 +54,7 @@ module FinchAPI sig do override.returns( { + benefit_id: String, entity_ids: T::Array[String], individual_ids: T::Array[String], request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi index 82b4a4f4..76a72572 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi @@ -17,6 +17,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :rule_id + # The entity IDs to delete the rule for. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -26,11 +29,13 @@ module FinchAPI sig do params( + rule_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + rule_id:, # The entity IDs to delete the rule for. entity_ids: nil, request_options: {} @@ -40,6 +45,7 @@ module FinchAPI sig do override.returns( { + rule_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi index 49c1c0cf..9995fad7 100644 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi +++ b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi @@ -17,6 +17,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :rule_id + # The entity IDs to update the rule for. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -32,12 +35,14 @@ module FinchAPI sig do params( + rule_id: String, entity_ids: T::Array[String], optional_property: T.anything, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + rule_id:, # The entity IDs to update the rule for. entity_ids: nil, optional_property: nil, @@ -48,6 +53,7 @@ module FinchAPI sig do override.returns( { + rule_id: String, entity_ids: T::Array[String], optional_property: T.anything, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/hris/document_retreive_params.rbi b/rbi/finch_api/models/hris/document_retreive_params.rbi index a4245901..b9d28283 100644 --- a/rbi/finch_api/models/hris/document_retreive_params.rbi +++ b/rbi/finch_api/models/hris/document_retreive_params.rbi @@ -15,6 +15,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :document_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -24,11 +27,13 @@ module FinchAPI sig do params( + document_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + document_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, request_options: {} @@ -38,6 +43,7 @@ module FinchAPI sig do override.returns( { + document_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/jobs/automated_create_params.rbi b/rbi/finch_api/models/jobs/automated_create_params.rbi index 1b0c03a1..04cacd82 100644 --- a/rbi/finch_api/models/jobs/automated_create_params.rbi +++ b/rbi/finch_api/models/jobs/automated_create_params.rbi @@ -15,40 +15,37 @@ module FinchAPI ) end - # The type of job to start. - sig { returns(FinchAPI::Jobs::AutomatedCreateParams::Type::OrSymbol) } - attr_accessor :type - - sig { returns(FinchAPI::Jobs::AutomatedCreateParams::Params) } - attr_reader :params - sig do - params( - params: FinchAPI::Jobs::AutomatedCreateParams::Params::OrHash - ).void + returns( + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll, + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync + ) + ) end - attr_writer :params + attr_accessor :body sig do params( - type: FinchAPI::Jobs::AutomatedCreateParams::Type::OrSymbol, - params: FinchAPI::Jobs::AutomatedCreateParams::Params::OrHash, + body: + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll::OrHash, + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::OrHash + ), request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new( - # The type of job to start. - type:, - params:, - request_options: {} - ) + def self.new(body:, request_options: {}) end sig do override.returns( { - type: FinchAPI::Jobs::AutomatedCreateParams::Type::OrSymbol, - params: FinchAPI::Jobs::AutomatedCreateParams::Params, + body: + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll, + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync + ), request_options: FinchAPI::RequestOptions } ) @@ -56,55 +53,128 @@ module FinchAPI def to_hash end - # The type of job to start. - module Type - extend FinchAPI::Internal::Type::Enum + module Body + extend FinchAPI::Internal::Type::Union - TaggedSymbol = + Variants = T.type_alias do - T.all(Symbol, FinchAPI::Jobs::AutomatedCreateParams::Type) + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll, + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync + ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - W4_FORM_EMPLOYEE_SYNC = - T.let( - :w4_form_employee_sync, - FinchAPI::Jobs::AutomatedCreateParams::Type::TaggedSymbol - ) + class DataSyncAll < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll, + FinchAPI::Internal::AnyHash + ) + end - sig do - override.returns( - T::Array[ - FinchAPI::Jobs::AutomatedCreateParams::Type::TaggedSymbol - ] + # The type of job to start. + sig { returns(Symbol) } + attr_accessor :type + + sig { params(type: Symbol).returns(T.attached_class) } + def self.new( + # The type of job to start. + type: :data_sync_all ) + end + + sig { override.returns({ type: Symbol }) } + def to_hash + end end - def self.values - end - end - class Params < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Jobs::AutomatedCreateParams::Params, - FinchAPI::Internal::AnyHash + class W4FormEmployeeSync < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync, + FinchAPI::Internal::AnyHash + ) + end + + sig do + returns( + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params ) end + attr_reader :params - # The unique ID of the individual for W-4 data sync. - sig { returns(String) } - attr_accessor :individual_id + sig do + params( + params: + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params::OrHash + ).void + end + attr_writer :params - sig { params(individual_id: String).returns(T.attached_class) } - def self.new( - # The unique ID of the individual for W-4 data sync. - individual_id: - ) + # The type of job to start. + sig { returns(Symbol) } + attr_accessor :type + + sig do + params( + params: + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params::OrHash, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + params:, + # The type of job to start. + type: :w4_form_employee_sync + ) + end + + sig do + override.returns( + { + params: + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params, + type: Symbol + } + ) + end + def to_hash + end + + class Params < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params, + FinchAPI::Internal::AnyHash + ) + end + + # The unique ID of the individual for W-4 data sync. + sig { returns(String) } + attr_accessor :individual_id + + sig { params(individual_id: String).returns(T.attached_class) } + def self.new( + # The unique ID of the individual for W-4 data sync. + individual_id: + ) + end + + sig { override.returns({ individual_id: String }) } + def to_hash + end + end end - sig { override.returns({ individual_id: String }) } - def to_hash + sig do + override.returns( + T::Array[FinchAPI::Jobs::AutomatedCreateParams::Body::Variants] + ) + end + def self.variants end end end diff --git a/rbi/finch_api/models/jobs/automated_retrieve_params.rbi b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi index daa429b3..ce029055 100644 --- a/rbi/finch_api/models/jobs/automated_retrieve_params.rbi +++ b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi @@ -15,15 +15,23 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :job_id + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + job_id: String, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(job_id:, request_options: {}) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { job_id: String, request_options: FinchAPI::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/jobs/manual_retrieve_params.rbi b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi index 1b6a3dad..a6fb70bb 100644 --- a/rbi/finch_api/models/jobs/manual_retrieve_params.rbi +++ b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi @@ -15,15 +15,23 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :job_id + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + job_id: String, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(job_id:, request_options: {}) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { job_id: String, request_options: FinchAPI::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi b/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi index 65fea4af..1ba66d74 100644 --- a/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi +++ b/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi @@ -15,6 +15,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :pay_group_id + # The entity IDs to specify which entities' data to access. sig { returns(T.nilable(T::Array[String])) } attr_reader :entity_ids @@ -24,11 +27,13 @@ module FinchAPI sig do params( + pay_group_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + pay_group_id:, # The entity IDs to specify which entities' data to access. entity_ids: nil, request_options: {} @@ -38,6 +43,7 @@ module FinchAPI sig do override.returns( { + pay_group_id: String, entity_ids: T::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/rbi/finch_api/models/sandbox/employment_update_params.rbi b/rbi/finch_api/models/sandbox/employment_update_params.rbi index de1e85a9..837e4368 100644 --- a/rbi/finch_api/models/sandbox/employment_update_params.rbi +++ b/rbi/finch_api/models/sandbox/employment_update_params.rbi @@ -15,6 +15,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :individual_id + # Worker's compensation classification code for this employee sig { returns(T.nilable(String)) } attr_accessor :class_code @@ -158,6 +161,7 @@ module FinchAPI sig do params( + individual_id: String, class_code: T.nilable(String), custom_fields: T.nilable( @@ -202,6 +206,7 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + individual_id:, # Worker's compensation classification code for this employee class_code: nil, # Custom fields for the individual. These are fields which are defined by the @@ -248,6 +253,7 @@ module FinchAPI sig do override.returns( { + individual_id: String, class_code: T.nilable(String), custom_fields: T.nilable( diff --git a/rbi/finch_api/models/sandbox/individual_update_params.rbi b/rbi/finch_api/models/sandbox/individual_update_params.rbi index 76c3b06c..11aad873 100644 --- a/rbi/finch_api/models/sandbox/individual_update_params.rbi +++ b/rbi/finch_api/models/sandbox/individual_update_params.rbi @@ -15,6 +15,9 @@ module FinchAPI ) end + sig { returns(String) } + attr_accessor :individual_id + sig { returns(T.nilable(String)) } attr_accessor :dob @@ -97,6 +100,7 @@ module FinchAPI sig do params( + individual_id: String, dob: T.nilable(String), emails: T.nilable( @@ -131,6 +135,7 @@ module FinchAPI ).returns(T.attached_class) end def self.new( + individual_id:, dob: nil, emails: nil, # Social Security Number of the individual in **encrypted** format. This field is @@ -163,6 +168,7 @@ module FinchAPI sig do override.returns( { + individual_id: String, dob: T.nilable(String), emails: T.nilable( diff --git a/rbi/finch_api/resources/jobs/automated.rbi b/rbi/finch_api/resources/jobs/automated.rbi index 8a14e34f..9abf0489 100644 --- a/rbi/finch_api/resources/jobs/automated.rbi +++ b/rbi/finch_api/resources/jobs/automated.rbi @@ -20,17 +20,15 @@ module FinchAPI # access to this endpoint, please contact your Finch account manager. sig do params( - type: FinchAPI::Jobs::AutomatedCreateParams::Type::OrSymbol, - params: FinchAPI::Jobs::AutomatedCreateParams::Params::OrHash, + body: + T.any( + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll::OrHash, + FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::OrHash + ), request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::Jobs::AutomatedCreateResponse) end - def create( - # The type of job to start. - type:, - params:, - request_options: {} - ) + def create(body:, request_options: {}) end # Get an automated job by `job_id`. diff --git a/scripts/mock b/scripts/mock index 0b28f6ea..bcf3b392 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then + # Pre-install the package so the download doesn't eat into the startup timeout + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - # Wait for server to come online + # Wait for server to come online (max 30s) echo -n "Waiting for server" + attempts=0 while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + attempts=$((attempts + 1)) + if [ "$attempts" -ge 300 ]; then + echo + echo "Timed out waiting for Prism server to start" + cat .prism.log + exit 1 + fi echo -n "." sleep 0.1 done diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh new file mode 100755 index 00000000..4287939e --- /dev/null +++ b/scripts/utils/upload-artifact.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# ANSI Color Codes +GREEN='\033[32m' +RED='\033[31m' +NC='\033[0m' # No Color + +DIST_DIR="dist" + +log_error() { + local msg="$1" + local headers="$2" + local body="$3" + echo -e "${RED}${msg}${NC}" + [[ -f "$headers" ]] && echo -e "${RED}Headers:$(cat "$headers")${NC}" + echo -e "${RED}Body: ${body}${NC}" + exit 1 +} + +upload_file() { + local file_name="$1" + local tmp_headers + tmp_headers=$(mktemp) + + if [ -f "$file_name" ]; then + echo -e "${GREEN}Processing file: $file_name${NC}" + pkg_file_name="${file_name#"${DIST_DIR}/"}" + + # Get signed URL for uploading artifact file + signed_url_response=$(curl -X POST -G "$URL" \ + -sS --retry 5 \ + -D "$tmp_headers" \ + --data-urlencode "filename=$pkg_file_name" \ + -H "Authorization: Bearer $AUTH" \ + -H "Content-Type: application/json") + + # Validate JSON and extract URL + if ! signed_url=$(echo "$signed_url_response" | jq -e -r '.url' 2>/dev/null) || [[ "$signed_url" == "null" ]]; then + log_error "Failed to get valid signed URL" "$tmp_headers" "$signed_url_response" + fi + + # Set content-type based on file extension + local extension="${file_name##*.}" + local content_type + case "$extension" in + gem) content_type="application/octet-stream" ;; + gz) content_type="application/gzip" ;; + rz) content_type="application/octet-stream" ;; + html) content_type="text/html" ;; + *) content_type="application/octet-stream" ;; + esac + + # Upload file + upload_response=$(curl -v -X PUT \ + --retry 5 \ + --retry-all-errors \ + -D "$tmp_headers" \ + -H "Content-Type: $content_type" \ + --data-binary "@${file_name}" "$signed_url" 2>&1) + + if ! echo "$upload_response" | grep -q "HTTP/[0-9.]* 200"; then + log_error "Failed to upload artifact file" "$tmp_headers" "$upload_response" + fi + + # Insert small throttle to reduce rate limiting risk + sleep 0.1 + fi +} + +walk_tree() { + local current_dir="$1" + + for entry in "$current_dir"/*; do + # Check that entry is valid + [ -e "$entry" ] || [ -h "$entry" ] || continue + + if [ -d "$entry" ]; then + walk_tree "$entry" + else + upload_file "$entry" + fi + done +} + +cd "$(dirname "$0")/../.." + +echo "::group::Building gem" +VERSION_FILE="lib/${PACKAGE_NAME}/version.rb" +if [[ ! -f "$VERSION_FILE" ]]; then + echo -e "${RED}Version file not found: ${VERSION_FILE}${NC}" + exit 1 +fi +SHORT_SHA="${SHA:0:7}" +sed -i.bak -E "s/(VERSION = \"[^\"]+)\"/\1.beta.${SHORT_SHA}\"/" "$VERSION_FILE" +rm -f "${VERSION_FILE}.bak" + +gem build +mkdir -p "${DIST_DIR}/gems" +mv ./*.gem "${DIST_DIR}/gems/" +echo "::endgroup::" + +echo "::group::Generating gem index" +gem generate_index --directory "$DIST_DIR" +echo "::endgroup::" + +echo "::group::Uploading to pkg.stainless.com" +walk_tree "$DIST_DIR" +echo "::endgroup::" + +echo -e "${GREEN}Gem artifacts uploaded to Stainless storage.${NC}" +echo -e "\033[32mInstallation: bundle remove finch-api && bundle add finch-api --source 'https://pkg.stainless.com/s/finch-ruby/$SHA'\033[0m" diff --git a/sig/finch_api/internal/util.rbs b/sig/finch_api/internal/util.rbs index b577edac..a074d555 100644 --- a/sig/finch_api/internal/util.rbs +++ b/sig/finch_api/internal/util.rbs @@ -106,6 +106,16 @@ module FinchAPI JSON_CONTENT: Regexp JSONL_CONTENT: Regexp + def encode_query_params: ( + ::Hash[Symbol, top] query + ) -> ::Hash[Symbol, top] + + private def write_query_param_element!: ( + ::Hash[Symbol, top] collection, + String key, + top element + ) -> nil + def self?.write_multipart_content: ( Enumerator::Yielder y, val: top, diff --git a/sig/finch_api/models/hris/benefit_retrieve_params.rbs b/sig/finch_api/models/hris/benefit_retrieve_params.rbs index ac88c4be..2bf7c3cd 100644 --- a/sig/finch_api/models/hris/benefit_retrieve_params.rbs +++ b/sig/finch_api/models/hris/benefit_retrieve_params.rbs @@ -2,23 +2,27 @@ module FinchAPI module Models module HRIS type benefit_retrieve_params = - { entity_ids: ::Array[String] } + { benefit_id: String, entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class BenefitRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor benefit_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + benefit_id: String, ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + benefit_id: String, entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/hris/benefit_update_params.rbs b/sig/finch_api/models/hris/benefit_update_params.rbs index 44536449..c0529a0e 100644 --- a/sig/finch_api/models/hris/benefit_update_params.rbs +++ b/sig/finch_api/models/hris/benefit_update_params.rbs @@ -2,13 +2,15 @@ module FinchAPI module Models module HRIS type benefit_update_params = - { entity_ids: ::Array[String], description: String } + { benefit_id: String, entity_ids: ::Array[String], description: String } & FinchAPI::Internal::Type::request_parameters class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor benefit_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] @@ -18,12 +20,14 @@ module FinchAPI def description=: (String) -> String def initialize: ( + benefit_id: String, ?entity_ids: ::Array[String], ?description: String, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + benefit_id: String, entity_ids: ::Array[String], description: String, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs b/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs index b6c848e6..7e6e032a 100644 --- a/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs @@ -4,6 +4,7 @@ module FinchAPI module Benefits type individual_enroll_many_params = { + benefit_id: String, entity_ids: ::Array[String], individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] } @@ -13,6 +14,8 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor benefit_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] @@ -24,12 +27,14 @@ module FinchAPI ) -> ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] def initialize: ( + benefit_id: String, ?entity_ids: ::Array[String], ?individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + benefit_id: String, entity_ids: ::Array[String], individuals: ::Array[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual], request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs b/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs index 72e3b890..59621bfe 100644 --- a/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs @@ -3,23 +3,27 @@ module FinchAPI module HRIS module Benefits type individual_enrolled_ids_params = - { entity_ids: ::Array[String] } + { benefit_id: String, entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class IndividualEnrolledIDsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor benefit_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + benefit_id: String, ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + benefit_id: String, entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs b/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs index 5f3fa7b0..387335cb 100644 --- a/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs @@ -3,13 +3,19 @@ module FinchAPI module HRIS module Benefits type individual_retrieve_many_benefits_params = - { entity_ids: ::Array[String], individual_ids: String } + { + benefit_id: String, + entity_ids: ::Array[String], + individual_ids: String + } & FinchAPI::Internal::Type::request_parameters class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor benefit_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] @@ -19,12 +25,14 @@ module FinchAPI def individual_ids=: (String) -> String def initialize: ( + benefit_id: String, ?entity_ids: ::Array[String], ?individual_ids: String, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + benefit_id: String, entity_ids: ::Array[String], individual_ids: String, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs b/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs index 43a8589e..55f2e959 100644 --- a/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs +++ b/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs @@ -3,13 +3,19 @@ module FinchAPI module HRIS module Benefits type individual_unenroll_many_params = - { entity_ids: ::Array[String], individual_ids: ::Array[String] } + { + benefit_id: String, + entity_ids: ::Array[String], + individual_ids: ::Array[String] + } & FinchAPI::Internal::Type::request_parameters class IndividualUnenrollManyParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor benefit_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] @@ -19,12 +25,14 @@ module FinchAPI def individual_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + benefit_id: String, ?entity_ids: ::Array[String], ?individual_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + benefit_id: String, entity_ids: ::Array[String], individual_ids: ::Array[String], request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs index 72499010..384109e7 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs @@ -4,23 +4,27 @@ module FinchAPI module Company module PayStatementItem type rule_delete_params = - { entity_ids: ::Array[String] } + { rule_id: String, entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor rule_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + rule_id: String, ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + rule_id: String, entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs index 67658acf..a2532ccd 100644 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs +++ b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs @@ -4,13 +4,19 @@ module FinchAPI module Company module PayStatementItem type rule_update_params = - { entity_ids: ::Array[String], optional_property: top } + { + rule_id: String, + entity_ids: ::Array[String], + optional_property: top + } & FinchAPI::Internal::Type::request_parameters class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor rule_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] @@ -20,12 +26,14 @@ module FinchAPI def optional_property=: (top) -> top def initialize: ( + rule_id: String, ?entity_ids: ::Array[String], ?optional_property: top, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + rule_id: String, entity_ids: ::Array[String], optional_property: top, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/hris/document_retreive_params.rbs b/sig/finch_api/models/hris/document_retreive_params.rbs index e757fc2e..d97b7380 100644 --- a/sig/finch_api/models/hris/document_retreive_params.rbs +++ b/sig/finch_api/models/hris/document_retreive_params.rbs @@ -2,23 +2,27 @@ module FinchAPI module Models module HRIS type document_retreive_params = - { entity_ids: ::Array[String] } + { document_id: String, entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class DocumentRetreiveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor document_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + document_id: String, ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + document_id: String, entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/jobs/automated_create_params.rbs b/sig/finch_api/models/jobs/automated_create_params.rbs index 5cfcf052..12e8a49b 100644 --- a/sig/finch_api/models/jobs/automated_create_params.rbs +++ b/sig/finch_api/models/jobs/automated_create_params.rbs @@ -2,50 +2,75 @@ module FinchAPI module Models module Jobs type automated_create_params = - { - type: FinchAPI::Models::Jobs::AutomatedCreateParams::type_, - params: FinchAPI::Jobs::AutomatedCreateParams::Params - } + { body: FinchAPI::Models::Jobs::AutomatedCreateParams::body } & FinchAPI::Internal::Type::request_parameters class AutomatedCreateParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - attr_accessor type: FinchAPI::Models::Jobs::AutomatedCreateParams::type_ - - attr_accessor params: FinchAPI::Jobs::AutomatedCreateParams::Params + attr_accessor body: FinchAPI::Models::Jobs::AutomatedCreateParams::body def initialize: ( - type: FinchAPI::Models::Jobs::AutomatedCreateParams::type_, - params: FinchAPI::Jobs::AutomatedCreateParams::Params, + body: FinchAPI::Models::Jobs::AutomatedCreateParams::body, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { - type: FinchAPI::Models::Jobs::AutomatedCreateParams::type_, - params: FinchAPI::Jobs::AutomatedCreateParams::Params, + body: FinchAPI::Models::Jobs::AutomatedCreateParams::body, request_options: FinchAPI::RequestOptions } - type type_ = :w4_form_employee_sync + type body = + FinchAPI::Jobs::AutomatedCreateParams::Body::DataSyncAll + | FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync - module Type - extend FinchAPI::Internal::Type::Enum + module Body + extend FinchAPI::Internal::Type::Union - W4_FORM_EMPLOYEE_SYNC: :w4_form_employee_sync + type data_sync_all = { type: :data_sync_all } - def self?.values: -> ::Array[FinchAPI::Models::Jobs::AutomatedCreateParams::type_] - end + class DataSyncAll < FinchAPI::Internal::Type::BaseModel + attr_accessor type: :data_sync_all + + def initialize: (?type: :data_sync_all) -> void + + def to_hash: -> { type: :data_sync_all } + end + + type w4_form_employee_sync = + { + params: FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params, + type: :w4_form_employee_sync + } + + class W4FormEmployeeSync < FinchAPI::Internal::Type::BaseModel + attr_accessor params: FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params + + attr_accessor type: :w4_form_employee_sync + + def initialize: ( + params: FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params, + ?type: :w4_form_employee_sync + ) -> void + + def to_hash: -> { + params: FinchAPI::Jobs::AutomatedCreateParams::Body::W4FormEmployeeSync::Params, + type: :w4_form_employee_sync + } + + type params = { individual_id: String } - type params = { individual_id: String } + class Params < FinchAPI::Internal::Type::BaseModel + attr_accessor individual_id: String - class Params < FinchAPI::Internal::Type::BaseModel - attr_accessor individual_id: String + def initialize: (individual_id: String) -> void - def initialize: (individual_id: String) -> void + def to_hash: -> { individual_id: String } + end + end - def to_hash: -> { individual_id: String } + def self?.variants: -> ::Array[FinchAPI::Models::Jobs::AutomatedCreateParams::body] end end end diff --git a/sig/finch_api/models/jobs/automated_retrieve_params.rbs b/sig/finch_api/models/jobs/automated_retrieve_params.rbs index f7c8cfa0..a83dfbb9 100644 --- a/sig/finch_api/models/jobs/automated_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/automated_retrieve_params.rbs @@ -2,15 +2,23 @@ module FinchAPI module Models module Jobs type automated_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { job_id: String } & FinchAPI::Internal::Type::request_parameters class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_accessor job_id: String - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def initialize: ( + job_id: String, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + job_id: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/jobs/manual_retrieve_params.rbs b/sig/finch_api/models/jobs/manual_retrieve_params.rbs index 0a765cf5..86ccd61e 100644 --- a/sig/finch_api/models/jobs/manual_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/manual_retrieve_params.rbs @@ -2,15 +2,23 @@ module FinchAPI module Models module Jobs type manual_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { job_id: String } & FinchAPI::Internal::Type::request_parameters class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_accessor job_id: String - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def initialize: ( + job_id: String, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + job_id: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs b/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs index 771d2b07..34c5908f 100644 --- a/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs +++ b/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs @@ -2,23 +2,27 @@ module FinchAPI module Models module Payroll type pay_group_retrieve_params = - { entity_ids: ::Array[String] } + { pay_group_id: String, entity_ids: ::Array[String] } & FinchAPI::Internal::Type::request_parameters class PayGroupRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor pay_group_id: String + attr_reader entity_ids: ::Array[String]? def entity_ids=: (::Array[String]) -> ::Array[String] def initialize: ( + pay_group_id: String, ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + pay_group_id: String, entity_ids: ::Array[String], request_options: FinchAPI::RequestOptions } diff --git a/sig/finch_api/models/sandbox/employment_update_params.rbs b/sig/finch_api/models/sandbox/employment_update_params.rbs index 6ddc6532..8e710b1d 100644 --- a/sig/finch_api/models/sandbox/employment_update_params.rbs +++ b/sig/finch_api/models/sandbox/employment_update_params.rbs @@ -3,6 +3,7 @@ module FinchAPI module Sandbox type employment_update_params = { + individual_id: String, class_code: String?, custom_fields: ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::CustomField]?, department: FinchAPI::Sandbox::EmploymentUpdateParams::Department?, @@ -29,6 +30,8 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor individual_id: String + attr_accessor class_code: String? attr_accessor custom_fields: ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::CustomField]? @@ -68,6 +71,7 @@ module FinchAPI attr_accessor title: String? def initialize: ( + individual_id: String, ?class_code: String?, ?custom_fields: ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::CustomField]?, ?department: FinchAPI::Sandbox::EmploymentUpdateParams::Department?, @@ -91,6 +95,7 @@ module FinchAPI ) -> void def to_hash: -> { + individual_id: String, class_code: String?, custom_fields: ::Array[FinchAPI::Sandbox::EmploymentUpdateParams::CustomField]?, department: FinchAPI::Sandbox::EmploymentUpdateParams::Department?, diff --git a/sig/finch_api/models/sandbox/individual_update_params.rbs b/sig/finch_api/models/sandbox/individual_update_params.rbs index 042c0661..fdb93cd9 100644 --- a/sig/finch_api/models/sandbox/individual_update_params.rbs +++ b/sig/finch_api/models/sandbox/individual_update_params.rbs @@ -3,6 +3,7 @@ module FinchAPI module Sandbox type individual_update_params = { + individual_id: String, dob: String?, emails: ::Array[FinchAPI::Sandbox::IndividualUpdateParams::Email]?, encrypted_ssn: String?, @@ -22,6 +23,8 @@ module FinchAPI extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_accessor individual_id: String + attr_accessor dob: String? attr_accessor emails: ::Array[FinchAPI::Sandbox::IndividualUpdateParams::Email]? @@ -47,6 +50,7 @@ module FinchAPI attr_accessor ssn: String? def initialize: ( + individual_id: String, ?dob: String?, ?emails: ::Array[FinchAPI::Sandbox::IndividualUpdateParams::Email]?, ?encrypted_ssn: String?, @@ -63,6 +67,7 @@ module FinchAPI ) -> void def to_hash: -> { + individual_id: String, dob: String?, emails: ::Array[FinchAPI::Sandbox::IndividualUpdateParams::Email]?, encrypted_ssn: String?, diff --git a/sig/finch_api/resources/jobs/automated.rbs b/sig/finch_api/resources/jobs/automated.rbs index f23f755c..32ee669d 100644 --- a/sig/finch_api/resources/jobs/automated.rbs +++ b/sig/finch_api/resources/jobs/automated.rbs @@ -3,8 +3,7 @@ module FinchAPI class Jobs class Automated def create: ( - type: FinchAPI::Models::Jobs::AutomatedCreateParams::type_, - params: FinchAPI::Jobs::AutomatedCreateParams::Params, + body: FinchAPI::Models::Jobs::AutomatedCreateParams::body, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Models::Jobs::AutomatedCreateResponse diff --git a/test/finch_api/resources/jobs/automated_test.rb b/test/finch_api/resources/jobs/automated_test.rb index 9398dd98..0b15031c 100644 --- a/test/finch_api/resources/jobs/automated_test.rb +++ b/test/finch_api/resources/jobs/automated_test.rb @@ -4,8 +4,7 @@ class FinchAPI::Test::Resources::Jobs::AutomatedTest < FinchAPI::Test::ResourceTest def test_create_required_params - response = - @finch.jobs.automated.create(params: {individual_id: "individual_id"}, type: :w4_form_employee_sync) + response = @finch.jobs.automated.create(body: {type: :data_sync_all}) assert_pattern do response => FinchAPI::Models::Jobs::AutomatedCreateResponse From 1229fe85090c9c58caeb17b10434a8923fe2dcb2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 19:05:57 +0000 Subject: [PATCH 13/46] chore(ci): skip uploading artifacts on stainless-internal branches --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dfb7d73..b1e6438c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,18 @@ jobs: bundle install - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/finch-ruby' + if: |- + github.repository == 'stainless-sdks/finch-ruby' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Build and upload gem artifacts - if: github.repository == 'stainless-sdks/finch-ruby' + if: |- + github.repository == 'stainless-sdks/finch-ruby' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} From f4ad88e63dcec2d9c6f9b64e9f10aa01a34c2af4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:04:09 +0000 Subject: [PATCH 14/46] feat(client): add webhook support --- lib/finch_api/client.rb | 7 +++++++ rbi/finch_api/client.rbi | 6 ++++++ sig/finch_api/client.rbs | 3 +++ 3 files changed, 16 insertions(+) diff --git a/lib/finch_api/client.rb b/lib/finch_api/client.rb index 04735b96..8a859282 100644 --- a/lib/finch_api/client.rb +++ b/lib/finch_api/client.rb @@ -24,6 +24,9 @@ class Client < FinchAPI::Internal::Transport::BaseClient # @return [String, nil] attr_reader :client_secret + # @return [String, nil] + attr_reader :webhook_secret + # @return [FinchAPI::Resources::AccessTokens] attr_reader :access_tokens @@ -90,6 +93,8 @@ class Client < FinchAPI::Internal::Transport::BaseClient # # @param access_token [String, nil] # + # @param webhook_secret [String, nil] Defaults to `ENV["FINCH_WEBHOOK_SECRET"]` + # # @param base_url [String, nil] Override the default base URL for the API, e.g., # `"https://api.example.com/v2/"`. Defaults to `ENV["FINCH_BASE_URL"]` # @@ -104,6 +109,7 @@ def initialize( client_id: ENV["FINCH_CLIENT_ID"], client_secret: ENV["FINCH_CLIENT_SECRET"], access_token: nil, + webhook_secret: ENV["FINCH_WEBHOOK_SECRET"], base_url: ENV["FINCH_BASE_URL"], max_retries: self.class::DEFAULT_MAX_RETRIES, timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS, @@ -119,6 +125,7 @@ def initialize( @client_id = client_id&.to_s @client_secret = client_secret&.to_s @access_token = access_token&.to_s + @webhook_secret = webhook_secret&.to_s super( base_url: base_url, diff --git a/rbi/finch_api/client.rbi b/rbi/finch_api/client.rbi index d72ce814..61746386 100644 --- a/rbi/finch_api/client.rbi +++ b/rbi/finch_api/client.rbi @@ -19,6 +19,9 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_reader :client_secret + sig { returns(T.nilable(String)) } + attr_reader :webhook_secret + sig { returns(FinchAPI::Resources::AccessTokens) } attr_reader :access_tokens @@ -74,6 +77,7 @@ module FinchAPI client_id: T.nilable(String), client_secret: T.nilable(String), access_token: T.nilable(String), + webhook_secret: T.nilable(String), base_url: T.nilable(String), max_retries: Integer, timeout: Float, @@ -87,6 +91,8 @@ module FinchAPI # Defaults to `ENV["FINCH_CLIENT_SECRET"]` client_secret: ENV["FINCH_CLIENT_SECRET"], access_token: nil, + # Defaults to `ENV["FINCH_WEBHOOK_SECRET"]` + webhook_secret: ENV["FINCH_WEBHOOK_SECRET"], # Override the default base URL for the API, e.g., # `"https://api.example.com/v2/"`. Defaults to `ENV["FINCH_BASE_URL"]` base_url: ENV["FINCH_BASE_URL"], diff --git a/sig/finch_api/client.rbs b/sig/finch_api/client.rbs index 5935a270..b615cf9b 100644 --- a/sig/finch_api/client.rbs +++ b/sig/finch_api/client.rbs @@ -14,6 +14,8 @@ module FinchAPI attr_reader client_secret: String? + attr_reader webhook_secret: String? + attr_reader access_tokens: FinchAPI::Resources::AccessTokens attr_reader hris: FinchAPI::Resources::HRIS @@ -46,6 +48,7 @@ module FinchAPI ?client_id: String?, ?client_secret: String?, ?access_token: String?, + ?webhook_secret: String?, ?base_url: String?, ?max_retries: Integer, ?timeout: Float, From c0b42bcd72ff06cf71fec9a98856c12043b5cfe2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:47:59 +0000 Subject: [PATCH 15/46] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1e6438c..5e89bf0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' From da0623154fea6348418b12f7a5e5cb1a0430cf65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 19:48:44 +0000 Subject: [PATCH 16/46] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index abcde50d..db08ac03 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-093ade6f1d3115b654a73b97855fbe334c9f9c5d906081dad2ec973ab0c0b24d.yml -openapi_spec_hash: 7cc27b8e483d9db9c411875289c42eb9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-51b4b982d0bd629dbfe3e78a4a41f52154506a7a259f815f29e3ad402704b426.yml +openapi_spec_hash: 800e70018b89117b79b4c6628f6773f2 config_hash: d21a244fc073152c8dbecb8ece970209 From e294a795e94df460394978881960bbc067181a7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 19:04:00 +0000 Subject: [PATCH 17/46] refactor(tests): switch from prism to steady --- CONTRIBUTING.md | 2 +- scripts/mock | 26 +++++++++++++------------- scripts/test | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b62258da..cfed90a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ $ bundle exec rake ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. +Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests. ```sh $ ./scripts/mock diff --git a/scripts/mock b/scripts/mock index bcf3b392..3d1d19c1 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.3 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index e0dc1374..41db042e 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi From 93617aad24e3c174e12dfdf2de4bad5cce0aeb2f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 17:53:36 +0000 Subject: [PATCH 18/46] chore(tests): bump steady to v0.19.4 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 3d1d19c1..e2ca85a0 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.3 -- steady --version + npm exec --package=@stdy/cli@0.19.4 -- steady --version - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 41db042e..b839d606 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From 424035c08a1d4c56c3b1118cd1071bc1cbaad28a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:41:33 +0000 Subject: [PATCH 19/46] chore(tests): bump steady to v0.19.5 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index e2ca85a0..4f7dfd12 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.4 -- steady --version + npm exec --package=@stdy/cli@0.19.5 -- steady --version - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index b839d606..d523b280 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From a3154752a39a30ad3cb8aac78b2d473c3bb86dcf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:41:15 +0000 Subject: [PATCH 20/46] chore(internal): update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3d26ceed..fc9eb287 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .idea/ .ignore .prism.log +.stdy.log .ruby-lsp/ .yardoc/ bin/tapioca From b8328058d1e51765ee48832897ebf00984272323 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:02:03 +0000 Subject: [PATCH 21/46] chore(tests): bump steady to v0.19.6 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 4f7dfd12..dba30589 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.5 -- steady --version + npm exec --package=@stdy/cli@0.19.6 -- steady --version - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index d523b280..620bbe9a 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From b8e66d9232c428b9c4104bf5c6ce6673690afa2a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:17:40 +0000 Subject: [PATCH 22/46] chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e89bf0b..3c8619b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,8 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: |- github.repository == 'stainless-sdks/finch-ruby' && - (github.event_name == 'push' || github.event.pull_request.head.repo.fork) + (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && + (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 - name: Set up Ruby From fe2f5fb484c9684d6586106172cd984f17e914c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:46:48 +0000 Subject: [PATCH 23/46] chore(tests): bump steady to v0.19.7 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index dba30589..9ecceca0 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.6 -- steady --version + npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 620bbe9a..d167e562 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From 47c53f4502bd0e02e2b4442a7a541705984dbc7f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:30:34 +0000 Subject: [PATCH 24/46] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index db08ac03..5e00d2b1 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-51b4b982d0bd629dbfe3e78a4a41f52154506a7a259f815f29e3ad402704b426.yml -openapi_spec_hash: 800e70018b89117b79b4c6628f6773f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0926c5a3f3e790c6a972e1a7b851e436419a727bc8c541d7a270af78ee65eab3.yml +openapi_spec_hash: bb1f4769845319413351c5bd9eb2d064 config_hash: d21a244fc073152c8dbecb8ece970209 From 8ff38e4aeb774f2ec8f5be0692c787652a72b88f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:31:35 +0000 Subject: [PATCH 25/46] feat(api): api update --- .stats.yml | 4 +- lib/finch_api/models/introspection.rb | 28 ++++++++++- rbi/finch_api/models/introspection.rbi | 69 ++++++++++++++++++++++++-- sig/finch_api/models/introspection.rbs | 47 ++++++++++++++++-- 4 files changed, 139 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5e00d2b1..3855d3fa 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-0926c5a3f3e790c6a972e1a7b851e436419a727bc8c541d7a270af78ee65eab3.yml -openapi_spec_hash: bb1f4769845319413351c5bd9eb2d064 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-94cd7551c2a8e8b2e491c9e8ca44387f2d1c7a498046dd60150f254316b20090.yml +openapi_spec_hash: c6f63a7d16d9ff16040c16a9633049fd config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/lib/finch_api/models/introspection.rb b/lib/finch_api/models/introspection.rb index 0f8bf1bb..c7dea96c 100644 --- a/lib/finch_api/models/introspection.rb +++ b/lib/finch_api/models/introspection.rb @@ -346,12 +346,38 @@ class Entity < FinchAPI::Internal::Type::BaseModel # @return [String, nil] required :source_id, String, nil?: true - # @!method initialize(id:, name:, source_id:) + # @!attribute status + # The status of the entity connection + # + # @return [Symbol, FinchAPI::Models::Introspection::Entity::Status] + required :status, enum: -> { FinchAPI::Introspection::Entity::Status } + + # @!method initialize(id:, name:, source_id:, status:) # @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 status [Symbol, FinchAPI::Models::Introspection::Entity::Status] The status of the entity connection + + # The status of the entity connection + # + # @see FinchAPI::Models::Introspection::Entity#status + module Status + extend FinchAPI::Internal::Type::Enum + + PENDING = :pending + PROCESSING = :processing + CONNECTED = :connected + ERROR_NO_ACCOUNT_SETUP = :error_no_account_setup + ERROR_PERMISSIONS = :error_permissions + REAUTH = :reauth + DISCONNECTED = :disconnected + + # @!method self.values + # @return [Array] + end end end end diff --git a/rbi/finch_api/models/introspection.rbi b/rbi/finch_api/models/introspection.rbi index 69347887..c3202d56 100644 --- a/rbi/finch_api/models/introspection.rbi +++ b/rbi/finch_api/models/introspection.rbi @@ -578,11 +578,16 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :source_id + # The status of the entity connection + sig { returns(FinchAPI::Introspection::Entity::Status::TaggedSymbol) } + attr_accessor :status + sig do params( id: String, name: T.nilable(String), - source_id: T.nilable(String) + source_id: T.nilable(String), + status: FinchAPI::Introspection::Entity::Status::OrSymbol ).returns(T.attached_class) end def self.new( @@ -591,7 +596,9 @@ module FinchAPI # The name of the entity (payroll provider company name) name:, # The source ID of the entity - source_id: + source_id:, + # The status of the entity connection + status: ) end @@ -600,12 +607,68 @@ module FinchAPI { id: String, name: T.nilable(String), - source_id: T.nilable(String) + source_id: T.nilable(String), + status: FinchAPI::Introspection::Entity::Status::TaggedSymbol } ) end def to_hash end + + # The status of the entity connection + module Status + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, FinchAPI::Introspection::Entity::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :pending, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + PROCESSING = + T.let( + :processing, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + CONNECTED = + T.let( + :connected, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + ERROR_NO_ACCOUNT_SETUP = + T.let( + :error_no_account_setup, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + ERROR_PERMISSIONS = + T.let( + :error_permissions, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + REAUTH = + T.let( + :reauth, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + DISCONNECTED = + T.let( + :disconnected, + FinchAPI::Introspection::Entity::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[FinchAPI::Introspection::Entity::Status::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/sig/finch_api/models/introspection.rbs b/sig/finch_api/models/introspection.rbs index 67b250ee..0bc6aeca 100644 --- a/sig/finch_api/models/introspection.rbs +++ b/sig/finch_api/models/introspection.rbs @@ -262,7 +262,13 @@ module FinchAPI end end - type entity = { id: String, name: String?, source_id: String? } + type entity = + { + id: String, + name: String?, + source_id: String?, + status: FinchAPI::Models::Introspection::Entity::status + } class Entity < FinchAPI::Internal::Type::BaseModel attr_accessor id: String @@ -271,9 +277,44 @@ module FinchAPI attr_accessor source_id: String? - def initialize: (id: String, name: String?, source_id: String?) -> void + attr_accessor status: FinchAPI::Models::Introspection::Entity::status - def to_hash: -> { id: String, name: String?, source_id: String? } + def initialize: ( + id: String, + name: String?, + source_id: String?, + status: FinchAPI::Models::Introspection::Entity::status + ) -> void + + def to_hash: -> { + id: String, + name: String?, + source_id: String?, + status: FinchAPI::Models::Introspection::Entity::status + } + + type status = + :pending + | :processing + | :connected + | :error_no_account_setup + | :error_permissions + | :reauth + | :disconnected + + module Status + extend FinchAPI::Internal::Type::Enum + + PENDING: :pending + PROCESSING: :processing + CONNECTED: :connected + ERROR_NO_ACCOUNT_SETUP: :error_no_account_setup + ERROR_PERMISSIONS: :error_permissions + REAUTH: :reauth + DISCONNECTED: :disconnected + + def self?.values: -> ::Array[FinchAPI::Models::Introspection::Entity::status] + end end end end From 76c688f93a7a6bf6827baa4b1b06ad715826c491 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:27:54 +0000 Subject: [PATCH 26/46] fix(internal): correct multipart form field name encoding --- lib/finch_api/internal/util.rb | 3 +-- scripts/mock | 4 ++-- scripts/test | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 55677cf8..9183efaa 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -571,8 +571,7 @@ def encode_query_params(query) y << "Content-Disposition: form-data" unless key.nil? - name = ERB::Util.url_encode(key.to_s) - y << "; name=\"#{name}\"" + y << "; name=\"#{key}\"" end case val diff --git a/scripts/mock b/scripts/mock index 9ecceca0..4931f304 100755 --- a/scripts/mock +++ b/scripts/mock @@ -24,7 +24,7 @@ if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index d167e562..acff404e 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=brackets --validator-query-array-format=brackets --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From 919a302cbe51a3220f397bd77fa943eeb49a0922 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:47:41 +0000 Subject: [PATCH 27/46] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3855d3fa..91f464e0 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-94cd7551c2a8e8b2e491c9e8ca44387f2d1c7a498046dd60150f254316b20090.yml -openapi_spec_hash: c6f63a7d16d9ff16040c16a9633049fd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-63947213d9359808abc05e4c3cb53389325ca23c58d06bf293626f7d5d4fc2b8.yml +openapi_spec_hash: 50e4669590de9a411915a612615017d0 config_hash: d21a244fc073152c8dbecb8ece970209 From f892be499c5676f466ac47676d4106bb67f52f77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 17:48:10 +0000 Subject: [PATCH 28/46] chore(ci): support opting out of skipping builds on metadata-only commits --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c8619b0..d09d5c7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: |- github.repository == 'stainless-sdks/finch-ruby' && - (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && - (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') + (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 - name: Set up Ruby From 6fb5f11fe816634a6ea3267f5c10831b2f5a1058 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 13:28:01 +0000 Subject: [PATCH 29/46] chore(tests): bump steady to v0.20.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 4931f304..8b82c3e5 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.7 -- steady --version + npm exec --package=@stdy/cli@0.20.1 -- steady --version - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index acff404e..da76620d 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From a37acc5ccb90a944a7bb903befbf8a5faa60a32e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 19:22:00 +0000 Subject: [PATCH 30/46] chore(tests): bump steady to v0.20.2 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 8b82c3e5..886f2ffc 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.1 -- steady --version + npm exec --package=@stdy/cli@0.20.2 -- steady --version - npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index da76620d..9fc2510b 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From 09ceda237d92712263d0942f1deb8654afc18071 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 19:35:38 +0000 Subject: [PATCH 31/46] fix: variable name typo --- lib/finch_api/internal/util.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 9183efaa..6ec96615 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -157,7 +157,7 @@ def coerce_hash!(input) in Hash | nil => coerced coerced else - message = "Expected a #{Hash} or #{FinchAPI::Internal::Type::BaseModel}, got #{data.inspect}" + message = "Expected a #{Hash} or #{FinchAPI::Internal::Type::BaseModel}, got #{input.inspect}" raise ArgumentError.new(message) end end From 0a99d63c11aa9516a7cac12937d35972c9638f32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:47:34 +0000 Subject: [PATCH 32/46] fix: align path encoding with RFC 3986 section 3.3 --- lib/finch_api/internal/util.rb | 20 +++++++++++++++++--- rbi/finch_api/internal/util.rbi | 8 ++++++++ sig/finch_api/internal/util.rbs | 4 ++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 6ec96615..a103fded 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -237,6 +237,11 @@ def dig(data, pick, &blk) end end + # @type [Regexp] + # + # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3 + RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/ + class << self # @api private # @@ -247,6 +252,15 @@ def uri_origin(uri) "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}" end + # @api private + # + # @param path [String, Integer] + # + # @return [String] + def encode_path(path) + path.to_s.gsub(FinchAPI::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) } + end + # @api private # # @param path [String, Array] @@ -259,7 +273,7 @@ def interpolate_path(path) in [] "" in [String => p, *interpolations] - encoded = interpolations.map { ERB::Util.url_encode(_1) } + encoded = interpolations.map { encode_path(_1) } format(p, *encoded) end end @@ -576,10 +590,10 @@ def encode_query_params(query) case val in FinchAPI::FilePart unless val.filename.nil? - filename = ERB::Util.url_encode(val.filename) + filename = encode_path(val.filename) y << "; filename=\"#{filename}\"" in Pathname | IO - filename = ERB::Util.url_encode(::File.basename(val.to_path)) + filename = encode_path(::File.basename(val.to_path)) y << "; filename=\"#{filename}\"" else end diff --git a/rbi/finch_api/internal/util.rbi b/rbi/finch_api/internal/util.rbi index 06b3b92b..f49c2164 100644 --- a/rbi/finch_api/internal/util.rbi +++ b/rbi/finch_api/internal/util.rbi @@ -148,12 +148,20 @@ module FinchAPI end end + # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3 + RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp) + class << self # @api private sig { params(uri: URI::Generic).returns(String) } def uri_origin(uri) end + # @api private + sig { params(path: T.any(String, Integer)).returns(String) } + def encode_path(path) + end + # @api private sig { params(path: T.any(String, T::Array[String])).returns(String) } def interpolate_path(path) diff --git a/sig/finch_api/internal/util.rbs b/sig/finch_api/internal/util.rbs index a074d555..cf6dc272 100644 --- a/sig/finch_api/internal/util.rbs +++ b/sig/finch_api/internal/util.rbs @@ -45,8 +45,12 @@ module FinchAPI -> top? } -> top? + RFC_3986_NOT_PCHARS: Regexp + def self?.uri_origin: (URI::Generic uri) -> String + def self?.encode_path: (String | Integer path) -> String + def self?.interpolate_path: (String | ::Array[String] path) -> String def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]] From 13e7bc161a931d7a13128cb32d4bd2cc859784b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 20:05:38 +0000 Subject: [PATCH 33/46] fix: multipart encoding for file arrays --- lib/finch_api/internal/util.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index a103fded..f6cf98f5 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -610,6 +610,7 @@ def encode_query_params(query) # # @return [Array(String, Enumerable)] private def encode_multipart_streaming(body) + # rubocop:disable Style/CaseEquality # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length boundary = SecureRandom.urlsafe_base64(46) @@ -619,7 +620,7 @@ def encode_query_params(query) in Hash body.each do |key, val| case val - in Array if val.all? { primitive?(_1) } + in Array if val.all? { primitive?(_1) || FinchAPI::Internal::Type::FileInput === _1 } val.each do |v| write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing) end @@ -635,6 +636,7 @@ def encode_query_params(query) fused_io = fused_enum(strio) { closing.each(&:call) } [boundary, fused_io] + # rubocop:enable Style/CaseEquality end # @api private From 44969816152b1033dc51052723d552de315c6c9d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 18:12:51 +0000 Subject: [PATCH 34/46] feat(api): api update --- .stats.yml | 2 +- lib/finch_api/models/connect/session_new_params.rb | 7 ++++--- .../models/connect/session_reauthenticate_params.rb | 7 ++++--- lib/finch_api/resources/connect/sessions.rb | 4 ++-- rbi/finch_api/models/connect/session_new_params.rbi | 9 ++++++--- .../models/connect/session_reauthenticate_params.rbi | 9 ++++++--- rbi/finch_api/resources/connect/sessions.rbi | 8 ++++++-- 7 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91f464e0..957ae7a5 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-63947213d9359808abc05e4c3cb53389325ca23c58d06bf293626f7d5d4fc2b8.yml -openapi_spec_hash: 50e4669590de9a411915a612615017d0 +openapi_spec_hash: fe60fcf302d80a604a49ec1bf5068881 config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/lib/finch_api/models/connect/session_new_params.rb b/lib/finch_api/models/connect/session_new_params.rb index d42fea1b..fa6fb964 100644 --- a/lib/finch_api/models/connect/session_new_params.rb +++ b/lib/finch_api/models/connect/session_new_params.rb @@ -21,7 +21,9 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel required :customer_name, String # @!attribute products - # The Finch products to request access to + # The Finch products to request access to. Use `benefits` to access deductions + # endpoints — `deduction` is a deprecated alias that is still accepted but should + # not be combined with `benefits`. # # @return [Array] required :products, @@ -72,7 +74,7 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # # @param customer_name [String] Name of the customer # - # @param products [Array] The Finch products to request access to + # @param products [Array] The Finch products to request access to. Use `benefits` to access deductions end # # @param customer_email [String, nil] Email address of the customer # @@ -88,7 +90,6 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # The Finch products that can be requested during the Connect flow. module Product extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/models/connect/session_reauthenticate_params.rb b/lib/finch_api/models/connect/session_reauthenticate_params.rb index 638d108b..fd2856ba 100644 --- a/lib/finch_api/models/connect/session_reauthenticate_params.rb +++ b/lib/finch_api/models/connect/session_reauthenticate_params.rb @@ -22,7 +22,9 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel optional :minutes_to_expire, Integer # @!attribute products - # The products to request access to (optional for reauthentication) + # The products to request access to (optional for reauthentication). Use + # `benefits` to access deductions endpoints — `deduction` is a deprecated alias + # that is still accepted but should not be combined with `benefits`. # # @return [Array, nil] optional :products, @@ -45,13 +47,12 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel # # @param minutes_to_expire [Integer] The number of minutes until the session expires (defaults to 43,200, which is 30 # - # @param products [Array, nil] The products to request access to (optional for reauthentication) + # @param products [Array, nil] The products to request access to (optional for reauthentication). Use `benefits # # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - # The Finch products that can be requested during the Connect flow. module Product extend FinchAPI::Internal::Type::Enum diff --git a/lib/finch_api/resources/connect/sessions.rb b/lib/finch_api/resources/connect/sessions.rb index 625186cd..392801b7 100644 --- a/lib/finch_api/resources/connect/sessions.rb +++ b/lib/finch_api/resources/connect/sessions.rb @@ -15,7 +15,7 @@ class Sessions # # @param customer_name [String] Name of the customer # - # @param products [Array] The Finch products to request access to + # @param products [Array] The Finch products to request access to. Use `benefits` to access deductions end # # @param customer_email [String, nil] Email address of the customer # @@ -57,7 +57,7 @@ def new(params) # # @param minutes_to_expire [Integer] The number of minutes until the session expires (defaults to 43,200, which is 30 # - # @param products [Array, nil] The products to request access to (optional for reauthentication) + # @param products [Array, nil] The products to request access to (optional for reauthentication). Use `benefits # # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed # diff --git a/rbi/finch_api/models/connect/session_new_params.rbi b/rbi/finch_api/models/connect/session_new_params.rbi index de4f214d..58d4dc90 100644 --- a/rbi/finch_api/models/connect/session_new_params.rbi +++ b/rbi/finch_api/models/connect/session_new_params.rbi @@ -23,7 +23,9 @@ module FinchAPI sig { returns(String) } attr_accessor :customer_name - # The Finch products to request access to + # The Finch products to request access to. Use `benefits` to access deductions + # endpoints — `deduction` is a deprecated alias that is still accepted but should + # not be combined with `benefits`. sig do returns( T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol] @@ -96,7 +98,9 @@ module FinchAPI customer_id:, # Name of the customer customer_name:, - # The Finch products to request access to + # The Finch products to request access to. Use `benefits` to access deductions + # endpoints — `deduction` is a deprecated alias that is still accepted but should + # not be combined with `benefits`. products:, # Email address of the customer customer_email: nil, @@ -141,7 +145,6 @@ module FinchAPI def to_hash end - # The Finch products that can be requested during the Connect flow. module Product extend FinchAPI::Internal::Type::Enum diff --git a/rbi/finch_api/models/connect/session_reauthenticate_params.rbi b/rbi/finch_api/models/connect/session_reauthenticate_params.rbi index e47555a4..8c22c1b8 100644 --- a/rbi/finch_api/models/connect/session_reauthenticate_params.rbi +++ b/rbi/finch_api/models/connect/session_reauthenticate_params.rbi @@ -27,7 +27,9 @@ module FinchAPI sig { params(minutes_to_expire: Integer).void } attr_writer :minutes_to_expire - # The products to request access to (optional for reauthentication) + # The products to request access to (optional for reauthentication). Use + # `benefits` to access deductions endpoints — `deduction` is a deprecated alias + # that is still accepted but should not be combined with `benefits`. sig do returns( T.nilable( @@ -63,7 +65,9 @@ module FinchAPI # The number of minutes until the session expires (defaults to 43,200, which is 30 # days) minutes_to_expire: nil, - # The products to request access to (optional for reauthentication) + # The products to request access to (optional for reauthentication). Use + # `benefits` to access deductions endpoints — `deduction` is a deprecated alias + # that is still accepted but should not be combined with `benefits`. products: nil, # The URI to redirect to after the Connect flow is completed redirect_uri: nil, @@ -90,7 +94,6 @@ module FinchAPI def to_hash end - # The Finch products that can be requested during the Connect flow. module Product extend FinchAPI::Internal::Type::Enum diff --git a/rbi/finch_api/resources/connect/sessions.rbi b/rbi/finch_api/resources/connect/sessions.rbi index 4975322f..d53b2844 100644 --- a/rbi/finch_api/resources/connect/sessions.rbi +++ b/rbi/finch_api/resources/connect/sessions.rbi @@ -29,7 +29,9 @@ module FinchAPI customer_id:, # Name of the customer customer_name:, - # The Finch products to request access to + # The Finch products to request access to. Use `benefits` to access deductions + # endpoints — `deduction` is a deprecated alias that is still accepted but should + # not be combined with `benefits`. products:, # Email address of the customer customer_email: nil, @@ -69,7 +71,9 @@ module FinchAPI # The number of minutes until the session expires (defaults to 43,200, which is 30 # days) minutes_to_expire: nil, - # The products to request access to (optional for reauthentication) + # The products to request access to (optional for reauthentication). Use + # `benefits` to access deductions endpoints — `deduction` is a deprecated alias + # that is still accepted but should not be combined with `benefits`. products: nil, # The URI to redirect to after the Connect flow is completed redirect_uri: nil, From aba6cae082021231c9318169e6c379aa1e06a7f3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 19:57:23 +0000 Subject: [PATCH 35/46] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 957ae7a5..5b71b33a 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-63947213d9359808abc05e4c3cb53389325ca23c58d06bf293626f7d5d4fc2b8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-a1778dd040aadddb53b90df5959043d17a5c9899f82c9c7188cd0be810426dc3.yml openapi_spec_hash: fe60fcf302d80a604a49ec1bf5068881 config_hash: d21a244fc073152c8dbecb8ece970209 From ee649a8915029f8bce8e676d7af80bbfe5846c61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 23:14:47 +0000 Subject: [PATCH 36/46] feat(api): api update --- .stats.yml | 4 ++-- lib/finch_api/models/job_completion_event.rb | 3 +++ rbi/finch_api/models/job_completion_event.rbi | 15 +++++++++++++++ sig/finch_api/models/job_completion_event.rbs | 6 ++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5b71b33a..f9692078 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-a1778dd040aadddb53b90df5959043d17a5c9899f82c9c7188cd0be810426dc3.yml -openapi_spec_hash: fe60fcf302d80a604a49ec1bf5068881 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-b7c6baf733d255185a9767935a4eaa54f36678b641606cfb74a3050b67c59e9b.yml +openapi_spec_hash: e36cb22b7a3340ee040f8479636bb878 config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/lib/finch_api/models/job_completion_event.rb b/lib/finch_api/models/job_completion_event.rb index 1ef8bf2a..59ab261b 100644 --- a/lib/finch_api/models/job_completion_event.rb +++ b/lib/finch_api/models/job_completion_event.rb @@ -45,6 +45,9 @@ module EventType JOB_BENEFIT_UNENROLL_COMPLETED = :"job.benefit_unenroll.completed" JOB_BENEFIT_UPDATE_COMPLETED = :"job.benefit_update.completed" JOB_DATA_SYNC_ALL_COMPLETED = :"job.data_sync_all.completed" + JOB_W4_FORM_EMPLOYEE_SYNC_COMPLETED = :"job.w4_form_employee_sync.completed" + JOB_INITIAL_DATA_SYNC_ORG_SUCCEEDED = :"job.initial_data_sync_org.succeeded" + JOB_INITIAL_DATA_SYNC_PAYROLL_SUCCEEDED = :"job.initial_data_sync_payroll.succeeded" # @!method self.values # @return [Array] diff --git a/rbi/finch_api/models/job_completion_event.rbi b/rbi/finch_api/models/job_completion_event.rbi index d3bda9ec..9d124aaf 100644 --- a/rbi/finch_api/models/job_completion_event.rbi +++ b/rbi/finch_api/models/job_completion_event.rbi @@ -120,6 +120,21 @@ module FinchAPI :"job.data_sync_all.completed", FinchAPI::JobCompletionEvent::EventType::TaggedSymbol ) + JOB_W4_FORM_EMPLOYEE_SYNC_COMPLETED = + T.let( + :"job.w4_form_employee_sync.completed", + FinchAPI::JobCompletionEvent::EventType::TaggedSymbol + ) + JOB_INITIAL_DATA_SYNC_ORG_SUCCEEDED = + T.let( + :"job.initial_data_sync_org.succeeded", + FinchAPI::JobCompletionEvent::EventType::TaggedSymbol + ) + JOB_INITIAL_DATA_SYNC_PAYROLL_SUCCEEDED = + T.let( + :"job.initial_data_sync_payroll.succeeded", + FinchAPI::JobCompletionEvent::EventType::TaggedSymbol + ) sig do override.returns( diff --git a/sig/finch_api/models/job_completion_event.rbs b/sig/finch_api/models/job_completion_event.rbs index 94d57afe..651dbd92 100644 --- a/sig/finch_api/models/job_completion_event.rbs +++ b/sig/finch_api/models/job_completion_event.rbs @@ -48,6 +48,9 @@ module FinchAPI | :"job.benefit_unenroll.completed" | :"job.benefit_update.completed" | :"job.data_sync_all.completed" + | :"job.w4_form_employee_sync.completed" + | :"job.initial_data_sync_org.succeeded" + | :"job.initial_data_sync_payroll.succeeded" module EventType extend FinchAPI::Internal::Type::Enum @@ -58,6 +61,9 @@ module FinchAPI JOB_BENEFIT_UNENROLL_COMPLETED: :"job.benefit_unenroll.completed" JOB_BENEFIT_UPDATE_COMPLETED: :"job.benefit_update.completed" JOB_DATA_SYNC_ALL_COMPLETED: :"job.data_sync_all.completed" + JOB_W4_FORM_EMPLOYEE_SYNC_COMPLETED: :"job.w4_form_employee_sync.completed" + JOB_INITIAL_DATA_SYNC_ORG_SUCCEEDED: :"job.initial_data_sync_org.succeeded" + JOB_INITIAL_DATA_SYNC_PAYROLL_SUCCEEDED: :"job.initial_data_sync_payroll.succeeded" def self?.values: -> ::Array[FinchAPI::Models::JobCompletionEvent::event_type] end From 582e669ac39599bd86c77b66c2bafcd0b4204ace Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 19:53:54 +0000 Subject: [PATCH 37/46] chore(tests): bump steady to v0.22.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 886f2ffc..04d29019 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.2 -- steady --version + npm exec --package=@stdy/cli@0.22.1 -- steady --version - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 9fc2510b..ad94c14b 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From 6be623fd1d3ddf902856844d74be66cf00b84195 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:54:01 +0000 Subject: [PATCH 38/46] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 34878642..a5e1b80a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From d0d32b0861ed65a60d1636da5cc37c5052ca7e28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 16:45:18 +0000 Subject: [PATCH 39/46] feat(api): api update --- .stats.yml | 4 ++-- lib/finch_api/models/base_webhook_event.rb | 10 +++++++++- rbi/finch_api/models/base_webhook_event.rbi | 21 ++++++++++++++++++--- sig/finch_api/models/base_webhook_event.rbs | 17 ++++++++++++++--- 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index f9692078..9d95cc59 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-b7c6baf733d255185a9767935a4eaa54f36678b641606cfb74a3050b67c59e9b.yml -openapi_spec_hash: e36cb22b7a3340ee040f8479636bb878 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-929f30a5a8ed80d2d5def22f9f52464b578a8924db0c2e37bb31f836181aa679.yml +openapi_spec_hash: 7559424a86d6c7768cee9c650d0c156c config_hash: d21a244fc073152c8dbecb8ece970209 diff --git a/lib/finch_api/models/base_webhook_event.rb b/lib/finch_api/models/base_webhook_event.rb index 9f6ecab9..ac6eef04 100644 --- a/lib/finch_api/models/base_webhook_event.rb +++ b/lib/finch_api/models/base_webhook_event.rb @@ -28,7 +28,13 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :connection_id, String - # @!method initialize(account_id:, company_id:, connection_id: nil) + # @!attribute entity_id + # Unique Finch id of the entity for which data has been updated. + # + # @return [String, nil] + optional :entity_id, String + + # @!method initialize(account_id:, company_id:, connection_id: nil, entity_id: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::BaseWebhookEvent} for more details. # @@ -37,6 +43,8 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @param company_id [String] [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use # # @param connection_id [String] Unique Finch ID of the connection associated with the webhook event. + # + # @param entity_id [String] Unique Finch id of the entity for which data has been updated. end end end diff --git a/rbi/finch_api/models/base_webhook_event.rbi b/rbi/finch_api/models/base_webhook_event.rbi index 57f1e84d..abcb661e 100644 --- a/rbi/finch_api/models/base_webhook_event.rbi +++ b/rbi/finch_api/models/base_webhook_event.rbi @@ -26,11 +26,19 @@ module FinchAPI sig { params(connection_id: String).void } attr_writer :connection_id + # Unique Finch id of the entity for which data has been updated. + sig { returns(T.nilable(String)) } + attr_reader :entity_id + + sig { params(entity_id: String).void } + attr_writer :entity_id + sig do params( account_id: String, company_id: String, - connection_id: String + connection_id: String, + entity_id: String ).returns(T.attached_class) end def self.new( @@ -42,13 +50,20 @@ module FinchAPI # `connection_id` instead to identify the connection associated with this event. company_id:, # Unique Finch ID of the connection associated with the webhook event. - connection_id: nil + connection_id: nil, + # Unique Finch id of the entity for which data has been updated. + entity_id: nil ) end sig do override.returns( - { account_id: String, company_id: String, connection_id: String } + { + account_id: String, + company_id: String, + connection_id: String, + entity_id: String + } ) end def to_hash diff --git a/sig/finch_api/models/base_webhook_event.rbs b/sig/finch_api/models/base_webhook_event.rbs index d986f5b6..9c837a21 100644 --- a/sig/finch_api/models/base_webhook_event.rbs +++ b/sig/finch_api/models/base_webhook_event.rbs @@ -1,7 +1,12 @@ module FinchAPI module Models type base_webhook_event = - { account_id: String, company_id: String, connection_id: String } + { + account_id: String, + company_id: String, + connection_id: String, + entity_id: String + } class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel attr_accessor account_id: String @@ -12,16 +17,22 @@ module FinchAPI def connection_id=: (String) -> String + attr_reader entity_id: String? + + def entity_id=: (String) -> String + def initialize: ( account_id: String, company_id: String, - ?connection_id: String + ?connection_id: String, + ?entity_id: String ) -> void def to_hash: -> { account_id: String, company_id: String, - connection_id: String + connection_id: String, + entity_id: String } end end From d563eb54c98253fff9a54c05632c7f4c19f1616c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:31:05 +0000 Subject: [PATCH 40/46] feat: support setting headers via env --- lib/finch_api/client.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/finch_api/client.rb b/lib/finch_api/client.rb index 8a859282..9927358f 100644 --- a/lib/finch_api/client.rb +++ b/lib/finch_api/client.rb @@ -121,6 +121,17 @@ def initialize( headers = { "finch-api-version" => "2020-09-17" } + custom_headers_env = ENV["FINCH_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end @client_id = client_id&.to_s @client_secret = client_secret&.to_s From 78f8bf61bd35a652bd235505e7faa888db16cfa2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:21:54 +0000 Subject: [PATCH 41/46] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9d95cc59..de76a32b 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-929f30a5a8ed80d2d5def22f9f52464b578a8924db0c2e37bb31f836181aa679.yml -openapi_spec_hash: 7559424a86d6c7768cee9c650d0c156c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-b7c6baf733d255185a9767935a4eaa54f36678b641606cfb74a3050b67c59e9b.yml +openapi_spec_hash: e36cb22b7a3340ee040f8479636bb878 config_hash: d21a244fc073152c8dbecb8ece970209 From 3d5cf2fde4f02b8b29d07e2ccb98117ddfc75f74 Mon Sep 17 00:00:00 2001 From: meorphis Date: Wed, 29 Apr 2026 14:27:08 -0400 Subject: [PATCH 42/46] chore: fix custom code --- lib/finch_api/models/base_webhook_event.rb | 10 +--------- rbi/finch_api/models/base_webhook_event.rbi | 21 +++------------------ sig/finch_api/models/base_webhook_event.rbs | 17 +++-------------- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/lib/finch_api/models/base_webhook_event.rb b/lib/finch_api/models/base_webhook_event.rb index ac6eef04..9f6ecab9 100644 --- a/lib/finch_api/models/base_webhook_event.rb +++ b/lib/finch_api/models/base_webhook_event.rb @@ -28,13 +28,7 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :connection_id, String - # @!attribute entity_id - # Unique Finch id of the entity for which data has been updated. - # - # @return [String, nil] - optional :entity_id, String - - # @!method initialize(account_id:, company_id:, connection_id: nil, entity_id: nil) + # @!method initialize(account_id:, company_id:, connection_id: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::BaseWebhookEvent} for more details. # @@ -43,8 +37,6 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @param company_id [String] [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use # # @param connection_id [String] Unique Finch ID of the connection associated with the webhook event. - # - # @param entity_id [String] Unique Finch id of the entity for which data has been updated. end end end diff --git a/rbi/finch_api/models/base_webhook_event.rbi b/rbi/finch_api/models/base_webhook_event.rbi index abcb661e..57f1e84d 100644 --- a/rbi/finch_api/models/base_webhook_event.rbi +++ b/rbi/finch_api/models/base_webhook_event.rbi @@ -26,19 +26,11 @@ module FinchAPI sig { params(connection_id: String).void } attr_writer :connection_id - # Unique Finch id of the entity for which data has been updated. - sig { returns(T.nilable(String)) } - attr_reader :entity_id - - sig { params(entity_id: String).void } - attr_writer :entity_id - sig do params( account_id: String, company_id: String, - connection_id: String, - entity_id: String + connection_id: String ).returns(T.attached_class) end def self.new( @@ -50,20 +42,13 @@ module FinchAPI # `connection_id` instead to identify the connection associated with this event. company_id:, # Unique Finch ID of the connection associated with the webhook event. - connection_id: nil, - # Unique Finch id of the entity for which data has been updated. - entity_id: nil + connection_id: nil ) end sig do override.returns( - { - account_id: String, - company_id: String, - connection_id: String, - entity_id: String - } + { account_id: String, company_id: String, connection_id: String } ) end def to_hash diff --git a/sig/finch_api/models/base_webhook_event.rbs b/sig/finch_api/models/base_webhook_event.rbs index 9c837a21..d986f5b6 100644 --- a/sig/finch_api/models/base_webhook_event.rbs +++ b/sig/finch_api/models/base_webhook_event.rbs @@ -1,12 +1,7 @@ module FinchAPI module Models type base_webhook_event = - { - account_id: String, - company_id: String, - connection_id: String, - entity_id: String - } + { account_id: String, company_id: String, connection_id: String } class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel attr_accessor account_id: String @@ -17,22 +12,16 @@ module FinchAPI def connection_id=: (String) -> String - attr_reader entity_id: String? - - def entity_id=: (String) -> String - def initialize: ( account_id: String, company_id: String, - ?connection_id: String, - ?entity_id: String + ?connection_id: String ) -> void def to_hash: -> { account_id: String, company_id: String, - connection_id: String, - entity_id: String + connection_id: String } end end From 4821ce43e03b8fdb432e1e14bf34a616fd8e366d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:24:37 +0000 Subject: [PATCH 43/46] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index de76a32b..7db9d474 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/finch-b7c6baf733d255185a9767935a4eaa54f36678b641606cfb74a3050b67c59e9b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-06490734f80b4976ed7624fe2fe3ca118ed1ffff017681ce7d5a67d0b51e297b.yml openapi_spec_hash: e36cb22b7a3340ee040f8479636bb878 config_hash: d21a244fc073152c8dbecb8ece970209 From de40fd771fe09e381c1439f3c9efd1c5d075572c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 20:45:00 +0000 Subject: [PATCH 44/46] feat(api): change auth to npm to oidc as described in https://www.stainless.com/docs/sdks/typescript/#publishing-to-npm --- .stats.yml | 6 +++--- lib/finch_api/models/base_webhook_event.rb | 10 +++++++++- rbi/finch_api/models/base_webhook_event.rbi | 21 ++++++++++++++++++--- sig/finch_api/models/base_webhook_event.rbs | 17 ++++++++++++++--- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7db9d474..09d5b6a9 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/finch-06490734f80b4976ed7624fe2fe3ca118ed1ffff017681ce7d5a67d0b51e297b.yml -openapi_spec_hash: e36cb22b7a3340ee040f8479636bb878 -config_hash: d21a244fc073152c8dbecb8ece970209 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-9df6cda4c8e1134b03b91173b0ba39eb902d8a2d7db5197c2a54b2edafb6b40b.yml +openapi_spec_hash: 7559424a86d6c7768cee9c650d0c156c +config_hash: 429708b67ee9e80003db82611677296c diff --git a/lib/finch_api/models/base_webhook_event.rb b/lib/finch_api/models/base_webhook_event.rb index 9f6ecab9..ac6eef04 100644 --- a/lib/finch_api/models/base_webhook_event.rb +++ b/lib/finch_api/models/base_webhook_event.rb @@ -28,7 +28,13 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :connection_id, String - # @!method initialize(account_id:, company_id:, connection_id: nil) + # @!attribute entity_id + # Unique Finch id of the entity for which data has been updated. + # + # @return [String, nil] + optional :entity_id, String + + # @!method initialize(account_id:, company_id:, connection_id: nil, entity_id: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::BaseWebhookEvent} for more details. # @@ -37,6 +43,8 @@ class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel # @param company_id [String] [DEPRECATED] Unique Finch ID of the company for which data has been updated. Use # # @param connection_id [String] Unique Finch ID of the connection associated with the webhook event. + # + # @param entity_id [String] Unique Finch id of the entity for which data has been updated. end end end diff --git a/rbi/finch_api/models/base_webhook_event.rbi b/rbi/finch_api/models/base_webhook_event.rbi index 57f1e84d..abcb661e 100644 --- a/rbi/finch_api/models/base_webhook_event.rbi +++ b/rbi/finch_api/models/base_webhook_event.rbi @@ -26,11 +26,19 @@ module FinchAPI sig { params(connection_id: String).void } attr_writer :connection_id + # Unique Finch id of the entity for which data has been updated. + sig { returns(T.nilable(String)) } + attr_reader :entity_id + + sig { params(entity_id: String).void } + attr_writer :entity_id + sig do params( account_id: String, company_id: String, - connection_id: String + connection_id: String, + entity_id: String ).returns(T.attached_class) end def self.new( @@ -42,13 +50,20 @@ module FinchAPI # `connection_id` instead to identify the connection associated with this event. company_id:, # Unique Finch ID of the connection associated with the webhook event. - connection_id: nil + connection_id: nil, + # Unique Finch id of the entity for which data has been updated. + entity_id: nil ) end sig do override.returns( - { account_id: String, company_id: String, connection_id: String } + { + account_id: String, + company_id: String, + connection_id: String, + entity_id: String + } ) end def to_hash diff --git a/sig/finch_api/models/base_webhook_event.rbs b/sig/finch_api/models/base_webhook_event.rbs index d986f5b6..9c837a21 100644 --- a/sig/finch_api/models/base_webhook_event.rbs +++ b/sig/finch_api/models/base_webhook_event.rbs @@ -1,7 +1,12 @@ module FinchAPI module Models type base_webhook_event = - { account_id: String, company_id: String, connection_id: String } + { + account_id: String, + company_id: String, + connection_id: String, + entity_id: String + } class BaseWebhookEvent < FinchAPI::Internal::Type::BaseModel attr_accessor account_id: String @@ -12,16 +17,22 @@ module FinchAPI def connection_id=: (String) -> String + attr_reader entity_id: String? + + def entity_id=: (String) -> String + def initialize: ( account_id: String, company_id: String, - ?connection_id: String + ?connection_id: String, + ?entity_id: String ) -> void def to_hash: -> { account_id: String, company_id: String, - connection_id: String + connection_id: String, + entity_id: String } end end From 2a1f82f3af8070b630bb9ba9f10cd9b6f91a02eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 16:40:50 +0000 Subject: [PATCH 45/46] feat(api): api update --- .stats.yml | 4 +- .../models/hris/benefit_contribution.rb | 47 +++--- .../hris/benefits/individual_benefit.rb | 122 +++++++-------- lib/finch_api/models/hris/employment_data.rb | 78 +++++----- .../models/hris/employment_data_response.rb | 4 +- lib/finch_api/models/hris/individual.rb | 56 ++++--- .../models/hris/individual_response.rb | 4 +- .../models/hris/benefit_contribution.rbi | 64 ++++---- .../hris/benefits/individual_benefit.rbi | 142 +++++++++--------- rbi/finch_api/models/hris/employment_data.rbi | 128 ++++++++-------- .../models/hris/employment_data_response.rbi | 2 +- rbi/finch_api/models/hris/individual.rbi | 101 ++++++------- .../models/hris/individual_response.rbi | 2 +- .../models/hris/benefit_contribution.rbs | 56 +++---- .../hris/benefits/individual_benefit.rbs | 124 +++++++-------- sig/finch_api/models/hris/employment_data.rbs | 88 +++++------ sig/finch_api/models/hris/individual.rbs | 62 ++++---- 17 files changed, 540 insertions(+), 544 deletions(-) diff --git a/.stats.yml b/.stats.yml index 09d5b6a9..0681ca46 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/finch-9df6cda4c8e1134b03b91173b0ba39eb902d8a2d7db5197c2a54b2edafb6b40b.yml -openapi_spec_hash: 7559424a86d6c7768cee9c650d0c156c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-c8a0d5eca390ea3ab6e8b5b7d9b46d9a22e34d81aeab444c8ce1b5a94eba0028.yml +openapi_spec_hash: e261a3289242d3ad52542f1491a903ee config_hash: 429708b67ee9e80003db82611677296c diff --git a/lib/finch_api/models/hris/benefit_contribution.rb b/lib/finch_api/models/hris/benefit_contribution.rb index 1e36298f..cf50206a 100644 --- a/lib/finch_api/models/hris/benefit_contribution.rb +++ b/lib/finch_api/models/hris/benefit_contribution.rb @@ -6,13 +6,13 @@ module HRIS module BenefitContribution extend FinchAPI::Internal::Type::Union - variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember0 } + variant -> { FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed } - variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember1 } + variant -> { FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent } - variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember2 } + variant -> { FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionFixed < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Contribution amount in cents. # @@ -22,17 +22,17 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute type # Fixed contribution type. # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] - required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember0::Type } + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::Type] + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type } # @!method initialize(amount:, type:) # @param amount [Integer] Contribution amount in cents. # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] Fixed contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::Type] Fixed contribution type. # Fixed contribution type. # - # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember0#type + # @see FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed#type module Type extend FinchAPI::Internal::Type::Enum @@ -43,7 +43,7 @@ module Type end end - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionPercent < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Contribution amount in basis points (1/100th of a percent). # @@ -53,17 +53,17 @@ class UnionMember1 < FinchAPI::Internal::Type::BaseModel # @!attribute type # Percentage contribution type. # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] - required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember1::Type } + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::Type] + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type } # @!method initialize(amount:, type:) # @param amount [Integer] Contribution amount in basis points (1/100th of a percent). # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] Percentage contribution type. + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::Type] Percentage contribution type. # Percentage contribution type. # - # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember1#type + # @see FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent#type module Type extend FinchAPI::Internal::Type::Enum @@ -74,28 +74,29 @@ module Type end end - class UnionMember2 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionTiered < FinchAPI::Internal::Type::BaseModel # @!attribute tiers # Array of tier objects defining employer match tiers based on employee # contribution thresholds. # - # @return [Array] + # @return [Array] required :tiers, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] } + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier] } # @!attribute type # Tiered contribution type (only valid for company_contribution). # - # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] - required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember2::Type } + # @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::Type] + required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type } # @!method initialize(tiers:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::BenefitContribution::UnionMember2} for more details. + # {FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered} for + # more details. # - # @param tiers [Array] Array of tier objects defining employer match tiers based on employee contributi + # @param tiers [Array] Array of tier objects defining employer match tiers based on employee contributi # - # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] Tiered contribution type (only valid for company_contribution). + # @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::Type] Tiered contribution type (only valid for company_contribution). class Tier < FinchAPI::Internal::Type::BaseModel # @!attribute match @@ -115,7 +116,7 @@ class Tier < FinchAPI::Internal::Type::BaseModel # Tiered contribution type (only valid for company_contribution). # - # @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember2#type + # @see FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered#type module Type extend FinchAPI::Internal::Type::Enum @@ -127,7 +128,7 @@ module Type end # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::BenefitContribution::UnionMember0, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2)] + # @return [Array(FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent, FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered)] end end end diff --git a/lib/finch_api/models/hris/benefits/individual_benefit.rb b/lib/finch_api/models/hris/benefits/individual_benefit.rb index 5fb82617..b1557b0c 100644 --- a/lib/finch_api/models/hris/benefits/individual_benefit.rb +++ b/lib/finch_api/models/hris/benefits/individual_benefit.rb @@ -8,7 +8,7 @@ module Benefits class IndividualBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError] required :body, union: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body } # @!attribute code @@ -22,7 +22,7 @@ class IndividualBenefit < FinchAPI::Internal::Type::BaseModel required :individual_id, String # @!method initialize(body:, code:, individual_id:) - # @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError] + # @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError] # @param code [Integer] # @param individual_id [String] @@ -30,11 +30,11 @@ class IndividualBenefit < FinchAPI::Internal::Type::BaseModel module Body extend FinchAPI::Internal::Type::Union - variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0 } + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit } variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class IndividualBenefit < FinchAPI::Internal::Type::BaseModel # @!attribute annual_maximum # If the benefit supports annual maximum, the amount in cents for this individual. # @@ -53,10 +53,10 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # 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] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered, nil] required :company_contribution, union: -> { - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution }, nil?: true @@ -64,53 +64,53 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # 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] + # @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent, nil] required :employee_deduction, union: -> { - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction }, nil?: true # @!attribute hsa_contribution_limit # Type for HSA contribution limit if the benefit is a HSA. # - # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit, nil] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit, nil] optional :hsa_contribution_limit, enum: -> { - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit }, nil?: true # @!method initialize(annual_maximum:, catch_up:, company_contribution:, employee_deduction:, hsa_contribution_limit: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0} for - # more details. + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit} + # for more details. # # @param annual_maximum [Integer, nil] If the benefit supports annual maximum, the amount in cents for this individual. # # @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled # - # @param company_contribution [FinchAPI::Models::HRIS::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 company_contribution [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered, 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] Employee deduction configuration. Supports both fixed amounts (in cents) and per + # @param employee_deduction [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent, 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. + # @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit#company_contribution module CompanyContribution extend FinchAPI::Internal::Type::Union - variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0 } + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed } - variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1 } + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent } - variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2 } + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionFixed < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Contribution amount in cents (for type=fixed) or basis points (for type=percent, # where 100 = 1%). Not used for type=tiered. @@ -122,23 +122,23 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # 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] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type] required :type, - enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type } + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type } # @!method initialize(amount:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0} + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed} # 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] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun # 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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed#type module Type extend FinchAPI::Internal::Type::Enum @@ -149,7 +149,7 @@ module Type end end - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionPercent < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Contribution amount in cents (for type=fixed) or basis points (for type=percent, # where 100 = 1%). Not used for type=tiered. @@ -161,23 +161,23 @@ class UnionMember1 < FinchAPI::Internal::Type::BaseModel # 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] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type] required :type, - enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type } + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type } # @!method initialize(amount:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1} + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent} # 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] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun # 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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent#type module Type extend FinchAPI::Internal::Type::Enum @@ -188,31 +188,35 @@ module Type end end - class UnionMember2 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionTiered < FinchAPI::Internal::Type::BaseModel # @!attribute tiers # Array of tier objects defining employer match tiers based on employee # contribution thresholds. Required when type=tiered. # - # @return [Array] + # @return [Array] required :tiers, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier] } + -> do + FinchAPI::Internal::Type::ArrayOf[ + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier + ] + end # @!attribute 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::UnionMember2::Type] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type] required :type, - enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type } + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type } # @!method initialize(tiers:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2} + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered} # for more details. # - # @param tiers [Array] Array of tier objects defining employer match tiers based on employee contributi + # @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] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type] Contribution type. Supported values: "fixed" (amount in cents), "percent" (amoun class Tier < FinchAPI::Internal::Type::BaseModel # @!attribute match @@ -233,7 +237,7 @@ class Tier < FinchAPI::Internal::Type::BaseModel # 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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered#type module Type extend FinchAPI::Internal::Type::Enum @@ -245,21 +249,21 @@ module Type end # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2)] + # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered)] 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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit#employee_deduction module EmployeeDeduction extend FinchAPI::Internal::Type::Union - variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0 } + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed } - variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1 } + variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class EmployeeDeductionContributionFixed < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Contribution amount in cents (for type=fixed) or basis points (for type=percent, # where 100 = 1%). @@ -271,23 +275,23 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # 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] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type] required :type, - enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type } + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type } # @!method initialize(amount:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0} + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed} # 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] Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amo + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type] Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amo # 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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed#type module Type extend FinchAPI::Internal::Type::Enum @@ -298,7 +302,7 @@ module Type end end - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class EmployeeDeductionContributionPercent < FinchAPI::Internal::Type::BaseModel # @!attribute amount # Contribution amount in cents (for type=fixed) or basis points (for type=percent, # where 100 = 1%). @@ -310,23 +314,23 @@ class UnionMember1 < FinchAPI::Internal::Type::BaseModel # 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] + # @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type] required :type, - enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type } + enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type } # @!method initialize(amount:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1} + # {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent} # 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] Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amo + # @param type [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type] Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amo # 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 + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent#type module Type extend FinchAPI::Internal::Type::Enum @@ -338,12 +342,12 @@ module Type end # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1)] + # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent)] end # Type for HSA contribution limit if the benefit is a HSA. # - # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#hsa_contribution_limit + # @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit#hsa_contribution_limit module HsaContributionLimit extend FinchAPI::Internal::Type::Enum @@ -384,7 +388,7 @@ class BatchError < FinchAPI::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError)] + # @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError)] end end end diff --git a/lib/finch_api/models/hris/employment_data.rb b/lib/finch_api/models/hris/employment_data.rb index b24e115a..23d7f7b0 100644 --- a/lib/finch_api/models/hris/employment_data.rb +++ b/lib/finch_api/models/hris/employment_data.rb @@ -6,11 +6,11 @@ module HRIS module EmploymentData extend FinchAPI::Internal::Type::Union - variant -> { FinchAPI::HRIS::EmploymentData::UnionMember0 } + variant -> { FinchAPI::HRIS::EmploymentData::EmploymentData } variant -> { FinchAPI::HRIS::EmploymentData::BatchError } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class EmploymentData < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # @@ -26,21 +26,21 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute department # The department object. # - # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Department, nil] - required :department, -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Department }, nil?: true + # @return [FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Department, nil] + required :department, -> { FinchAPI::HRIS::EmploymentData::EmploymentData::Department }, nil?: true # @!attribute employment # The employment object. # - # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment, nil] - required :employment, -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Employment }, nil?: true + # @return [FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment, nil] + required :employment, -> { FinchAPI::HRIS::EmploymentData::EmploymentData::Employment }, nil?: true # @!attribute employment_status # The detailed employment status of the individual. # - # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::EmploymentStatus, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::EmploymentStatus, nil] required :employment_status, - enum: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus }, + enum: -> { FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus }, nil?: true # @!attribute end_date @@ -58,10 +58,10 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, # `unknown`. # - # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::FlsaStatus, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::FlsaStatus, nil] required :flsa_status, enum: -> { - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus }, nil?: true @@ -90,8 +90,8 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute manager # The manager object representing the manager of the individual within the org. # - # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Manager, nil] - required :manager, -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Manager }, nil?: true + # @return [FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Manager, nil] + required :manager, -> { FinchAPI::HRIS::EmploymentData::EmploymentData::Manager }, nil?: true # @!attribute middle_name # The legal middle name of the individual. @@ -115,10 +115,10 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # employer in the system. Custom fields are not currently supported for assisted # connections. # - # @return [Array, nil] + # @return [Array, nil] optional :custom_fields, -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField] + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField] }, nil?: true @@ -154,23 +154,23 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!method initialize(id:, class_code:, department:, employment:, employment_status:, end_date:, first_name:, flsa_status:, is_active:, last_name:, latest_rehire_date:, location:, manager:, middle_name:, start_date:, title:, custom_fields: nil, income: nil, income_history: nil, source_id: nil, work_id: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::EmploymentData::UnionMember0} for more details. + # {FinchAPI::Models::HRIS::EmploymentData::EmploymentData} for more details. # # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. # # @param class_code [String, nil] Worker's compensation classification code for this employee # - # @param department [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Department, nil] The department object. + # @param department [FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Department, nil] The department object. # - # @param employment [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment, nil] The employment object. + # @param employment [FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment, nil] The employment object. # - # @param employment_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::EmploymentStatus, nil] The detailed employment status of the individual. + # @param employment_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::EmploymentStatus, nil] The detailed employment status of the individual. # # @param end_date [String, nil] # # @param first_name [String, nil] The legal first name of the individual. # - # @param flsa_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u + # @param flsa_status [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::FlsaStatus, nil] The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `u # # @param is_active [Boolean, nil] `true` if the individual an an active employee or contractor at the company. # @@ -180,7 +180,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param location [FinchAPI::Models::Location, nil] # - # @param manager [FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Manager, nil] The manager object representing the manager of the individual within the org. + # @param manager [FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Manager, nil] The manager object representing the manager of the individual within the org. # # @param middle_name [String, nil] The legal middle name of the individual. # @@ -188,7 +188,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param title [String, nil] The current title of the individual. # - # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl + # @param custom_fields [Array, nil] Custom fields for the individual. These are fields which are defined by the empl # # @param income [FinchAPI::Models::Income, nil] The employee's income as reported by the provider. This may not always be annual # @@ -198,7 +198,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # # @param work_id [String, nil] This field is deprecated in favour of `source_id` - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#department + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData#department class Department < FinchAPI::Internal::Type::BaseModel # @!attribute name # The name of the department associated with the individual. @@ -212,42 +212,42 @@ class Department < FinchAPI::Internal::Type::BaseModel # @param name [String, nil] The name of the department associated with the individual. end - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#employment + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData#employment class Employment < FinchAPI::Internal::Type::BaseModel # @!attribute subtype # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Subtype, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::Subtype, nil] required :subtype, - enum: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype }, + enum: -> { FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype }, nil?: true # @!attribute type # The main employment type of the individual. # - # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Type, nil] + # @return [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::Type, nil] required :type, enum: -> { - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type }, nil?: true # @!method initialize(subtype:, type:) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment} for more + # {FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment} for more # details. # # The employment object. # - # @param subtype [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim + # @param subtype [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::Subtype, nil] The secondary employment type of the individual. Options: `full_time`, `part_tim # - # @param type [Symbol, FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::Type, nil] The main employment type of the individual. + # @param type [Symbol, FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::Type, nil] The main employment type of the individual. # The secondary employment type of the individual. Options: `full_time`, # `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. # - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment#subtype + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment#subtype module Subtype extend FinchAPI::Internal::Type::Enum @@ -264,7 +264,7 @@ module Subtype # The main employment type of the individual. # - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment#type + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment#type module Type extend FinchAPI::Internal::Type::Enum @@ -278,7 +278,7 @@ module Type # The detailed employment status of the individual. # - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#employment_status + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData#employment_status module EmploymentStatus extend FinchAPI::Internal::Type::Enum @@ -297,7 +297,7 @@ module EmploymentStatus # The FLSA status of the individual. Available options: `exempt`, `non_exempt`, # `unknown`. # - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#flsa_status + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData#flsa_status module FlsaStatus extend FinchAPI::Internal::Type::Enum @@ -309,7 +309,7 @@ module FlsaStatus # @return [Array] end - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0#manager + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData#manager class Manager < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. @@ -333,20 +333,20 @@ class CustomField < FinchAPI::Internal::Type::BaseModel # # @return [String, Array, Object, Float, Boolean, nil] optional :value, - union: -> { FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value }, + union: -> { FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField::Value }, nil?: true # @!method initialize(name: nil, value: nil) # @param name [String, nil] # @param value [String, Array, Object, Float, Boolean, nil] - # @see FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField#value + # @see FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField#value module Value extend FinchAPI::Internal::Type::Union variant String - variant -> { FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::Value::UnionMember1Array } + variant -> { FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField::Value::UnionMember1Array } variant FinchAPI::Internal::Type::Unknown @@ -392,7 +392,7 @@ class BatchError < FinchAPI::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::EmploymentData::UnionMember0, FinchAPI::Models::HRIS::EmploymentData::BatchError)] + # @return [Array(FinchAPI::Models::HRIS::EmploymentData::EmploymentData, FinchAPI::Models::HRIS::EmploymentData::BatchError)] end end end diff --git a/lib/finch_api/models/hris/employment_data_response.rb b/lib/finch_api/models/hris/employment_data_response.rb index c4138a04..ed75cc4a 100644 --- a/lib/finch_api/models/hris/employment_data_response.rb +++ b/lib/finch_api/models/hris/employment_data_response.rb @@ -7,7 +7,7 @@ module HRIS class EmploymentDataResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::Models::HRIS::EmploymentData::UnionMember0, FinchAPI::Models::HRIS::EmploymentData::BatchError] + # @return [FinchAPI::Models::HRIS::EmploymentData::EmploymentData, FinchAPI::Models::HRIS::EmploymentData::BatchError] required :body, union: -> { FinchAPI::HRIS::EmploymentData } # @!attribute code @@ -22,7 +22,7 @@ class EmploymentDataResponse < FinchAPI::Internal::Type::BaseModel required :individual_id, String # @!method initialize(body:, code:, individual_id:) - # @param body [FinchAPI::Models::HRIS::EmploymentData::UnionMember0, FinchAPI::Models::HRIS::EmploymentData::BatchError] + # @param body [FinchAPI::Models::HRIS::EmploymentData::EmploymentData, FinchAPI::Models::HRIS::EmploymentData::BatchError] # # @param code [Integer] # diff --git a/lib/finch_api/models/hris/individual.rb b/lib/finch_api/models/hris/individual.rb index c7b0014c..808749cc 100644 --- a/lib/finch_api/models/hris/individual.rb +++ b/lib/finch_api/models/hris/individual.rb @@ -6,11 +6,11 @@ module HRIS module Individual extend FinchAPI::Internal::Type::Union - variant -> { FinchAPI::HRIS::Individual::UnionMember0 } + variant -> { FinchAPI::HRIS::Individual::Individual } variant -> { FinchAPI::HRIS::Individual::BatchError } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class Individual < FinchAPI::Internal::Type::BaseModel # @!attribute id # A stable Finch `id` (UUID v4) for an individual in the company. # @@ -25,8 +25,8 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute ethnicity # The EEOC-defined ethnicity of the individual. # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity, nil] - required :ethnicity, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::Ethnicity }, nil?: true + # @return [Symbol, FinchAPI::Models::HRIS::Individual::Individual::Ethnicity, nil] + required :ethnicity, enum: -> { FinchAPI::HRIS::Individual::Individual::Ethnicity }, nil?: true # @!attribute first_name # The legal first name of the individual. @@ -37,8 +37,8 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute gender # The gender of the individual. # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender, nil] - required :gender, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::Gender }, nil?: true + # @return [Symbol, FinchAPI::Models::HRIS::Individual::Individual::Gender, nil] + required :gender, enum: -> { FinchAPI::HRIS::Individual::Individual::Gender }, nil?: true # @!attribute last_name # The legal last name of the individual. @@ -54,10 +54,10 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute phone_numbers # - # @return [Array, nil] + # @return [Array, nil] required :phone_numbers, -> { - FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber, + FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Individual::Individual::PhoneNumber, nil?: true] }, nil?: true @@ -75,9 +75,9 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!attribute emails # - # @return [Array, nil] + # @return [Array, nil] optional :emails, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Individual::UnionMember0::Email] }, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Individual::Individual::Email] }, nil?: true # @!attribute encrypted_ssn @@ -99,29 +99,29 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # @!method initialize(id:, dob:, ethnicity:, first_name:, gender:, last_name:, middle_name:, phone_numbers:, preferred_name:, residence:, emails: nil, encrypted_ssn: nil, ssn: nil) # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Individual::UnionMember0} for more details. + # {FinchAPI::Models::HRIS::Individual::Individual} for more details. # # @param id [String] A stable Finch `id` (UUID v4) for an individual in the company. # # @param dob [String, nil] # - # @param ethnicity [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Ethnicity, nil] The EEOC-defined ethnicity of the individual. + # @param ethnicity [Symbol, FinchAPI::Models::HRIS::Individual::Individual::Ethnicity, nil] The EEOC-defined ethnicity of the individual. # # @param first_name [String, nil] The legal first name of the individual. # - # @param gender [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Gender, nil] The gender of the individual. + # @param gender [Symbol, FinchAPI::Models::HRIS::Individual::Individual::Gender, nil] The gender of the individual. # # @param last_name [String, nil] The legal last name of the individual. # # @param middle_name [String, nil] The legal middle name of the individual. # - # @param phone_numbers [Array, nil] + # @param phone_numbers [Array, nil] # # @param preferred_name [String, nil] The preferred name of the individual. # # @param residence [FinchAPI::Models::Location, nil] # - # @param emails [Array, nil] + # @param emails [Array, nil] # # @param encrypted_ssn [String, nil] Social Security Number of the individual in **encrypted** format. This field is # @@ -129,7 +129,7 @@ class UnionMember0 < FinchAPI::Internal::Type::BaseModel # The EEOC-defined ethnicity of the individual. # - # @see FinchAPI::Models::HRIS::Individual::UnionMember0#ethnicity + # @see FinchAPI::Models::HRIS::Individual::Individual#ethnicity module Ethnicity extend FinchAPI::Internal::Type::Enum @@ -148,7 +148,7 @@ module Ethnicity # The gender of the individual. # - # @see FinchAPI::Models::HRIS::Individual::UnionMember0#gender + # @see FinchAPI::Models::HRIS::Individual::Individual#gender module Gender extend FinchAPI::Internal::Type::Enum @@ -169,18 +169,14 @@ class PhoneNumber < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] - required :type, - enum: -> { - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type - }, - nil?: true + # @return [Symbol, FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::Type, nil] + required :type, enum: -> { FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type }, nil?: true # @!method initialize(data:, type:) # @param data [String, nil] - # @param type [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::Type, nil] + # @param type [Symbol, FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::Type, nil] - # @see FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber#type + # @see FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber#type module Type extend FinchAPI::Internal::Type::Enum @@ -200,14 +196,14 @@ class Email < FinchAPI::Internal::Type::BaseModel # @!attribute type # - # @return [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type, nil] - required :type, enum: -> { FinchAPI::HRIS::Individual::UnionMember0::Email::Type }, nil?: true + # @return [Symbol, FinchAPI::Models::HRIS::Individual::Individual::Email::Type, nil] + required :type, enum: -> { FinchAPI::HRIS::Individual::Individual::Email::Type }, nil?: true # @!method initialize(data:, type:) # @param data [String] - # @param type [Symbol, FinchAPI::Models::HRIS::Individual::UnionMember0::Email::Type, nil] + # @param type [Symbol, FinchAPI::Models::HRIS::Individual::Individual::Email::Type, nil] - # @see FinchAPI::Models::HRIS::Individual::UnionMember0::Email#type + # @see FinchAPI::Models::HRIS::Individual::Individual::Email#type module Type extend FinchAPI::Internal::Type::Enum @@ -249,7 +245,7 @@ class BatchError < FinchAPI::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError)] + # @return [Array(FinchAPI::Models::HRIS::Individual::Individual, FinchAPI::Models::HRIS::Individual::BatchError)] end end end diff --git a/lib/finch_api/models/hris/individual_response.rb b/lib/finch_api/models/hris/individual_response.rb index 98544bec..222a5be9 100644 --- a/lib/finch_api/models/hris/individual_response.rb +++ b/lib/finch_api/models/hris/individual_response.rb @@ -7,7 +7,7 @@ module HRIS class IndividualResponse < FinchAPI::Internal::Type::BaseModel # @!attribute body # - # @return [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] + # @return [FinchAPI::Models::HRIS::Individual::Individual, FinchAPI::Models::HRIS::Individual::BatchError] required :body, union: -> { FinchAPI::HRIS::Individual } # @!attribute code @@ -21,7 +21,7 @@ class IndividualResponse < FinchAPI::Internal::Type::BaseModel required :individual_id, String # @!method initialize(body:, code:, individual_id:) - # @param body [FinchAPI::Models::HRIS::Individual::UnionMember0, FinchAPI::Models::HRIS::Individual::BatchError] + # @param body [FinchAPI::Models::HRIS::Individual::Individual, FinchAPI::Models::HRIS::Individual::BatchError] # @param code [Integer] # @param individual_id [String] end diff --git a/rbi/finch_api/models/hris/benefit_contribution.rbi b/rbi/finch_api/models/hris/benefit_contribution.rbi index a03fbeb5..2b9e5e98 100644 --- a/rbi/finch_api/models/hris/benefit_contribution.rbi +++ b/rbi/finch_api/models/hris/benefit_contribution.rbi @@ -9,17 +9,17 @@ module FinchAPI Variants = T.type_alias do T.any( - FinchAPI::HRIS::BenefitContribution::UnionMember0, - FinchAPI::HRIS::BenefitContribution::UnionMember1, - FinchAPI::HRIS::BenefitContribution::UnionMember2 + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed, + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent, + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered ) end - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionFixed < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::BenefitContribution::UnionMember0, + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed, FinchAPI::Internal::AnyHash ) end @@ -31,7 +31,7 @@ module FinchAPI # Fixed contribution type. sig do returns( - FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::OrSymbol ) end attr_accessor :type @@ -40,7 +40,7 @@ module FinchAPI params( amount: Integer, type: - FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -56,7 +56,7 @@ module FinchAPI { amount: Integer, type: - FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::OrSymbol } ) end @@ -71,7 +71,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::BenefitContribution::UnionMember0::Type + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -79,13 +79,13 @@ module FinchAPI FIXED = T.let( :fixed, - FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::BenefitContribution::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::TaggedSymbol ] ) end @@ -94,11 +94,11 @@ module FinchAPI end end - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionPercent < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::BenefitContribution::UnionMember1, + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent, FinchAPI::Internal::AnyHash ) end @@ -110,7 +110,7 @@ module FinchAPI # Percentage contribution type. sig do returns( - FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::OrSymbol ) end attr_accessor :type @@ -119,7 +119,7 @@ module FinchAPI params( amount: Integer, type: - FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -135,7 +135,7 @@ module FinchAPI { amount: Integer, type: - FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::OrSymbol } ) end @@ -150,7 +150,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::BenefitContribution::UnionMember1::Type + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -158,13 +158,13 @@ module FinchAPI PERCENT = T.let( :percent, - FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::BenefitContribution::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::TaggedSymbol ] ) end @@ -173,11 +173,11 @@ module FinchAPI end end - class UnionMember2 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionTiered < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::BenefitContribution::UnionMember2, + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered, FinchAPI::Internal::AnyHash ) end @@ -186,7 +186,9 @@ module FinchAPI # contribution thresholds. sig do returns( - T::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] + T::Array[ + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier + ] ) end attr_accessor :tiers @@ -194,7 +196,7 @@ module FinchAPI # Tiered contribution type (only valid for company_contribution). sig do returns( - FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::OrSymbol ) end attr_accessor :type @@ -203,10 +205,10 @@ module FinchAPI params( tiers: T::Array[ - FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier::OrHash + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier::OrHash ], type: - FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -223,10 +225,10 @@ module FinchAPI { tiers: T::Array[ - FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier ], type: - FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::OrSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::OrSymbol } ) end @@ -237,7 +239,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier, + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier, FinchAPI::Internal::AnyHash ) end @@ -269,7 +271,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::BenefitContribution::UnionMember2::Type + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -277,13 +279,13 @@ module FinchAPI TIERED = T.let( :tiered, - FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::TaggedSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::BenefitContribution::UnionMember2::Type::TaggedSymbol + FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::TaggedSymbol ] ) end diff --git a/rbi/finch_api/models/hris/benefits/individual_benefit.rbi b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi index b6d44885..96c4a3df 100644 --- a/rbi/finch_api/models/hris/benefits/individual_benefit.rbi +++ b/rbi/finch_api/models/hris/benefits/individual_benefit.rbi @@ -30,7 +30,7 @@ module FinchAPI params( body: T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::OrHash, FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError::OrHash ), code: Integer, @@ -59,16 +59,16 @@ module FinchAPI Variants = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit, FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError ) end - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class IndividualBenefit < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit, FinchAPI::Internal::AnyHash ) end @@ -88,7 +88,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::Variants + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::Variants ) ) end @@ -99,7 +99,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::Variants + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::Variants ) ) end @@ -109,7 +109,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit::TaggedSymbol ) ) end @@ -122,21 +122,21 @@ module FinchAPI company_contribution: T.nilable( T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::OrHash, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::OrHash, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::OrHash + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::OrHash ) ), employee_deduction: T.nilable( T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::OrHash, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::OrHash + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::OrHash, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::OrHash ) ), hsa_contribution_limit: T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::OrSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit::OrSymbol ) ).returns(T.attached_class) end @@ -165,15 +165,15 @@ module FinchAPI catch_up: T.nilable(T::Boolean), company_contribution: T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::Variants + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::Variants ), employee_deduction: T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::Variants + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::Variants ), hsa_contribution_limit: T.nilable( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit::TaggedSymbol ) } ) @@ -190,17 +190,17 @@ module FinchAPI Variants = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2 + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered ) end - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionFixed < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed, FinchAPI::Internal::AnyHash ) end @@ -214,7 +214,7 @@ module FinchAPI # (amount in basis points), or "tiered" (multi-tier matching). sig do returns( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type::TaggedSymbol ) end attr_accessor :type @@ -223,7 +223,7 @@ module FinchAPI params( amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::OrSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -241,7 +241,7 @@ module FinchAPI { amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type::TaggedSymbol } ) end @@ -257,7 +257,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -265,13 +265,13 @@ module FinchAPI FIXED = T.let( :fixed, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::Type::TaggedSymbol ] ) end @@ -280,11 +280,11 @@ module FinchAPI end end - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionPercent < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent, FinchAPI::Internal::AnyHash ) end @@ -298,7 +298,7 @@ module FinchAPI # (amount in basis points), or "tiered" (multi-tier matching). sig do returns( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type::TaggedSymbol ) end attr_accessor :type @@ -307,7 +307,7 @@ module FinchAPI params( amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::OrSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -325,7 +325,7 @@ module FinchAPI { amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type::TaggedSymbol } ) end @@ -341,7 +341,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -349,13 +349,13 @@ module FinchAPI PERCENT = T.let( :percent, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::Type::TaggedSymbol ] ) end @@ -364,11 +364,11 @@ module FinchAPI end end - class UnionMember2 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionTiered < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered, FinchAPI::Internal::AnyHash ) end @@ -378,7 +378,7 @@ module FinchAPI sig do returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier ] ) end @@ -388,7 +388,7 @@ module FinchAPI # (amount in basis points), or "tiered" (multi-tier matching). sig do returns( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type::TaggedSymbol ) end attr_accessor :type @@ -397,10 +397,10 @@ module FinchAPI params( tiers: T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier::OrHash + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier::OrHash ], type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::OrSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -418,10 +418,10 @@ module FinchAPI { tiers: T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier ], type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type::TaggedSymbol } ) end @@ -432,7 +432,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier, FinchAPI::Internal::AnyHash ) end @@ -467,7 +467,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -475,13 +475,13 @@ module FinchAPI TIERED = T.let( :tiered, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Type::TaggedSymbol ] ) end @@ -493,7 +493,7 @@ module FinchAPI sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::Variants + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::Variants ] ) end @@ -509,16 +509,16 @@ module FinchAPI Variants = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1 + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent ) end - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class EmployeeDeductionContributionFixed < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed, FinchAPI::Internal::AnyHash ) end @@ -532,7 +532,7 @@ module FinchAPI # (amount in basis points). sig do returns( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type::TaggedSymbol ) end attr_accessor :type @@ -541,7 +541,7 @@ module FinchAPI params( amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::OrSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -559,7 +559,7 @@ module FinchAPI { amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type::TaggedSymbol } ) end @@ -575,7 +575,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -583,13 +583,13 @@ module FinchAPI FIXED = T.let( :fixed, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::Type::TaggedSymbol ] ) end @@ -598,11 +598,11 @@ module FinchAPI end end - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class EmployeeDeductionContributionPercent < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1, + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent, FinchAPI::Internal::AnyHash ) end @@ -616,7 +616,7 @@ module FinchAPI # (amount in basis points). sig do returns( - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type::TaggedSymbol ) end attr_accessor :type @@ -625,7 +625,7 @@ module FinchAPI params( amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::OrSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type::OrSymbol ).returns(T.attached_class) end def self.new( @@ -643,7 +643,7 @@ module FinchAPI { amount: Integer, type: - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type::TaggedSymbol } ) end @@ -659,7 +659,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -667,13 +667,13 @@ module FinchAPI PERCENT = T.let( :percent, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::Type::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::Type::TaggedSymbol ] ) end @@ -685,7 +685,7 @@ module FinchAPI sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::Variants + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::Variants ] ) end @@ -701,7 +701,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -709,18 +709,18 @@ module FinchAPI INDIVIDUAL = T.let( :individual, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit::TaggedSymbol ) FAMILY = T.let( :family, - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::HsaContributionLimit::TaggedSymbol ] ) end diff --git a/rbi/finch_api/models/hris/employment_data.rbi b/rbi/finch_api/models/hris/employment_data.rbi index ac9c8874..2c3c042f 100644 --- a/rbi/finch_api/models/hris/employment_data.rbi +++ b/rbi/finch_api/models/hris/employment_data.rbi @@ -9,16 +9,16 @@ module FinchAPI Variants = T.type_alias do T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0, + FinchAPI::HRIS::EmploymentData::EmploymentData, FinchAPI::HRIS::EmploymentData::BatchError ) end - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class EmploymentData < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0, + FinchAPI::HRIS::EmploymentData::EmploymentData, FinchAPI::Internal::AnyHash ) end @@ -35,7 +35,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Department + FinchAPI::HRIS::EmploymentData::EmploymentData::Department ) ) end @@ -45,7 +45,7 @@ module FinchAPI params( department: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Department::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::Department::OrHash ) ).void end @@ -55,7 +55,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment ) ) end @@ -65,7 +65,7 @@ module FinchAPI params( employment: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::OrHash ) ).void end @@ -75,7 +75,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) ) end @@ -93,7 +93,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::TaggedSymbol ) ) end @@ -119,7 +119,7 @@ module FinchAPI # The manager object representing the manager of the individual within the org. sig do returns( - T.nilable(FinchAPI::HRIS::EmploymentData::UnionMember0::Manager) + T.nilable(FinchAPI::HRIS::EmploymentData::EmploymentData::Manager) ) end attr_reader :manager @@ -128,7 +128,7 @@ module FinchAPI params( manager: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Manager::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::Manager::OrHash ) ).void end @@ -152,7 +152,7 @@ module FinchAPI returns( T.nilable( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField ] ) ) @@ -186,21 +186,21 @@ module FinchAPI class_code: T.nilable(String), department: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Department::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::Department::OrHash ), employment: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::OrHash ), employment_status: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::OrSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::OrSymbol ), end_date: T.nilable(String), first_name: T.nilable(String), flsa_status: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::OrSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::OrSymbol ), is_active: T.nilable(T::Boolean), last_name: T.nilable(String), @@ -208,7 +208,7 @@ module FinchAPI location: T.nilable(FinchAPI::Location::OrHash), manager: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Manager::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::Manager::OrHash ), middle_name: T.nilable(String), start_date: T.nilable(String), @@ -216,7 +216,7 @@ module FinchAPI custom_fields: T.nilable( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::OrHash + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField::OrHash ] ), income: T.nilable(FinchAPI::Income::OrHash), @@ -280,21 +280,21 @@ module FinchAPI class_code: T.nilable(String), department: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Department + FinchAPI::HRIS::EmploymentData::EmploymentData::Department ), employment: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment ), employment_status: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ), end_date: T.nilable(String), first_name: T.nilable(String), flsa_status: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::TaggedSymbol ), is_active: T.nilable(T::Boolean), last_name: T.nilable(String), @@ -302,7 +302,7 @@ module FinchAPI location: T.nilable(FinchAPI::Location), manager: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Manager + FinchAPI::HRIS::EmploymentData::EmploymentData::Manager ), middle_name: T.nilable(String), start_date: T.nilable(String), @@ -310,7 +310,7 @@ module FinchAPI custom_fields: T.nilable( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField ] ), income: T.nilable(FinchAPI::Income), @@ -328,7 +328,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0::Department, + FinchAPI::HRIS::EmploymentData::EmploymentData::Department, FinchAPI::Internal::AnyHash ) end @@ -354,7 +354,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment, + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment, FinchAPI::Internal::AnyHash ) end @@ -364,7 +364,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) ) end @@ -374,7 +374,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type::TaggedSymbol ) ) end @@ -385,11 +385,11 @@ module FinchAPI params( subtype: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::OrSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::OrSymbol ), type: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type::OrSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type::OrSymbol ) ).returns(T.attached_class) end @@ -407,11 +407,11 @@ module FinchAPI { subtype: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ), type: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type::TaggedSymbol ) } ) @@ -428,7 +428,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -436,38 +436,38 @@ module FinchAPI FULL_TIME = T.let( :full_time, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) INTERN = T.let( :intern, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) PART_TIME = T.let( :part_time, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) TEMP = T.let( :temp, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) SEASONAL = T.let( :seasonal, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) INDIVIDUAL_CONTRACTOR = T.let( :individual_contractor, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Subtype::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Subtype::TaggedSymbol ] ) end @@ -483,7 +483,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -491,18 +491,18 @@ module FinchAPI EMPLOYEE = T.let( :employee, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type::TaggedSymbol ) CONTRACTOR = T.let( :contractor, - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::Employment::Type::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::Employment::Type::TaggedSymbol ] ) end @@ -519,7 +519,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -527,43 +527,43 @@ module FinchAPI ACTIVE = T.let( :active, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) DECEASED = T.let( :deceased, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) LEAVE = T.let( :leave, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) ONBOARDING = T.let( :onboarding, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) PREHIRE = T.let( :prehire, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) RETIRED = T.let( :retired, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) TERMINATED = T.let( :terminated, - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::EmploymentStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::EmploymentStatus::TaggedSymbol ] ) end @@ -580,7 +580,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -588,23 +588,23 @@ module FinchAPI EXEMPT = T.let( :exempt, - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::TaggedSymbol ) NON_EXEMPT = T.let( :non_exempt, - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::TaggedSymbol ) UNKNOWN = T.let( :unknown, - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::FlsaStatus::TaggedSymbol + FinchAPI::HRIS::EmploymentData::EmploymentData::FlsaStatus::TaggedSymbol ] ) end @@ -616,7 +616,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0::Manager, + FinchAPI::HRIS::EmploymentData::EmploymentData::Manager, FinchAPI::Internal::AnyHash ) end @@ -642,7 +642,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField, + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField, FinchAPI::Internal::AnyHash ) end @@ -653,7 +653,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField::Value::Variants ) ) end @@ -664,7 +664,7 @@ module FinchAPI name: T.nilable(String), value: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField::Value::Variants ) ).returns(T.attached_class) end @@ -677,7 +677,7 @@ module FinchAPI name: T.nilable(String), value: T.nilable( - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField::Value::Variants ) } ) @@ -704,7 +704,7 @@ module FinchAPI sig do override.returns( T::Array[ - FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField::Value::Variants + FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField::Value::Variants ] ) end diff --git a/rbi/finch_api/models/hris/employment_data_response.rbi b/rbi/finch_api/models/hris/employment_data_response.rbi index 2c30cbb3..2c0e5799 100644 --- a/rbi/finch_api/models/hris/employment_data_response.rbi +++ b/rbi/finch_api/models/hris/employment_data_response.rbi @@ -26,7 +26,7 @@ module FinchAPI params( body: T.any( - FinchAPI::HRIS::EmploymentData::UnionMember0::OrHash, + FinchAPI::HRIS::EmploymentData::EmploymentData::OrHash, FinchAPI::HRIS::EmploymentData::BatchError::OrHash ), code: Integer, diff --git a/rbi/finch_api/models/hris/individual.rbi b/rbi/finch_api/models/hris/individual.rbi index 220e8bbb..56b8f4f9 100644 --- a/rbi/finch_api/models/hris/individual.rbi +++ b/rbi/finch_api/models/hris/individual.rbi @@ -9,16 +9,16 @@ module FinchAPI Variants = T.type_alias do T.any( - FinchAPI::HRIS::Individual::UnionMember0, + FinchAPI::HRIS::Individual::Individual, FinchAPI::HRIS::Individual::BatchError ) end - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class Individual < FinchAPI::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Individual::UnionMember0, + FinchAPI::HRIS::Individual::Individual, FinchAPI::Internal::AnyHash ) end @@ -34,7 +34,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) ) end @@ -48,7 +48,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ) ) end @@ -66,9 +66,7 @@ module FinchAPI returns( T.nilable( T::Array[ - T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber - ) + T.nilable(FinchAPI::HRIS::Individual::Individual::PhoneNumber) ] ) ) @@ -87,9 +85,7 @@ module FinchAPI sig do returns( - T.nilable( - T::Array[FinchAPI::HRIS::Individual::UnionMember0::Email] - ) + T.nilable(T::Array[FinchAPI::HRIS::Individual::Individual::Email]) ) end attr_accessor :emails @@ -113,12 +109,12 @@ module FinchAPI dob: T.nilable(String), ethnicity: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::OrSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::OrSymbol ), first_name: T.nilable(String), gender: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Gender::OrSymbol + FinchAPI::HRIS::Individual::Individual::Gender::OrSymbol ), last_name: T.nilable(String), middle_name: T.nilable(String), @@ -126,7 +122,7 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::OrHash + FinchAPI::HRIS::Individual::Individual::PhoneNumber::OrHash ) ] ), @@ -135,7 +131,7 @@ module FinchAPI emails: T.nilable( T::Array[ - FinchAPI::HRIS::Individual::UnionMember0::Email::OrHash + FinchAPI::HRIS::Individual::Individual::Email::OrHash ] ), encrypted_ssn: T.nilable(String), @@ -180,12 +176,12 @@ module FinchAPI dob: T.nilable(String), ethnicity: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ), first_name: T.nilable(String), gender: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ), last_name: T.nilable(String), middle_name: T.nilable(String), @@ -193,7 +189,7 @@ module FinchAPI T.nilable( T::Array[ T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber + FinchAPI::HRIS::Individual::Individual::PhoneNumber ) ] ), @@ -201,7 +197,7 @@ module FinchAPI residence: T.nilable(FinchAPI::Location), emails: T.nilable( - T::Array[FinchAPI::HRIS::Individual::UnionMember0::Email] + T::Array[FinchAPI::HRIS::Individual::Individual::Email] ), encrypted_ssn: T.nilable(String), ssn: T.nilable(String) @@ -217,58 +213,55 @@ module FinchAPI TaggedSymbol = T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity - ) + T.all(Symbol, FinchAPI::HRIS::Individual::Individual::Ethnicity) end OrSymbol = T.type_alias { T.any(Symbol, String) } ASIAN = T.let( :asian, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) WHITE = T.let( :white, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) BLACK_OR_AFRICAN_AMERICAN = T.let( :black_or_african_american, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = T.let( :native_hawaiian_or_pacific_islander, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) AMERICAN_INDIAN_OR_ALASKA_NATIVE = T.let( :american_indian_or_alaska_native, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) HISPANIC_OR_LATINO = T.let( :hispanic_or_latino, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) TWO_OR_MORE_RACES = T.let( :two_or_more_races, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) DECLINE_TO_SPECIFY = T.let( :decline_to_specify, - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Individual::UnionMember0::Ethnicity::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Ethnicity::TaggedSymbol ] ) end @@ -282,35 +275,35 @@ module FinchAPI TaggedSymbol = T.type_alias do - T.all(Symbol, FinchAPI::HRIS::Individual::UnionMember0::Gender) + T.all(Symbol, FinchAPI::HRIS::Individual::Individual::Gender) end OrSymbol = T.type_alias { T.any(Symbol, String) } FEMALE = T.let( :female, - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ) MALE = T.let( :male, - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ) OTHER = T.let( :other, - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ) DECLINE_TO_SPECIFY = T.let( :decline_to_specify, - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Individual::UnionMember0::Gender::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Gender::TaggedSymbol ] ) end @@ -322,7 +315,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber, + FinchAPI::HRIS::Individual::Individual::PhoneNumber, FinchAPI::Internal::AnyHash ) end @@ -333,7 +326,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type::TaggedSymbol ) ) end @@ -344,7 +337,7 @@ module FinchAPI data: T.nilable(String), type: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type::OrSymbol + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type::OrSymbol ) ).returns(T.attached_class) end @@ -357,7 +350,7 @@ module FinchAPI data: T.nilable(String), type: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type::TaggedSymbol ) } ) @@ -372,7 +365,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -380,18 +373,18 @@ module FinchAPI WORK = T.let( :work, - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type::TaggedSymbol ) PERSONAL = T.let( :personal, - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::PhoneNumber::Type::TaggedSymbol ] ) end @@ -404,7 +397,7 @@ module FinchAPI OrHash = T.type_alias do T.any( - FinchAPI::HRIS::Individual::UnionMember0::Email, + FinchAPI::HRIS::Individual::Individual::Email, FinchAPI::Internal::AnyHash ) end @@ -415,7 +408,7 @@ module FinchAPI sig do returns( T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Email::Type::TaggedSymbol ) ) end @@ -426,7 +419,7 @@ module FinchAPI data: String, type: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Email::Type::OrSymbol + FinchAPI::HRIS::Individual::Individual::Email::Type::OrSymbol ) ).returns(T.attached_class) end @@ -439,7 +432,7 @@ module FinchAPI data: String, type: T.nilable( - FinchAPI::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Email::Type::TaggedSymbol ) } ) @@ -454,7 +447,7 @@ module FinchAPI T.type_alias do T.all( Symbol, - FinchAPI::HRIS::Individual::UnionMember0::Email::Type + FinchAPI::HRIS::Individual::Individual::Email::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -462,18 +455,18 @@ module FinchAPI WORK = T.let( :work, - FinchAPI::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Email::Type::TaggedSymbol ) PERSONAL = T.let( :personal, - FinchAPI::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Email::Type::TaggedSymbol ) sig do override.returns( T::Array[ - FinchAPI::HRIS::Individual::UnionMember0::Email::Type::TaggedSymbol + FinchAPI::HRIS::Individual::Individual::Email::Type::TaggedSymbol ] ) end diff --git a/rbi/finch_api/models/hris/individual_response.rbi b/rbi/finch_api/models/hris/individual_response.rbi index 28d87f09..057b8643 100644 --- a/rbi/finch_api/models/hris/individual_response.rbi +++ b/rbi/finch_api/models/hris/individual_response.rbi @@ -25,7 +25,7 @@ module FinchAPI params( body: T.any( - FinchAPI::HRIS::Individual::UnionMember0::OrHash, + FinchAPI::HRIS::Individual::Individual::OrHash, FinchAPI::HRIS::Individual::BatchError::OrHash ), code: Integer, diff --git a/sig/finch_api/models/hris/benefit_contribution.rbs b/sig/finch_api/models/hris/benefit_contribution.rbs index 8e390d49..7451af47 100644 --- a/sig/finch_api/models/hris/benefit_contribution.rbs +++ b/sig/finch_api/models/hris/benefit_contribution.rbs @@ -2,32 +2,32 @@ module FinchAPI module Models module HRIS type benefit_contribution = - FinchAPI::HRIS::BenefitContribution::UnionMember0 - | FinchAPI::HRIS::BenefitContribution::UnionMember1 - | FinchAPI::HRIS::BenefitContribution::UnionMember2 + FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed + | FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent + | FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered module BenefitContribution extend FinchAPI::Internal::Type::Union - type union_member0 = + type benefit_contribution_fixed = { amount: Integer, - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::type_ } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionFixed < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::type_ def initialize: ( amount: Integer, - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::type_ ) -> void def to_hash: -> { amount: Integer, - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_ + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::type_ } type type_ = :fixed @@ -37,29 +37,29 @@ module FinchAPI FIXED: :fixed - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionFixed::type_] end end - type union_member1 = + type benefit_contribution_percent = { amount: Integer, - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::type_ } - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class BenefitContributionPercent < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::type_ def initialize: ( amount: Integer, - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::type_ ) -> void def to_hash: -> { amount: Integer, - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_ + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::type_ } type type_ = :percent @@ -69,29 +69,29 @@ module FinchAPI PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionPercent::type_] end end - type union_member2 = + type benefit_contribution_tiered = { - tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier], - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + tiers: ::Array[FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier], + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::type_ } - class UnionMember2 < FinchAPI::Internal::Type::BaseModel - attr_accessor tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] + class BenefitContributionTiered < FinchAPI::Internal::Type::BaseModel + attr_accessor tiers: ::Array[FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier] - attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + attr_accessor type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::type_ def initialize: ( - tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier], - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + tiers: ::Array[FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier], + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::type_ ) -> void def to_hash: -> { - tiers: ::Array[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier], - type: FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_ + tiers: ::Array[FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier], + type: FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::type_ } type tier = { match: Integer, threshold: Integer } @@ -113,7 +113,7 @@ module FinchAPI TIERED: :tiered - def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::BenefitContribution::BenefitContributionTiered::type_] end end diff --git a/sig/finch_api/models/hris/benefits/individual_benefit.rbs b/sig/finch_api/models/hris/benefits/individual_benefit.rbs index d76af5d2..23dddda0 100644 --- a/sig/finch_api/models/hris/benefits/individual_benefit.rbs +++ b/sig/finch_api/models/hris/benefits/individual_benefit.rbs @@ -31,75 +31,75 @@ module FinchAPI } type body = - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0 + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError module Body extend FinchAPI::Internal::Type::Union - type union_member0 = + type individual_benefit = { annual_maximum: Integer?, catch_up: bool?, - company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution?, - employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction?, - hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? + company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::company_contribution?, + employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::employee_deduction?, + hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::hsa_contribution_limit? } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class IndividualBenefit < FinchAPI::Internal::Type::BaseModel attr_accessor annual_maximum: Integer? attr_accessor catch_up: bool? - attr_accessor company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution? + attr_accessor company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::company_contribution? - attr_accessor employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction? + attr_accessor employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::employee_deduction? - attr_accessor hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? + attr_accessor hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::hsa_contribution_limit? def initialize: ( annual_maximum: Integer?, catch_up: bool?, - company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution?, - employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction?, - ?hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? + company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::company_contribution?, + employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::employee_deduction?, + ?hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::hsa_contribution_limit? ) -> void def to_hash: -> { annual_maximum: Integer?, catch_up: bool?, - company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution?, - employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction?, - hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit? + company_contribution: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::company_contribution?, + employee_deduction: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::employee_deduction?, + hsa_contribution_limit: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::hsa_contribution_limit? } type company_contribution = - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0 - | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1 - | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2 + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed + | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent + | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered module CompanyContribution extend FinchAPI::Internal::Type::Union - type union_member0 = + type company_contribution_fixed = { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::type_ } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionFixed < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::type_ def initialize: ( amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::type_ ) -> void def to_hash: -> { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::type_ } type type_ = :fixed @@ -109,29 +109,29 @@ module FinchAPI FIXED: :fixed - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember0::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionFixed::type_] end end - type union_member1 = + type company_contribution_percent = { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::type_ } - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class CompanyContributionPercent < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::type_ def initialize: ( amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::type_ ) -> void def to_hash: -> { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::type_ } type type_ = :percent @@ -141,29 +141,29 @@ module FinchAPI PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember1::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionPercent::type_] end end - type union_member2 = + type company_contribution_tiered = { - tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier], - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier], + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::type_ } - class UnionMember2 < FinchAPI::Internal::Type::BaseModel - attr_accessor tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier] + class CompanyContributionTiered < FinchAPI::Internal::Type::BaseModel + attr_accessor tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier] - attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::type_ def initialize: ( - tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier], - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier], + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::type_ ) -> void def to_hash: -> { - tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::Tier], - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_ + tiers: ::Array[FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::Tier], + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::type_ } type tier = { match: Integer, threshold: Integer } @@ -185,39 +185,39 @@ module FinchAPI TIERED: :tiered - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::CompanyContribution::UnionMember2::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::CompanyContribution::CompanyContributionTiered::type_] end end - def self?.variants: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::company_contribution] + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::company_contribution] end type employee_deduction = - FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0 - | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1 + FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed + | FinchAPI::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent module EmployeeDeduction extend FinchAPI::Internal::Type::Union - type union_member0 = + type employee_deduction_contribution_fixed = { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::type_ } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class EmployeeDeductionContributionFixed < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::type_ def initialize: ( amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::type_ ) -> void def to_hash: -> { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::type_ } type type_ = :fixed @@ -227,29 +227,29 @@ module FinchAPI FIXED: :fixed - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember0::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionFixed::type_] end end - type union_member1 = + type employee_deduction_contribution_percent = { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::type_ } - class UnionMember1 < FinchAPI::Internal::Type::BaseModel + class EmployeeDeductionContributionPercent < FinchAPI::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + attr_accessor type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::type_ def initialize: ( amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::type_ ) -> void def to_hash: -> { amount: Integer, - type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_ + type: FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::type_ } type type_ = :percent @@ -259,11 +259,11 @@ module FinchAPI PERCENT: :percent - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::EmployeeDeduction::UnionMember1::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::EmployeeDeduction::EmployeeDeductionContributionPercent::type_] end end - def self?.variants: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::employee_deduction] + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::employee_deduction] end type hsa_contribution_limit = :individual | :family @@ -274,7 +274,7 @@ module FinchAPI INDIVIDUAL: :individual FAMILY: :family - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::hsa_contribution_limit] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::IndividualBenefit::hsa_contribution_limit] end end diff --git a/sig/finch_api/models/hris/employment_data.rbs b/sig/finch_api/models/hris/employment_data.rbs index 5705b8a1..70622f94 100644 --- a/sig/finch_api/models/hris/employment_data.rbs +++ b/sig/finch_api/models/hris/employment_data.rbs @@ -2,53 +2,53 @@ module FinchAPI module Models module HRIS type employment_data = - FinchAPI::HRIS::EmploymentData::UnionMember0 + FinchAPI::HRIS::EmploymentData::EmploymentData | FinchAPI::HRIS::EmploymentData::BatchError module EmploymentData extend FinchAPI::Internal::Type::Union - type union_member0 = + type employment_data = { id: String, class_code: String?, - department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, - employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, - employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, + department: FinchAPI::HRIS::EmploymentData::EmploymentData::Department?, + employment: FinchAPI::HRIS::EmploymentData::EmploymentData::Employment?, + employment_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::employment_status?, end_date: String?, first_name: String?, - flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status?, + flsa_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::flsa_status?, is_active: bool?, last_name: String?, latest_rehire_date: String?, location: FinchAPI::Location?, - manager: FinchAPI::HRIS::EmploymentData::UnionMember0::Manager?, + manager: FinchAPI::HRIS::EmploymentData::EmploymentData::Manager?, middle_name: String?, start_date: String?, title: String?, - custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, + custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField]?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, source_id: String?, work_id: String? } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class EmploymentData < FinchAPI::Internal::Type::BaseModel attr_accessor id: String attr_accessor class_code: String? - attr_accessor department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department? + attr_accessor department: FinchAPI::HRIS::EmploymentData::EmploymentData::Department? - attr_accessor employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment? + attr_accessor employment: FinchAPI::HRIS::EmploymentData::EmploymentData::Employment? - attr_accessor employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status? + attr_accessor employment_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::employment_status? attr_accessor end_date: String? attr_accessor first_name: String? - attr_accessor flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status? + attr_accessor flsa_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::flsa_status? attr_accessor is_active: bool? @@ -58,7 +58,7 @@ module FinchAPI attr_accessor location: FinchAPI::Location? - attr_accessor manager: FinchAPI::HRIS::EmploymentData::UnionMember0::Manager? + attr_accessor manager: FinchAPI::HRIS::EmploymentData::EmploymentData::Manager? attr_accessor middle_name: String? @@ -66,7 +66,7 @@ module FinchAPI attr_accessor title: String? - attr_accessor custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]? + attr_accessor custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField]? attr_accessor income: FinchAPI::Income? @@ -79,21 +79,21 @@ module FinchAPI def initialize: ( id: String, class_code: String?, - department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, - employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, - employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, + department: FinchAPI::HRIS::EmploymentData::EmploymentData::Department?, + employment: FinchAPI::HRIS::EmploymentData::EmploymentData::Employment?, + employment_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::employment_status?, end_date: String?, first_name: String?, - flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status?, + flsa_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::flsa_status?, is_active: bool?, last_name: String?, latest_rehire_date: String?, location: FinchAPI::Location?, - manager: FinchAPI::HRIS::EmploymentData::UnionMember0::Manager?, + manager: FinchAPI::HRIS::EmploymentData::EmploymentData::Manager?, middle_name: String?, start_date: String?, title: String?, - ?custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, + ?custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField]?, ?income: FinchAPI::Income?, ?income_history: ::Array[FinchAPI::Income?]?, ?source_id: String?, @@ -103,21 +103,21 @@ module FinchAPI def to_hash: -> { id: String, class_code: String?, - department: FinchAPI::HRIS::EmploymentData::UnionMember0::Department?, - employment: FinchAPI::HRIS::EmploymentData::UnionMember0::Employment?, - employment_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status?, + department: FinchAPI::HRIS::EmploymentData::EmploymentData::Department?, + employment: FinchAPI::HRIS::EmploymentData::EmploymentData::Employment?, + employment_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::employment_status?, end_date: String?, first_name: String?, - flsa_status: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status?, + flsa_status: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::flsa_status?, is_active: bool?, last_name: String?, latest_rehire_date: String?, location: FinchAPI::Location?, - manager: FinchAPI::HRIS::EmploymentData::UnionMember0::Manager?, + manager: FinchAPI::HRIS::EmploymentData::EmploymentData::Manager?, middle_name: String?, start_date: String?, title: String?, - custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::UnionMember0::CustomField]?, + custom_fields: ::Array[FinchAPI::HRIS::EmploymentData::EmploymentData::CustomField]?, income: FinchAPI::Income?, income_history: ::Array[FinchAPI::Income?]?, source_id: String?, @@ -136,23 +136,23 @@ module FinchAPI type employment = { - subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype?, - type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? + subtype: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::subtype?, + type: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::type_? } class Employment < FinchAPI::Internal::Type::BaseModel - attr_accessor subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype? + attr_accessor subtype: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::subtype? - attr_accessor type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? + attr_accessor type: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::type_? def initialize: ( - subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype?, - type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? + subtype: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::subtype?, + type: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::type_? ) -> void def to_hash: -> { - subtype: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype?, - type: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_? + subtype: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::subtype?, + type: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::type_? } type subtype = @@ -173,7 +173,7 @@ module FinchAPI SEASONAL: :seasonal INDIVIDUAL_CONTRACTOR: :individual_contractor - def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::subtype] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::subtype] end type type_ = :employee | :contractor @@ -184,7 +184,7 @@ module FinchAPI EMPLOYEE: :employee CONTRACTOR: :contractor - def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::Employment::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::EmploymentData::Employment::type_] end end @@ -208,7 +208,7 @@ module FinchAPI RETIRED: :retired TERMINATED: :terminated - def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::employment_status] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::EmploymentData::employment_status] end type flsa_status = :exempt | :non_exempt | :unknown @@ -220,7 +220,7 @@ module FinchAPI NON_EXEMPT: :non_exempt UNKNOWN: :unknown - def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::flsa_status] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::EmploymentData::flsa_status] end type manager = { id: String } @@ -236,22 +236,22 @@ module FinchAPI type custom_field = { name: String?, - value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + value: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField::value? } class CustomField < FinchAPI::Internal::Type::BaseModel attr_accessor name: String? - attr_accessor value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + attr_accessor value: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField::value? def initialize: ( ?name: String?, - ?value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + ?value: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField::value? ) -> void def to_hash: -> { name: String?, - value: FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value? + value: FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField::value? } type value = (String | ::Array[top] | top | Float | bool)? @@ -259,7 +259,7 @@ module FinchAPI module Value extend FinchAPI::Internal::Type::Union - def self?.variants: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::UnionMember0::CustomField::value] + def self?.variants: -> ::Array[FinchAPI::Models::HRIS::EmploymentData::EmploymentData::CustomField::value] UnionMember1Array: FinchAPI::Internal::Type::Converter end diff --git a/sig/finch_api/models/hris/individual.rbs b/sig/finch_api/models/hris/individual.rbs index bc63b865..18849e89 100644 --- a/sig/finch_api/models/hris/individual.rbs +++ b/sig/finch_api/models/hris/individual.rbs @@ -2,51 +2,51 @@ module FinchAPI module Models module HRIS type individual = - FinchAPI::HRIS::Individual::UnionMember0 + FinchAPI::HRIS::Individual::Individual | FinchAPI::HRIS::Individual::BatchError module Individual extend FinchAPI::Internal::Type::Union - type union_member0 = + type individual = { id: String, dob: String?, - ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, + ethnicity: FinchAPI::Models::HRIS::Individual::Individual::ethnicity?, first_name: String?, - gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, + gender: FinchAPI::Models::HRIS::Individual::Individual::gender?, last_name: String?, middle_name: String?, - phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]?, + phone_numbers: ::Array[FinchAPI::HRIS::Individual::Individual::PhoneNumber?]?, preferred_name: String?, residence: FinchAPI::Location?, - emails: ::Array[FinchAPI::HRIS::Individual::UnionMember0::Email]?, + emails: ::Array[FinchAPI::HRIS::Individual::Individual::Email]?, encrypted_ssn: String?, ssn: String? } - class UnionMember0 < FinchAPI::Internal::Type::BaseModel + class Individual < FinchAPI::Internal::Type::BaseModel attr_accessor id: String attr_accessor dob: String? - attr_accessor ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity? + attr_accessor ethnicity: FinchAPI::Models::HRIS::Individual::Individual::ethnicity? attr_accessor first_name: String? - attr_accessor gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender? + attr_accessor gender: FinchAPI::Models::HRIS::Individual::Individual::gender? attr_accessor last_name: String? attr_accessor middle_name: String? - attr_accessor phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]? + attr_accessor phone_numbers: ::Array[FinchAPI::HRIS::Individual::Individual::PhoneNumber?]? attr_accessor preferred_name: String? attr_accessor residence: FinchAPI::Location? - attr_accessor emails: ::Array[FinchAPI::HRIS::Individual::UnionMember0::Email]? + attr_accessor emails: ::Array[FinchAPI::HRIS::Individual::Individual::Email]? attr_accessor encrypted_ssn: String? @@ -55,15 +55,15 @@ module FinchAPI def initialize: ( id: String, dob: String?, - ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, + ethnicity: FinchAPI::Models::HRIS::Individual::Individual::ethnicity?, first_name: String?, - gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, + gender: FinchAPI::Models::HRIS::Individual::Individual::gender?, last_name: String?, middle_name: String?, - phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]?, + phone_numbers: ::Array[FinchAPI::HRIS::Individual::Individual::PhoneNumber?]?, preferred_name: String?, residence: FinchAPI::Location?, - ?emails: ::Array[FinchAPI::HRIS::Individual::UnionMember0::Email]?, + ?emails: ::Array[FinchAPI::HRIS::Individual::Individual::Email]?, ?encrypted_ssn: String?, ?ssn: String? ) -> void @@ -71,15 +71,15 @@ module FinchAPI def to_hash: -> { id: String, dob: String?, - ethnicity: FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity?, + ethnicity: FinchAPI::Models::HRIS::Individual::Individual::ethnicity?, first_name: String?, - gender: FinchAPI::Models::HRIS::Individual::UnionMember0::gender?, + gender: FinchAPI::Models::HRIS::Individual::Individual::gender?, last_name: String?, middle_name: String?, - phone_numbers: ::Array[FinchAPI::HRIS::Individual::UnionMember0::PhoneNumber?]?, + phone_numbers: ::Array[FinchAPI::HRIS::Individual::Individual::PhoneNumber?]?, preferred_name: String?, residence: FinchAPI::Location?, - emails: ::Array[FinchAPI::HRIS::Individual::UnionMember0::Email]?, + emails: ::Array[FinchAPI::HRIS::Individual::Individual::Email]?, encrypted_ssn: String?, ssn: String? } @@ -106,7 +106,7 @@ module FinchAPI TWO_OR_MORE_RACES: :two_or_more_races DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::ethnicity] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::Individual::ethnicity] end type gender = :female | :male | :other | :decline_to_specify @@ -119,28 +119,28 @@ module FinchAPI OTHER: :other DECLINE_TO_SPECIFY: :decline_to_specify - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::gender] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::Individual::gender] end type phone_number = { data: String?, - type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + type: FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::type_? } class PhoneNumber < FinchAPI::Internal::Type::BaseModel attr_accessor data: String? - attr_accessor type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + attr_accessor type: FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::type_? def initialize: ( data: String?, - type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + type: FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::type_? ) -> void def to_hash: -> { data: String?, - type: FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_? + type: FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::type_? } type type_ = :work | :personal @@ -151,29 +151,29 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::PhoneNumber::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::Individual::PhoneNumber::type_] end end type email = { data: String, - type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + type: FinchAPI::Models::HRIS::Individual::Individual::Email::type_? } class Email < FinchAPI::Internal::Type::BaseModel attr_accessor data: String - attr_accessor type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + attr_accessor type: FinchAPI::Models::HRIS::Individual::Individual::Email::type_? def initialize: ( data: String, - type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + type: FinchAPI::Models::HRIS::Individual::Individual::Email::type_? ) -> void def to_hash: -> { data: String, - type: FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_? + type: FinchAPI::Models::HRIS::Individual::Individual::Email::type_? } type type_ = :work | :personal @@ -184,7 +184,7 @@ module FinchAPI WORK: :work PERSONAL: :personal - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::UnionMember0::Email::type_] + def self?.values: -> ::Array[FinchAPI::Models::HRIS::Individual::Individual::Email::type_] end end end From 910d03309b9715f404df6fe39c7f1361f38f13e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 16:41:46 +0000 Subject: [PATCH 46/46] release: 0.1.0-alpha.43 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 58 +++++++++++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/finch_api/version.rb | 2 +- 5 files changed, 62 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 859ebd32..76293726 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.42" + ".": "0.1.0-alpha.43" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e9d9dd..bf98b3c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Changelog +## 0.1.0-alpha.43 (2026-05-01) + +Full Changelog: [v0.1.0-alpha.42...v0.1.0-alpha.43](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.42...v0.1.0-alpha.43) + +### Features + +* **api:** add per endpoint security ([ac937c1](https://github.com/Finch-API/finch-api-ruby/commit/ac937c138291704137a33d18cea1571d2e6f96ca)) +* **api:** api update ([2a1f82f](https://github.com/Finch-API/finch-api-ruby/commit/2a1f82f3af8070b630bb9ba9f10cd9b6f91a02eb)) +* **api:** api update ([d0d32b0](https://github.com/Finch-API/finch-api-ruby/commit/d0d32b0861ed65a60d1636da5cc37c5052ca7e28)) +* **api:** api update ([ee649a8](https://github.com/Finch-API/finch-api-ruby/commit/ee649a8915029f8bce8e676d7af80bbfe5846c61)) +* **api:** api update ([4496981](https://github.com/Finch-API/finch-api-ruby/commit/44969816152b1033dc51052723d552de315c6c9d)) +* **api:** api update ([8ff38e4](https://github.com/Finch-API/finch-api-ruby/commit/8ff38e4aeb774f2ec8f5be0692c787652a72b88f)) +* **api:** api update ([04d90f0](https://github.com/Finch-API/finch-api-ruby/commit/04d90f03077ba6b6459e3a1ecbb41baffd1e9eb5)) +* **api:** change auth to npm to oidc ([de40fd7](https://github.com/Finch-API/finch-api-ruby/commit/de40fd771fe09e381c1439f3c9efd1c5d075572c)) +* **client:** add webhook support ([f4ad88e](https://github.com/Finch-API/finch-api-ruby/commit/f4ad88e63dcec2d9c6f9b64e9f10aa01a34c2af4)) +* support setting headers via env ([d563eb5](https://github.com/Finch-API/finch-api-ruby/commit/d563eb54c98253fff9a54c05632c7f4c19f1616c)) + + +### Bug Fixes + +* align path encoding with RFC 3986 section 3.3 ([0a99d63](https://github.com/Finch-API/finch-api-ruby/commit/0a99d63c11aa9516a7cac12937d35972c9638f32)) +* **api:** remove invalid transform config ([826feaa](https://github.com/Finch-API/finch-api-ruby/commit/826feaab2ca5d0afd202b196f5da0910c029a591)) +* **client:** always add content-length to post body, even when empty ([66e8f66](https://github.com/Finch-API/finch-api-ruby/commit/66e8f668ba49f9959bd0067d4161d972ebad46ee)) +* **client:** loosen json header parsing ([7bc3e65](https://github.com/Finch-API/finch-api-ruby/commit/7bc3e6509545d52948558cc20180865f09e946dc)) +* **docs:** fix mcp installation instructions for remote servers ([8022436](https://github.com/Finch-API/finch-api-ruby/commit/8022436ca504321dffdb8eedabc0c9ee82e0bf45)) +* **internal:** correct multipart form field name encoding ([76c688f](https://github.com/Finch-API/finch-api-ruby/commit/76c688f93a7a6bf6827baa4b1b06ad715826c491)) +* multipart encoding for file arrays ([13e7bc1](https://github.com/Finch-API/finch-api-ruby/commit/13e7bc161a931d7a13128cb32d4bd2cc859784b4)) +* properly mock time in ruby ci tests ([86ece75](https://github.com/Finch-API/finch-api-ruby/commit/86ece75b5fefd736c827c70dc7b6140ec67fdf35)) +* **tests:** skip broken date validation test ([2ee41c8](https://github.com/Finch-API/finch-api-ruby/commit/2ee41c81ef9707aa7180723a283789a5bbaa041d)) +* variable name typo ([09ceda2](https://github.com/Finch-API/finch-api-ruby/commit/09ceda237d92712263d0942f1deb8654afc18071)) + + +### Chores + +* **ci:** skip lint on metadata-only changes ([b8e66d9](https://github.com/Finch-API/finch-api-ruby/commit/b8e66d9232c428b9c4104bf5c6ce6673690afa2a)) +* **ci:** skip uploading artifacts on stainless-internal branches ([1229fe8](https://github.com/Finch-API/finch-api-ruby/commit/1229fe85090c9c58caeb17b10434a8923fe2dcb2)) +* **ci:** support opting out of skipping builds on metadata-only commits ([f892be4](https://github.com/Finch-API/finch-api-ruby/commit/f892be499c5676f466ac47676d4106bb67f52f77)) +* **docs:** remove www prefix ([57bc88c](https://github.com/Finch-API/finch-api-ruby/commit/57bc88cdd60bfec535752170ffeeebe157a0bfce)) +* fix custom code ([3d5cf2f](https://github.com/Finch-API/finch-api-ruby/commit/3d5cf2fde4f02b8b29d07e2ccb98117ddfc75f74)) +* **internal:** codegen related update ([796b4db](https://github.com/Finch-API/finch-api-ruby/commit/796b4dba769b768e65dcff3921257f098d6ff9df)) +* **internal:** codegen related update ([a021ffb](https://github.com/Finch-API/finch-api-ruby/commit/a021ffb4eec64de459cb22c27b4c7c4592003d21)) +* **internal:** more robust bootstrap script ([6be623f](https://github.com/Finch-API/finch-api-ruby/commit/6be623fd1d3ddf902856844d74be66cf00b84195)) +* **internal:** tweak CI branches ([c0b42bc](https://github.com/Finch-API/finch-api-ruby/commit/c0b42bcd72ff06cf71fec9a98856c12043b5cfe2)) +* **internal:** update gitignore ([a315475](https://github.com/Finch-API/finch-api-ruby/commit/a3154752a39a30ad3cb8aac78b2d473c3bb86dcf)) +* **tests:** bump steady to v0.19.4 ([93617aa](https://github.com/Finch-API/finch-api-ruby/commit/93617aad24e3c174e12dfdf2de4bad5cce0aeb2f)) +* **tests:** bump steady to v0.19.5 ([424035c](https://github.com/Finch-API/finch-api-ruby/commit/424035c08a1d4c56c3b1118cd1071bc1cbaad28a)) +* **tests:** bump steady to v0.19.6 ([b832805](https://github.com/Finch-API/finch-api-ruby/commit/b8328058d1e51765ee48832897ebf00984272323)) +* **tests:** bump steady to v0.19.7 ([fe2f5fb](https://github.com/Finch-API/finch-api-ruby/commit/fe2f5fb484c9684d6586106172cd984f17e914c1)) +* **tests:** bump steady to v0.20.1 ([6fb5f11](https://github.com/Finch-API/finch-api-ruby/commit/6fb5f11fe816634a6ea3267f5c10831b2f5a1058)) +* **tests:** bump steady to v0.20.2 ([a37acc5](https://github.com/Finch-API/finch-api-ruby/commit/a37acc5ccb90a944a7bb903befbf8a5faa60a32e)) +* **tests:** bump steady to v0.22.1 ([582e669](https://github.com/Finch-API/finch-api-ruby/commit/582e669ac39599bd86c77b66c2bafcd0b4204ace)) +* update mock server docs ([47876a8](https://github.com/Finch-API/finch-api-ruby/commit/47876a8821367b8d730229c8bf401bc92907d4f0)) + + +### Refactors + +* **tests:** switch from prism to steady ([e294a79](https://github.com/Finch-API/finch-api-ruby/commit/e294a795e94df460394978881960bbc067181a7e)) + ## 0.1.0-alpha.42 (2026-01-16) Full Changelog: [v0.1.0-alpha.41...v0.1.0-alpha.42](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.41...v0.1.0-alpha.42) diff --git a/Gemfile.lock b/Gemfile.lock index 01a79a1a..86f1478c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.42) + finch-api (0.1.0.pre.alpha.43) cgi connection_pool diff --git a/README.md b/README.md index 6877f1c4..d2caebca 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.42" +gem "finch-api", "~> 0.1.0.pre.alpha.43" ``` diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index b6329508..d0a78b57 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.42" + VERSION = "0.1.0.pre.alpha.43" end