Skip to content

Commit 2c21bf8

Browse files
authored
Merge pull request #69 from codatio/speakeasy-sdk-regen-1679530793
chore: speakeasy sdk regeneration - Generate Commerce SDK
2 parents abbc3f1 + 4cfb07b commit 2c21bf8

File tree

94 files changed

+2691
-1648
lines changed

Some content is hidden

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

94 files changed

+2691
-1648
lines changed

commerce/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,59 +21,59 @@ s = codat.Codat(
2121
)
2222

2323

24-
req = operations.GetCommerceInfoRequest(
24+
req = operations.GetCompanyInfoRequest(
2525
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
2626
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
2727
)
2828

29-
res = s.company_info.get_commerce_info(req)
29+
res = s.company_info.get_company_info(req)
3030

31-
if res.source_modified_date is not None:
31+
if res.company_info is not None:
3232
# handle response
3333
```
3434
<!-- End SDK Example Usage -->
3535

3636
<!-- Start SDK Available Operations -->
37-
## SDK Available Operations
37+
## Available Resources and Operations
3838

3939

4040
### company_info
4141

42-
* `get_commerce_info` - Get company info
42+
* `get_company_info` - Get company info
4343

4444
### customers
4545

46-
* `list_commerce_customers` - List customers
46+
* `list_customers` - List customers
4747

4848
### disputes
4949

50-
* `list_commerce_disputes` - List disputes
50+
* `list_disputes` - List disputes
5151

5252
### locations
5353

54-
* `list_commerce_locations` - List locations
54+
* `list_locations` - List locations
5555

5656
### orders
5757

58-
* `list_commerce_orders` - List orders
58+
* `list_orders` - List orders
5959

6060
### payments
6161

62-
* `list_commerce_payment_methods` - List payment methods
63-
* `list_commerce_payments` - List payments
62+
* `list_payment_methods` - List payment methods
63+
* `list_payments` - List payments
6464

6565
### products
6666

67-
* `list_commerce_product_categories` - List product categories
68-
* `list_commerce_products` - List products
67+
* `list_product_categories` - List product categories
68+
* `list_products` - List products
6969

7070
### tax_components
7171

72-
* `get_companies_company_id_connections_connection_id_data_commerce_tax_components` - List tax components
72+
* `get_tax_components` - List tax components
7373

7474
### transactions
7575

76-
* `list_commerce_transactions` - List transactions
76+
* `list_transactions` - List transactions
7777
<!-- End SDK Available Operations -->
7878

7979
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)

commerce/RELEASES.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,76 @@ Based on:
126126
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
127127
- Speakeasy CLI 1.14.1 https://github.com/speakeasy-api/speakeasy
128128
### Releases
129-
- [PyPI v0.7.0] https://pypi.org/project/codat-commerce/0.7.0 - commerce
129+
- [PyPI v0.7.0] https://pypi.org/project/codat-commerce/0.7.0 - commerce
130+
131+
## 2023-03-23 00:19:51
132+
### Changes
133+
Based on:
134+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
135+
- Speakeasy CLI 1.15.0 (2.13.1) https://github.com/speakeasy-api/speakeasy
136+
### Releases
137+
- [PyPI v0.7.1] https://pypi.org/project/codat-commerce/0.7.1 - commerce
138+
139+
## 2023-03-24 00:19:06
140+
### Changes
141+
Based on:
142+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
143+
- Speakeasy CLI 1.17.0 (2.15.0) https://github.com/speakeasy-api/speakeasy
144+
### Releases
145+
- [PyPI v0.8.0] https://pypi.org/project/codat-commerce/0.8.0 - commerce
146+
147+
## 2023-03-25 00:18:25
148+
### Changes
149+
Based on:
150+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
151+
- Speakeasy CLI 1.18.7 (2.16.1) https://github.com/speakeasy-api/speakeasy
152+
### Releases
153+
- [PyPI v0.9.0] https://pypi.org/project/codat-commerce/0.9.0 - commerce
154+
155+
## 2023-03-28 00:20:05
156+
### Changes
157+
Based on:
158+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
159+
- Speakeasy CLI 1.18.9 (2.16.4) https://github.com/speakeasy-api/speakeasy
160+
### Releases
161+
- [PyPI v0.9.1] https://pypi.org/project/codat-commerce/0.9.1 - commerce
162+
163+
## 2023-03-29 00:22:13
164+
### Changes
165+
Based on:
166+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
167+
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
168+
### Releases
169+
- [PyPI v0.9.2] https://pypi.org/project/codat-commerce/0.9.2 - commerce
170+
171+
## 2023-03-30 00:20:10
172+
### Changes
173+
Based on:
174+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
175+
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
176+
### Releases
177+
- [PyPI v0.9.3] https://pypi.org/project/codat-commerce/0.9.3 - commerce
178+
179+
## 2023-03-31 00:19:34
180+
### Changes
181+
Based on:
182+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
183+
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
184+
### Releases
185+
- [PyPI v0.9.4] https://pypi.org/project/codat-commerce/0.9.4 - commerce
186+
187+
## 2023-04-01 00:20:16
188+
### Changes
189+
Based on:
190+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
191+
- Speakeasy CLI 1.19.3 (2.16.7) https://github.com/speakeasy-api/speakeasy
192+
### Releases
193+
- [PyPI v0.9.5] https://pypi.org/project/codat-commerce/0.9.5 - commerce
194+
195+
## 2023-04-03 00:19:41
196+
### Changes
197+
Based on:
198+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Commerce.yaml
199+
- Speakeasy CLI 1.19.3 (2.16.7) https://github.com/speakeasy-api/speakeasy
200+
### Releases
201+
- [PyPI v0.9.6] https://pypi.org/project/codat-commerce/0.9.6 - commerce

commerce/USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ s = codat.Codat(
1010
)
1111

1212

13-
req = operations.GetCommerceInfoRequest(
13+
req = operations.GetCompanyInfoRequest(
1414
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
1515
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
1616
)
1717

18-
res = s.company_info.get_commerce_info(req)
18+
res = s.company_info.get_company_info(req)
1919

20-
if res.source_modified_date is not None:
20+
if res.company_info is not None:
2121
# handle response
2222
```
2323
<!-- End SDK Example Usage -->

commerce/files.gen

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,71 @@ src/codat/models/__init__.py
1515
src/codat/utils/__init__.py
1616
src/codat/utils/retries.py
1717
src/codat/utils/utils.py
18-
src/codat/models/operations/get_commerce_info.py
19-
src/codat/models/operations/list_commerce_customers.py
20-
src/codat/models/operations/list_commerce_disputes.py
21-
src/codat/models/operations/list_commerce_locations.py
22-
src/codat/models/operations/list_commerce_orders.py
23-
src/codat/models/operations/list_commerce_paymentmethods.py
24-
src/codat/models/operations/list_commerce_payments.py
25-
src/codat/models/operations/list_commerce_productcategories.py
26-
src/codat/models/operations/list_commerce_products.py
27-
src/codat/models/operations/get_companies_companyid_connections_connectionid_data_commerce_taxcomponents.py
28-
src/codat/models/operations/list_commerce_transactions.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
2929
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
3083
src/codat/models/shared/security.py
3184
src/codat/models/shared/__init__.py
3285
USAGE.md

commerce/gen.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
configVersion: 1.0.0
22
management:
3-
docChecksum: acb3d544c813bc9862f61eb872eadf7c
3+
docChecksum: ed2ae4d4ff88da4207e078b2f6f64cf3
44
docVersion: 2.1.0
5-
speakeasyVersion: 1.14.1
5+
speakeasyVersion: 1.19.3
6+
generationVersion: 2.16.7
67
generation:
78
telemetryEnabled: false
89
sdkClassName: codat
910
sdkFlattening: true
11+
singleTagPerOp: false
1012
python:
11-
version: 0.7.0
13+
version: 0.9.6
1214
author: Speakeasy
1315
description: Python Client SDK Generated by Speakeasy
1416
packageName: codat-commerce

commerce/pylintrc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ attr-naming-style=snake_case
124124
#attr-rgx=
125125

126126
# Bad variable names which should always be refused, separated by a comma.
127-
bad-names=foo,
128-
bar,
129-
baz,
130-
toto,
131-
tutu,
132-
tata
127+
bad-names=
133128

134129
# Bad variable names regexes, separated by a comma. If names match any regex,
135130
# they will always be refused
@@ -438,7 +433,11 @@ disable=raw-checker-failed,
438433
duplicate-code,
439434
trailing-newlines,
440435
too-many-public-methods,
441-
too-many-locals
436+
too-many-locals,
437+
too-many-lines,
438+
using-constant-test,
439+
too-many-statements,
440+
cyclic-import,
442441

443442
# Enable the message, report, category or checker with the given id(s). You can
444443
# 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.7.0",
13+
version="0.9.6",
1414
author="Speakeasy",
1515
description="Python Client SDK Generated by Speakeasy",
1616
long_description=long_description,

commerce/src/codat/company_info.py

Lines changed: 6 additions & 6 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
5+
from codat.models import operations, shared
66
from typing import Optional
77

88
class CompanyInfo:
@@ -22,28 +22,28 @@ 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_commerce_info(self, request: operations.GetCommerceInfoRequest) -> operations.GetCommerceInfoResponse:
25+
def get_company_info(self, request: operations.GetCompanyInfoRequest) -> operations.GetCompanyInfoResponse:
2626
r"""Get company info
2727
Retrieve information about the company, as seen in the commerce platform.
2828
2929
This may include information like addresses, tax registration details and social media or website information.
3030
"""
3131
base_url = self._server_url
3232

33-
url = utils.generate_url(operations.GetCommerceInfoRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/commerce-info', request)
33+
url = utils.generate_url(operations.GetCompanyInfoRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/commerce-info', request)
3434

3535

3636
client = self._security_client
3737

3838
http_res = client.request('GET', url)
3939
content_type = http_res.headers.get('Content-Type')
4040

41-
res = operations.GetCommerceInfoResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
41+
res = operations.GetCompanyInfoResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
4242

4343
if http_res.status_code == 200:
4444
if utils.match_content_type(content_type, 'application/json'):
45-
out = utils.unmarshal_json(http_res.text, Optional[operations.GetCommerceInfoSourceModifiedDate])
46-
res.source_modified_date = out
45+
out = utils.unmarshal_json(http_res.text, Optional[shared.CompanyInfo])
46+
res.company_info = out
4747

4848
return res
4949

commerce/src/codat/customers.py

Lines changed: 7 additions & 7 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
5+
from codat.models import operations, shared
66
from typing import Optional
77

88
class Customers:
@@ -22,27 +22,27 @@ 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_commerce_customers(self, request: operations.ListCommerceCustomersRequest) -> operations.ListCommerceCustomersResponse:
25+
def list_customers(self, request: operations.ListCustomersRequest) -> operations.ListCustomersResponse:
2626
r"""List customers
2727
List all commerce customers for the given company and data connection
2828
"""
2929
base_url = self._server_url
3030

31-
url = utils.generate_url(operations.ListCommerceCustomersRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/commerce-customers', request)
31+
url = utils.generate_url(operations.ListCustomersRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/commerce-customers', request)
3232

33-
query_params = utils.get_query_params(operations.ListCommerceCustomersRequest, request)
33+
query_params = utils.get_query_params(operations.ListCustomersRequest, request)
3434

3535
client = self._security_client
3636

3737
http_res = client.request('GET', url, params=query_params)
3838
content_type = http_res.headers.get('Content-Type')
3939

40-
res = operations.ListCommerceCustomersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
40+
res = operations.ListCustomersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
4141

4242
if http_res.status_code == 200:
4343
if utils.match_content_type(content_type, 'application/json'):
44-
out = utils.unmarshal_json(http_res.text, Optional[operations.ListCommerceCustomersLinks])
45-
res.links = out
44+
out = utils.unmarshal_json(http_res.text, Optional[shared.Customers])
45+
res.customers = out
4646

4747
return res
4848

0 commit comments

Comments
 (0)