Skip to content

Commit 2c193f3

Browse files
feat(api): api update
1 parent a463808 commit 2c193f3

File tree

126 files changed

+562
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+562
-512
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-03a89ccdf10add981e714ad74c145cd3a2408bd0223108bbfe01cef4256ef7ed.yml
3-
openapi_spec_hash: 4179c69ca2f55a9fcfab41710a2f452c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0105d239fcaf84750c886dfa6c2cfbf2b2087f89a48f8827c4cbe28479ebfb13.yml
3+
openapi_spec_hash: 34895c3d3c137fb9f5a019ac5370afbb
44
config_hash: 6d3585c0032e08d723d077d660fc8448

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require "finch_api"
3030

3131
finch = FinchAPI::Client.new(access_token: "My Access Token")
3232

33-
page = finch.hris.directory.list(entity_ids: ["550e8400-e29b-41d4-a716-446655440000"])
33+
page = finch.hris.directory.list
3434

3535
puts(page.id)
3636
```
@@ -42,7 +42,7 @@ List methods in the Finch API are paginated.
4242
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
4343

4444
```ruby
45-
page = finch.hris.directory.list(entity_ids: ["550e8400-e29b-41d4-a716-446655440000"])
45+
page = finch.hris.directory.list
4646

4747
# Fetch single item from page.
4848
directory = page.individuals[0]
@@ -69,7 +69,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
6969

7070
```ruby
7171
begin
72-
company = finch.hris.company.retrieve(entity_ids: ["550e8400-e29b-41d4-a716-446655440000"])
72+
company = finch.hris.company.retrieve
7373
rescue FinchAPI::Errors::APIConnectionError => e
7474
puts("The server could not be reached")
7575
puts(e.cause) # an underlying Exception, likely raised within `net/http`
@@ -112,10 +112,7 @@ finch = FinchAPI::Client.new(
112112
)
113113

114114
# Or, configure per-request:
115-
finch.hris.directory.list(
116-
entity_ids: ["550e8400-e29b-41d4-a716-446655440000"],
117-
request_options: {max_retries: 5}
118-
)
115+
finch.hris.directory.list(request_options: {max_retries: 5})
119116
```
120117

121118
### Timeouts
@@ -129,10 +126,7 @@ finch = FinchAPI::Client.new(
129126
)
130127

131128
# Or, configure per-request:
132-
finch.hris.directory.list(
133-
entity_ids: ["550e8400-e29b-41d4-a716-446655440000"],
134-
request_options: {timeout: 5}
135-
)
129+
finch.hris.directory.list(request_options: {timeout: 5})
136130
```
137131

138132
On timeout, `FinchAPI::Errors::APITimeoutError` is raised.
@@ -164,7 +158,6 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
164158
```ruby
165159
page =
166160
finch.hris.directory.list(
167-
entity_ids: ["550e8400-e29b-41d4-a716-446655440000"],
168161
request_options: {
169162
extra_query: {my_query_parameter: value},
170163
extra_body: {my_body_parameter: value},
@@ -210,17 +203,17 @@ This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitio
210203
You can provide typesafe request parameters like so:
211204

212205
```ruby
213-
finch.hris.directory.list(entity_ids: ["550e8400-e29b-41d4-a716-446655440000"])
206+
finch.hris.directory.list
214207
```
215208

216209
Or, equivalently:
217210

218211
```ruby
219212
# Hashes work, but are not typesafe:
220-
finch.hris.directory.list(entity_ids: ["550e8400-e29b-41d4-a716-446655440000"])
213+
finch.hris.directory.list
221214

222215
# You can also splat a full Params class:
223-
params = FinchAPI::HRIS::DirectoryListParams.new(entity_ids: ["550e8400-e29b-41d4-a716-446655440000"])
216+
params = FinchAPI::HRIS::DirectoryListParams.new
224217
finch.hris.directory.list(**params)
225218
```
226219

lib/finch_api/models/hris/benefit_create_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel
1111
# @!attribute entity_ids
1212
# The entity IDs to specify which entities' data to access.
1313
#
14-
# @return [Array<String>]
15-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
14+
# @return [Array<String>, nil]
15+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1616

1717
# @!attribute company_contribution
1818
# The company match for this benefit.
@@ -42,7 +42,7 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel
4242
# @return [Symbol, FinchAPI::Models::HRIS::BenefitType, nil]
4343
optional :type, enum: -> { FinchAPI::HRIS::BenefitType }, nil?: true
4444

45-
# @!method initialize(entity_ids:, company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {})
45+
# @!method initialize(entity_ids: nil, company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {})
4646
# Some parameter documentations has been truncated, see
4747
# {FinchAPI::Models::HRIS::BenefitCreateParams} for more details.
4848
#

lib/finch_api/models/hris/benefit_list_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class BenefitListParams < FinchAPI::Internal::Type::BaseModel
1111
# @!attribute entity_ids
1212
# The entity IDs to specify which entities' data to access.
1313
#
14-
# @return [Array<String>]
15-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
14+
# @return [Array<String>, nil]
15+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1616

17-
# @!method initialize(entity_ids:, request_options: {})
17+
# @!method initialize(entity_ids: nil, request_options: {})
1818
# @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
1919
#
2020
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]

lib/finch_api/models/hris/benefit_list_supported_benefits_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class BenefitListSupportedBenefitsParams < FinchAPI::Internal::Type::BaseModel
1111
# @!attribute entity_ids
1212
# The entity IDs to specify which entities' data to access.
1313
#
14-
# @return [Array<String>]
15-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
14+
# @return [Array<String>, nil]
15+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1616

17-
# @!method initialize(entity_ids:, request_options: {})
17+
# @!method initialize(entity_ids: nil, request_options: {})
1818
# @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
1919
#
2020
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]

