finch-api 0.1.0.pre.alpha.27 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01be9b1e24c793e45dc2a3e63d0fcbee0e16f72d5c22e04bb77bf802a761aa24
4
- data.tar.gz: 4963b833fb1a24c64c2d5caa3ebd8047dbe0c88913a50b2c10d86de5c9a983d4
3
+ metadata.gz: ecf78c65c2b898a2b5031cd7fcc3328bfdc13e98431b09900bc6e1d8210edca8
4
+ data.tar.gz: 9d8bb5ffed3d5db0299511d1204935d73e3b3cf039e876925135cc17a8e405b9
5
5
  SHA512:
6
- metadata.gz: 8ad61d884ef0fe3c5b31fb8dd5f26a899e5446d89b6c8c8cea9f6df76ed4ccb81e4f84116690ee1e79700590c72c82a22ffa54c7448266517f57c1e0c69dbc58
7
- data.tar.gz: '079c8a914dc98d12916da58d6fac6a6b4e01be56294786fc6b416b0ec299751f233b5aca4754ba008216184cf8accf4784ee9f61c176314e8646035df3e92c63'
6
+ metadata.gz: 7886c407c082c9c2ca8070104bd1024515434914420b22e1a20df818cfe8d37aebac55d0687ea126f93dc3a0d1b7c4628d7b178dc5f7dcf8bdd93e5c9ede7be8
7
+ data.tar.gz: 23e139493a3c37ed53380063b9f3dd3507e542baea5f5c5afe59c95b2850f00e311bff1fe5fb645499c2ff10f337b91d3de7e51232f4fac3d3b6949ef16015b0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.28 (2025-08-20)
4
+
5
+ Full Changelog: [v0.1.0-alpha.27...v0.1.0-alpha.28](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.27...v0.1.0-alpha.28)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([e615899](https://github.com/Finch-API/finch-api-ruby/commit/e615899d0e9c1243db7fa677f08411ef4c291bbd))
10
+
3
11
  ## 0.1.0-alpha.27 (2025-08-19)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.26...v0.1.0-alpha.27)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "finch-api", "~> 0.1.0.pre.alpha.27"
20
+ gem "finch-api", "~> 0.1.0.pre.alpha.28"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -7,31 +7,39 @@ module FinchAPI
7
7
  extend FinchAPI::Internal::Type::RequestParameters::Converter
8
8
  include FinchAPI::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute code
10
+ # @!attribute client_id
11
+ # The client ID for your application
11
12
  #
12
13
  # @return [String]
13
- required :code, String
14
+ required :client_id, String
14
15
 
15
- # @!attribute client_id
16
+ # @!attribute client_secret
17
+ # The client secret for your application
16
18
  #
17
- # @return [String, nil]
18
- optional :client_id, String
19
+ # @return [String]
20
+ required :client_secret, String
19
21
 
20
- # @!attribute client_secret
22
+ # @!attribute code
23
+ # The authorization code received from the authorization server
21
24
  #
22
- # @return [String, nil]
23
- optional :client_secret, String
25
+ # @return [String]
26
+ required :code, String
24
27
 
25
28
  # @!attribute redirect_uri
29
+ # The redirect URI used in the authorization request (optional)
26
30
  #
27
31
  # @return [String, nil]
28
32
  optional :redirect_uri, String
29
33
 
30
- # @!method initialize(code:, client_id: nil, client_secret: nil, redirect_uri: nil, request_options: {})
31
- # @param code [String]
32
- # @param client_id [String]
33
- # @param client_secret [String]
34
- # @param redirect_uri [String]
34
+ # @!method initialize(client_id:, client_secret:, code:, redirect_uri: nil, request_options: {})
35
+ # @param client_id [String] The client ID for your application
36
+ #
37
+ # @param client_secret [String] The client secret for your application
38
+ #
39
+ # @param code [String] The authorization code received from the authorization server
40
+ #
41
+ # @param redirect_uri [String] The redirect URI used in the authorization request (optional)
42
+ #
35
43
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
36
44
  end
37
45
  end
@@ -5,37 +5,19 @@ module FinchAPI
5
5
  # @see FinchAPI::Resources::AccessTokens#create
6
6
  class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel
7
7
  # @!attribute access_token
8
- # The access token for the connection.
8
+ # The access token for the connection
9
9
  #
10
10
  # @return [String]
11
11
  required :access_token, String
12
12
 
13
- # @!attribute account_id
14
- # @deprecated
15
- #
16
- # [DEPRECATED] Use `connection_id` to identify the connection instead of this
17
- # account ID.
18
- #
19
- # @return [String]
20
- required :account_id, String
21
-
22
13
  # @!attribute client_type
23
14
  # The type of application associated with a token.
24
15
  #
25
16
  # @return [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType]
26
17
  required :client_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ClientType }
27
18
 
28
- # @!attribute company_id
29
- # @deprecated
30
- #
31
- # [DEPRECATED] Use `connection_id` to identify the connection instead of this
32
- # company ID.
33
- #
34
- # @return [String]
35
- required :company_id, String
36
-
37
19
  # @!attribute connection_id
38
- # The Finch UUID of the connection associated with the `access_token`.
20
+ # The Finch UUID of the connection associated with the `access_token`
39
21
  #
40
22
  # @return [String]
41
23
  required :connection_id, String
@@ -50,53 +32,71 @@ module FinchAPI
50
32
  required :connection_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ConnectionType }
