Skip to content

Commit 3819694

Browse files
authored
Merge pull request #542 from codatio/speakeasy-sdk-regen-1702562830
chore: 🐝 Update SDK - Generate Assess library
2 parents 4226c4f + def1a7d commit 3819694

File tree

227 files changed

+1252
-763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+1252
-763
lines changed

previous-versions/assess/.gitattributes

100755100644
File mode changed.

previous-versions/assess/README.md

Lines changed: 226 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,44 @@ You can use that data for automating decisioning and surfacing new insights on t
77
Assess helps you make smarter credit decisions on small businesses by enabling you to pull your customers' latest data from the operating systems they are already using.
88
You can use that data for automating decisioning and surfacing new insights on the customer, all via one API.
99

10-
<!-- Start SDK Installation -->
10+
<!-- Start SDK Installation [installation] -->
1111
## SDK Installation
1212

1313
```bash
1414
pip install codat-assess
1515
```
16-
<!-- End SDK Installation -->
16+
<!-- End SDK Installation [installation] -->
1717

1818
## Example Usage
19-
<!-- Start SDK Example Usage -->
19+
<!-- Start SDK Example Usage [usage] -->
20+
## SDK Example Usage
21+
22+
### Example
23+
2024
```python
2125
import codatassess
22-
from codatassess.models import operations, shared
26+
from codatassess.models import operations
2327

2428
s = codatassess.CodatAssess(
2529
auth_header="Basic BASE_64_ENCODED(API_KEY)",
2630
)
2731

28-
req = operations.ListDataTypeDataIntegrityDetailsRequest(
32+
req = operations.GenerateLoanSummaryRequest(
2933
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
30-
data_type=shared.DataIntegrityDataType.BANKING_ACCOUNTS,
31-
order_by='-modifiedDate',
32-
page=1,
33-
page_size=100,
34+
source_type=operations.SourceType.ACCOUNTING,
3435
)
3536

36-
res = s.data_integrity.details(req)
37+
res = s.reports.generate_loan_summary(req)
3738

38-
if res.details is not None:
39+
if res.status_code == 200:
3940
# handle response
4041
pass
4142
```
42-
<!-- End SDK Example Usage -->
43+
<!-- End SDK Example Usage [usage] -->
4344

44-
<!-- Start SDK Available Operations -->
45+
<!-- Start Available Resources and Operations [operations] -->
4546
## Available Resources and Operations
4647

