Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🐝 Update SDK - Generate Client SDKs for Wingspan benefits #18

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified benefits/.gitattributes
100755 → 100644
Empty file.
82 changes: 82 additions & 0 deletions benefits/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
lockVersion: 2.0.0
id: 870fd9ab-efb4-4b0e-acef-93e96698235d
management:
docChecksum: a394825e1c1bc4930882a784d6d637e8
docVersion: 1.0.0
speakeasyVersion: 1.209.3
generationVersion: 2.281.2
releaseVersion: 4.2.1
configChecksum: 7ba563f0b2baaec7c383ccb113d8dd5c
repoURL: https://github.com/wingspanHQ/client-sdk-python.git
repoSubDirectory: benefits
installationURL: https://github.com/wingspanHQ/client-sdk-python.git#subdirectory=benefits
published: true
features:
python:
core: 4.5.1
flattening: 2.81.1
globalSecurity: 2.83.4
globalServerURLs: 2.82.2
responseFormat: 0.1.0
generatedFiles:
- src/sdk/sdkconfiguration.py
- src/sdk/benefits_enrollment.py
- src/sdk/benefits_service.py
- src/sdk/sdk.py
- py.typed
- pylintrc
- setup.py
- src/sdk/__init__.py
- src/sdk/utils/__init__.py
- src/sdk/utils/retries.py
- src/sdk/utils/utils.py
- src/sdk/models/errors/sdkerror.py
- tests/helpers.py
- src/sdk/models/operations/get_benefits_enrollment_id_.py
- src/sdk/models/operations/get_benefits_plan_enrollment.py
- src/sdk/models/operations/get_benefits_plan_enrollment_id_.py
- src/sdk/models/operations/get_benefits_service.py
- src/sdk/models/operations/patch_benefits_service_id_.py
- src/sdk/models/shared/enrollment.py
- src/sdk/models/shared/e974d9e9e5676123cf56d2fd858ece1c24be8be15b96a100963b7cb1afada329.py
- src/sdk/models/shared/planenrollment.py
- src/sdk/models/shared/userroles.py
- src/sdk/models/shared/planenrollmentcoveragemonth.py
- src/sdk/models/shared/a71f30be878693b235f8c5f1650be03c9920ca9821526545760476436104c9dc.py
- src/sdk/models/shared/serviceenablementresponse.py
- src/sdk/models/shared/serviceenablementupdate.py
- src/sdk/models/shared/security.py
- src/sdk/models/__init__.py
- src/sdk/models/errors/__init__.py
- src/sdk/models/operations/__init__.py
- src/sdk/models/shared/__init__.py
- docs/models/operations/getbenefitsenrollmentidrequest.md
- docs/models/operations/getbenefitsenrollmentidresponse.md
- docs/models/operations/getbenefitsplanenrollmentresponse.md
- docs/models/operations/getbenefitsplanenrollmentidrequest.md
- docs/models/operations/getbenefitsplanenrollmentidresponse.md
- docs/models/operations/getbenefitsserviceresponse.md
- docs/models/operations/patchbenefitsserviceidrequest.md
- docs/models/operations/patchbenefitsserviceidresponse.md
- docs/models/shared/enrollment.md
- docs/models/shared/e974d9e9e5676123cf56d2fd858ece1c24be8be15b96a100963b7cb1afada329status.md
- docs/models/shared/e974d9e9e5676123cf56d2fd858ece1c24be8be15b96a100963b7cb1afada329.md
- docs/models/shared/plantype.md
- docs/models/shared/status.md
- docs/models/shared/planenrollment.md
- docs/models/shared/userroles.md
- docs/models/shared/fundingstatus.md
- docs/models/shared/planenrollmentcoveragemonth.md
- docs/models/shared/a71f30be878693b235f8c5f1650be03c9920ca9821526545760476436104c9dc.md
- docs/models/shared/servicestate.md
- docs/models/shared/serviceenablementresponse.md
- docs/models/shared/serviceenablementupdate.md
- docs/models/shared/security.md
- docs/sdks/sdk/README.md
- docs/sdks/benefitsenrollment/README.md
- docs/sdks/benefitsservice/README.md
- USAGE.md
- .gitattributes
- src/sdk/_hooks/sdkhooks.py
- src/sdk/_hooks/types.py
- src/sdk/_hooks/__init__.py
146 changes: 101 additions & 45 deletions benefits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,123 +14,150 @@ It has been generated successfully based on your OpenAPI spec. However, it is no
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)
- [ ] ✨ When ready to productionize, delete this section from the README
<!-- Start SDK Installation -->
<!-- Start SDK Installation [installation] -->
## SDK Installation

```bash
pip install wingspan_benefits
```
<!-- End SDK Installation -->
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
<!-- Start SDK Example Usage -->

### Example

