finch-api 0.1.0.pre.alpha.23 → 0.1.0.pre.alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,41 +105,19 @@ module FinchAPI
105
105
 
106
106
  sig do
107
107
  returns(
108
- T.nilable(
109
- T::Array[
110
- FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier
111
- ]
112
- )
108
+ T::Array[
109
+ FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier
110
+ ]
113
111
  )
114
112
  end
115
- attr_reader :tiers
116
-
117
- sig do
118
- params(
119
- tiers:
120
- T::Array[
121
- FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Tier::OrHash
122
- ]
123
- ).void
124
- end
125
- attr_writer :tiers
113
+ attr_accessor :tiers
126
114
 
127
115
  sig do
128
116
  returns(
129
- T.nilable(
130
- FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol
131
- )
117
+ FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol
132
118
  )
133
119
  end
134
- attr_reader :type
135
-
136
- sig do
137
- params(
138
- type:
139
- FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol
140
- ).void
141
- end
142
- attr_writer :type
120
+ attr_accessor :type
143
121
 
144
122
  # The company match for this benefit.
145
123
  sig do
@@ -152,7 +130,7 @@ module FinchAPI
152
130
  FinchAPI::HRIS::BenefitCreateParams::CompanyContribution::Type::OrSymbol
153
131
  ).returns(T.attached_class)
154
132
  end
155
- def self.new(tiers: nil, type: nil)
133
+ def self.new(tiers:, type:)
156
134
  end
157
135
 
158
136
  sig do
@@ -179,24 +157,18 @@ module FinchAPI
179
157
  )
180
158
  end
181
159
 
182
- sig { returns(T.nilable(Integer)) }
183
- attr_reader :match
184
-
185
- sig { params(match: Integer).void }
186
- attr_writer :match
187
-
188
- sig { returns(T.nilable(Integer)) }
189
- attr_reader :threshold
160
+ sig { returns(Integer) }
161
+ attr_accessor :match
190
162
 
191
- sig { params(threshold: Integer).void }
192
- attr_writer :threshold
163
+ sig { returns(Integer) }
164
+ attr_accessor :threshold
193
165
 
194
166
  sig do
195
167
  params(match: Integer, threshold: Integer).returns(
196
168
  T.attached_class
197
169
  )
198
170
  end
199
- def self.new(match: nil, threshold: nil)
171
+ def self.new(match:, threshold:)
200
172
  end
201
173
 
202
174
  sig { override.returns({ match: Integer, threshold: Integer }) }
@@ -11,12 +11,12 @@ module FinchAPI
11
11
  T.type_alias { T.all(Symbol, FinchAPI::HRIS::BenefitFrequency) }
12
12
  OrSymbol = T.type_alias { T.any(Symbol, String) }
13
13
 
14
- ONE_TIME =
15
- T.let(:one_time, FinchAPI::HRIS::BenefitFrequency::TaggedSymbol)
16
14
  EVERY_PAYCHECK =
17
15
  T.let(:every_paycheck, FinchAPI::HRIS::BenefitFrequency::TaggedSymbol)
18
16
  MONTHLY =
19
17
  T.let(:monthly, FinchAPI::HRIS::BenefitFrequency::TaggedSymbol)
18
+ ONE_TIME =
19
+ T.let(:one_time, FinchAPI::HRIS::BenefitFrequency::TaggedSymbol)
20
20
 
21
21
  sig do
