Skip to content

Commit 31c3661

Browse files
feat(api): api update
1 parent ab22783 commit 31c3661

20 files changed

+30
-300
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ef0b0fb4ec85648855da514cbc53018cb429fb37bce8570bc6c44254eb32c62f.yml
3-
openapi_spec_hash: 38622a4a3cdef04686053018329616f2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-df44cda9b18320f8a8117d5c8dfa02ebd6739fc77fc87eb284748c987a7412a4.yml
3+
openapi_spec_hash: 69524ddfedf3c4492e77826561f7c7d8
44
config_hash: 6d3585c0032e08d723d077d660fc8448

lib/finch_api/models/introspection.rb

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,6 @@ class Introspection < FinchAPI::Internal::Type::BaseModel
9999
# @return [String, nil]
100100
optional :customer_name, String, nil?: true
101101

102-
# @!attribute entity_ids
103-
# Array of entity IDs associated with this connection.
104-
#
105-
# @return [Array<String>, nil]
106-
optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
107-
108-
# @!attribute entity_mode
109-
# Indicates whether this connection manages a single entity or multiple entities.
110-
#
111-
# @return [Symbol, FinchAPI::Models::Introspection::EntityMode, nil]
112-
optional :entity_mode, enum: -> { FinchAPI::Introspection::EntityMode }
113-
114102
# @!attribute manual
115103
# Whether the connection associated with the `access_token` uses the Assisted
116104
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
@@ -134,7 +122,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel
134122
# @return [String, nil]
135123
optional :username, String, nil?: true
136124

137-
# @!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, entity_ids: nil, entity_mode: nil, manual: nil, payroll_provider_id: nil, username: nil)
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)
138126
# Some parameter documentations has been truncated, see
139127
# {FinchAPI::Models::Introspection} for more details.
140128
#
@@ -166,10 +154,6 @@ class Introspection < FinchAPI::Internal::Type::BaseModel
166154
#
167155
# @param customer_name [String, nil] The name of your customer you provided to Finch when a connect session was creat
168156
#
169-
# @param entity_ids [Array<String>] Array of entity IDs associated with this connection.
170-
#
171-
# @param entity_mode [Symbol, FinchAPI::Models::Introspection::EntityMode] Indicates whether this connection manages a single entity or multiple entities.
172-
#
173157
# @param manual [Boolean] Whether the connection associated with the `access_token` uses the Assisted Conn
174158
#
175159
# @param payroll_provider_id [String] [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
@@ -333,19 +317,6 @@ module LastSuccessfulSync
333317
end
334318
end
335319
end
336-
337-
# Indicates whether this connection manages a single entity or multiple entities.
338-
#
339-
# @see FinchAPI::Models::Introspection#entity_mode
340-
module EntityMode
341-
extend FinchAPI::Internal::Type::Enum
342-
343-
SINGLE = :single
344-
MULTI = :multi
345-
346-
# @!method self.values
347-
# @return [Array<Symbol>]
348-
end
349320
end
350321
end
351322
end

lib/finch_api/models/jobs/automated_list_params.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel
88
extend FinchAPI::Internal::Type::RequestParameters::Converter
99
include FinchAPI::Internal::Type::RequestParameters
1010

11-
# @!attribute entity_id
12-
# The entity ID to use when authenticating with a multi-account token. Required
13-
# when using a multi-account token to specify which entity's data to access.
14-
# Example: `123e4567-e89b-12d3-a456-426614174000`
15-
#
16-
# @return [String, nil]
17-
optional :entity_id, String
18-
1911
# @!attribute limit
2012
# Number of items to return
2113
#
@@ -28,12 +20,7 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel
2820
# @return [Integer, nil]
2921
optional :offset, Integer
3022

31-
# @!method initialize(entity_id: nil, limit: nil, offset: nil, request_options: {})
32-
# Some parameter documentations has been truncated, see
33-
# {FinchAPI::Models::Jobs::AutomatedListParams} for more details.
34-
#
35-
# @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
36-
#
23+
# @!method initialize(limit: nil, offset: nil, request_options: {})
3724
# @param limit [Integer] Number of items to return
3825
#
3926
# @param offset [Integer] Index to start from (defaults to 0)

lib/finch_api/models/jobs/automated_retrieve_params.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,7 @@ class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel
88
extend FinchAPI::Internal::Type::RequestParameters::Converter
99
include FinchAPI::Internal::Type::RequestParameters
1010

11-
# @!attribute entity_id
12-
# The entity ID to use when authenticating with a multi-account token. Required
13-
# when using a multi-account token to specify which entity's data to access.
14-
# Example: `123e4567-e89b-12d3-a456-426614174000`
15-
#
16-
# @return [String, nil]
17-
optional :entity_id, String
18-
19-
# @!method initialize(entity_id: nil, request_options: {})
20-
# Some parameter documentations has been truncated, see
21-
# {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details.
22-
#
23-
# @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
24-
#
11+
# @!method initialize(request_options: {})
2512
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
2613
end
2714
end