lib/finch_api/models/hris/benefit_retrieve_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class BenefitRetrieveParams < FinchAPI::Internal::Type::BaseModel
1111
# @!attribute entity_ids
1212
# The entity IDs to specify which entities' data to access.
1313
#
14-
# @return [Array<String>]
15-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
14+
# @return [Array<String>, nil]
15+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1616

17-
# @!method initialize(entity_ids:, request_options: {})
17+
# @!method initialize(entity_ids: nil, request_options: {})
1818
# @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
1919
#
2020
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]

lib/finch_api/models/hris/benefit_update_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ class BenefitUpdateParams < FinchAPI::Internal::Type::BaseModel
1111
# @!attribute entity_ids
1212
# The entity IDs to specify which entities' data to access.
1313
#
14-
# @return [Array<String>]
15-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
14+
# @return [Array<String>, nil]
15+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1616

1717
# @!attribute description
1818
# Updated name or description.
1919
#
2020
# @return [String, nil]
2121
optional :description, String
2222

23-
# @!method initialize(entity_ids:, description: nil, request_options: {})
23+
# @!method initialize(entity_ids: nil, description: nil, request_options: {})
2424
# @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
2525
#
2626
# @param description [String] Updated name or description.

lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel
1212
# @!attribute entity_ids
1313
# The entity IDs to specify which entities' data to access.
1414
#
15-
# @return [Array<String>]
16-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
15+
# @return [Array<String>, nil]
16+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1717

1818
# @!attribute individuals
1919
# Array of the individual_id to enroll and a configuration object.
@@ -22,7 +22,7 @@ class IndividualEnrollManyParams < FinchAPI::Internal::Type::BaseModel
2222
optional :individuals,
2323
-> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Benefits::IndividualEnrollManyParams::Individual] }
2424

25-
# @!method initialize(entity_ids:, individuals: nil, request_options: {})
25+
# @!method initialize(entity_ids: nil, individuals: nil, request_options: {})
2626
# @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
2727
#
2828
# @param individuals [Array<FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual>] Array of the individual_id to enroll and a configuration object.

lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class IndividualEnrolledIDsParams < FinchAPI::Internal::Type::BaseModel
1212
# @!attribute entity_ids
1313
# The entity IDs to specify which entities' data to access.
1414
#
15-
# @return [Array<String>]
16-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
15+
# @return [Array<String>, nil]
16+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1717

18-
# @!method initialize(entity_ids:, request_options: {})
18+
# @!method initialize(entity_ids: nil, request_options: {})
1919
# @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
2020
#
2121
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]

lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel
1212
# @!attribute entity_ids
1313
# The entity IDs to specify which entities' data to access.
1414
#
15-
# @return [Array<String>]
16-
required :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
15+
# @return [Array<String>, nil]
16+
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
1717

1818
# @!attribute individual_ids
1919
# comma-delimited list of stable Finch uuids for each individual. If empty,
@@ -22,7 +22,7 @@ class IndividualRetrieveManyBenefitsParams < FinchAPI::Internal::Type::BaseModel
2222
# @return [String, nil]
2323
optional :individual_ids, String
2424

25-
# @!method initialize(entity_ids:, individual_ids: nil, request_options: {})
25+
# @!method initialize(entity_ids: nil, individual_ids: nil, request_options: {})
2626
# Some parameter documentations has been truncated, see
2727
# {FinchAPI::Models::HRIS::Benefits::IndividualRetrieveManyBenefitsParams} for
2828
# more details.

0 commit comments

Comments
 (0)