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: speakeasy sdk regeneration - Generate #8

Open
wants to merge 2 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
100 changes: 98 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ from wingspan.models import shared
s = wingspan.Wingspan()

req = shared.Calculate1099Request(
member_client_id='Program',
year=9615.59,
member_client_id='string',
year=6611.96,
)

res = s.one_thousand_and_ninety_nine.calculate(req)
Expand Down Expand Up @@ -465,6 +465,102 @@ return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
<!-- End Pagination -->



<!-- 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.


<!-- End Error Handling -->



<!-- Start Server Selection -->
# Server Selection

## 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` | None |
| 1 | `https://stagingapi.wingspan.app` | None |

For example:


```python
import wingspan
from wingspan.models import shared

s = wingspan.Wingspan(
server_idx=1
)

req = shared.Calculate1099Request(
member_client_id='string',
year=6611.96,
)

res = s.one_thousand_and_ninety_nine.calculate(req)

if res.calculate1099_response is not None:
# handle response
pass
```


## 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 wingspan
from wingspan.models import shared

s = wingspan.Wingspan(
server_url="https://api.wingspan.app"
)

req = shared.Calculate1099Request(
member_client_id='string',
year=6611.96,
)

res = s.one_thousand_and_ninety_nine.calculate(req)

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



<!-- 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.


For example, you could specify a header for every request that your sdk makes as follows:

```python
import wingspan
import requests

http_client = requests.Session()
http_client.headers.update({'x-custom-header': 'someValue'})
s = wingspan.Wingspan(client: http_client)
```


<!-- End Custom HTTP Client -->

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


Expand Down
18 changes: 17 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,20 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.101.0 (2.161.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v2.0.0] .
- [python v2.0.0] .

## 2023-10-21 00:37:42
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.104.0 (2.169.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v2.1.0] .

## 2023-10-28 00:37:32
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.109.0 (2.173.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v2.1.1] .
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ from wingspan.models import shared
s = wingspan.Wingspan()

req = shared.Calculate1099Request(
member_client_id='Program',
year=9615.59,
member_client_id='string',
year=6611.96,
)

res = s.one_thousand_and_ninety_nine.calculate(req)
Expand Down
8 changes: 4 additions & 4 deletions docs/sdks/additionaldata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ s = wingspan.Wingspan()

req = shared.AdditionalData(
key='<key>',
name='online',
name='string',
required=False,
type=shared.AdditionalDataType.STRING,
type=shared.AdditionalDataType.BOOLEAN,
)

res = s.additional_data.create(req)
Expand Down Expand Up @@ -58,7 +58,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.additional_data.delete(id='program')
res = s.additional_data.delete(id='string')

if res.additional_data is not None:
# handle response
Expand Down Expand Up @@ -90,7 +90,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.additional_data.get(id='female')
res = s.additional_data.get(id='string')

if res.additional_data is not None:
# handle response
Expand Down
2 changes: 1 addition & 1 deletion docs/sdks/additionalsettings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.additional_settings.update(id='Van', additional_data_update_request=shared.AdditionalDataUpdateRequest())
res = s.additional_settings.update(id='string', additional_data_update_request=shared.AdditionalDataUpdateRequest())

if res.additional_data is not None:
# handle response
Expand Down
2 changes: 1 addition & 1 deletion docs/sdks/applink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.app_link.get(member_id='female')
res = s.app_link.get(member_id='string')

if res.banking_application_form is not None:
# handle response
Expand Down
8 changes: 4 additions & 4 deletions docs/sdks/bulkcalculation1099batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ s = wingspan.Wingspan()

req = shared.BulkBatchCreate(
labels={
"online": 'Configuration',
"key": 'string',
},
)

Expand Down Expand Up @@ -57,7 +57,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_calculation1099_batch.get(batch_id='female')
res = s.bulk_calculation1099_batch.get(batch_id='string')

