Skip to content

Commit bba412d

Browse files
authored
Merge pull request #95 from codatio/speakeasy-sdk-regen-1682409455
chore: speakeasy sdk regeneration - Generate Accounting SDK
2 parents 501727e + 939c8a0 commit bba412d

File tree

114 files changed

+8704
-2107
lines changed

Some content is hidden

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

114 files changed

+8704
-2107
lines changed

accounting/README.md

Lines changed: 172 additions & 173 deletions
Large diffs are not rendered by default.

accounting/RELEASES.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,36 @@ Based on:
246246
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml
247247
- Speakeasy CLI 1.20.1 (2.18.1) https://github.com/speakeasy-api/speakeasy
248248
### Releases
249-
- [PyPI v0.11.1] https://pypi.org/project/codat-accounting/0.11.1 - accounting
249+
- [PyPI v0.11.1] https://pypi.org/project/codat-accounting/0.11.1 - accounting
250+
251+
## 2023-04-25 07:57:34
252+
### Changes
253+
Based on:
254+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml
255+
- Speakeasy CLI 1.23.0 (2.21.0) https://github.com/speakeasy-api/speakeasy
256+
### Releases
257+
- [PyPI v0.12.0] https://pypi.org/project/codat-accounting/0.12.0 - accounting
258+
259+
## 2023-04-25 14:17:45
260+
### Changes
261+
Based on:
262+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml
263+
- Speakeasy CLI 1.23.1 (2.21.1) https://github.com/speakeasy-api/speakeasy
264+
### Releases
265+
- [PyPI v0.12.1] https://pypi.org/project/codat-accounting/0.12.1 - accounting
266+
267+
## 2023-04-26 00:56:25
268+
### Changes
269+
Based on:
270+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml
271+
- Speakeasy CLI 1.23.1 (2.21.1) https://github.com/speakeasy-api/speakeasy
272+
### Releases
273+
- [PyPI v0.12.2] https://pypi.org/project/codat-accounting/0.12.2 - accounting
274+
275+
## 2023-04-26 14:59:03
276+
### Changes
277+
Based on:
278+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml
279+
- Speakeasy CLI 1.25.1 (2.22.0) https://github.com/speakeasy-api/speakeasy
280+
### Releases
281+
- [PyPI v0.13.0] https://pypi.org/project/codat-accounting/0.13.0 - accounting

accounting/USAGE.md

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