51
33
 
52
34
  # @!attribute products
53
- # An array of the authorized products associated with the `access_token`.
35
+ # An array of the authorized products associated with the `access_token`
54
36
  #
55
37
  # @return [Array<String>]
56
38
  required :products, FinchAPI::Internal::Type::ArrayOf[String]
57
39
 
58
40
  # @!attribute provider_id
59
- # The ID of the provider associated with the `access_token`.
41
+ # The ID of the provider associated with the `access_token`
60
42
  #
61
43
  # @return [String]
62
44
  required :provider_id, String
63
45
 
64
- # @!attribute customer_id
65
- # The ID of your customer you provided to Finch when a connect session was created
66
- # for this connection.
46
+ # @!attribute token_type
47
+ # The RFC 8693 token type (Finch uses `bearer` tokens)
48
+ #
49
+ # @return [String]
50
+ required :token_type, String
51
+
52
+ # @!attribute account_id
53
+ # @deprecated
54
+ #
55
+ # [DEPRECATED] Use `connection_id` to identify the connection instead of this
56
+ # account ID
67
57
  #
68
58
  # @return [String, nil]
69
- optional :customer_id, String, nil?: true
59
+ optional :account_id, String
70
60
 
71
- # @!attribute token_type
72
- # The RFC 8693 token type (Finch uses `bearer` tokens)
61
+ # @!attribute company_id
62
+ # @deprecated
63
+ #
64
+ # [DEPRECATED] Use `connection_id` to identify the connection instead of this
65
+ # company ID
66
+ #
67
+ # @return [String, nil]
68
+ optional :company_id, String
69
+
70
+ # @!attribute customer_id
71
+ # The ID of your customer you provided to Finch when a connect session was created
72
+ # for this connection
73
73
  #
74
74
  # @return [String, nil]
75
- optional :token_type, String
75
+ optional :customer_id, String, nil?: true
76
76
 
77
- # @!method initialize(access_token:, account_id:, client_type:, company_id:, connection_id:, connection_type:, products:, provider_id:, customer_id: nil, token_type: nil)
77
+ # @!method initialize(access_token:, client_type:, connection_id:, connection_type:, products:, provider_id:, token_type:, account_id: nil, company_id: nil, customer_id: nil)
78
78
  # Some parameter documentations has been truncated, see
79
79
  # {FinchAPI::Models::CreateAccessTokenResponse} for more details.
80
80
  #
81
- # @param access_token [String] The access token for the connection.
82
- #
83
- # @param account_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this acco
81
+ # @param access_token [String] The access token for the connection
84
82
  #
85
83
  # @param client_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType] The type of application associated with a token.
86
84
  #
87
- # @param company_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this comp
88
- #
89
- # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`.
85
+ # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`
90
86
  #
91
87
  # @param connection_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] The type of the connection associated with the token.
92
88
  #
93
- # @param products [Array<String>] An array of the authorized products associated with the `access_token`.
94
- #
95
- # @param provider_id [String] The ID of the provider associated with the `access_token`.
89
+ # @param products [Array<String>] An array of the authorized products associated with the `access_token`
96
90
  #
97
- # @param customer_id [String, nil] The ID of your customer you provided to Finch when a connect session was created
91
+ # @param provider_id [String] The ID of the provider associated with the `access_token`
98
92
  #
99
93
  # @param token_type [String] The RFC 8693 token type (Finch uses `bearer` tokens)