if res.bulk_calculation1099_batch is not None:
# handle response
Expand Down Expand Up @@ -89,9 +89,9 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_calculation1099_batch.update(batch_id='Van', bulk_batch_update=shared.BulkBatchUpdate(
res = s.bulk_calculation1099_batch.update(batch_id='string', bulk_batch_update=shared.BulkBatchUpdate(
labels={
"East": 'male',
"key": 'string',
},
))

Expand Down
14 changes: 7 additions & 7 deletions docs/sdks/bulkcalculation1099batchitem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_calculation1099_batch_item.create(batch_id='online', bulk_calculation1099_item_create=shared.BulkCalculation1099ItemCreate(
client_id='Configuration',
res = s.bulk_calculation1099_batch_item.create(batch_id='string', bulk_calculation1099_item_create=shared.BulkCalculation1099ItemCreate(
client_id='string',
labels={
"Money": 'blue',
"key": 'string',
},
year=9967.06,
year=4865.89,
))

if res.bulk_calculation1099_item is not None:
Expand Down Expand Up @@ -59,7 +59,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_calculation1099_batch_item.get(batch_id='female', batch_item_id='program')
res = s.bulk_calculation1099_batch_item.get(batch_id='string', batch_item_id='string')

if res.bulk_calculation1099_item is not None:
# handle response
Expand Down Expand Up @@ -92,9 +92,9 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_calculation1099_batch_item.update(batch_id='Van', batch_item_id='East', bulk_calculation1099_item_update=shared.BulkCalculation1099ItemUpdate(
res = s.bulk_calculation1099_batch_item.update(batch_id='string', batch_item_id='string', bulk_calculation1099_item_update=shared.BulkCalculation1099ItemUpdate(
labels={
"male": 'Metal',
"key": 'string',
},
))

Expand Down
2 changes: 1 addition & 1 deletion docs/sdks/bulkcalculation1099batchitems/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_calculation1099_batch_items.list(batch_id='Bicycle')
res = s.bulk_calculation1099_batch_items.list(batch_id='string')

if res.bulk_calculation1099_items is not None:
# handle response
Expand Down
8 changes: 4 additions & 4 deletions docs/sdks/bulkclientbatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ s = wingspan.Wingspan()

req = shared.BulkBatchCreate(
labels={
"online": 'Configuration',
"key": 'string',
},
)

Expand Down Expand Up @@ -57,7 +57,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_client_batch.get(batch_id='female')
res = s.bulk_client_batch.get(batch_id='string')

if res.bulk_client_batch is not None:
# handle response
Expand Down Expand Up @@ -89,9 +89,9 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_client_batch.update(batch_id='Van', bulk_batch_update=shared.BulkBatchUpdate(
res = s.bulk_client_batch.update(batch_id='string', bulk_batch_update=shared.BulkBatchUpdate(
labels={
"East": 'male',
"key": 'string',
},
))

Expand Down
10 changes: 5 additions & 5 deletions docs/sdks/bulkclientbatchitem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_client_batch_item.create(batch_id='online', bulk_client_item_create=shared.BulkClientItemCreate(
res = s.bulk_client_batch_item.create(batch_id='string', bulk_client_item_create=shared.BulkClientItemCreate(
integration=shared.D750b2d9403b5bcbdb3c96c89f1cc713df563d587f16e5f39f5ab546c08a20a0(
quickbooks=shared.SixtyFourMillionEightHundredAndFortySixThousandOneHundredAndThirtySixa354aa510825c1f23c3a978f4c816d8d4184311e7294a570f73727dc(),
),
labels={
"Configuration": 'Money',
"key": 'string',
},
member_data=shared.MemberData(),
))
Expand Down Expand Up @@ -61,7 +61,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_client_batch_item.get(batch_id='female', batch_item_id='program')
res = s.bulk_client_batch_item.get(batch_id='string', batch_item_id='string')

if res.bulk_client_item is not None:
# handle response
Expand Down Expand Up @@ -94,12 +94,12 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_client_batch_item.update(batch_id='Van', batch_item_id='East', bulk_client_item_update=shared.BulkClientItemUpdate(
res = s.bulk_client_batch_item.update(batch_id='string', batch_item_id='string', bulk_client_item_update=shared.BulkClientItemUpdate(
integration=shared.D750b2d9403b5bcbdb3c96c89f1cc713df563d587f16e5f39f5ab546c08a20a0(
quickbooks=shared.SixtyFourMillionEightHundredAndFortySixThousandOneHundredAndThirtySixa354aa510825c1f23c3a978f4c816d8d4184311e7294a570f73727dc(),
),
labels={
"male": 'Metal',
"key": 'string',
},
member_data=shared.MemberData(),
))
Expand Down
2 changes: 1 addition & 1 deletion docs/sdks/bulkclientbatchitems/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_client_batch_items.list(batch_id='Bicycle')
res = s.bulk_client_batch_items.list(batch_id='string')

if res.bulk_client_items is not None:
# handle response
Expand Down
8 changes: 4 additions & 4 deletions docs/sdks/bulkcollaboratorbatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ s = wingspan.Wingspan()

req = shared.BulkBatchCreate(
labels={
"online": 'Configuration',
"key": 'string',
},
)

Expand Down Expand Up @@ -57,7 +57,7 @@ from wingspan.models import operations
s = wingspan.Wingspan()


res = s.bulk_collaborator_batch.get(batch_id='female')
res = s.bulk_collaborator_batch.get(batch_id='string')

if res.bulk_collaborator_batch is not None:
# handle response
Expand Down Expand Up @@ -89,9 +89,9 @@ from wingspan.models import operations, shared
s = wingspan.Wingspan()


res = s.bulk_collaborator_batch.update(batch_id='Van', bulk_batch_update=shared.BulkBatchUpdate(
res = s.bulk_collaborator_batch.update(batch_id='string', bulk_batch_update=shared.BulkBatchUpdate(
labels={
"East": 'male',
"key": 'string',
},
))

Expand Down
Loading