66
s = codataccounting.CodatAccounting(
77
security=shared.Security(
@@ -15,8 +15,8 @@ req = operations.GetAccountTransactionRequest(
1515
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
1616
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
1717
)
18-
19-
res = s.account_transactions.get_account_transaction(req)
18+
19+
res = s.account_transactions.get(req)
2020

2121
if res.account_transaction is not None:
2222
# handle response

accounting/docs/accounts/README.md

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# accounts
2+
3+
## Overview
4+
5+
Accounts
6+
7+
### Available Operations
8+
9+
* [create](#create) - Create account
10+
* [get](#get) - Get account
11+
* [get_create_model](#get_create_model) - Get create account model
12+
* [list](#list) - List accounts
13+
14+
## create
15+
16+
Creates a new account for a given company.
17+
18+
Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).
19+
20+
> **Supported Integrations**
21+
>
22+
> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account.
23+
24+
### Example Usage
25+
26+
```python
27+
import codataccounting
28+
from codataccounting.models import operations, shared
29+
30+
s = codataccounting.CodatAccounting(
31+
security=shared.Security(
32+
auth_header="YOUR_API_KEY_HERE",
33+
),
34+
)
35+
36+
37+
req = operations.CreateAccountRequest(
38+
account=shared.Account(
39+
currency="quibusdam",
40+
current_balance=6027.63,
41+
description="Invoices the business has issued but has not yet collected payment on.",
42+
fully_qualified_category="Asset.Current",
43+
fully_qualified_name="Asset.Current.Accounts Receivable",
44+
id="1b6266d1-1e44-46c5-8eb5-a8f98e03124e",
45+
is_bank_account=False,
46+
metadata=shared.Metadata(
47+
is_deleted=False,
48+
),
49+
modified_date="nulla",
50+
name="Accounts Receivable",
51+
nominal_code="610",
52+
source_modified_date="corrupti",
53+
status="Active",
54+
type="Asset",
55+
valid_datatype_links=[
56+
shared.ValidDataTypeLinks(
57+
links=[
58+
"error",
59+
"deserunt",
60+
],
61+
property="suscipit",
62+
),
63+
shared.ValidDataTypeLinks(
64+
links=[
65+
"magnam",
66+
"debitis",
67+
],
68+
property="ipsa",
69+
),
70+
shared.ValidDataTypeLinks(
71+
links=[
72+
"tempora",
73+
"suscipit",
74+
"molestiae",
75+
"minus",
76+
],
77+
property="placeat",
78+
),
79+
shared.ValidDataTypeLinks(
80+
links=[
81+
"iusto",
82+
"excepturi",
83+
"nisi",
84+
],
85+
property="recusandae",
86+
),
87+
],
88+
),
89+
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
90+
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
91+
timeout_in_minutes=836079,
92+
)
93+
94+
res = s.accounts.create(req)
95+
96+
if res.create_account_response is not None:
97+
# handle response
98+
```
99+
100+
## get
101+
102+
Gets a single account corresponding to the given ID.
103+
104+
### Example Usage
105+
106+
```python
107+
import codataccounting
108+
from codataccounting.models import operations
109+
110+
s = codataccounting.CodatAccounting(
111+
security=shared.Security(
112+
auth_header="YOUR_API_KEY_HERE",
113+
),
114+
)
115+
116+
117+
req = operations.GetAccountRequest(
118+
account_id="8a210b68-6988-11ed-a1eb-0242ac120002",
119+
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
120+
)
121+
122+
res = s.accounts.get(req)
123+
124+
if res.account is not None:
125+
# handle response
126+
```
127+
128+
## get_create_model
129+
130+
Get create account model. Returns the expected data for the request payload.
131+
132+
See the examples for integration-specific indicative models.
133+
134+
> **Supported Integrations**
135+
>
136+
> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account.
137+
138+
### Example Usage
139+
140+
```python
141+
import codataccounting
142+
from codataccounting.models import operations
143+
144+
s = codataccounting.CodatAccounting(
145+
security=shared.Security(
146+
auth_header="YOUR_API_KEY_HERE",
147+
),
148+
)
149+
150+
151+
req = operations.GetCreateChartOfAccountsModelRequest(
152+
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
153+
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
154+
)
155+
156+
res = s.accounts.get_create_model(req)
157+
158+
if res.push_option is not None:
159+
# handle response
160+
```
161+
162+
## list
163+
164+
Gets the latest accounts for a company
165+
166+
### Example Usage
167+
168+
```python
169+
import codataccounting
170+
from codataccounting.models import operations
171+
172+
s = codataccounting.CodatAccounting(
173+
security=shared.Security(
174+
auth_header="YOUR_API_KEY_HERE",
175+
),
176+
)
177+
178+
179+
req = operations.ListAccountsRequest(
180+
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
181+
order_by="-modifiedDate",
182+
page=1,
183+
page_size=100,
184+
query="ab",
185+
)
186+
187+
res = s.accounts.list(req)
188+
189+
if res.accounts is not None:
190+
# handle response
191+
```
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# account_transactions
2+
3+
## Overview
4+
5+
Account transactions
6+
7+
### Available Operations
8+
9+
* [get](#get) - Get account transaction
10+
* [list](#list) - List account transactions
11+
12+
## get
13+
14+
Returns a specific [account transaction](https://docs.codat.io/accounting-api#/schemas/AccountTransaction).
15+
16+
### Example Usage
17+
18+
```python
19+
import codataccounting
20+
from codataccounting.models import operations
21+
22+
s = codataccounting.CodatAccounting(
23+
security=shared.Security(
24+
auth_header="YOUR_API_KEY_HERE",
25+
),
26+
)
27+
28+
29+
req = operations.GetAccountTransactionRequest(
30+
account_transaction_id="provident",
31+
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
32+
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
33+
)
34+
35+
res = s.account_transactions.get(req)
36+
37+
if res.account_transaction is not None:
38+
# handle response
39+
```
40+
41+
## list
42+
43+
Returns a list of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) for a given company's connection.
44+
45+
### Example Usage
46+
47+
```python
48+
import codataccounting
49+
from codataccounting.models import operations
50+
51+
s = codataccounting.CodatAccounting(
52+
security=shared.Security(
53+
auth_header="YOUR_API_KEY_HERE",
54+
),
55+
)
56+
57+
58+
req = operations.ListAccountTransactionsRequest(
59+
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",
60+
connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171",
61+
order_by="-modifiedDate",
62+
page=1,
63+
page_size=100,
64+
query="distinctio",
65+
)
66+
67+
res = s.account_transactions.list(req)
68+
69+
if res.account_transactions is not None:
70+
# handle response
71+
```

0 commit comments

Comments
 (0)