@@ -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