diff --git a/sync-for-expenses/.gitattributes b/sync-for-expenses/.gitattributes
new file mode 100755
index 000000000..4d75d5900
--- /dev/null
+++ b/sync-for-expenses/.gitattributes
@@ -0,0 +1,2 @@
+# This allows generated code to be indexed correctly
+*.py linguist-generated=false
\ No newline at end of file
diff --git a/sync-for-expenses/RELEASES.md b/sync-for-expenses/RELEASES.md
index 0841e6b06..6e3a865af 100644
--- a/sync-for-expenses/RELEASES.md
+++ b/sync-for-expenses/RELEASES.md
@@ -616,4 +616,14 @@ Based on:
### Generated
- [python v0.34.0] expenses
### Releases
-- [PyPI v0.34.0] https://pypi.org/project/codat-sync-for-expenses/0.34.0 - expenses
\ No newline at end of file
+- [PyPI v0.34.0] https://pypi.org/project/codat-sync-for-expenses/0.34.0 - expenses
+
+## 2023-09-01 16:43:00
+### Changes
+Based on:
+- OpenAPI Doc prealpha https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Expenses.yaml
+- Speakeasy CLI 1.77.1 (2.91.4) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.35.0] sync-for-expenses
+### Releases
+- [PyPI v0.35.0] https://pypi.org/project/codat-sync-for-expenses/0.35.0 - sync-for-expenses
\ No newline at end of file
diff --git a/sync-for-expenses/USAGE.md b/sync-for-expenses/USAGE.md
index 6745c7299..e0647ad31 100755
--- a/sync-for-expenses/USAGE.md
+++ b/sync-for-expenses/USAGE.md
@@ -11,13 +11,57 @@ s = codatsyncexpenses.CodatSyncExpenses(
),
)
-req = operations.GetCompanyConfigurationRequest(
+req = operations.CreateAccountRequest(
+ account=shared.Account(
+ currency='USD',
+ current_balance=0,
+ description='Invoices the business has issued but has not yet collected payment on.',
+ fully_qualified_category='Asset.Current',
+ fully_qualified_name='Fixed Asset',
+ id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e',
+ is_bank_account=False,
+ metadata=shared.AccountMetadata(
+ is_deleted=False,
+ ),
+ modified_date='2022-10-23T00:00:00.000Z',
+ name='Accounts Receivable',
+ nominal_code='610',
+ source_modified_date='2022-10-23T00:00:00.000Z',
+ status=shared.AccountStatus.ACTIVE,
+ type=shared.AccountType.ASSET,
+ valid_datatype_links=[
+ shared.AccountValidDataTypeLinks(
+ links=[
+ 'corrupti',
+ 'illum',
+ 'vel',
+ 'error',
+ ],
+ property='deserunt',
+ ),
+ shared.AccountValidDataTypeLinks(
+ links=[
+ 'iure',
+ 'magnam',
+ ],
+ property='debitis',
+ ),
+ shared.AccountValidDataTypeLinks(
+ links=[
+ 'delectus',
+ ],
+ property='tempora',
+ ),
+ ],
+ ),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ timeout_in_minutes=383441,
)
-res = s.configuration.get_company_configuration(req)
+res = s.accounts.create(req)
-if res.company_configuration is not None:
+if res.create_account_response is not None:
# handle response
```
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createaccountrequest.md b/sync-for-expenses/docs/models/operations/createaccountrequest.md
new file mode 100755
index 000000000..f212e4aba
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createaccountrequest.md
@@ -0,0 +1,11 @@
+# CreateAccountRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
+| `account` | [Optional[shared.Account]](../../models/shared/account.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createaccountresponse.md b/sync-for-expenses/docs/models/operations/createaccountresponse.md
new file mode 100755
index 000000000..146716ba1
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createaccountresponse.md
@@ -0,0 +1,12 @@
+# CreateAccountResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `create_account_response` | [Optional[shared.CreateAccountResponse]](../../models/shared/createaccountresponse.md) | :heavy_minus_sign: | Success |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createcompanyresponse.md b/sync-for-expenses/docs/models/operations/createcompanyresponse.md
new file mode 100755
index 000000000..ea59de39f
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createcompanyresponse.md
@@ -0,0 +1,12 @@
+# CreateCompanyResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createconnectionrequest.md b/sync-for-expenses/docs/models/operations/createconnectionrequest.md
new file mode 100755
index 000000000..775111c5e
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createconnectionrequest.md
@@ -0,0 +1,9 @@
+# CreateConnectionRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `request_body` | [Optional[CreateConnectionRequestBody]](../../models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createconnectionrequestbody.md b/sync-for-expenses/docs/models/operations/createconnectionrequestbody.md
new file mode 100755
index 000000000..510a6b3b0
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createconnectionrequestbody.md
@@ -0,0 +1,8 @@
+# CreateConnectionRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------ | ------------------ | ------------------ | ------------------ |
+| `platform_key` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createconnectionresponse.md b/sync-for-expenses/docs/models/operations/createconnectionresponse.md
new file mode 100755
index 000000000..5aa8726d9
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createconnectionresponse.md
@@ -0,0 +1,12 @@
+# CreateConnectionResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/intiatesyncrequest.md b/sync-for-expenses/docs/models/operations/createcustomerrequest.md
similarity index 56%
rename from sync-for-expenses/docs/models/operations/intiatesyncrequest.md
rename to sync-for-expenses/docs/models/operations/createcustomerrequest.md
index 7ee237b81..b652f76d3 100755
--- a/sync-for-expenses/docs/models/operations/intiatesyncrequest.md
+++ b/sync-for-expenses/docs/models/operations/createcustomerrequest.md
@@ -1,9 +1,11 @@
-# IntiateSyncRequest
+# CreateCustomerRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| `post_sync` | [Optional[shared.PostSync]](../../models/shared/postsync.md) | :heavy_minus_sign: | N/A | |
-| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
+| `customer` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createcustomerresponse.md b/sync-for-expenses/docs/models/operations/createcustomerresponse.md
new file mode 100755
index 000000000..01e3615d3
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createcustomerresponse.md
@@ -0,0 +1,12 @@
+# CreateCustomerResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `create_customer_response` | [Optional[shared.CreateCustomerResponse]](../../models/shared/createcustomerresponse.md) | :heavy_minus_sign: | Success |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createexpensedatasetrequest.md b/sync-for-expenses/docs/models/operations/createexpensetransactionrequest.md
similarity index 98%
rename from sync-for-expenses/docs/models/operations/createexpensedatasetrequest.md
rename to sync-for-expenses/docs/models/operations/createexpensetransactionrequest.md
index efc2332a1..4fb8c76af 100755
--- a/sync-for-expenses/docs/models/operations/createexpensedatasetrequest.md
+++ b/sync-for-expenses/docs/models/operations/createexpensetransactionrequest.md
@@ -1,4 +1,4 @@
-# CreateExpenseDatasetRequest
+# CreateExpenseTransactionRequest
## Fields
diff --git a/sync-for-expenses/docs/models/operations/createexpensedatasetresponse.md b/sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md
similarity index 98%
rename from sync-for-expenses/docs/models/operations/createexpensedatasetresponse.md
rename to sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md
index 3036fbdb7..47218f65c 100755
--- a/sync-for-expenses/docs/models/operations/createexpensedatasetresponse.md
+++ b/sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md
@@ -1,4 +1,4 @@
-# CreateExpenseDatasetResponse
+# CreateExpenseTransactionResponse
## Fields
diff --git a/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md b/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md
index 039dec66a..718c99c48 100755
--- a/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md
+++ b/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md
@@ -5,8 +5,8 @@
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | Success |
| `content_type` | *str* | :heavy_check_mark: | N/A |
-| `data_connection` | [Optional[shared.DataConnection]](../../models/shared/dataconnection.md) | :heavy_minus_sign: | Success |
| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
| `status_code` | *int* | :heavy_check_mark: | N/A |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createsupplierrequest.md b/sync-for-expenses/docs/models/operations/createsupplierrequest.md
new file mode 100755
index 000000000..68149bdfb
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createsupplierrequest.md
@@ -0,0 +1,11 @@
+# CreateSupplierRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
+| `supplier` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/createsupplierresponse.md b/sync-for-expenses/docs/models/operations/createsupplierresponse.md
new file mode 100755
index 000000000..499202b3b
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/createsupplierresponse.md
@@ -0,0 +1,12 @@
+# CreateSupplierResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `create_supplier_response` | [Optional[shared.CreateSupplierResponse]](../../models/shared/createsupplierresponse.md) | :heavy_minus_sign: | Success |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/deletecompanyrequest.md b/sync-for-expenses/docs/models/operations/deletecompanyrequest.md
new file mode 100755
index 000000000..268537e13
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/deletecompanyrequest.md
@@ -0,0 +1,8 @@
+# DeleteCompanyRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/deletecompanyresponse.md b/sync-for-expenses/docs/models/operations/deletecompanyresponse.md
new file mode 100755
index 000000000..ee9fe7cd3
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/deletecompanyresponse.md
@@ -0,0 +1,11 @@
+# DeleteCompanyResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/deleteconnectionrequest.md b/sync-for-expenses/docs/models/operations/deleteconnectionrequest.md
new file mode 100755
index 000000000..2cab8bf4a
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/deleteconnectionrequest.md
@@ -0,0 +1,9 @@
+# DeleteConnectionRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md b/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md
new file mode 100755
index 000000000..973be81b3
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md
@@ -0,0 +1,11 @@
+# DeleteConnectionResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getcompanyrequest.md b/sync-for-expenses/docs/models/operations/getcompanyrequest.md
new file mode 100755
index 000000000..4c9629ab6
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getcompanyrequest.md
@@ -0,0 +1,8 @@
+# GetCompanyRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getcompanyresponse.md b/sync-for-expenses/docs/models/operations/getcompanyresponse.md
new file mode 100755
index 000000000..a0c0a41b1
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getcompanyresponse.md
@@ -0,0 +1,12 @@
+# GetCompanyResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getconnectionrequest.md b/sync-for-expenses/docs/models/operations/getconnectionrequest.md
new file mode 100755
index 000000000..d9d6f6c13
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getconnectionrequest.md
@@ -0,0 +1,9 @@
+# GetConnectionRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getconnectionresponse.md b/sync-for-expenses/docs/models/operations/getconnectionresponse.md
new file mode 100755
index 000000000..32fb66433
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getconnectionresponse.md
@@ -0,0 +1,12 @@
+# GetConnectionResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getcustomerrequest.md b/sync-for-expenses/docs/models/operations/getcustomerrequest.md
new file mode 100755
index 000000000..ffdce6eec
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getcustomerrequest.md
@@ -0,0 +1,9 @@
+# GetCustomerRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `customer_id` | *str* | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getcustomerresponse.md b/sync-for-expenses/docs/models/operations/getcustomerresponse.md
new file mode 100755
index 000000000..2cf1387e8
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getcustomerresponse.md
@@ -0,0 +1,12 @@
+# GetCustomerResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `customer` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | Success |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getdatastatusrequest.md b/sync-for-expenses/docs/models/operations/getdatastatusrequest.md
new file mode 100755
index 000000000..8ee7b2510
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getdatastatusrequest.md
@@ -0,0 +1,8 @@
+# GetDataStatusRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getdatastatusresponse.md b/sync-for-expenses/docs/models/operations/getdatastatusresponse.md
new file mode 100755
index 000000000..9ffc60fec
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getdatastatusresponse.md
@@ -0,0 +1,12 @@
+# GetDataStatusResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `data_status_response` | dict[str, [shared.DataStatus](../../models/shared/datastatus.md)] | :heavy_minus_sign: | OK |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getpulloperationrequest.md b/sync-for-expenses/docs/models/operations/getpulloperationrequest.md
new file mode 100755
index 000000000..a965477f9
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getpulloperationrequest.md
@@ -0,0 +1,9 @@
+# GetPullOperationRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `dataset_id` | *str* | :heavy_check_mark: | Unique ID of a dataset or pull operation. | eaed9f0f-e77b-4bc9-a58f-ab8b4b99ab18 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getpulloperationresponse.md b/sync-for-expenses/docs/models/operations/getpulloperationresponse.md
new file mode 100755
index 000000000..1527d9f32
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getpulloperationresponse.md
@@ -0,0 +1,12 @@
+# GetPullOperationResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `pull_operation` | [Optional[shared.PullOperation]](../../models/shared/pulloperation.md) | :heavy_minus_sign: | OK |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getpushoperationrequest.md b/sync-for-expenses/docs/models/operations/getpushoperationrequest.md
new file mode 100755
index 000000000..8a7e2f877
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getpushoperationrequest.md
@@ -0,0 +1,9 @@
+# GetPushOperationRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `push_operation_key` | *str* | :heavy_check_mark: | Push operation key. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getpushoperationresponse.md b/sync-for-expenses/docs/models/operations/getpushoperationresponse.md
new file mode 100755
index 000000000..0477eb0ec
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getpushoperationresponse.md
@@ -0,0 +1,12 @@
+# GetPushOperationResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `push_operation` | [Optional[shared.PushOperation]](../../models/shared/pushoperation.md) | :heavy_minus_sign: | OK |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getsupplierrequest.md b/sync-for-expenses/docs/models/operations/getsupplierrequest.md
new file mode 100755
index 000000000..15a60b839
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getsupplierrequest.md
@@ -0,0 +1,9 @@
+# GetSupplierRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `supplier_id` | *str* | :heavy_check_mark: | Unique identifier for a supplier | 13d946f0-c5d5-42bc-b092-97ece17923ab |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getsupplierresponse.md b/sync-for-expenses/docs/models/operations/getsupplierresponse.md
new file mode 100755
index 000000000..298bff3cb
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/getsupplierresponse.md
@@ -0,0 +1,12 @@
+# GetSupplierResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
+| `supplier` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md b/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md
index 3f3853d84..b558229d9 100755
--- a/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md
+++ b/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md
@@ -9,4 +9,4 @@
| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
| `status_code` | *int* | :heavy_check_mark: | N/A |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
-| `transaction_metadata` | list[[shared.TransactionMetadata](../../models/shared/transactionmetadata.md)] | :heavy_minus_sign: | Success |
\ No newline at end of file
+| `transaction` | [Optional[shared.Transaction]](../../models/shared/transaction.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/initiatesyncrequest.md b/sync-for-expenses/docs/models/operations/initiatesyncrequest.md
new file mode 100755
index 000000000..7d2ea3dfc
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/initiatesyncrequest.md
@@ -0,0 +1,9 @@
+# InitiateSyncRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
+| `initiate_sync` | [Optional[shared.InitiateSync]](../../models/shared/initiatesync.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/intiatesyncresponse.md b/sync-for-expenses/docs/models/operations/initiatesyncresponse.md
similarity index 91%
rename from sync-for-expenses/docs/models/operations/intiatesyncresponse.md
rename to sync-for-expenses/docs/models/operations/initiatesyncresponse.md
index eb8656933..70fb53be6 100755
--- a/sync-for-expenses/docs/models/operations/intiatesyncresponse.md
+++ b/sync-for-expenses/docs/models/operations/initiatesyncresponse.md
@@ -1,12 +1,12 @@
-# IntiateSyncResponse
+# InitiateSyncResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `codat_error_message` | [Optional[shared.CodatErrorMessage]](../../models/shared/codaterrormessage.md) | :heavy_minus_sign: | If model is incorrect |
| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | If model is incorrect |
| `status_code` | *int* | :heavy_check_mark: | N/A |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
| `sync_initiated` | [Optional[shared.SyncInitiated]](../../models/shared/syncinitiated.md) | :heavy_minus_sign: | Returns the newly created SyncId |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listcompaniesrequest.md b/sync-for-expenses/docs/models/operations/listcompaniesrequest.md
new file mode 100755
index 000000000..8dfaf69d5
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listcompaniesrequest.md
@@ -0,0 +1,11 @@
+# ListCompaniesRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listcompaniesresponse.md b/sync-for-expenses/docs/models/operations/listcompaniesresponse.md
new file mode 100755
index 000000000..506ed1fa1
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listcompaniesresponse.md
@@ -0,0 +1,12 @@
+# ListCompaniesResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `companies` | [Optional[shared.Companies]](../../models/shared/companies.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listconnectionsrequest.md b/sync-for-expenses/docs/models/operations/listconnectionsrequest.md
new file mode 100755
index 000000000..1cdcf0879
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listconnectionsrequest.md
@@ -0,0 +1,12 @@
+# ListConnectionsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listconnectionsresponse.md b/sync-for-expenses/docs/models/operations/listconnectionsresponse.md
new file mode 100755
index 000000000..68f439c07
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listconnectionsresponse.md
@@ -0,0 +1,12 @@
+# ListConnectionsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `connections` | [Optional[shared.Connections]](../../models/shared/connections.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listcustomersrequest.md b/sync-for-expenses/docs/models/operations/listcustomersrequest.md
new file mode 100755
index 000000000..0549ffa6e
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listcustomersrequest.md
@@ -0,0 +1,12 @@
+# ListCustomersRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listcustomersresponse.md b/sync-for-expenses/docs/models/operations/listcustomersresponse.md
new file mode 100755
index 000000000..33e0103b6
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listcustomersresponse.md
@@ -0,0 +1,12 @@
+# ListCustomersResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `customers` | [Optional[shared.Customers]](../../models/shared/customers.md) | :heavy_minus_sign: | Success |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listpulloperationsrequest.md b/sync-for-expenses/docs/models/operations/listpulloperationsrequest.md
new file mode 100755
index 000000000..d5a4b553d
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listpulloperationsrequest.md
@@ -0,0 +1,12 @@
+# ListPullOperationsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md b/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md
new file mode 100755
index 000000000..23240bd20
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md
@@ -0,0 +1,12 @@
+# ListPullOperationsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed |
+| `pull_operations` | [Optional[shared.PullOperations]](../../models/shared/pulloperations.md) | :heavy_minus_sign: | OK |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listpushoperationsrequest.md b/sync-for-expenses/docs/models/operations/listpushoperationsrequest.md
new file mode 100755
index 000000000..bb6141c76
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listpushoperationsrequest.md
@@ -0,0 +1,12 @@
+# ListPushOperationsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md b/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md
new file mode 100755
index 000000000..db6720eea
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md
@@ -0,0 +1,12 @@
+# ListPushOperationsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed |
+| `push_operations` | [Optional[shared.PushOperations]](../../models/shared/pushoperations.md) | :heavy_minus_sign: | OK |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listsuppliersrequest.md b/sync-for-expenses/docs/models/operations/listsuppliersrequest.md
new file mode 100755
index 000000000..251721c9d
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listsuppliersrequest.md
@@ -0,0 +1,12 @@
+# ListSuppliersRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listsuppliersresponse.md b/sync-for-expenses/docs/models/operations/listsuppliersresponse.md
new file mode 100755
index 000000000..d0bc9c436
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/listsuppliersresponse.md
@@ -0,0 +1,12 @@
+# ListSuppliersResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
+| `suppliers` | [Optional[shared.Suppliers]](../../models/shared/suppliers.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md b/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md
index c127362d4..5dc686deb 100755
--- a/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md
+++ b/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
-| `content_type` | *str* | :heavy_check_mark: | N/A |
-| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
-| `status_code` | *int* | :heavy_check_mark: | N/A |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
-| `transaction_metadata_list` | [Optional[shared.TransactionMetadataList]](../../models/shared/transactionmetadatalist.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
+| `transactions` | [Optional[shared.Transactions]](../../models/shared/transactions.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/refreshalldatatypesrequest.md b/sync-for-expenses/docs/models/operations/refreshalldatatypesrequest.md
new file mode 100755
index 000000000..33fb640ed
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/refreshalldatatypesrequest.md
@@ -0,0 +1,8 @@
+# RefreshAllDataTypesRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md b/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md
new file mode 100755
index 000000000..22a543959
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md
@@ -0,0 +1,11 @@
+# RefreshAllDataTypesResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md b/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md
new file mode 100755
index 000000000..cbefc996f
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md
@@ -0,0 +1,10 @@
+# RefreshDataTypeRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *Optional[str]* | :heavy_minus_sign: | Optionally, provide a data connection id to only queue pull operations on that connection. | |
+| `data_type` | [shared.DataType](../../models/shared/datatype.md) | :heavy_check_mark: | The key of a Codat data type | invoices |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md b/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md
new file mode 100755
index 000000000..73215c3bd
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md
@@ -0,0 +1,12 @@
+# RefreshDataTypeResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `pull_operation` | [Optional[shared.PullOperation]](../../models/shared/pulloperation.md) | :heavy_minus_sign: | OK |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/savecompanyconfigurationrequest.md b/sync-for-expenses/docs/models/operations/setcompanyconfigurationrequest.md
similarity index 98%
rename from sync-for-expenses/docs/models/operations/savecompanyconfigurationrequest.md
rename to sync-for-expenses/docs/models/operations/setcompanyconfigurationrequest.md
index f2a7c4248..3d22e2535 100755
--- a/sync-for-expenses/docs/models/operations/savecompanyconfigurationrequest.md
+++ b/sync-for-expenses/docs/models/operations/setcompanyconfigurationrequest.md
@@ -1,4 +1,4 @@
-# SaveCompanyConfigurationRequest
+# SetCompanyConfigurationRequest
## Fields
diff --git a/sync-for-expenses/docs/models/operations/savecompanyconfigurationresponse.md b/sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md
similarity index 98%
rename from sync-for-expenses/docs/models/operations/savecompanyconfigurationresponse.md
rename to sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md
index cb2dad148..e8be6aa2b 100755
--- a/sync-for-expenses/docs/models/operations/savecompanyconfigurationresponse.md
+++ b/sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md
@@ -1,4 +1,4 @@
-# SaveCompanyConfigurationResponse
+# SetCompanyConfigurationResponse
## Fields
diff --git a/sync-for-expenses/docs/models/operations/uploadattachmentrequest.md b/sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md
similarity index 71%
rename from sync-for-expenses/docs/models/operations/uploadattachmentrequest.md
rename to sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md
index 3b35a7812..2ed1d78dc 100755
--- a/sync-for-expenses/docs/models/operations/uploadattachmentrequest.md
+++ b/sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md
@@ -1,11 +1,10 @@
-# UploadAttachmentRequest
+# UnlinkConnectionRequest
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
-| `request_body` | [Optional[UploadAttachmentRequestBody]](../../models/operations/uploadattachmentrequestbody.md) | :heavy_minus_sign: | N/A | |
+| `request_body` | [Optional[UnlinkConnectionRequestBody]](../../models/operations/unlinkconnectionrequestbody.md) | :heavy_minus_sign: | N/A | |
| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
-| `sync_id` | *str* | :heavy_check_mark: | Unique identifier for a sync. | 6fb40d5e-b13e-11ed-afa1-0242ac120002 |
-| `transaction_id` | *str* | :heavy_check_mark: | The unique identifier for your SMB's transaction. | 336694d8-2dca-4cb5-a28d-3ccb83e55eee |
\ No newline at end of file
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/unlinkconnectionrequestbody.md b/sync-for-expenses/docs/models/operations/unlinkconnectionrequestbody.md
new file mode 100755
index 000000000..276bf1330
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/unlinkconnectionrequestbody.md
@@ -0,0 +1,8 @@
+# UnlinkConnectionRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------ | ------------------ | ------------------ | ------------------ |
+| `status` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md b/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md
new file mode 100755
index 000000000..ced538908
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md
@@ -0,0 +1,12 @@
+# UnlinkConnectionResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updatecompanyrequest.md b/sync-for-expenses/docs/models/operations/updatecompanyrequest.md
new file mode 100755
index 000000000..697f00528
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updatecompanyrequest.md
@@ -0,0 +1,9 @@
+# UpdateCompanyRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `company_request_body` | [Optional[shared.CompanyRequestBody]](../../models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updatecompanyresponse.md b/sync-for-expenses/docs/models/operations/updatecompanyresponse.md
new file mode 100755
index 000000000..9b9c51eef
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updatecompanyresponse.md
@@ -0,0 +1,12 @@
+# UpdateCompanyResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updatecustomerrequest.md b/sync-for-expenses/docs/models/operations/updatecustomerrequest.md
new file mode 100755
index 000000000..a2c02f747
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updatecustomerrequest.md
@@ -0,0 +1,13 @@
+# UpdateCustomerRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `customer` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `customer_id` | *str* | :heavy_check_mark: | N/A | |
+| `force_update` | *Optional[bool]* | :heavy_minus_sign: | When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check. | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updatecustomerresponse.md b/sync-for-expenses/docs/models/operations/updatecustomerresponse.md
new file mode 100755
index 000000000..fd1d65882
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updatecustomerresponse.md
@@ -0,0 +1,12 @@
+# UpdateCustomerResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
+| `update_customer_response` | [Optional[shared.UpdateCustomerResponse]](../../models/shared/updatecustomerresponse.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updateexpensedatasetresponse.md b/sync-for-expenses/docs/models/operations/updateexpensedatasetresponse.md
deleted file mode 100755
index 14d1ac9bb..000000000
--- a/sync-for-expenses/docs/models/operations/updateexpensedatasetresponse.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# UpdateExpenseDatasetResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | N/A |
-| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
-| `status_code` | *int* | :heavy_check_mark: | N/A |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
-| `update_expense_dataset_202_application_json_object` | [Optional[UpdateExpenseDataset202ApplicationJSON]](../../models/operations/updateexpensedataset202applicationjson.md) | :heavy_minus_sign: | Accepted |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updateexpensedatasetrequest.md b/sync-for-expenses/docs/models/operations/updateexpensetransactionrequest.md
similarity index 98%
rename from sync-for-expenses/docs/models/operations/updateexpensedatasetrequest.md
rename to sync-for-expenses/docs/models/operations/updateexpensetransactionrequest.md
index 3bf50ad10..80118118a 100755
--- a/sync-for-expenses/docs/models/operations/updateexpensedatasetrequest.md
+++ b/sync-for-expenses/docs/models/operations/updateexpensetransactionrequest.md
@@ -1,4 +1,4 @@
-# UpdateExpenseDatasetRequest
+# UpdateExpenseTransactionRequest
## Fields
diff --git a/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md b/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md
new file mode 100755
index 000000000..14a7516c3
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md
@@ -0,0 +1,12 @@
+# UpdateExpenseTransactionResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
+| `update_expense_response` | [Optional[shared.UpdateExpenseResponse]](../../models/shared/updateexpenseresponse.md) | :heavy_minus_sign: | Accepted |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updatesupplierrequest.md b/sync-for-expenses/docs/models/operations/updatesupplierrequest.md
new file mode 100755
index 000000000..77a2e4ccd
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updatesupplierrequest.md
@@ -0,0 +1,13 @@
+# UpdateSupplierRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `supplier` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `force_update` | *Optional[bool]* | :heavy_minus_sign: | When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check. | |
+| `supplier_id` | *str* | :heavy_check_mark: | Unique identifier for a supplier | 13d946f0-c5d5-42bc-b092-97ece17923ab |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updatesupplierresponse.md b/sync-for-expenses/docs/models/operations/updatesupplierresponse.md
new file mode 100755
index 000000000..ac9a2fd4f
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/updatesupplierresponse.md
@@ -0,0 +1,12 @@
+# UpdateSupplierResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | N/A |
+| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. |
+| `status_code` | *int* | :heavy_check_mark: | N/A |
+| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A |
+| `update_supplier_response` | [Optional[shared.UpdateSupplierResponse]](../../models/shared/updatesupplierresponse.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md
new file mode 100755
index 000000000..ceed33314
--- /dev/null
+++ b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md
@@ -0,0 +1,11 @@
+# UploadExpenseAttachmentRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
+| `request_body` | [Optional[UploadExpenseAttachmentRequestBody]](../../models/operations/uploadexpenseattachmentrequestbody.md) | :heavy_minus_sign: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `sync_id` | *str* | :heavy_check_mark: | Unique identifier for a sync. | 6fb40d5e-b13e-11ed-afa1-0242ac120002 |
+| `transaction_id` | *str* | :heavy_check_mark: | The unique identifier for your SMB's transaction. | 336694d8-2dca-4cb5-a28d-3ccb83e55eee |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/uploadattachmentrequestbody.md b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequestbody.md
similarity index 90%
rename from sync-for-expenses/docs/models/operations/uploadattachmentrequestbody.md
rename to sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequestbody.md
index 54eb656dd..5c372515c 100755
--- a/sync-for-expenses/docs/models/operations/uploadattachmentrequestbody.md
+++ b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequestbody.md
@@ -1,4 +1,4 @@
-# UploadAttachmentRequestBody
+# UploadExpenseAttachmentRequestBody
## Fields
diff --git a/sync-for-expenses/docs/models/operations/uploadattachmentresponse.md b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md
similarity index 98%
rename from sync-for-expenses/docs/models/operations/uploadattachmentresponse.md
rename to sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md
index 6f073cade..13670407e 100755
--- a/sync-for-expenses/docs/models/operations/uploadattachmentresponse.md
+++ b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md
@@ -1,4 +1,4 @@
-# UploadAttachmentResponse
+# UploadExpenseAttachmentResponse
## Fields
diff --git a/sync-for-expenses/docs/models/shared/account.md b/sync-for-expenses/docs/models/shared/account.md
new file mode 100755
index 000000000..bb1d27e3d
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/account.md
@@ -0,0 +1,51 @@
+# Account
+
+> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.
+
+View the coverage for accounts in the Data coverage explorer.
+
+## Overview
+
+Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.
+
+The categories for an account include:
+ * Asset
+ * Expense
+ * Income
+ * Liability
+ * Equity.
+
+The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.
+
+At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.
+
+To determine the list of allowed categories for a specific integration, you can:
+- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).
+- Refer to the integration's own documentation.
+
+> **Accounts with no category**
+>
+> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.
+>
+> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports.
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
+| `current_balance` | *Optional[float]* | :heavy_minus_sign: | Current balance in the account. | 0 |
+| `description` | *Optional[str]* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. |
+| `fully_qualified_category` | *Optional[str]* | :heavy_minus_sign: | Full category of the account.
For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. | Asset.Current |
+| `fully_qualified_name` | *Optional[str]* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e |
+| `is_bank_account` | *Optional[bool]* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | |
+| `metadata` | [Optional[AccountMetadata]](../../models/shared/accountmetadata.md) | :heavy_minus_sign: | N/A | |
+| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
+| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the account. | Accounts Receivable |
+| `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. | 610 |
+| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
+| `status` | [Optional[AccountStatus]](../../models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active |
+| `type` | [Optional[AccountType]](../../models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset |
+| `valid_datatype_links` | list[[AccountValidDataTypeLinks](../../models/shared/accountvaliddatatypelinks.md)] | :heavy_minus_sign: | The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/accounting-api#/schemas/ValidDataTypeLinks). | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/accountmetadata.md b/sync-for-expenses/docs/models/shared/accountmetadata.md
new file mode 100755
index 000000000..fa17ac01d
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/accountmetadata.md
@@ -0,0 +1,8 @@
+# AccountMetadata
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| `is_deleted` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/accountstatus.md b/sync-for-expenses/docs/models/shared/accountstatus.md
new file mode 100755
index 000000000..bd4cf2f26
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/accountstatus.md
@@ -0,0 +1,13 @@
+# AccountStatus
+
+Status of the account
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `UNKNOWN` | Unknown |
+| `ACTIVE` | Active |
+| `ARCHIVED` | Archived |
+| `PENDING` | Pending |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/accounttype.md b/sync-for-expenses/docs/models/shared/accounttype.md
new file mode 100755
index 000000000..f9c49f991
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/accounttype.md
@@ -0,0 +1,15 @@
+# AccountType
+
+Type of account
+
+
+## Values
+
+| Name | Value |
+| ----------- | ----------- |
+| `UNKNOWN` | Unknown |
+| `ASSET` | Asset |
+| `EXPENSE` | Expense |
+| `INCOME` | Income |
+| `LIABILITY` | Liability |
+| `EQUITY` | Equity |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/accountvaliddatatypelinks.md b/sync-for-expenses/docs/models/shared/accountvaliddatatypelinks.md
new file mode 100755
index 000000000..682687d7a
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/accountvaliddatatypelinks.md
@@ -0,0 +1,50 @@
+# AccountValidDataTypeLinks
+
+When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data.
+
+For example, `validDatatypeLinks` might indicate the following references:
+
+- Which tax rates are valid to use on the line item of a bill.
+- Which items can be used when creating an invoice.
+
+You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example.
+
+## `validDatatypeLinks` example
+
+The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error.
+
+```json validDatatypeLinks for an account
+{
+ "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4",
+ "nominalCode": "090",
+ "name": "Business Bank Account",
+ #...
+ "validDatatypeLinks": [
+ {
+ "property": "Id",
+ "links": [
+ "Payment.AccountRef.Id",
+ "BillPayment.AccountRef.Id",
+ "DirectIncome.LineItems.AccountRef.Id",
+ "DirectCost.LineItems.AccountRef.Id"
+ ]
+ }
+ ]
+ }
+```
+
+
+
+## Support for `validDatatypeLinks`
+
+Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations.
+
+If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
+| `links` | list[*str*] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. |
+| `property` | *Optional[str]* | :heavy_minus_sign: | The property from the account that can be linked. |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/codaterrormessage.md b/sync-for-expenses/docs/models/shared/codaterrormessage.md
deleted file mode 100755
index 367e48968..000000000
--- a/sync-for-expenses/docs/models/shared/codaterrormessage.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# CodatErrorMessage
-
-If model is incorrect
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
-| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A |
-| `error` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `inner` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `service` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A |
-| `validation` | [Optional[CodatErrorMessageValidation]](../../models/shared/codaterrormessagevalidation.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/codaterrormessagevalidation.md b/sync-for-expenses/docs/models/shared/codaterrormessagevalidation.md
deleted file mode 100755
index a928cfa12..000000000
--- a/sync-for-expenses/docs/models/shared/codaterrormessagevalidation.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# CodatErrorMessageValidation
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
-| `errors` | list[[CodatErrorMessageValidationErrors](../../models/shared/codaterrormessagevalidationerrors.md)] | :heavy_minus_sign: | N/A |
-| `has_errors` | *Optional[bool]* | :heavy_minus_sign: | N/A |
-| `has_internals` | *Optional[bool]* | :heavy_minus_sign: | N/A |
-| `has_warnings` | *Optional[bool]* | :heavy_minus_sign: | N/A |
-| `internals` | list[[CodatErrorMessageValidationInternals](../../models/shared/codaterrormessagevalidationinternals.md)] | :heavy_minus_sign: | N/A |
-| `warnings` | list[[CodatErrorMessageValidationWarnings](../../models/shared/codaterrormessagevalidationwarnings.md)] | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/codaterrormessagevalidationinternals.md b/sync-for-expenses/docs/models/shared/codaterrormessagevalidationinternals.md
deleted file mode 100755
index 3918662e3..000000000
--- a/sync-for-expenses/docs/models/shared/codaterrormessagevalidationinternals.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CodatErrorMessageValidationInternals
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------ | ------------------ | ------------------ | ------------------ |
-| `item_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `message` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `rule_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `validator_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/codaterrormessagevalidationwarnings.md b/sync-for-expenses/docs/models/shared/codaterrormessagevalidationwarnings.md
deleted file mode 100755
index 16ca83f33..000000000
--- a/sync-for-expenses/docs/models/shared/codaterrormessagevalidationwarnings.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CodatErrorMessageValidationWarnings
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------ | ------------------ | ------------------ | ------------------ |
-| `item_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `message` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `rule_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `validator_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/companies.md b/sync-for-expenses/docs/models/shared/companies.md
new file mode 100755
index 000000000..621899fbb
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/companies.md
@@ -0,0 +1,14 @@
+# Companies
+
+OK
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/company.md b/sync-for-expenses/docs/models/shared/company.md
new file mode 100755
index 000000000..ca00f771b
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/company.md
@@ -0,0 +1,22 @@
+# Company
+
+In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.
+
+Typically each company is one of your customers.
+
+When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company.
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `created` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `created_by_user_name` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `data_connections` | list[[Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | |
+| `description` | *Optional[str]* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. |
+| `id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `name` | *str* | :heavy_check_mark: | The name of the company | Codat Ltd. |
+| ~~`platform`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | Xero |
+| `redirect` | *str* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/companyrequestbody.md b/sync-for-expenses/docs/models/shared/companyrequestbody.md
new file mode 100755
index 000000000..339e136ce
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/companyrequestbody.md
@@ -0,0 +1,9 @@
+# CompanyRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
+| `description` | *Optional[str]* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. |
+| `name` | *str* | :heavy_check_mark: | Name of company being connected. | Bank of Dave |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/dataconnection.md b/sync-for-expenses/docs/models/shared/connection.md
similarity index 99%
rename from sync-for-expenses/docs/models/shared/dataconnection.md
rename to sync-for-expenses/docs/models/shared/connection.md
index 08073026c..6666ac861 100755
--- a/sync-for-expenses/docs/models/shared/dataconnection.md
+++ b/sync-for-expenses/docs/models/shared/connection.md
@@ -1,6 +1,6 @@
-# DataConnection
+# Connection
-A connection represents a [company's](https://docs.codat.io/codat-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
+A connection represents a [company's](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:
@@ -27,5 +27,5 @@ Before you can use a data connection to pull or push data, the company must gran
| `link_url` | *str* | :heavy_check_mark: | N/A | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start |
| `platform_name` | *str* | :heavy_check_mark: | N/A | |
| `source_id` | *str* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 |
-| `source_type` | [DataConnectionSourceType](../../models/shared/dataconnectionsourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting |
+| `source_type` | [ConnectionSourceType](../../models/shared/connectionsourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting |
| `status` | [DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/connections.md b/sync-for-expenses/docs/models/shared/connections.md
new file mode 100755
index 000000000..ba1135508
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/connections.md
@@ -0,0 +1,14 @@
+# Connections
+
+OK
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/dataconnectionsourcetype.md b/sync-for-expenses/docs/models/shared/connectionsourcetype.md
similarity index 91%
rename from sync-for-expenses/docs/models/shared/dataconnectionsourcetype.md
rename to sync-for-expenses/docs/models/shared/connectionsourcetype.md
index cff81e5bf..85e691690 100755
--- a/sync-for-expenses/docs/models/shared/dataconnectionsourcetype.md
+++ b/sync-for-expenses/docs/models/shared/connectionsourcetype.md
@@ -1,4 +1,4 @@
-# DataConnectionSourceType
+# ConnectionSourceType
The type of platform of the connection.
diff --git a/sync-for-expenses/docs/models/shared/createaccountresponse.md b/sync-for-expenses/docs/models/shared/createaccountresponse.md
new file mode 100755
index 000000000..5c85a35eb
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/createaccountresponse.md
@@ -0,0 +1,23 @@
+# CreateAccountResponse
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `data` | [Optional[Account]](../../models/shared/account.md) | :heavy_minus_sign: | > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.
View the coverage for accounts in the Data coverage explorer.
## Overview
Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.
The categories for an account include:
* Asset
* Expense
* Income
* Liability
* Equity.
The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.
At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.
To determine the list of allowed categories for a specific integration, you can:
- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).
- Refer to the integration's own documentation.
> **Accounts with no category**
>
> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.
>
> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. | |
+| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | |
+| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | |
+| `status_code` | *int* | :heavy_check_mark: | N/A | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
+| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/createcustomerresponse.md b/sync-for-expenses/docs/models/shared/createcustomerresponse.md
new file mode 100755
index 000000000..8c95f641d
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/createcustomerresponse.md
@@ -0,0 +1,23 @@
+# CreateCustomerResponse
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `data` | [Optional[Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | N/A | |
+| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | |
+| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | |
+| `status_code` | *int* | :heavy_check_mark: | N/A | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
+| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/createsupplierresponse.md b/sync-for-expenses/docs/models/shared/createsupplierresponse.md
new file mode 100755
index 000000000..e99c86e0b
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/createsupplierresponse.md
@@ -0,0 +1,23 @@
+# CreateSupplierResponse
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `data` | [Optional[Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | N/A | |
+| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | |
+| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | |
+| `status_code` | *int* | :heavy_check_mark: | N/A | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
+| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/customer.md b/sync-for-expenses/docs/models/shared/customer.md
index 7ccd3cf07..f17ce0874 100755
--- a/sync-for-expenses/docs/models/shared/customer.md
+++ b/sync-for-expenses/docs/models/shared/customer.md
@@ -1,5 +1,7 @@
# Customer
+Success
+
## Fields
diff --git a/sync-for-expenses/docs/models/shared/customers.md b/sync-for-expenses/docs/models/shared/customers.md
new file mode 100755
index 000000000..c71d6dc21
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/customers.md
@@ -0,0 +1,14 @@
+# Customers
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[Customer](../../models/shared/customer.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/datastatus.md b/sync-for-expenses/docs/models/shared/datastatus.md
new file mode 100755
index 000000000..389c2cf54
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/datastatus.md
@@ -0,0 +1,14 @@
+# DataStatus
+
+Describes the state of data in the Codat cache for a company and data type
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `current_status` | *str* | :heavy_check_mark: | N/A | |
+| `data_type` | *str* | :heavy_check_mark: | N/A | |
+| `last_successful_sync` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `latest_successful_sync_id` | *Optional[str]* | :heavy_minus_sign: | N/A | 8220fc90-55b6-47bc-9417-48ac6ea93101 |
+| `latest_sync_id` | *Optional[str]* | :heavy_minus_sign: | N/A | ad474a37-2003-478e-baee-9af9f1ec2fe3 |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/datatype.md b/sync-for-expenses/docs/models/shared/datatype.md
new file mode 100755
index 000000000..0e358dc70
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/datatype.md
@@ -0,0 +1,51 @@
+# DataType
+
+Available Data types
+
+
+## Values
+
+| Name | Value |
+| -------------------------------- | -------------------------------- |
+| `ACCOUNT_TRANSACTIONS` | accountTransactions |
+| `BALANCE_SHEET` | balanceSheet |
+| `BANK_ACCOUNTS` | bankAccounts |
+| `BANK_TRANSACTIONS` | bankTransactions |
+| `BILL_CREDIT_NOTES` | billCreditNotes |
+| `BILL_PAYMENTS` | billPayments |
+| `BILLS` | bills |
+| `CASH_FLOW_STATEMENT` | cashFlowStatement |
+| `CHART_OF_ACCOUNTS` | chartOfAccounts |
+| `COMPANY` | company |
+| `CREDIT_NOTES` | creditNotes |
+| `CUSTOMERS` | customers |
+| `DIRECT_COSTS` | directCosts |
+| `DIRECT_INCOMES` | directIncomes |
+| `INVOICES` | invoices |
+| `ITEMS` | items |
+| `JOURNAL_ENTRIES` | journalEntries |
+| `JOURNALS` | journals |
+| `PAYMENT_METHODS` | paymentMethods |
+| `PAYMENTS` | payments |
+| `PROFIT_AND_LOSS` | profitAndLoss |
+| `PURCHASE_ORDERS` | purchaseOrders |
+| `SALES_ORDERS` | salesOrders |
+| `SUPPLIERS` | suppliers |
+| `TAX_RATES` | taxRates |
+| `TRACKING_CATEGORIES` | trackingCategories |
+| `TRANSFERS` | transfers |
+| `BANKING_ACCOUNT_BALANCES` | banking-accountBalances |
+| `BANKING_ACCOUNTS` | banking-accounts |
+| `BANKING_TRANSACTION_CATEGORIES` | banking-transactionCategories |
+| `BANKING_TRANSACTIONS` | banking-transactions |
+| `COMMERCE_COMPANY_INFO` | commerce-companyInfo |
+| `COMMERCE_CUSTOMERS` | commerce-customers |
+| `COMMERCE_DISPUTES` | commerce-disputes |
+| `COMMERCE_LOCATIONS` | commerce-locations |
+| `COMMERCE_ORDERS` | commerce-orders |
+| `COMMERCE_PAYMENT_METHODS` | commerce-paymentMethods |
+| `COMMERCE_PAYMENTS` | commerce-payments |
+| `COMMERCE_PRODUCT_CATEGORIES` | commerce-productCategories |
+| `COMMERCE_PRODUCTS` | commerce-products |
+| `COMMERCE_TAX_COMPONENTS` | commerce-taxComponents |
+| `COMMERCE_TRANSACTIONS` | commerce-transactions |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/errormessage.md b/sync-for-expenses/docs/models/shared/errormessage.md
index 9d49473cf..b32400646 100755
--- a/sync-for-expenses/docs/models/shared/errormessage.md
+++ b/sync-for-expenses/docs/models/shared/errormessage.md
@@ -1,6 +1,6 @@
# ErrorMessage
-Your API request was not properly authorized.
+Your `query` parameter was not correctly formed
## Fields
diff --git a/sync-for-expenses/docs/models/shared/expensetransaction.md b/sync-for-expenses/docs/models/shared/expensetransaction.md
index 898c49c58..db0cdd865 100755
--- a/sync-for-expenses/docs/models/shared/expensetransaction.md
+++ b/sync-for-expenses/docs/models/shared/expensetransaction.md
@@ -5,6 +5,7 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `bank_account_ref` | [Optional[ExpenseTransactionBankAccountReference]](../../models/shared/expensetransactionbankaccountreference.md) | :heavy_minus_sign: | N/A | |
| `contact_ref` | [Optional[ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | N/A | |
| `currency` | *str* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP |
| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.
Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).
For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.
## Examples with base currency of GBP
\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|
## Examples with base currency of USD
\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | |
diff --git a/sync-for-expenses/docs/models/shared/expensetransactionbankaccountreference.md b/sync-for-expenses/docs/models/shared/expensetransactionbankaccountreference.md
new file mode 100755
index 000000000..588260c71
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/expensetransactionbankaccountreference.md
@@ -0,0 +1,8 @@
+# ExpenseTransactionBankAccountReference
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the bank account. | 787dfb37-5707-4dc0-8a86-8d74e4cc78ea |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/expensetype.md b/sync-for-expenses/docs/models/shared/expensetype.md
deleted file mode 100755
index d19a826f7..000000000
--- a/sync-for-expenses/docs/models/shared/expensetype.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# ExpenseType
-
-The type of transaction.
-
-
-## Values
-
-| Name | Value |
-| ---------------- | ---------------- |
-| `PAYMENT` | Payment |
-| `REFUND` | Refund |
-| `REWARD` | Reward |
-| `CHARGEBACK` | Chargeback |
-| `TRANSFER_IN` | TransferIn |
-| `TRANSFER_OUT` | TransferOut |
-| `ADJUSTMENT_IN` | AdjustmentIn |
-| `ADJUSTMENT_OUT` | AdjustmentOut |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/hallink.md b/sync-for-expenses/docs/models/shared/halref.md
similarity index 96%
rename from sync-for-expenses/docs/models/shared/hallink.md
rename to sync-for-expenses/docs/models/shared/halref.md
index 9b48e17dc..fef2ab2fc 100755
--- a/sync-for-expenses/docs/models/shared/hallink.md
+++ b/sync-for-expenses/docs/models/shared/halref.md
@@ -1,4 +1,4 @@
-# HalLink
+# HalRef
## Fields
diff --git a/sync-for-expenses/docs/models/shared/postsync.md b/sync-for-expenses/docs/models/shared/initiatesync.md
similarity index 94%
rename from sync-for-expenses/docs/models/shared/postsync.md
rename to sync-for-expenses/docs/models/shared/initiatesync.md
index 42a7749f0..53d4ad7df 100755
--- a/sync-for-expenses/docs/models/shared/postsync.md
+++ b/sync-for-expenses/docs/models/shared/initiatesync.md
@@ -1,4 +1,4 @@
-# PostSync
+# InitiateSync
## Fields
diff --git a/sync-for-expenses/docs/models/shared/links.md b/sync-for-expenses/docs/models/shared/links.md
new file mode 100755
index 000000000..7aad1ea5d
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/links.md
@@ -0,0 +1,11 @@
+# Links
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
+| `current` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A |
+| `next` | [Optional[HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A |
+| `previous` | [Optional[HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A |
+| `self_` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pulloperation.md b/sync-for-expenses/docs/models/shared/pulloperation.md
new file mode 100755
index 000000000..a4f6d0c4b
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pulloperation.md
@@ -0,0 +1,19 @@
+# PullOperation
+
+Information about a queued, in progress or completed pull operation.
+*Formally called `dataset`*
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | N/A | 22ece347-e5f6-4896-95e0-35a4c7f17023 |
+| `connection_id` | *str* | :heavy_check_mark: | N/A | 50830828-7d39-4367-b0eb-5ddb2de5faa5 |
+| `data_type` | *str* | :heavy_check_mark: | N/A | |
+| `id` | *str* | :heavy_check_mark: | N/A | 943accd0-4247-42d8-865b-363c8629e1da |
+| `is_completed` | *bool* | :heavy_check_mark: | N/A | |
+| `is_errored` | *bool* | :heavy_check_mark: | N/A | |
+| `progress` | *int* | :heavy_check_mark: | N/A | |
+| `requested` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PullOperationStatus](../../models/shared/pulloperationstatus.md) | :heavy_check_mark: | N/A | Complete |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pulloperations.md b/sync-for-expenses/docs/models/shared/pulloperations.md
new file mode 100755
index 000000000..497d66e3f
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pulloperations.md
@@ -0,0 +1,14 @@
+# PullOperations
+
+OK
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[PullOperation](../../models/shared/pulloperation.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pulloperationstatus.md b/sync-for-expenses/docs/models/shared/pulloperationstatus.md
new file mode 100755
index 000000000..12b8f9fd5
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pulloperationstatus.md
@@ -0,0 +1,30 @@
+# PullOperationStatus
+
+
+## Values
+
+| Name | Value |
+| ---------------------- | ---------------------- |
+| `INITIAL` | Initial |
+| `QUEUED` | Queued |
+| `FETCHING` | Fetching |
+| `MAP_QUEUED` | MapQueued |
+| `MAPPING` | Mapping |
+| `COMPLETE` | Complete |
+| `FETCH_ERROR` | FetchError |
+| `MAP_ERROR` | MapError |
+| `INTERNAL_ERROR` | InternalError |
+| `PROCESSING_QUEUED` | ProcessingQueued |
+| `PROCESSING` | Processing |
+| `PROCESSING_ERROR` | ProcessingError |
+| `VALIDATION_QUEUED` | ValidationQueued |
+| `VALIDATING` | Validating |
+| `VALIDATION_ERROR` | ValidationError |
+| `AUTH_ERROR` | AuthError |
+| `CANCELLED` | Cancelled |
+| `ROUTING` | Routing |
+| `ROUTING_ERROR` | RoutingError |
+| `NOT_SUPPORTED` | NotSupported |
+| `RATE_LIMIT_ERROR` | RateLimitError |
+| `PERMISSIONS_ERROR` | PermissionsError |
+| `PREREQUISITE_NOT_MET` | PrerequisiteNotMet |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pushchangetype.md b/sync-for-expenses/docs/models/shared/pushchangetype.md
new file mode 100755
index 000000000..4818f5d2a
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pushchangetype.md
@@ -0,0 +1,12 @@
+# PushChangeType
+
+
+## Values
+
+| Name | Value |
+| --------------------- | --------------------- |
+| `UNKNOWN` | Unknown |
+| `CREATED` | Created |
+| `MODIFIED` | Modified |
+| `DELETED` | Deleted |
+| `ATTACHMENT_UPLOADED` | AttachmentUploaded |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pushoperation.md b/sync-for-expenses/docs/models/shared/pushoperation.md
new file mode 100755
index 000000000..b90de2409
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pushoperation.md
@@ -0,0 +1,22 @@
+# PushOperation
+
+OK
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | |
+| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | |
+| `status_code` | *int* | :heavy_check_mark: | N/A | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
+| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pushoperationchange.md b/sync-for-expenses/docs/models/shared/pushoperationchange.md
new file mode 100755
index 000000000..b57a9c8b9
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pushoperationchange.md
@@ -0,0 +1,10 @@
+# PushOperationChange
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
+| `attachment_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `record_ref` | [Optional[PushOperationRef]](../../models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A |
+| `type` | [Optional[PushChangeType]](../../models/shared/pushchangetype.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pushoperationref.md b/sync-for-expenses/docs/models/shared/pushoperationref.md
new file mode 100755
index 000000000..10503c8ee
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pushoperationref.md
@@ -0,0 +1,9 @@
+# PushOperationRef
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pushoperations.md b/sync-for-expenses/docs/models/shared/pushoperations.md
new file mode 100755
index 000000000..4967d37e5
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pushoperations.md
@@ -0,0 +1,14 @@
+# PushOperations
+
+OK
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/pushoperationstatus.md b/sync-for-expenses/docs/models/shared/pushoperationstatus.md
new file mode 100755
index 000000000..4125ba6a3
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/pushoperationstatus.md
@@ -0,0 +1,13 @@
+# PushOperationStatus
+
+The status of the push operation.
+
+
+## Values
+
+| Name | Value |
+| ----------- | ----------- |
+| `PENDING` | Pending |
+| `FAILED` | Failed |
+| `SUCCESS` | Success |
+| `TIMED_OUT` | TimedOut |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/supplier.md b/sync-for-expenses/docs/models/shared/supplier.md
index 5131731ce..376193871 100755
--- a/sync-for-expenses/docs/models/shared/supplier.md
+++ b/sync-for-expenses/docs/models/shared/supplier.md
@@ -1,5 +1,7 @@
# Supplier
+Success
+
## Fields
diff --git a/sync-for-expenses/docs/models/shared/suppliers.md b/sync-for-expenses/docs/models/shared/suppliers.md
new file mode 100755
index 000000000..88c7249aa
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/suppliers.md
@@ -0,0 +1,14 @@
+# Suppliers
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[Supplier](../../models/shared/supplier.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/transactionmetadata.md b/sync-for-expenses/docs/models/shared/transaction.md
similarity index 99%
rename from sync-for-expenses/docs/models/shared/transactionmetadata.md
rename to sync-for-expenses/docs/models/shared/transaction.md
index 569dd95f0..cf2d19802 100755
--- a/sync-for-expenses/docs/models/shared/transactionmetadata.md
+++ b/sync-for-expenses/docs/models/shared/transaction.md
@@ -1,4 +1,6 @@
-# TransactionMetadata
+# Transaction
+
+Success
## Fields
diff --git a/sync-for-expenses/docs/models/shared/transactionmetadatalist.md b/sync-for-expenses/docs/models/shared/transactionmetadatalist.md
deleted file mode 100755
index 5b5a46b4b..000000000
--- a/sync-for-expenses/docs/models/shared/transactionmetadatalist.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# TransactionMetadataList
-
-Success
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| `links` | [TransactionMetadataListLinks](../../models/shared/transactionmetadatalistlinks.md) | :heavy_check_mark: | N/A |
-| `page_number` | *int* | :heavy_check_mark: | N/A |
-| `page_size` | *int* | :heavy_check_mark: | N/A |
-| `results` | list[[TransactionMetadata](../../models/shared/transactionmetadata.md)] | :heavy_minus_sign: | N/A |
-| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/transactionmetadatalistlinks.md b/sync-for-expenses/docs/models/shared/transactionmetadatalistlinks.md
deleted file mode 100755
index f92e48874..000000000
--- a/sync-for-expenses/docs/models/shared/transactionmetadatalistlinks.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# TransactionMetadataListLinks
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
-| `current` | [HalLink](../../models/shared/hallink.md) | :heavy_check_mark: | N/A |
-| `next` | [Optional[HalLink]](../../models/shared/hallink.md) | :heavy_minus_sign: | N/A |
-| `previous` | [Optional[HalLink]](../../models/shared/hallink.md) | :heavy_minus_sign: | N/A |
-| `self_` | [HalLink](../../models/shared/hallink.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/transactions.md b/sync-for-expenses/docs/models/shared/transactions.md
new file mode 100755
index 000000000..703ac0c4b
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/transactions.md
@@ -0,0 +1,14 @@
+# Transactions
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
+| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A |
+| `page_number` | *int* | :heavy_check_mark: | N/A |
+| `page_size` | *int* | :heavy_check_mark: | N/A |
+| `results` | list[[Transaction](../../models/shared/transaction.md)] | :heavy_minus_sign: | N/A |
+| `total_results` | *int* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/updatecustomerresponse.md b/sync-for-expenses/docs/models/shared/updatecustomerresponse.md
new file mode 100755
index 000000000..be0dd843f
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/updatecustomerresponse.md
@@ -0,0 +1,23 @@
+# UpdateCustomerResponse
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `data` | [Optional[Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | N/A | |
+| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | |
+| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | |
+| `status_code` | *int* | :heavy_check_mark: | N/A | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
+| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/updateexpenserequest.md b/sync-for-expenses/docs/models/shared/updateexpenserequest.md
index 3e53584c0..c7c6dcc21 100755
--- a/sync-for-expenses/docs/models/shared/updateexpenserequest.md
+++ b/sync-for-expenses/docs/models/shared/updateexpenserequest.md
@@ -5,6 +5,7 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `bank_account_ref` | [Optional[UpdateExpenseRequestBankAccountReference]](../../models/shared/updateexpenserequestbankaccountreference.md) | :heavy_minus_sign: | N/A | |
| `contact_ref` | [Optional[ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | N/A | |
| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency the transaction was recorded in. | GBP |
| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.
Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).
For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.
## Examples with base currency of GBP
\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|
## Examples with base currency of USD
\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | |
@@ -12,4 +13,4 @@
| `lines` | list[[ExpenseTransactionLine](../../models/shared/expensetransactionline.md)] | :heavy_minus_sign: | Array of transaction lines. | |
| `merchant_name` | *Optional[str]* | :heavy_minus_sign: | Name of the merchant where the purchase took place | Amazon UK |
| `notes` | *Optional[str]* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 |
-| `type` | [ExpenseType](../../models/shared/expensetype.md) | :heavy_check_mark: | The type of transaction. | Payment |
\ No newline at end of file
+| `type` | *Any* | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/updateexpenserequestbankaccountreference.md b/sync-for-expenses/docs/models/shared/updateexpenserequestbankaccountreference.md
new file mode 100755
index 000000000..17f0eb4dd
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/updateexpenserequestbankaccountreference.md
@@ -0,0 +1,8 @@
+# UpdateExpenseRequestBankAccountReference
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the bank account. | 787dfb37-5707-4dc0-8a86-8d74e4cc78ea |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/operations/updateexpensedataset202applicationjson.md b/sync-for-expenses/docs/models/shared/updateexpenseresponse.md
similarity index 87%
rename from sync-for-expenses/docs/models/operations/updateexpensedataset202applicationjson.md
rename to sync-for-expenses/docs/models/shared/updateexpenseresponse.md
index 0cafdc3ba..5ed19a166 100755
--- a/sync-for-expenses/docs/models/operations/updateexpensedataset202applicationjson.md
+++ b/sync-for-expenses/docs/models/shared/updateexpenseresponse.md
@@ -1,4 +1,4 @@
-# UpdateExpenseDataset202ApplicationJSON
+# UpdateExpenseResponse
Accepted
diff --git a/sync-for-expenses/docs/models/shared/updatesupplierresponse.md b/sync-for-expenses/docs/models/shared/updatesupplierresponse.md
new file mode 100755
index 000000000..9ecdcf0ea
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/updatesupplierresponse.md
@@ -0,0 +1,23 @@
+# UpdateSupplierResponse
+
+Success
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `data` | [Optional[Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | N/A | |
+| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | |
+| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
+| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | |
+| `status_code` | *int* | :heavy_check_mark: | N/A | |
+| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | |
+| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | |
+| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/validation.md b/sync-for-expenses/docs/models/shared/validation.md
new file mode 100755
index 000000000..196cb46c2
--- /dev/null
+++ b/sync-for-expenses/docs/models/shared/validation.md
@@ -0,0 +1,11 @@
+# Validation
+
+A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
+| `errors` | list[[ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A |
+| `warnings` | list[[ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/models/shared/codaterrormessagevalidationerrors.md b/sync-for-expenses/docs/models/shared/validationitem.md
similarity index 78%
rename from sync-for-expenses/docs/models/shared/codaterrormessagevalidationerrors.md
rename to sync-for-expenses/docs/models/shared/validationitem.md
index 86e60c1fd..f3fb8b302 100755
--- a/sync-for-expenses/docs/models/shared/codaterrormessagevalidationerrors.md
+++ b/sync-for-expenses/docs/models/shared/validationitem.md
@@ -1,4 +1,4 @@
-# CodatErrorMessageValidationErrors
+# ValidationItem
## Fields
@@ -7,5 +7,4 @@
| ------------------ | ------------------ | ------------------ | ------------------ |
| `item_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `message` | *Optional[str]* | :heavy_minus_sign: | N/A |
-| `rule_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `validator_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-expenses/docs/sdks/accounts/README.md b/sync-for-expenses/docs/sdks/accounts/README.md
new file mode 100755
index 000000000..c1d486188
--- /dev/null
+++ b/sync-for-expenses/docs/sdks/accounts/README.md
@@ -0,0 +1,94 @@
+# accounts
+
+## Overview
+
+Accounts
+
+### Available Operations
+
+* [create](#create) - Create account
+
+## create
+
+The *Create account* endpoint creates a new [account](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection.
+
+[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions.
+
+**Integration-specific behaviour**
+
+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).
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account.
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.CreateAccountRequest(
+ account=shared.Account(
+ currency='USD',
+ current_balance=0,
+ description='Invoices the business has issued but has not yet collected payment on.',
+ fully_qualified_category='Asset.Current',
+ fully_qualified_name='Fixed Asset',
+ id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e',
+ is_bank_account=False,
+ metadata=shared.AccountMetadata(
+ is_deleted=False,
+ ),
+ modified_date='2022-10-23T00:00:00.000Z',
+ name='Accounts Receivable',
+ nominal_code='610',
+ source_modified_date='2022-10-23T00:00:00.000Z',
+ status=shared.AccountStatus.ACTIVE,
+ type=shared.AccountType.ASSET,
+ valid_datatype_links=[
+ shared.AccountValidDataTypeLinks(
+ links=[
+ 'nisi',
+ 'recusandae',
+ 'temporibus',
+ ],
+ property='ab',
+ ),
+ shared.AccountValidDataTypeLinks(
+ links=[
+ 'veritatis',
+ 'deserunt',
+ ],
+ property='perferendis',
+ ),
+ ],
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ timeout_in_minutes=368241,
+)
+
+res = s.accounts.create(req)
+
+if res.create_account_response is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.CreateAccountRequest](../../models/operations/createaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.CreateAccountResponse](../../models/operations/createaccountresponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md
index 186d2e551..134232b61 100755
--- a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md
+++ b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md
@@ -2,12 +2,17 @@
## Overview
-Sync for Expenses API: The API for Sync for Expenses.
-Sync for Expenses is an API and a set of supporting tools. It has been built to enable corporate card and expense management platforms to provide high-quality integrations with multiple accounting platforms through a standardized API.
+Sync for Expenses: The API for Sync for Expenses.
+
+Sync for Expenses is an API and a set of supporting tools. It has been built to
+enable corporate card and expense management platforms to provide high-quality
+integrations with multiple accounting platforms through a standardized API.
[Read more...](https://docs.codat.io/sync-for-expenses/overview)
[See our OpenAPI spec](https://github.com/codatio/oas)
+
+
### Available Operations
diff --git a/sync-for-expenses/docs/sdks/companies/README.md b/sync-for-expenses/docs/sdks/companies/README.md
new file mode 100755
index 000000000..d5211f8b6
--- /dev/null
+++ b/sync-for-expenses/docs/sdks/companies/README.md
@@ -0,0 +1,221 @@
+# companies
+
+## Overview
+
+Create and manage your Codat companies.
+
+### Available Operations
+
+* [create](#create) - Create company
+* [delete](#delete) - Delete a company
+* [get](#get) - Get company
+* [list](#list) - List companies
+* [update](#update) - Update company
+
+## create
+
+Creates a new company that can be used to assign connections to.
+
+If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.
+
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = shared.CompanyRequestBody(
+ description='Requested early access to the new financing scheme.',
+ name='Bank of Dave',
+)
+
+res = s.companies.create(req)
+
+if res.company is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
+| `request` | [shared.CompanyRequestBody](../../models/shared/companyrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.CreateCompanyResponse](../../models/operations/createcompanyresponse.md)**
+
+
+## delete
+
+
+Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.DeleteCompanyRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.companies.delete(req)
+
+if res.status_code == 200:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.DeleteCompanyRequest](../../models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.DeleteCompanyResponse](../../models/operations/deletecompanyresponse.md)**
+
+
+## get
+
+Returns the company for a valid identifier. If the identifier is for a deleted company, a not found response is returned.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetCompanyRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.companies.get(req)
+
+if res.company is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| `request` | [operations.GetCompanyRequest](../../models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetCompanyResponse](../../models/operations/getcompanyresponse.md)**
+
+
+## list
+
+Returns a list of your companies. The company schema contains a list of [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) related to the company.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListCompaniesRequest(
+ order_by='-modifiedDate',
+ page=1,
+ page_size=100,
+ query='repellendus',
+)
+
+res = s.companies.list(req)
+
+if res.companies is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.ListCompaniesRequest](../../models/operations/listcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.ListCompaniesResponse](../../models/operations/listcompaniesresponse.md)**
+
+
+## update
+
+Updates both the name and description of the company.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.UpdateCompanyRequest(
+ company_request_body=shared.CompanyRequestBody(
+ description='Requested early access to the new financing scheme.',
+ name='Bank of Dave',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.companies.update(req)
+
+if res.company is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.UpdateCompanyRequest](../../models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.UpdateCompanyResponse](../../models/operations/updatecompanyresponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/configuration/README.md b/sync-for-expenses/docs/sdks/configuration/README.md
index e7cc14b07..2f5dad4a7 100755
--- a/sync-for-expenses/docs/sdks/configuration/README.md
+++ b/sync-for-expenses/docs/sdks/configuration/README.md
@@ -2,14 +2,15 @@
## Overview
-Companies sync configuration.
+Manage mapping options and sync configuration.
### Available Operations
-* [get_company_configuration](#get_company_configuration) - Get company configuration
-* [save_company_configuration](#save_company_configuration) - Set company configuration
+* [get](#get) - Get company configuration
+* [get_mapping_options](#get_mapping_options) - Mapping options
+* [set](#set) - Set company configuration
-## get_company_configuration
+## get
Gets a companies expense sync configuration
@@ -29,7 +30,7 @@ req = operations.GetCompanyConfigurationRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
-res = s.configuration.get_company_configuration(req)
+res = s.configuration.get(req)
if res.company_configuration is not None:
# handle response
@@ -48,7 +49,46 @@ if res.company_configuration is not None:
**[operations.GetCompanyConfigurationResponse](../../models/operations/getcompanyconfigurationresponse.md)**
-## save_company_configuration
+## get_mapping_options
+
+Gets the expense mapping options for a companies accounting software
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetMappingOptionsRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.configuration.get_mapping_options(req)
+
+if res.mapping_options is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetMappingOptionsRequest](../../models/operations/getmappingoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetMappingOptionsResponse](../../models/operations/getmappingoptionsresponse.md)**
+
+
+## set
Sets a companies expense sync configuration
@@ -64,7 +104,7 @@ s = codatsyncexpenses.CodatSyncExpenses(
),
)
-req = operations.SaveCompanyConfigurationRequest(
+req = operations.SetCompanyConfigurationRequest(
company_configuration=shared.CompanyConfiguration(
bank_account=shared.BankAccount(
id='32',
@@ -79,7 +119,7 @@ req = operations.SaveCompanyConfigurationRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
-res = s.configuration.save_company_configuration(req)
+res = s.configuration.set(req)
if res.company_configuration is not None:
# handle response
@@ -87,13 +127,13 @@ if res.company_configuration is not None:
### Parameters
-| Parameter | Type | Required | Description |
-| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
-| `request` | [operations.SaveCompanyConfigurationRequest](../../models/operations/savecompanyconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.SetCompanyConfigurationRequest](../../models/operations/setcompanyconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
### Response
-**[operations.SaveCompanyConfigurationResponse](../../models/operations/savecompanyconfigurationresponse.md)**
+**[operations.SetCompanyConfigurationResponse](../../models/operations/setcompanyconfigurationresponse.md)**
diff --git a/sync-for-expenses/docs/sdks/connections/README.md b/sync-for-expenses/docs/sdks/connections/README.md
index 89b8a05b4..cf59028fb 100755
--- a/sync-for-expenses/docs/sdks/connections/README.md
+++ b/sync-for-expenses/docs/sdks/connections/README.md
@@ -6,7 +6,56 @@ Create and manage partner expense connection.
### Available Operations
+* [create](#create) - Create connection
* [create_partner_expense_connection](#create_partner_expense_connection) - Create Partner Expense connection
+* [delete](#delete) - Delete connection
+* [get](#get) - Get connection
+* [list](#list) - List connections
+* [unlink](#unlink) - Unlink connection
+
+## create
+
+Creates a connection for the company by providing a valid `platformKey`.
+
+Use the [List Integrations](https://docs.codat.io/sync-for-expenses-api#/operations/list-integrations) endpoint to access valid platform keys.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.CreateConnectionRequest(
+ request_body=operations.CreateConnectionRequestBody(
+ platform_key='sapiente',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.connections.create(req)
+
+if res.connection is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.CreateConnectionRequest](../../models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.CreateConnectionResponse](../../models/operations/createconnectionresponse.md)**
+
## create_partner_expense_connection
@@ -30,7 +79,7 @@ req = operations.CreatePartnerExpenseConnectionRequest(
res = s.connections.create_partner_expense_connection(req)
-if res.data_connection is not None:
+if res.connection is not None:
# handle response
```
@@ -46,3 +95,170 @@ if res.data_connection is not None:
**[operations.CreatePartnerExpenseConnectionResponse](../../models/operations/createpartnerexpenseconnectionresponse.md)**
+
+## delete
+
+Revoke and remove a connection from a company.
+This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.DeleteConnectionRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+)
+
+res = s.connections.delete(req)
+
+if res.status_code == 200:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.DeleteConnectionRequest](../../models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.DeleteConnectionResponse](../../models/operations/deleteconnectionresponse.md)**
+
+
+## get
+
+Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetConnectionRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+)
+
+res = s.connections.get(req)
+
+if res.connection is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.GetConnectionRequest](../../models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetConnectionResponse](../../models/operations/getconnectionresponse.md)**
+
+
+## list
+
+List the connections for a company.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListConnectionsRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ order_by='-modifiedDate',
+ page=1,
+ page_size=100,
+ query='quo',
+)
+
+res = s.connections.list(req)
+
+if res.connections is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
+| `request` | [operations.ListConnectionsRequest](../../models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.ListConnectionsResponse](../../models/operations/listconnectionsresponse.md)**
+
+
+## unlink
+
+This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.UnlinkConnectionRequest(
+ request_body=operations.UnlinkConnectionRequestBody(
+ status='odit',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+)
+
+res = s.connections.unlink(req)
+
+if res.connection is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.UnlinkConnectionRequest](../../models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.UnlinkConnectionResponse](../../models/operations/unlinkconnectionresponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/customers/README.md b/sync-for-expenses/docs/sdks/customers/README.md
new file mode 100755
index 000000000..c29fc9433
--- /dev/null
+++ b/sync-for-expenses/docs/sdks/customers/README.md
@@ -0,0 +1,215 @@
+# customers
+
+## Overview
+
+Customers
+
+### Available Operations
+
+* [create](#create) - Create customer
+* [get](#get) - Get customer
+* [list](#list) - List customers
+* [update](#update) - Update customer
+
+## create
+
+The *Create customer* endpoint creates a new [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
+
+[Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+**Integration-specific behaviour**
+
+Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model).
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account.
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.CreateCustomerRequest(
+ customer=shared.Customer(
+ id='142',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ timeout_in_minutes=870013,
+)
+
+res = s.customers.create(req)
+
+if res.create_customer_response is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `request` | [operations.CreateCustomerRequest](../../models/operations/createcustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.CreateCustomerResponse](../../models/operations/createcustomerresponse.md)**
+
+
+## get
+
+The *Get customer* endpoint returns a single customer for a given customerId.
+
+[Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support getting a specific customer.
+
+Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetCustomerRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ customer_id='at',
+)
+
+res = s.customers.get(req)
+
+if res.customer is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `request` | [operations.GetCustomerRequest](../../models/operations/getcustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetCustomerResponse](../../models/operations/getcustomerresponse.md)**
+
+
+## list
+
+The *List customers* endpoint returns a list of [customers](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
+
+[Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListCustomersRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ order_by='-modifiedDate',
+ page=1,
+ page_size=100,
+ query='maiores',
+)
+
+res = s.customers.list(req)
+
+if res.customers is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.ListCustomersRequest](../../models/operations/listcustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.ListCustomersResponse](../../models/operations/listcustomersresponse.md)**
+
+
+## update
+
+The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
+
+[Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+**Integration-specific behaviour**
+
+Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model).
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account.
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.UpdateCustomerRequest(
+ customer=shared.Customer(
+ id='142',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ customer_id='molestiae',
+ force_update=False,
+ timeout_in_minutes=799159,
+)
+
+res = s.customers.update(req)
+
+if res.update_customer_response is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `request` | [operations.UpdateCustomerRequest](../../models/operations/updatecustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.UpdateCustomerResponse](../../models/operations/updatecustomerresponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/expenses/README.md b/sync-for-expenses/docs/sdks/expenses/README.md
index d57ffd36f..576377d28 100755
--- a/sync-for-expenses/docs/sdks/expenses/README.md
+++ b/sync-for-expenses/docs/sdks/expenses/README.md
@@ -6,11 +6,11 @@ Create expense datasets and upload receipts.
### Available Operations
-* [create_expense_dataset](#create_expense_dataset) - Create expense-transactions
-* [update_expense_dataset](#update_expense_dataset) - Update expense-transactions
+* [create](#create) - Create expense transaction
+* [update](#update) - Update expense-transactions
* [upload_attachment](#upload_attachment) - Upload attachment
-## create_expense_dataset
+## create
Create an expense transaction
@@ -26,16 +26,19 @@ s = codatsyncexpenses.CodatSyncExpenses(
),
)
-req = operations.CreateExpenseDatasetRequest(
+req = operations.CreateExpenseTransactionRequest(
create_expense_request=shared.CreateExpenseRequest(
items=[
shared.ExpenseTransaction(
+ bank_account_ref=shared.ExpenseTransactionBankAccountReference(
+ id='787dfb37-5707-4dc0-8a86-8d74e4cc78ea',
+ ),
contact_ref=shared.ContactRef(
contact_type=shared.ContactRefContactType.SUPPLIER,
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
currency='GBP',
- currency_rate=5928.45,
+ currency_rate=4614.79,
id='4d7c6929-7770-412b-91bb-44d3bc71d111',
issue_date='2022-10-23T00:00:00.000Z',
lines=[
@@ -73,15 +76,6 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
],
),
shared.ExpenseTransactionLine(
@@ -124,9 +118,6 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
],
),
],
@@ -135,12 +126,15 @@ req = operations.CreateExpenseDatasetRequest(
type=shared.ExpenseTransactionType.PAYMENT,
),
shared.ExpenseTransaction(
+ bank_account_ref=shared.ExpenseTransactionBankAccountReference(
+ id='787dfb37-5707-4dc0-8a86-8d74e4cc78ea',
+ ),
contact_ref=shared.ContactRef(
contact_type=shared.ContactRefContactType.SUPPLIER,
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
currency='GBP',
- currency_rate=4236.55,
+ currency_rate=5820.2,
id='4d7c6929-7770-412b-91bb-44d3bc71d111',
issue_date='2022-10-23T00:00:00.000Z',
lines=[
@@ -160,6 +154,12 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
+ shared.RecordRef(
+ id='40e3e57c-2322-4898-966c-ca41adfd23fd',
+ ),
+ shared.RecordRef(
+ id='40e3e57c-2322-4898-966c-ca41adfd23fd',
+ ),
],
),
shared.ExpenseTransactionLine(
@@ -178,6 +178,12 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
+ shared.RecordRef(
+ id='40e3e57c-2322-4898-966c-ca41adfd23fd',
+ ),
+ shared.RecordRef(
+ id='40e3e57c-2322-4898-966c-ca41adfd23fd',
+ ),
],
),
shared.ExpenseTransactionLine(
@@ -196,6 +202,9 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
+ shared.RecordRef(
+ id='40e3e57c-2322-4898-966c-ca41adfd23fd',
+ ),
],
),
],
@@ -204,12 +213,15 @@ req = operations.CreateExpenseDatasetRequest(
type=shared.ExpenseTransactionType.PAYMENT,
),
shared.ExpenseTransaction(
+ bank_account_ref=shared.ExpenseTransactionBankAccountReference(
+ id='787dfb37-5707-4dc0-8a86-8d74e4cc78ea',
+ ),
contact_ref=shared.ContactRef(
contact_type=shared.ContactRefContactType.SUPPLIER,
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
currency='GBP',
- currency_rate=8917.73,
+ currency_rate=1059.07,
id='4d7c6929-7770-412b-91bb-44d3bc71d111',
issue_date='2022-10-23T00:00:00.000Z',
lines=[
@@ -244,11 +256,26 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
],
),
+ ],
+ merchant_name='Amazon UK',
+ notes='APPLE.COM/BILL - 09001077498 - Card Ending: 4590',
+ type=shared.ExpenseTransactionType.PAYMENT,
+ ),
+ shared.ExpenseTransaction(
+ bank_account_ref=shared.ExpenseTransactionBankAccountReference(
+ id='787dfb37-5707-4dc0-8a86-8d74e4cc78ea',
+ ),
+ contact_ref=shared.ContactRef(
+ contact_type=shared.ContactRefContactType.SUPPLIER,
+ id='40e3e57c-2322-4898-966c-ca41adfd23fd',
+ ),
+ currency='GBP',
+ currency_rate=7742.34,
+ id='4d7c6929-7770-412b-91bb-44d3bc71d111',
+ issue_date='2022-10-23T00:00:00.000Z',
+ lines=[
shared.ExpenseTransactionLine(
account_ref=shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
@@ -262,9 +289,6 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
],
),
shared.ExpenseTransactionLine(
@@ -286,9 +310,6 @@ req = operations.CreateExpenseDatasetRequest(
shared.RecordRef(
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
],
),
],
@@ -301,7 +322,7 @@ req = operations.CreateExpenseDatasetRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
-res = s.expenses.create_expense_dataset(req)
+res = s.expenses.create(req)
if res.create_expense_response is not None:
# handle response
@@ -309,18 +330,18 @@ if res.create_expense_response is not None:
### Parameters
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
-| `request` | [operations.CreateExpenseDatasetRequest](../../models/operations/createexpensedatasetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
+| `request` | [operations.CreateExpenseTransactionRequest](../../models/operations/createexpensetransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
### Response
-**[operations.CreateExpenseDatasetResponse](../../models/operations/createexpensedatasetresponse.md)**
+**[operations.CreateExpenseTransactionResponse](../../models/operations/createexpensetransactionresponse.md)**
-## update_expense_dataset
+## update
Update an expense transaction
@@ -336,14 +357,17 @@ s = codatsyncexpenses.CodatSyncExpenses(
),
)
-req = operations.UpdateExpenseDatasetRequest(
+req = operations.UpdateExpenseTransactionRequest(
update_expense_request=shared.UpdateExpenseRequest(
+ bank_account_ref=shared.UpdateExpenseRequestBankAccountReference(
+ id='787dfb37-5707-4dc0-8a86-8d74e4cc78ea',
+ ),
contact_ref=shared.ContactRef(
contact_type=shared.ContactRefContactType.SUPPLIER,
id='40e3e57c-2322-4898-966c-ca41adfd23fd',
),
currency='GBP',
- currency_rate=8121.69,
+ currency_rate=1352.18,
issue_date='2022-06-28T00:00:00.000Z',
lines=[
shared.ExpenseTransactionLine(
@@ -364,71 +388,32 @@ req = operations.UpdateExpenseDatasetRequest(
),
],
),
- shared.ExpenseTransactionLine(
- account_ref=shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- net_amount=110.42,
- tax_amount=14.43,
- tax_rate_ref=shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- tracking_refs=[
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- ],
- ),
- shared.ExpenseTransactionLine(
- account_ref=shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- net_amount=110.42,
- tax_amount=14.43,
- tax_rate_ref=shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- tracking_refs=[
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- shared.RecordRef(
- id='40e3e57c-2322-4898-966c-ca41adfd23fd',
- ),
- ],
- ),
],
merchant_name='Amazon UK',
notes='APPLE.COM/BILL - 09001077498 - Card Ending: 4590',
- type=shared.ExpenseType.PAYMENT,
+ type='natus',
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
transaction_id='336694d8-2dca-4cb5-a28d-3ccb83e55eee',
)
-res = s.expenses.update_expense_dataset(req)
+res = s.expenses.update(req)
-if res.update_expense_dataset_202_application_json_object is not None:
+if res.update_expense_response is not None:
# handle response
```
### Parameters
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
-| `request` | [operations.UpdateExpenseDatasetRequest](../../models/operations/updateexpensedatasetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
+| `request` | [operations.UpdateExpenseTransactionRequest](../../models/operations/updateexpensetransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
### Response
-**[operations.UpdateExpenseDatasetResponse](../../models/operations/updateexpensedatasetresponse.md)**
+**[operations.UpdateExpenseTransactionResponse](../../models/operations/updateexpensetransactionresponse.md)**
## upload_attachment
@@ -447,10 +432,10 @@ s = codatsyncexpenses.CodatSyncExpenses(
),
)
-req = operations.UploadAttachmentRequest(
- request_body=operations.UploadAttachmentRequestBody(
- content='recusandae'.encode(),
- request_body='temporibus',
+req = operations.UploadExpenseAttachmentRequest(
+ request_body=operations.UploadExpenseAttachmentRequestBody(
+ content='sed'.encode(),
+ request_body='iste',
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
sync_id='6fb40d5e-b13e-11ed-afa1-0242ac120002',
@@ -465,13 +450,13 @@ if res.attachment is not None:
### Parameters
-| Parameter | Type | Required | Description |
-| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
-| `request` | [operations.UploadAttachmentRequest](../../models/operations/uploadattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.UploadExpenseAttachmentRequest](../../models/operations/uploadexpenseattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
### Response
-**[operations.UploadAttachmentResponse](../../models/operations/uploadattachmentresponse.md)**
+**[operations.UploadExpenseAttachmentResponse](../../models/operations/uploadexpenseattachmentresponse.md)**
diff --git a/sync-for-expenses/docs/sdks/managedata/README.md b/sync-for-expenses/docs/sdks/managedata/README.md
new file mode 100755
index 000000000..32dbf6b1d
--- /dev/null
+++ b/sync-for-expenses/docs/sdks/managedata/README.md
@@ -0,0 +1,221 @@
+# manage_data
+
+## Overview
+
+Asynchronously retrieve data from an integration to refresh data in Codat.
+
+### Available Operations
+
+* [get](#get) - Get data status
+* [get_pull_operation](#get_pull_operation) - Get pull operation
+* [list_pull_operations](#list_pull_operations) - List pull operations
+* [refresh_all_data_types](#refresh_all_data_types) - Refresh all data
+* [refresh_data_type](#refresh_data_type) - Refresh data type
+
+## get
+
+Get the state of each data type for a company
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetDataStatusRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.manage_data.get(req)
+
+if res.data_status_response is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.GetDataStatusRequest](../../models/operations/getdatastatusrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetDataStatusResponse](../../models/operations/getdatastatusresponse.md)**
+
+
+## get_pull_operation
+
+Retrieve information about a single dataset or pull operation.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetPullOperationRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ dataset_id='eaed9f0f-e77b-4bc9-a58f-ab8b4b99ab18',
+)
+
+res = s.manage_data.get_pull_operation(req)
+
+if res.pull_operation is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.GetPullOperationRequest](../../models/operations/getpulloperationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetPullOperationResponse](../../models/operations/getpulloperationresponse.md)**
+
+
+## list_pull_operations
+
+Gets the pull operation history (datasets) for a given company.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListPullOperationsRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ order_by='-modifiedDate',
+ page=1,
+ page_size=100,
+ query='dolor',
+)
+
+res = s.manage_data.list_pull_operations(req)
+
+if res.pull_operations is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
+| `request` | [operations.ListPullOperationsRequest](../../models/operations/listpulloperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.ListPullOperationsResponse](../../models/operations/listpulloperationsresponse.md)**
+
+
+## refresh_all_data_types
+
+Refreshes all data types with `fetch on first link` set to `true` for a given company.
+
+This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
+
+[Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.RefreshAllDataTypesRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.manage_data.refresh_all_data_types(req)
+
+if res.status_code == 200:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
+| `request` | [operations.RefreshAllDataTypesRequest](../../models/operations/refreshalldatatypesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.RefreshAllDataTypesResponse](../../models/operations/refreshalldatatypesresponse.md)**
+
+
+## refresh_data_type
+
+Refreshes a given data type for a given company.
+
+This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.RefreshDataTypeRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='96fea759-6eb1-40fa-aa23-52c5955907af',
+ data_type=shared.DataType.INVOICES,
+)
+
+res = s.manage_data.refresh_data_type(req)
+
+if res.pull_operation is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
+| `request` | [operations.RefreshDataTypeRequest](../../models/operations/refreshdatatyperequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.RefreshDataTypeResponse](../../models/operations/refreshdatatyperesponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/mappingoptions/README.md b/sync-for-expenses/docs/sdks/mappingoptions/README.md
deleted file mode 100755
index 95aa47279..000000000
--- a/sync-for-expenses/docs/sdks/mappingoptions/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# mapping_options
-
-## Overview
-
-Mapping options for a companies expenses.
-
-### Available Operations
-
-* [get_mapping_options](#get_mapping_options) - Mapping options
-
-## get_mapping_options
-
-Gets the expense mapping options for a companies accounting software
-
-### Example Usage
-
-```python
-import codatsyncexpenses
-from codatsyncexpenses.models import operations, shared
-
-s = codatsyncexpenses.CodatSyncExpenses(
- security=shared.Security(
- auth_header="Basic BASE_64_ENCODED(API_KEY)",
- ),
-)
-
-req = operations.GetMappingOptionsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.mapping_options.get_mapping_options(req)
-
-if res.mapping_options is not None:
- # handle response
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
-| `request` | [operations.GetMappingOptionsRequest](../../models/operations/getmappingoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-
-### Response
-
-**[operations.GetMappingOptionsResponse](../../models/operations/getmappingoptionsresponse.md)**
-
diff --git a/sync-for-expenses/docs/sdks/pushoperations/README.md b/sync-for-expenses/docs/sdks/pushoperations/README.md
new file mode 100755
index 000000000..d3f876930
--- /dev/null
+++ b/sync-for-expenses/docs/sdks/pushoperations/README.md
@@ -0,0 +1,93 @@
+# push_operations
+
+## Overview
+
+Access create, update and delete operations made to an SMB's data connection.
+
+### Available Operations
+
+* [get](#get) - Get push operation
+* [list](#list) - List push operations
+
+## get
+
+Retrieve push operation.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetPushOperationRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ push_operation_key='f1a3a2fa-9467-4739-a51a-a52c3f5ad019',
+)
+
+res = s.push_operations.get(req)
+
+if res.push_operation is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.GetPushOperationRequest](../../models/operations/getpushoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetPushOperationResponse](../../models/operations/getpushoperationresponse.md)**
+
+
+## list
+
+List push operation records.
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListPushOperationsRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ order_by='-modifiedDate',
+ page=1,
+ page_size=100,
+ query='temporibus',
+)
+
+res = s.push_operations.list(req)
+
+if res.push_operations is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
+| `request` | [operations.ListPushOperationsRequest](../../models/operations/listpushoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.ListPushOperationsResponse](../../models/operations/listpushoperationsresponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/suppliers/README.md b/sync-for-expenses/docs/sdks/suppliers/README.md
new file mode 100755
index 000000000..9ef00d49f
--- /dev/null
+++ b/sync-for-expenses/docs/sdks/suppliers/README.md
@@ -0,0 +1,215 @@
+# suppliers
+
+## Overview
+
+Suppliers
+
+### Available Operations
+
+* [create](#create) - Create supplier
+* [get](#get) - Get supplier
+* [list](#list) - List suppliers
+* [update](#update) - Update supplier
+
+## create
+
+The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
+
+[Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+**Integration-specific behaviour**
+
+Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model).
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account.
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.CreateSupplierRequest(
+ supplier=shared.Supplier(
+ id='124',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ timeout_in_minutes=673660,
+)
+
+res = s.suppliers.create(req)
+
+if res.create_supplier_response is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `request` | [operations.CreateSupplierRequest](../../models/operations/createsupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.CreateSupplierResponse](../../models/operations/createsupplierresponse.md)**
+
+
+## get
+
+The *Get supplier* endpoint returns a single supplier for a given supplierId.
+
+[Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a specific supplier.
+
+Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetSupplierRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ supplier_id='13d946f0-c5d5-42bc-b092-97ece17923ab',
+)
+
+res = s.suppliers.get(req)
+
+if res.supplier is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `request` | [operations.GetSupplierRequest](../../models/operations/getsupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetSupplierResponse](../../models/operations/getsupplierresponse.md)**
+
+
+## list
+
+The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
+
+[Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListSuppliersRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ order_by='-modifiedDate',
+ page=1,
+ page_size=100,
+ query='reiciendis',
+)
+
+res = s.suppliers.list(req)
+
+if res.suppliers is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.ListSuppliersRequest](../../models/operations/listsuppliersrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.ListSuppliersResponse](../../models/operations/listsuppliersresponse.md)**
+
+
+## update
+
+The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
+
+[Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+**Integration-specific behaviour**
+
+Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model).
+
+Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account.
+
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.UpdateSupplierRequest(
+ supplier=shared.Supplier(
+ id='124',
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ force_update=False,
+ supplier_id='EILBDVJVNUAGVKRQ',
+ timeout_in_minutes=878194,
+)
+
+res = s.suppliers.update(req)
+
+if res.update_supplier_response is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `request` | [operations.UpdateSupplierRequest](../../models/operations/updatesupplierrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.UpdateSupplierResponse](../../models/operations/updatesupplierresponse.md)**
+
diff --git a/sync-for-expenses/docs/sdks/sync/README.md b/sync-for-expenses/docs/sdks/sync/README.md
index 52b322076..74c43091c 100755
--- a/sync-for-expenses/docs/sdks/sync/README.md
+++ b/sync-for-expenses/docs/sdks/sync/README.md
@@ -2,13 +2,135 @@
## Overview
-Triggering a new sync of expenses to accounting software.
+Trigger and monitor expense syncs to accounting software.
### Available Operations
-* [intiate_sync](#intiate_sync) - Initiate sync
+* [get](#get) - Get Sync status
+* [get_last_successful_sync](#get_last_successful_sync) - Last successful sync
+* [get_latest_sync](#get_latest_sync) - Latest sync status
+* [initiate_sync](#initiate_sync) - Initiate sync
+* [list](#list) - List sync statuses
-## intiate_sync
+## get
+
+Get the sync status for a specified sync
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetSyncByIDRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ sync_id='6fb40d5e-b13e-11ed-afa1-0242ac120002',
+)
+
+res = s.sync.get(req)
+
+if res.company_sync_status is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `request` | [operations.GetSyncByIDRequest](../../models/operations/getsyncbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetSyncByIDResponse](../../models/operations/getsyncbyidresponse.md)**
+
+
+## get_last_successful_sync
+
+Gets the status of the last successful sync
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetLastSuccessfulSyncRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.sync.get_last_successful_sync(req)
+
+if res.company_sync_status is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
+| `request` | [operations.GetLastSuccessfulSyncRequest](../../models/operations/getlastsuccessfulsyncrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetLastSuccessfulSyncResponse](../../models/operations/getlastsuccessfulsyncresponse.md)**
+
+
+## get_latest_sync
+
+Gets the latest sync status
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetLatestSyncRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.sync.get_latest_sync(req)
+
+if res.company_sync_status is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.GetLatestSyncRequest](../../models/operations/getlatestsyncrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.GetLatestSyncResponse](../../models/operations/getlatestsyncresponse.md)**
+
+
+## initiate_sync
Initiate sync of pending transactions.
@@ -24,16 +146,17 @@ s = codatsyncexpenses.CodatSyncExpenses(
),
)
-req = operations.IntiateSyncRequest(
- post_sync=shared.PostSync(
+req = operations.InitiateSyncRequest(
+ initiate_sync=shared.InitiateSync(
dataset_ids=[
- '51a05dfc-2ddf-47cc-b8ca-1ba928fc8167',
+ '8f097b00-74f1-4547-9b5e-6e13b99d488e',
+ '1e91e450-ad2a-4bd4-8269-802d502a94bb',
],
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
-res = s.sync.intiate_sync(req)
+res = s.sync.initiate_sync(req)
if res.sync_initiated is not None:
# handle response
@@ -41,13 +164,52 @@ if res.sync_initiated is not None:
### Parameters
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
-| `request` | [operations.IntiateSyncRequest](../../models/operations/intiatesyncrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `request` | [operations.InitiateSyncRequest](../../models/operations/initiatesyncrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+
+### Response
+
+**[operations.InitiateSyncResponse](../../models/operations/initiatesyncresponse.md)**
+
+
+## list
+
+Gets a list of sync statuses
+
+### Example Usage
+
+```python
+import codatsyncexpenses
+from codatsyncexpenses.models import operations, shared
+
+s = codatsyncexpenses.CodatSyncExpenses(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.ListSyncsRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.sync.list(req)
+
+if res.company_sync_statuses is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
+| `request` | [operations.ListSyncsRequest](../../models/operations/listsyncsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
### Response
-**[operations.IntiateSyncResponse](../../models/operations/intiatesyncresponse.md)**
+**[operations.ListSyncsResponse](../../models/operations/listsyncsresponse.md)**
diff --git a/sync-for-expenses/docs/sdks/syncstatus/README.md b/sync-for-expenses/docs/sdks/syncstatus/README.md
deleted file mode 100755
index 13d639c02..000000000
--- a/sync-for-expenses/docs/sdks/syncstatus/README.md
+++ /dev/null
@@ -1,169 +0,0 @@
-# sync_status
-
-## Overview
-
-Check the status of ongoing or previous expense syncs.
-
-### Available Operations
-
-* [get_last_successful_sync](#get_last_successful_sync) - Last successful sync
-* [get_latest_sync](#get_latest_sync) - Latest sync status
-* [get_sync_by_id](#get_sync_by_id) - Get Sync status
-* [list_syncs](#list_syncs) - List sync statuses
-
-## get_last_successful_sync
-
-Gets the status of the last successful sync
-
-### Example Usage
-
-```python
-import codatsyncexpenses
-from codatsyncexpenses.models import operations, shared
-
-s = codatsyncexpenses.CodatSyncExpenses(
- security=shared.Security(
- auth_header="Basic BASE_64_ENCODED(API_KEY)",
- ),
-)
-
-req = operations.GetLastSuccessfulSyncRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.sync_status.get_last_successful_sync(req)
-
-if res.company_sync_status is not None:
- # handle response
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
-| `request` | [operations.GetLastSuccessfulSyncRequest](../../models/operations/getlastsuccessfulsyncrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-
-### Response
-
-**[operations.GetLastSuccessfulSyncResponse](../../models/operations/getlastsuccessfulsyncresponse.md)**
-
-
-## get_latest_sync
-
-Gets the latest sync status
-
-### Example Usage
-
-```python
-import codatsyncexpenses
-from codatsyncexpenses.models import operations, shared
-
-s = codatsyncexpenses.CodatSyncExpenses(
- security=shared.Security(
- auth_header="Basic BASE_64_ENCODED(API_KEY)",
- ),
-)
-
-req = operations.GetLatestSyncRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.sync_status.get_latest_sync(req)
-
-if res.company_sync_status is not None:
- # handle response
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
-| `request` | [operations.GetLatestSyncRequest](../../models/operations/getlatestsyncrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-
-### Response
-
-**[operations.GetLatestSyncResponse](../../models/operations/getlatestsyncresponse.md)**
-
-
-## get_sync_by_id
-
-Get the sync status for a specified sync
-
-### Example Usage
-
-```python
-import codatsyncexpenses
-from codatsyncexpenses.models import operations, shared
-
-s = codatsyncexpenses.CodatSyncExpenses(
- security=shared.Security(
- auth_header="Basic BASE_64_ENCODED(API_KEY)",
- ),
-)
-
-req = operations.GetSyncByIDRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- sync_id='6fb40d5e-b13e-11ed-afa1-0242ac120002',
-)
-
-res = s.sync_status.get_sync_by_id(req)
-
-if res.company_sync_status is not None:
- # handle response
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
-| `request` | [operations.GetSyncByIDRequest](../../models/operations/getsyncbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-
-### Response
-
-**[operations.GetSyncByIDResponse](../../models/operations/getsyncbyidresponse.md)**
-
-
-## list_syncs
-
-Gets a list of sync statuses
-
-### Example Usage
-
-```python
-import codatsyncexpenses
-from codatsyncexpenses.models import operations, shared
-
-s = codatsyncexpenses.CodatSyncExpenses(
- security=shared.Security(
- auth_header="Basic BASE_64_ENCODED(API_KEY)",
- ),
-)
-
-req = operations.ListSyncsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.sync_status.list_syncs(req)
-
-if res.company_sync_statuses is not None:
- # handle response
-```
-
-### Parameters
-
-| Parameter | Type | Required | Description |
-| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
-| `request` | [operations.ListSyncsRequest](../../models/operations/listsyncsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-
-### Response
-
-**[operations.ListSyncsResponse](../../models/operations/listsyncsresponse.md)**
-
diff --git a/sync-for-expenses/docs/sdks/transactionstatus/README.md b/sync-for-expenses/docs/sdks/transactionstatus/README.md
index f42a76a49..0dff5982f 100755
--- a/sync-for-expenses/docs/sdks/transactionstatus/README.md
+++ b/sync-for-expenses/docs/sdks/transactionstatus/README.md
@@ -6,10 +6,10 @@ Retrieve the status of transactions within a sync.
### Available Operations
-* [get_sync_transaction](#get_sync_transaction) - Get Sync Transaction
-* [list_sync_transactions](#list_sync_transactions) - Get Sync transactions
+* [get](#get) - Get Sync Transaction
+* [list](#list) - List sync transactions
-## get_sync_transaction
+## get
Gets the status of a transaction for a sync
@@ -31,9 +31,9 @@ req = operations.GetSyncTransactionRequest(
transaction_id='336694d8-2dca-4cb5-a28d-3ccb83e55eee',
)
-res = s.transaction_status.get_sync_transaction(req)
+res = s.transaction_status.get(req)
-if res.transaction_metadata is not None:
+if res.transaction is not None:
# handle response
```
@@ -50,9 +50,9 @@ if res.transaction_metadata is not None:
**[operations.GetSyncTransactionResponse](../../models/operations/getsynctransactionresponse.md)**
-## list_sync_transactions
+## list
-Get's the transactions and status for a sync
+Gets the transactions and status for a sync
### Example Usage
@@ -73,9 +73,9 @@ req = operations.ListSyncTransactionsRequest(
sync_id='6fb40d5e-b13e-11ed-afa1-0242ac120002',
)
-res = s.transaction_status.list_sync_transactions(req)
+res = s.transaction_status.list(req)
-if res.transaction_metadata_list is not None:
+if res.transactions is not None:
# handle response
```
diff --git a/sync-for-expenses/files.gen b/sync-for-expenses/files.gen
index dfa62bd8a..8226fa33c 100755
--- a/sync-for-expenses/files.gen
+++ b/sync-for-expenses/files.gen
@@ -1,10 +1,14 @@
src/codatsyncexpenses/sdkconfiguration.py
+src/codatsyncexpenses/accounts.py
+src/codatsyncexpenses/companies.py
src/codatsyncexpenses/configuration.py
src/codatsyncexpenses/connections.py
+src/codatsyncexpenses/customers.py
src/codatsyncexpenses/expenses.py
-src/codatsyncexpenses/mapping_options.py
+src/codatsyncexpenses/manage_data.py
+src/codatsyncexpenses/push_operations.py
+src/codatsyncexpenses/suppliers.py
src/codatsyncexpenses/sync.py
-src/codatsyncexpenses/sync_status.py
src/codatsyncexpenses/transaction_status.py
src/codatsyncexpenses/sdk.py
pylintrc
@@ -15,51 +19,103 @@ src/codatsyncexpenses/models/errors/sdkerror.py
src/codatsyncexpenses/utils/__init__.py
src/codatsyncexpenses/utils/retries.py
src/codatsyncexpenses/utils/utils.py
+src/codatsyncexpenses/models/operations/create_account.py
+src/codatsyncexpenses/models/operations/create_company.py
+src/codatsyncexpenses/models/operations/delete_company.py
+src/codatsyncexpenses/models/operations/get_company.py
+src/codatsyncexpenses/models/operations/list_companies.py
+src/codatsyncexpenses/models/operations/update_company.py
src/codatsyncexpenses/models/operations/get_company_configuration.py
-src/codatsyncexpenses/models/operations/save_company_configuration.py
-src/codatsyncexpenses/models/operations/create_partner_expense_connection.py
-src/codatsyncexpenses/models/operations/create_expense_dataset.py
-src/codatsyncexpenses/models/operations/update_expense_dataset.py
-src/codatsyncexpenses/models/operations/upload_attachment.py
src/codatsyncexpenses/models/operations/get_mapping_options.py
-src/codatsyncexpenses/models/operations/intiate_sync.py
+src/codatsyncexpenses/models/operations/set_company_configuration.py
+src/codatsyncexpenses/models/operations/create_connection.py
+src/codatsyncexpenses/models/operations/create_partner_expense_connection.py
+src/codatsyncexpenses/models/operations/delete_connection.py
+src/codatsyncexpenses/models/operations/get_connection.py
+src/codatsyncexpenses/models/operations/list_connections.py
+src/codatsyncexpenses/models/operations/unlink_connection.py
+src/codatsyncexpenses/models/operations/create_customer.py
+src/codatsyncexpenses/models/operations/get_customer.py
+src/codatsyncexpenses/models/operations/list_customers.py
+src/codatsyncexpenses/models/operations/update_customer.py
+src/codatsyncexpenses/models/operations/create_expense_transaction.py
+src/codatsyncexpenses/models/operations/update_expense_transaction.py
+src/codatsyncexpenses/models/operations/upload_expense_attachment.py
+src/codatsyncexpenses/models/operations/get_data_status.py
+src/codatsyncexpenses/models/operations/get_pull_operation.py
+src/codatsyncexpenses/models/operations/list_pull_operations.py
+src/codatsyncexpenses/models/operations/refresh_all_data_types.py
+src/codatsyncexpenses/models/operations/refresh_data_type.py
+src/codatsyncexpenses/models/operations/get_push_operation.py
+src/codatsyncexpenses/models/operations/list_push_operations.py
+src/codatsyncexpenses/models/operations/create_supplier.py
+src/codatsyncexpenses/models/operations/get_supplier.py
+src/codatsyncexpenses/models/operations/list_suppliers.py
+src/codatsyncexpenses/models/operations/update_supplier.py
+src/codatsyncexpenses/models/operations/get_sync_by_id.py
src/codatsyncexpenses/models/operations/get_last_successful_sync.py
src/codatsyncexpenses/models/operations/get_latest_sync.py
-src/codatsyncexpenses/models/operations/get_sync_by_id.py
+src/codatsyncexpenses/models/operations/initiate_sync.py
src/codatsyncexpenses/models/operations/list_syncs.py
src/codatsyncexpenses/models/operations/get_sync_transaction.py
src/codatsyncexpenses/models/operations/list_sync_transactions.py
src/codatsyncexpenses/models/operations/__init__.py
src/codatsyncexpenses/models/shared/errormessage.py
+src/codatsyncexpenses/models/shared/createaccountresponse.py
+src/codatsyncexpenses/models/shared/validation.py
+src/codatsyncexpenses/models/shared/validationitem.py
+src/codatsyncexpenses/models/shared/pushoperationstatus.py
+src/codatsyncexpenses/models/shared/datatype.py
+src/codatsyncexpenses/models/shared/account.py
+src/codatsyncexpenses/models/shared/accounttype.py
+src/codatsyncexpenses/models/shared/accountstatus.py
+src/codatsyncexpenses/models/shared/pushoperationchange.py
+src/codatsyncexpenses/models/shared/pushchangetype.py
+src/codatsyncexpenses/models/shared/pushoperationref.py
+src/codatsyncexpenses/models/shared/company.py
+src/codatsyncexpenses/models/shared/connection.py
+src/codatsyncexpenses/models/shared/dataconnectionstatus.py
+src/codatsyncexpenses/models/shared/dataconnectionerror.py
+src/codatsyncexpenses/models/shared/companyrequestbody.py
+src/codatsyncexpenses/models/shared/companies.py
+src/codatsyncexpenses/models/shared/links.py
+src/codatsyncexpenses/models/shared/halref.py
src/codatsyncexpenses/models/shared/companyconfiguration.py
src/codatsyncexpenses/models/shared/supplier.py
src/codatsyncexpenses/models/shared/customer.py
src/codatsyncexpenses/models/shared/bankaccount.py
-src/codatsyncexpenses/models/shared/dataconnection.py
-src/codatsyncexpenses/models/shared/dataconnectionstatus.py
-src/codatsyncexpenses/models/shared/dataconnectionerror.py
+src/codatsyncexpenses/models/shared/mappingoptions.py
+src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py
+src/codatsyncexpenses/models/shared/taxratemappinginfo.py
+src/codatsyncexpenses/models/shared/accountmappinginfo.py
+src/codatsyncexpenses/models/shared/connections.py
+src/codatsyncexpenses/models/shared/createcustomerresponse.py
+src/codatsyncexpenses/models/shared/customers.py
+src/codatsyncexpenses/models/shared/updatecustomerresponse.py
src/codatsyncexpenses/models/shared/createexpenseresponse.py
src/codatsyncexpenses/models/shared/createexpenserequest.py
src/codatsyncexpenses/models/shared/expensetransaction.py
src/codatsyncexpenses/models/shared/expensetransactionline.py
src/codatsyncexpenses/models/shared/recordref.py
src/codatsyncexpenses/models/shared/contactref.py
+src/codatsyncexpenses/models/shared/updateexpenseresponse.py
src/codatsyncexpenses/models/shared/updateexpenserequest.py
-src/codatsyncexpenses/models/shared/expensetype.py
src/codatsyncexpenses/models/shared/attachment.py
-src/codatsyncexpenses/models/shared/mappingoptions.py
-src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py
-src/codatsyncexpenses/models/shared/taxratemappinginfo.py
-src/codatsyncexpenses/models/shared/accountmappinginfo.py
-src/codatsyncexpenses/models/shared/syncinitiated.py
-src/codatsyncexpenses/models/shared/codaterrormessage.py
-src/codatsyncexpenses/models/shared/postsync.py
+src/codatsyncexpenses/models/shared/datastatus.py
+src/codatsyncexpenses/models/shared/pulloperation.py
+src/codatsyncexpenses/models/shared/pulloperations.py
+src/codatsyncexpenses/models/shared/pushoperation.py
+src/codatsyncexpenses/models/shared/pushoperations.py
+src/codatsyncexpenses/models/shared/createsupplierresponse.py
+src/codatsyncexpenses/models/shared/suppliers.py
+src/codatsyncexpenses/models/shared/updatesupplierresponse.py
src/codatsyncexpenses/models/shared/companysyncstatus.py
-src/codatsyncexpenses/models/shared/transactionmetadata.py
+src/codatsyncexpenses/models/shared/syncinitiated.py
+src/codatsyncexpenses/models/shared/initiatesync.py
+src/codatsyncexpenses/models/shared/transaction.py
src/codatsyncexpenses/models/shared/transactionstatus.py
src/codatsyncexpenses/models/shared/integrationtype.py
-src/codatsyncexpenses/models/shared/transactionmetadatalist.py
-src/codatsyncexpenses/models/shared/hallink.py
+src/codatsyncexpenses/models/shared/transactions.py
src/codatsyncexpenses/models/shared/security.py
src/codatsyncexpenses/models/shared/synccompletewebhook.py
src/codatsyncexpenses/models/shared/syncfailedwebhook.py
@@ -72,38 +128,94 @@ src/codatsyncexpenses/models/webhooks/__init__.py
src/codatsyncexpenses/models/errors/__init__.py
docs/sdks/codatsyncexpenses/README.md
docs/models/utils/retryconfig.md
+docs/sdks/accounts/README.md
+docs/sdks/companies/README.md
docs/sdks/configuration/README.md
docs/sdks/connections/README.md
+docs/sdks/customers/README.md
docs/sdks/expenses/README.md
-docs/sdks/mappingoptions/README.md
+docs/sdks/managedata/README.md
+docs/sdks/pushoperations/README.md
+docs/sdks/suppliers/README.md
docs/sdks/sync/README.md
-docs/sdks/syncstatus/README.md
docs/sdks/transactionstatus/README.md
USAGE.md
+docs/models/operations/createaccountrequest.md
+docs/models/operations/createaccountresponse.md
+docs/models/operations/createcompanyresponse.md
+docs/models/operations/deletecompanyrequest.md
+docs/models/operations/deletecompanyresponse.md
+docs/models/operations/getcompanyrequest.md
+docs/models/operations/getcompanyresponse.md
+docs/models/operations/listcompaniesrequest.md
+docs/models/operations/listcompaniesresponse.md
+docs/models/operations/updatecompanyrequest.md
+docs/models/operations/updatecompanyresponse.md
docs/models/operations/getcompanyconfigurationrequest.md
docs/models/operations/getcompanyconfigurationresponse.md
-docs/models/operations/savecompanyconfigurationrequest.md
-docs/models/operations/savecompanyconfigurationresponse.md
-docs/models/operations/createpartnerexpenseconnectionrequest.md
-docs/models/operations/createpartnerexpenseconnectionresponse.md
-docs/models/operations/createexpensedatasetrequest.md
-docs/models/operations/createexpensedatasetresponse.md
-docs/models/operations/updateexpensedatasetrequest.md
-docs/models/operations/updateexpensedataset202applicationjson.md
-docs/models/operations/updateexpensedatasetresponse.md
-docs/models/operations/uploadattachmentrequestbody.md
-docs/models/operations/uploadattachmentrequest.md
-docs/models/operations/uploadattachmentresponse.md
docs/models/operations/getmappingoptionsrequest.md
docs/models/operations/getmappingoptionsresponse.md
-docs/models/operations/intiatesyncrequest.md
-docs/models/operations/intiatesyncresponse.md
+docs/models/operations/setcompanyconfigurationrequest.md
+docs/models/operations/setcompanyconfigurationresponse.md
+docs/models/operations/createconnectionrequestbody.md
+docs/models/operations/createconnectionrequest.md
+docs/models/operations/createconnectionresponse.md
+docs/models/operations/createpartnerexpenseconnectionrequest.md
+docs/models/operations/createpartnerexpenseconnectionresponse.md
+docs/models/operations/deleteconnectionrequest.md
+docs/models/operations/deleteconnectionresponse.md
+docs/models/operations/getconnectionrequest.md
+docs/models/operations/getconnectionresponse.md
+docs/models/operations/listconnectionsrequest.md
+docs/models/operations/listconnectionsresponse.md
+docs/models/operations/unlinkconnectionrequestbody.md
+docs/models/operations/unlinkconnectionrequest.md
+docs/models/operations/unlinkconnectionresponse.md
+docs/models/operations/createcustomerrequest.md
+docs/models/operations/createcustomerresponse.md
+docs/models/operations/getcustomerrequest.md
+docs/models/operations/getcustomerresponse.md
+docs/models/operations/listcustomersrequest.md
+docs/models/operations/listcustomersresponse.md
+docs/models/operations/updatecustomerrequest.md
+docs/models/operations/updatecustomerresponse.md
+docs/models/operations/createexpensetransactionrequest.md
+docs/models/operations/createexpensetransactionresponse.md
+docs/models/operations/updateexpensetransactionrequest.md
+docs/models/operations/updateexpensetransactionresponse.md
+docs/models/operations/uploadexpenseattachmentrequestbody.md
+docs/models/operations/uploadexpenseattachmentrequest.md
+docs/models/operations/uploadexpenseattachmentresponse.md
+docs/models/operations/getdatastatusrequest.md
+docs/models/operations/getdatastatusresponse.md
+docs/models/operations/getpulloperationrequest.md
+docs/models/operations/getpulloperationresponse.md
+docs/models/operations/listpulloperationsrequest.md
+docs/models/operations/listpulloperationsresponse.md
+docs/models/operations/refreshalldatatypesrequest.md
+docs/models/operations/refreshalldatatypesresponse.md
+docs/models/operations/refreshdatatyperequest.md
+docs/models/operations/refreshdatatyperesponse.md
+docs/models/operations/getpushoperationrequest.md
+docs/models/operations/getpushoperationresponse.md
+docs/models/operations/listpushoperationsrequest.md
+docs/models/operations/listpushoperationsresponse.md
+docs/models/operations/createsupplierrequest.md
+docs/models/operations/createsupplierresponse.md
+docs/models/operations/getsupplierrequest.md
+docs/models/operations/getsupplierresponse.md
+docs/models/operations/listsuppliersrequest.md
+docs/models/operations/listsuppliersresponse.md
+docs/models/operations/updatesupplierrequest.md
+docs/models/operations/updatesupplierresponse.md
+docs/models/operations/getsyncbyidrequest.md
+docs/models/operations/getsyncbyidresponse.md
docs/models/operations/getlastsuccessfulsyncrequest.md
docs/models/operations/getlastsuccessfulsyncresponse.md
docs/models/operations/getlatestsyncrequest.md
docs/models/operations/getlatestsyncresponse.md
-docs/models/operations/getsyncbyidrequest.md
-docs/models/operations/getsyncbyidresponse.md
+docs/models/operations/initiatesyncrequest.md
+docs/models/operations/initiatesyncresponse.md
docs/models/operations/listsyncsrequest.md
docs/models/operations/listsyncsresponse.md
docs/models/operations/getsynctransactionrequest.md
@@ -111,46 +223,72 @@ docs/models/operations/getsynctransactionresponse.md
docs/models/operations/listsynctransactionsrequest.md
docs/models/operations/listsynctransactionsresponse.md
docs/models/shared/errormessage.md
+docs/models/shared/createaccountresponse.md
+docs/models/shared/validation.md
+docs/models/shared/validationitem.md
+docs/models/shared/pushoperationstatus.md
+docs/models/shared/datatype.md
+docs/models/shared/accountmetadata.md
+docs/models/shared/accountvaliddatatypelinks.md
+docs/models/shared/account.md
+docs/models/shared/accounttype.md
+docs/models/shared/accountstatus.md
+docs/models/shared/pushoperationchange.md
+docs/models/shared/pushchangetype.md
+docs/models/shared/pushoperationref.md
+docs/models/shared/company.md
+docs/models/shared/connectionsourcetype.md
+docs/models/shared/connection.md
+docs/models/shared/dataconnectionstatus.md
+docs/models/shared/dataconnectionerror.md
+docs/models/shared/companyrequestbody.md
+docs/models/shared/companies.md
+docs/models/shared/links.md
+docs/models/shared/halref.md
docs/models/shared/companyconfiguration.md
docs/models/shared/supplier.md
docs/models/shared/customer.md
docs/models/shared/bankaccount.md
-docs/models/shared/dataconnectionsourcetype.md
-docs/models/shared/dataconnection.md
-docs/models/shared/dataconnectionstatus.md
-docs/models/shared/dataconnectionerror.md
+docs/models/shared/mappingoptions.md
+docs/models/shared/trackingcategorymappinginfo.md
+docs/models/shared/taxratemappinginfovalidtransactiontypes.md
+docs/models/shared/taxratemappinginfo.md
+docs/models/shared/accountmappinginfoaccounttype.md
+docs/models/shared/accountmappinginfovalidtransactiontypes.md
+docs/models/shared/accountmappinginfo.md
+docs/models/shared/connections.md
+docs/models/shared/createcustomerresponse.md
+docs/models/shared/customers.md
+docs/models/shared/updatecustomerresponse.md
docs/models/shared/createexpenseresponse.md
docs/models/shared/createexpenserequest.md
+docs/models/shared/expensetransactionbankaccountreference.md
docs/models/shared/expensetransactiontype.md
docs/models/shared/expensetransaction.md
docs/models/shared/expensetransactionline.md
docs/models/shared/recordref.md
docs/models/shared/contactrefcontacttype.md
docs/models/shared/contactref.md
+docs/models/shared/updateexpenseresponse.md
+docs/models/shared/updateexpenserequestbankaccountreference.md
docs/models/shared/updateexpenserequest.md
-docs/models/shared/expensetype.md
docs/models/shared/attachment.md
-docs/models/shared/mappingoptions.md
-docs/models/shared/trackingcategorymappinginfo.md
-docs/models/shared/taxratemappinginfovalidtransactiontypes.md
-docs/models/shared/taxratemappinginfo.md
-docs/models/shared/accountmappinginfoaccounttype.md
-docs/models/shared/accountmappinginfovalidtransactiontypes.md
-docs/models/shared/accountmappinginfo.md
-docs/models/shared/syncinitiated.md
-docs/models/shared/codaterrormessagevalidationerrors.md
-docs/models/shared/codaterrormessagevalidationinternals.md
-docs/models/shared/codaterrormessagevalidationwarnings.md
-docs/models/shared/codaterrormessagevalidation.md
-docs/models/shared/codaterrormessage.md
-docs/models/shared/postsync.md
+docs/models/shared/datastatus.md
+docs/models/shared/pulloperationstatus.md
+docs/models/shared/pulloperation.md
+docs/models/shared/pulloperations.md
+docs/models/shared/pushoperation.md
+docs/models/shared/pushoperations.md
+docs/models/shared/createsupplierresponse.md
+docs/models/shared/suppliers.md
+docs/models/shared/updatesupplierresponse.md
docs/models/shared/companysyncstatus.md
-docs/models/shared/transactionmetadata.md
+docs/models/shared/syncinitiated.md
+docs/models/shared/initiatesync.md
+docs/models/shared/transaction.md
docs/models/shared/transactionstatus.md
docs/models/shared/integrationtype.md
-docs/models/shared/transactionmetadatalistlinks.md
-docs/models/shared/transactionmetadatalist.md
-docs/models/shared/hallink.md
+docs/models/shared/transactions.md
docs/models/shared/security.md
docs/models/shared/synccompletewebhookdata.md
docs/models/shared/synccompletewebhook.md
@@ -160,4 +298,5 @@ docs/models/shared/syncstartedwebhookdata.md
docs/models/shared/syncstartedwebhook.md
docs/models/webhooks/synccompleteresponse.md
docs/models/webhooks/syncfailedresponse.md
-docs/models/webhooks/syncstartedresponse.md
\ No newline at end of file
+docs/models/webhooks/syncstartedresponse.md
+.gitattributes
\ No newline at end of file
diff --git a/sync-for-expenses/gen.yaml b/sync-for-expenses/gen.yaml
index 7b18d39e3..06646fce6 100644
--- a/sync-for-expenses/gen.yaml
+++ b/sync-for-expenses/gen.yaml
@@ -1,15 +1,24 @@
configVersion: 1.0.0
management:
- docChecksum: 853aebc76021ec17db9b1abb7a33f340
- docVersion: 2.1.0
- speakeasyVersion: 1.53.0
- generationVersion: 2.58.0
+ docChecksum: 5289c847774e4b13edc645734676ac8c
+ docVersion: prealpha
+ speakeasyVersion: 1.77.1
+ generationVersion: 2.91.4
generation:
sdkClassName: CodatSyncExpenses
singleTagPerOp: false
telemetryEnabled: true
+features:
+ python:
+ core: 2.85.1
+ deprecations: 2.81.1
+ examples: 2.81.1
+ globalSecurity: 2.81.1
+ globalServerURLs: 2.82.0
+ nameOverrides: 2.81.1
+ retries: 2.81.1
python:
- version: 0.34.0
+ version: 0.35.0
author: Codat
description: Push expenses to accounting platforms.
maxMethodParams: 0
diff --git a/sync-for-expenses/pylintrc b/sync-for-expenses/pylintrc
index 21a389459..ab6495dd6 100755
--- a/sync-for-expenses/pylintrc
+++ b/sync-for-expenses/pylintrc
@@ -621,7 +621,7 @@ additional-builtins=
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
-allowed-redefined-builtins=
+allowed-redefined-builtins=id,object
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
diff --git a/sync-for-expenses/setup.py b/sync-for-expenses/setup.py
index 18b3153aa..85b209424 100755
--- a/sync-for-expenses/setup.py
+++ b/sync-for-expenses/setup.py
@@ -10,9 +10,9 @@
setuptools.setup(
name="codat-sync-for-expenses",
- version="0.34.0",
- author="Speakeasy",
- description="Python Client SDK Generated by Speakeasy",
+ version="0.35.0",
+ author="Codat",
+ description="Push expenses to accounting platforms.",
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(where="src"),
diff --git a/sync-for-expenses/src/codatsyncexpenses/mapping_options.py b/sync-for-expenses/src/codatsyncexpenses/accounts.py
similarity index 52%
rename from sync-for-expenses/src/codatsyncexpenses/mapping_options.py
rename to sync-for-expenses/src/codatsyncexpenses/accounts.py
index 89d91994f..7262b774b 100755
--- a/sync-for-expenses/src/codatsyncexpenses/mapping_options.py
+++ b/sync-for-expenses/src/codatsyncexpenses/accounts.py
@@ -5,22 +5,34 @@
from codatsyncexpenses.models import errors, operations, shared
from typing import Optional
-class MappingOptions:
- r"""Mapping options for a companies expenses."""
+class Accounts:
+ r"""Accounts"""
sdk_configuration: SDKConfiguration
def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
- def get_mapping_options(self, request: operations.GetMappingOptionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetMappingOptionsResponse:
- r"""Mapping options
- Gets the expense mapping options for a companies accounting software
+ def create(self, request: operations.CreateAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateAccountResponse:
+ r"""Create account
+ The *Create account* endpoint creates a new [account](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection.
+
+ [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions.
+
+ **Integration-specific behaviour**
+
+ 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).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account.
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.GetMappingOptionsRequest, base_url, '/companies/{companyId}/sync/expenses/mappingOptions', request)
+ url = utils.generate_url(operations.CreateAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/accounts', request)
headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "account", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ query_params = utils.get_query_params(operations.CreateAccountRequest, request)
headers['Accept'] = 'application/json'
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
@@ -31,7 +43,7 @@ def get_mapping_options(self, request: operations.GetMappingOptionsRequest, retr
retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
- return client.request('GET', url, headers=headers)
+ return client.request('POST', url, params=query_params, data=data, files=form, headers=headers)
http_res = utils.retry(do_request, utils.Retries(retry_config, [
'408',
@@ -40,15 +52,15 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.GetMappingOptionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.CreateAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.MappingOptions])
- res.mapping_options = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.CreateAccountResponse])
+ res.create_account_response = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 404, 429]:
+ elif http_res.status_code in [400, 401, 404, 429]:
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
res.error_message = out
diff --git a/sync-for-expenses/src/codatsyncexpenses/companies.py b/sync-for-expenses/src/codatsyncexpenses/companies.py
new file mode 100755
index 000000000..0ae8269af
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/companies.py
@@ -0,0 +1,245 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from .sdkconfiguration import SDKConfiguration
+from codatsyncexpenses import utils
+from codatsyncexpenses.models import errors, operations, shared
+from typing import Optional
+
+class Companies:
+ r"""Create and manage your Codat companies."""
+ sdk_configuration: SDKConfiguration
+
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
+
+ def create(self, request: shared.CompanyRequestBody, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCompanyResponse:
+ r"""Create company
+ Creates a new company that can be used to assign connections to.
+
+ If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = base_url + '/companies'
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "request", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('POST', url, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.CreateCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ res.company = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def delete(self, request: operations.DeleteCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteCompanyResponse:
+ r"""Delete a company
+ Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.DeleteCompanyRequest, base_url, '/companies/{companyId}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('DELETE', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.DeleteCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 204:
+ pass
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def get(self, request: operations.GetCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyResponse:
+ r"""Get company
+ Returns the company for a valid identifier. If the identifier is for a deleted company, a not found response is returned.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetCompanyRequest, base_url, '/companies/{companyId}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ res.company = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def list(self, request: operations.ListCompaniesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCompaniesResponse:
+ r"""List companies
+ Returns a list of your companies. The company schema contains a list of [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) related to the company.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = base_url + '/companies'
+ headers = {}
+ query_params = utils.get_query_params(operations.ListCompaniesRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, params=query_params, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.ListCompaniesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Companies])
+ res.companies = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def update(self, request: operations.UpdateCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCompanyResponse:
+ r"""Update company
+ Updates both the name and description of the company.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.UpdateCompanyRequest, base_url, '/companies/{companyId}', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "company_request_body", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('PUT', url, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.UpdateCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ res.company = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
\ No newline at end of file
diff --git a/sync-for-expenses/src/codatsyncexpenses/configuration.py b/sync-for-expenses/src/codatsyncexpenses/configuration.py
index bd05ddf8d..bd95df771 100755
--- a/sync-for-expenses/src/codatsyncexpenses/configuration.py
+++ b/sync-for-expenses/src/codatsyncexpenses/configuration.py
@@ -6,14 +6,14 @@
from typing import Optional
class Configuration:
- r"""Companies sync configuration."""
+ r"""Manage mapping options and sync configuration."""
sdk_configuration: SDKConfiguration
def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
- def get_company_configuration(self, request: operations.GetCompanyConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyConfigurationResponse:
+ def get(self, request: operations.GetCompanyConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyConfigurationResponse:
r"""Get company configuration
Gets a companies expense sync configuration
"""
@@ -58,13 +58,58 @@ def do_request():
return res
- def save_company_configuration(self, request: operations.SaveCompanyConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.SaveCompanyConfigurationResponse:
+ def get_mapping_options(self, request: operations.GetMappingOptionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetMappingOptionsResponse:
+ r"""Mapping options
+ Gets the expense mapping options for a companies accounting software
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetMappingOptionsRequest, base_url, '/companies/{companyId}/sync/expenses/mappingOptions', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetMappingOptionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.MappingOptions])
+ res.mapping_options = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def set(self, request: operations.SetCompanyConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.SetCompanyConfigurationResponse:
r"""Set company configuration
Sets a companies expense sync configuration
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.SaveCompanyConfigurationRequest, base_url, '/companies/{companyId}/sync/expenses/config', request)
+ url = utils.generate_url(operations.SetCompanyConfigurationRequest, base_url, '/companies/{companyId}/sync/expenses/config', request)
headers = {}
req_content_type, data, form = utils.serialize_request_body(request, "company_configuration", 'json')
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
@@ -88,7 +133,7 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.SaveCompanyConfigurationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.SetCompanyConfigurationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
diff --git a/sync-for-expenses/src/codatsyncexpenses/connections.py b/sync-for-expenses/src/codatsyncexpenses/connections.py
index 72ef22c7a..b3e0980dd 100755
--- a/sync-for-expenses/src/codatsyncexpenses/connections.py
+++ b/sync-for-expenses/src/codatsyncexpenses/connections.py
@@ -13,6 +13,56 @@ def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
+ def create(self, request: operations.CreateConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateConnectionResponse:
+ r"""Create connection
+ Creates a connection for the company by providing a valid `platformKey`.
+
+ Use the [List Integrations](https://docs.codat.io/sync-for-expenses-api#/operations/list-integrations) endpoint to access valid platform keys.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.CreateConnectionRequest, base_url, '/companies/{companyId}/connections', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('POST', url, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.CreateConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ res.connection = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
def create_partner_expense_connection(self, request: operations.CreatePartnerExpenseConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreatePartnerExpenseConnectionResponse:
r"""Create Partner Expense connection
Creates a Partner Expense data connection
@@ -44,8 +94,8 @@ def do_request():
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.DataConnection])
- res.data_connection = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ res.connection = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [400, 401, 404, 429]:
@@ -57,4 +107,185 @@ def do_request():
return res
+
+ def delete(self, request: operations.DeleteConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteConnectionResponse:
+ r"""Delete connection
+ Revoke and remove a connection from a company.
+ This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.DeleteConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('DELETE', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.DeleteConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ pass
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def get(self, request: operations.GetConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetConnectionResponse:
+ r"""Get connection
+ Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ res.connection = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def list(self, request: operations.ListConnectionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListConnectionsResponse:
+ r"""List connections
+ List the connections for a company.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.ListConnectionsRequest, base_url, '/companies/{companyId}/connections', request)
+ headers = {}
+ query_params = utils.get_query_params(operations.ListConnectionsRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, params=query_params, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.ListConnectionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Connections])
+ res.connections = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def unlink(self, request: operations.UnlinkConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UnlinkConnectionResponse:
+ r"""Unlink connection
+ This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.UnlinkConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('PATCH', url, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.UnlinkConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ res.connection = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
\ No newline at end of file
diff --git a/sync-for-expenses/src/codatsyncexpenses/customers.py b/sync-for-expenses/src/codatsyncexpenses/customers.py
new file mode 100755
index 000000000..c872aa864
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/customers.py
@@ -0,0 +1,230 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from .sdkconfiguration import SDKConfiguration
+from codatsyncexpenses import utils
+from codatsyncexpenses.models import errors, operations, shared
+from typing import Optional
+
+class Customers:
+ r"""Customers"""
+ sdk_configuration: SDKConfiguration
+
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
+
+ def create(self, request: operations.CreateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCustomerResponse:
+ r"""Create customer
+ The *Create customer* endpoint creates a new [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
+
+ [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.CreateCustomerRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/customers', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "customer", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ query_params = utils.get_query_params(operations.CreateCustomerRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('POST', url, params=query_params, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.CreateCustomerResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.CreateCustomerResponse])
+ res.create_customer_response = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCustomerResponse:
+ r"""Get customer
+ The *Get customer* endpoint returns a single customer for a given customerId.
+
+ [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support getting a specific customer.
+
+ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetCustomerRequest, base_url, '/companies/{companyId}/data/customers/{customerId}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetCustomerResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Customer])
+ res.customer = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 409, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def list(self, request: operations.ListCustomersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomersResponse:
+ r"""List customers
+ The *List customers* endpoint returns a list of [customers](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
+
+ [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.ListCustomersRequest, base_url, '/companies/{companyId}/data/customers', request)
+ headers = {}
+ query_params = utils.get_query_params(operations.ListCustomersRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, params=query_params, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.ListCustomersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Customers])
+ res.customers = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 409]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def update(self, request: operations.UpdateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCustomerResponse:
+ r"""Update customer
+ The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection.
+
+ [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.UpdateCustomerRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/customers/{customerId}', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "customer", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ query_params = utils.get_query_params(operations.UpdateCustomerRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.UpdateCustomerResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateCustomerResponse])
+ res.update_customer_response = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
\ No newline at end of file
diff --git a/sync-for-expenses/src/codatsyncexpenses/expenses.py b/sync-for-expenses/src/codatsyncexpenses/expenses.py
index 93d6f87a6..fff74d53b 100755
--- a/sync-for-expenses/src/codatsyncexpenses/expenses.py
+++ b/sync-for-expenses/src/codatsyncexpenses/expenses.py
@@ -13,13 +13,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
- def create_expense_dataset(self, request: operations.CreateExpenseDatasetRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateExpenseDatasetResponse:
- r"""Create expense-transactions
+ def create(self, request: operations.CreateExpenseTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateExpenseTransactionResponse:
+ r"""Create expense transaction
Create an expense transaction
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.CreateExpenseDatasetRequest, base_url, '/companies/{companyId}/sync/expenses/data/expense-transactions', request)
+ url = utils.generate_url(operations.CreateExpenseTransactionRequest, base_url, '/companies/{companyId}/sync/expenses/data/expense-transactions', request)
headers = {}
req_content_type, data, form = utils.serialize_request_body(request, "create_expense_request", 'json')
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
@@ -43,7 +43,7 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.CreateExpenseDatasetResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.CreateExpenseTransactionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
@@ -61,13 +61,13 @@ def do_request():
return res
- def update_expense_dataset(self, request: operations.UpdateExpenseDatasetRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateExpenseDatasetResponse:
+ def update(self, request: operations.UpdateExpenseTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateExpenseTransactionResponse:
r"""Update expense-transactions
Update an expense transaction
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.UpdateExpenseDatasetRequest, base_url, '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}', request)
+ url = utils.generate_url(operations.UpdateExpenseTransactionRequest, base_url, '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}', request)
headers = {}
req_content_type, data, form = utils.serialize_request_body(request, "update_expense_request", 'json')
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
@@ -91,12 +91,12 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.UpdateExpenseDatasetResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.UpdateExpenseTransactionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 202:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[operations.UpdateExpenseDataset202ApplicationJSON])
- res.update_expense_dataset_202_application_json_object = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateExpenseResponse])
+ res.update_expense_response = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [400, 401, 404, 422, 429]:
@@ -109,13 +109,13 @@ def do_request():
return res
- def upload_attachment(self, request: operations.UploadAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadAttachmentResponse:
+ def upload_attachment(self, request: operations.UploadExpenseAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadExpenseAttachmentResponse:
r"""Upload attachment
Creates an attachment in the accounting software against the given transactionId
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.UploadAttachmentRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments', request)
+ url = utils.generate_url(operations.UploadExpenseAttachmentRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments', request)
headers = {}
req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart')
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
@@ -139,7 +139,7 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.UploadAttachmentResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.UploadExpenseAttachmentResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
diff --git a/sync-for-expenses/src/codatsyncexpenses/sync_status.py b/sync-for-expenses/src/codatsyncexpenses/manage_data.py
similarity index 58%
rename from sync-for-expenses/src/codatsyncexpenses/sync_status.py
rename to sync-for-expenses/src/codatsyncexpenses/manage_data.py
index a82906aeb..d4b7f0e4d 100755
--- a/sync-for-expenses/src/codatsyncexpenses/sync_status.py
+++ b/sync-for-expenses/src/codatsyncexpenses/manage_data.py
@@ -5,21 +5,21 @@
from codatsyncexpenses.models import errors, operations, shared
from typing import Optional
-class SyncStatus:
- r"""Check the status of ongoing or previous expense syncs."""
+class ManageData:
+ r"""Asynchronously retrieve data from an integration to refresh data in Codat."""
sdk_configuration: SDKConfiguration
def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
- def get_last_successful_sync(self, request: operations.GetLastSuccessfulSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetLastSuccessfulSyncResponse:
- r"""Last successful sync
- Gets the status of the last successful sync
+ def get(self, request: operations.GetDataStatusRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDataStatusResponse:
+ r"""Get data status
+ Get the state of each data type for a company
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.GetLastSuccessfulSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status', request)
+ url = utils.generate_url(operations.GetDataStatusRequest, base_url, '/companies/{companyId}/dataStatus', request)
headers = {}
headers['Accept'] = 'application/json'
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
@@ -40,12 +40,12 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.GetLastSuccessfulSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.GetDataStatusResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.CompanySyncStatus])
- res.company_sync_status = out
+ out = utils.unmarshal_json(http_res.text, Optional[dict[str, shared.DataStatus]])
+ res.data_status_response = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [401, 404, 429]:
@@ -58,13 +58,13 @@ def do_request():
return res
- def get_latest_sync(self, request: operations.GetLatestSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetLatestSyncResponse:
- r"""Latest sync status
- Gets the latest sync status
+ def get_pull_operation(self, request: operations.GetPullOperationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPullOperationResponse:
+ r"""Get pull operation
+ Retrieve information about a single dataset or pull operation.
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.GetLatestSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/latest/status', request)
+ url = utils.generate_url(operations.GetPullOperationRequest, base_url, '/companies/{companyId}/data/history/{datasetId}', request)
headers = {}
headers['Accept'] = 'application/json'
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
@@ -85,12 +85,12 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.GetLatestSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.GetPullOperationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.CompanySyncStatus])
- res.company_sync_status = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.PullOperation])
+ res.pull_operation = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [401, 404, 429]:
@@ -103,14 +103,15 @@ def do_request():
return res
- def get_sync_by_id(self, request: operations.GetSyncByIDRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSyncByIDResponse:
- r"""Get Sync status
- Get the sync status for a specified sync
+ def list_pull_operations(self, request: operations.ListPullOperationsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPullOperationsResponse:
+ r"""List pull operations
+ Gets the pull operation history (datasets) for a given company.
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.GetSyncByIDRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/{syncId}/status', request)
+ url = utils.generate_url(operations.ListPullOperationsRequest, base_url, '/companies/{companyId}/data/history', request)
headers = {}
+ query_params = utils.get_query_params(operations.ListPullOperationsRequest, request)
headers['Accept'] = 'application/json'
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
@@ -121,7 +122,7 @@ def get_sync_by_id(self, request: operations.GetSyncByIDRequest, retries: Option
retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
- return client.request('GET', url, headers=headers)
+ return client.request('GET', url, params=query_params, headers=headers)
http_res = utils.retry(do_request, utils.Retries(retry_config, [
'408',
@@ -130,14 +131,59 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.GetSyncByIDResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.ListPullOperationsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.CompanySyncStatus])
- res.company_sync_status = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.PullOperations])
+ res.pull_operations = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def refresh_all_data_types(self, request: operations.RefreshAllDataTypesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.RefreshAllDataTypesResponse:
+ r"""Refresh all data
+ Refreshes all data types with `fetch on first link` set to `true` for a given company.
+
+ This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
+
+ [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.RefreshAllDataTypesRequest, base_url, '/companies/{companyId}/data/all', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('POST', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.RefreshAllDataTypesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 204:
+ pass
elif http_res.status_code in [401, 404, 429]:
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
@@ -148,14 +194,17 @@ def do_request():
return res
- def list_syncs(self, request: operations.ListSyncsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSyncsResponse:
- r"""List sync statuses
- Gets a list of sync statuses
+ def refresh_data_type(self, request: operations.RefreshDataTypeRequest, retries: Optional[utils.RetryConfig] = None) -> operations.RefreshDataTypeResponse:
+ r"""Refresh data type
+ Refreshes a given data type for a given company.
+
+ This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.ListSyncsRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/list/status', request)
+ url = utils.generate_url(operations.RefreshDataTypeRequest, base_url, '/companies/{companyId}/data/queue/{dataType}', request)
headers = {}
+ query_params = utils.get_query_params(operations.RefreshDataTypeRequest, request)
headers['Accept'] = 'application/json'
headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
@@ -166,7 +215,7 @@ def list_syncs(self, request: operations.ListSyncsRequest, retries: Optional[uti
retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
- return client.request('GET', url, headers=headers)
+ return client.request('POST', url, params=query_params, headers=headers)
http_res = utils.retry(do_request, utils.Retries(retry_config, [
'408',
@@ -175,12 +224,12 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.ListSyncsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.RefreshDataTypeResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[list[shared.CompanySyncStatus]])
- res.company_sync_statuses = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.PullOperation])
+ res.pull_operation = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [401, 404, 429]:
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py
index 88413d5b0..4082aab3b 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py
@@ -1,18 +1,44 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-from .create_expense_dataset import *
+from .create_account import *
+from .create_company import *
+from .create_connection import *
+from .create_customer import *
+from .create_expense_transaction import *
from .create_partner_expense_connection import *
+from .create_supplier import *
+from .delete_company import *
+from .delete_connection import *
+from .get_company import *
from .get_company_configuration import *
+from .get_connection import *
+from .get_customer import *
+from .get_data_status import *
from .get_last_successful_sync import *
from .get_latest_sync import *
from .get_mapping_options import *
+from .get_pull_operation import *
+from .get_push_operation import *
+from .get_supplier import *
from .get_sync_by_id import *
from .get_sync_transaction import *
-from .intiate_sync import *
+from .initiate_sync import *
+from .list_companies import *
+from .list_connections import *
+from .list_customers import *
+from .list_pull_operations import *
+from .list_push_operations import *
+from .list_suppliers import *
from .list_sync_transactions import *
from .list_syncs import *
-from .save_company_configuration import *
-from .update_expense_dataset import *
-from .upload_attachment import *
+from .refresh_all_data_types import *
+from .refresh_data_type import *
+from .set_company_configuration import *
+from .unlink_connection import *
+from .update_company import *
+from .update_customer import *
+from .update_expense_transaction import *
+from .update_supplier import *
+from .upload_expense_attachment import *
-__all__ = ["CreateExpenseDatasetRequest","CreateExpenseDatasetResponse","CreatePartnerExpenseConnectionRequest","CreatePartnerExpenseConnectionResponse","GetCompanyConfigurationRequest","GetCompanyConfigurationResponse","GetLastSuccessfulSyncRequest","GetLastSuccessfulSyncResponse","GetLatestSyncRequest","GetLatestSyncResponse","GetMappingOptionsRequest","GetMappingOptionsResponse","GetSyncByIDRequest","GetSyncByIDResponse","GetSyncTransactionRequest","GetSyncTransactionResponse","IntiateSyncRequest","IntiateSyncResponse","ListSyncTransactionsRequest","ListSyncTransactionsResponse","ListSyncsRequest","ListSyncsResponse","SaveCompanyConfigurationRequest","SaveCompanyConfigurationResponse","UpdateExpenseDataset202ApplicationJSON","UpdateExpenseDatasetRequest","UpdateExpenseDatasetResponse","UploadAttachmentRequest","UploadAttachmentRequestBody","UploadAttachmentResponse"]
+__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateCustomerRequest","CreateCustomerResponse","CreateExpenseTransactionRequest","CreateExpenseTransactionResponse","CreatePartnerExpenseConnectionRequest","CreatePartnerExpenseConnectionResponse","CreateSupplierRequest","CreateSupplierResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","GetCompanyConfigurationRequest","GetCompanyConfigurationResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCustomerRequest","GetCustomerResponse","GetDataStatusRequest","GetDataStatusResponse","GetLastSuccessfulSyncRequest","GetLastSuccessfulSyncResponse","GetLatestSyncRequest","GetLatestSyncResponse","GetMappingOptionsRequest","GetMappingOptionsResponse","GetPullOperationRequest","GetPullOperationResponse","GetPushOperationRequest","GetPushOperationResponse","GetSupplierRequest","GetSupplierResponse","GetSyncByIDRequest","GetSyncByIDResponse","GetSyncTransactionRequest","GetSyncTransactionResponse","InitiateSyncRequest","InitiateSyncResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListCustomersRequest","ListCustomersResponse","ListPullOperationsRequest","ListPullOperationsResponse","ListPushOperationsRequest","ListPushOperationsResponse","ListSuppliersRequest","ListSuppliersResponse","ListSyncTransactionsRequest","ListSyncTransactionsResponse","ListSyncsRequest","ListSyncsResponse","RefreshAllDataTypesRequest","RefreshAllDataTypesResponse","RefreshDataTypeRequest","RefreshDataTypeResponse","SetCompanyConfigurationRequest","SetCompanyConfigurationResponse","UnlinkConnectionRequest","UnlinkConnectionRequestBody","UnlinkConnectionResponse","UpdateCompanyRequest","UpdateCompanyResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateExpenseTransactionRequest","UpdateExpenseTransactionResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadExpenseAttachmentRequest","UploadExpenseAttachmentRequestBody","UploadExpenseAttachmentResponse"]
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py
new file mode 100755
index 000000000..de86deb4a
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py
@@ -0,0 +1,34 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import account as shared_account
+from ..shared import createaccountresponse as shared_createaccountresponse
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class CreateAccountRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+ account: Optional[shared_account.Account] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
+
+
+
+
+
+@dataclasses.dataclass
+class CreateAccountResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ create_account_response: Optional[shared_createaccountresponse.CreateAccountResponse] = dataclasses.field(default=None)
+ r"""Success"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""The request made is not valid."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py
new file mode 100755
index 000000000..a8a25afd3
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import company as shared_company
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class CreateCompanyResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ company: Optional[shared_company.Company] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""The request made is not valid."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py
new file mode 100755
index 000000000..bd14c20da
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py
@@ -0,0 +1,42 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import connection as shared_connection
+from ..shared import errormessage as shared_errormessage
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class CreateConnectionRequestBody:
+ platform_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platformKey'), 'exclude': lambda f: f is None }})
+
+
+
+
+
+@dataclasses.dataclass
+class CreateConnectionRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ request_body: Optional[CreateConnectionRequestBody] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+
+
+
+
+
+@dataclasses.dataclass
+class CreateConnectionResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py
new file mode 100755
index 000000000..f1fe24491
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py
@@ -0,0 +1,34 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import createcustomerresponse as shared_createcustomerresponse
+from ..shared import customer as shared_customer
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class CreateCustomerRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+ customer: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
+
+
+
+
+
+@dataclasses.dataclass
+class CreateCustomerResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ create_customer_response: Optional[shared_createcustomerresponse.CreateCustomerResponse] = dataclasses.field(default=None)
+ r"""Success"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""The request made is not valid."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_dataset.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py
similarity index 93%
rename from sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_dataset.py
rename to sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py
index d6a623d54..0c7a7500d 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_dataset.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py
@@ -11,7 +11,7 @@
@dataclasses.dataclass
-class CreateExpenseDatasetRequest:
+class CreateExpenseTransactionRequest:
company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
create_expense_request: Optional[shared_createexpenserequest.CreateExpenseRequest] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
@@ -20,7 +20,7 @@ class CreateExpenseDatasetRequest:
@dataclasses.dataclass
-class CreateExpenseDatasetResponse:
+class CreateExpenseTransactionResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
create_expense_response: Optional[shared_createexpenseresponse.CreateExpenseResponse] = dataclasses.field(default=None)
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py
index c2b6922e0..19edd9eb6 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import dataclasses
import requests as requests_http
-from ..shared import dataconnection as shared_dataconnection
+from ..shared import connection as shared_connection
from ..shared import errormessage as shared_errormessage
from typing import Optional
@@ -21,7 +21,7 @@ class CreatePartnerExpenseConnectionRequest:
class CreatePartnerExpenseConnectionResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
- data_connection: Optional[shared_dataconnection.DataConnection] = dataclasses.field(default=None)
+ connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
r"""Success"""
error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
r"""The request made is not valid."""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py
new file mode 100755
index 000000000..9bdf8f9f4
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py
@@ -0,0 +1,34 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import createsupplierresponse as shared_createsupplierresponse
+from ..shared import errormessage as shared_errormessage
+from ..shared import supplier as shared_supplier
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class CreateSupplierRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+ supplier: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
+
+
+
+
+
+@dataclasses.dataclass
+class CreateSupplierResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ create_supplier_response: Optional[shared_createsupplierresponse.CreateSupplierResponse] = dataclasses.field(default=None)
+ r"""Success"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""The request made is not valid."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py
new file mode 100755
index 000000000..b5e6a5b86
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class DeleteCompanyRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class DeleteCompanyResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py
new file mode 100755
index 000000000..e12219d11
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class DeleteConnectionRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class DeleteConnectionResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py
new file mode 100755
index 000000000..b9881123d
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import company as shared_company
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetCompanyRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class GetCompanyResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ company: Optional[shared_company.Company] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py
new file mode 100755
index 000000000..af6188ccb
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import connection as shared_connection
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetConnectionRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class GetConnectionResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py
new file mode 100755
index 000000000..079a11848
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import customer as shared_customer
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetCustomerRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ customer_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'customerId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class GetCustomerResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ customer: Optional[shared_customer.Customer] = dataclasses.field(default=None)
+ r"""Success"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py
new file mode 100755
index 000000000..321711a5a
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import datastatus as shared_datastatus
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetDataStatusRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class GetDataStatusResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ data_status_response: Optional[dict[str, shared_datastatus.DataStatus]] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py
new file mode 100755
index 000000000..b671bb1eb
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import pulloperation as shared_pulloperation
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetPullOperationRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ dataset_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'datasetId', 'style': 'simple', 'explode': False }})
+ r"""Unique ID of a dataset or pull operation."""
+
+
+
+
+
+@dataclasses.dataclass
+class GetPullOperationResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ pull_operation: Optional[shared_pulloperation.PullOperation] = dataclasses.field(default=None)
+ r"""OK"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py
new file mode 100755
index 000000000..eee46eb05
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import pushoperation as shared_pushoperation
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetPushOperationRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ push_operation_key: str = dataclasses.field(metadata={'path_param': { 'field_name': 'pushOperationKey', 'style': 'simple', 'explode': False }})
+ r"""Push operation key."""
+
+
+
+
+
+@dataclasses.dataclass
+class GetPushOperationResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ push_operation: Optional[shared_pushoperation.PushOperation] = dataclasses.field(default=None)
+ r"""OK"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py
new file mode 100755
index 000000000..0426ef024
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import supplier as shared_supplier
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetSupplierRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ supplier_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'supplierId', 'style': 'simple', 'explode': False }})
+ r"""Unique identifier for a supplier"""
+
+
+
+
+
+@dataclasses.dataclass
+class GetSupplierResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ supplier: Optional[shared_supplier.Supplier] = dataclasses.field(default=None)
+ r"""Success"""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py
index 8245aa252..826276701 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py
@@ -4,7 +4,7 @@
import dataclasses
import requests as requests_http
from ..shared import errormessage as shared_errormessage
-from ..shared import transactionmetadata as shared_transactionmetadata
+from ..shared import transaction as shared_transaction
from typing import Optional
@@ -28,7 +28,7 @@ class GetSyncTransactionResponse:
error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
r"""Your API request was not properly authorized."""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
- transaction_metadata: Optional[list[shared_transactionmetadata.TransactionMetadata]] = dataclasses.field(default=None)
+ transaction: Optional[shared_transaction.Transaction] = dataclasses.field(default=None)
r"""Success"""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/intiate_sync.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py
similarity index 65%
rename from sync-for-expenses/src/codatsyncexpenses/models/operations/intiate_sync.py
rename to sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py
index 1e375ab91..ae2ed9810 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/intiate_sync.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py
@@ -3,27 +3,27 @@
from __future__ import annotations
import dataclasses
import requests as requests_http
-from ..shared import codaterrormessage as shared_codaterrormessage
-from ..shared import postsync as shared_postsync
+from ..shared import errormessage as shared_errormessage
+from ..shared import initiatesync as shared_initiatesync
from ..shared import syncinitiated as shared_syncinitiated
from typing import Optional
@dataclasses.dataclass
-class IntiateSyncRequest:
+class InitiateSyncRequest:
company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- post_sync: Optional[shared_postsync.PostSync] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+ initiate_sync: Optional[shared_initiatesync.InitiateSync] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
@dataclasses.dataclass
-class IntiateSyncResponse:
+class InitiateSyncResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
- codat_error_message: Optional[shared_codaterrormessage.CodatErrorMessage] = dataclasses.field(default=None)
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
r"""If model is incorrect"""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
sync_initiated: Optional[shared_syncinitiated.SyncInitiated] = dataclasses.field(default=None)
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py
new file mode 100755
index 000000000..bef24c7d7
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py
@@ -0,0 +1,37 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import companies as shared_companies
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class ListCompaniesRequest:
+ order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+
+
+
+@dataclasses.dataclass
+class ListCompaniesResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ companies: Optional[shared_companies.Companies] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your `query` parameter was not correctly formed"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py
new file mode 100755
index 000000000..a8f988177
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import connections as shared_connections
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class ListConnectionsRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+
+
+
+@dataclasses.dataclass
+class ListConnectionsResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ connections: Optional[shared_connections.Connections] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your `query` parameter was not correctly formed"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py
new file mode 100755
index 000000000..78113fd57
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import customers as shared_customers
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class ListCustomersRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+
+
+
+@dataclasses.dataclass
+class ListCustomersResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ customers: Optional[shared_customers.Customers] = dataclasses.field(default=None)
+ r"""Success"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your `query` parameter was not correctly formed"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py
new file mode 100755
index 000000000..25f30893d
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import pulloperations as shared_pulloperations
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class ListPullOperationsRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+
+
+
+@dataclasses.dataclass
+class ListPullOperationsResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your `query` parameter was not correctly formed"""
+ pull_operations: Optional[shared_pulloperations.PullOperations] = dataclasses.field(default=None)
+ r"""OK"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py
new file mode 100755
index 000000000..ea18d9769
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import pushoperations as shared_pushoperations
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class ListPushOperationsRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+
+
+
+@dataclasses.dataclass
+class ListPushOperationsResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your `query` parameter was not correctly formed"""
+ push_operations: Optional[shared_pushoperations.PushOperations] = dataclasses.field(default=None)
+ r"""OK"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py
new file mode 100755
index 000000000..952e53c2e
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import suppliers as shared_suppliers
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class ListSuppliersRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+
+
+
+@dataclasses.dataclass
+class ListSuppliersResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your `query` parameter was not correctly formed"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ suppliers: Optional[shared_suppliers.Suppliers] = dataclasses.field(default=None)
+ r"""Success"""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py
index 61ccfb210..f75fa2e44 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py
@@ -4,7 +4,7 @@
import dataclasses
import requests as requests_http
from ..shared import errormessage as shared_errormessage
-from ..shared import transactionmetadatalist as shared_transactionmetadatalist
+from ..shared import transactions as shared_transactions
from typing import Optional
@@ -30,7 +30,7 @@ class ListSyncTransactionsResponse:
error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
r"""Your API request was not properly authorized."""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
- transaction_metadata_list: Optional[shared_transactionmetadatalist.TransactionMetadataList] = dataclasses.field(default=None)
+ transactions: Optional[shared_transactions.Transactions] = dataclasses.field(default=None)
r"""Success"""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py
new file mode 100755
index 000000000..1380cf252
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class RefreshAllDataTypesRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class RefreshAllDataTypesResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py
new file mode 100755
index 000000000..23151273d
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import datatype as shared_datatype
+from ..shared import errormessage as shared_errormessage
+from ..shared import pulloperation as shared_pulloperation
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class RefreshDataTypeRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ data_type: shared_datatype.DataType = dataclasses.field(metadata={'path_param': { 'field_name': 'dataType', 'style': 'simple', 'explode': False }})
+ r"""The key of a Codat data type"""
+ connection_id: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'connectionId', 'style': 'form', 'explode': True }})
+ r"""Optionally, provide a data connection id to only queue pull operations on that connection."""
+
+
+
+
+
+@dataclasses.dataclass
+class RefreshDataTypeResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ pull_operation: Optional[shared_pulloperation.PullOperation] = dataclasses.field(default=None)
+ r"""OK"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/save_company_configuration.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py
similarity index 93%
rename from sync-for-expenses/src/codatsyncexpenses/models/operations/save_company_configuration.py
rename to sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py
index e823a3ce8..e776ee87f 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/save_company_configuration.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py
@@ -10,7 +10,7 @@
@dataclasses.dataclass
-class SaveCompanyConfigurationRequest:
+class SetCompanyConfigurationRequest:
company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
company_configuration: Optional[shared_companyconfiguration.CompanyConfiguration] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
@@ -19,7 +19,7 @@ class SaveCompanyConfigurationRequest:
@dataclasses.dataclass
-class SaveCompanyConfigurationResponse:
+class SetCompanyConfigurationResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
company_configuration: Optional[shared_companyconfiguration.CompanyConfiguration] = dataclasses.field(default=None)
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py
new file mode 100755
index 000000000..d219916fb
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py
@@ -0,0 +1,43 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import connection as shared_connection
+from ..shared import errormessage as shared_errormessage
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class UnlinkConnectionRequestBody:
+ status: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
+
+
+
+
+
+@dataclasses.dataclass
+class UnlinkConnectionRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+ request_body: Optional[UnlinkConnectionRequestBody] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+
+
+
+
+
+@dataclasses.dataclass
+class UnlinkConnectionResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py
new file mode 100755
index 000000000..22578dcd0
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py
@@ -0,0 +1,32 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import company as shared_company
+from ..shared import companyrequestbody as shared_companyrequestbody
+from ..shared import errormessage as shared_errormessage
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class UpdateCompanyRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ company_request_body: Optional[shared_companyrequestbody.CompanyRequestBody] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+
+
+
+
+
+@dataclasses.dataclass
+class UpdateCompanyResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ company: Optional[shared_company.Company] = dataclasses.field(default=None)
+ r"""OK"""
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""Your API request was not properly authorized."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py
new file mode 100755
index 000000000..0cf11ab9e
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py
@@ -0,0 +1,37 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import customer as shared_customer
+from ..shared import errormessage as shared_errormessage
+from ..shared import updatecustomerresponse as shared_updatecustomerresponse
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class UpdateCustomerRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+ customer_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'customerId', 'style': 'simple', 'explode': False }})
+ customer: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+ force_update: Optional[bool] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'forceUpdate', 'style': 'form', 'explode': True }})
+ r"""When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check."""
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
+
+
+
+
+
+@dataclasses.dataclass
+class UpdateCustomerResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""The request made is not valid."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ update_customer_response: Optional[shared_updatecustomerresponse.UpdateCustomerResponse] = dataclasses.field(default=None)
+ r"""Success"""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_dataset.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py
similarity index 66%
rename from sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_dataset.py
rename to sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py
index e8419e9a5..ead3539c4 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_dataset.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py
@@ -5,14 +5,13 @@
import requests as requests_http
from ..shared import errormessage as shared_errormessage
from ..shared import updateexpenserequest as shared_updateexpenserequest
-from codatsyncexpenses import utils
-from dataclasses_json import Undefined, dataclass_json
+from ..shared import updateexpenseresponse as shared_updateexpenseresponse
from typing import Optional
@dataclasses.dataclass
-class UpdateExpenseDatasetRequest:
+class UpdateExpenseTransactionRequest:
company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
transaction_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'transactionId', 'style': 'simple', 'explode': False }})
r"""The unique identifier for your SMB's transaction."""
@@ -21,25 +20,15 @@ class UpdateExpenseDatasetRequest:
-@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class UpdateExpenseDataset202ApplicationJSON:
- r"""Accepted"""
- sync_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('syncId'), 'exclude': lambda f: f is None }})
-
-
-
-
-
-@dataclasses.dataclass
-class UpdateExpenseDatasetResponse:
+class UpdateExpenseTransactionResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
r"""The request made is not valid."""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
- update_expense_dataset_202_application_json_object: Optional[UpdateExpenseDataset202ApplicationJSON] = dataclasses.field(default=None)
+ update_expense_response: Optional[shared_updateexpenseresponse.UpdateExpenseResponse] = dataclasses.field(default=None)
r"""Accepted"""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py
new file mode 100755
index 000000000..2cc2c53a4
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import errormessage as shared_errormessage
+from ..shared import supplier as shared_supplier
+from ..shared import updatesupplierresponse as shared_updatesupplierresponse
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class UpdateSupplierRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+ connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
+ supplier_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'supplierId', 'style': 'simple', 'explode': False }})
+ r"""Unique identifier for a supplier"""
+ force_update: Optional[bool] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'forceUpdate', 'style': 'form', 'explode': True }})
+ r"""When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check."""
+ supplier: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
+
+
+
+
+
+@dataclasses.dataclass
+class UpdateSupplierResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None)
+ r"""The request made is not valid."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ update_supplier_response: Optional[shared_updatesupplierresponse.UpdateSupplierResponse] = dataclasses.field(default=None)
+ r"""Success"""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_attachment.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py
similarity index 82%
rename from sync-for-expenses/src/codatsyncexpenses/models/operations/upload_attachment.py
rename to sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py
index 42c2303cc..c3e6b5bfd 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_attachment.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py
@@ -10,7 +10,7 @@
@dataclasses.dataclass
-class UploadAttachmentRequestBody:
+class UploadExpenseAttachmentRequestBody:
content: bytes = dataclasses.field(metadata={'multipart_form': { 'content': True }})
request_body: str = dataclasses.field(metadata={'multipart_form': { 'field_name': 'requestBody' }})
@@ -19,20 +19,20 @@ class UploadAttachmentRequestBody:
@dataclasses.dataclass
-class UploadAttachmentRequest:
+class UploadExpenseAttachmentRequest:
company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
sync_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'syncId', 'style': 'simple', 'explode': False }})
r"""Unique identifier for a sync."""
transaction_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'transactionId', 'style': 'simple', 'explode': False }})
r"""The unique identifier for your SMB's transaction."""
- request_body: Optional[UploadAttachmentRequestBody] = dataclasses.field(default=None, metadata={'multipart_form': { 'file': True }, 'request': { 'media_type': 'multipart/form-data' }})
+ request_body: Optional[UploadExpenseAttachmentRequestBody] = dataclasses.field(default=None, metadata={'multipart_form': { 'file': True }, 'request': { 'media_type': 'multipart/form-data' }})
@dataclasses.dataclass
-class UploadAttachmentResponse:
+class UploadExpenseAttachmentResponse:
content_type: str = dataclasses.field()
status_code: int = dataclasses.field()
attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None)
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py
index 16b99c368..9e6fc079d 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py
@@ -1,38 +1,64 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+from .account import *
from .accountmappinginfo import *
+from .accountstatus import *
+from .accounttype import *
from .attachment import *
from .bankaccount import *
-from .codaterrormessage import *
+from .companies import *
+from .company import *
from .companyconfiguration import *
+from .companyrequestbody import *
from .companysyncstatus import *
+from .connection import *
+from .connections import *
from .contactref import *
+from .createaccountresponse import *
+from .createcustomerresponse import *
from .createexpenserequest import *
from .createexpenseresponse import *
+from .createsupplierresponse import *
from .customer import *
-from .dataconnection import *
+from .customers import *
from .dataconnectionerror import *
from .dataconnectionstatus import *
+from .datastatus import *
+from .datatype import *
from .errormessage import *
from .expensetransaction import *
from .expensetransactionline import *
-from .expensetype import *
-from .hallink import *
+from .halref import *
+from .initiatesync import *
from .integrationtype import *
+from .links import *
from .mappingoptions import *
-from .postsync import *
+from .pulloperation import *
+from .pulloperations import *
+from .pushchangetype import *
+from .pushoperation import *
+from .pushoperationchange import *
+from .pushoperationref import *
+from .pushoperations import *
+from .pushoperationstatus import *
from .recordref import *
from .security import *
from .supplier import *
+from .suppliers import *
from .synccompletewebhook import *
from .syncfailedwebhook import *
from .syncinitiated import *
from .syncstartedwebhook import *
from .taxratemappinginfo import *
from .trackingcategorymappinginfo import *
-from .transactionmetadata import *
-from .transactionmetadatalist import *
+from .transaction import *
+from .transactions import *
from .transactionstatus import *
+from .updatecustomerresponse import *
from .updateexpenserequest import *
+from .updateexpenseresponse import *
+from .updatesupplierresponse import *
+from .validation import *
+from .validationitem import *
-__all__ = ["AccountMappingInfo","AccountMappingInfoAccountType","AccountMappingInfoValidTransactionTypes","Attachment","BankAccount","CodatErrorMessage","CodatErrorMessageValidation","CodatErrorMessageValidationErrors","CodatErrorMessageValidationInternals","CodatErrorMessageValidationWarnings","CompanyConfiguration","CompanySyncStatus","ContactRef","ContactRefContactType","CreateExpenseRequest","CreateExpenseResponse","Customer","DataConnection","DataConnectionError","DataConnectionSourceType","DataConnectionStatus","ErrorMessage","ExpenseTransaction","ExpenseTransactionLine","ExpenseTransactionType","ExpenseType","HalLink","IntegrationType","MappingOptions","PostSync","RecordRef","Security","Supplier","SyncCompleteWebhook","SyncCompleteWebhookData","SyncFailedWebhook","SyncFailedWebhookData","SyncInitiated","SyncStartedWebhook","SyncStartedWebhookData","TaxRateMappingInfo","TaxRateMappingInfoValidTransactionTypes","TrackingCategoryMappingInfo","TransactionMetadata","TransactionMetadataList","TransactionMetadataListLinks","TransactionStatus","UpdateExpenseRequest"]
+__all__ = ["Account","AccountMappingInfo","AccountMappingInfoAccountType","AccountMappingInfoValidTransactionTypes","AccountMetadata","AccountStatus","AccountType","AccountValidDataTypeLinks","Attachment","BankAccount","Companies","Company","CompanyConfiguration","CompanyRequestBody","CompanySyncStatus","Connection","ConnectionSourceType","Connections","ContactRef","ContactRefContactType","CreateAccountResponse","CreateCustomerResponse","CreateExpenseRequest","CreateExpenseResponse","CreateSupplierResponse","Customer","Customers","DataConnectionError","DataConnectionStatus","DataStatus","DataType","ErrorMessage","ExpenseTransaction","ExpenseTransactionBankAccountReference","ExpenseTransactionLine","ExpenseTransactionType","HalRef","InitiateSync","IntegrationType","Links","MappingOptions","PullOperation","PullOperationStatus","PullOperations","PushChangeType","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","RecordRef","Security","Supplier","Suppliers","SyncCompleteWebhook","SyncCompleteWebhookData","SyncFailedWebhook","SyncFailedWebhookData","SyncInitiated","SyncStartedWebhook","SyncStartedWebhookData","TaxRateMappingInfo","TaxRateMappingInfoValidTransactionTypes","TrackingCategoryMappingInfo","Transaction","TransactionStatus","Transactions","UpdateCustomerResponse","UpdateExpenseRequest","UpdateExpenseRequestBankAccountReference","UpdateExpenseResponse","UpdateSupplierResponse","Validation","ValidationItem"]
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py
new file mode 100755
index 000000000..97a67b9e6
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py
@@ -0,0 +1,150 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import accountstatus as shared_accountstatus
+from ..shared import accounttype as shared_accounttype
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class AccountMetadata:
+ is_deleted: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDeleted'), 'exclude': lambda f: f is None }})
+ r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
+
+
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class AccountValidDataTypeLinks:
+ r"""When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data.
+
+ For example, `validDatatypeLinks` might indicate the following references:
+
+ - Which tax rates are valid to use on the line item of a bill.
+ - Which items can be used when creating an invoice.
+
+ You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example.
+
+ ## `validDatatypeLinks` example
+
+ The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error.
+
+ ```json validDatatypeLinks for an account
+ {
+ \"id\": \"bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4\",
+ \"nominalCode\": \"090\",
+ \"name\": \"Business Bank Account\",
+ #...
+ \"validDatatypeLinks\": [
+ {
+ \"property\": \"Id\",
+ \"links\": [
+ \"Payment.AccountRef.Id\",
+ \"BillPayment.AccountRef.Id\",
+ \"DirectIncome.LineItems.AccountRef.Id\",
+ \"DirectCost.LineItems.AccountRef.Id\"
+ ]
+ }
+ ]
+ }
+ ```
+
+
+
+ ## Support for `validDatatypeLinks`
+
+ Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations.
+
+ If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap.
+ """
+ links: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('links'), 'exclude': lambda f: f is None }})
+ r"""Supported `dataTypes` that the record can be linked to."""
+ property: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('property'), 'exclude': lambda f: f is None }})
+ r"""The property from the account that can be linked."""
+
+
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Account:
+ r"""> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.
+
+ View the coverage for accounts in the Data coverage explorer.
+
+ ## Overview
+
+ Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.
+
+ The categories for an account include:
+ * Asset
+ * Expense
+ * Income
+ * Liability
+ * Equity.
+
+ The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.
+
+ At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.
+
+ To determine the list of allowed categories for a specific integration, you can:
+ - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).
+ - Refer to the integration's own documentation.
+
+ > **Accounts with no category**
+ >
+ > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.
+ >
+ > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports.
+ """
+ currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ current_balance: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentBalance'), 'exclude': lambda f: f is None }})
+ r"""Current balance in the account."""
+ description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
+ r"""Description for the account."""
+ fully_qualified_category: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fullyQualifiedCategory'), 'exclude': lambda f: f is None }})
+ r"""Full category of the account.
+
+ For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation.
+ """
+ fully_qualified_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fullyQualifiedName'), 'exclude': lambda f: f is None }})
+ r"""Full name of the account, for example:
+ - `Cash On Hand`
+ - `Rents Held In Trust`
+ - `Fixed Asset`
+ """
+ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
+ r"""Identifier for the account, unique for the company."""
+ is_bank_account: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBankAccount'), 'exclude': lambda f: f is None }})
+ r"""Confirms whether the account is a bank account or not."""
+ metadata: Optional[AccountMetadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }})
+ modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }})
+ name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
+ r"""Name of the account."""
+ nominal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode'), 'exclude': lambda f: f is None }})
+ r"""Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system."""
+ source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }})
+ status: Optional[shared_accountstatus.AccountStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
+ r"""Status of the account"""
+ type: Optional[shared_accounttype.AccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
+ r"""Type of account"""
+ valid_datatype_links: Optional[list[AccountValidDataTypeLinks]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validDatatypeLinks'), 'exclude': lambda f: f is None }})
+ r"""The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/accounting-api#/schemas/ValidDataTypeLinks)."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accountstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountstatus.py
new file mode 100755
index 000000000..2335b70e5
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountstatus.py
@@ -0,0 +1,11 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+class AccountStatus(str, Enum):
+ r"""Status of the account"""
+ UNKNOWN = 'Unknown'
+ ACTIVE = 'Active'
+ ARCHIVED = 'Archived'
+ PENDING = 'Pending'
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accounttype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accounttype.py
new file mode 100755
index 000000000..0ae490aa0
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/accounttype.py
@@ -0,0 +1,13 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+class AccountType(str, Enum):
+ r"""Type of account"""
+ UNKNOWN = 'Unknown'
+ ASSET = 'Asset'
+ EXPENSE = 'Expense'
+ INCOME = 'Income'
+ LIABILITY = 'Liability'
+ EQUITY = 'Equity'
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/codaterrormessage.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/codaterrormessage.py
deleted file mode 100755
index 71db38a17..000000000
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/codaterrormessage.py
+++ /dev/null
@@ -1,74 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatsyncexpenses import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class CodatErrorMessageValidationErrors:
- item_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemId'), 'exclude': lambda f: f is None }})
- message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
- rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ruleId'), 'exclude': lambda f: f is None }})
- validator_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validatorName'), 'exclude': lambda f: f is None }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class CodatErrorMessageValidationInternals:
- item_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemId'), 'exclude': lambda f: f is None }})
- message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
- rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ruleId'), 'exclude': lambda f: f is None }})
- validator_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validatorName'), 'exclude': lambda f: f is None }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class CodatErrorMessageValidationWarnings:
- item_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemId'), 'exclude': lambda f: f is None }})
- message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
- rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ruleId'), 'exclude': lambda f: f is None }})
- validator_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validatorName'), 'exclude': lambda f: f is None }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class CodatErrorMessageValidation:
- errors: Optional[list[CodatErrorMessageValidationErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }})
- has_errors: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasErrors'), 'exclude': lambda f: f is None }})
- has_internals: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasInternals'), 'exclude': lambda f: f is None }})
- has_warnings: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasWarnings'), 'exclude': lambda f: f is None }})
- internals: Optional[list[CodatErrorMessageValidationInternals]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('internals'), 'exclude': lambda f: f is None }})
- warnings: Optional[list[CodatErrorMessageValidationWarnings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings'), 'exclude': lambda f: f is None }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class CodatErrorMessage:
- r"""If model is incorrect"""
- can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }})
- correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }})
- detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }})
- error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }})
- inner: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('inner'), 'exclude': lambda f: f is None }})
- service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }})
- status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }})
- validation: Optional[CodatErrorMessageValidation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
-
-
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py
new file mode 100755
index 000000000..54fd2cd68
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import company as shared_company
+from ..shared import links as shared_links
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Companies:
+ r"""OK"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_company.Company]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py
new file mode 100755
index 000000000..12aa0754b
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py
@@ -0,0 +1,76 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import connection as shared_connection
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Company:
+ r"""In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.
+
+ Typically each company is one of your customers.
+
+ When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company.
+ """
+ id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
+ r"""Unique identifier for your SMB in Codat."""
+ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+ r"""The name of the company"""
+ redirect: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('redirect') }})
+ r"""The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company."""
+ created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ created_by_user_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdByUserName'), 'exclude': lambda f: f is None }})
+ data_connections: Optional[list[shared_connection.Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnections'), 'exclude': lambda f: f is None }})
+ description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
+ r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
+ last_sync: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSync'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/companyrequestbody.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/companyrequestbody.py
new file mode 100755
index 000000000..cdc393cd6
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/companyrequestbody.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class CompanyRequestBody:
+ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+ r"""Name of company being connected."""
+ description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
+ r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnection.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py
similarity index 94%
rename from sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnection.py
rename to sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py
index 78df0a188..5a592445b 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnection.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py
@@ -9,7 +9,7 @@
from enum import Enum
from typing import Any, Optional
-class DataConnectionSourceType(str, Enum):
+class ConnectionSourceType(str, Enum):
r"""The type of platform of the connection."""
ACCOUNTING = 'Accounting'
BANKING = 'Banking'
@@ -21,8 +21,8 @@ class DataConnectionSourceType(str, Enum):
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class DataConnection:
- r"""A connection represents a [company's](https://docs.codat.io/codat-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
+class Connection:
+ r"""A connection represents a [company's](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:
@@ -64,7 +64,7 @@ class DataConnection:
platform_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platformName') }})
source_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceId') }})
r"""A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`."""
- source_type: DataConnectionSourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }})
+ source_type: ConnectionSourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }})
r"""The type of platform of the connection."""
status: shared_dataconnectionstatus.DataConnectionStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
r"""The current authorization status of the data connection."""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py
new file mode 100755
index 000000000..e7988ab73
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import connection as shared_connection
+from ..shared import links as shared_links
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Connections:
+ r"""OK"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_connection.Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py
new file mode 100755
index 000000000..236fdfbac
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py
@@ -0,0 +1,112 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import account as shared_account
+from ..shared import datatype as shared_datatype
+from ..shared import pushoperationchange as shared_pushoperationchange
+from ..shared import pushoperationstatus as shared_pushoperationstatus
+from ..shared import validation as shared_validation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class CreateAccountResponse:
+ r"""Success"""
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ r"""The status of the push operation."""
+ status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
+ changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }})
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: Optional[shared_account.Account] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
+ r"""> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.
+
+ View the coverage for accounts in the Data coverage explorer.
+
+ ## Overview
+
+ Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.
+
+ The categories for an account include:
+ * Asset
+ * Expense
+ * Income
+ * Liability
+ * Equity.
+
+ The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.
+
+ At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.
+
+ To determine the list of allowed categories for a specific integration, you can:
+ - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model).
+ - Refer to the integration's own documentation.
+
+ > **Accounts with no category**
+ >
+ > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.
+ >
+ > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports.
+ """
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }})
+ timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+ validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py
new file mode 100755
index 000000000..4321d8141
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py
@@ -0,0 +1,83 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import customer as shared_customer
+from ..shared import datatype as shared_datatype
+from ..shared import pushoperationchange as shared_pushoperationchange
+from ..shared import pushoperationstatus as shared_pushoperationstatus
+from ..shared import validation as shared_validation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class CreateCustomerResponse:
+ r"""Success"""
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ r"""The status of the push operation."""
+ status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
+ changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }})
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }})
+ timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+ validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py
new file mode 100755
index 000000000..823d9943f
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py
@@ -0,0 +1,83 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import datatype as shared_datatype
+from ..shared import pushoperationchange as shared_pushoperationchange
+from ..shared import pushoperationstatus as shared_pushoperationstatus
+from ..shared import supplier as shared_supplier
+from ..shared import validation as shared_validation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class CreateSupplierResponse:
+ r"""Success"""
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ r"""The status of the push operation."""
+ status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
+ changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }})
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }})
+ timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+ validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py
index e4324bb86..843e88d90 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py
@@ -11,6 +11,7 @@
@dataclasses.dataclass
class Customer:
+ r"""Success"""
id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
r"""id of the customer for all income related activities to be associated to."""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py
new file mode 100755
index 000000000..42eefcfd6
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import customer as shared_customer
+from ..shared import links as shared_links
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Customers:
+ r"""Success"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_customer.Customer]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py
new file mode 100755
index 000000000..a445a2675
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py
@@ -0,0 +1,41 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class DataStatus:
+ r"""Describes the state of data in the Codat cache for a company and data type"""
+ current_status: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentStatus') }})
+ data_type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType') }})
+ last_successful_sync: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSuccessfulSync') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ latest_successful_sync_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('latestSuccessfulSyncId'), 'exclude': lambda f: f is None }})
+ latest_sync_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('latestSyncId'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py
new file mode 100755
index 000000000..ea726125d
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py
@@ -0,0 +1,49 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+class DataType(str, Enum):
+ r"""Available Data types"""
+ ACCOUNT_TRANSACTIONS = 'accountTransactions'
+ BALANCE_SHEET = 'balanceSheet'
+ BANK_ACCOUNTS = 'bankAccounts'
+ BANK_TRANSACTIONS = 'bankTransactions'
+ BILL_CREDIT_NOTES = 'billCreditNotes'
+ BILL_PAYMENTS = 'billPayments'
+ BILLS = 'bills'
+ CASH_FLOW_STATEMENT = 'cashFlowStatement'
+ CHART_OF_ACCOUNTS = 'chartOfAccounts'
+ COMPANY = 'company'
+ CREDIT_NOTES = 'creditNotes'
+ CUSTOMERS = 'customers'
+ DIRECT_COSTS = 'directCosts'
+ DIRECT_INCOMES = 'directIncomes'
+ INVOICES = 'invoices'
+ ITEMS = 'items'
+ JOURNAL_ENTRIES = 'journalEntries'
+ JOURNALS = 'journals'
+ PAYMENT_METHODS = 'paymentMethods'
+ PAYMENTS = 'payments'
+ PROFIT_AND_LOSS = 'profitAndLoss'
+ PURCHASE_ORDERS = 'purchaseOrders'
+ SALES_ORDERS = 'salesOrders'
+ SUPPLIERS = 'suppliers'
+ TAX_RATES = 'taxRates'
+ TRACKING_CATEGORIES = 'trackingCategories'
+ TRANSFERS = 'transfers'
+ BANKING_ACCOUNT_BALANCES = 'banking-accountBalances'
+ BANKING_ACCOUNTS = 'banking-accounts'
+ BANKING_TRANSACTION_CATEGORIES = 'banking-transactionCategories'
+ BANKING_TRANSACTIONS = 'banking-transactions'
+ COMMERCE_COMPANY_INFO = 'commerce-companyInfo'
+ COMMERCE_CUSTOMERS = 'commerce-customers'
+ COMMERCE_DISPUTES = 'commerce-disputes'
+ COMMERCE_LOCATIONS = 'commerce-locations'
+ COMMERCE_ORDERS = 'commerce-orders'
+ COMMERCE_PAYMENT_METHODS = 'commerce-paymentMethods'
+ COMMERCE_PAYMENTS = 'commerce-payments'
+ COMMERCE_PRODUCT_CATEGORIES = 'commerce-productCategories'
+ COMMERCE_PRODUCTS = 'commerce-products'
+ COMMERCE_TAX_COMPONENTS = 'commerce-taxComponents'
+ COMMERCE_TRANSACTIONS = 'commerce-transactions'
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py
index e07a110d2..8b3e8624c 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py
@@ -11,7 +11,7 @@
@dataclasses.dataclass
class ErrorMessage:
- r"""Your API request was not properly authorized."""
+ r"""Your `query` parameter was not correctly formed"""
can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }})
correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }})
detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py
index bddbfa5f5..32c9419ef 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py
@@ -9,6 +9,16 @@
from enum import Enum
from typing import Optional
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class ExpenseTransactionBankAccountReference:
+ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
+ r"""Identifier of the bank account."""
+
+
+
class ExpenseTransactionType(str, Enum):
r"""The type of transaction."""
PAYMENT = 'Payment'
@@ -52,6 +62,7 @@ class ExpenseTransaction:
"""
type: ExpenseTransactionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
r"""The type of transaction."""
+ bank_account_ref: Optional[ExpenseTransactionBankAccountReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountRef'), 'exclude': lambda f: f is None }})
contact_ref: Optional[shared_contactref.ContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }})
currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetype.py
deleted file mode 100755
index 49941c64e..000000000
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetype.py
+++ /dev/null
@@ -1,15 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-from enum import Enum
-
-class ExpenseType(str, Enum):
- r"""The type of transaction."""
- PAYMENT = 'Payment'
- REFUND = 'Refund'
- REWARD = 'Reward'
- CHARGEBACK = 'Chargeback'
- TRANSFER_IN = 'TransferIn'
- TRANSFER_OUT = 'TransferOut'
- ADJUSTMENT_IN = 'AdjustmentIn'
- ADJUSTMENT_OUT = 'AdjustmentOut'
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/hallink.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/halref.py
similarity index 97%
rename from sync-for-expenses/src/codatsyncexpenses/models/shared/hallink.py
rename to sync-for-expenses/src/codatsyncexpenses/models/shared/halref.py
index b4bd88cfe..762bd1a09 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/hallink.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/halref.py
@@ -10,7 +10,7 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class HalLink:
+class HalRef:
href: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('href'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/postsync.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/initiatesync.py
similarity index 96%
rename from sync-for-expenses/src/codatsyncexpenses/models/shared/postsync.py
rename to sync-for-expenses/src/codatsyncexpenses/models/shared/initiatesync.py
index 6f28c5ecb..bd33d45cc 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/postsync.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/initiatesync.py
@@ -10,7 +10,7 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class PostSync:
+class InitiateSync:
dataset_ids: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('datasetIds'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py
new file mode 100755
index 000000000..2d8fff4f8
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import halref as shared_halref
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Links:
+ current: shared_halref.HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('current') }})
+ self_: shared_halref.HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('self') }})
+ next: Optional[shared_halref.HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }})
+ previous: Optional[shared_halref.HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('previous'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py
new file mode 100755
index 000000000..d191d8eca
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py
@@ -0,0 +1,72 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from enum import Enum
+
+class PullOperationStatus(str, Enum):
+ INITIAL = 'Initial'
+ QUEUED = 'Queued'
+ FETCHING = 'Fetching'
+ MAP_QUEUED = 'MapQueued'
+ MAPPING = 'Mapping'
+ COMPLETE = 'Complete'
+ FETCH_ERROR = 'FetchError'
+ MAP_ERROR = 'MapError'
+ INTERNAL_ERROR = 'InternalError'
+ PROCESSING_QUEUED = 'ProcessingQueued'
+ PROCESSING = 'Processing'
+ PROCESSING_ERROR = 'ProcessingError'
+ VALIDATION_QUEUED = 'ValidationQueued'
+ VALIDATING = 'Validating'
+ VALIDATION_ERROR = 'ValidationError'
+ AUTH_ERROR = 'AuthError'
+ CANCELLED = 'Cancelled'
+ ROUTING = 'Routing'
+ ROUTING_ERROR = 'RoutingError'
+ NOT_SUPPORTED = 'NotSupported'
+ RATE_LIMIT_ERROR = 'RateLimitError'
+ PERMISSIONS_ERROR = 'PermissionsError'
+ PREREQUISITE_NOT_MET = 'PrerequisiteNotMet'
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class PullOperation:
+ r"""Information about a queued, in progress or completed pull operation.
+ *Formally called `dataset`*
+ """
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ connection_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('connectionId') }})
+ data_type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType') }})
+ id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
+ is_completed: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isCompleted') }})
+ is_errored: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isErrored') }})
+ progress: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('progress') }})
+ requested: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requested') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: PullOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py
new file mode 100755
index 000000000..a014c19da
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import links as shared_links
+from ..shared import pulloperation as shared_pulloperation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class PullOperations:
+ r"""OK"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_pulloperation.PullOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushchangetype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushchangetype.py
new file mode 100755
index 000000000..88e1a3ec7
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushchangetype.py
@@ -0,0 +1,11 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+class PushChangeType(str, Enum):
+ UNKNOWN = 'Unknown'
+ CREATED = 'Created'
+ MODIFIED = 'Modified'
+ DELETED = 'Deleted'
+ ATTACHMENT_UPLOADED = 'AttachmentUploaded'
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py
new file mode 100755
index 000000000..185130648
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py
@@ -0,0 +1,81 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import datatype as shared_datatype
+from ..shared import pushoperationchange as shared_pushoperationchange
+from ..shared import pushoperationstatus as shared_pushoperationstatus
+from ..shared import validation as shared_validation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class PushOperation:
+ r"""OK"""
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ r"""The status of the push operation."""
+ status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
+ changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }})
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }})
+ timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+ validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py
new file mode 100755
index 000000000..5d8238e5d
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py
@@ -0,0 +1,20 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import pushchangetype as shared_pushchangetype
+from ..shared import pushoperationref as shared_pushoperationref
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class PushOperationChange:
+ attachment_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachmentId'), 'exclude': lambda f: f is None }})
+ record_ref: Optional[shared_pushoperationref.PushOperationRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }})
+ type: Optional[shared_pushchangetype.PushChangeType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py
new file mode 100755
index 000000000..9bd5c3673
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import datatype as shared_datatype
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class PushOperationRef:
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py
new file mode 100755
index 000000000..467b691eb
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import links as shared_links
+from ..shared import pushoperation as shared_pushoperation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class PushOperations:
+ r"""OK"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_pushoperation.PushOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationstatus.py
new file mode 100755
index 000000000..fc391b0a2
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationstatus.py
@@ -0,0 +1,11 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+class PushOperationStatus(str, Enum):
+ r"""The status of the push operation."""
+ PENDING = 'Pending'
+ FAILED = 'Failed'
+ SUCCESS = 'Success'
+ TIMED_OUT = 'TimedOut'
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py
index 5537da005..e9c23e0db 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py
@@ -11,6 +11,7 @@
@dataclasses.dataclass
class Supplier:
+ r"""Success"""
id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
r"""id of the supplier for all purchases to be associated to"""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py
new file mode 100755
index 000000000..8892cadc5
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import links as shared_links
+from ..shared import supplier as shared_supplier
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Suppliers:
+ r"""Success"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_supplier.Supplier]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionmetadata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py
similarity index 97%
rename from sync-for-expenses/src/codatsyncexpenses/models/shared/transactionmetadata.py
rename to sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py
index fc1270935..f2078bff9 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionmetadata.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py
@@ -12,7 +12,8 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class TransactionMetadata:
+class Transaction:
+ r"""Success"""
integration_type: Optional[shared_integrationtype.IntegrationType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('integrationType'), 'exclude': lambda f: f is None }})
r"""Type of transaction that has been processed e.g. Expense or Bank Feed."""
message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionmetadatalist.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionmetadatalist.py
deleted file mode 100755
index 674937b28..000000000
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionmetadatalist.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from ..shared import hallink as shared_hallink
-from ..shared import transactionmetadata as shared_transactionmetadata
-from codatsyncexpenses import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class TransactionMetadataListLinks:
- current: shared_hallink.HalLink = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('current') }})
- self_: shared_hallink.HalLink = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('self') }})
- next: Optional[shared_hallink.HalLink] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }})
- previous: Optional[shared_hallink.HalLink] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('previous'), 'exclude': lambda f: f is None }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class TransactionMetadataList:
- r"""Success"""
- links: TransactionMetadataListLinks = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
- page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
- page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
- total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
- results: Optional[list[shared_transactionmetadata.TransactionMetadata]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
-
-
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py
new file mode 100755
index 000000000..f1de9f9a4
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import links as shared_links
+from ..shared import transaction as shared_transaction
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Transactions:
+ r"""Success"""
+ links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
+ page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
+ page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
+ total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
+ results: Optional[list[shared_transaction.Transaction]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py
new file mode 100755
index 000000000..0b26a151a
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py
@@ -0,0 +1,83 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import customer as shared_customer
+from ..shared import datatype as shared_datatype
+from ..shared import pushoperationchange as shared_pushoperationchange
+from ..shared import pushoperationstatus as shared_pushoperationstatus
+from ..shared import validation as shared_validation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class UpdateCustomerResponse:
+ r"""Success"""
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ r"""The status of the push operation."""
+ status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
+ changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }})
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }})
+ timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+ validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py
index 10a2fa196..b5c43ffd1 100755
--- a/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py
@@ -4,10 +4,19 @@
import dataclasses
from ..shared import contactref as shared_contactref
from ..shared import expensetransactionline as shared_expensetransactionline
-from ..shared import expensetype as shared_expensetype
from codatsyncexpenses import utils
from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
+from typing import Any, Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class UpdateExpenseRequestBankAccountReference:
+ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
+ r"""Identifier of the bank account."""
+
+
@dataclass_json(undefined=Undefined.EXCLUDE)
@@ -16,8 +25,8 @@
class UpdateExpenseRequest:
issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }})
r"""Date the transaction was recorded."""
- type: shared_expensetype.ExpenseType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
- r"""The type of transaction."""
+ type: Any = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
+ bank_account_ref: Optional[UpdateExpenseRequestBankAccountReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountRef'), 'exclude': lambda f: f is None }})
contact_ref: Optional[shared_contactref.ContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }})
currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
r"""Currency the transaction was recorded in."""
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenseresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenseresponse.py
new file mode 100755
index 000000000..47672d4cc
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenseresponse.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class UpdateExpenseResponse:
+ r"""Accepted"""
+ sync_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('syncId'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py
new file mode 100755
index 000000000..1b455b00a
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py
@@ -0,0 +1,83 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import datatype as shared_datatype
+from ..shared import pushoperationchange as shared_pushoperationchange
+from ..shared import pushoperationstatus as shared_pushoperationstatus
+from ..shared import supplier as shared_supplier
+from ..shared import validation as shared_validation
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class UpdateSupplierResponse:
+ r"""Success"""
+ company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ r"""The status of the push operation."""
+ status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
+ changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }})
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
+ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
+ r"""Available Data types"""
+ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
+ timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }})
+ timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }})
+ r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible."""
+ validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py
new file mode 100755
index 000000000..e1d5f5d4f
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import validationitem as shared_validationitem
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Validation:
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+ errors: Optional[list[shared_validationitem.ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is None }})
+ warnings: Optional[list[shared_validationitem.ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/validationitem.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/validationitem.py
new file mode 100755
index 000000000..3ccff6dd7
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/validationitem.py
@@ -0,0 +1,18 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from codatsyncexpenses import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class ValidationItem:
+ item_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemId'), 'exclude': lambda f: f is None }})
+ message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
+ validator_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validatorName'), 'exclude': lambda f: f is None }})
+
+
diff --git a/sync-for-expenses/src/codatsyncexpenses/push_operations.py b/sync-for-expenses/src/codatsyncexpenses/push_operations.py
new file mode 100755
index 000000000..94becdbb9
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/push_operations.py
@@ -0,0 +1,106 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from .sdkconfiguration import SDKConfiguration
+from codatsyncexpenses import utils
+from codatsyncexpenses.models import errors, operations, shared
+from typing import Optional
+
+class PushOperations:
+ r"""Access create, update and delete operations made to an SMB's data connection."""
+ sdk_configuration: SDKConfiguration
+
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
+
+ def get(self, request: operations.GetPushOperationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPushOperationResponse:
+ r"""Get push operation
+ Retrieve push operation.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetPushOperationRequest, base_url, '/companies/{companyId}/push/{pushOperationKey}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetPushOperationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperation])
+ res.push_operation = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def list(self, request: operations.ListPushOperationsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPushOperationsResponse:
+ r"""List push operations
+ List push operation records.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.ListPushOperationsRequest, base_url, '/companies/{companyId}/push', request)
+ headers = {}
+ query_params = utils.get_query_params(operations.ListPushOperationsRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, params=query_params, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.ListPushOperationsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperations])
+ res.push_operations = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
\ No newline at end of file
diff --git a/sync-for-expenses/src/codatsyncexpenses/sdk.py b/sync-for-expenses/src/codatsyncexpenses/sdk.py
index 4a7a3af2e..130413a20 100755
--- a/sync-for-expenses/src/codatsyncexpenses/sdk.py
+++ b/sync-for-expenses/src/codatsyncexpenses/sdk.py
@@ -1,37 +1,54 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
import requests as requests_http
+from .accounts import Accounts
+from .companies import Companies
from .configuration import Configuration
from .connections import Connections
+from .customers import Customers
from .expenses import Expenses
-from .mapping_options import MappingOptions
+from .manage_data import ManageData
+from .push_operations import PushOperations
from .sdkconfiguration import SDKConfiguration
+from .suppliers import Suppliers
from .sync import Sync
-from .sync_status import SyncStatus
from .transaction_status import TransactionStatus
from codatsyncexpenses import utils
from codatsyncexpenses.models import shared
class CodatSyncExpenses:
- r"""Sync for Expenses API: The API for Sync for Expenses.
- Sync for Expenses is an API and a set of supporting tools. It has been built to enable corporate card and expense management platforms to provide high-quality integrations with multiple accounting platforms through a standardized API.
+ r"""Sync for Expenses: The API for Sync for Expenses.
+
+ Sync for Expenses is an API and a set of supporting tools. It has been built to
+ enable corporate card and expense management platforms to provide high-quality
+ integrations with multiple accounting platforms through a standardized API.
[Read more...](https://docs.codat.io/sync-for-expenses/overview)
[See our OpenAPI spec](https://github.com/codatio/oas)
+
+
"""
+ accounts: Accounts
+ r"""Accounts"""
+ companies: Companies
+ r"""Create and manage your Codat companies."""
configuration: Configuration
- r"""Companies sync configuration."""
+ r"""Manage mapping options and sync configuration."""
connections: Connections
r"""Create and manage partner expense connection."""
+ customers: Customers
+ r"""Customers"""
expenses: Expenses
r"""Create expense datasets and upload receipts."""
- mapping_options: MappingOptions
- r"""Mapping options for a companies expenses."""
+ manage_data: ManageData
+ r"""Asynchronously retrieve data from an integration to refresh data in Codat."""
+ push_operations: PushOperations
+ r"""Access create, update and delete operations made to an SMB's data connection."""
+ suppliers: Suppliers
+ r"""Suppliers"""
sync: Sync
- r"""Triggering a new sync of expenses to accounting software."""
- sync_status: SyncStatus
- r"""Check the status of ongoing or previous expense syncs."""
+ r"""Trigger and monitor expense syncs to accounting software."""
transaction_status: TransactionStatus
r"""Retrieve the status of transactions within a sync."""
@@ -71,11 +88,15 @@ def __init__(self,
self._init_sdks()
def _init_sdks(self):
+ self.accounts = Accounts(self.sdk_configuration)
+ self.companies = Companies(self.sdk_configuration)
self.configuration = Configuration(self.sdk_configuration)
self.connections = Connections(self.sdk_configuration)
+ self.customers = Customers(self.sdk_configuration)
self.expenses = Expenses(self.sdk_configuration)
- self.mapping_options = MappingOptions(self.sdk_configuration)
+ self.manage_data = ManageData(self.sdk_configuration)
+ self.push_operations = PushOperations(self.sdk_configuration)
+ self.suppliers = Suppliers(self.sdk_configuration)
self.sync = Sync(self.sdk_configuration)
- self.sync_status = SyncStatus(self.sdk_configuration)
self.transaction_status = TransactionStatus(self.sdk_configuration)
\ No newline at end of file
diff --git a/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py b/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py
index f0e7f9f6a..65563417e 100755
--- a/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py
+++ b/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py
@@ -17,8 +17,8 @@ class SDKConfiguration:
server_idx: int = 0
language: str = 'python'
openapi_doc_version: str = 'prealpha'
- sdk_version: str = '0.34.0'
- gen_version: str = '2.84.3'
+ sdk_version: str = '0.35.0'
+ gen_version: str = '2.91.4'
def get_server_details(self) -> tuple[str, dict[str, str]]:
if self.server_url:
diff --git a/sync-for-expenses/src/codatsyncexpenses/suppliers.py b/sync-for-expenses/src/codatsyncexpenses/suppliers.py
new file mode 100755
index 000000000..7079c2207
--- /dev/null
+++ b/sync-for-expenses/src/codatsyncexpenses/suppliers.py
@@ -0,0 +1,230 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from .sdkconfiguration import SDKConfiguration
+from codatsyncexpenses import utils
+from codatsyncexpenses.models import errors, operations, shared
+from typing import Optional
+
+class Suppliers:
+ r"""Suppliers"""
+ sdk_configuration: SDKConfiguration
+
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
+
+ def create(self, request: operations.CreateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateSupplierResponse:
+ r"""Create supplier
+ The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
+
+ [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.CreateSupplierRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/suppliers', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "supplier", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ query_params = utils.get_query_params(operations.CreateSupplierRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('POST', url, params=query_params, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.CreateSupplierResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.CreateSupplierResponse])
+ res.create_supplier_response = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSupplierResponse:
+ r"""Get supplier
+ The *Get supplier* endpoint returns a single supplier for a given supplierId.
+
+ [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a specific supplier.
+
+ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetSupplierRequest, base_url, '/companies/{companyId}/data/suppliers/{supplierId}', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetSupplierResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Supplier])
+ res.supplier = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 409, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSuppliersResponse:
+ r"""List suppliers
+ The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
+
+ [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.ListSuppliersRequest, base_url, '/companies/{companyId}/data/suppliers', request)
+ headers = {}
+ query_params = utils.get_query_params(operations.ListSuppliersRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, params=query_params, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.ListSuppliersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Suppliers])
+ res.suppliers = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 409]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def update(self, request: operations.UpdateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateSupplierResponse:
+ r"""Update supplier
+ The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
+
+ [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.UpdateSupplierRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}', request)
+ headers = {}
+ req_content_type, data, form = utils.serialize_request_body(request, "supplier", 'json')
+ if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
+ headers['content-type'] = req_content_type
+ query_params = utils.get_query_params(operations.UpdateSupplierRequest, request)
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.UpdateSupplierResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateSupplierResponse])
+ res.update_supplier_response = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [400, 401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
\ No newline at end of file
diff --git a/sync-for-expenses/src/codatsyncexpenses/sync.py b/sync-for-expenses/src/codatsyncexpenses/sync.py
index 5a212ec0c..cb107135d 100755
--- a/sync-for-expenses/src/codatsyncexpenses/sync.py
+++ b/sync-for-expenses/src/codatsyncexpenses/sync.py
@@ -6,22 +6,157 @@
from typing import Optional
class Sync:
- r"""Triggering a new sync of expenses to accounting software."""
+ r"""Trigger and monitor expense syncs to accounting software."""
sdk_configuration: SDKConfiguration
def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
- def intiate_sync(self, request: operations.IntiateSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.IntiateSyncResponse:
+ def get(self, request: operations.GetSyncByIDRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSyncByIDResponse:
+ r"""Get Sync status
+ Get the sync status for a specified sync
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetSyncByIDRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/{syncId}/status', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetSyncByIDResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.CompanySyncStatus])
+ res.company_sync_status = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def get_last_successful_sync(self, request: operations.GetLastSuccessfulSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetLastSuccessfulSyncResponse:
+ r"""Last successful sync
+ Gets the status of the last successful sync
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetLastSuccessfulSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetLastSuccessfulSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.CompanySyncStatus])
+ res.company_sync_status = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def get_latest_sync(self, request: operations.GetLatestSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetLatestSyncResponse:
+ r"""Latest sync status
+ Gets the latest sync status
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetLatestSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/latest/status', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.GetLatestSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.CompanySyncStatus])
+ res.company_sync_status = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def initiate_sync(self, request: operations.InitiateSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.InitiateSyncResponse:
r"""Initiate sync
Initiate sync of pending transactions.
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
- url = utils.generate_url(operations.IntiateSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs', request)
+ url = utils.generate_url(operations.InitiateSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs', request)
headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, "post_sync", 'json')
+ req_content_type, data, form = utils.serialize_request_body(request, "initiate_sync", 'json')
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
headers['content-type'] = req_content_type
headers['Accept'] = 'application/json'
@@ -43,7 +178,7 @@ def do_request():
]))
content_type = http_res.headers.get('Content-Type')
- res = operations.IntiateSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+ res = operations.InitiateSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
if http_res.status_code == 202:
if utils.match_content_type(content_type, 'application/json'):
@@ -53,8 +188,53 @@ def do_request():
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [400, 404, 422]:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.CodatErrorMessage])
- res.codat_error_message = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+
+ return res
+
+
+ def list(self, request: operations.ListSyncsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSyncsResponse:
+ r"""List sync statuses
+ Gets a list of sync statuses
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.ListSyncsRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/list/status', request)
+ headers = {}
+ headers['Accept'] = 'application/json'
+ headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}'
+
+ client = self.sdk_configuration.security_client
+
+ retry_config = retries
+ if retry_config is None:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+
+ def do_request():
+ return client.request('GET', url, headers=headers)
+
+ http_res = utils.retry(do_request, utils.Retries(retry_config, [
+ '408',
+ '429',
+ '5XX'
+ ]))
+ content_type = http_res.headers.get('Content-Type')
+
+ res = operations.ListSyncsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
+
+ if http_res.status_code == 200:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[list[shared.CompanySyncStatus]])
+ res.company_sync_statuses = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
+ elif http_res.status_code in [401, 404, 429]:
+ if utils.match_content_type(content_type, 'application/json'):
+ out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage])
+ res.error_message = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
diff --git a/sync-for-expenses/src/codatsyncexpenses/transaction_status.py b/sync-for-expenses/src/codatsyncexpenses/transaction_status.py
index 1deb24d52..cbe59cc11 100755
--- a/sync-for-expenses/src/codatsyncexpenses/transaction_status.py
+++ b/sync-for-expenses/src/codatsyncexpenses/transaction_status.py
@@ -13,7 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_config
- def get_sync_transaction(self, request: operations.GetSyncTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSyncTransactionResponse:
+ def get(self, request: operations.GetSyncTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSyncTransactionResponse:
r"""Get Sync Transaction
Gets the status of a transaction for a sync
"""
@@ -44,8 +44,8 @@ def do_request():
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[list[shared.TransactionMetadata]])
- res.transaction_metadata = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Transaction])
+ res.transaction = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [401, 404, 429]:
@@ -58,9 +58,9 @@ def do_request():
return res
- def list_sync_transactions(self, request: operations.ListSyncTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSyncTransactionsResponse:
- r"""Get Sync transactions
- Get's the transactions and status for a sync
+ def list(self, request: operations.ListSyncTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSyncTransactionsResponse:
+ r"""List sync transactions
+ Gets the transactions and status for a sync
"""
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
@@ -90,8 +90,8 @@ def do_request():
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.TransactionMetadataList])
- res.transaction_metadata_list = out
+ out = utils.unmarshal_json(http_res.text, Optional[shared.Transactions])
+ res.transactions = out
else:
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code in [401, 404, 429]:
diff --git a/sync-for-expenses/src/codatsyncexpenses/utils/utils.py b/sync-for-expenses/src/codatsyncexpenses/utils/utils.py
index 3456af651..ea9792d0d 100755
--- a/sync-for-expenses/src/codatsyncexpenses/utils/utils.py
+++ b/sync-for-expenses/src/codatsyncexpenses/utils/utils.py
@@ -675,11 +675,11 @@ def _serialize_header(explode: bool, obj: any) -> str:
def unmarshal_json(data, typ):
- unmarhsal = make_dataclass('Unmarhsal', [('res', typ)],
+ unmarshal = make_dataclass('Unmarshal', [('res', typ)],
bases=(DataClassJsonMixin,))
json_dict = json.loads(data)
try:
- out = unmarhsal.from_dict({"res": json_dict})
+ out = unmarshal.from_dict({"res": json_dict})
except AttributeError as attr_err:
raise AttributeError(f'unable to unmarshal {data} as {typ}') from attr_err
return out.res