finch-api 0.1.0.pre.alpha.26 → 0.1.0.pre.alpha.28
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 +16 -0
- data/README.md +1 -1
- data/lib/finch_api/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/finch_api/internal/type/base_model.rb +1 -8
- data/lib/finch_api/internal/util.rb +1 -1
- data/lib/finch_api/models/access_token_create_params.rb +21 -13
- data/lib/finch_api/models/account_update_event.rb +28 -84
- data/lib/finch_api/models/create_access_token_response.rb +42 -42
- data/lib/finch_api/models/hris/benefit_create_params.rb +1 -3
- data/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb +6 -18
- data/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb +3 -10
- data/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb +1 -3
- data/lib/finch_api/models/hris/company_benefit.rb +1 -3
- data/lib/finch_api/models/hris/document_list_params.rb +1 -4
- data/lib/finch_api/models/hris/employment_retrieve_many_params.rb +1 -3
- data/lib/finch_api/models/hris/individual_retrieve_many_params.rb +1 -3
- data/lib/finch_api/models/hris/pay_statement.rb +1 -4
- data/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb +1 -3
- data/lib/finch_api/models/introspection.rb +180 -137
- data/lib/finch_api/models/provider.rb +19 -68
- data/lib/finch_api/models/sandbox/connection_create_params.rb +1 -4
- data/lib/finch_api/models/sandbox/directory_create_params.rb +1 -4
- data/lib/finch_api/models/sandbox/payment_create_params.rb +7 -22
- data/lib/finch_api/resources/access_tokens.rb +9 -5
- data/lib/finch_api/version.rb +1 -1
- data/rbi/finch_api/errors.rbi +2 -2
- data/rbi/finch_api/models/access_token_create_params.rbi +17 -15
- data/rbi/finch_api/models/create_access_token_response.rbi +54 -51
- data/rbi/finch_api/models/introspection.rbi +309 -236
- data/rbi/finch_api/resources/access_tokens.rbi +7 -3
- data/sig/finch_api/models/access_token_create_params.rbs +7 -11
- data/sig/finch_api/models/create_access_token_response.rbs +25 -23
- data/sig/finch_api/models/introspection.rbs +139 -117
- data/sig/finch_api/resources/access_tokens.rbs +2 -2
- metadata +2 -2
@@ -8,19 +8,11 @@ module FinchAPI
|
|
8
8
|
T.any(FinchAPI::Introspection, FinchAPI::Internal::AnyHash)
|
9
9
|
end
|
10
10
|
|
11
|
-
# The Finch UUID of the token being introspected
|
11
|
+
# The Finch UUID of the token being introspected
|
12
12
|
sig { returns(String) }
|
13
13
|
attr_accessor :id
|
14
14
|
|
15
|
-
#
|
16
|
-
# instead of this account ID.
|
17
|
-
sig { returns(String) }
|
18
|
-
attr_accessor :account_id
|
19
|
-
|
20
|
-
sig { returns(T::Array[FinchAPI::Introspection::AuthenticationMethod]) }
|
21
|
-
attr_accessor :authentication_methods
|
22
|
-
|
23
|
-
# The client ID of the application associated with the `access_token`.
|
15
|
+
# The client ID of the application associated with the `access_token`
|
24
16
|
sig { returns(String) }
|
25
17
|
attr_accessor :client_id
|
26
18
|
|
@@ -28,12 +20,7 @@ module FinchAPI
|
|
28
20
|
sig { returns(FinchAPI::Introspection::ClientType::TaggedSymbol) }
|
29
21
|
attr_accessor :client_type
|
30
22
|
|
31
|
-
#
|
32
|
-
# instead of this company ID.
|
33
|
-
sig { returns(String) }
|
34
|
-
attr_accessor :company_id
|
35
|
-
|
36
|
-
# The Finch UUID of the connection associated with the `access_token`.
|
23
|
+
# The Finch UUID of the connection associated with the `access_token`
|
37
24
|
sig { returns(String) }
|
38
25
|
attr_accessor :connection_id
|
39
26
|
|
@@ -54,81 +41,111 @@ module FinchAPI
|
|
54
41
|
sig { returns(FinchAPI::Introspection::ConnectionType::TaggedSymbol) }
|
55
42
|
attr_accessor :connection_type
|
56
43
|
|
44
|
+
# An array of the authorized products associated with the `access_token`.
|
45
|
+
sig { returns(T::Array[String]) }
|
46
|
+
attr_accessor :products
|
47
|
+
|
48
|
+
# The ID of the provider associated with the `access_token`.
|
49
|
+
sig { returns(String) }
|
50
|
+
attr_accessor :provider_id
|
51
|
+
|
52
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
53
|
+
# instead of this account ID
|
54
|
+
sig { returns(T.nilable(String)) }
|
55
|
+
attr_reader :account_id
|
56
|
+
|
57
|
+
sig { params(account_id: String).void }
|
58
|
+
attr_writer :account_id
|
59
|
+
|
60
|
+
sig do
|
61
|
+
returns(
|
62
|
+
T.nilable(T::Array[FinchAPI::Introspection::AuthenticationMethod])
|
63
|
+
)
|
64
|
+
end
|
65
|
+
attr_reader :authentication_methods
|
66
|
+
|
67
|
+
sig do
|
68
|
+
params(
|
69
|
+
authentication_methods:
|
70
|
+
T::Array[FinchAPI::Introspection::AuthenticationMethod::OrHash]
|
71
|
+
).void
|
72
|
+
end
|
73
|
+
attr_writer :authentication_methods
|
74
|
+
|
75
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
76
|
+
# instead of this company ID
|
77
|
+
sig { returns(T.nilable(String)) }
|
78
|
+
attr_reader :company_id
|
79
|
+
|
80
|
+
sig { params(company_id: String).void }
|
81
|
+
attr_writer :company_id
|
82
|
+
|
57
83
|
# The email of your customer you provided to Finch when a connect session was
|
58
|
-
# created for this connection
|
84
|
+
# created for this connection
|
59
85
|
sig { returns(T.nilable(String)) }
|
60
86
|
attr_accessor :customer_email
|
61
87
|
|
62
88
|
# The ID of your customer you provided to Finch when a connect session was created
|
63
|
-
# for this connection
|
89
|
+
# for this connection
|
64
90
|
sig { returns(T.nilable(String)) }
|
65
91
|
attr_accessor :customer_id
|
66
92
|
|
67
93
|
# The name of your customer you provided to Finch when a connect session was
|
68
|
-
# created for this connection
|
94
|
+
# created for this connection
|
69
95
|
sig { returns(T.nilable(String)) }
|
70
96
|
attr_accessor :customer_name
|
71
97
|
|
72
98
|
# Whether the connection associated with the `access_token` uses the Assisted
|
73
99
|
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
|
74
100
|
# automated)
|
75
|
-
sig { returns(T::Boolean) }
|
76
|
-
|
101
|
+
sig { returns(T.nilable(T::Boolean)) }
|
102
|
+
attr_reader :manual
|
103
|
+
|
104
|
+
sig { params(manual: T::Boolean).void }
|
105
|
+
attr_writer :manual
|
77
106
|
|
78
107
|
# [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
|
79
108
|
# provider ID.
|
80
|
-
sig { returns(String) }
|
81
|
-
|
109
|
+
sig { returns(T.nilable(String)) }
|
110
|
+
attr_reader :payroll_provider_id
|
82
111
|
|
83
|
-
|
84
|
-
|
85
|
-
attr_accessor :products
|
86
|
-
|
87
|
-
# The ID of the provider associated with the `access_token`.
|
88
|
-
sig { returns(String) }
|
89
|
-
attr_accessor :provider_id
|
112
|
+
sig { params(payroll_provider_id: String).void }
|
113
|
+
attr_writer :payroll_provider_id
|
90
114
|
|
91
115
|
# The account username used for login associated with the `access_token`.
|
92
|
-
sig { returns(String) }
|
116
|
+
sig { returns(T.nilable(String)) }
|
93
117
|
attr_accessor :username
|
94
118
|
|
95
119
|
sig do
|
96
120
|
params(
|
97
121
|
id: String,
|
98
|
-
account_id: String,
|
99
|
-
authentication_methods:
|
100
|
-
T::Array[FinchAPI::Introspection::AuthenticationMethod::OrHash],
|
101
122
|
client_id: String,
|
102
123
|
client_type: FinchAPI::Introspection::ClientType::OrSymbol,
|
103
|
-
company_id: String,
|
104
124
|
connection_id: String,
|
105
125
|
connection_status: FinchAPI::Introspection::ConnectionStatus::OrHash,
|
106
126
|
connection_type: FinchAPI::Introspection::ConnectionType::OrSymbol,
|
127
|
+
products: T::Array[String],
|
128
|
+
provider_id: String,
|
129
|
+
account_id: String,
|
130
|
+
authentication_methods:
|
131
|
+
T::Array[FinchAPI::Introspection::AuthenticationMethod::OrHash],
|
132
|
+
company_id: String,
|
107
133
|
customer_email: T.nilable(String),
|
108
134
|
customer_id: T.nilable(String),
|
109
135
|
customer_name: T.nilable(String),
|
110
136
|
manual: T::Boolean,
|
111
137
|
payroll_provider_id: String,
|
112
|
-
|
113
|
-
provider_id: String,
|
114
|
-
username: String
|
138
|
+
username: T.nilable(String)
|
115
139
|
).returns(T.attached_class)
|
116
140
|
end
|
117
141
|
def self.new(
|
118
|
-
# The Finch UUID of the token being introspected
|
142
|
+
# The Finch UUID of the token being introspected
|
119
143
|
id:,
|
120
|
-
#
|
121
|
-
# instead of this account ID.
|
122
|
-
account_id:,
|
123
|
-
authentication_methods:,
|
124
|
-
# The client ID of the application associated with the `access_token`.
|
144
|
+
# The client ID of the application associated with the `access_token`
|
125
145
|
client_id:,
|
126
146
|
# The type of application associated with a token.
|
127
147
|
client_type:,
|
128
|
-
#
|
129
|
-
# instead of this company ID.
|
130
|
-
company_id:,
|
131
|
-
# The Finch UUID of the connection associated with the `access_token`.
|
148
|
+
# The Finch UUID of the connection associated with the `access_token`
|
132
149
|
connection_id:,
|
133
150
|
connection_status:,
|
134
151
|
# The type of the connection associated with the token.
|
@@ -136,28 +153,35 @@ module FinchAPI
|
|
136
153
|
# - `provider` - connection to an external provider
|
137
154
|
# - `finch` - finch-generated data.
|
138
155
|
connection_type:,
|
156
|
+
# An array of the authorized products associated with the `access_token`.
|
157
|
+
products:,
|
158
|
+
# The ID of the provider associated with the `access_token`.
|
159
|
+
provider_id:,
|
160
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
161
|
+
# instead of this account ID
|
162
|
+
account_id: nil,
|
163
|
+
authentication_methods: nil,
|
164
|
+
# [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
|
165
|
+
# instead of this company ID
|
166
|
+
company_id: nil,
|
139
167
|
# The email of your customer you provided to Finch when a connect session was
|
140
|
-
# created for this connection
|
141
|
-
customer_email
|
168
|
+
# created for this connection
|
169
|
+
customer_email: nil,
|
142
170
|
# The ID of your customer you provided to Finch when a connect session was created
|
143
|
-
# for this connection
|
144
|
-
customer_id
|
171
|
+
# for this connection
|
172
|
+
customer_id: nil,
|
145
173
|
# The name of your customer you provided to Finch when a connect session was
|
146
|
-
# created for this connection
|
147
|
-
customer_name
|
174
|
+
# created for this connection
|
175
|
+
customer_name: nil,
|
148
176
|
# Whether the connection associated with the `access_token` uses the Assisted
|
149
177
|
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
|
150
178
|
# automated)
|
151
|
-
manual
|
179
|
+
manual: nil,
|
152
180
|
# [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
|
153
181
|
# provider ID.
|
154
|
-
payroll_provider_id
|
155
|
-
# An array of the authorized products associated with the `access_token`.
|
156
|
-
products:,
|
157
|
-
# The ID of the provider associated with the `access_token`.
|
158
|
-
provider_id:,
|
182
|
+
payroll_provider_id: nil,
|
159
183
|
# The account username used for login associated with the `access_token`.
|
160
|
-
username:
|
184
|
+
username: nil
|
161
185
|
)
|
162
186
|
end
|
163
187
|
|
@@ -165,156 +189,236 @@ module FinchAPI
|
|
165
189
|
override.returns(
|
166
190
|
{
|
167
191
|
id: String,
|
168
|
-
account_id: String,
|
169
|
-
authentication_methods:
|
170
|
-
T::Array[FinchAPI::Introspection::AuthenticationMethod],
|
171
192
|
client_id: String,
|
172
193
|
client_type: FinchAPI::Introspection::ClientType::TaggedSymbol,
|
173
|
-
company_id: String,
|
174
194
|
connection_id: String,
|
175
195
|
connection_status: FinchAPI::Introspection::ConnectionStatus,
|
176
196
|
connection_type:
|
177
197
|
FinchAPI::Introspection::ConnectionType::TaggedSymbol,
|
198
|
+
products: T::Array[String],
|
199
|
+
provider_id: String,
|
200
|
+
account_id: String,
|
201
|
+
authentication_methods:
|
202
|
+
T::Array[FinchAPI::Introspection::AuthenticationMethod],
|
203
|
+
company_id: String,
|
178
204
|
customer_email: T.nilable(String),
|
179
205
|
customer_id: T.nilable(String),
|
180
206
|
customer_name: T.nilable(String),
|
181
207
|
manual: T::Boolean,
|
182
208
|
payroll_provider_id: String,
|
183
|
-
|
184
|
-
provider_id: String,
|
185
|
-
username: String
|
209
|
+
username: T.nilable(String)
|
186
210
|
}
|
187
211
|
)
|
188
212
|
end
|
189
213
|
def to_hash
|
190
214
|
end
|
191
215
|
|
192
|
-
|
216
|
+
# The type of application associated with a token.
|
217
|
+
module ClientType
|
218
|
+
extend FinchAPI::Internal::Type::Enum
|
219
|
+
|
220
|
+
TaggedSymbol =
|
221
|
+
T.type_alias { T.all(Symbol, FinchAPI::Introspection::ClientType) }
|
222
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
223
|
+
|
224
|
+
DEVELOPMENT =
|
225
|
+
T.let(:development, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
226
|
+
PRODUCTION =
|
227
|
+
T.let(:production, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
228
|
+
SANDBOX =
|
229
|
+
T.let(:sandbox, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
230
|
+
|
231
|
+
sig do
|
232
|
+
override.returns(
|
233
|
+
T::Array[FinchAPI::Introspection::ClientType::TaggedSymbol]
|
234
|
+
)
|
235
|
+
end
|
236
|
+
def self.values
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
|
193
241
|
OrHash =
|
194
242
|
T.type_alias do
|
195
243
|
T.any(
|
196
|
-
FinchAPI::Introspection::
|
244
|
+
FinchAPI::Introspection::ConnectionStatus,
|
197
245
|
FinchAPI::Internal::AnyHash
|
198
246
|
)
|
199
247
|
end
|
200
248
|
|
249
|
+
sig { returns(FinchAPI::ConnectionStatusType::TaggedSymbol) }
|
250
|
+
attr_accessor :status
|
251
|
+
|
252
|
+
# The datetime when the connection was last successfully synced
|
201
253
|
sig do
|
202
254
|
returns(
|
203
255
|
T.nilable(
|
204
|
-
FinchAPI::Introspection::
|
256
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
205
257
|
)
|
206
258
|
)
|
207
259
|
end
|
208
|
-
|
260
|
+
attr_accessor :last_successful_sync
|
261
|
+
|
262
|
+
sig { returns(T.nilable(String)) }
|
263
|
+
attr_reader :message
|
264
|
+
|
265
|
+
sig { params(message: String).void }
|
266
|
+
attr_writer :message
|
209
267
|
|
210
268
|
sig do
|
211
269
|
params(
|
212
|
-
|
213
|
-
|
214
|
-
|
270
|
+
status: FinchAPI::ConnectionStatusType::OrSymbol,
|
271
|
+
last_successful_sync:
|
272
|
+
T.nilable(
|
273
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
274
|
+
),
|
275
|
+
message: String
|
276
|
+
).returns(T.attached_class)
|
277
|
+
end
|
278
|
+
def self.new(
|
279
|
+
status:,
|
280
|
+
# The datetime when the connection was last successfully synced
|
281
|
+
last_successful_sync: nil,
|
282
|
+
message: nil
|
283
|
+
)
|
215
284
|
end
|
216
|
-
attr_writer :connection_status
|
217
285
|
|
218
|
-
|
219
|
-
|
220
|
-
|
286
|
+
sig do
|
287
|
+
override.returns(
|
288
|
+
{
|
289
|
+
status: FinchAPI::ConnectionStatusType::TaggedSymbol,
|
290
|
+
last_successful_sync:
|
291
|
+
T.nilable(
|
292
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
293
|
+
),
|
294
|
+
message: String
|
295
|
+
}
|
296
|
+
)
|
297
|
+
end
|
298
|
+
def to_hash
|
299
|
+
end
|
221
300
|
|
222
|
-
|
223
|
-
|
301
|
+
# The datetime when the connection was last successfully synced
|
302
|
+
module LastSuccessfulSync
|
303
|
+
extend FinchAPI::Internal::Type::Union
|
304
|
+
|
305
|
+
Variants = T.type_alias { T.any(Time, String) }
|
306
|
+
|
307
|
+
sig do
|
308
|
+
override.returns(
|
309
|
+
T::Array[
|
310
|
+
FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync::Variants
|
311
|
+
]
|
312
|
+
)
|
313
|
+
end
|
314
|
+
def self.variants
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
# The type of the connection associated with the token.
|
320
|
+
#
|
321
|
+
# - `provider` - connection to an external provider
|
322
|
+
# - `finch` - finch-generated data.
|
323
|
+
module ConnectionType
|
324
|
+
extend FinchAPI::Internal::Type::Enum
|
325
|
+
|
326
|
+
TaggedSymbol =
|
327
|
+
T.type_alias do
|
328
|
+
T.all(Symbol, FinchAPI::Introspection::ConnectionType)
|
329
|
+
end
|
330
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
331
|
+
|
332
|
+
FINCH =
|
333
|
+
T.let(:finch, FinchAPI::Introspection::ConnectionType::TaggedSymbol)
|
334
|
+
PROVIDER =
|
335
|
+
T.let(
|
336
|
+
:provider,
|
337
|
+
FinchAPI::Introspection::ConnectionType::TaggedSymbol
|
338
|
+
)
|
339
|
+
|
340
|
+
sig do
|
341
|
+
override.returns(
|
342
|
+
T::Array[FinchAPI::Introspection::ConnectionType::TaggedSymbol]
|
343
|
+
)
|
344
|
+
end
|
345
|
+
def self.values
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel
|
350
|
+
OrHash =
|
351
|
+
T.type_alias do
|
352
|
+
T.any(
|
353
|
+
FinchAPI::Introspection::AuthenticationMethod,
|
354
|
+
FinchAPI::Internal::AnyHash
|
355
|
+
)
|
356
|
+
end
|
357
|
+
|
358
|
+
# The type of authentication method
|
359
|
+
sig do
|
360
|
+
returns(
|
361
|
+
FinchAPI::Introspection::AuthenticationMethod::Type::TaggedSymbol
|
362
|
+
)
|
363
|
+
end
|
364
|
+
attr_accessor :type
|
224
365
|
|
225
|
-
# The type of authentication method.
|
226
366
|
sig do
|
227
367
|
returns(
|
228
368
|
T.nilable(
|
229
|
-
FinchAPI::Introspection::AuthenticationMethod::
|
369
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus
|
230
370
|
)
|
231
371
|
)
|
232
372
|
end
|
233
|
-
attr_reader :
|
373
|
+
attr_reader :connection_status
|
234
374
|
|
235
375
|
sig do
|
236
376
|
params(
|
237
|
-
|
377
|
+
connection_status:
|
378
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::OrHash
|
238
379
|
).void
|
239
380
|
end
|
240
|
-
attr_writer :
|
381
|
+
attr_writer :connection_status
|
382
|
+
|
383
|
+
# An array of the authorized products associated with the `access_token`
|
384
|
+
sig { returns(T.nilable(T::Array[String])) }
|
385
|
+
attr_reader :products
|
386
|
+
|
387
|
+
sig { params(products: T::Array[String]).void }
|
388
|
+
attr_writer :products
|
241
389
|
|
242
390
|
sig do
|
243
391
|
params(
|
392
|
+
type: FinchAPI::Introspection::AuthenticationMethod::Type::OrSymbol,
|
244
393
|
connection_status:
|
245
394
|
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::OrHash,
|
246
|
-
products: T::Array[String]
|
247
|
-
type: FinchAPI::Introspection::AuthenticationMethod::Type::OrSymbol
|
395
|
+
products: T::Array[String]
|
248
396
|
).returns(T.attached_class)
|
249
397
|
end
|
250
398
|
def self.new(
|
399
|
+
# The type of authentication method
|
400
|
+
type:,
|
251
401
|
connection_status: nil,
|
252
|
-
# An array of the authorized products associated with the `access_token
|
253
|
-
products: nil
|
254
|
-
# The type of authentication method.
|
255
|
-
type: nil
|
402
|
+
# An array of the authorized products associated with the `access_token`
|
403
|
+
products: nil
|
256
404
|
)
|
257
405
|
end
|
258
406
|
|
259
407
|
sig do
|
260
408
|
override.returns(
|
261
409
|
{
|
410
|
+
type:
|
411
|
+
FinchAPI::Introspection::AuthenticationMethod::Type::TaggedSymbol,
|
262
412
|
connection_status:
|
263
413
|
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
|
264
|
-
products: T::Array[String]
|
265
|
-
type:
|
266
|
-
FinchAPI::Introspection::AuthenticationMethod::Type::TaggedSymbol
|
414
|
+
products: T::Array[String]
|
267
415
|
}
|
268
416
|
)
|
269
417
|
end
|
270
418
|
def to_hash
|
271
419
|
end
|
272
420
|
|
273
|
-
|
274
|
-
OrHash =
|
275
|
-
T.type_alias do
|
276
|
-
T.any(
|
277
|
-
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
|
278
|
-
FinchAPI::Internal::AnyHash
|
279
|
-
)
|
280
|
-
end
|
281
|
-
|
282
|
-
sig { returns(T.nilable(String)) }
|
283
|
-
attr_reader :message
|
284
|
-
|
285
|
-
sig { params(message: String).void }
|
286
|
-
attr_writer :message
|
287
|
-
|
288
|
-
sig do
|
289
|
-
returns(T.nilable(FinchAPI::ConnectionStatusType::TaggedSymbol))
|
290
|
-
end
|
291
|
-
attr_reader :status
|
292
|
-
|
293
|
-
sig { params(status: FinchAPI::ConnectionStatusType::OrSymbol).void }
|
294
|
-
attr_writer :status
|
295
|
-
|
296
|
-
sig do
|
297
|
-
params(
|
298
|
-
message: String,
|
299
|
-
status: FinchAPI::ConnectionStatusType::OrSymbol
|
300
|
-
).returns(T.attached_class)
|
301
|
-
end
|
302
|
-
def self.new(message: nil, status: nil)
|
303
|
-
end
|
304
|
-
|
305
|
-
sig do
|
306
|
-
override.returns(
|
307
|
-
{
|
308
|
-
message: String,
|
309
|
-
status: FinchAPI::ConnectionStatusType::TaggedSymbol
|
310
|
-
}
|
311
|
-
)
|
312
|
-
end
|
313
|
-
def to_hash
|
314
|
-
end
|
315
|
-
end
|
316
|
-
|
317
|
-
# The type of authentication method.
|
421
|
+
# The type of authentication method
|
318
422
|
module Type
|
319
423
|
extend FinchAPI::Internal::Type::Enum
|
320
424
|
|
@@ -360,115 +464,84 @@ module FinchAPI
|
|
360
464
|
def self.values
|
361
465
|
end
|
362
466
|
end
|
363
|
-
end
|
364
|
-
|
365
|
-
# The type of application associated with a token.
|
366
|
-
module ClientType
|
367
|
-
extend FinchAPI::Internal::Type::Enum
|
368
467
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
SANDBOX =
|
378
|
-
T.let(:sandbox, FinchAPI::Introspection::ClientType::TaggedSymbol)
|
468
|
+
class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
|
469
|
+
OrHash =
|
470
|
+
T.type_alias do
|
471
|
+
T.any(
|
472
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
|
473
|
+
FinchAPI::Internal::AnyHash
|
474
|
+
)
|
475
|
+
end
|
379
476
|
|
380
|
-
|
381
|
-
|
382
|
-
T::Array[FinchAPI::Introspection::ClientType::TaggedSymbol]
|
383
|
-
)
|
384
|
-
end
|
385
|
-
def self.values
|
386
|
-
end
|
387
|
-
end
|
477
|
+
sig { returns(FinchAPI::ConnectionStatusType::TaggedSymbol) }
|
478
|
+
attr_accessor :status
|
388
479
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
480
|
+
# The datetime when the connection was last successfully synced
|
481
|
+
sig do
|
482
|
+
returns(
|
483
|
+
T.nilable(
|
484
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
485
|
+
)
|
395
486
|
)
|
396
487
|
end
|
488
|
+
attr_accessor :last_successful_sync
|
397
489
|
|
398
|
-
|
399
|
-
|
400
|
-
attr_reader :last_successful_sync
|
401
|
-
|
402
|
-
sig { params(last_successful_sync: Time).void }
|
403
|
-
attr_writer :last_successful_sync
|
404
|
-
|
405
|
-
sig { returns(T.nilable(String)) }
|
406
|
-
attr_reader :message
|
407
|
-
|
408
|
-
sig { params(message: String).void }
|
409
|
-
attr_writer :message
|
410
|
-
|
411
|
-
sig { returns(T.nilable(FinchAPI::ConnectionStatusType::TaggedSymbol)) }
|
412
|
-
attr_reader :status
|
413
|
-
|
414
|
-
sig { params(status: FinchAPI::ConnectionStatusType::OrSymbol).void }
|
415
|
-
attr_writer :status
|
490
|
+
sig { returns(T.nilable(String)) }
|
491
|
+
attr_reader :message
|
416
492
|
|
417
|
-
|
418
|
-
|
419
|
-
last_successful_sync: Time,
|
420
|
-
message: String,
|
421
|
-
status: FinchAPI::ConnectionStatusType::OrSymbol
|
422
|
-
).returns(T.attached_class)
|
423
|
-
end
|
424
|
-
def self.new(
|
425
|
-
# The datetime when the connection was last successfully synced.
|
426
|
-
last_successful_sync: nil,
|
427
|
-
message: nil,
|
428
|
-
status: nil
|
429
|
-
)
|
430
|
-
end
|
493
|
+
sig { params(message: String).void }
|
494
|
+
attr_writer :message
|
431
495
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
last_successful_sync:
|
436
|
-
|
437
|
-
|
438
|
-
|
496
|
+
sig do
|
497
|
+
params(
|
498
|
+
status: FinchAPI::ConnectionStatusType::OrSymbol,
|
499
|
+
last_successful_sync:
|
500
|
+
T.nilable(
|
501
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
502
|
+
),
|
503
|
+
message: String
|
504
|
+
).returns(T.attached_class)
|
505
|
+
end
|
506
|
+
def self.new(
|
507
|
+
status:,
|
508
|
+
# The datetime when the connection was last successfully synced
|
509
|
+
last_successful_sync: nil,
|
510
|
+
message: nil
|
439
511
|
)
|
440
|
-
|
441
|
-
def to_hash
|
442
|
-
end
|
443
|
-
end
|
444
|
-
|
445
|
-
# The type of the connection associated with the token.
|
446
|
-
#
|
447
|
-
# - `provider` - connection to an external provider
|
448
|
-
# - `finch` - finch-generated data.
|
449
|
-
module ConnectionType
|
450
|
-
extend FinchAPI::Internal::Type::Enum
|
512
|
+
end
|
451
513
|
|
452
|
-
|
453
|
-
|
454
|
-
|
514
|
+
sig do
|
515
|
+
override.returns(
|
516
|
+
{
|
517
|
+
status: FinchAPI::ConnectionStatusType::TaggedSymbol,
|
518
|
+
last_successful_sync:
|
519
|
+
T.nilable(
|
520
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
521
|
+
),
|
522
|
+
message: String
|
523
|
+
}
|
524
|
+
)
|
525
|
+
end
|
526
|
+
def to_hash
|
455
527
|
end
|
456
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
457
528
|
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
FinchAPI::Introspection::ConnectionType::TaggedSymbol
|
462
|
-
)
|
463
|
-
FINCH =
|
464
|
-
T.let(:finch, FinchAPI::Introspection::ConnectionType::TaggedSymbol)
|
529
|
+
# The datetime when the connection was last successfully synced
|
530
|
+
module LastSuccessfulSync
|
531
|
+
extend FinchAPI::Internal::Type::Union
|
465
532
|
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
533
|
+
Variants = T.type_alias { T.any(Time, String) }
|
534
|
+
|
535
|
+
sig do
|
536
|
+
override.returns(
|
537
|
+
T::Array[
|
538
|
+
FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync::Variants
|
539
|
+
]
|
540
|
+
)
|
541
|
+
end
|
542
|
+
def self.variants
|
543
|
+
end
|
544
|
+
end
|
472
545
|
end
|
473
546
|
end
|
474
547
|
end
|