lib/finch_api/models/jobs/manual_retrieve_params.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,7 @@ class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel
88
extend FinchAPI::Internal::Type::RequestParameters::Converter
99
include FinchAPI::Internal::Type::RequestParameters
1010

11-
# @!attribute entity_id
12-
# The entity ID to use when authenticating with a multi-account token. Required
13-
# when using a multi-account token to specify which entity's data to access.
14-
# Example: `123e4567-e89b-12d3-a456-426614174000`
15-
#
16-
# @return [String, nil]
17-
optional :entity_id, String
18-
19-
# @!method initialize(entity_id: nil, request_options: {})
20-
# Some parameter documentations has been truncated, see
21-
# {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details.
22-
#
23-
# @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
24-
#
11+
# @!method initialize(request_options: {})
2512
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
2613
end
2714
end

lib/finch_api/resources/jobs/automated.rb

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,43 +41,30 @@ def create(params)
4141
)
4242
end
4343

44-
# Some parameter documentations has been truncated, see
45-
# {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details.
46-
#
4744
# Get an automated job by `job_id`.
4845
#
49-
# @overload retrieve(job_id, entity_id: nil, request_options: {})
46+
# @overload retrieve(job_id, request_options: {})
5047
#
5148
# @param job_id [String]
52-
#
53-
# @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
54-
#
5549
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
5650
#
5751
# @return [FinchAPI::Models::Jobs::AutomatedAsyncJob]
5852
#
5953
# @see FinchAPI::Models::Jobs::AutomatedRetrieveParams
6054
def retrieve(job_id, params = {})
61-
parsed, options = FinchAPI::Jobs::AutomatedRetrieveParams.dump_request(params)
6255
@client.request(
6356
method: :get,
6457
path: ["jobs/automated/%1$s", job_id],
65-
query: parsed,
6658
model: FinchAPI::Jobs::AutomatedAsyncJob,
67-
options: options
59+
options: params[:request_options]
6860
)
6961
end
7062

71-
# Some parameter documentations has been truncated, see
72-
# {FinchAPI::Models::Jobs::AutomatedListParams} for more details.
73-
#
7463
# Get all automated jobs. Automated jobs are completed by a machine. By default,
7564
# jobs are sorted in descending order by submission time. For scheduled jobs such
7665
# as data syncs, only the next scheduled job is shown.
7766
#
78-
# @overload list(entity_id: nil, limit: nil, offset: nil, request_options: {})
79-
#
80-
# @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
67+
# @overload list(limit: nil, offset: nil, request_options: {})
8168
#
8269
# @param limit [Integer] Number of items to return
8370
#

lib/finch_api/resources/jobs/manual.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,23 @@ module FinchAPI
44
module Resources
55
class Jobs
66
class Manual
7-
# Some parameter documentations has been truncated, see
8-
# {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details.
9-
#
107
# Get a manual job by `job_id`. Manual jobs are completed by a human and include
118
# Assisted Benefits jobs.
129
#
13-
# @overload retrieve(job_id, entity_id: nil, request_options: {})
10+
# @overload retrieve(job_id, request_options: {})
1411
#
1512
# @param job_id [String]
16-
#
17-
# @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
18-
#
1913
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
2014
#
2115
# @return [FinchAPI::Models::Jobs::ManualAsyncJob]
2216
#
2317
# @see FinchAPI::Models::Jobs::ManualRetrieveParams
2418
def retrieve(job_id, params = {})
25-
parsed, options = FinchAPI::Jobs::ManualRetrieveParams.dump_request(params)
2619
@client.request(
2720
method: :get,
2821
path: ["jobs/manual/%1$s", job_id],
29-
query: parsed,
3022
model: FinchAPI::Jobs::ManualAsyncJob,
31-
options: options
23+
options: params[:request_options]
3224
)
3325
end
3426

rbi/finch_api/models/introspection.rbi

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,6 @@ module FinchAPI
9595
sig { returns(T.nilable(String)) }
9696
attr_accessor :customer_name
9797

