Skip to content

Commit 621ca2a

Browse files
chore: improve yard docs readability (#92)
1 parent 00d19d9 commit 621ca2a

26 files changed

+198
-340
lines changed

lib/finch-api/resources/access_tokens.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@ module Resources
55
class AccessTokens
66
# Exchange the authorization code for an access token
77
#
8-
# @param params [FinchAPI::Models::AccessTokenCreateParams, Hash{Symbol=>Object}] .
8+
# @overload create(code:, client_id: nil, client_secret: nil, redirect_uri: nil, request_options: {})
99
#
10-
# @option params [String] :code
11-
#
12-
# @option params [String] :client_id
13-
#
14-
# @option params [String] :client_secret
15-
#
16-
# @option params [String] :redirect_uri
17-
#
18-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
10+
# @param code [String]
11+
# @param client_id [String]
12+
# @param client_secret [String]
13+
# @param redirect_uri [String]
14+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1915
#
2016
# @return [FinchAPI::Models::CreateAccessTokenResponse]
2117
#

lib/finch-api/resources/account.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ module Resources
55
class Account
66
# Disconnect one or more `access_token`s from your application.
77
#
8-
# @param params [FinchAPI::Models::AccountDisconnectParams, Hash{Symbol=>Object}] .
8+
# @overload disconnect(request_options: {})
99
#
10-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
10+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1111
#
1212
# @return [FinchAPI::Models::DisconnectResponse]
1313
#
@@ -23,9 +23,9 @@ def disconnect(params = {})
2323

2424
# Read account information associated with an `access_token`
2525
#
26-
# @param params [FinchAPI::Models::AccountIntrospectParams, Hash{Symbol=>Object}] .
26+
# @overload introspect(request_options: {})
2727
#
28-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
28+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
2929
#
3030
# @return [FinchAPI::Models::Introspection]
3131
#

lib/finch-api/resources/connect/sessions.rb

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,18 @@ class Connect
66
class Sessions
77
# Create a new connect session for an employer
88
#
9-
# @param params [FinchAPI::Models::Connect::SessionNewParams, Hash{Symbol=>Object}] .
10-
#
11-
# @option params [String] :customer_id
12-
#
13-
# @option params [String] :customer_name
14-
#
15-
# @option params [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] :products
16-
#
17-
# @option params [String, nil] :customer_email
18-
#
19-
# @option params [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] :integration
20-
#
21-
# @option params [Boolean, nil] :manual
22-
#
23-
# @option params [Float, nil] :minutes_to_expire The number of minutes until the session expires (defaults to 43,200, which is 30
24-
# days)
25-
#
26-
# @option params [String, nil] :redirect_uri
27-
#
28-
# @option params [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] :sandbox
29-
#
30-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
9+
# @overload new(customer_id:, customer_name:, products:, customer_email: nil, integration: nil, manual: nil, minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, request_options: {})
10+
#
11+
# @param customer_id [String]
12+
# @param customer_name [String]
13+
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
14+
# @param customer_email [String, nil]
15+
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil]
16+
# @param manual [Boolean, nil]
17+
# @param minutes_to_expire [Float, nil]
18+
# @param redirect_uri [String, nil]
19+
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil]
20+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
3121
#
3222
# @return [FinchAPI::Models::Connect::SessionNewResponse]
3323
#
@@ -45,18 +35,13 @@ def new(params)
4535

4636
# Create a new Connect session for reauthenticating an existing connection
4737
#
48-
# @param params [FinchAPI::Models::Connect::SessionReauthenticateParams, Hash{Symbol=>Object}] .
49-
#
50-
# @option params [String] :connection_id The ID of the existing connection to reauthenticate
51-
#
52-
# @option params [Integer, nil] :minutes_to_expire The number of minutes until the session expires (defaults to 43,200, which is 30
53-
# days)
54-
#
55-
# @option params [Array<Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product>, nil] :products The products to request access to (optional for reauthentication)
56-
#
57-
# @option params [String, nil] :redirect_uri The URI to redirect to after the Connect flow is completed
38+
# @overload reauthenticate(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {})
5839
#
59-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
40+
# @param connection_id [String]
41+
# @param minutes_to_expire [Integer, nil]
42+
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product>, nil]
43+
# @param redirect_uri [String, nil]
44+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
6045
#
6146
# @return [FinchAPI::Models::Connect::SessionReauthenticateResponse]
6247
#

lib/finch-api/resources/hris/benefits.rb

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,12 @@ class Benefits
1010
# Creates a new company-wide deduction or contribution. Please use the
1111
# `/providers` endpoint to view available types for each provider.
1212
#
13-
# @param params [FinchAPI::Models::HRIS::BenefitCreateParams, Hash{Symbol=>Object}] .
13+
# @overload create(description: nil, frequency: nil, type: nil, request_options: {})
1414
#
15-
# @option params [String] :description Name of the benefit as it appears in the provider and pay statements. Recommend
16-
# limiting this to <30 characters due to limitations in specific providers (e.g.
17-
# Justworks).
18-
#
19-
# @option params [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] :frequency
20-
#
21-
# @option params [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] :type Type of benefit.
22-
#
23-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
15+
# @param description [String]
16+
# @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil]
17+
# @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil]
18+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
2419
#
2520
# @return [FinchAPI::Models::HRIS::CreateCompanyBenefitsResponse]
2621
#
@@ -38,11 +33,10 @@ def create(params = {})
3833

