Skip to content

Commit e615899

Browse files
feat(api): api update
1 parent eec6fe6 commit e615899

15 files changed

+832
-670
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-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml
3-
openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-6d0c6a1feba5ccb895a6779cd98c2a0ae87d6394f5e98a9da51f17258c4eb297.yml
3+
openapi_spec_hash: ac3be0c8a992103e5f467fe1bcb20a81
44
config_hash: 5146b12344dae76238940989dac1e8a0

lib/finch_api/models/access_token_create_params.rb

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,39 @@ class AccessTokenCreateParams < FinchAPI::Internal::Type::BaseModel
77
extend FinchAPI::Internal::Type::RequestParameters::Converter
88
include FinchAPI::Internal::Type::RequestParameters
99

10-
# @!attribute code
10+
# @!attribute client_id
11+
# The client ID for your application
1112
#
1213
# @return [String]
13-
required :code, String
14+
required :client_id, String
1415

15-
# @!attribute client_id
16+
# @!attribute client_secret
17+
# The client secret for your application
1618
#
17-
# @return [String, nil]
18-
optional :client_id, String
19+
# @return [String]
20+
required :client_secret, String
1921

20-
# @!attribute client_secret
22+
# @!attribute code
23+
# The authorization code received from the authorization server
2124
#
22-
# @return [String, nil]
23-
optional :client_secret, String
25+
# @return [String]
26+
required :code, String
2427

2528
# @!attribute redirect_uri
29+
# The redirect URI used in the authorization request (optional)
2630
#
2731
# @return [String, nil]
2832
optional :redirect_uri, String
2933

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+
#
3543
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
3644
end
3745
end

lib/finch_api/models/create_access_token_response.rb

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,19 @@ module Models
55
# @see FinchAPI::Resources::AccessTokens#create
66
class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel
77
# @!attribute access_token
8-
# The access token for the connection.
8+
# The access token for the connection
99
#
1010
# @return [String]
1111
required :access_token, String
1212

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-
2213
# @!attribute client_type
2314
# The type of application associated with a token.
2415
#
2516
# @return [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType]
2617
required :client_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ClientType }
2718

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-
3719
# @!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`
3921
#
4022
# @return [String]
4123
required :connection_id, String
@@ -50,62 +32,80 @@ class CreateAccessTokenResponse < FinchAPI::Internal::Type::BaseModel
5032
required :connection_type, enum: -> { FinchAPI::CreateAccessTokenResponse::ConnectionType }
5133

5234
# @!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`
5436
#
5537
# @return [Array<String>]
5638
required :products, FinchAPI::Internal::Type::ArrayOf[String]
5739

5840
# @!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`
6042
#
6143
# @return [String]
6244
required :provider_id, String
6345

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
6757
#
6858
# @return [String, nil]
69-
optional :customer_id, String, nil?: true
59+
optional :account_id, String
7060

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
7373
#
7474
# @return [String, nil]
75-
optional :token_type, String
75+
optional :customer_id, String, nil?: true
7676

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)
7878
# Some parameter documentations has been truncated, see
7979
# {FinchAPI::Models::CreateAccessTokenResponse} for more details.
8080
#
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
8482
#
8583
# @param client_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ClientType] The type of application associated with a token.
8684
#
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`
9086
#
9187
# @param connection_type [Symbol, FinchAPI::Models::CreateAccessTokenResponse::ConnectionType] The type of the connection associated with the token.
9288
#
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`
9690
#
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`
9892
#
9993
# @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
100100

101101
# The type of application associated with a token.
102102
#
103103
# @see FinchAPI::Models::CreateAccessTokenResponse#client_type
104104
module ClientType
105105
extend FinchAPI::Internal::Type::Enum
106106

107-
PRODUCTION = :production
108107
DEVELOPMENT = :development
108+
PRODUCTION = :production
109109
SANDBOX = :sandbox
110110

111111
# @!method self.values
@@ -121,8 +121,8 @@ module ClientType
121121
module ConnectionType
122122
extend FinchAPI::Internal::Type::Enum
123123

124-
PROVIDER = :provider
125124
FINCH = :finch
125+
PROVIDER = :provider
126126

127127
# @!method self.values
128128
# @return [Array<Symbol>]

0 commit comments

Comments
 (0)