Skip to content

Commit e2215da

Browse files
feat(api): api update
1 parent a1bdc99 commit e2215da

File tree

11 files changed

+266
-278
lines changed

11 files changed

+266
-278
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-0105d239fcaf84750c886dfa6c2cfbf2b2087f89a48f8827c4cbe28479ebfb13.yml
3-
openapi_spec_hash: 34895c3d3c137fb9f5a019ac5370afbb
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-b817e7a30a6366c063a8c9a334d5be281eb8d93e21acc8c8219d3bdc95043deb.yml
3+
openapi_spec_hash: d4cc4a5cba9f13986e38d148d330aa00
44
config_hash: 5c64f384746e7570c10f19fe241062a7

lib/finch_api/models/connect/session_new_params.rb

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel
88
extend FinchAPI::Internal::Type::RequestParameters::Converter
99
include FinchAPI::Internal::Type::RequestParameters
1010

11-
# @!attribute customer_email
12-
# Email address of the customer
13-
#
14-
# @return [String, nil]
15-
required :customer_email, String, nil?: true
16-
1711
# @!attribute customer_id
1812
# Unique identifier for the customer
1913
#
@@ -26,89 +20,114 @@ class SessionNewParams < FinchAPI::Internal::Type::BaseModel
2620
# @return [String]
2721
required :customer_name, String
2822

23+
# @!attribute products
24+
# The Finch products to request access to
25+
#
26+
# @return [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
27+
required :products,
28+
-> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionNewParams::Product] }
29+
30+
# @!attribute customer_email
31+
# Email address of the customer
32+
#
33+
# @return [String, nil]
34+
optional :customer_email, String, nil?: true
35+
2936
# @!attribute integration
3037
# Integration configuration for the connect session
3138
#
3239
# @return [FinchAPI::Models::Connect::SessionNewParams::Integration, nil]
33-
required :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true
40+
optional :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true
3441

3542
# @!attribute manual
3643
# Enable manual authentication mode
3744
#
3845
# @return [Boolean, nil]
39-
required :manual, FinchAPI::Internal::Type::Boolean, nil?: true
46+
optional :manual, FinchAPI::Internal::Type::Boolean, nil?: true
4047

4148
# @!attribute minutes_to_expire
4249
# The number of minutes until the session expires (defaults to 129,600, which is
4350
# 90 days)
4451
#
4552
# @return [Float, nil]
46-
required :minutes_to_expire, Float, nil?: true
47-
48-
# @!attribute products
49-
# The Finch products to request access to
50-
#
51-
# @return [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
52-
required :products,
53-
-> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionNewParams::Product] }
53+
optional :minutes_to_expire, Float, nil?: true
5454

5555
# @!attribute redirect_uri
5656
# The URI to redirect to after the Connect flow is completed
5757
#
5858
# @return [String, nil]
59-
required :redirect_uri, String, nil?: true
59+
optional :redirect_uri, String, nil?: true
6060

6161
# @!attribute sandbox
6262
# Sandbox mode for testing
6363
#
6464
# @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil]
65-
required :sandbox, enum: -> { FinchAPI::Connect::SessionNewParams::Sandbox }, nil?: true
65+
optional :sandbox, enum: -> { FinchAPI::Connect::SessionNewParams::Sandbox }, nil?: true
6666

67-
# @!method initialize(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {})
67+
# @!method initialize(customer_id:, customer_name:, products:, customer_email: nil, integration: nil, manual: nil, minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, request_options: {})
6868
# Some parameter documentations has been truncated, see
6969
# {FinchAPI::Models::Connect::SessionNewParams} for more details.
7070
#
71-
# @param customer_email [String, nil] Email address of the customer
72-
#
7371
# @param customer_id [String] Unique identifier for the customer
7472
#
7573
# @param customer_name [String] Name of the customer
7674
#
75+
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
76+
#
77+
# @param customer_email [String, nil] Email address of the customer
78+
#
7779
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session
7880
#
7981
# @param manual [Boolean, nil] Enable manual authentication mode
8082
#
8183
# @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9
8284
#
83-
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
84-
#
8585
# @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed
8686
#
8787
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing
8888
#
8989
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
9090