3934
# Lists deductions and contributions information for a given item
4035
#
41-
# @param benefit_id [String]
42-
#
43-
# @param params [FinchAPI::Models::HRIS::BenefitRetrieveParams, Hash{Symbol=>Object}] .
36+
# @overload retrieve(benefit_id, request_options: {})
4437
#
45-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
38+
# @param benefit_id [String]
39+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
4640
#
4741
# @return [FinchAPI::Models::HRIS::CompanyBenefit]
4842
#
@@ -58,13 +52,11 @@ def retrieve(benefit_id, params = {})
5852

5953
# Updates an existing company-wide deduction or contribution
6054
#
61-
# @param benefit_id [String]
62-
#
63-
# @param params [FinchAPI::Models::HRIS::BenefitUpdateParams, Hash{Symbol=>Object}] .
55+
# @overload update(benefit_id, description: nil, request_options: {})
6456
#
65-
# @option params [String] :description Updated name or description.
66-
#
67-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
57+
# @param benefit_id [String]
58+
# @param description [String]
59+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
6860
#
6961
# @return [FinchAPI::Models::HRIS::UpdateCompanyBenefitResponse]
7062
#
@@ -82,9 +74,9 @@ def update(benefit_id, params = {})
8274

8375
# List all company-wide deductions and contributions.
8476
#
85-
# @param params [FinchAPI::Models::HRIS::BenefitListParams, Hash{Symbol=>Object}] .
77+
# @overload list(request_options: {})
8678
#
87-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
79+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
8880
#
8981
# @return [FinchAPI::SinglePage<FinchAPI::Models::HRIS::CompanyBenefit>]
9082
#
@@ -101,9 +93,9 @@ def list(params = {})
10193

10294
# Get deductions metadata
10395
#
104-
# @param params [FinchAPI::Models::HRIS::BenefitListSupportedBenefitsParams, Hash{Symbol=>Object}] .
96+
# @overload list_supported_benefits(request_options: {})
10597
#
106-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
98+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
10799
#
108100
# @return [FinchAPI::SinglePage<FinchAPI::Models::HRIS::SupportedBenefit>]
109101
#

lib/finch-api/resources/hris/benefits/individuals.rb

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ class Individuals
1010
# adjusted. Making the same request multiple times will not create new
1111
# enrollments, but will continue to set the state of the existing enrollment.
1212
#
13-
# @param benefit_id [String]
14-
#
15-
# @param params [FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams, Hash{Symbol=>Object}] .
13+
# @overload enroll_many(benefit_id, individuals: nil, request_options: {})
1614
#
17-
# @option params [Array<FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual>] :individuals Array of the individual_id to enroll and a configuration object.
18-
#
19-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
15+
# @param benefit_id [String]
16+
# @param individuals [Array<FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual>]
17+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
2018
#
2119
# @return [FinchAPI::SinglePage<FinchAPI::Models::HRIS::Benefits::EnrolledIndividual>]
2220
#
@@ -35,11 +33,10 @@ def enroll_many(benefit_id, params = {})
3533

3634
# Lists individuals currently enrolled in a given deduction.
3735
#
38-
# @param benefit_id [String]
39-
#
40-
# @param params [FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsParams, Hash{Symbol=>Object}] .
36+
# @overload enrolled_ids(benefit_id, request_options: {})
4137
#
42-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
38+
# @param benefit_id [String]
39+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
4340
#
4441
# @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse]
4542
#
@@ -55,14 +52,11 @@ def enrolled_ids(benefit_id, params = {})
5552

5653
# Get enrollment information for the given individuals.
5754
#
58-
# @param benefit_id [String]
55+
# @overload retrieve_many_benefits(benefit_id, individual_ids: nil, request_options: {})
5956
#
60-
# @param params [FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams, Hash{Symbol=>Object}] .
61-
#
62-
# @option params [String] :individual_ids comma-delimited list of stable Finch uuids for each individual. If empty,
63-
# defaults to all individuals
64-
#
65-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
57+
# @param benefit_id [String]
58+
# @param individual_ids [String]
59+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
6660
#
6761
# @return [FinchAPI::SinglePage<FinchAPI::Models::HRIS::Benefits::IndividualBenefit>]
6862
#
@@ -82,13 +76,11 @@ def retrieve_many_benefits(benefit_id, params = {})
8276