22
22
  override.returns(
@@ -16,45 +16,35 @@ module FinchAPI
16
16
  end
17
17
 
18
18
  sig do
19
- returns(
20
- T.nilable(FinchAPI::HRIS::Benefits::IndividualBenefit::Body)
21
- )
22
- end
23
- attr_reader :body
24
-
25
- sig do
26
- params(
27
- body: FinchAPI::HRIS::Benefits::IndividualBenefit::Body::OrHash
28
- ).void
19
+ returns(FinchAPI::HRIS::Benefits::IndividualBenefit::Body::Variants)
29
20
  end
30
- attr_writer :body
31
-
32
- sig { returns(T.nilable(Integer)) }
33
- attr_reader :code
21
+ attr_accessor :body
34
22
 
35
- sig { params(code: Integer).void }
36
- attr_writer :code
23
+ sig { returns(Integer) }
24
+ attr_accessor :code
37
25
 
38
- sig { returns(T.nilable(String)) }
39
- attr_reader :individual_id
40
-
41
- sig { params(individual_id: String).void }
42
- attr_writer :individual_id
26
+ sig { returns(String) }
27
+ attr_accessor :individual_id
43
28
 
44
29
  sig do
45
30
  params(
46
- body: FinchAPI::HRIS::Benefits::IndividualBenefit::Body::OrHash,
31
+ body:
32
+ T.any(
33
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::OrHash,
34
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError::OrHash
35
+ ),
47
36
  code: Integer,
48
37
  individual_id: String
49
38
  ).returns(T.attached_class)
50
39
  end
51
- def self.new(body: nil, code: nil, individual_id: nil)
40
+ def self.new(body:, code:, individual_id:)
52
41
  end
53
42
 
54
43
  sig do
55
44
  override.returns(
56
45
  {
57
- body: FinchAPI::HRIS::Benefits::IndividualBenefit::Body,
46
+ body:
47
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::Variants,
58
48
  code: Integer,
59
49
  individual_id: String
60
50
  }
@@ -63,136 +53,207 @@ module FinchAPI
63
53
  def to_hash
64
54
  end
65
55
 
66
- class Body < FinchAPI::Internal::Type::BaseModel
67
- OrHash =
56
+ module Body
57
+ extend FinchAPI::Internal::Type::Union
58
+
59
+ Variants =
68
60
  T.type_alias do
69
61
  T.any(
70
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body,
71
- FinchAPI::Internal::AnyHash
62
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0,
63
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError
72
64
  )
73
65
  end
74
66
 
75
- # If the benefit supports annual maximum, the amount in cents for this individual.
76
- sig { returns(T.nilable(Integer)) }
77
- attr_accessor :annual_maximum
67
+ class UnionMember0 < FinchAPI::Internal::Type::BaseModel
68
+ OrHash =
69
+ T.type_alias do
70
+ T.any(
71
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0,
72
+ FinchAPI::Internal::AnyHash
73
+ )
74
+ end
78
75
 
79
- # If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
80
- # for this individual.
81
- sig { returns(T.nilable(T::Boolean)) }
82
- attr_accessor :catch_up
76
+ # If the benefit supports annual maximum, the amount in cents for this individual.
77
+ sig { returns(T.nilable(Integer)) }
78
+ attr_accessor :annual_maximum
83
79
 
84
- sig { returns(T.nilable(FinchAPI::HRIS::BenefitContribution)) }
85
- attr_reader :company_contribution
80
+ # If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
81
+ # for this individual.
82
+ sig { returns(T.nilable(T::Boolean)) }
83
+ attr_accessor :catch_up
86
84
 
87
- sig do
88
- params(
89
- company_contribution:
90
- T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash)
91
- ).void
92
- end
93
- attr_writer :company_contribution
85
+ sig { returns(T.nilable(FinchAPI::HRIS::BenefitContribution)) }
86
+ attr_reader :company_contribution
94
87
 
95
- sig { returns(T.nilable(FinchAPI::HRIS::BenefitContribution)) }
96
- attr_reader :employee_deduction
88
+ sig do
89
+ params(
90
+ company_contribution:
91
+ T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash)
92
+ ).void
93
+ end
94
+ attr_writer :company_contribution
97
95
 
98
- sig do
99
- params(
100
- employee_deduction:
101
- T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash)
102
- ).void
103
- end
104
- attr_writer :employee_deduction
96
+ sig { returns(T.nilable(FinchAPI::HRIS::BenefitContribution)) }
97
+ attr_reader :employee_deduction
105
98
 