91+
# The Finch products that can be requested during the Connect flow.
92+
module Product
93+
extend FinchAPI::Internal::Type::Enum
94+
95+
BENEFITS = :benefits
96+
COMPANY = :company
97+
DEDUCTION = :deduction
98+
DIRECTORY = :directory
99+
DOCUMENTS = :documents
100+
EMPLOYMENT = :employment
101+
INDIVIDUAL = :individual
102+
PAYMENT = :payment
103+
PAY_STATEMENT = :pay_statement
104+
SSN = :ssn
105+
106+
# @!method self.values
107+
# @return [Array<Symbol>]
108+
end
109+
91110
class Integration < FinchAPI::Internal::Type::BaseModel
111+
# @!attribute provider
112+
# The provider to integrate with
113+
#
114+
# @return [String]
115+
required :provider, String
116+
92117
# @!attribute auth_method
93118
# The authentication method to use
94119
#
95120
# @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil]
96-
required :auth_method,
121+
optional :auth_method,
97122
enum: -> { FinchAPI::Connect::SessionNewParams::Integration::AuthMethod },
98123
nil?: true
99124

100-
# @!attribute provider
101-
# The provider to integrate with
102-
#
103-
# @return [String, nil]
104-
required :provider, String, nil?: true
105-
106-
# @!method initialize(auth_method:, provider:)
125+
# @!method initialize(provider:, auth_method: nil)
107126
# Integration configuration for the connect session
108127
#
109-
# @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] The authentication method to use
128+
# @param provider [String] The provider to integrate with
110129
#
111-
# @param provider [String, nil] The provider to integrate with
130+
# @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] The authentication method to use
112131

113132
# The authentication method to use
114133
#
@@ -126,25 +145,6 @@ module AuthMethod
126145
end
127146
end
128147

129-
# The Finch products that can be requested during the Connect flow.
130-
module Product
131-
extend FinchAPI::Internal::Type::Enum
132-
133-
BENEFITS = :benefits
134-
COMPANY = :company
135-
DEDUCTION = :deduction
136-
DIRECTORY = :directory
137-
DOCUMENTS = :documents
138-
EMPLOYMENT = :employment
139-
INDIVIDUAL = :individual
140-
PAYMENT = :payment
141-
PAY_STATEMENT = :pay_statement
142-
SSN = :ssn
143-
144-
# @!method self.values
145-
# @return [Array<Symbol>]
146-
end
147-
148148
# Sandbox mode for testing
149149
module Sandbox
150150
extend FinchAPI::Internal::Type::Enum

lib/finch_api/models/connect/session_reauthenticate_params.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel
1818
# The number of minutes until the session expires (defaults to 43,200, which is 30
1919
# days)
2020
#
21-
# @return [Integer]
22-
required :minutes_to_expire, Integer
21+
# @return [Integer, nil]
22+
optional :minutes_to_expire, Integer
2323

2424
# @!attribute products
2525
# The products to request access to (optional for reauthentication)
2626
#
2727
# @return [Array<Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product>, nil]
28-
required :products,
28+
optional :products,
2929
-> {
3030
FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionReauthenticateParams::Product]
3131
},
@@ -35,9 +35,9 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel
3535
# The URI to redirect to after the Connect flow is completed
3636
#
3737
# @return [String, nil]
38-
required :redirect_uri, String, nil?: true
38+
optional :redirect_uri, String, nil?: true
3939

40-
# @!method initialize(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {})
40+
# @!method initialize(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {})
4141
# Some parameter documentations has been truncated, see
4242
# {FinchAPI::Models::Connect::SessionReauthenticateParams} for more details.
4343
#

lib/finch_api/resources/connect/sessions.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ class Sessions
99
#
1010
# Create a new connect session for an employer
1111
#
12-
# @overload new(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {})
13-
#
14-
# @param customer_email [String, nil] Email address of the customer
12+
# @overload new(customer_id:, customer_name:, products:, customer_email: nil, integration: nil, manual: nil, minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, request_options: {})
1513
#
1614
# @param customer_id [String] Unique identifier for the customer
1715
#
1816
# @param customer_name [String] Name of the customer
1917
#
18+
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
19+
#
20+
# @param customer_email [String, nil] Email address of the customer
21+
#
2022
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session
2123
#
2224
# @param manual [Boolean, nil] Enable manual authentication mode
2325
#
2426
# @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9
2527
#
26-
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
27-
#
2828
# @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed
2929
#
3030
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing
@@ -50,7 +50,7 @@ def new(params)
5050
#
5151
# Create a new Connect session for reauthenticating an existing connection
5252
#
53-
# @overload reauthenticate(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {})
53+
# @overload reauthenticate(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {})
5454
#
5555
# @param connection_id [String] The ID of the existing connection to reauthenticate
5656
#

0 commit comments

Comments
 (0)