finch-api 0.1.0.pre.alpha.27 → 0.1.0.pre.alpha.29

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.
@@ -6,17 +6,21 @@ module FinchAPI
6
6
  # Exchange the authorization code for an access token
7
7
  sig do
8
8
  params(
9
- code: String,
10
9
  client_id: String,
11
10
  client_secret: String,
11
+ code: String,
12
12
  redirect_uri: String,
13
13
  request_options: FinchAPI::RequestOptions::OrHash
14
14
  ).returns(FinchAPI::CreateAccessTokenResponse)
15
15
  end
16
16
  def create(
17
+ # The client ID for your application
18
+ client_id:,
19
+ # The client secret for your application
20
+ client_secret:,
21
+ # The authorization code received from the authorization server
17
22
  code:,
18
- client_id: nil,
19
- client_secret: nil,
23
+ # The redirect URI used in the authorization request (optional)
20
24
  redirect_uri: nil,
21
25
  request_options: {}
22
26
  )
@@ -2,9 +2,9 @@ module FinchAPI
2
2
  module Models
3
3
  type access_token_create_params =
4
4
  {
5
- code: String,
6
5
  client_id: String,
7
6
  client_secret: String,
7
+ code: String,
8
8
  redirect_uri: String
9
9
  }
10
10
  & FinchAPI::Internal::Type::request_parameters
@@ -13,32 +13,28 @@ module FinchAPI
13
13
  extend FinchAPI::Internal::Type::RequestParameters::Converter
14
14
  include FinchAPI::Internal::Type::RequestParameters
15
15
 
16
- attr_accessor code: String
17
-
18
- attr_reader client_id: String?
19
-
20
- def client_id=: (String) -> String
16
+ attr_accessor client_id: String
21
17
 
22
- attr_reader client_secret: String?
18
+ attr_accessor client_secret: String
23
19
 
24
- def client_secret=: (String) -> String
20
+ attr_accessor code: String
25
21
 
26
22
  attr_reader redirect_uri: String?
27
23
 
28
24
  def redirect_uri=: (String) -> String
29
25
 
30
26
  def initialize: (
27
+ client_id: String,
28
+ client_secret: String,
31
29
  code: String,
32
- ?client_id: String,
33
- ?client_secret: String,
34
30
  ?redirect_uri: String,
35
31
  ?request_options: FinchAPI::request_opts
36
32
  ) -> void
37
33
 
38
34
  def to_hash: -> {
39
- code: String,
40
35
  client_id: String,
41
36
  client_secret: String,
37
+ code: String,
42
38
  redirect_uri: String,
43
39
  request_options: FinchAPI::RequestOptions
44
40
  }
@@ -3,26 +3,22 @@ module FinchAPI
3
3
  type create_access_token_response =
4
4
  {
5
5
  access_token: String,
6
- account_id: String,
7
6
  client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type,
8
- company_id: String,
9
7
  connection_id: String,
10
8
  connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type,
11
9
  products: ::Array[String],
12
10
  provider_id: String,
13
- customer_id: String?,
14
- token_type: String
11
+ token_type: String,
12
+ account_id: String,
13
+ company_id: String,
14
+ customer_id: String?
15
15
  }
16
16
 
17
17
  class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel
18
18
  attr_accessor access_token: String
19
19
 
20
- attr_accessor account_id: String
21
-
22
20
  attr_accessor client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type
23
21
 
24
- attr_accessor company_id: String
25
-
26
22
  attr_accessor connection_id: String
27
23
 
28
24
  attr_accessor connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type
@@ -31,57 +27,63 @@ module FinchAPI
31
27
 
32
28
  attr_accessor provider_id: String
33
29
 
34
- attr_accessor customer_id: String?
30
+ attr_accessor token_type: String
31
+
32
+ attr_reader account_id: String?
33
+
34
+ def account_id=: (String) -> String
35
35
 
36
- attr_reader token_type: String?
36
+ attr_reader company_id: String?
37
37
 
38
- def token_type=: (String) -> String
38
+ def company_id=: (String) -> String
39
+
40
+ attr_accessor customer_id: String?
39
41
 