```python
import sdk
from sdk.models import operations

s = sdk.SDK()
s = sdk.SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.sdk.get_benefits_enrollment_id_(id='string')
res = s.benefits_enrollment.get_benefits_enrollment_id_(id='<value>')

if res.enrollment is not None:
# handle response
pass

```
<!-- End SDK Example Usage -->
<!-- End SDK Example Usage [usage] -->

<!-- Start SDK Available Operations -->
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

### [SDK](docs/sdks/sdk/README.md)
### [benefits_enrollment](docs/sdks/benefitsenrollment/README.md)

* [get_benefits_enrollment_id_](docs/sdks/benefitsenrollment/README.md#get_benefits_enrollment_id_) - Retrieve Enrollment Details for a Specific Member
* [get_benefits_plan_enrollment](docs/sdks/benefitsenrollment/README.md#get_benefits_plan_enrollment) - List all plan enrollments
* [get_benefits_plan_enrollment_id_](docs/sdks/benefitsenrollment/README.md#get_benefits_plan_enrollment_id_) - Get a particular plan enrollment by ID

### [benefits_service](docs/sdks/benefitsservice/README.md)

* [get_benefits_service](docs/sdks/benefitsservice/README.md#get_benefits_service) - Retrieve Current Benefits Service Status
* [patch_benefits_service_id_](docs/sdks/benefitsservice/README.md#patch_benefits_service_id_) - Modify Benefits Service Status
<!-- End Available Resources and Operations [operations] -->



<!-- Start Error Handling [errors] -->
## Error Handling

* [get_benefits_enrollment_id_](docs/sdks/sdk/README.md#get_benefits_enrollment_id_) - Retrieve Enrollment Details for a Specific Member
* [get_benefits_plan_enrollment](docs/sdks/sdk/README.md#get_benefits_plan_enrollment) - List all plan enrollments
* [get_benefits_plan_enrollment_id_](docs/sdks/sdk/README.md#get_benefits_plan_enrollment_id_) - Get a particular plan enrollment by ID
* [get_benefits_service](docs/sdks/sdk/README.md#get_benefits_service) - Retrieve Current Benefits Service Status
* [patch_benefits_service_id_](docs/sdks/sdk/README.md#patch_benefits_service_id_) - Modify Benefits Service Status
<!-- End SDK Available Operations -->
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

<!-- Start Dev Containers -->
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4x-5xx | */* |

<!-- End Dev Containers -->
### Example

```python
import sdk
from sdk.models import errors

s = sdk.SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)

<!-- Start Error Handling -->
# Error Handling

Handling errors in your SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
res = None
try:
res = s.benefits_enrollment.get_benefits_enrollment_id_(id='<value>')
except errors.SDKError as e:
# handle exception
raise(e)

if res.enrollment is not None:
# handle response
pass

<!-- End Error Handling -->
```
<!-- End Error Handling [errors] -->



<!-- Start Server Selection -->
# Server Selection
<!-- Start Server Selection [server] -->
## Server Selection

## Select Server by Index
### Select Server by Index

You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://api.wingspan.app/benefits` | None |
| 1 | `https://stagingapi.wingspan.app/benefits` | None |

For example:
| 0 | `https://api.wingspan.app` | None |
| 1 | `https://stagingapi.wingspan.app` | None |

#### Example

```python
import sdk
from sdk.models import operations

s = sdk.SDK(
server_idx=1
server_idx=1,
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.sdk.get_benefits_enrollment_id_(id='string')
res = s.benefits_enrollment.get_benefits_enrollment_id_(id='<value>')

if res.enrollment is not None:
# handle response
pass

```


## Override Server URL Per-Client
### Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:


```python
import sdk
from sdk.models import operations

s = sdk.SDK(
server_url="https://api.wingspan.app/benefits"
server_url="https://api.wingspan.app",
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.sdk.get_benefits_enrollment_id_(id='string')
res = s.benefits_enrollment.get_benefits_enrollment_id_(id='<value>')

if res.enrollment is not None:
# handle response
pass
```
<!-- End Server Selection -->


```
<!-- End Server Selection [server] -->

<!-- Start Custom HTTP Client -->
# Custom HTTP Client

The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.

<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client

For example, you could specify a header for every request that your sdk makes as follows:
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.

For example, you could specify a header for every request that this sdk makes as follows:
```python
import sdk
import requests
Expand All @@ -139,9 +166,38 @@ http_client = requests.Session()
http_client.headers.update({'x-custom-header': 'someValue'})
s = sdk.SDK(client: http_client)
```
<!-- End Custom HTTP Client [http-client] -->



<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| ------------- | ------------- | ------------- |
| `bearer_auth` | http | HTTP Bearer |

To authenticate with the API the `bearer_auth` parameter must be set when initializing the SDK client instance. For example:
```python
import sdk

s = sdk.SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.benefits_enrollment.get_benefits_enrollment_id_(id='<value>')

<!-- End Custom HTTP Client -->
if res.enrollment is not None:
# handle response
pass

```
<!-- End Authentication [security] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

Expand Down
Loading