47-
48-
### [data_integrity](docs/sdks/dataintegrity/README.md)
49-
50-
* [details](docs/sdks/dataintegrity/README.md#details) - List data type data integrity
51-
* [status](docs/sdks/dataintegrity/README.md#status) - Get data integrity status
52-
* [summary](docs/sdks/dataintegrity/README.md#summary) - Get data integrity summary
53-
54-
### [excel_reports](docs/sdks/excelreports/README.md)
55-
56-
* [generate_excel_report](docs/sdks/excelreports/README.md#generate_excel_report) - Generate Excel report
57-
* [get_accounting_marketing_metrics](docs/sdks/excelreports/README.md#get_accounting_marketing_metrics) - Get marketing metrics report
58-
* [get_excel_report](docs/sdks/excelreports/README.md#get_excel_report) - Download Excel report
59-
* [get_excel_report_generation_status](docs/sdks/excelreports/README.md#get_excel_report_generation_status) - Get Excel report status
60-
6148
### [reports](docs/sdks/reports/README.md)
6249

6350
* [generate_loan_summary](docs/sdks/reports/README.md#generate_loan_summary) - Generate loan summaries report
@@ -75,15 +62,224 @@ if res.details is not None:
7562
* [get_recurring_revenue_metrics](docs/sdks/reports/README.md#get_recurring_revenue_metrics) - Get key subscription revenue metrics
7663
* [list_loan_transactions](docs/sdks/reports/README.md#list_loan_transactions) - List loan transactions
7764
* [request_recurring_revenue_metrics](docs/sdks/reports/README.md#request_recurring_revenue_metrics) - Generate key subscription revenue metrics
78-
<!-- End SDK Available Operations -->
7965

66+
### [data_integrity](docs/sdks/dataintegrity/README.md)
67+
68+
* [details](docs/sdks/dataintegrity/README.md#details) - List data type data integrity
69+
* [status](docs/sdks/dataintegrity/README.md#status) - Get data integrity status
70+
* [summary](docs/sdks/dataintegrity/README.md#summary) - Get data integrity summary
71+
72+
### [excel_reports](docs/sdks/excelreports/README.md)
73+
74+
* [generate_excel_report](docs/sdks/excelreports/README.md#generate_excel_report) - Generate Excel report
75+
* [get_accounting_marketing_metrics](docs/sdks/excelreports/README.md#get_accounting_marketing_metrics) - Get marketing metrics report
76+
* [get_excel_report](docs/sdks/excelreports/README.md#get_excel_report) - Download Excel report
77+
* [get_excel_report_generation_status](docs/sdks/excelreports/README.md#get_excel_report_generation_status) - Get Excel report status
78+
<!-- End Available Resources and Operations [operations] -->
79+
80+
81+
82+
<!-- Start Retries [retries] -->
83+
## Retries
84+
85+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
86+
87+
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
88+
```python
89+
import codatassess
90+
from codatassess.models import operations
91+
from codatassess.utils import BackoffStrategy, RetryConfig
92+
93+
s = codatassess.CodatAssess(
94+
auth_header="Basic BASE_64_ENCODED(API_KEY)",
95+
)
8096

97+
req = operations.GenerateLoanSummaryRequest(
98+
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
99+
source_type=operations.SourceType.ACCOUNTING,
100+
)
101+
102+
res = s.reports.generate_loan_summary(req,
103+
RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))
104+
105+
if res.status_code == 200:
106+
# handle response
107+
pass
108+
```
81109

82-
<!-- Start Dev Containers -->
110+
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
111+
```python
112+
import codatassess
113+
from codatassess.models import operations
114+
from codatassess.utils import BackoffStrategy, RetryConfig
83115

116+
s = codatassess.CodatAssess(
117+
retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)
118+
auth_header="Basic BASE_64_ENCODED(API_KEY)",
119+
)
84120

121+
req = operations.GenerateLoanSummaryRequest(
122+
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
123+
source_type=operations.SourceType.ACCOUNTING,
124+
)
85125

86-
<!-- End Dev Containers -->
126+
res = s.reports.generate_loan_summary(req)
127+
128+
if res.status_code == 200:
129+
# handle response
130+
pass
131+
```
132+
<!-- End Retries [retries] -->
133+
134+
<!-- Start Error Handling [errors] -->
135+
## Error Handling
136+
137+
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.
138+
139+
| Error Object | Status Code | Content Type |
140+
| --------------------------- | --------------------------- | --------------------------- |
141+
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
142+
| errors.SDKError | 400-600 | */* |
143+
144+
### Example
145+
146+
```python
147+
import codatassess
148+
from codatassess.models import operations
149+
150+
s = codatassess.CodatAssess(
151+
auth_header="Basic BASE_64_ENCODED(API_KEY)",
152+
)
153+
154+
req = operations.GenerateLoanSummaryRequest(
155+
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
156+
source_type=operations.SourceType.ACCOUNTING,
157+
)
158+
159+
res = None
160+
try:
161+
res = s.reports.generate_loan_summary(req)
162+
except errors.ErrorMessage as e:
163+
print(e) # handle exception
164+
raise(e)
165+
except errors.SDKError as e:
166+
print(e) # handle exception
167+
raise(e)
168+
169+
if res.status_code == 200:
170+
# handle response
171+
pass
172+
```
173+
<!-- End Error Handling [errors] -->
174+
175+
<!-- Start Server Selection [server] -->
176+
## Server Selection
177+
178+
### Select Server by Index
179+
180+
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:
181+
182+
| # | Server | Variables |
183+
| - | ------ | --------- |
184+
| 0 | `https://api.codat.io` | None |
185+
186+
#### Example
187+
188+
```python
189+
import codatassess
190+
from codatassess.models import operations
191+
192+
s = codatassess.CodatAssess(
193+
server_idx=0,
194+
auth_header="Basic BASE_64_ENCODED(API_KEY)",
195+
)
196+
197+
req = operations.GenerateLoanSummaryRequest(
198+
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
199+
source_type=operations.SourceType.ACCOUNTING,
200+
)
201+
202+
res = s.reports.generate_loan_summary(req)
203+
204+
if res.status_code == 200:
205+
# handle response
206+
pass
207+
```
208+
209+
210+
### Override Server URL Per-Client
211+
212+
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:
213+
```python
214+
import codatassess
215+
from codatassess.models import operations
216+
217+
s = codatassess.CodatAssess(
218+
server_url="https://api.codat.io",
219+
auth_header="Basic BASE_64_ENCODED(API_KEY)",
220+
)
221+
222+
req = operations.GenerateLoanSummaryRequest(
223+
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
224+
source_type=operations.SourceType.ACCOUNTING,
225+
)
226+
227+
res = s.reports.generate_loan_summary(req)
228+
229+
if res.status_code == 200:
230+
# handle response
231+
pass
232+
```
233+
<!-- End Server Selection [server] -->
234+
235+
<!-- Start Custom HTTP Client [http-client] -->
236+
## Custom HTTP Client
237+
238+
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.
239+
240+
For example, you could specify a header for every request that this sdk makes as follows:
241+
```python
242+
import codatassess
243+
import requests
244+
245+
http_client = requests.Session()
246+
http_client.headers.update({'x-custom-header': 'someValue'})
247+
s = codatassess.CodatAssess(client: http_client)
248+
```
249+
<!-- End Custom HTTP Client [http-client] -->
250+
251+
<!-- Start Authentication [security] -->
252+
## Authentication
253+
254+
### Per-Client Security Schemes
255+
256+
This SDK supports the following security scheme globally:
257+
258+
| Name | Type | Scheme |
259+
| ------------- | ------------- | ------------- |
260+
| `auth_header` | apiKey | API key |
261+
262+
To authenticate with the API the `auth_header` parameter must be set when initializing the SDK client instance. For example:
263+
```python
264+
import codatassess
265+
from codatassess.models import operations
266+
267+
s = codatassess.CodatAssess(
268+
auth_header="Basic BASE_64_ENCODED(API_KEY)",
269+
)
270+
271+
req = operations.GenerateLoanSummaryRequest(
272+
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
273+
source_type=operations.SourceType.ACCOUNTING,
274+
)
275+
276+
res = s.reports.generate_loan_summary(req)
277+
278+
if res.status_code == 200:
279+
# handle response
280+
pass
281+
```
282+
<!-- End Authentication [security] -->
87283

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

previous-versions/assess/RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@ Based on:
88
### Generated
99
- [python v0.32.0] previous-versions/assess
1010
### Releases
11-
- [PyPI v0.32.0] https://pypi.org/project/codat-assess/0.32.0 - previous-versions/assess
11+
- [PyPI v0.32.0] https://pypi.org/project/codat-assess/0.32.0 - previous-versions/assess
12+
13+
## 2023-12-14 14:07:06
14+
### Changes
15+
Based on:
16+
- OpenAPI Doc 1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Assess.yaml
17+
- Speakeasy CLI 1.126.3 (2.214.3) https://github.com/speakeasy-api/speakeasy
18+
### Generated
19+
- [python v0.33.0] previous-versions/assess
20+
### Releases
21+
- [PyPI v0.33.0] https://pypi.org/project/codat-assess/0.33.0 - previous-versions/assess

previous-versions/assess/USAGE.md

100755100644
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
1-
<!-- Start SDK Example Usage -->
2-
3-
1+
<!-- Start SDK Example Usage [usage] -->
42
```python
53
import codatassess
6-
from codatassess.models import operations, shared
4+
from codatassess.models import operations
75

86
s = codatassess.CodatAssess(
97
auth_header="Basic BASE_64_ENCODED(API_KEY)",
108
)
119

12-
req = operations.ListDataTypeDataIntegrityDetailsRequest(
10+
req = operations.GenerateLoanSummaryRequest(
1311
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
14-
data_type=shared.DataIntegrityDataType.BANKING_ACCOUNTS,
15-
order_by='-modifiedDate',
16-
page=1,
17-
page_size=100,
12+
source_type=operations.SourceType.ACCOUNTING,
1813
)
1914

20-
res = s.data_integrity.details(req)
15+
res = s.reports.generate_loan_summary(req)
2116

22-
if res.details is not None:
17+
if res.status_code == 200:
2318
# handle response
2419
pass
2520
```
26-
<!-- End SDK Example Usage -->
21+
<!-- End SDK Example Usage [usage] -->

previous-versions/assess/docs/models/shared/errormessage.md renamed to previous-versions/assess/docs/models/errors/errormessage.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ErrorMessage
22

3+
Your `query` parameter was not correctly formed
4+
35

46
## Fields
57

previous-versions/assess/docs/models/operations/generateexcelreportrequest.md

100755100644
File mode changed.

previous-versions/assess/docs/models/operations/generateexcelreportresponse.md

100755100644
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
| Field | Type | Required | Description |
77
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
88
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
9-
| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
109
| `excel_status` | [Optional[shared.ExcelStatus]](../../models/shared/excelstatus.md) | :heavy_minus_sign: | OK |
1110
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
12-
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
11+
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |

previous-versions/assess/docs/models/operations/generateloansummaryrequest.md

100755100644
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description | Example |
7-
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
8-
| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
9-
| `source_type` | [GenerateLoanSummarySourceType](../../models/operations/generateloansummarysourcetype.md) | :heavy_check_mark: | Data source type. | |
6+
| Field | Type | Required | Description | Example |
7+
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
8+
| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
9+
| `source_type` | [operations.SourceType](../../models/operations/sourcetype.md) | :heavy_check_mark: | Data source type. | |

0 commit comments

Comments
 (0)