94
+ #
95
+ # @param account_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this acco
96
+ #
97
+ # @param company_id [String] [DEPRECATED] Use `connection_id` to identify the connection instead of this comp
98
+ #
99
+ # @param customer_id [String, nil] The ID of your customer you provided to Finch when a connect session was created
100
100
 
101
101
  # The type of application associated with a token.
102
102
  #
@@ -104,8 +104,8 @@ module FinchAPI
104
104
  module ClientType
105
105
  extend FinchAPI::Internal::Type::Enum
106
106
 
107
- PRODUCTION = :production
108
107
  DEVELOPMENT = :development
108
+ PRODUCTION = :production
109
109
  SANDBOX = :sandbox
110
110
 
111
111
  # @!method self.values
@@ -121,8 +121,8 @@ module FinchAPI
121
121
  module ConnectionType
122
122
  extend FinchAPI::Internal::Type::Enum
123
123
 
124
- PROVIDER = :provider
125
124
  FINCH = :finch
125
+ PROVIDER = :provider
126
126
 
127
127
  # @!method self.values
128
128
  # @return [Array<Symbol>]
@@ -5,28 +5,13 @@ module FinchAPI
5
5
  # @see FinchAPI::Resources::Account#introspect
6
6
  class Introspection < FinchAPI::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # The Finch UUID of the token being introspected.
8
+ # The Finch UUID of the token being introspected
9
9
  #
10
10
  # @return [String]
11
11
  required :id, String
12
12
 
13
- # @!attribute account_id
14
- # @deprecated
15
- #
16
- # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
17
- # instead of this account ID.
18
- #
19
- # @return [String]
20
- required :account_id, String
21
-
22
- # @!attribute authentication_methods
23
- #
24
- # @return [Array<FinchAPI::Models::Introspection::AuthenticationMethod>]
25
- required :authentication_methods,
26
- -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Introspection::AuthenticationMethod] }
27
-
28
13
  # @!attribute client_id
29
- # The client ID of the application associated with the `access_token`.
14
+ # The client ID of the application associated with the `access_token`
30
15
  #
31
16
  # @return [String]
32
17
  required :client_id, String
@@ -37,17 +22,8 @@ module FinchAPI
37
22
  # @return [Symbol, FinchAPI::Models::Introspection::ClientType]
38
23
  required :client_type, enum: -> { FinchAPI::Introspection::ClientType }
39
24
 
40
- # @!attribute company_id
41
- # @deprecated
42
- #
43
- # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
44
- # instead of this company ID.
45
- #
46
- # @return [String]
47
- required :company_id, String
48
-
49
25
  # @!attribute connection_id
50
- # The Finch UUID of the connection associated with the `access_token`.
26
+ # The Finch UUID of the connection associated with the `access_token`
51
27
  #
52
28
  # @return [String]
53
29
  required :connection_id, String
@@ -66,34 +42,70 @@ module FinchAPI
66
42
  # @return [Symbol, FinchAPI::Models::Introspection::ConnectionType]
67
43
  required :connection_type, enum: -> { FinchAPI::Introspection::ConnectionType }
68
44
 
45
+ # @!attribute products
46
+ # An array of the authorized products associated with the `access_token`.
47
+ #
48
+ # @return [Array<String>]
49
+ required :products, FinchAPI::Internal::Type::ArrayOf[String]
50
+
51
+ # @!attribute provider_id
52
+ # The ID of the provider associated with the `access_token`.
53
+ #
54
+ # @return [String]
55
+ required :provider_id, String
56
+
57
+ # @!attribute account_id
58
+ # @deprecated
59
+ #
60
+ # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
61
+ # instead of this account ID
62
+ #
63
+ # @return [String, nil]
64
+ optional :account_id, String
65
+
66
+ # @!attribute authentication_methods
67
+ #
68
+ # @return [Array<FinchAPI::Models::Introspection::AuthenticationMethod>, nil]
69
+ optional :authentication_methods,
70
+ -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Introspection::AuthenticationMethod] }
71
+
72
+ # @!attribute company_id
73
+ # @deprecated
74
+ #
75
+ # [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
76
+ # instead of this company ID
77
+ #
78
+ # @return [String, nil]
79
+ optional :company_id, String
80
+
69
81
  # @!attribute customer_email
70
82
  # The email of your customer you provided to Finch when a connect session was
71
- # created for this connection.
83
+ # created for this connection
72
84
  #
73
85
  # @return [String, nil]
