Skip to content

Commit 80b711b

Browse files
feat(api): api update
1 parent 5b2d8f2 commit 80b711b

22 files changed

+226
-61
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-d5e464682bd08cc19d0c41aa783238846cdc1162a8765083bd5c7e3ca78655d5.yml
3-
openapi_spec_hash: 40b39b0a6fcd33ce59c96bec3ebb5985
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml
3+
openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca
44
config_hash: 5146b12344dae76238940989dac1e8a0

lib/finch_api/models/disconnect_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ module Models
55
# @see FinchAPI::Resources::Account#disconnect
66
class DisconnectResponse < FinchAPI::Internal::Type::BaseModel
77
# @!attribute status
8-
# If the request is successful, Finch will return success (HTTP 200 status).
8+
# If the request is successful, Finch will return "success" (HTTP 200 status).
99
#
1010
# @return [String]
1111
required :status, String
1212

1313
# @!method initialize(status:)
14-
# @param status [String] If the request is successful, Finch will return success (HTTP 200 status).
14+
# @param status [String] If the request is successful, Finch will return "success" (HTTP 200 status).
1515
end
1616
end
1717
end

lib/finch_api/models/jobs/automated_list_params.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ 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+
1119
# @!attribute limit
1220
# Number of items to return
1321
#
@@ -20,7 +28,12 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel
2028
# @return [Integer, nil]
2129
optional :offset, Integer
2230

23-
# @!method initialize(limit: nil, offset: nil, request_options: {})
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+
#
2437
# @param limit [Integer] Number of items to return
2538
#
2639
# @param offset [Integer] Index to start from (defaults to 0)

lib/finch_api/models/jobs/automated_retrieve_params.rb

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

11-
# @!method initialize(request_options: {})
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+
#
1225
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
1326
end
1427
end

lib/finch_api/models/jobs/manual_retrieve_params.rb

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

11-
# @!method initialize(request_options: {})
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+
#
1225
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
1326
end
1427
end

lib/finch_api/models/request_forwarding_forward_response.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ module Models
55
# @see FinchAPI::Resources::RequestForwarding#forward
66
class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel
77
# @!attribute data
8-
# A string representation of the HTTP response body of the forwarded requests
9-
# response received from the underlying integrations API. This field may be null
10-
# in the case where the upstream systems response is empty.
8+
# A string representation of the HTTP response body of the forwarded request's
9+
# response received from the underlying integration's API. This field may be null
10+
# in the case where the upstream system's response is empty.
1111
#
1212
# @return [String, nil]
1313
required :data, String, nil?: true
1414

1515
# @!attribute headers
16-
# The HTTP headers of the forwarded requests response, exactly as received from
17-
# the underlying integrations API.
16+
# The HTTP headers of the forwarded request's response, exactly as received from
17+
# the underlying integration's API.
1818
#
1919
# @return [Object, nil]
2020
required :headers, FinchAPI::Internal::Type::Unknown, nil?: true
@@ -27,8 +27,8 @@ class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel
2727
required :request, -> { FinchAPI::Models::RequestForwardingForwardResponse::Request }
2828

2929
# @!attribute status_code
30-
# The HTTP status code of the forwarded requests response, exactly received from
31-
# the underlying integrations API. This value will be returned as an integer.
30+
# The HTTP status code of the forwarded request's response, exactly received from
31+
# the underlying integration's API. This value will be returned as an integer.
3232
#
3333
# @return [Integer]
3434
required :status_code, Integer, api_name: :statusCode
@@ -37,13 +37,13 @@ class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel
3737
# Some parameter documentations has been truncated, see
3838
# {FinchAPI::Models::RequestForwardingForwardResponse} for more details.
3939
#
40-
# @param data [String, nil] A string representation of the HTTP response body of the forwarded requests res
40+
# @param data [String, nil] A string representation of the HTTP response body of the forwarded request's res
4141
#
42-
# @param headers [Object, nil] The HTTP headers of the forwarded requests response, exactly as received from t
42+
# @param headers [Object, nil] The HTTP headers of the forwarded request's response, exactly as received from t
4343
#
4444
# @param request [FinchAPI::Models::RequestForwardingForwardResponse::Request] An object containing details of your original forwarded request, for your ease o
4545
#
46-
# @param status_code [Integer] The HTTP status code of the forwarded requests response, exactly received from
46+
# @param status_code [Integer] The HTTP status code of the forwarded request's response, exactly received from
4747

