Skip to content

Commit ce69eaa

Browse files
release: 0.1.0-alpha.24 (#155)
* chore(internal): version bump * feat(api): api update * codegen metadata * codegen metadata * codegen metadata * feat(api): api update * release: 0.1.0-alpha.24 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 1935034 commit ce69eaa

30 files changed

+629
-541
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.23"
2+
".": "0.1.0-alpha.24"
33
}

.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-f7e741bc6e0175fd96a9db5348092b90a77b0985154c0814bb681ad5dccdf19a.yml
3-
openapi_spec_hash: b348a9ef407a8e91dd770fcb219d4ac5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-73c284d36c1ed2d9963fc733e421005fad76e559de8efe9baa6511a43dd72668.yml
3+
openapi_spec_hash: 1e58c4445919b71c77e5c7f16bd6fa7d
44
config_hash: 5146b12344dae76238940989dac1e8a0

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 0.1.0-alpha.24 (2025-07-23)
4+
5+
Full Changelog: [v0.1.0-alpha.23...v0.1.0-alpha.24](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.23...v0.1.0-alpha.24)
6+
7+
### Features
8+
9+
* **api:** api update ([c07a9d2](https://github.com/Finch-API/finch-api-ruby/commit/c07a9d2fb3488ebec525699f3b81ba70ffc903a2))
10+
* **api:** api update ([bd3b67a](https://github.com/Finch-API/finch-api-ruby/commit/bd3b67adfa1d4f9d507dcf6d604b0476955e38d7))
11+
12+
13+
### Chores
14+
15+
* **internal:** version bump ([5d0dfc8](https://github.com/Finch-API/finch-api-ruby/commit/5d0dfc87e18fe72623ce1ff8154b8614e228611e))
16+
317
## 0.1.0-alpha.23 (2025-07-02)
418

519
Full Changelog: [v0.1.0-alpha.22...v0.1.0-alpha.23](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.22...v0.1.0-alpha.23)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
finch-api (0.1.0.pre.alpha.22)
14+
finch-api (0.1.0.pre.alpha.23)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
1717
<!-- x-release-please-start-version -->
1818

1919
```ruby
20-
gem "finch-api", "~> 0.1.0.pre.alpha.23"
20+
gem "finch-api", "~> 0.1.0.pre.alpha.24"
2121
```
2222

2323
<!-- x-release-please-end -->
@@ -222,25 +222,25 @@ finch.hris.directory.list(**params)
222222
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
223223

224224
```ruby
225-
# :one_time
226-
puts(FinchAPI::HRIS::BenefitFrequency::ONE_TIME)
225+
# :every_paycheck
226+
puts(FinchAPI::HRIS::BenefitFrequency::EVERY_PAYCHECK)
227227

228228
# Revealed type: `T.all(FinchAPI::HRIS::BenefitFrequency, Symbol)`
229-
T.reveal_type(FinchAPI::HRIS::BenefitFrequency::ONE_TIME)
229+
T.reveal_type(FinchAPI::HRIS::BenefitFrequency::EVERY_PAYCHECK)
230230
```
231231

232232
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
233233

234234
```ruby
235235
# Using the enum constants preserves the tagged type information:
236236
finch.hris.benefits.create(
237-
frequency: FinchAPI::HRIS::BenefitFrequency::ONE_TIME,
237+
frequency: FinchAPI::HRIS::BenefitFrequency::EVERY_PAYCHECK,
238238
#
239239
)
240240

241241
# Literal values are also permissible:
242242
finch.hris.benefits.create(
243-
frequency: :one_time,
243+
frequency: :every_paycheck,
244244
#
245245
)
246246
```

lib/finch_api/models/hris/benefit_contribution.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ class BenefitContribution < FinchAPI::Internal::Type::BaseModel
88
# Contribution amount in cents (if `fixed`) or basis points (if `percent`).
99
#
1010
# @return [Integer, nil]
11-
optional :amount, Integer, nil?: true
11+
required :amount, Integer, nil?: true
1212

1313
# @!attribute type
1414
# Contribution type.
1515
#
1616
# @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil]
17-
optional :type, enum: -> { FinchAPI::HRIS::BenefitContribution::Type }, nil?: true
17+
required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::Type }, nil?: true
1818

19-
# @!method initialize(amount: nil, type: nil)
19+
# @!method initialize(amount:, type:)
2020
# @param amount [Integer, nil] Contribution amount in cents (if `fixed`) or basis points (if `percent`).
2121
#
2222
# @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] Contribution type.

lib/finch_api/models/hris/benefit_create_params.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ class BenefitCreateParams < FinchAPI::Internal::Type::BaseModel
5353
class CompanyContribution < FinchAPI::Internal::Type::BaseModel
5454
# @!attribute tiers
5555
#
56-
# @return [Array<FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier>, nil]
57-
optional :tiers,
56+
# @return [Array<FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier>]
57+
required :tiers,
5858
-> {
5959
FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier]
6060
}
6161

6262
# @!attribute type
6363
#
64-
# @return [Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type, nil]
65-
optional :type, enum: -> { FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type }
64+
# @return [Symbol, FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Type]
65+
required :type, enum: -> { FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type }
6666

67-
# @!method initialize(tiers: nil, type: nil)
67+
# @!method initialize(tiers:, type:)
6868
# The company match for this benefit.
6969
#
7070
# @param tiers [Array<FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution::Tier>]
@@ -73,15 +73,15 @@ class CompanyContribution < FinchAPI::Internal::Type::BaseModel
7373
class Tier < FinchAPI::Internal::Type::BaseModel
7474
# @!attribute match
7575
#
76-
# @return [Integer, nil]
77-
optional :match, Integer
76+
# @return [Integer]
77+
required :match, Integer
7878

7979
# @!attribute threshold
8080
#
81-
# @return [Integer, nil]
82-
optional :threshold, Integer
81+
# @return [Integer]
82+
required :threshold, Integer
8383

84-
# @!method initialize(match: nil, threshold: nil)
84+
# @!method initialize(match:, threshold:)
8585
# @param match [Integer]
8686
# @param threshold [Integer]
8787
end

lib/finch_api/models/hris/benefit_frequency.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ module HRIS
77
module BenefitFrequency
88
extend FinchAPI::Internal::Type::Enum
99

10-
ONE_TIME = :one_time
1110
EVERY_PAYCHECK = :every_paycheck
1211
MONTHLY = :monthly
12+
ONE_TIME = :one_time
1313

1414
# @!method self.values
1515
# @return [Array<Symbol>]

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

Lines changed: 107 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8,83 +8,125 @@ module Benefits
88
class IndividualBenefit < FinchAPI::Internal::Type::BaseModel
99
# @!attribute body
1010
#
11-
# @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body, nil]
12-
optional :body, -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body }
11+
# @return [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError]
12+
required :body, union: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body }
1313

1414
# @!attribute code
1515
#
16-
# @return [Integer, nil]
17-
optional :code, Integer
16+
# @return [Integer]
17+
required :code, Integer
1818

1919
# @!attribute individual_id
2020
#
21-
# @return [String, nil]
22-
optional :individual_id, String
21+
# @return [String]
22+
required :individual_id, String
2323

24-
# @!method initialize(body: nil, code: nil, individual_id: nil)
25-
# @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body]
24+
# @!method initialize(body:, code:, individual_id:)
25+
# @param body [FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError]
2626
# @param code [Integer]
2727
# @param individual_id [String]
2828

2929
# @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit#body
30-
class Body < FinchAPI::Internal::Type::BaseModel
31-
# @!attribute annual_maximum
32-
# If the benefit supports annual maximum, the amount in cents for this individual.
33-
#
34-
# @return [Integer, nil]
35-
optional :annual_maximum, Integer, nil?: true
36-
37-
# @!attribute catch_up
38-
# If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
39-
# for this individual.
40-
#
41-
# @return [Boolean, nil]
42-
optional :catch_up, FinchAPI::Internal::Type::Boolean, nil?: true
43-
44-
# @!attribute company_contribution
45-
#
46-
# @return [FinchAPI::Models::HRIS::BenefitContribution, nil]
47-
optional :company_contribution, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true
48-
49-
# @!attribute employee_deduction
50-
#
51-
# @return [FinchAPI::Models::HRIS::BenefitContribution, nil]
52-
optional :employee_deduction, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true
53-
54-
# @!attribute hsa_contribution_limit
55-
# Type for HSA contribution limit if the benefit is a HSA.
56-
#
57-
# @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil]
58-
optional :hsa_contribution_limit,
59-
enum: -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit },
60-
nil?: true
61-
62-
# @!method initialize(annual_maximum: nil, catch_up: nil, company_contribution: nil, employee_deduction: nil, hsa_contribution_limit: nil)
63-
# Some parameter documentations has been truncated, see
64-
# {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body} for more details.
65-
#
66-
# @param annual_maximum [Integer, nil] If the benefit supports annual maximum, the amount in cents for this individual.
67-
#
68-
# @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
69-
#
70-
# @param company_contribution [FinchAPI::Models::HRIS::BenefitContribution, nil]
71-
#
72-
# @param employee_deduction [FinchAPI::Models::HRIS::BenefitContribution, nil]
73-
#
74-
# @param hsa_contribution_limit [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit, nil] Type for HSA contribution limit if the benefit is a HSA.
75-
76-
# Type for HSA contribution limit if the benefit is a HSA.
77-
#
78-
# @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body#hsa_contribution_limit
79-
module HsaContributionLimit
80-
extend FinchAPI::Internal::Type::Enum
81-
82-
INDIVIDUAL = :individual
83-
FAMILY = :family
84-
85-
# @!method self.values
86-
# @return [Array<Symbol>]
30+
module Body
31+
extend FinchAPI::Internal::Type::Union
32+
33+
variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0 }
34+
35+
variant -> { FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError }
36+
37+
class UnionMember0 < FinchAPI::Internal::Type::BaseModel
38+
# @!attribute annual_maximum
39+
# If the benefit supports annual maximum, the amount in cents for this individual.
40+
#
41+
# @return [Integer, nil]
42+
required :annual_maximum, Integer, nil?: true
43+
44+
# @!attribute catch_up
45+
# If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
46+
# for this individual.
47+
#
48+
# @return [Boolean, nil]
49+
required :catch_up, FinchAPI::Internal::Type::Boolean, nil?: true
50+
51+
# @!attribute company_contribution
52+
#
53+
# @return [FinchAPI::Models::HRIS::BenefitContribution, nil]
54+
required :company_contribution, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true
55+
56+
# @!attribute employee_deduction
57+
#
58+
# @return [FinchAPI::Models::HRIS::BenefitContribution, nil]
59+
required :employee_deduction, -> { FinchAPI::HRIS::BenefitContribution }, nil?: true
60+
61+
# @!attribute hsa_contribution_limit
62+
# Type for HSA contribution limit if the benefit is a HSA.
63+
#
64+
# @return [Symbol, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit, nil]
65+
optional :hsa_contribution_limit,
66+
enum: -> {
67+
FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit
68+
},
69+
nil?: true
70+
71+
# @!method initialize(annual_maximum:, catch_up:, company_contribution:, employee_deduction:, hsa_contribution_limit: nil)
72+
# Some parameter documentations has been truncated, see
73+
# {FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0} for
74+
# more details.
75+
#
76+
# @param annual_maximum [Integer, nil] If the benefit supports annual maximum, the amount in cents for this individual.
77+
#
78+
# @param catch_up [Boolean, nil] If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
79+
#
80+
# @param company_contribution [FinchAPI::Models::HRIS::BenefitContribution, nil]
81+
#
82+
# @param employee_deduction [FinchAPI::Models::HRIS::BenefitContribution, nil]
83+
#
84+
# @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.
85+
86+
# Type for HSA contribution limit if the benefit is a HSA.
87+
#
88+
# @see FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0#hsa_contribution_limit
89+
module HsaContributionLimit
90+
extend FinchAPI::Internal::Type::Enum
91+
92+
INDIVIDUAL = :individual
93+
FAMILY = :family
94+
95+
# @!method self.values
96+
# @return [Array<Symbol>]
97+
end
8798
end
99+
100+
class BatchError < FinchAPI::Internal::Type::BaseModel
101+
# @!attribute code
102+
#
103+
# @return [Float]
104+
required :code, Float
105+
106+
# @!attribute message
107+
#
108+
# @return [String]
109+
required :message, String
110+
111+
# @!attribute name
112+
#
113+
# @return [String]
114+
required :name, String
115+
116+
# @!attribute finch_code
117+
#
118+
# @return [String, nil]
119+
optional :finch_code, String
120+
121+
# @!method initialize(code:, message:, name:, finch_code: nil)
122+
# @param code [Float]
123+
# @param message [String]
124+
# @param name [String]
125+
# @param finch_code [String]
126+
end
127+
128+
# @!method self.variants
129+
# @return [Array(FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::UnionMember0, FinchAPI::Models::HRIS::Benefits::IndividualBenefit::Body::BatchError)]
88130
end
89131
end
90132
end

0 commit comments

Comments
 (0)