98-
# Array of entity IDs associated with this connection.
99-
sig { returns(T.nilable(T::Array[String])) }
100-
attr_reader :entity_ids
101-
102-
sig { params(entity_ids: T::Array[String]).void }
103-
attr_writer :entity_ids
104-
105-
# Indicates whether this connection manages a single entity or multiple entities.
106-
sig do
107-
returns(T.nilable(FinchAPI::Introspection::EntityMode::TaggedSymbol))
108-
end
109-
attr_reader :entity_mode
110-
111-
sig do
112-
params(entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol).void
113-
end
114-
attr_writer :entity_mode
115-
11698
# Whether the connection associated with the `access_token` uses the Assisted
11799
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
118100
# automated)
@@ -151,8 +133,6 @@ module FinchAPI
151133
customer_email: T.nilable(String),
152134
customer_id: T.nilable(String),
153135
customer_name: T.nilable(String),
154-
entity_ids: T::Array[String],
155-
entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol,
156136
manual: T::Boolean,
157137
payroll_provider_id: String,
158138
username: T.nilable(String)
@@ -193,10 +173,6 @@ module FinchAPI
193173
# The name of your customer you provided to Finch when a connect session was
194174
# created for this connection
195175
customer_name: nil,
196-
# Array of entity IDs associated with this connection.
197-
entity_ids: nil,
198-
# Indicates whether this connection manages a single entity or multiple entities.
199-
entity_mode: nil,
200176
# Whether the connection associated with the `access_token` uses the Assisted
201177
# Connect Flow. (`true` if using Assisted Connect, `false` if connection is
202178
# automated)
@@ -228,8 +204,6 @@ module FinchAPI
228204
customer_email: T.nilable(String),
229205
customer_id: T.nilable(String),
230206
customer_name: T.nilable(String),
231-
entity_ids: T::Array[String],
232-
entity_mode: FinchAPI::Introspection::EntityMode::TaggedSymbol,
233207
manual: T::Boolean,
234208
payroll_provider_id: String,
235209
username: T.nilable(String)
@@ -570,27 +544,6 @@ module FinchAPI
570544
end
571545
end
572546
end
573-
574-
# Indicates whether this connection manages a single entity or multiple entities.
575-
module EntityMode
576-
extend FinchAPI::Internal::Type::Enum
577-
578-
TaggedSymbol =
579-
T.type_alias { T.all(Symbol, FinchAPI::Introspection::EntityMode) }
580-
OrSymbol = T.type_alias { T.any(Symbol, String) }
581-
582-
SINGLE =
583-
T.let(:single, FinchAPI::Introspection::EntityMode::TaggedSymbol)
584-
MULTI = T.let(:multi, FinchAPI::Introspection::EntityMode::TaggedSymbol)
585-
586-
sig do
587-
override.returns(
588-
T::Array[FinchAPI::Introspection::EntityMode::TaggedSymbol]
589-
)
590-
end
591-
def self.values
592-
end
593-
end
594547
end
595548
end
596549
end

rbi/finch_api/models/jobs/automated_list_params.rbi

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@ module FinchAPI
1515
)
1616
end
1717

18-
# The entity ID to use when authenticating with a multi-account token. Required
19-
# when using a multi-account token to specify which entity's data to access.
20-
# Example: `123e4567-e89b-12d3-a456-426614174000`
21-
sig { returns(T.nilable(String)) }
22-
attr_reader :entity_id
23-
24-
sig { params(entity_id: String).void }
25-
attr_writer :entity_id
26-
2718
# Number of items to return
2819
sig { returns(T.nilable(Integer)) }
2920
attr_reader :limit
@@ -40,17 +31,12 @@ module FinchAPI
4031

4132
sig do
4233
params(
43-
entity_id: String,
4434
limit: Integer,
4535
offset: Integer,
4636
request_options: FinchAPI::RequestOptions::OrHash
4737
).returns(T.attached_class)
4838
end
4939
def self.new(
50-
# The entity ID to use when authenticating with a multi-account token. Required
51-
# when using a multi-account token to specify which entity's data to access.
52-
# Example: `123e4567-e89b-12d3-a456-426614174000`
53-
entity_id: nil,
5440
# Number of items to return
5541
limit: nil,
5642
# Index to start from (defaults to 0)
@@ -62,7 +48,6 @@ module FinchAPI
6248
sig do
6349
override.returns(
6450
{
65-
entity_id: String,
6651
limit: Integer,
6752
offset: Integer,
6853
request_options: FinchAPI::RequestOptions

rbi/finch_api/models/jobs/automated_retrieve_params.rbi

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,15 @@ module FinchAPI
1515
)
1616
end
1717

18-
# The entity ID to use when authenticating with a multi-account token. Required
19-
# when using a multi-account token to specify which entity's data to access.
20-
# Example: `123e4567-e89b-12d3-a456-426614174000`
21-
sig { returns(T.nilable(String)) }
22-
attr_reader :entity_id
23-
24-
sig { params(entity_id: String).void }
25-
attr_writer :entity_id
26-
2718
sig do
28-
params(
29-
entity_id: String,
30-
request_options: FinchAPI::RequestOptions::OrHash
31-
).returns(T.attached_class)
19+
params(request_options: FinchAPI::RequestOptions::OrHash).returns(
20+
T.attached_class
21+
)
3222
end
33-
def self.new(
34-
# The entity ID to use when authenticating with a multi-account token. Required
35-
# when using a multi-account token to specify which entity's data to access.
36-
# Example: `123e4567-e89b-12d3-a456-426614174000`
37-
entity_id: nil,
38-
request_options: {}
39-
)
23+
def self.new(request_options: {})
4024
end
4125

42-
sig do
43-
override.returns(
44-
{ entity_id: String, request_options: FinchAPI::RequestOptions }
45-
)
46-
end
26+
sig { override.returns({ request_options: FinchAPI::RequestOptions }) }
4727
def to_hash
4828
end
4929
end

0 commit comments

Comments
 (0)