4848
# @see FinchAPI::Models::RequestForwardingForwardResponse#request
4949
class Request < FinchAPI::Internal::Type::BaseModel

lib/finch_api/resources/jobs/automated.rb

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

44+
# Some parameter documentations has been truncated, see
45+
# {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details.
46+
#
4447
# Get an automated job by `job_id`.
4548
#
46-
# @overload retrieve(job_id, request_options: {})
49+
# @overload retrieve(job_id, entity_id: nil, request_options: {})
4750
#
4851
# @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+
#
4955
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
5056
#
5157
# @return [FinchAPI::Models::Jobs::AutomatedAsyncJob]
5258
#
5359
# @see FinchAPI::Models::Jobs::AutomatedRetrieveParams
5460
def retrieve(job_id, params = {})
61+
parsed, options = FinchAPI::Jobs::AutomatedRetrieveParams.dump_request(params)
5562
@client.request(
5663
method: :get,
5764
path: ["jobs/automated/%1$s", job_id],
65+
query: parsed,
5866
model: FinchAPI::Jobs::AutomatedAsyncJob,
59-
options: params[:request_options]
67+
options: options
6068
)
6169
end
6270

71+
# Some parameter documentations has been truncated, see
72+
# {FinchAPI::Models::Jobs::AutomatedListParams} for more details.
73+
#
6374
# Get all automated jobs. Automated jobs are completed by a machine. By default,
6475
# jobs are sorted in descending order by submission time. For scheduled jobs such
6576
# as data syncs, only the next scheduled job is shown.
6677
#
67-
# @overload list(limit: nil, offset: nil, request_options: {})
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
6881
#
6982
# @param limit [Integer] Number of items to return
7083
#

lib/finch_api/resources/jobs/manual.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,31 @@ 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+
#
710
# Get a manual job by `job_id`. Manual jobs are completed by a human and include
811
# Assisted Benefits jobs.
912
#
10-
# @overload retrieve(job_id, request_options: {})
13+
# @overload retrieve(job_id, entity_id: nil, request_options: {})
1114
#
1215
# @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+
#
1319
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
1420
#
1521
# @return [FinchAPI::Models::Jobs::ManualAsyncJob]
1622
#
1723
# @see FinchAPI::Models::Jobs::ManualRetrieveParams
1824
def retrieve(job_id, params = {})
25+
parsed, options = FinchAPI::Jobs::ManualRetrieveParams.dump_request(params)
1926
@client.request(
2027
method: :get,
2128
path: ["jobs/manual/%1$s", job_id],
29+
query: parsed,
2230
model: FinchAPI::Jobs::ManualAsyncJob,
23-
options: params[:request_options]
31+
options: options
2432
)
2533
end
2634

lib/finch_api/resources/request_forwarding.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class RequestForwarding
77
# {FinchAPI::Models::RequestForwardingForwardParams} for more details.
88
#
99
# The Forward API allows you to make direct requests to an employment system. If
10-
# Finchs unified API doesnt have a data model that cleanly fits your needs, then
11-
# Forward allows you to push or pull data models directly against an integrations
10+
# Finch's unified API doesn't have a data model that cleanly fits your needs, then
11+
# Forward allows you to push or pull data models directly against an integration's
1212
# API.
1313
#
1414
# @overload forward(method_:, route:, data: nil, headers: nil, params: nil, request_options: {})

rbi/finch_api/models/disconnect_response.rbi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ module FinchAPI
88
T.any(FinchAPI::DisconnectResponse, FinchAPI::Internal::AnyHash)
99
end
1010

11-
# If the request is successful, Finch will return success (HTTP 200 status).
11+
# If the request is successful, Finch will return "success" (HTTP 200 status).
1212
sig { returns(String) }
1313
attr_accessor :status
1414

1515
sig { params(status: String).returns(T.attached_class) }
1616
def self.new(
17-
# If the request is successful, Finch will return success (HTTP 200 status).
17+
# If the request is successful, Finch will return "success" (HTTP 200 status).
1818
status:
1919
)
2020
end

0 commit comments

Comments
 (0)