finch-api 0.1.0.pre.alpha.41 → 0.1.0.pre.alpha.43
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +73 -0
- data/README.md +3 -3
- data/lib/finch_api/client.rb +22 -4
- data/lib/finch_api/internal/transport/base_client.rb +30 -3
- data/lib/finch_api/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/finch_api/internal/util.rb +54 -8
- data/lib/finch_api/models/account_disconnect_entity_params.rb +22 -0
- data/lib/finch_api/models/base_webhook_event.rb +9 -1
- data/lib/finch_api/models/connect/session_new_params.rb +5 -3
- data/lib/finch_api/models/connect/session_reauthenticate_params.rb +5 -3
- data/lib/finch_api/models/create_access_token_response.rb +10 -1
- data/lib/finch_api/models/disconnect_entity_response.rb +17 -0
- data/lib/finch_api/models/hris/benefit_contribution.rb +24 -23
- data/lib/finch_api/models/hris/benefit_register_params.rb +47 -0
- data/lib/finch_api/models/hris/benefit_retrieve_params.rb +8 -1
- data/lib/finch_api/models/hris/benefit_update_params.rb +8 -1
- data/lib/finch_api/models/hris/benefits/individual_benefit.rb +63 -59
- data/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb +8 -1
- data/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb +8 -1
- data/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb +8 -1
- data/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb +8 -1
- data/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb +8 -1
- data/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb +8 -1
- data/lib/finch_api/models/hris/document_retreive_params.rb +8 -1
- data/lib/finch_api/models/hris/employment_data.rb +76 -37
- data/lib/finch_api/models/hris/employment_data_response.rb +2 -2
- data/lib/finch_api/models/hris/individual.rb +38 -28
- data/lib/finch_api/models/hris/individual_response.rb +2 -2
- data/lib/finch_api/models/hris/register_company_benefit_response.rb +26 -0
- data/lib/finch_api/models/introspection.rb +27 -1
- data/lib/finch_api/models/job_completion_event.rb +3 -0
- data/lib/finch_api/models/jobs/automated_create_params.rb +53 -29
- data/lib/finch_api/models/jobs/automated_retrieve_params.rb +7 -1
- data/lib/finch_api/models/jobs/manual_retrieve_params.rb +7 -1
- data/lib/finch_api/models/payroll/pay_group_retrieve_params.rb +8 -1
- data/lib/finch_api/models/sandbox/directory_create_params.rb +55 -4
- data/lib/finch_api/models/sandbox/employment_update_params.rb +58 -4
- data/lib/finch_api/models/sandbox/employment_update_response.rb +53 -4
- data/lib/finch_api/models/sandbox/individual_update_params.rb +8 -1
- data/lib/finch_api/models.rb +4 -0
- data/lib/finch_api/resources/access_tokens.rb +1 -0
- data/lib/finch_api/resources/account.rb +26 -0
- data/lib/finch_api/resources/connect/sessions.rb +4 -2
- data/lib/finch_api/resources/hris/benefits/individuals.rb +13 -5
- data/lib/finch_api/resources/hris/benefits.rb +50 -7
- data/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +14 -6
- data/lib/finch_api/resources/hris/company/pay_statement_item.rb +3 -1
- data/lib/finch_api/resources/hris/company.rb +3 -1
- data/lib/finch_api/resources/hris/directory.rb +3 -1
- data/lib/finch_api/resources/hris/documents.rb +6 -2
- data/lib/finch_api/resources/hris/employments.rb +4 -2
- data/lib/finch_api/resources/hris/individuals.rb +4 -2
- data/lib/finch_api/resources/hris/pay_statements.rb +4 -2
- data/lib/finch_api/resources/hris/payments.rb +3 -1
- data/lib/finch_api/resources/jobs/automated.rb +8 -7
- data/lib/finch_api/resources/jobs/manual.rb +1 -0
- data/lib/finch_api/resources/payroll/pay_groups.rb +6 -2
- data/lib/finch_api/resources/providers.rb +1 -0
- data/lib/finch_api/resources/request_forwarding.rb +1 -0
- data/lib/finch_api/resources/sandbox/company.rb +1 -0
- data/lib/finch_api/resources/sandbox/connections/accounts.rb +2 -0
- data/lib/finch_api/resources/sandbox/connections.rb +1 -0
- data/lib/finch_api/resources/sandbox/directory.rb +1 -0
- data/lib/finch_api/resources/sandbox/employment.rb +4 -1
- data/lib/finch_api/resources/sandbox/individual.rb +1 -0
- data/lib/finch_api/resources/sandbox/jobs/configuration.rb +2 -0
- data/lib/finch_api/resources/sandbox/jobs.rb +1 -0
- data/lib/finch_api/resources/sandbox/payment.rb +1 -0
- data/lib/finch_api/version.rb +1 -1
- data/lib/finch_api.rb +4 -0
- data/rbi/finch_api/client.rbi +12 -2
- data/rbi/finch_api/internal/transport/base_client.rbi +6 -1
- data/rbi/finch_api/internal/util.rbi +29 -1
- data/rbi/finch_api/models/account_disconnect_entity_params.rbi +46 -0
- data/rbi/finch_api/models/base_webhook_event.rbi +18 -3
- data/rbi/finch_api/models/connect/session_new_params.rbi +11 -3
- data/rbi/finch_api/models/connect/session_reauthenticate_params.rbi +11 -3
- data/rbi/finch_api/models/create_access_token_response.rbi +13 -3
- data/rbi/finch_api/models/disconnect_entity_response.rbi +27 -0
- data/rbi/finch_api/models/hris/benefit_contribution.rbi +33 -31
- data/rbi/finch_api/models/hris/benefit_register_params.rbi +76 -0
- data/rbi/finch_api/models/hris/benefit_retrieve_params.rbi +6 -0
- data/rbi/finch_api/models/hris/benefit_update_params.rbi +6 -0
- data/rbi/finch_api/models/hris/benefits/individual_benefit.rbi +71 -71
- data/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi +6 -0
- data/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi +6 -0
- data/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi +6 -0
- data/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi +6 -0
- data/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi +6 -0
- data/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi +6 -0
- data/rbi/finch_api/models/hris/document_retreive_params.rbi +6 -0
- data/rbi/finch_api/models/hris/employment_data.rbi +121 -56
- data/rbi/finch_api/models/hris/employment_data_response.rbi +1 -1
- data/rbi/finch_api/models/hris/individual.rbi +54 -47
- data/rbi/finch_api/models/hris/individual_response.rbi +1 -1
- data/rbi/finch_api/models/hris/register_company_benefit_response.rbi +38 -0
- data/rbi/finch_api/models/introspection.rbi +66 -3
- data/rbi/finch_api/models/job_completion_event.rbi +15 -0
- data/rbi/finch_api/models/jobs/automated_create_params.rbi +126 -56
- data/rbi/finch_api/models/jobs/automated_retrieve_params.rbi +13 -5
- data/rbi/finch_api/models/jobs/manual_retrieve_params.rbi +13 -5
- data/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi +6 -0
- data/rbi/finch_api/models/sandbox/directory_create_params.rbi +122 -9
- data/rbi/finch_api/models/sandbox/employment_update_params.rbi +128 -9
- data/rbi/finch_api/models/sandbox/employment_update_response.rbi +122 -9
- data/rbi/finch_api/models/sandbox/individual_update_params.rbi +6 -0
- data/rbi/finch_api/models.rbi +5 -0
- data/rbi/finch_api/resources/account.rbi +15 -0
- data/rbi/finch_api/resources/connect/sessions.rbi +6 -2
- data/rbi/finch_api/resources/hris/benefits.rbi +24 -0
- data/rbi/finch_api/resources/jobs/automated.rbi +6 -8
- data/rbi/finch_api/resources/sandbox/employment.rbi +7 -0
- data/sig/finch_api/client.rbs +6 -1
- data/sig/finch_api/internal/transport/base_client.rbs +2 -0
- data/sig/finch_api/internal/util.rbs +14 -0
- data/sig/finch_api/models/account_disconnect_entity_params.rbs +24 -0
- data/sig/finch_api/models/base_webhook_event.rbs +14 -3
- data/sig/finch_api/models/connect/session_new_params.rbs +2 -0
- data/sig/finch_api/models/connect/session_reauthenticate_params.rbs +2 -0
- data/sig/finch_api/models/create_access_token_response.rbs +8 -3
- data/sig/finch_api/models/disconnect_entity_response.rbs +13 -0
- data/sig/finch_api/models/hris/benefit_contribution.rbs +28 -28
- data/sig/finch_api/models/hris/benefit_register_params.rbs +47 -0
- data/sig/finch_api/models/hris/benefit_retrieve_params.rbs +5 -1
- data/sig/finch_api/models/hris/benefit_update_params.rbs +5 -1
- data/sig/finch_api/models/hris/benefits/individual_benefit.rbs +62 -62
- data/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs +5 -0
- data/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs +5 -1
- data/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs +9 -1
- data/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs +9 -1
- data/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs +5 -1
- data/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs +9 -1
- data/sig/finch_api/models/hris/document_retreive_params.rbs +5 -1
- data/sig/finch_api/models/hris/employment_data.rbs +56 -39
- data/sig/finch_api/models/hris/individual.rbs +31 -31
- data/sig/finch_api/models/hris/register_company_benefit_response.rbs +18 -0
- data/sig/finch_api/models/introspection.rbs +44 -3
- data/sig/finch_api/models/job_completion_event.rbs +6 -0
- data/sig/finch_api/models/jobs/automated_create_params.rbs +47 -22
- data/sig/finch_api/models/jobs/automated_retrieve_params.rbs +11 -3
- data/sig/finch_api/models/jobs/manual_retrieve_params.rbs +11 -3
- data/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs +5 -1
- data/sig/finch_api/models/sandbox/directory_create_params.rbs +40 -5
- data/sig/finch_api/models/sandbox/employment_update_params.rbs +45 -5
- data/sig/finch_api/models/sandbox/employment_update_response.rbs +40 -5
- data/sig/finch_api/models/sandbox/individual_update_params.rbs +5 -0
- data/sig/finch_api/models.rbs +4 -0
- data/sig/finch_api/resources/account.rbs +5 -0
- data/sig/finch_api/resources/hris/benefits.rbs +8 -0
- data/sig/finch_api/resources/jobs/automated.rbs +1 -2
- data/sig/finch_api/resources/sandbox/employment.rbs +1 -0
- metadata +14 -2
data/lib/finch_api.rb
CHANGED
|
@@ -60,6 +60,7 @@ require_relative "finch_api/models/base_webhook_event"
|
|
|
60
60
|
require_relative "finch_api/models/hris/benefit_contribution"
|
|
61
61
|
require_relative "finch_api/models/sandbox/jobs/sandbox_job_configuration"
|
|
62
62
|
require_relative "finch_api/models/access_token_create_params"
|
|
63
|
+
require_relative "finch_api/models/account_disconnect_entity_params"
|
|
63
64
|
require_relative "finch_api/models/account_disconnect_params"
|
|
64
65
|
require_relative "finch_api/models/account_introspect_params"
|
|
65
66
|
require_relative "finch_api/models/account_update_event"
|
|
@@ -71,6 +72,7 @@ require_relative "finch_api/models/connect/session_reauthenticate_response"
|
|
|
71
72
|
require_relative "finch_api/models/connection_status_type"
|
|
72
73
|
require_relative "finch_api/models/create_access_token_response"
|
|
73
74
|
require_relative "finch_api/models/directory_event"
|
|
75
|
+
require_relative "finch_api/models/disconnect_entity_response"
|
|
74
76
|
require_relative "finch_api/models/disconnect_response"
|
|
75
77
|
require_relative "finch_api/models/employment_event"
|
|
76
78
|
require_relative "finch_api/models/hris/benefit_create_params"
|
|
@@ -78,6 +80,7 @@ require_relative "finch_api/models/hris/benefit_features_and_operations"
|
|
|
78
80
|
require_relative "finch_api/models/hris/benefit_frequency"
|
|
79
81
|
require_relative "finch_api/models/hris/benefit_list_params"
|
|
80
82
|
require_relative "finch_api/models/hris/benefit_list_supported_benefits_params"
|
|
83
|
+
require_relative "finch_api/models/hris/benefit_register_params"
|
|
81
84
|
require_relative "finch_api/models/hris/benefit_retrieve_params"
|
|
82
85
|
require_relative "finch_api/models/hris/benefits/enrolled_individual_benefit_response"
|
|
83
86
|
require_relative "finch_api/models/hris/benefits/individual_benefit"
|
|
@@ -126,6 +129,7 @@ require_relative "finch_api/models/hris/pay_statement_data_sync_in_progress"
|
|
|
126
129
|
require_relative "finch_api/models/hris/pay_statement_response"
|
|
127
130
|
require_relative "finch_api/models/hris/pay_statement_response_body"
|
|
128
131
|
require_relative "finch_api/models/hris/pay_statement_retrieve_many_params"
|
|
132
|
+
require_relative "finch_api/models/hris/register_company_benefit_response"
|
|
129
133
|
require_relative "finch_api/models/hris/supported_benefit"
|
|
130
134
|
require_relative "finch_api/models/hris/support_per_benefit_type"
|
|
131
135
|
require_relative "finch_api/models/hris/update_company_benefit_response"
|
data/rbi/finch_api/client.rbi
CHANGED
|
@@ -19,6 +19,9 @@ module FinchAPI
|
|
|
19
19
|
sig { returns(T.nilable(String)) }
|
|
20
20
|
attr_reader :client_secret
|
|
21
21
|
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :webhook_secret
|
|
24
|
+
|
|
22
25
|
sig { returns(FinchAPI::Resources::AccessTokens) }
|
|
23
26
|
attr_reader :access_tokens
|
|
24
27
|
|
|
@@ -50,8 +53,12 @@ module FinchAPI
|
|
|
50
53
|
attr_reader :connect
|
|
51
54
|
|
|
52
55
|
# @api private
|
|
53
|
-
sig
|
|
54
|
-
|
|
56
|
+
sig do
|
|
57
|
+
override
|
|
58
|
+
.params(security: { bearer_auth: T::Boolean, basic_auth: T::Boolean })
|
|
59
|
+
.returns(T::Hash[String, String])
|
|
60
|
+
end
|
|
61
|
+
private def auth_headers(security:)
|
|
55
62
|
end
|
|
56
63
|
|
|
57
64
|
# @api private
|
|
@@ -70,6 +77,7 @@ module FinchAPI
|
|
|
70
77
|
client_id: T.nilable(String),
|
|
71
78
|
client_secret: T.nilable(String),
|
|
72
79
|
access_token: T.nilable(String),
|
|
80
|
+
webhook_secret: T.nilable(String),
|
|
73
81
|
base_url: T.nilable(String),
|
|
74
82
|
max_retries: Integer,
|
|
75
83
|
timeout: Float,
|
|
@@ -83,6 +91,8 @@ module FinchAPI
|
|
|
83
91
|
# Defaults to `ENV["FINCH_CLIENT_SECRET"]`
|
|
84
92
|
client_secret: ENV["FINCH_CLIENT_SECRET"],
|
|
85
93
|
access_token: nil,
|
|
94
|
+
# Defaults to `ENV["FINCH_WEBHOOK_SECRET"]`
|
|
95
|
+
webhook_secret: ENV["FINCH_WEBHOOK_SECRET"],
|
|
86
96
|
# Override the default base URL for the API, e.g.,
|
|
87
97
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["FINCH_BASE_URL"]`
|
|
88
98
|
base_url: ENV["FINCH_BASE_URL"],
|
|
@@ -51,6 +51,8 @@ module FinchAPI
|
|
|
51
51
|
),
|
|
52
52
|
stream: T.nilable(T::Class[T.anything]),
|
|
53
53
|
model: T.nilable(FinchAPI::Internal::Type::Converter::Input),
|
|
54
|
+
security:
|
|
55
|
+
T.nilable({ bearer_auth: T::Boolean, basic_auth: T::Boolean }),
|
|
54
56
|
options: T.nilable(FinchAPI::RequestOptions::OrHash)
|
|
55
57
|
}
|
|
56
58
|
end
|
|
@@ -228,7 +230,7 @@ module FinchAPI
|
|
|
228
230
|
# Execute the request specified by `req`. This is the method that all resource
|
|
229
231
|
# methods call into.
|
|
230
232
|
#
|
|
231
|
-
# @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, options: {})
|
|
233
|
+
# @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, security: {bearer_auth: true, basic_auth: true}, options: {})
|
|
232
234
|
sig do
|
|
233
235
|
params(
|
|
234
236
|
method: Symbol,
|
|
@@ -270,6 +272,8 @@ module FinchAPI
|
|
|
270
272
|
),
|
|
271
273
|
stream: T.nilable(T::Class[T.anything]),
|
|
272
274
|
model: T.nilable(FinchAPI::Internal::Type::Converter::Input),
|
|
275
|
+
security:
|
|
276
|
+
T.nilable({ bearer_auth: T::Boolean, basic_auth: T::Boolean }),
|
|
273
277
|
options: T.nilable(FinchAPI::RequestOptions::OrHash)
|
|
274
278
|
).returns(T.anything)
|
|
275
279
|
end
|
|
@@ -283,6 +287,7 @@ module FinchAPI
|
|
|
283
287
|
page: nil,
|
|
284
288
|
stream: nil,
|
|
285
289
|
model: FinchAPI::Internal::Type::Unknown,
|
|
290
|
+
security: { bearer_auth: true, basic_auth: true },
|
|
286
291
|
options: {}
|
|
287
292
|
)
|
|
288
293
|
end
|
|
@@ -148,12 +148,20 @@ module FinchAPI
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -296,11 +304,31 @@ module FinchAPI
|
|
|
296
304
|
end
|
|
297
305
|
|
|
298
306
|
JSON_CONTENT =
|
|
299
|
-
T.let(%r{^application/(?:
|
|
307
|
+
T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
|
|
300
308
|
JSONL_CONTENT =
|
|
301
309
|
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
302
310
|
|
|
303
311
|
class << self
|
|
312
|
+
# @api private
|
|
313
|
+
sig do
|
|
314
|
+
params(query: FinchAPI::Internal::AnyHash).returns(
|
|
315
|
+
FinchAPI::Internal::AnyHash
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
def encode_query_params(query)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# @api private
|
|
322
|
+
sig do
|
|
323
|
+
params(
|
|
324
|
+
collection: FinchAPI::Internal::AnyHash,
|
|
325
|
+
key: String,
|
|
326
|
+
element: T.anything
|
|
327
|
+
).void
|
|
328
|
+
end
|
|
329
|
+
private def write_query_param_element!(collection, key, element)
|
|
330
|
+
end
|
|
331
|
+
|
|
304
332
|
# @api private
|
|
305
333
|
sig do
|
|
306
334
|
params(
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module FinchAPI
|
|
4
|
+
module Models
|
|
5
|
+
class AccountDisconnectEntityParams < FinchAPI::Internal::Type::BaseModel
|
|
6
|
+
extend FinchAPI::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include FinchAPI::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
FinchAPI::AccountDisconnectEntityParams,
|
|
13
|
+
FinchAPI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Array of entity UUIDs to disconnect. At least one entity ID must be provided.
|
|
18
|
+
sig { returns(T::Array[String]) }
|
|
19
|
+
attr_accessor :entity_ids
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
entity_ids: T::Array[String],
|
|
24
|
+
request_options: FinchAPI::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
# Array of entity UUIDs to disconnect. At least one entity ID must be provided.
|
|
29
|
+
entity_ids:,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
entity_ids: T::Array[String],
|
|
38
|
+
request_options: FinchAPI::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -26,11 +26,19 @@ module FinchAPI
|
|
|
26
26
|
sig { params(connection_id: String).void }
|
|
27
27
|
attr_writer :connection_id
|
|
28
28
|
|
|
29
|
+
# Unique Finch id of the entity for which data has been updated.
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :entity_id
|
|
32
|
+
|
|
33
|
+
sig { params(entity_id: String).void }
|
|
34
|
+
attr_writer :entity_id
|
|
35
|
+
|
|
29
36
|
sig do
|
|
30
37
|
params(
|
|
31
38
|
account_id: String,
|
|
32
39
|
company_id: String,
|
|
33
|
-
connection_id: String
|
|
40
|
+
connection_id: String,
|
|
41
|
+
entity_id: String
|
|
34
42
|
).returns(T.attached_class)
|
|
35
43
|
end
|
|
36
44
|
def self.new(
|
|
@@ -42,13 +50,20 @@ module FinchAPI
|
|
|
42
50
|
# `connection_id` instead to identify the connection associated with this event.
|
|
43
51
|
company_id:,
|
|
44
52
|
# Unique Finch ID of the connection associated with the webhook event.
|
|
45
|
-
connection_id: nil
|
|
53
|
+
connection_id: nil,
|
|
54
|
+
# Unique Finch id of the entity for which data has been updated.
|
|
55
|
+
entity_id: nil
|
|
46
56
|
)
|
|
47
57
|
end
|
|
48
58
|
|
|
49
59
|
sig do
|
|
50
60
|
override.returns(
|
|
51
|
-
{
|
|
61
|
+
{
|
|
62
|
+
account_id: String,
|
|
63
|
+
company_id: String,
|
|
64
|
+
connection_id: String,
|
|
65
|
+
entity_id: String
|
|
66
|
+
}
|
|
52
67
|
)
|
|
53
68
|
end
|
|
54
69
|
def to_hash
|
|
@@ -23,7 +23,9 @@ module FinchAPI
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :customer_name
|
|
25
25
|
|
|
26
|
-
# The Finch products to request access to
|
|
26
|
+
# The Finch products to request access to. Use `benefits` to access deductions
|
|
27
|
+
# endpoints — `deduction` is a deprecated alias that is still accepted but should
|
|
28
|
+
# not be combined with `benefits`.
|
|
27
29
|
sig do
|
|
28
30
|
returns(
|
|
29
31
|
T::Array[FinchAPI::Connect::SessionNewParams::Product::OrSymbol]
|
|
@@ -96,7 +98,9 @@ module FinchAPI
|
|
|
96
98
|
customer_id:,
|
|
97
99
|
# Name of the customer
|
|
98
100
|
customer_name:,
|
|
99
|
-
# The Finch products to request access to
|
|
101
|
+
# The Finch products to request access to. Use `benefits` to access deductions
|
|
102
|
+
# endpoints — `deduction` is a deprecated alias that is still accepted but should
|
|
103
|
+
# not be combined with `benefits`.
|
|
100
104
|
products:,
|
|
101
105
|
# Email address of the customer
|
|
102
106
|
customer_email: nil,
|
|
@@ -141,7 +145,6 @@ module FinchAPI
|
|
|
141
145
|
def to_hash
|
|
142
146
|
end
|
|
143
147
|
|
|
144
|
-
# The Finch products that can be requested during the Connect flow.
|
|
145
148
|
module Product
|
|
146
149
|
extend FinchAPI::Internal::Type::Enum
|
|
147
150
|
|
|
@@ -196,6 +199,11 @@ module FinchAPI
|
|
|
196
199
|
:pay_statement,
|
|
197
200
|
FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol
|
|
198
201
|
)
|
|
202
|
+
RECORDKEEPING =
|
|
203
|
+
T.let(
|
|
204
|
+
:recordkeeping,
|
|
205
|
+
FinchAPI::Connect::SessionNewParams::Product::TaggedSymbol
|
|
206
|
+
)
|
|
199
207
|
SSN =
|
|
200
208
|
T.let(
|
|
201
209
|
:ssn,
|
|
@@ -27,7 +27,9 @@ module FinchAPI
|
|
|
27
27
|
sig { params(minutes_to_expire: Integer).void }
|
|
28
28
|
attr_writer :minutes_to_expire
|
|
29
29
|
|
|
30
|
-
# The products to request access to (optional for reauthentication)
|
|
30
|
+
# The products to request access to (optional for reauthentication). Use
|
|
31
|
+
# `benefits` to access deductions endpoints — `deduction` is a deprecated alias
|
|
32
|
+
# that is still accepted but should not be combined with `benefits`.
|
|
31
33
|
sig do
|
|
32
34
|
returns(
|
|
33
35
|
T.nilable(
|
|
@@ -63,7 +65,9 @@ module FinchAPI
|
|
|
63
65
|
# The number of minutes until the session expires (defaults to 43,200, which is 30
|
|
64
66
|
# days)
|
|
65
67
|
minutes_to_expire: nil,
|
|
66
|
-
# The products to request access to (optional for reauthentication)
|
|
68
|
+
# The products to request access to (optional for reauthentication). Use
|
|
69
|
+
# `benefits` to access deductions endpoints — `deduction` is a deprecated alias
|
|
70
|
+
# that is still accepted but should not be combined with `benefits`.
|
|
67
71
|
products: nil,
|
|
68
72
|
# The URI to redirect to after the Connect flow is completed
|
|
69
73
|
redirect_uri: nil,
|
|
@@ -90,7 +94,6 @@ module FinchAPI
|
|
|
90
94
|
def to_hash
|
|
91
95
|
end
|
|
92
96
|
|
|
93
|
-
# The Finch products that can be requested during the Connect flow.
|
|
94
97
|
module Product
|
|
95
98
|
extend FinchAPI::Internal::Type::Enum
|
|
96
99
|
|
|
@@ -148,6 +151,11 @@ module FinchAPI
|
|
|
148
151
|
:pay_statement,
|
|
149
152
|
FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol
|
|
150
153
|
)
|
|
154
|
+
RECORDKEEPING =
|
|
155
|
+
T.let(
|
|
156
|
+
:recordkeeping,
|
|
157
|
+
FinchAPI::Connect::SessionReauthenticateParams::Product::TaggedSymbol
|
|
158
|
+
)
|
|
151
159
|
SSN =
|
|
152
160
|
T.let(
|
|
153
161
|
:ssn,
|
|
@@ -73,6 +73,11 @@ module FinchAPI
|
|
|
73
73
|
sig { returns(T.nilable(String)) }
|
|
74
74
|
attr_accessor :customer_id
|
|
75
75
|
|
|
76
|
+
# The name of your customer you provided to Finch when a connect session was
|
|
77
|
+
# created for this connection
|
|
78
|
+
sig { returns(T.nilable(String)) }
|
|
79
|
+
attr_accessor :customer_name
|
|
80
|
+
|
|
76
81
|
sig do
|
|
77
82
|
params(
|
|
78
83
|
access_token: String,
|
|
@@ -87,7 +92,8 @@ module FinchAPI
|
|
|
87
92
|
token_type: String,
|
|
88
93
|
account_id: String,
|
|
89
94
|
company_id: String,
|
|
90
|
-
customer_id: T.nilable(String)
|
|
95
|
+
customer_id: T.nilable(String),
|
|
96
|
+
customer_name: T.nilable(String)
|
|
91
97
|
).returns(T.attached_class)
|
|
92
98
|
end
|
|
93
99
|
def self.new(
|
|
@@ -118,7 +124,10 @@ module FinchAPI
|
|
|
118
124
|
company_id: nil,
|
|
119
125
|
# The ID of your customer you provided to Finch when a connect session was created
|
|
120
126
|
# for this connection
|
|
121
|
-
customer_id: nil
|
|
127
|
+
customer_id: nil,
|
|
128
|
+
# The name of your customer you provided to Finch when a connect session was
|
|
129
|
+
# created for this connection
|
|
130
|
+
customer_name: nil
|
|
122
131
|
)
|
|
123
132
|
end
|
|
124
133
|
|
|
@@ -137,7 +146,8 @@ module FinchAPI
|
|
|
137
146
|
token_type: String,
|
|
138
147
|
account_id: String,
|
|
139
148
|
company_id: String,
|
|
140
|
-
customer_id: T.nilable(String)
|
|
149
|
+
customer_id: T.nilable(String),
|
|
150
|
+
customer_name: T.nilable(String)
|
|
141
151
|
}
|
|
142
152
|
)
|
|
143
153
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module FinchAPI
|
|
4
|
+
module Models
|
|
5
|
+
class DisconnectEntityResponse < FinchAPI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(FinchAPI::DisconnectEntityResponse, FinchAPI::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# If the request is successful, Finch will return "success" (HTTP 200 status).
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :status
|
|
14
|
+
|
|
15
|
+
sig { params(status: String).returns(T.attached_class) }
|
|
16
|
+
def self.new(
|
|
17
|
+
# If the request is successful, Finch will return "success" (HTTP 200 status).
|
|
18
|
+
status:
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { override.returns({ status: String }) }
|
|
23
|
+
def to_hash
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -9,17 +9,17 @@ module FinchAPI
|
|
|
9
9
|
Variants =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
13
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
14
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
12
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed,
|
|
13
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent,
|
|
14
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
class
|
|
18
|
+
class BenefitContributionFixed < FinchAPI::Internal::Type::BaseModel
|
|
19
19
|
OrHash =
|
|
20
20
|
T.type_alias do
|
|
21
21
|
T.any(
|
|
22
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
22
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed,
|
|
23
23
|
FinchAPI::Internal::AnyHash
|
|
24
24
|
)
|
|
25
25
|
end
|
|
@@ -31,7 +31,7 @@ module FinchAPI
|
|
|
31
31
|
# Fixed contribution type.
|
|
32
32
|
sig do
|
|
33
33
|
returns(
|
|
34
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
34
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::OrSymbol
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
attr_accessor :type
|
|
@@ -40,7 +40,7 @@ module FinchAPI
|
|
|
40
40
|
params(
|
|
41
41
|
amount: Integer,
|
|
42
42
|
type:
|
|
43
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
43
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::OrSymbol
|
|
44
44
|
).returns(T.attached_class)
|
|
45
45
|
end
|
|
46
46
|
def self.new(
|
|
@@ -56,7 +56,7 @@ module FinchAPI
|
|
|
56
56
|
{
|
|
57
57
|
amount: Integer,
|
|
58
58
|
type:
|
|
59
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
59
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::OrSymbol
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
end
|
|
@@ -71,7 +71,7 @@ module FinchAPI
|
|
|
71
71
|
T.type_alias do
|
|
72
72
|
T.all(
|
|
73
73
|
Symbol,
|
|
74
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
74
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type
|
|
75
75
|
)
|
|
76
76
|
end
|
|
77
77
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -79,13 +79,13 @@ module FinchAPI
|
|
|
79
79
|
FIXED =
|
|
80
80
|
T.let(
|
|
81
81
|
:fixed,
|
|
82
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
82
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::TaggedSymbol
|
|
83
83
|
)
|
|
84
84
|
|
|
85
85
|
sig do
|
|
86
86
|
override.returns(
|
|
87
87
|
T::Array[
|
|
88
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
88
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionFixed::Type::TaggedSymbol
|
|
89
89
|
]
|
|
90
90
|
)
|
|
91
91
|
end
|
|
@@ -94,11 +94,11 @@ module FinchAPI
|
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
-
class
|
|
97
|
+
class BenefitContributionPercent < FinchAPI::Internal::Type::BaseModel
|
|
98
98
|
OrHash =
|
|
99
99
|
T.type_alias do
|
|
100
100
|
T.any(
|
|
101
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
101
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent,
|
|
102
102
|
FinchAPI::Internal::AnyHash
|
|
103
103
|
)
|
|
104
104
|
end
|
|
@@ -110,7 +110,7 @@ module FinchAPI
|
|
|
110
110
|
# Percentage contribution type.
|
|
111
111
|
sig do
|
|
112
112
|
returns(
|
|
113
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
113
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::OrSymbol
|
|
114
114
|
)
|
|
115
115
|
end
|
|
116
116
|
attr_accessor :type
|
|
@@ -119,7 +119,7 @@ module FinchAPI
|
|
|
119
119
|
params(
|
|
120
120
|
amount: Integer,
|
|
121
121
|
type:
|
|
122
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
122
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::OrSymbol
|
|
123
123
|
).returns(T.attached_class)
|
|
124
124
|
end
|
|
125
125
|
def self.new(
|
|
@@ -135,7 +135,7 @@ module FinchAPI
|
|
|
135
135
|
{
|
|
136
136
|
amount: Integer,
|
|
137
137
|
type:
|
|
138
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
138
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::OrSymbol
|
|
139
139
|
}
|
|
140
140
|
)
|
|
141
141
|
end
|
|
@@ -150,7 +150,7 @@ module FinchAPI
|
|
|
150
150
|
T.type_alias do
|
|
151
151
|
T.all(
|
|
152
152
|
Symbol,
|
|
153
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
153
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type
|
|
154
154
|
)
|
|
155
155
|
end
|
|
156
156
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -158,13 +158,13 @@ module FinchAPI
|
|
|
158
158
|
PERCENT =
|
|
159
159
|
T.let(
|
|
160
160
|
:percent,
|
|
161
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
161
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::TaggedSymbol
|
|
162
162
|
)
|
|
163
163
|
|
|
164
164
|
sig do
|
|
165
165
|
override.returns(
|
|
166
166
|
T::Array[
|
|
167
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
167
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionPercent::Type::TaggedSymbol
|
|
168
168
|
]
|
|
169
169
|
)
|
|
170
170
|
end
|
|
@@ -173,11 +173,11 @@ module FinchAPI
|
|
|
173
173
|
end
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
class
|
|
176
|
+
class BenefitContributionTiered < FinchAPI::Internal::Type::BaseModel
|
|
177
177
|
OrHash =
|
|
178
178
|
T.type_alias do
|
|
179
179
|
T.any(
|
|
180
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
180
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered,
|
|
181
181
|
FinchAPI::Internal::AnyHash
|
|
182
182
|
)
|
|
183
183
|
end
|
|
@@ -186,7 +186,9 @@ module FinchAPI
|
|
|
186
186
|
# contribution thresholds.
|
|
187
187
|
sig do
|
|
188
188
|
returns(
|
|
189
|
-
T::Array[
|
|
189
|
+
T::Array[
|
|
190
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier
|
|
191
|
+
]
|
|
190
192
|
)
|
|
191
193
|
end
|
|
192
194
|
attr_accessor :tiers
|
|
@@ -194,7 +196,7 @@ module FinchAPI
|
|
|
194
196
|
# Tiered contribution type (only valid for company_contribution).
|
|
195
197
|
sig do
|
|
196
198
|
returns(
|
|
197
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
199
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::OrSymbol
|
|
198
200
|
)
|
|
199
201
|
end
|
|
200
202
|
attr_accessor :type
|
|
@@ -203,10 +205,10 @@ module FinchAPI
|
|
|
203
205
|
params(
|
|
204
206
|
tiers:
|
|
205
207
|
T::Array[
|
|
206
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
208
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier::OrHash
|
|
207
209
|
],
|
|
208
210
|
type:
|
|
209
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
211
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::OrSymbol
|
|
210
212
|
).returns(T.attached_class)
|
|
211
213
|
end
|
|
212
214
|
def self.new(
|
|
@@ -223,10 +225,10 @@ module FinchAPI
|
|
|
223
225
|
{
|
|
224
226
|
tiers:
|
|
225
227
|
T::Array[
|
|
226
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
228
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier
|
|
227
229
|
],
|
|
228
230
|
type:
|
|
229
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
231
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::OrSymbol
|
|
230
232
|
}
|
|
231
233
|
)
|
|
232
234
|
end
|
|
@@ -237,7 +239,7 @@ module FinchAPI
|
|
|
237
239
|
OrHash =
|
|
238
240
|
T.type_alias do
|
|
239
241
|
T.any(
|
|
240
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
242
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Tier,
|
|
241
243
|
FinchAPI::Internal::AnyHash
|
|
242
244
|
)
|
|
243
245
|
end
|
|
@@ -269,7 +271,7 @@ module FinchAPI
|
|
|
269
271
|
T.type_alias do
|
|
270
272
|
T.all(
|
|
271
273
|
Symbol,
|
|
272
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
274
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type
|
|
273
275
|
)
|
|
274
276
|
end
|
|
275
277
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -277,13 +279,13 @@ module FinchAPI
|
|
|
277
279
|
TIERED =
|
|
278
280
|
T.let(
|
|
279
281
|
:tiered,
|
|
280
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
282
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::TaggedSymbol
|
|
281
283
|
)
|
|
282
284
|
|
|
283
285
|
sig do
|
|
284
286
|
override.returns(
|
|
285
287
|
T::Array[
|
|
286
|
-
FinchAPI::HRIS::BenefitContribution::
|
|
288
|
+
FinchAPI::HRIS::BenefitContribution::BenefitContributionTiered::Type::TaggedSymbol
|
|
287
289
|
]
|
|
288
290
|
)
|
|
289
291
|
end
|