Skip to content

Commit 4e526be

Browse files
feat(api): api update
1 parent 96b3cd9 commit 4e526be

File tree

8 files changed

+1442
-139
lines changed

8 files changed

+1442
-139
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-b57bba4d2e9b4a64e1c8c3f037aad70e35a164bb1f3b5082948717b94d501a30.yml
3-
openapi_spec_hash: 7e111f64fb635d9dc76da7eaedd0296f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-9c32d7e477bd1c441abd65db0dfe6220948aa00face05fc8b57395e368ee2099.yml
3+
openapi_spec_hash: 3da940ffc5da8000a4f359c958ed341f
44
config_hash: 6d3585c0032e08d723d077d660fc8448

lib/finch_api/models/hris/benefit_contribution.rb

Lines changed: 124 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,131 @@
33
module FinchAPI
44
module Models
55
module HRIS
6-
class BenefitContribution < FinchAPI::Internal::Type::BaseModel
7-
# @!attribute amount
8-
# Contribution amount in cents (if `fixed`) or basis points (if `percent`).
9-
#
10-
# @return [Integer, nil]
11-
required :amount, Integer, nil?: true
12-
13-
# @!attribute type
14-
# Contribution type.
15-
#
16-
# @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil]
17-
required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::Type }, nil?: true
18-
19-
# @!method initialize(amount:, type:)
20-
# @param amount [Integer, nil] Contribution amount in cents (if `fixed`) or basis points (if `percent`).
21-
#
22-
# @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::Type, nil] Contribution type.
23-
24-
# Contribution type.
25-
#
26-
# @see FinchAPI::Models::HRIS::BenefitContribution#type
27-
module Type
28-
extend FinchAPI::Internal::Type::Enum
29-
30-
FIXED = :fixed
31-
PERCENT = :percent
32-
33-
# @!method self.values
34-
# @return [Array<Symbol>]
6+
module BenefitContribution
7+
extend FinchAPI::Internal::Type::Union
8+
9+
variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember0 }
10+
11+
variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember1 }
12+
13+
variant -> { FinchAPI::HRIS::BenefitContribution::UnionMember2 }
14+
15+
class UnionMember0 < FinchAPI::Internal::Type::BaseModel
16+
# @!attribute amount
17+
# Contribution amount in cents.
18+
#
19+
# @return [Integer]
20+
required :amount, Integer
21+
22+
# @!attribute type
23+
# Fixed contribution type.
24+
#
25+
# @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type]
26+
required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember0::Type }
27+
28+
# @!method initialize(amount:, type:)
29+
# @param amount [Integer] Contribution amount in cents.
30+
#
31+
# @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember0::Type] Fixed contribution type.
32+
33+
# Fixed contribution type.
34+
#
35+
# @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember0#type
36+
module Type
37+
extend FinchAPI::Internal::Type::Enum
38+
39+
FIXED = :fixed
40+
41+
# @!method self.values
42+
# @return [Array<Symbol>]
43+
end
3544
end
45+
46+
class UnionMember1 < FinchAPI::Internal::Type::BaseModel
47+
# @!attribute amount
48+
# Contribution amount in basis points (1/100th of a percent).
49+
#
50+
# @return [Integer]
51+
required :amount, Integer
52+
53+
# @!attribute type
54+
# Percentage contribution type.
55+
#
56+
# @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type]
57+
required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember1::Type }
58+
59+
# @!method initialize(amount:, type:)
60+
# @param amount [Integer] Contribution amount in basis points (1/100th of a percent).
61+
#
62+
# @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1::Type] Percentage contribution type.
63+
64+
# Percentage contribution type.
65+
#
66+
# @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember1#type
67+
module Type
68+
extend FinchAPI::Internal::Type::Enum
69+
70+
PERCENT = :percent
71+
72+
# @!method self.values
73+
# @return [Array<Symbol>]
74+
end
75+
end
76+
77+
class UnionMember2 < FinchAPI::Internal::Type::BaseModel
78+
# @!attribute tiers
79+
# Array of tier objects defining employer match tiers based on employee
80+
# contribution thresholds.
81+
#
82+
# @return [Array<FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Tier>]
83+
required :tiers,
84+
-> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::BenefitContribution::UnionMember2::Tier] }
85+
86+
# @!attribute type
87+
# Tiered contribution type (only valid for company_contribution).
88+
#
89+
# @return [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type]
90+
required :type, enum: -> { FinchAPI::HRIS::BenefitContribution::UnionMember2::Type }
91+
92+
# @!method initialize(tiers:, type:)
93+
# Some parameter documentations has been truncated, see
94+
# {FinchAPI::Models::HRIS::BenefitContribution::UnionMember2} for more details.
95+
#
96+
# @param tiers [Array<FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Tier>] Array of tier objects defining employer match tiers based on employee contributi
97+
#
98+
# @param type [Symbol, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2::Type] Tiered contribution type (only valid for company_contribution).
99+
100+
class Tier < FinchAPI::Internal::Type::BaseModel
101+
# @!attribute match
102+
#
103+
# @return [Integer]
104+
required :match, Integer
105+
106+
# @!attribute threshold
107+
#
108+
# @return [Integer]
109+
required :threshold, Integer
110+
111+
# @!method initialize(match:, threshold:)
112+
# @param match [Integer]
113+
# @param threshold [Integer]
114+
end
115+
116+
# Tiered contribution type (only valid for company_contribution).
117+
#
118+
# @see FinchAPI::Models::HRIS::BenefitContribution::UnionMember2#type
119+
module Type
120+
extend FinchAPI::Internal::Type::Enum
121+
122+
TIERED = :tiered
123+
124+
# @!method self.values
125+
# @return [Array<Symbol>]
126+
end
127+
end
128+
129+
# @!method self.variants
130+
# @return [Array(FinchAPI::Models::HRIS::BenefitContribution::UnionMember0, FinchAPI::Models::HRIS::BenefitContribution::UnionMember1, FinchAPI::Models::HRIS::BenefitContribution::UnionMember2)]
36131
end
37132
end
38133
end

0 commit comments

Comments
 (0)