Skip to content

Commit 61d827e

Browse files
feat(api): api update
1 parent 8ad8c9d commit 61d827e

File tree

11 files changed

+347
-280
lines changed

11 files changed

+347
-280
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-199a2fd8b7387b0648e88b5942a8248895373a561aff663389982073e55c8eb5.yml
3-
openapi_spec_hash: 7415c1faca5f2e873824893b140650f1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5f9c0770c8be0fa779cbb640c25043cc1d5514236b8d0d6791c822dd7e00ffe6.yml
3+
openapi_spec_hash: d8df70c1dc1ba1ebcd572c1fab58eec6
44
config_hash: 6d3585c0032e08d723d077d660fc8448

lib/finch_api/models/connect/session_new_params.rb

Lines changed: 66 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,114 +8,110 @@ 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+
1117
# @!attribute customer_id
18+
# Unique identifier for the customer
1219
#
1320
# @return [String]
1421
required :customer_id, String
1522

1623
# @!attribute customer_name
24+
# Name of the customer
1725
#
1826
# @return [String]
1927
required :customer_name, String
2028

21-
# @!attribute products
22-
#
23-
# @return [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
24-
required :products,
25-
-> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionNewParams::Product] }
26-
27-
# @!attribute customer_email
28-
#
29-
# @return [String, nil]
30-
optional :customer_email, String, nil?: true
31-
3229
# @!attribute integration
30+
# Integration configuration for the connect session
3331
#
3432
# @return [FinchAPI::Models::Connect::SessionNewParams::Integration, nil]
35-
optional :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true
33+
required :integration, -> { FinchAPI::Connect::SessionNewParams::Integration }, nil?: true
3634

3735
# @!attribute manual
36+
# Enable manual authentication mode
3837
#
3938
# @return [Boolean, nil]
40-
optional :manual, FinchAPI::Internal::Type::Boolean, nil?: true
39+
required :manual, FinchAPI::Internal::Type::Boolean, nil?: true
4140

4241
# @!attribute minutes_to_expire
4342
# The number of minutes until the session expires (defaults to 129,600, which is
4443
# 90 days)
4544
#
4645
# @return [Float, nil]
47-
optional :minutes_to_expire, Float, nil?: true
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] }
4854

4955
# @!attribute redirect_uri
56+
# The URI to redirect to after the Connect flow is completed
5057
#
5158
# @return [String, nil]
52-
optional :redirect_uri, String, nil?: true
59+
required :redirect_uri, String, nil?: true
5360

5461
# @!attribute sandbox
62+
# Sandbox mode for testing
5563
#
5664
# @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil]
57-
optional :sandbox, enum: -> { FinchAPI::Connect::SessionNewParams::Sandbox }, nil?: true
65+
required :sandbox, enum: -> { FinchAPI::Connect::SessionNewParams::Sandbox }, nil?: true
5866

59-
# @!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: {})
67+
# @!method initialize(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {})
6068
# Some parameter documentations has been truncated, see
6169
# {FinchAPI::Models::Connect::SessionNewParams} for more details.
6270
#
63-
# @param customer_id [String]
71+
# @param customer_email [String, nil] Email address of the customer
6472
#
65-
# @param customer_name [String]
73+
# @param customer_id [String] Unique identifier for the customer
6674
#
67-
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
75+
# @param customer_name [String] Name of the customer
6876
#
69-
# @param customer_email [String, nil]
77+
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session
7078
#
71-
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil]
72-
#
73-
# @param manual [Boolean, nil]
79+
# @param manual [Boolean, nil] Enable manual authentication mode
7480
#
7581
# @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9
7682
#
77-
# @param redirect_uri [String, nil]
83+
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
84+
#
85+
# @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed
7886
#
79-
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil]
87+
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing
8088
#
8189
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
8290

83-
# The Finch products that can be requested during the Connect flow.
84-
module Product
85-
extend FinchAPI::Internal::Type::Enum
86-
87-
COMPANY = :company
88-
DIRECTORY = :directory
89-
INDIVIDUAL = :individual
90-
EMPLOYMENT = :employment
91-
PAYMENT = :payment
92-
PAY_STATEMENT = :pay_statement
93-
BENEFITS = :benefits
94-
SSN = :ssn
95-
DEDUCTION = :deduction
96-
DOCUMENTS = :documents
97-
98-
# @!method self.values
99-
# @return [Array<Symbol>]
100-
end
101-
10291
class Integration < FinchAPI::Internal::Type::BaseModel
10392
# @!attribute auth_method
93+
# The authentication method to use
10494
#
10595
# @return [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil]
106-
optional :auth_method,
96+
required :auth_method,
10797
enum: -> { FinchAPI::Connect::SessionNewParams::Integration::AuthMethod },
10898
nil?: true
10999