74
- required :customer_email, String, nil?: true
86
+ optional :customer_email, String, nil?: true
75
87
 
76
88
  # @!attribute customer_id
77
89
  # The ID of your customer you provided to Finch when a connect session was created
78
- # for this connection.
90
+ # for this connection
79
91
  #
80
92
  # @return [String, nil]
81
- required :customer_id, String, nil?: true
93
+ optional :customer_id, String, nil?: true
82
94
 
83
95
  # @!attribute customer_name
84
96
  # The name of your customer you provided to Finch when a connect session was
85
- # created for this connection.
97
+ # created for this connection
86
98
  #
87
99
  # @return [String, nil]
88
- required :customer_name, String, nil?: true
100
+ optional :customer_name, String, nil?: true
89
101
 
90
102
  # @!attribute manual
91
103
  # Whether the connection associated with the `access_token` uses the Assisted
92
104
  # Connect Flow. (`true` if using Assisted Connect, `false` if connection is
93
105
  # automated)
94
106
  #
95
- # @return [Boolean]
96
- required :manual, FinchAPI::Internal::Type::Boolean
107
+ # @return [Boolean, nil]
108
+ optional :manual, FinchAPI::Internal::Type::Boolean
97
109
 
98
110
  # @!attribute payroll_provider_id
99
111
  # @deprecated
@@ -101,49 +113,41 @@ module FinchAPI
101
113
  # [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
102
114
  # provider ID.
103
115
  #
104
- # @return [String]
105
- required :payroll_provider_id, String
106
-
107
- # @!attribute products
108
- # An array of the authorized products associated with the `access_token`.
109
- #
110
- # @return [Array<String>]
111
- required :products, FinchAPI::Internal::Type::ArrayOf[String]
112
-
113
- # @!attribute provider_id
114
- # The ID of the provider associated with the `access_token`.
115
- #
116
- # @return [String]
117
- required :provider_id, String
116
+ # @return [String, nil]
117
+ optional :payroll_provider_id, String
118
118
 
119
119
  # @!attribute username
120
120
  # The account username used for login associated with the `access_token`.
121
121
  #
122
- # @return [String]
123
- required :username, String
122
+ # @return [String, nil]
123
+ optional :username, String, nil?: true
124
124
 
125
- # @!method initialize(id:, account_id:, authentication_methods:, client_id:, client_type:, company_id:, connection_id:, connection_status:, connection_type:, customer_email:, customer_id:, customer_name:, manual:, payroll_provider_id:, products:, provider_id:, username:)
125
+ # @!method initialize(id:, client_id:, client_type:, connection_id:, connection_status:, connection_type:, products:, provider_id:, account_id: nil, authentication_methods: nil, company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, manual: nil, payroll_provider_id: nil, username: nil)
126
126
  # Some parameter documentations has been truncated, see
127
127
  # {FinchAPI::Models::Introspection} for more details.
128
128
  #
129
- # @param id [String] The Finch UUID of the token being introspected.
130
- #
131
- # @param account_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins
132
- #
133
- # @param authentication_methods [Array<FinchAPI::Models::Introspection::AuthenticationMethod>]
129
+ # @param id [String] The Finch UUID of the token being introspected
134
130
  #
135
- # @param client_id [String] The client ID of the application associated with the `access_token`.
131
+ # @param client_id [String] The client ID of the application associated with the `access_token`
136
132
  #
137
133
  # @param client_type [Symbol, FinchAPI::Models::Introspection::ClientType] The type of application associated with a token.
138
134
  #
139
- # @param company_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins
140
- #
141
- # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`.
135
+ # @param connection_id [String] The Finch UUID of the connection associated with the `access_token`
142
136
  #
143
137
  # @param connection_status [FinchAPI::Models::Introspection::ConnectionStatus]
144
138
  #
145
139
  # @param connection_type [Symbol, FinchAPI::Models::Introspection::ConnectionType] The type of the connection associated with the token.
146
140
  #
141
+ # @param products [Array<String>] An array of the authorized products associated with the `access_token`.
142
+ #
143
+ # @param provider_id [String] The ID of the provider associated with the `access_token`.
144
+ #
145
+ # @param account_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins
146
+ #
147
+ # @param authentication_methods [Array<FinchAPI::Models::Introspection::AuthenticationMethod>]
148
+ #
149
+ # @param company_id [String] [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection ins
150
+ #
147
151
  # @param customer_email [String, nil] The email of your customer you provided to Finch when a connect session was crea
