88import httpx
99
1010from ... import _legacy_response
11- from ..._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
11+ from ..._types import Body , Query , Headers , NotGiven , not_given
1212from ..._utils import maybe_transform , async_maybe_transform
1313from ..._compat import cached_property
1414from ..._resource import SyncAPIResource , AsyncAPIResource
@@ -44,28 +44,28 @@ def with_streaming_response(self) -> SessionsWithStreamingResponse:
4444 def new (
4545 self ,
4646 * ,
47+ customer_email : Optional [str ],
4748 customer_id : str ,
4849 customer_name : str ,
50+ integration : Optional [session_new_params .Integration ],
51+ manual : Optional [bool ],
52+ minutes_to_expire : Optional [float ],
4953 products : List [
5054 Literal [
55+ "benefits" ,
5156 "company" ,
57+ "deduction" ,
5258 "directory" ,
53- "individual " ,
59+ "documents " ,
5460 "employment" ,
61+ "individual" ,
5562 "payment" ,
5663 "pay_statement" ,
57- "benefits" ,
5864 "ssn" ,
59- "deduction" ,
60- "documents" ,
6165 ]
6266 ],
63- customer_email : Optional [str ] | Omit = omit ,
64- integration : Optional [session_new_params .Integration ] | Omit = omit ,
65- manual : Optional [bool ] | Omit = omit ,
66- minutes_to_expire : Optional [float ] | Omit = omit ,
67- redirect_uri : Optional [str ] | Omit = omit ,
68- sandbox : Optional [Literal ["finch" , "provider" ]] | Omit = omit ,
67+ redirect_uri : Optional [str ],
68+ sandbox : Optional [Literal ["finch" , "provider" ]],
6969 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7070 # The extra values given here take precedence over values defined on the client or passed to this method.
7171 extra_headers : Headers | None = None ,
@@ -77,9 +77,25 @@ def new(
7777 Create a new connect session for an employer
7878
7979 Args:
80+ customer_email: Email address of the customer
81+
82+ customer_id: Unique identifier for the customer
83+
84+ customer_name: Name of the customer
85+
86+ integration: Integration configuration for the connect session
87+
88+ manual: Enable manual authentication mode
89+
8090 minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
8191 90 days)
8292
93+ products: The Finch products to request access to
94+
95+ redirect_uri: The URI to redirect to after the Connect flow is completed
96+
97+ sandbox: Sandbox mode for testing
98+
8399 extra_headers: Send extra headers
84100
85101 extra_query: Add additional query parameters to the request
@@ -92,13 +108,13 @@ def new(
92108 "/connect/sessions" ,
93109 body = maybe_transform (
94110 {
111+ "customer_email" : customer_email ,
95112 "customer_id" : customer_id ,
96113 "customer_name" : customer_name ,
97- "products" : products ,
98- "customer_email" : customer_email ,
99114 "integration" : integration ,
100115 "manual" : manual ,
101116 "minutes_to_expire" : minutes_to_expire ,
117+ "products" : products ,
102118 "redirect_uri" : redirect_uri ,
103119 "sandbox" : sandbox ,
104120 },
@@ -114,25 +130,24 @@ def reauthenticate(
114130 self ,
115131 * ,
116132 connection_id : str ,
117- minutes_to_expire : Optional [ int ] | Omit = omit ,
133+ minutes_to_expire : int ,
118134 products : Optional [
119135 List [
120136 Literal [
137+ "benefits" ,
121138 "company" ,
139+ "deduction" ,
122140 "directory" ,
123- "individual " ,
141+ "documents " ,
124142 "employment" ,
143+ "individual" ,
125144 "payment" ,
126145 "pay_statement" ,
127- "benefits" ,
128146 "ssn" ,
129- "deduction" ,
130- "documents" ,
131147 ]
132148 ]
133- ]
134- | Omit = omit ,
135- redirect_uri : Optional [str ] | Omit = omit ,
149+ ],
150+ redirect_uri : Optional [str ],
136151 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
137152 # The extra values given here take precedence over values defined on the client or passed to this method.
138153 extra_headers : Headers | None = None ,
@@ -202,28 +217,28 @@ def with_streaming_response(self) -> AsyncSessionsWithStreamingResponse:
202217 async def new (
203218 self ,
204219 * ,
220+ customer_email : Optional [str ],
205221 customer_id : str ,
206222 customer_name : str ,
223+ integration : Optional [session_new_params .Integration ],
224+ manual : Optional [bool ],
225+ minutes_to_expire : Optional [float ],
207226 products : List [
208227 Literal [
228+ "benefits" ,
209229 "company" ,
230+ "deduction" ,
210231 "directory" ,
211- "individual " ,
232+ "documents " ,
212233 "employment" ,
234+ "individual" ,
213235 "payment" ,
214236 "pay_statement" ,
215- "benefits" ,
216237 "ssn" ,
217- "deduction" ,
218- "documents" ,
219238 ]
220239 ],
221- customer_email : Optional [str ] | Omit = omit ,
222- integration : Optional [session_new_params .Integration ] | Omit = omit ,
223- manual : Optional [bool ] | Omit = omit ,
224- minutes_to_expire : Optional [float ] | Omit = omit ,
225- redirect_uri : Optional [str ] | Omit = omit ,
226- sandbox : Optional [Literal ["finch" , "provider" ]] | Omit = omit ,
240+ redirect_uri : Optional [str ],
241+ sandbox : Optional [Literal ["finch" , "provider" ]],
227242 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228243 # The extra values given here take precedence over values defined on the client or passed to this method.
229244 extra_headers : Headers | None = None ,
@@ -235,9 +250,25 @@ async def new(
235250 Create a new connect session for an employer
236251
237252 Args:
253+ customer_email: Email address of the customer
254+
255+ customer_id: Unique identifier for the customer
256+
257+ customer_name: Name of the customer
258+
259+ integration: Integration configuration for the connect session
260+
261+ manual: Enable manual authentication mode
262+
238263 minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
239264 90 days)
240265
266+ products: The Finch products to request access to
267+
268+ redirect_uri: The URI to redirect to after the Connect flow is completed
269+
270+ sandbox: Sandbox mode for testing
271+
241272 extra_headers: Send extra headers
242273
243274 extra_query: Add additional query parameters to the request
@@ -250,13 +281,13 @@ async def new(
250281 "/connect/sessions" ,
251282 body = await async_maybe_transform (
252283 {
284+ "customer_email" : customer_email ,
253285 "customer_id" : customer_id ,
254286 "customer_name" : customer_name ,
255- "products" : products ,
256- "customer_email" : customer_email ,
257287 "integration" : integration ,
258288 "manual" : manual ,
259289 "minutes_to_expire" : minutes_to_expire ,
290+ "products" : products ,
260291 "redirect_uri" : redirect_uri ,
261292 "sandbox" : sandbox ,
262293 },
@@ -272,25 +303,24 @@ async def reauthenticate(
272303 self ,
273304 * ,
274305 connection_id : str ,
275- minutes_to_expire : Optional [ int ] | Omit = omit ,
306+ minutes_to_expire : int ,
276307 products : Optional [
277308 List [
278309 Literal [
310+ "benefits" ,
279311 "company" ,
312+ "deduction" ,
280313 "directory" ,
281- "individual " ,
314+ "documents " ,
282315 "employment" ,
316+ "individual" ,
283317 "payment" ,
284318 "pay_statement" ,
285- "benefits" ,
286319 "ssn" ,
287- "deduction" ,
288- "documents" ,
289320 ]
290321 ]
291- ]
292- | Omit = omit ,
293- redirect_uri : Optional [str ] | Omit = omit ,
322+ ],
323+ redirect_uri : Optional [str ],
294324 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
295325 # The extra values given here take precedence over values defined on the client or passed to this method.
296326 extra_headers : Headers | None = None ,
0 commit comments