110100
# @!attribute provider
101+
# The provider to integrate with
111102
#
112103
# @return [String, nil]
113-
optional :provider, String, nil?: true
104+
required :provider, String, nil?: true
114105

115-
# @!method initialize(auth_method: nil, provider: nil)
116-
# @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil]
117-
# @param provider [String, nil]
106+
# @!method initialize(auth_method:, provider:)
107+
# Integration configuration for the connect session
108+
#
109+
# @param auth_method [Symbol, FinchAPI::Models::Connect::SessionNewParams::Integration::AuthMethod, nil] The authentication method to use
110+
#
111+
# @param provider [String, nil] The provider to integrate with
118112

113+
# The authentication method to use
114+
#
119115
# @see FinchAPI::Models::Connect::SessionNewParams::Integration#auth_method
120116
module AuthMethod
121117
extend FinchAPI::Internal::Type::Enum
@@ -130,6 +126,26 @@ module AuthMethod
130126
end
131127
end
132128

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+
148+
# Sandbox mode for testing
133149
module Sandbox
134150
extend FinchAPI::Internal::Type::Enum
135151

lib/finch_api/models/connect/session_reauthenticate_params.rb

Lines changed: 10 additions & 10 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, nil]
22-
optional :minutes_to_expire, Integer, nil?: true
21+
# @return [Integer]
22+
required :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-
optional :products,
28+
required :products,
2929
-> {
3030
FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::Connect::SessionReauthenticateParams::Product]
3131
},
@@ -35,15 +35,15 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel
3535
# The URI to redirect to after the Connect flow is completed
3636
#
3737
# @return [String, nil]
38-
optional :redirect_uri, String, nil?: true
38+
required :redirect_uri, String, nil?: true
3939

40-
# @!method initialize(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {})
40+
# @!method initialize(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {})
4141
# Some parameter documentations has been truncated, see
4242
# {FinchAPI::Models::Connect::SessionReauthenticateParams} for more details.
4343
#
4444
# @param connection_id [String] The ID of the existing connection to reauthenticate
4545
#
46-
# @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30
46+
# @param minutes_to_expire [Integer] The number of minutes until the session expires (defaults to 43,200, which is 30
4747
#
4848
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product>, nil] The products to request access to (optional for reauthentication)
4949
#
@@ -55,16 +55,16 @@ class SessionReauthenticateParams < FinchAPI::Internal::Type::BaseModel
5555
module Product
5656
extend FinchAPI::Internal::Type::Enum
5757

58+
BENEFITS = :benefits
5859
COMPANY = :company
60+
DEDUCTION = :deduction
5961
DIRECTORY = :directory
60-
INDIVIDUAL = :individual
62+
DOCUMENTS = :documents
6163
EMPLOYMENT = :employment
64+
INDIVIDUAL = :individual
6265
PAYMENT = :payment
6366
PAY_STATEMENT = :pay_statement
64-
BENEFITS = :benefits
6567
SSN = :ssn
66-
DEDUCTION = :deduction
67-
DOCUMENTS = :documents
6868

6969
# @!method self.values
7070
# @return [Array<Symbol>]

lib/finch_api/resources/connect/sessions.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ class Sessions
99
#
1010
# Create a new connect session for an employer
1111
#
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: {})
12+
# @overload new(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {})
1313
#
14-
# @param customer_id [String]
14+
# @param customer_email [String, nil] Email address of the customer
1515
#
16-
# @param customer_name [String]
16+
# @param customer_id [String] Unique identifier for the customer
1717
#
18-
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
18+
# @param customer_name [String] Name of the customer
1919
#
20-
# @param customer_email [String, nil]
20+
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session
2121
#
22-
# @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil]
23-
#
24-
# @param manual [Boolean, nil]
22+
# @param manual [Boolean, nil] Enable manual authentication mode
2523
#
2624
# @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9
2725
#
28-
# @param redirect_uri [String, nil]
26+
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
27+
#
28+
# @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed
2929
#
30-
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil]
30+
# @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing
3131
#
3232
# @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
3333
#
@@ -50,11 +50,11 @@ def new(params)
5050
#
5151
# Create a new Connect session for reauthenticating an existing connection
5252
#
53-
# @overload reauthenticate(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {})
53+
# @overload reauthenticate(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {})
5454
#
5555
# @param connection_id [String] The ID of the existing connection to reauthenticate
5656
#
57-
# @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30
57+
# @param minutes_to_expire [Integer] The number of minutes until the session expires (defaults to 43,200, which is 30
5858
#
5959
# @param products [Array<Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product>, nil] The products to request access to (optional for reauthentication)
6060
#

0 commit comments

Comments
 (0)