@@ -118,6 +118,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
118118# Synchronous Example
119119from gusto_app_integration import GustoAppIntegration
120120
121+
121122with GustoAppIntegration(
122123 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
123124) as gai_client:
@@ -137,6 +138,7 @@ import asyncio
137138from gusto_app_integration import GustoAppIntegration
138139
139140async def main ():
141+
140142 async with GustoAppIntegration(
141143 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
142144 ) as gai_client:
@@ -165,6 +167,7 @@ To authenticate with the API the `company_access_auth` parameter must be set whe
165167``` python
166168from gusto_app_integration import GustoAppIntegration
167169
170+
168171with GustoAppIntegration(
169172 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
170173) as gai_client:
@@ -183,6 +186,7 @@ Some operations in this SDK require the security scheme to be specified at the r
183186import gusto_app_integration
184187from gusto_app_integration import GustoAppIntegration
185188
189+
186190with GustoAppIntegration() as gai_client:
187191
188192 gai_client.introspection.disconnect_app_integration(security = gusto_app_integration.PostV1DisconnectAppIntegrationSecurity(
@@ -391,6 +395,7 @@ To change the default retry strategy for a single API call, simply provide a `Re
391395from gusto_app_integration import GustoAppIntegration
392396from gusto_app_integration.utils import BackoffStrategy, RetryConfig
393397
398+
394399with GustoAppIntegration(
395400 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
396401) as gai_client:
@@ -408,6 +413,7 @@ If you'd like to override the default retry strategy for all operations that sup
408413from gusto_app_integration import GustoAppIntegration
409414from gusto_app_integration.utils import BackoffStrategy, RetryConfig
410415
416+
411417with GustoAppIntegration(
412418 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
413419 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
@@ -448,6 +454,7 @@ When custom error responses are specified for an operation, the SDK may also rai
448454import gusto_app_integration
449455from gusto_app_integration import GustoAppIntegration, models
450456
457+
451458with GustoAppIntegration() as gai_client:
452459 res = None
453460 try :
@@ -517,6 +524,7 @@ You can override the default server globally by passing a server name to the `se
517524``` python
518525from gusto_app_integration import GustoAppIntegration
519526
527+
520528with GustoAppIntegration(
521529 server = " prod" ,
522530 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
@@ -535,6 +543,7 @@ The default server can also be overridden globally by passing a URL to the `serv
535543``` python
536544from gusto_app_integration import GustoAppIntegration
537545
546+
538547with GustoAppIntegration(
539548 server_url = " https://api.gusto-demo.com" ,
540549 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
@@ -639,6 +648,7 @@ The `GustoAppIntegration` class implements the context manager protocol and regi
639648``` python
640649from gusto_app_integration import GustoAppIntegration
641650def main ():
651+
642652 with GustoAppIntegration(
643653 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
644654 ) as gai_client:
@@ -647,6 +657,7 @@ def main():
647657
648658# Or when using async:
649659async def amain ():
660+
650661 async with GustoAppIntegration(
651662 company_access_auth = " <YOUR_BEARER_TOKEN_HERE>" ,
652663 ) as gai_client:
0 commit comments