40
42
  def initialize: (
41
43
  access_token: String,
42
- account_id: String,
43
44
  client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type,
44
- company_id: String,
45
45
  connection_id: String,
46
46
  connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type,
47
47
  products: ::Array[String],
48
48
  provider_id: String,
49
- ?customer_id: String?,
50
- ?token_type: String
49
+ token_type: String,
50
+ ?account_id: String,
51
+ ?company_id: String,
52
+ ?customer_id: String?
51
53
  ) -> void
52
54
 
53
55
  def to_hash: -> {
54
56
  access_token: String,
55
- account_id: String,
56
57
  client_type: FinchAPI::Models::CreateAccessTokenResponse::client_type,
57
- company_id: String,
58
58
  connection_id: String,
59
59
  connection_type: FinchAPI::Models::CreateAccessTokenResponse::connection_type,
60
60
  products: ::Array[String],
61
61
  provider_id: String,
62
- customer_id: String?,
63
- token_type: String
62
+ token_type: String,
63
+ account_id: String,
64
+ company_id: String,
65
+ customer_id: String?
64
66
  }
65
67
 
66
- type client_type = :production | :development | :sandbox
68
+ type client_type = :development | :production | :sandbox
67
69
 
68
70
  module ClientType
69
71
  extend FinchAPI::Internal::Type::Enum
70
72
 
71
- PRODUCTION: :production
72
73
  DEVELOPMENT: :development
74
+ PRODUCTION: :production
73
75
  SANDBOX: :sandbox
74
76
 
75
77
  def self?.values: -> ::Array[FinchAPI::Models::CreateAccessTokenResponse::client_type]
76
78
  end
77
79
 
78
- type connection_type = :provider | :finch
80
+ type connection_type = :finch | :provider
79
81
 
80
82
  module ConnectionType
81
83
  extend FinchAPI::Internal::Type::Enum
82
84
 
83
- PROVIDER: :provider
84
85
  FINCH: :finch
86
+ PROVIDER: :provider
85
87
 
86
88
  def self?.values: -> ::Array[FinchAPI::Models::CreateAccessTokenResponse::connection_type]
87
89
  end
@@ -3,107 +3,197 @@ module FinchAPI
3
3
  type introspection =
4
4
  {
5
5
  id: String,
6
- account_id: String,
7
- authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod],
8
6
  client_id: String,
9
7
  client_type: FinchAPI::Models::Introspection::client_type,
10
- company_id: String,
11
8
  connection_id: String,
12
9
  connection_status: FinchAPI::Introspection::ConnectionStatus,
13
10
  connection_type: FinchAPI::Models::Introspection::connection_type,
11
+ products: ::Array[String],
12
+ provider_id: String,
13
+ account_id: String,
14
+ authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod],
15
+ company_id: String,
14
16
  customer_email: String?,
15
17
  customer_id: String?,
16
18
  customer_name: String?,
19
+ entity_ids: ::Array[String],
20
+ entity_mode: FinchAPI::Models::Introspection::entity_mode,
17
21
  manual: bool,
18
22
  payroll_provider_id: String,
19
- products: ::Array[String],
20
- provider_id: String,
21
- username: String
23
+ username: String?
22
24
  }
23
25
 
24
26
  class Introspection < FinchAPI::Internal::Type::BaseModel
25
27
  attr_accessor id: String
26
28
 
27
- attr_accessor account_id: String
28
-
29
- attr_accessor authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod]
30
-
31
29
  attr_accessor client_id: String
32
30
 
33
31
  attr_accessor client_type: FinchAPI::Models::Introspection::client_type
34
32
 
35
- attr_accessor company_id: String
36
-
37
33
  attr_accessor connection_id: String
38
34
 
39
35
  attr_accessor connection_status: FinchAPI::Introspection::ConnectionStatus
40
36
 
41
37
  attr_accessor connection_type: FinchAPI::Models::Introspection::connection_type
42
38
 
39
+ attr_accessor products: ::Array[String]
40
+
41
+ attr_accessor provider_id: String
42
+
43
+ attr_reader account_id: String?
44
+
45
+ def account_id=: (String) -> String
46
+
47
+ attr_reader authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod]?
48
+
49
+ def authentication_methods=: (
50
+ ::Array[FinchAPI::Introspection::AuthenticationMethod]
51
+ ) -> ::Array[FinchAPI::Introspection::AuthenticationMethod]
52
+
53
+ attr_reader company_id: String?
54
+
55
+ def company_id=: (String) -> String
56
+
43
57
  attr_accessor customer_email: String?