106
- # Type for HSA contribution limit if the benefit is a HSA.
107
- sig do
108
- returns(
109
- T.nilable(
110
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::TaggedSymbol
111
- )
112
- )
113
- end
114
- attr_accessor :hsa_contribution_limit
99
+ sig do
100
+ params(
101
+ employee_deduction:
102
+ T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash)
103
+ ).void
104
+ end
105
+ attr_writer :employee_deduction
115
106
 
116
- sig do
117
- params(
118
- annual_maximum: T.nilable(Integer),
119
- catch_up: T.nilable(T::Boolean),
120
- company_contribution:
121
- T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash),
122
- employee_deduction:
123
- T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash),
124
- hsa_contribution_limit:
107
+ # Type for HSA contribution limit if the benefit is a HSA.
108
+ sig do
109
+ returns(
125
110
  T.nilable(
126
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::OrSymbol
111
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol
127
112
  )
128
- ).returns(T.attached_class)
129
- end
130
- def self.new(
131
- # If the benefit supports annual maximum, the amount in cents for this individual.
132
- annual_maximum: nil,
133
- # If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
134
- # for this individual.
135
- catch_up: nil,
136
- company_contribution: nil,
137
- employee_deduction: nil,
138
- # Type for HSA contribution limit if the benefit is a HSA.
139
- hsa_contribution_limit: nil
140
- )
141
- end
113
+ )
114
+ end
115
+ attr_accessor :hsa_contribution_limit
142
116
 
143
- sig do
144
- override.returns(
145
- {
117
+ sig do
118
+ params(
146
119
  annual_maximum: T.nilable(Integer),
147
120
  catch_up: T.nilable(T::Boolean),
148
121
  company_contribution:
149
- T.nilable(FinchAPI::HRIS::BenefitContribution),
122
+ T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash),
150
123
  employee_deduction:
151
- T.nilable(FinchAPI::HRIS::BenefitContribution),
124
+ T.nilable(FinchAPI::HRIS::BenefitContribution::OrHash),
152
125
  hsa_contribution_limit:
153
126
  T.nilable(
154
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::TaggedSymbol
127
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::OrSymbol
155
128
  )
156
- }
129
+ ).returns(T.attached_class)
130
+ end
131
+ def self.new(
132
+ # If the benefit supports annual maximum, the amount in cents for this individual.
133
+ annual_maximum:,
134
+ # If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
135
+ # for this individual.
136
+ catch_up:,
137
+ company_contribution:,
138
+ employee_deduction:,
139
+ # Type for HSA contribution limit if the benefit is a HSA.
140
+ hsa_contribution_limit: nil
157
141
  )
158
- end
159
- def to_hash
160
- end
142
+ end
161
143
 
162
- # Type for HSA contribution limit if the benefit is a HSA.
163
- module HsaContributionLimit
164
- extend FinchAPI::Internal::Type::Enum
144
+ sig do
145
+ override.returns(
146
+ {
147
+ annual_maximum: T.nilable(Integer),
148
+ catch_up: T.nilable(T::Boolean),
149
+ company_contribution:
150
+ T.nilable(FinchAPI::HRIS::BenefitContribution),
151
+ employee_deduction:
152
+ T.nilable(FinchAPI::HRIS::BenefitContribution),
153
+ hsa_contribution_limit:
154
+ T.nilable(
155
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol
156
+ )
157
+ }
158
+ )
159
+ end
160
+ def to_hash
161
+ end
162
+
163
+ # Type for HSA contribution limit if the benefit is a HSA.
164
+ module HsaContributionLimit
165
+ extend FinchAPI::Internal::Type::Enum
166
+
167
+ TaggedSymbol =
168
+ T.type_alias do
169
+ T.all(
170
+ Symbol,
171
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit
172
+ )
173
+ end
174
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
165
175
 