148
152
  #
149
153
  # @param customer_id [String, nil] The ID of your customer you provided to Finch when a connect session was created
@@ -154,70 +158,7 @@ module FinchAPI
154
158
  #
155
159
  # @param payroll_provider_id [String] [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
156
160
  #
157
- # @param products [Array<String>] An array of the authorized products associated with the `access_token`.
158
- #
159
- # @param provider_id [String] The ID of the provider associated with the `access_token`.
160
- #
161
- # @param username [String] The account username used for login associated with the `access_token`.
162
-
163
- class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel
164
- # @!attribute connection_status
165
- #
166
- # @return [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus, nil]
167
- optional :connection_status, -> { FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus }
168
-
169
- # @!attribute products
170
- # An array of the authorized products associated with the `access_token`.
171
- #
172
- # @return [Array<String>, nil]
173
- optional :products, FinchAPI::Internal::Type::ArrayOf[String]
174
-
175
- # @!attribute type
176
- # The type of authentication method.
177
- #
178
- # @return [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type, nil]
179
- optional :type, enum: -> { FinchAPI::Introspection::AuthenticationMethod::Type }
180
-
181
- # @!method initialize(connection_status: nil, products: nil, type: nil)
182
- # @param connection_status [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus]
183
- #
184
- # @param products [Array<String>] An array of the authorized products associated with the `access_token`.
185
- #
186
- # @param type [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type] The type of authentication method.
187
-
188
- # @see FinchAPI::Models::Introspection::AuthenticationMethod#connection_status
189
- class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
190
- # @!attribute message
191
- #
192
- # @return [String, nil]
193
- optional :message, String
194
-
195
- # @!attribute status
196
- #
197
- # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil]
198
- optional :status, enum: -> { FinchAPI::ConnectionStatusType }
199
-
200
- # @!method initialize(message: nil, status: nil)
201
- # @param message [String]
202
- # @param status [Symbol, FinchAPI::Models::ConnectionStatusType]
203
- end
204
-
205
- # The type of authentication method.
206
- #
207
- # @see FinchAPI::Models::Introspection::AuthenticationMethod#type
208
- module Type
209
- extend FinchAPI::Internal::Type::Enum
210
-
211
- ASSISTED = :assisted
212
- CREDENTIAL = :credential
213
- API_TOKEN = :api_token
214
- API_CREDENTIAL = :api_credential
215
- OAUTH = :oauth
216
-
217
- # @!method self.values
218
- # @return [Array<Symbol>]
219
- end
220
- end
161
+ # @param username [String, nil] The account username used for login associated with the `access_token`.
221
162
 
222
163
  # The type of application associated with a token.
223
164
  #
@@ -225,8 +166,8 @@ module FinchAPI
225
166
  module ClientType
226
167
  extend FinchAPI::Internal::Type::Enum
227
168
 
228
- PRODUCTION = :production
229
169
  DEVELOPMENT = :development
170
+ PRODUCTION = :production
230
171
  SANDBOX = :sandbox
231
172
 
232
173
  # @!method self.values
@@ -235,28 +176,44 @@ module FinchAPI
235
176
 
236
177
  # @see FinchAPI::Models::Introspection#connection_status
237
178
  class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
179
+ # @!attribute status
180
+ #
181
+ # @return [Symbol, FinchAPI::Models::ConnectionStatusType]
182
+ required :status, enum: -> { FinchAPI::ConnectionStatusType }
183
+
238
184
  # @!attribute last_successful_sync
239
- # The datetime when the connection was last successfully synced.
185
+ # The datetime when the connection was last successfully synced
240
186
  #
241
- # @return [Time, nil]
242
- optional :last_successful_sync, Time
187
+ # @return [Time, String, nil]
188
+ optional :last_successful_sync,
189
+ union: -> { FinchAPI::Introspection::ConnectionStatus::LastSuccessfulSync },
190
+ nil?: true
243
191
 
244
192
  # @!attribute message
245
193
  #
246
194
  # @return [String, nil]
247
195
  optional :message, String
248
196
 
249
- # @!attribute status
197
+ # @!method initialize(status:, last_successful_sync: nil, message: nil)
198
+ # @param status [Symbol, FinchAPI::Models::ConnectionStatusType]
250
199
  #
