Skip to content

Commit c8aa972

Browse files
authored
Merge pull request #81 from codatio/speakeasy-sdk-regen-1680740291
chore: speakeasy sdk regeneration - Generate Commerce SDK
2 parents f5864d5 + 32103dc commit c8aa972

File tree

89 files changed

+418
-230
lines changed

Some content is hidden

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

89 files changed

+418
-230
lines changed

commerce/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ pip install codat-commerce
1414
## SDK Example Usage
1515
<!-- Start SDK Example Usage -->
1616
```python
17-
import codat
18-
from codat.models import operations, shared
17+
import codatcommerce
18+
from codatcommerce.models import operations, shared
1919

20-
s = codat.Codat(
20+
s = codatcommerce.CodatCommerce(
2121
security=shared.Security(
2222
auth_header="YOUR_API_KEY_HERE",
2323
),

commerce/RELEASES.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,36 @@ Based on:
198198
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
199199
- Speakeasy CLI 1.19.3 (2.16.7) https://github.com/speakeasy-api/speakeasy
200200
### Releases
201-
- [PyPI v0.9.6] https://pypi.org/project/codat-commerce/0.9.6 - commerce
201+
- [PyPI v0.9.6] https://pypi.org/project/codat-commerce/0.9.6 - commerce
202+
203+
## 2023-04-06 00:18:09
204+
### Changes
205+
Based on:
206+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
207+
- Speakeasy CLI 1.19.6 (2.17.8) https://github.com/speakeasy-api/speakeasy
208+
### Releases
209+
- [PyPI v0.10.0] https://pypi.org/project/codat-commerce/0.10.0 - commerce
210+
211+
## 2023-04-12 00:18:35
212+
### Changes
213+
Based on:
214+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
215+
- Speakeasy CLI 1.19.7 (2.17.9) https://github.com/speakeasy-api/speakeasy
216+
### Releases
217+
- [PyPI v0.10.1] https://pypi.org/project/codat-commerce/0.10.1 - commerce
218+
219+
## 2023-04-14 00:17:56
220+
### Changes
221+
Based on:
222+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
223+
- Speakeasy CLI 1.20.0 (2.18.0) https://github.com/speakeasy-api/speakeasy
224+
### Releases
225+
- [PyPI v0.11.0] https://pypi.org/project/codat-commerce/0.11.0 - commerce
226+
227+
## 2023-04-18 00:18:17
228+
### Changes
229+
Based on:
230+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
231+
- Speakeasy CLI 1.20.1 (2.18.1) https://github.com/speakeasy-api/speakeasy
232+
### Releases
233+
- [PyPI v0.11.1] https://pypi.org/project/codat-commerce/0.11.1 - commerce

commerce/USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- Start SDK Example Usage -->
22
```python
3-
import codat
4-
from codat.models import operations, shared
3+
import codatcommerce
4+
from codatcommerce.models import operations, shared
55

