@@ -58,14 +58,15 @@ class Finch(SyncAPIClient):
5858 webhooks : resources .Webhooks
5959 request_forwarding : resources .RequestForwarding
6060 jobs : resources .Jobs
61- auth : resources .Auth
6261 sandbox : resources .Sandbox
6362 with_raw_response : FinchWithRawResponse
6463
6564 # client options
6665 access_token : str | None
6766 client_id : str | None
6867 client_secret : str | None
68+ sandbox_client_id : str | None
69+ sandbox_client_secret : str | None
6970 webhook_secret : str | None
7071
7172 def __init__ (
@@ -74,6 +75,8 @@ def __init__(
7475 access_token : str | None = None ,
7576 client_id : str | None = None ,
7677 client_secret : str | None = None ,
78+ sandbox_client_id : str | None = None ,
79+ sandbox_client_secret : str | None = None ,
7780 webhook_secret : str | None = None ,
7881 base_url : str | httpx .URL | None = None ,
7982 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
@@ -103,6 +106,8 @@ def __init__(
103106 This automatically infers the following arguments from their corresponding environment variables if they are not provided:
104107 - `client_id` from `FINCH_CLIENT_ID`
105108 - `client_secret` from `FINCH_CLIENT_SECRET`
109+ - `sandbox_client_id` from `FINCH_SANDBOX_CLIENT_ID`
110+ - `sandbox_client_secret` from `FINCH_SANDBOX_CLIENT_SECRET`
106111 - `webhook_secret` from `FINCH_WEBHOOK_SECRET`
107112 """
108113 self .access_token = access_token
@@ -115,6 +120,14 @@ def __init__(
115120 client_secret = os .environ .get ("FINCH_CLIENT_SECRET" )
116121 self .client_secret = client_secret
117122
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+
118131 if webhook_secret is None :
119132 webhook_secret = os .environ .get ("FINCH_WEBHOOK_SECRET" )
120133 self .webhook_secret = webhook_secret
@@ -145,7 +158,6 @@ def __init__(
145158 self .webhooks = resources .Webhooks (self )
146159 self .request_forwarding = resources .RequestForwarding (self )
147160 self .jobs = resources .Jobs (self )
148- self .auth = resources .Auth (self )
149161 self .sandbox = resources .Sandbox (self )
150162 self .with_raw_response = FinchWithRawResponse (self )
151163
@@ -189,6 +201,8 @@ def copy(
189201 access_token : str | None = None ,
190202 client_id : str | None = None ,
191203 client_secret : str | None = None ,
204+ sandbox_client_id : str | None = None ,
205+ sandbox_client_secret : str | None = None ,
192206 webhook_secret : str | None = None ,
193207 base_url : str | httpx .URL | None = None ,
194208 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
@@ -244,6 +258,8 @@ def copy(
244258 access_token = access_token or self .access_token ,
245259 client_id = client_id or self .client_id ,
246260 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 ,
247263 webhook_secret = webhook_secret or self .webhook_secret ,
248264 base_url = base_url or self .base_url ,
249265 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
@@ -369,14 +385,15 @@ class AsyncFinch(AsyncAPIClient):
369385 webhooks : resources .AsyncWebhooks
370386 request_forwarding : resources .AsyncRequestForwarding
371387 jobs : resources .AsyncJobs
372- auth : resources .AsyncAuth
373388 sandbox : resources .AsyncSandbox
374389 with_raw_response : AsyncFinchWithRawResponse
375390
376391 # client options
377392 access_token : str | None
378393 client_id : str | None
379394 client_secret : str | None
395+ sandbox_client_id : str | None
396+ sandbox_client_secret : str | None
380397 webhook_secret : str | None
381398
382399 def __init__ (
@@ -385,6 +402,8 @@ def __init__(
385402 access_token : str | None = None ,
386403 client_id : str | None = None ,
387404 client_secret : str | None = None ,
405+ sandbox_client_id : str | None = None ,
406+ sandbox_client_secret : str | None = None ,
388407 webhook_secret : str | None = None ,
389408 base_url : str | httpx .URL | None = None ,
390409 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
@@ -414,6 +433,8 @@ def __init__(
414433 This automatically infers the following arguments from their corresponding environment variables if they are not provided:
415434 - `client_id` from `FINCH_CLIENT_ID`
416435 - `client_secret` from `FINCH_CLIENT_SECRET`
436+ - `sandbox_client_id` from `FINCH_SANDBOX_CLIENT_ID`
437+ - `sandbox_client_secret` from `FINCH_SANDBOX_CLIENT_SECRET`
417438 - `webhook_secret` from `FINCH_WEBHOOK_SECRET`
418439 """
419440 self .access_token = access_token
@@ -426,6 +447,14 @@ def __init__(
426447 client_secret = os .environ .get ("FINCH_CLIENT_SECRET" )
427448 self .client_secret = client_secret
428449
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+
429458 if webhook_secret is None :
430459 webhook_secret = os .environ .get ("FINCH_WEBHOOK_SECRET" )
431460 self .webhook_secret = webhook_secret
@@ -456,7 +485,6 @@ def __init__(
456485 self .webhooks = resources .AsyncWebhooks (self )
457486 self .request_forwarding = resources .AsyncRequestForwarding (self )
458487 self .jobs = resources .AsyncJobs (self )
459- self .auth = resources .AsyncAuth (self )
460488 self .sandbox = resources .AsyncSandbox (self )
461489 self .with_raw_response = AsyncFinchWithRawResponse (self )
462490
@@ -500,6 +528,8 @@ def copy(
500528 access_token : str | None = None ,
501529 client_id : str | None = None ,
502530 client_secret : str | None = None ,
531+ sandbox_client_id : str | None = None ,
532+ sandbox_client_secret : str | None = None ,
503533 webhook_secret : str | None = None ,
504534 base_url : str | httpx .URL | None = None ,
505535 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
@@ -555,6 +585,8 @@ def copy(
555585 access_token = access_token or self .access_token ,
556586 client_id = client_id or self .client_id ,
557587 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 ,
558590 webhook_secret = webhook_secret or self .webhook_secret ,
559591 base_url = base_url or self .base_url ,
560592 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
@@ -680,7 +712,6 @@ def __init__(self, client: Finch) -> None:
680712 self .account = resources .AccountWithRawResponse (client .account )
681713 self .request_forwarding = resources .RequestForwardingWithRawResponse (client .request_forwarding )
682714 self .jobs = resources .JobsWithRawResponse (client .jobs )
683- self .auth = resources .AuthWithRawResponse (client .auth )
684715 self .sandbox = resources .SandboxWithRawResponse (client .sandbox )
685716
686717
@@ -692,7 +723,6 @@ def __init__(self, client: AsyncFinch) -> None:
692723 self .account = resources .AsyncAccountWithRawResponse (client .account )
693724 self .request_forwarding = resources .AsyncRequestForwardingWithRawResponse (client .request_forwarding )
694725 self .jobs = resources .AsyncJobsWithRawResponse (client .jobs )
695- self .auth = resources .AsyncAuthWithRawResponse (client .auth )
696726 self .sandbox = resources .AsyncSandboxWithRawResponse (client .sandbox )
697727
698728
0 commit comments