44
58
 
45
59
  attr_accessor customer_id: String?
46
60
 
47
61
  attr_accessor customer_name: String?
48
62
 
49
- attr_accessor manual: bool
63
+ attr_reader entity_ids: ::Array[String]?
50
64
 
51
- attr_accessor payroll_provider_id: String
65
+ def entity_ids=: (::Array[String]) -> ::Array[String]
52
66
 
53
- attr_accessor products: ::Array[String]
67
+ attr_reader entity_mode: FinchAPI::Models::Introspection::entity_mode?
54
68
 
55
- attr_accessor provider_id: String
69
+ def entity_mode=: (
70
+ FinchAPI::Models::Introspection::entity_mode
71
+ ) -> FinchAPI::Models::Introspection::entity_mode
72
+
73
+ attr_reader manual: bool?
74
+
75
+ def manual=: (bool) -> bool
56
76
 
57
- attr_accessor username: String
77
+ attr_reader payroll_provider_id: String?
78
+
79
+ def payroll_provider_id=: (String) -> String
80
+
81
+ attr_accessor username: String?
58
82
 
59
83
  def initialize: (
60
84
  id: String,
61
- account_id: String,
62
- authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod],
63
85
  client_id: String,
64
86
  client_type: FinchAPI::Models::Introspection::client_type,
65
- company_id: String,
66
87
  connection_id: String,
67
88
  connection_status: FinchAPI::Introspection::ConnectionStatus,
68
89
  connection_type: FinchAPI::Models::Introspection::connection_type,
69
- customer_email: String?,
70
- customer_id: String?,
71
- customer_name: String?,
72
- manual: bool,
73
- payroll_provider_id: String,
74
90
  products: ::Array[String],
75
91
  provider_id: String,
76
- username: String
92
+ ?account_id: String,
93
+ ?authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod],
94
+ ?company_id: String,
95
+ ?customer_email: String?,
96
+ ?customer_id: String?,
97
+ ?customer_name: String?,
98
+ ?entity_ids: ::Array[String],
99
+ ?entity_mode: FinchAPI::Models::Introspection::entity_mode,
100
+ ?manual: bool,
101
+ ?payroll_provider_id: String,
102
+ ?username: String?
77
103
  ) -> void
78
104
 
79
105
  def to_hash: -> {
80
106
  id: String,
81
- account_id: String,
82
- authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod],
83
107
  client_id: String,
84
108
  client_type: FinchAPI::Models::Introspection::client_type,
85
- company_id: String,
86
109
  connection_id: String,
87
110
  connection_status: FinchAPI::Introspection::ConnectionStatus,
88
111
  connection_type: FinchAPI::Models::Introspection::connection_type,
112
+ products: ::Array[String],
113
+ provider_id: String,
114
+ account_id: String,
115
+ authentication_methods: ::Array[FinchAPI::Introspection::AuthenticationMethod],
116
+ company_id: String,
89
117
  customer_email: String?,
90
118
  customer_id: String?,
91
119
  customer_name: String?,
120
+ entity_ids: ::Array[String],
121
+ entity_mode: FinchAPI::Models::Introspection::entity_mode,
92
122
  manual: bool,
93
123
  payroll_provider_id: String,
94
- products: ::Array[String],
95
- provider_id: String,
96
- username: String
124
+ username: String?
97
125
  }
98
126
 