6-
s = codat.Codat(
6+
s = codatcommerce.CodatCommerce(
77
security=shared.Security(
88
auth_header="YOUR_API_KEY_HERE",
99
),

commerce/files.gen

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,85 @@
1-
src/codat/company_info.py
2-
src/codat/customers.py
3-
src/codat/disputes.py
4-
src/codat/locations.py
5-
src/codat/orders.py
6-
src/codat/payments.py
7-
src/codat/products.py
8-
src/codat/tax_components.py
9-
src/codat/transactions.py
10-
src/codat/sdk.py
1+
src/codatcommerce/company_info.py
2+
src/codatcommerce/customers.py
3+
src/codatcommerce/disputes.py
4+
src/codatcommerce/locations.py
5+
src/codatcommerce/orders.py
6+
src/codatcommerce/payments.py
7+
src/codatcommerce/products.py
8+
src/codatcommerce/tax_components.py
9+
src/codatcommerce/transactions.py
10+
src/codatcommerce/sdk.py
1111
pylintrc
1212
setup.py
13-
src/codat/__init__.py
14-
src/codat/models/__init__.py
15-
src/codat/utils/__init__.py
16-
src/codat/utils/retries.py
17-
src/codat/utils/utils.py
18-
src/codat/models/operations/get_company_info.py
19-
src/codat/models/operations/list_customers.py
20-
src/codat/models/operations/list_disputes.py
21-
src/codat/models/operations/list_locations.py
22-
src/codat/models/operations/list_orders.py
23-
src/codat/models/operations/list_payment_methods.py
24-
src/codat/models/operations/list_payments.py
25-
src/codat/models/operations/list_product_categories.py
26-
src/codat/models/operations/list_products.py
27-
src/codat/models/operations/get_tax_components.py
28-
src/codat/models/operations/list_transactions.py
29-
src/codat/models/operations/__init__.py
30-
src/codat/models/shared/companyinfo.py
31-
src/codat/models/shared/phonenumber.py
32-
src/codat/models/shared/phonenumbertype_enum.py
33-
src/codat/models/shared/address.py
34-
src/codat/models/shared/addresstype_enum.py
35-
src/codat/models/shared/accountbalance.py
36-
src/codat/models/shared/customers.py
37-
src/codat/models/shared/customer.py
38-
src/codat/models/shared/links.py
39-
src/codat/models/shared/href.py
40-
src/codat/models/shared/disputes.py
41-
src/codat/models/shared/dispute.py
42-
src/codat/models/shared/disputestatus_enum.py
43-
src/codat/models/shared/transactionsourceref.py
44-
src/codat/models/shared/transactionsourcetype_enum.py
45-
src/codat/models/shared/locationsresponse.py
46-
src/codat/models/shared/locations.py
47-
src/codat/models/shared/orders.py
48-
src/codat/models/shared/order.py
49-
src/codat/models/shared/servicecharge.py
50-
src/codat/models/shared/servicechargetype_enum.py
51-
src/codat/models/shared/taxcomponentallocation.py
52-
src/codat/models/shared/taxcomponentref.py
53-
src/codat/models/shared/paymentref.py
54-
src/codat/models/shared/paymenttype_enum.py
55-
src/codat/models/shared/paymentstatus_enum.py
56-
src/codat/models/shared/orderlineitem.py
57-
src/codat/models/shared/productvariantref.py
58-
src/codat/models/shared/productref.py
59-
src/codat/models/shared/orderdiscountallocation.py
60-
src/codat/models/shared/locationref.py
61-
src/codat/models/shared/customerref.py
62-
src/codat/models/shared/paymentmethods.py
63-
src/codat/models/shared/paymentmethod.py
64-
src/codat/models/shared/paymentmethodstatus_enum.py
65-
src/codat/models/shared/payments.py
66-
src/codat/models/shared/payment.py
67-
src/codat/models/shared/paymentmethodref.py
68-
src/codat/models/shared/productcategories.py
69-
src/codat/models/shared/productcategory.py
70-
src/codat/models/shared/recordref.py
71-
src/codat/models/shared/products.py
72-
src/codat/models/shared/product.py
73-
src/codat/models/shared/productvariant.py
74-
src/codat/models/shared/productvariantstatus_enum.py
75-
src/codat/models/shared/productprice.py
76-
src/codat/models/shared/productinventory.py
77-
src/codat/models/shared/productinventorylocation.py
78-
src/codat/models/shared/taxcomponents.py
79-
src/codat/models/shared/taxcomponent.py
80-
src/codat/models/shared/transactions.py
81-
src/codat/models/shared/transaction.py
82-
src/codat/models/shared/transactiontype_enum.py
83-
src/codat/models/shared/security.py
84-
src/codat/models/shared/__init__.py
13+
src/codatcommerce/__init__.py
14+
src/codatcommerce/models/__init__.py
15+
src/codatcommerce/utils/__init__.py
16+
src/codatcommerce/utils/retries.py
17+
src/codatcommerce/utils/utils.py
18+
src/codatcommerce/models/operations/get_company_info.py
19+
src/codatcommerce/models/operations/list_customers.py
20+
src/codatcommerce/models/operations/list_disputes.py
21+
src/codatcommerce/models/operations/list_locations.py
22+
src/codatcommerce/models/operations/list_orders.py
23+
src/codatcommerce/models/operations/list_payment_methods.py
24+
src/codatcommerce/models/operations/list_payments.py
25+
src/codatcommerce/models/operations/list_product_categories.py
26+
src/codatcommerce/models/operations/list_products.py
27+
src/codatcommerce/models/operations/get_tax_components.py
28+
src/codatcommerce/models/operations/list_transactions.py
29+
src/codatcommerce/models/operations/__init__.py
30+
src/codatcommerce/models/shared/companyinfo.py
31+
src/codatcommerce/models/shared/phonenumber.py
32+
src/codatcommerce/models/shared/phonenumbertype_enum.py
33+
src/codatcommerce/models/shared/address.py
34+
src/codatcommerce/models/shared/addresstype_enum.py
35+
src/codatcommerce/models/shared/accountbalance.py
36+
src/codatcommerce/models/shared/customers.py
37+
src/codatcommerce/models/shared/customer.py
38+
src/codatcommerce/models/shared/links.py
39+
src/codatcommerce/models/shared/href.py
40+
src/codatcommerce/models/shared/disputes.py
41+
src/codatcommerce/models/shared/dispute.py
42+
src/codatcommerce/models/shared/disputestatus_enum.py
43+
src/codatcommerce/models/shared/transactionsourceref.py
44+
src/codatcommerce/models/shared/transactionsourcetype_enum.py
45+
src/codatcommerce/models/shared/locationsresponse.py
46+
src/codatcommerce/models/shared/locations.py
47+
src/codatcommerce/models/shared/orders.py
48+
src/codatcommerce/models/shared/order.py
49+
src/codatcommerce/models/shared/servicecharge.py
50+
src/codatcommerce/models/shared/servicechargetype_enum.py
51+
src/codatcommerce/models/shared/taxcomponentallocation.py
52+
src/codatcommerce/models/shared/taxcomponentref.py
53+
src/codatcommerce/models/shared/paymentref.py
54+
src/codatcommerce/models/shared/paymenttype_enum.py
55+
src/codatcommerce/models/shared/paymentstatus_enum.py
56+
src/codatcommerce/models/shared/orderlineitem.py
57+
src/codatcommerce/models/shared/productvariantref.py
58+
src/codatcommerce/models/shared/productref.py
59+
src/codatcommerce/models/shared/orderdiscountallocation.py
60+
src/codatcommerce/models/shared/locationref.py
61+
src/codatcommerce/models/shared/customerref.py
62+
src/codatcommerce/models/shared/paymentmethods.py
63+
src/codatcommerce/models/shared/paymentmethod.py
64+
src/codatcommerce/models/shared/paymentmethodstatus_enum.py
65+
src/codatcommerce/models/shared/payments.py
66+
src/codatcommerce/models/shared/payment.py
67+
src/codatcommerce/models/shared/paymentmethodref.py
68+
src/codatcommerce/models/shared/productcategories.py
69+
src/codatcommerce/models/shared/productcategory.py
70+
src/codatcommerce/models/shared/recordref.py
71+
src/codatcommerce/models/shared/products.py
72+
src/codatcommerce/models/shared/product.py
73+
src/codatcommerce/models/shared/productvariant.py
74+
src/codatcommerce/models/shared/productvariantstatus_enum.py
75+
src/codatcommerce/models/shared/productprice.py
76+
src/codatcommerce/models/shared/productinventory.py
77+
src/codatcommerce/models/shared/productinventorylocation.py
78+
src/codatcommerce/models/shared/taxcomponents.py
79+
src/codatcommerce/models/shared/taxcomponent.py
80+
src/codatcommerce/models/shared/transactions.py
81+
src/codatcommerce/models/shared/transaction.py
82+
src/codatcommerce/models/shared/transactiontype_enum.py
83+
src/codatcommerce/models/shared/security.py
84+
src/codatcommerce/models/shared/__init__.py
8585
USAGE.md

commerce/gen.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
configVersion: 1.0.0
22
management:
3-
docChecksum: ed2ae4d4ff88da4207e078b2f6f64cf3
3+
docChecksum: 63f3c5f50c45c4857130b0c6c9fb4f79
44
docVersion: 2.1.0
5-
speakeasyVersion: 1.19.3
6-
generationVersion: 2.16.7
5+
speakeasyVersion: 1.20.1
6+
generationVersion: 2.18.1
77
generation:
88
telemetryEnabled: false
99
sdkClassName: CodatCommerce
10-
sdkFlattening: true
1110
singleTagPerOp: false
1211
python:
13-
version: 0.9.6
12+
version: 0.11.1
1413
author: Speakeasy
1514
description: Python Client SDK Generated by Speakeasy
1615
packageName: codat-commerce

commerce/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ disable=raw-checker-failed,
438438
using-constant-test,
439439
too-many-statements,
440440
cyclic-import,
441+
too-many-nested-blocks
441442

442443
# Enable the message, report, category or checker with the given id(s). You can
443444
# either give multiple identifier separated by comma (,) or put this option

commerce/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="codat-commerce",
13-
version="0.9.6",
13+
version="0.11.1",
1414
author="Speakeasy",
1515
description="Python Client SDK Generated by Speakeasy",
1616
long_description=long_description,

commerce/src/codat/company_info.py renamed to commerce/src/codatcommerce/company_info.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import requests as requests_http
44
from . import utils
5-
from codat.models import operations, shared
5+
from codatcommerce.models import operations, shared
66
from typing import Optional
77

88
class CompanyInfo:
@@ -22,7 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http
2222
self._sdk_version = sdk_version
2323
self._gen_version = gen_version
2424

25-
def get_company_info(self, request: operations.GetCompanyInfoRequest) -> operations.GetCompanyInfoResponse:
25+
def get_company_info(self, request: operations.GetCompanyInfoRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyInfoResponse:
2626
r"""Get company info
2727
Retrieve information about the company, as seen in the commerce platform.
2828
@@ -35,7 +35,20 @@ def get_company_info(self, request: operations.GetCompanyInfoRequest) -> operati
3535

3636
client = self._security_client
3737

38-
http_res = client.request('GET', url)
38+
retry_config = retries
39+
if retry_config is None:
40+
retry_config = utils.RetryConfig('backoff', True)
41+
retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000)
42+
43+
44+
def do_request():
45+
return client.request('GET', url)
46+
47+
http_res = utils.retry(do_request, utils.Retries(retry_config, [
48+
'408',
49+
'429',
50+
'5XX'
51+
]))
3952
content_type = http_res.headers.get('Content-Type')
4053

4154
res = operations.GetCompanyInfoResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import requests as requests_http
44
from . import utils
5-
from codat.models import operations, shared
5+
from codatcommerce.models import operations, shared
66
from typing import Optional
77

88
class Customers:
@@ -22,7 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http
2222
self._sdk_version = sdk_version
2323
self._gen_version = gen_version
2424

25-
def list_customers(self, request: operations.ListCustomersRequest) -> operations.ListCustomersResponse:
25+
def list_customers(self, request: operations.ListCustomersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomersResponse:
2626
r"""List customers
2727
List all commerce customers for the given company and data connection
2828
"""
@@ -34,7 +34,20 @@ def list_customers(self, request: operations.ListCustomersRequest) -> operations
3434

3535
client = self._security_client
3636

37-
http_res = client.request('GET', url, params=query_params)
37+
retry_config = retries
38+
if retry_config is None:
39+
retry_config = utils.RetryConfig('backoff', True)
40+
retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000)
41+
42+
43+
def do_request():
44+
return client.request('GET', url, params=query_params)
45+
46+
http_res = utils.retry(do_request, utils.Retries(retry_config, [
47+
'408',
48+
'429',
49+
'5XX'
50+
]))
3851
content_type = http_res.headers.get('Content-Type')
3952

4053
res = operations.ListCustomersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)

0 commit comments

Comments
 (0)