166
- TaggedSymbol =
176
+ INDIVIDUAL =
177
+ T.let(
178
+ :individual,
179
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol
180
+ )
181
+ FAMILY =
182
+ T.let(
183
+ :family,
184
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol
185
+ )
186
+
187
+ sig do
188
+ override.returns(
189
+ T::Array[
190
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::UnionMember0::HsaContributionLimit::TaggedSymbol
191
+ ]
192
+ )
193
+ end
194
+ def self.values
195
+ end
196
+ end
197
+ end
198
+
199
+ class BatchError < FinchAPI::Internal::Type::BaseModel
200
+ OrHash =
167
201
  T.type_alias do
168
- T.all(
169
- Symbol,
170
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit
202
+ T.any(
203
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::BatchError,
204
+ FinchAPI::Internal::AnyHash
171
205
  )
172
206
  end
173
- OrSymbol = T.type_alias { T.any(Symbol, String) }
174
207
 
175
- INDIVIDUAL =
176
- T.let(
177
- :individual,
178
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::TaggedSymbol
179
- )
180
- FAMILY =
181
- T.let(
182
- :family,
183
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::TaggedSymbol
184
- )
208
+ sig { returns(Float) }
209
+ attr_accessor :code
210
+
211
+ sig { returns(String) }
212
+ attr_accessor :message
213
+
214
+ sig { returns(String) }
215
+ attr_accessor :name
216
+
217
+ sig { returns(T.nilable(String)) }
218
+ attr_reader :finch_code
219
+
220
+ sig { params(finch_code: String).void }
221
+ attr_writer :finch_code
222
+
223
+ sig do
224
+ params(
225
+ code: Float,
226
+ message: String,
227
+ name: String,
228
+ finch_code: String
229
+ ).returns(T.attached_class)
230
+ end
231
+ def self.new(code:, message:, name:, finch_code: nil)
232
+ end
185
233
 
186
234
  sig do
187
235
  override.returns(
188
- T::Array[
189
- FinchAPI::HRIS::Benefits::IndividualBenefit::Body::HsaContributionLimit::TaggedSymbol
190
- ]
236
+ {
237
+ code: Float,
238
+ message: String,
239
+ name: String,
240
+ finch_code: String
241
+ }
191
242
  )
192
243
  end
193
- def self.values
244
+ def to_hash
194
245
  end
195
246
  end
247
+
248
+ sig do
249
+ override.returns(
250
+ T::Array[
251
+ FinchAPI::HRIS::Benefits::IndividualBenefit::Body::Variants
252
+ ]
253
+ )
254
+ end
255
+ def self.variants
256
+ end
196
257
  end
197
258
  end
198
259
  end
@@ -13,6 +13,19 @@ module FinchAPI
13
13
  sig { returns(String) }
14
14
  attr_accessor :benefit_id
15
15
 
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :description
18
+
19
+ # The frequency of the benefit deduction/contribution.
20
+ sig do
21
+ returns(T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol))
22
+ end
23
+ attr_accessor :frequency
24
+
25
+ # Type of benefit.
26
+ sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) }
27
+ attr_accessor :type
28
+
16
29
  # The company match for this benefit.
17
30
  sig do
18
31
  returns(
@@ -31,41 +44,28 @@ module FinchAPI
31
44
  end
32
45
  attr_writer :company_contribution
33
46
 
34
- sig { returns(T.nilable(String)) }
35
- attr_accessor :description
36
-
37
- # The frequency of the benefit deduction/contribution.
38
- sig do
39
- returns(T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol))
40
- end
41
- attr_accessor :frequency
42
-
43
- # Type of benefit.
44
- sig { returns(T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)) }
45
- attr_accessor :type
46
-
47
47
  sig do
48
48
  params(
49
49
  benefit_id: String,
50
+ description: T.nilable(String),
51
+ frequency: T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol),
52
+ type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol),
50
53
  company_contribution:
51
54
  T.nilable(
52
55
  FinchAPI::HRIS::CompanyBenefit::CompanyContribution::OrHash
53
- ),
54
- description: T.nilable(String),
55
- frequency: T.nilable(FinchAPI::HRIS::BenefitFrequency::OrSymbol),
56
- type: T.nilable(FinchAPI::HRIS::BenefitType::OrSymbol)
56
+ )
57
57
  ).returns(T.attached_class)
58
58
  end
59
59
  def self.new(
60
60
  # The id of the benefit.
61
61
  benefit_id:,
62
- # The company match for this benefit.
63
- company_contribution:,
64
62
  description:,
65
63
  # The frequency of the benefit deduction/contribution.
66
64
  frequency:,
67
65
  # Type of benefit.
68
- type:
66
+ type:,
67
+ # The company match for this benefit.
68
+ company_contribution: nil
69
69
  )
70
70
  end
71
71
 
@@ -73,12 +73,12 @@ module FinchAPI
73
73
  override.returns(
74
74
  {
75
75
  benefit_id: String,
76
- company_contribution:
77
- T.nilable(FinchAPI::HRIS::CompanyBenefit::CompanyContribution),
78
76
  description: T.nilable(String),
79
77
  frequency:
80
78
  T.nilable(FinchAPI::HRIS::BenefitFrequency::TaggedSymbol),
81
- type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol)
79
+ type: T.nilable(FinchAPI::HRIS::BenefitType::TaggedSymbol),
80
+ company_contribution:
81
+ T.nilable(FinchAPI::HRIS::CompanyBenefit::CompanyContribution)
82
82
  }
83
83
  )
84
84
  end
@@ -96,41 +96,19 @@ module FinchAPI
96
96
 
97
97
  sig do
98
98
  returns(
99
- T.nilable(
100
- T::Array[
101
- FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier
102
- ]
103
- )
99
+ T::Array[
100
+ FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier
101
+ ]
104
102
  )
105
103
  end
106
- attr_reader :tiers
107
-
108
- sig do
109
- params(
110
- tiers:
111
- T::Array[
112
- FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Tier::OrHash
113
- ]
114
- ).void
115
- end
116
- attr_writer :tiers
104
+ attr_accessor :tiers
117
105
 
118
106
  sig do
119
107
  returns(
120
- T.nilable(
121
- FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type::TaggedSymbol
122
- )
108
+ FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type::TaggedSymbol
123
109
  )
124
110
  end
125
- attr_reader :type
126
-
127
- sig do
128
- params(
129
- type:
130
- FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type::OrSymbol
131
- ).void
132
- end
133
- attr_writer :type
111
+ attr_accessor :type
134
112
 
135
113
  # The company match for this benefit.
136
114
  sig do
@@ -143,7 +121,7 @@ module FinchAPI
143
121
  FinchAPI::HRIS::CompanyBenefit::CompanyContribution::Type::OrSymbol
144
122
  ).returns(T.attached_class)
145
123
  end
146
- def self.new(tiers: nil, type: nil)
124
+ def self.new(tiers:, type:)
147
125
  end
148
126
 
149
127
  sig do
@@ -170,24 +148,18 @@ module FinchAPI
170
148
  )
171
149
  end
172
150
 
173
- sig { returns(T.nilable(Integer)) }
174
- attr_reader :match
175
-
176
- sig { params(match: Integer).void }
177
- attr_writer :match
178
-
179
- sig { returns(T.nilable(Integer)) }
180
- attr_reader :threshold
151
+ sig { returns(Integer) }
152
+ attr_accessor :match
181
153
 
182
- sig { params(threshold: Integer).void }
183
- attr_writer :threshold
154
+ sig { returns(Integer) }
155
+ attr_accessor :threshold
184
156
 
185
157
  sig do
186
158
  params(match: Integer, threshold: Integer).returns(
187
159
  T.attached_class
188
160
  )
189
161
  end
190
- def self.new(match: nil, threshold: nil)
162
+ def self.new(match:, threshold:)
191
163
  end
192
164
 
193
165
  sig { override.returns({ match: Integer, threshold: Integer }) }