8377
# Unenroll individuals from a deduction or contribution
8478
#
85-
# @param benefit_id [String]
79+
# @overload unenroll_many(benefit_id, individual_ids: nil, request_options: {})
8680
#
87-
# @param params [FinchAPI::Models::HRIS::Benefits::IndividualUnenrollManyParams, Hash{Symbol=>Object}] .
88-
#
89-
# @option params [Array<String>] :individual_ids Array of individual_ids to unenroll.
90-
#
91-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
81+
# @param benefit_id [String]
82+
# @param individual_ids [Array<String>]
83+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
9284
#
9385
# @return [FinchAPI::SinglePage<FinchAPI::Models::HRIS::Benefits::UnenrolledIndividual>]
9486
#

lib/finch-api/resources/hris/company.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ class HRIS
66
class Company
77
# Read basic company data
88
#
9-
# @param params [FinchAPI::Models::HRIS::CompanyRetrieveParams, Hash{Symbol=>Object}] .
9+
# @overload retrieve(request_options: {})
1010
#
11-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
11+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1212
#
1313
# @return [FinchAPI::Models::HRIS::HRISCompany]
1414
#

lib/finch-api/resources/hris/directory.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ class HRIS
66
class Directory
77
# Read company directory and organization structure
88
#
9-
# @param params [FinchAPI::Models::HRIS::DirectoryListParams, Hash{Symbol=>Object}] .
9+
# @overload list(limit: nil, offset: nil, request_options: {})
1010
#
11-
# @option params [Integer] :limit Number of employees to return (defaults to all)
12-
#
13-
# @option params [Integer] :offset Index to start from (defaults to 0)
14-
#
15-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
11+
# @param limit [Integer]
12+
# @param offset [Integer]
13+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1614
#
1715
# @return [FinchAPI::IndividualsPage<FinchAPI::Models::HRIS::IndividualInDirectory>]
1816
#

lib/finch-api/resources/hris/documents.rb

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@ class Documents
77
# **Beta:** This endpoint is in beta and may change. Retrieve a list of
88
# company-wide documents.
99
#
10-
# @param params [FinchAPI::Models::HRIS::DocumentListParams, Hash{Symbol=>Object}] .
10+
# @overload list(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {})
1111
#
12-
# @option params [Array<String>] :individual_ids Comma-delimited list of stable Finch uuids for each individual. If empty,
13-
# defaults to all individuals
14-
#
15-
# @option params [Integer] :limit Number of documents to return (defaults to all)
16-
#
17-
# @option params [Integer] :offset Index to start from (defaults to 0)
18-
#
19-
# @option params [Array<Symbol, FinchAPI::Models::HRIS::DocumentListParams::Type>] :types Comma-delimited list of document types to filter on. If empty, defaults to all
20-
# types
21-
#
22-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
12+
# @param individual_ids [Array<String>]
13+
# @param limit [Integer]
14+
# @param offset [Integer]
15+
# @param types [Array<Symbol, FinchAPI::Models::HRIS::DocumentListParams::Type>]
16+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
2317
#
2418
# @return [FinchAPI::Models::HRIS::DocumentListResponse]
2519
#
@@ -38,11 +32,10 @@ def list(params = {})
3832
# **Beta:** This endpoint is in beta and may change. Retrieve details of a
3933
# specific document by its ID.
4034
#
41-
# @param document_id [String] The unique identifier of the document.
42-
#
43-
# @param params [FinchAPI::Models::HRIS::DocumentRetreiveParams, Hash{Symbol=>Object}] .
35+
# @overload retreive(document_id, request_options: {})
4436
#
45-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
37+
# @param document_id [String]
38+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
4639
#
4740
# @return [FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005]
4841
#

lib/finch-api/resources/hris/employments.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ class HRIS
66
class Employments
77
# Read individual employment and income data
88
#
9-
# @param params [FinchAPI::Models::HRIS::EmploymentRetrieveManyParams, Hash{Symbol=>Object}] .
9+
# @overload retrieve_many(requests:, request_options: {})
1010
#
11-
# @option params [Array<FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request>] :requests The array of batch requests.
12-
#
13-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
11+
# @param requests [Array<FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request>]
12+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1413
#
1514
# @return [FinchAPI::ResponsesPage<FinchAPI::Models::HRIS::EmploymentDataResponse>]
1615
#

lib/finch-api/resources/hris/individuals.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ class HRIS
66
class Individuals
77
# Read individual data, excluding income and employment data
88
#
9-
# @param params [FinchAPI::Models::HRIS::IndividualRetrieveManyParams, Hash{Symbol=>Object}] .
9+
# @overload retrieve_many(options: nil, requests: nil, request_options: {})
1010
#
11-
# @option params [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] :options
12-
#
13-
# @option params [Array<FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Request>] :requests
14-
#
15-
# @option params [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
11+
# @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil]
12+
# @param requests [Array<FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Request>]
13+
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1614
#
1715
# @return [FinchAPI::ResponsesPage<FinchAPI::Models::HRIS::IndividualResponse>]
1816
#

0 commit comments

Comments
 (0)