127
+ type client_type = :development | :production | :sandbox
128
+
129
+ module ClientType
130
+ extend FinchAPI::Internal::Type::Enum
131
+
132
+ DEVELOPMENT: :development
133
+ PRODUCTION: :production
134
+ SANDBOX: :sandbox
135
+
136
+ def self?.values: -> ::Array[FinchAPI::Models::Introspection::client_type]
137
+ end
138
+
139
+ type connection_status =
140
+ {
141
+ status: FinchAPI::Models::connection_status_type,
142
+ last_successful_sync: FinchAPI::Models::Introspection::ConnectionStatus::last_successful_sync?,
143
+ message: String
144
+ }
145
+
146
+ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
147
+ attr_accessor status: FinchAPI::Models::connection_status_type
148
+
149
+ attr_accessor last_successful_sync: FinchAPI::Models::Introspection::ConnectionStatus::last_successful_sync?
150
+
151
+ attr_reader message: String?
152
+
153
+ def message=: (String) -> String
154
+
155
+ def initialize: (
156
+ status: FinchAPI::Models::connection_status_type,
157
+ ?last_successful_sync: FinchAPI::Models::Introspection::ConnectionStatus::last_successful_sync?,
158
+ ?message: String
159
+ ) -> void
160
+
161
+ def to_hash: -> {
162
+ status: FinchAPI::Models::connection_status_type,
163
+ last_successful_sync: FinchAPI::Models::Introspection::ConnectionStatus::last_successful_sync?,
164
+ message: String
165
+ }
166
+
167
+ type last_successful_sync = Time | String
168
+
169
+ module LastSuccessfulSync
170
+ extend FinchAPI::Internal::Type::Union
171
+
172
+ def self?.variants: -> ::Array[FinchAPI::Models::Introspection::ConnectionStatus::last_successful_sync]
173
+ end
174
+ end
175
+
176
+ type connection_type = :finch | :provider
177
+
178
+ module ConnectionType
179
+ extend FinchAPI::Internal::Type::Enum
180
+
181
+ FINCH: :finch
182
+ PROVIDER: :provider
183
+
184
+ def self?.values: -> ::Array[FinchAPI::Models::Introspection::connection_type]
185
+ end
186
+
99
187
  type authentication_method =
100
188
  {
189
+ type: FinchAPI::Models::Introspection::AuthenticationMethod::type_,
101
190
  connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
102
- products: ::Array[String],
103
- type: FinchAPI::Models::Introspection::AuthenticationMethod::type_
191
+ products: ::Array[String]
104
192
  }
105
193
 
106
194
  class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel
195
+ attr_accessor type: FinchAPI::Models::Introspection::AuthenticationMethod::type_
196
+
107
197
  attr_reader connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus?
108
198
 