251
- # @return [Symbol, FinchAPI::Models::ConnectionStatusType, nil]
252
- optional :status, enum: -> { FinchAPI::ConnectionStatusType }
253
-
254
- # @!method initialize(last_successful_sync: nil, message: nil, status: nil)
255
- # @param last_successful_sync [Time] The datetime when the connection was last successfully synced.
200
+ # @param last_successful_sync [Time, String, nil] The datetime when the connection was last successfully synced
256
201
  #
257
202
  # @param message [String]
203
+
204
+ # The datetime when the connection was last successfully synced
258
205
  #
259
- # @param status [Symbol, FinchAPI::Models::ConnectionStatusType]
206
+ # @see FinchAPI::Models::Introspection::ConnectionStatus#last_successful_sync
207
+ module LastSuccessfulSync
208
+ extend FinchAPI::Internal::Type::Union
209
+
210
+ variant Time
211
+
212
+ variant String
213
+
214
+ # @!method self.variants
215
+ # @return [Array(Time, String)]
216
+ end
260
217
  end
261
218
 
262
219
  # The type of the connection associated with the token.
@@ -268,12 +225,98 @@ module FinchAPI
268
225
  module ConnectionType
269
226
  extend FinchAPI::Internal::Type::Enum
270
227
 
271
- PROVIDER = :provider
272
228
  FINCH = :finch
229
+ PROVIDER = :provider
273
230
 
274
231
  # @!method self.values
275
232
  # @return [Array<Symbol>]
276
233
  end
234
+
235
+ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel
236
+ # @!attribute type
237
+ # The type of authentication method
238
+ #
239
+ # @return [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type]
240
+ required :type, enum: -> { FinchAPI::Introspection::AuthenticationMethod::Type }
241
+
242
+ # @!attribute connection_status
243
+ #
244
+ # @return [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus, nil]
245
+ optional :connection_status, -> { FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus }
246
+
247
+ # @!attribute products
248
+ # An array of the authorized products associated with the `access_token`
249
+ #
250
+ # @return [Array<String>, nil]
251
+ optional :products, FinchAPI::Internal::Type::ArrayOf[String]
252
+
253
+ # @!method initialize(type:, connection_status: nil, products: nil)
254
+ # @param type [Symbol, FinchAPI::Models::Introspection::AuthenticationMethod::Type] The type of authentication method
255
+ #
256
+ # @param connection_status [FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus]
257
+ #
258
+ # @param products [Array<String>] An array of the authorized products associated with the `access_token`
259
+
260
+ # The type of authentication method
261
+ #
262
+ # @see FinchAPI::Models::Introspection::AuthenticationMethod#type
263
+ module Type
264
+ extend FinchAPI::Internal::Type::Enum
265
+
266
+ ASSISTED = :assisted
267
+ CREDENTIAL = :credential
268
+ API_TOKEN = :api_token
269
+ API_CREDENTIAL = :api_credential
270
+ OAUTH = :oauth
271
+
272
+ # @!method self.values
273
+ # @return [Array<Symbol>]
274
+ end
275
+
276
+ # @see FinchAPI::Models::Introspection::AuthenticationMethod#connection_status
277
+ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
278
+ # @!attribute status
279
+ #
280
+ # @return [Symbol, FinchAPI::Models::ConnectionStatusType]
281
+ required :status, enum: -> { FinchAPI::ConnectionStatusType }
282
+
283
+ # @!attribute last_successful_sync
284
+ # The datetime when the connection was last successfully synced
285
+ #
286
+ # @return [Time, String, nil]
287
+ optional :last_successful_sync,
288
+ union: -> {
289
+ FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus::LastSuccessfulSync
290
+ },
291
+ nil?: true
292
+
293
+ # @!attribute message
294
+ #
295
+ # @return [String, nil]
296
+ optional :message, String
297
+
298
+ # @!method initialize(status:, last_successful_sync: nil, message: nil)
299
+ # @param status [Symbol, FinchAPI::Models::ConnectionStatusType]
300
+ #
301
+ # @param last_successful_sync [Time, String, nil] The datetime when the connection was last successfully synced
302
+ #
303
+ # @param message [String]
304
+
305
+ # The datetime when the connection was last successfully synced
306
+ #
307
+ # @see FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus#last_successful_sync
308
+ module LastSuccessfulSync
309
+ extend FinchAPI::Internal::Type::Union
310
+
311
+ variant Time
312
+
313
+ variant String
314
+
315
+ # @!method self.variants
316
+ # @return [Array(Time, String)]
317
+ end
318
+ end
319
+ end
277
320
  end
278
321
  end
279
322
  end