@@ -58,14 +58,15 @@ class Finch(SyncAPIClient):
58
58
webhooks : resources .Webhooks
59
59
request_forwarding : resources .RequestForwarding
60
60
jobs : resources .Jobs
61
- auth : resources .Auth
62
61
sandbox : resources .Sandbox
63
62
with_raw_response : FinchWithRawResponse
64
63
65
64
# client options
66
65
access_token : str | None
67
66
client_id : str | None
68
67
client_secret : str | None
68
+ sandbox_client_id : str | None
69
+ sandbox_client_secret : str | None
69
70
webhook_secret : str | None
70
71
71
72
def __init__ (
@@ -74,6 +75,8 @@ def __init__(
74
75
access_token : str | None = None ,
75
76
client_id : str | None = None ,
76
77
client_secret : str | None = None ,
78
+ sandbox_client_id : str | None = None ,
79
+ sandbox_client_secret : str | None = None ,
77
80
webhook_secret : str | None = None ,
78
81
base_url : str | httpx .URL | None = None ,
79
82
timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
@@ -103,6 +106,8 @@ def __init__(
103
106
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
104
107
- `client_id` from `FINCH_CLIENT_ID`
105
108
- `client_secret` from `FINCH_CLIENT_SECRET`
109
+ - `sandbox_client_id` from `FINCH_SANDBOX_CLIENT_ID`
110
+ - `sandbox_client_secret` from `FINCH_SANDBOX_CLIENT_SECRET`
106
111
- `webhook_secret` from `FINCH_WEBHOOK_SECRET`
107
112
"""
108
113
self .access_token = access_token
@@ -115,6 +120,14 @@ def __init__(
115
120
client_secret = os .environ .get ("FINCH_CLIENT_SECRET" )
116
121
self .client_secret = client_secret
117
122
123
+ if sandbox_client_id is None :
124
+ sandbox_client_id = os .environ .get ("FINCH_SANDBOX_CLIENT_ID" )
125
+ self .sandbox_client_id = sandbox_client_id
126
+
127
+ if sandbox_client_secret is None :
128
+ sandbox_client_secret = os .environ .get ("FINCH_SANDBOX_CLIENT_SECRET" )
129
+ self .sandbox_client_secret = sandbox_client_secret
130
+
118
131
if webhook_secret is None :
119
132
webhook_secret = os .environ .get ("FINCH_WEBHOOK_SECRET" )
120
133
self .webhook_secret = webhook_secret
@@ -145,7 +158,6 @@ def __init__(
145
158
self .webhooks = resources .Webhooks (self )
146
159
self .request_forwarding = resources .RequestForwarding (self )
147
160
self .jobs = resources .Jobs (self )
148
- self .auth = resources .Auth (self )
149
161
self .sandbox = resources .Sandbox (self )
150
162
self .with_raw_response = FinchWithRawResponse (self )
151
163
@@ -189,6 +201,8 @@ def copy(
189
201
access_token : str | None = None ,
190
202
client_id : str | None = None ,
191
203
client_secret : str | None = None ,
204
+ sandbox_client_id : str | None = None ,
205
+ sandbox_client_secret : str | None = None ,
192
206
webhook_secret : str | None = None ,
193
207
base_url : str | httpx .URL | None = None ,
194
208
timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
@@ -244,6 +258,8 @@ def copy(
244
258
access_token = access_token or self .access_token ,
245
259
client_id = client_id or self .client_id ,
246
260
client_secret = client_secret or self .client_secret ,
261
+ sandbox_client_id = sandbox_client_id or self .sandbox_client_id ,
262
+ sandbox_client_secret = sandbox_client_secret or self .sandbox_client_secret ,
247
263
webhook_secret = webhook_secret or self .webhook_secret ,
248
264
base_url = base_url or self .base_url ,
249
265
timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
@@ -369,14 +385,15 @@ class AsyncFinch(AsyncAPIClient):
369
385
webhooks : resources .AsyncWebhooks
370
386
request_forwarding : resources .AsyncRequestForwarding
371
387
jobs : resources .AsyncJobs
372
- auth : resources .AsyncAuth
373
388
sandbox : resources .AsyncSandbox
374
389
with_raw_response : AsyncFinchWithRawResponse
375
390
376
391
# client options
377
392
access_token : str | None
378
393
client_id : str | None
379
394
client_secret : str | None
395
+ sandbox_client_id : str | None
396
+ sandbox_client_secret : str | None
380
397
webhook_secret : str | None
381
398
382
399
def __init__ (
@@ -385,6 +402,8 @@ def __init__(
385
402
access_token : str | None = None ,
386
403
client_id : str | None = None ,
387
404
client_secret : str | None = None ,
405
+ sandbox_client_id : str | None = None ,
406
+ sandbox_client_secret : str | None = None ,
388
407
webhook_secret : str | None = None ,
389
408
base_url : str | httpx .URL | None = None ,
390
409
timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
@@ -414,6 +433,8 @@ def __init__(
414
433
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
415
434
- `client_id` from `FINCH_CLIENT_ID`
416
435
- `client_secret` from `FINCH_CLIENT_SECRET`
436
+ - `sandbox_client_id` from `FINCH_SANDBOX_CLIENT_ID`
437
+ - `sandbox_client_secret` from `FINCH_SANDBOX_CLIENT_SECRET`
417
438
- `webhook_secret` from `FINCH_WEBHOOK_SECRET`
418
439
"""
419
440
self .access_token = access_token
@@ -426,6 +447,14 @@ def __init__(
426
447
client_secret = os .environ .get ("FINCH_CLIENT_SECRET" )
427
448
self .client_secret = client_secret
428
449
450
+ if sandbox_client_id is None :
451
+ sandbox_client_id = os .environ .get ("FINCH_SANDBOX_CLIENT_ID" )
452
+ self .sandbox_client_id = sandbox_client_id
453
+
454
+ if sandbox_client_secret is None :
455
+ sandbox_client_secret = os .environ .get ("FINCH_SANDBOX_CLIENT_SECRET" )
456
+ self .sandbox_client_secret = sandbox_client_secret
457
+
429
458
if webhook_secret is None :
430
459
webhook_secret = os .environ .get ("FINCH_WEBHOOK_SECRET" )
431
460
self .webhook_secret = webhook_secret
@@ -456,7 +485,6 @@ def __init__(
456
485
self .webhooks = resources .AsyncWebhooks (self )
457
486
self .request_forwarding = resources .AsyncRequestForwarding (self )
458
487
self .jobs = resources .AsyncJobs (self )
459
- self .auth = resources .AsyncAuth (self )
460
488
self .sandbox = resources .AsyncSandbox (self )
461
489
self .with_raw_response = AsyncFinchWithRawResponse (self )
462
490
@@ -500,6 +528,8 @@ def copy(
500
528
access_token : str | None = None ,
501
529
client_id : str | None = None ,
502
530
client_secret : str | None = None ,
531
+ sandbox_client_id : str | None = None ,
532
+ sandbox_client_secret : str | None = None ,
503
533
webhook_secret : str | None = None ,
504
534
base_url : str | httpx .URL | None = None ,
505
535
timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
@@ -555,6 +585,8 @@ def copy(
555
585
access_token = access_token or self .access_token ,
556
586
client_id = client_id or self .client_id ,
557
587
client_secret = client_secret or self .client_secret ,
588
+ sandbox_client_id = sandbox_client_id or self .sandbox_client_id ,
589
+ sandbox_client_secret = sandbox_client_secret or self .sandbox_client_secret ,
558
590
webhook_secret = webhook_secret or self .webhook_secret ,
559
591
base_url = base_url or self .base_url ,
560
592
timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
@@ -680,7 +712,6 @@ def __init__(self, client: Finch) -> None:
680
712
self .account = resources .AccountWithRawResponse (client .account )
681
713
self .request_forwarding = resources .RequestForwardingWithRawResponse (client .request_forwarding )
682
714
self .jobs = resources .JobsWithRawResponse (client .jobs )
683
- self .auth = resources .AuthWithRawResponse (client .auth )
684
715
self .sandbox = resources .SandboxWithRawResponse (client .sandbox )
685
716
686
717
@@ -692,7 +723,6 @@ def __init__(self, client: AsyncFinch) -> None:
692
723
self .account = resources .AsyncAccountWithRawResponse (client .account )
693
724
self .request_forwarding = resources .AsyncRequestForwardingWithRawResponse (client .request_forwarding )
694
725
self .jobs = resources .AsyncJobsWithRawResponse (client .jobs )
695
- self .auth = resources .AsyncAuthWithRawResponse (client .auth )
696
726
self .sandbox = resources .AsyncSandboxWithRawResponse (client .sandbox )
697
727
698
728
0 commit comments