109
199
  def connection_status=: (
@@ -114,49 +204,18 @@ module FinchAPI
114
204
 
115
205
  def products=: (::Array[String]) -> ::Array[String]
116
206
 
117
- attr_reader type: FinchAPI::Models::Introspection::AuthenticationMethod::type_?
118
-
119
- def type=: (
120
- FinchAPI::Models::Introspection::AuthenticationMethod::type_
121
- ) -> FinchAPI::Models::Introspection::AuthenticationMethod::type_
122
-
123
207
  def initialize: (
208
+ type: FinchAPI::Models::Introspection::AuthenticationMethod::type_,
124
209
  ?connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
125
- ?products: ::Array[String],
126
- ?type: FinchAPI::Models::Introspection::AuthenticationMethod::type_
210
+ ?products: ::Array[String]
127
211
  ) -> void
128
212
 
129
213
  def to_hash: -> {
214
+ type: FinchAPI::Models::Introspection::AuthenticationMethod::type_,
130
215
  connection_status: FinchAPI::Introspection::AuthenticationMethod::ConnectionStatus,
131
- products: ::Array[String],
132
- type: FinchAPI::Models::Introspection::AuthenticationMethod::type_
216
+ products: ::Array[String]
133
217
  }
134
218
 
135
- type connection_status =
136
- { message: String, status: FinchAPI::Models::connection_status_type }
137
-
138
- class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
139
- attr_reader message: String?
140
-
141
- def message=: (String) -> String
142
-
143
- attr_reader status: FinchAPI::Models::connection_status_type?
144
-
145
- def status=: (
146
- FinchAPI::Models::connection_status_type
147
- ) -> FinchAPI::Models::connection_status_type
148
-
149
- def initialize: (
150
- ?message: String,
151
- ?status: FinchAPI::Models::connection_status_type
152
- ) -> void
153
-
154
- def to_hash: -> {
155
- message: String,
156
- status: FinchAPI::Models::connection_status_type
157
- }
158
- end
159
-
160
219
  type type_ =
161
220
  :assisted | :credential | :api_token | :api_credential | :oauth
162
221
 
@@ -171,64 +230,54 @@ module FinchAPI
171
230
 
172
231
  def self?.values: -> ::Array[FinchAPI::Models::Introspection::AuthenticationMethod::type_]
173
232
  end
174
- end
175
-
176
- type client_type = :production | :development | :sandbox
177
-
178
- module ClientType
179
- extend FinchAPI::Internal::Type::Enum
180
-
181
- PRODUCTION: :production
182
- DEVELOPMENT: :development
183
- SANDBOX: :sandbox
184
233
 
185
- def self?.values: -> ::Array[FinchAPI::Models::Introspection::client_type]
186
- end
234
+ type connection_status =
235
+ {
236
+ status: FinchAPI::Models::connection_status_type,
237
+ last_successful_sync: FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus::last_successful_sync?,
238
+ message: String
239
+ }
187
240
 
188
- type connection_status =
189
- {
190
- last_successful_sync: Time,
191
- message: String,
192
- status: FinchAPI::Models::connection_status_type
193
- }
241
+ class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
242
+ attr_accessor status: FinchAPI::Models::connection_status_type
194
243
 
195
- class ConnectionStatus < FinchAPI::Internal::Type::BaseModel
196
- attr_reader last_successful_sync: Time?
244
+ attr_accessor last_successful_sync: FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus::last_successful_sync?
197
245
 
198
- def last_successful_sync=: (Time) -> Time
246
+ attr_reader message: String?
199
247
 
200
- attr_reader message: String?
248
+ def message=: (String) -> String
201
249
 
202
- def message=: (String) -> String
250
+ def initialize: (
251
+ status: FinchAPI::Models::connection_status_type,
252
+ ?last_successful_sync: FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus::last_successful_sync?,
253
+ ?message: String
254
+ ) -> void
203
255
 
204
- attr_reader status: FinchAPI::Models::connection_status_type?
256
+ def to_hash: -> {
257
+ status: FinchAPI::Models::connection_status_type,
258
+ last_successful_sync: FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus::last_successful_sync?,
259
+ message: String
260
+ }
205
261
 
206
- def status=: (
207
- FinchAPI::Models::connection_status_type
208
- ) -> FinchAPI::Models::connection_status_type
262
+ type last_successful_sync = Time | String
209
263
 
210
- def initialize: (
211
- ?last_successful_sync: Time,
212
- ?message: String,
213
- ?status: FinchAPI::Models::connection_status_type
214
- ) -> void
264
+ module LastSuccessfulSync
265
+ extend FinchAPI::Internal::Type::Union
215
266
 
216
- def to_hash: -> {
217
- last_successful_sync: Time,
218
- message: String,
219
- status: FinchAPI::Models::connection_status_type
220
- }
267
+ def self?.variants: -> ::Array[FinchAPI::Models::Introspection::AuthenticationMethod::ConnectionStatus::last_successful_sync]
268
+ end
269
+ end
221
270
  end
222
271
 
223
- type connection_type = :provider | :finch
272
+ type entity_mode = :single | :multi
224
273
 
225
- module ConnectionType
274
+ module EntityMode
226
275
  extend FinchAPI::Internal::Type::Enum
227
276
 
228
- PROVIDER: :provider
229
- FINCH: :finch
277
+ SINGLE: :single
278
+ MULTI: :multi
230
279
 
231
- def self?.values: -> ::Array[FinchAPI::Models::Introspection::connection_type]
280
+ def self?.values: -> ::Array[FinchAPI::Models::Introspection::entity_mode]
232
281
  end
233
282
  end
234
283
  end
@@ -2,9 +2,9 @@ module FinchAPI
2
2
  module Resources
3
3
  class AccessTokens
4
4
  def create: (
5
+ client_id: String,
6
+ client_secret: String,
5
7
  code: String,
6
- ?client_id: String,
7
- ?client_secret: String,
8
8
  ?redirect_uri: String,
9
9
  ?request_options: FinchAPI::request_opts
10
10
  ) -> FinchAPI::CreateAccessTokenResponse
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finch-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.27
4
+ version: 0.1.0.pre.alpha.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Finch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-19 00:00:00.000000000 Z
11
+ date: 2025-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool