diff --git a/sync-for-payables/README.md b/sync-for-payables/README.md
index 5618a8cc9..b9ace7ea2 100644
--- a/sync-for-payables/README.md
+++ b/sync-for-payables/README.md
@@ -3,15 +3,173 @@
-replace me
+## SDK Installation
+
+```bash
+pip install codat-sync-for-payables
+```
## Example Usage
-replace me
+
+
+```python
+import codatsyncpayables
+from codatsyncpayables.models import operations, shared
+from decimal import Decimal
+
+s = codatsyncpayables.CodatSyncPayables(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.CreateAccountRequest(
+ account=shared.Account(
+ currency='USD',
+ current_balance=Decimal('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.Metadata(
+ 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=[
+ 'unde',
+ ],
+ property='nulla',
+ ),
+ ],
+ ),
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+ timeout_in_minutes=544883,
+)
+
+res = s.accounts.create(req)
+
+if res.create_account_response is not None:
+ # handle response
+```
-replace me
+## Available Resources and Operations
+
+
+### [accounts](docs/sdks/accounts/README.md)
+
+* [create](docs/sdks/accounts/README.md#create) - Create account
+* [get](docs/sdks/accounts/README.md#get) - Get account
+* [get_create_model](docs/sdks/accounts/README.md#get_create_model) - Get create account model
+* [list](docs/sdks/accounts/README.md#list) - List accounts
+
+### [bill_credit_notes](docs/sdks/billcreditnotes/README.md)
+
+* [create](docs/sdks/billcreditnotes/README.md#create) - Create bill credit note
+* [get](docs/sdks/billcreditnotes/README.md#get) - Get bill credit note
+* [get_create_update_model](docs/sdks/billcreditnotes/README.md#get_create_update_model) - Get create/update bill credit note model
+* [list](docs/sdks/billcreditnotes/README.md#list) - List bill credit notes
+* [update](docs/sdks/billcreditnotes/README.md#update) - Update bill credit note
+
+### [bill_payments](docs/sdks/billpayments/README.md)
+
+* [create](docs/sdks/billpayments/README.md#create) - Create bill payments
+* [delete](docs/sdks/billpayments/README.md#delete) - Delete bill payment
+* [get](docs/sdks/billpayments/README.md#get) - Get bill payment
+* [get_create_model](docs/sdks/billpayments/README.md#get_create_model) - Get create bill payment model
+* [list](docs/sdks/billpayments/README.md#list) - List bill payments
+
+### [bills](docs/sdks/bills/README.md)
+
+* [create](docs/sdks/bills/README.md#create) - Create bill
+* [delete](docs/sdks/bills/README.md#delete) - Delete bill
+* [download_attachment](docs/sdks/bills/README.md#download_attachment) - Download bill attachment
+* [get](docs/sdks/bills/README.md#get) - Get bill
+* [get_attachment](docs/sdks/bills/README.md#get_attachment) - Get bill attachment
+* [get_create_update_model](docs/sdks/bills/README.md#get_create_update_model) - Get create/update bill model
+* [list](docs/sdks/bills/README.md#list) - List bills
+* [list_attachments](docs/sdks/bills/README.md#list_attachments) - List bill attachments
+* [update](docs/sdks/bills/README.md#update) - Update bill
+* [upload_attachment](docs/sdks/bills/README.md#upload_attachment) - Upload bill attachment
+
+### [companies](docs/sdks/companies/README.md)
+
+* [create](docs/sdks/companies/README.md#create) - Create company
+* [delete](docs/sdks/companies/README.md#delete) - Delete a company
+* [get](docs/sdks/companies/README.md#get) - Get company
+* [list](docs/sdks/companies/README.md#list) - List companies
+* [update](docs/sdks/companies/README.md#update) - Update company
+
+### [company_info](docs/sdks/companyinfo/README.md)
+
+* [get_accounting_profile](docs/sdks/companyinfo/README.md#get_accounting_profile) - Get company accounting profile
+
+### [connections](docs/sdks/connections/README.md)
+
+* [create](docs/sdks/connections/README.md#create) - Create connection
+* [delete](docs/sdks/connections/README.md#delete) - Delete connection
+* [get](docs/sdks/connections/README.md#get) - Get connection
+* [list](docs/sdks/connections/README.md#list) - List connections
+* [unlink](docs/sdks/connections/README.md#unlink) - Unlink connection
+
+### [journal_entries](docs/sdks/journalentries/README.md)
+
+* [create](docs/sdks/journalentries/README.md#create) - Create journal entry
+* [get_create_model](docs/sdks/journalentries/README.md#get_create_model) - Get create journal entry model
+
+### [journals](docs/sdks/journals/README.md)
+
+* [create](docs/sdks/journals/README.md#create) - Create journal
+* [get](docs/sdks/journals/README.md#get) - Get journal
+* [get_create_model](docs/sdks/journals/README.md#get_create_model) - Get create journal model
+* [list](docs/sdks/journals/README.md#list) - List journals
+
+### [manage_data](docs/sdks/managedata/README.md)
+
+* [get](docs/sdks/managedata/README.md#get) - Get data status
+* [get_pull_operation](docs/sdks/managedata/README.md#get_pull_operation) - Get pull operation
+* [list_pull_operations](docs/sdks/managedata/README.md#list_pull_operations) - List pull operations
+* [refresh_all_data_types](docs/sdks/managedata/README.md#refresh_all_data_types) - Refresh all data
+* [refresh_data_type](docs/sdks/managedata/README.md#refresh_data_type) - Refresh data type
+
+### [payment_methods](docs/sdks/paymentmethods/README.md)
+
+* [get](docs/sdks/paymentmethods/README.md#get) - Get payment method
+* [list](docs/sdks/paymentmethods/README.md#list) - List payment methods
+
+### [push_operations](docs/sdks/pushoperations/README.md)
+
+* [get](docs/sdks/pushoperations/README.md#get) - Get push operation
+* [list](docs/sdks/pushoperations/README.md#list) - List push operations
+
+### [suppliers](docs/sdks/suppliers/README.md)
+
+* [create](docs/sdks/suppliers/README.md#create) - Create supplier
+* [get](docs/sdks/suppliers/README.md#get) - Get supplier
+* [get_create_update_model](docs/sdks/suppliers/README.md#get_create_update_model) - Get create/update supplier model
+* [list](docs/sdks/suppliers/README.md#list) - List suppliers
+* [update](docs/sdks/suppliers/README.md#update) - Update supplier
+
+### [tax_rates](docs/sdks/taxrates/README.md)
+
+* [get](docs/sdks/taxrates/README.md#get) - Get tax rate
+* [list](docs/sdks/taxrates/README.md#list) - List all tax rates
+
+### [tracking_categories](docs/sdks/trackingcategories/README.md)
+
+* [get](docs/sdks/trackingcategories/README.md#get) - Get tracking categories
+* [list](docs/sdks/trackingcategories/README.md#list) - List tracking categories
### Library generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
diff --git a/sync-for-payables/RELEASES.md b/sync-for-payables/RELEASES.md
index 6a1e8d45c..5299a81a9 100644
--- a/sync-for-payables/RELEASES.md
+++ b/sync-for-payables/RELEASES.md
@@ -8,4 +8,14 @@ Based on:
### Generated
- [python v0.1.0] sync-for-payables
### Releases
-- [PyPI v0.1.0] https://pypi.org/project/codat-sync-for-payables/0.1.0 - sync-for-payables
\ No newline at end of file
+- [PyPI v0.1.0] https://pypi.org/project/codat-sync-for-payables/0.1.0 - sync-for-payables
+
+## 2023-09-13 11:42:14
+### Changes
+Based on:
+- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payables.yaml
+- Speakeasy CLI 1.82.5 (2.108.3) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.2.0] sync-for-payables
+### Releases
+- [PyPI v0.2.0] https://pypi.org/project/codat-sync-for-payables/0.2.0 - sync-for-payables
\ No newline at end of file
diff --git a/sync-for-payables/USAGE.md b/sync-for-payables/USAGE.md
index 515d54f5a..3286cc7a8 100755
--- a/sync-for-payables/USAGE.md
+++ b/sync-for-payables/USAGE.md
@@ -4,6 +4,7 @@
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -14,7 +15,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateAccountRequest(
account=shared.Account(
currency='USD',
- current_balance=0,
+ current_balance=Decimal('0'),
description='Invoices the business has issued but has not yet collected payment on.',
fully_qualified_category='Asset.Current',
fully_qualified_name='Fixed Asset',
@@ -32,31 +33,15 @@ req = operations.CreateAccountRequest(
valid_datatype_links=[
shared.AccountValidDataTypeLinks(
links=[
- 'corrupti',
- 'illum',
- 'vel',
- 'error',
+ 'unde',
],
- property='deserunt',
- ),
- shared.AccountValidDataTypeLinks(
- links=[
- 'iure',
- 'magnam',
- ],
- property='debitis',
- ),
- shared.AccountValidDataTypeLinks(
- links=[
- 'delectus',
- ],
- property='tempora',
+ property='nulla',
),
],
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=383441,
+ timeout_in_minutes=544883,
)
res = s.accounts.create(req)
diff --git a/sync-for-payables/docs/models/operations/deletebillpaymentrequest.md b/sync-for-payables/docs/models/operations/deletebillpaymentrequest.md
new file mode 100755
index 000000000..027ceb41a
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/deletebillpaymentrequest.md
@@ -0,0 +1,9 @@
+# DeleteBillPaymentRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `bill_payment_id` | *str* | :heavy_check_mark: | 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-payables/docs/models/operations/deletebillpaymentresponse.md b/sync-for-payables/docs/models/operations/deletebillpaymentresponse.md
new file mode 100755
index 000000000..402c00601
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/deletebillpaymentresponse.md
@@ -0,0 +1,12 @@
+# DeleteBillPaymentResponse
+
+
+## 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-payables/docs/models/operations/deletebillrequest.md b/sync-for-payables/docs/models/operations/deletebillrequest.md
new file mode 100755
index 000000000..6a0364e15
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/deletebillrequest.md
@@ -0,0 +1,10 @@
+# DeleteBillRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `bill_id` | *str* | :heavy_check_mark: | Unique identifier for a bill | 13d946f0-c5d5-42bc-b092-97ece17923ab |
+| `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-payables/docs/models/operations/deletebillresponse.md b/sync-for-payables/docs/models/operations/deletebillresponse.md
new file mode 100755
index 000000000..278e552d3
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/deletebillresponse.md
@@ -0,0 +1,12 @@
+# DeleteBillResponse
+
+
+## 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-payables/docs/models/operations/getaccountingprofilecompanyinformation.md b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformation.md
new file mode 100755
index 000000000..fda45a29a
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformation.md
@@ -0,0 +1,28 @@
+# GetAccountingProfileCompanyInformation
+
+> View the coverage for company info in the Data coverage explorer.
+
+Company info provides standard details about a linked company such as their address, phone number, and company registration.
+
+> **Company information or companies?**
+>
+> Company information is standard information that is held in the accounting platform about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `accounting_platform_ref` | *Optional[str]* | :heavy_minus_sign: | Identifier or reference for the company in the accounting platform. | |
+| `addresses` | list[[shared.Addressesitems](../../models/shared/addressesitems.md)] | :heavy_minus_sign: | An array of Addresses. | |
+| `base_currency` | *Optional[str]* | :heavy_minus_sign: | Currency set in the accounting platform of the linked company. Used by the currency rate. | |
+| `company_legal_name` | *Optional[str]* | :heavy_minus_sign: | Registered legal name of the linked company. | |
+| `company_name` | *Optional[str]* | :heavy_minus_sign: | Name of the linked company. | |
+| `created_date` | *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 |
+| `financial_year_start_date` | *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 |
+| `ledger_lock_date` | *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 |
+| `phone_numbers` | list[[GetAccountingProfileCompanyInformationPhone](../../models/operations/getaccountingprofilecompanyinformationphone.md)] | :heavy_minus_sign: | An array of phone numbers. | |
+| `registration_number` | *Optional[str]* | :heavy_minus_sign: | Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. | |
+| `source_urls` | dict[str, *str*] | :heavy_minus_sign: | URL addresses for the accounting source.
For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). | |
+| `tax_number` | *Optional[str]* | :heavy_minus_sign: | Company tax number. | |
+| `web_links` | list[[GetAccountingProfileCompanyInformationWeblink](../../models/operations/getaccountingprofilecompanyinformationweblink.md)] | :heavy_minus_sign: | An array of weblinks. | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationphone.md b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationphone.md
new file mode 100755
index 000000000..a3da44cb8
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationphone.md
@@ -0,0 +1,9 @@
+# GetAccountingProfileCompanyInformationPhone
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `number` | *str* | :heavy_check_mark: | A phone number. | +44 25691 154789 |
+| `type` | [shared.Onecompanies1Percent7BcompanyIDPercent7D1data1infoGetResponses200ContentApplication1jsonSchemaPropertiesPhoneNumbersItemsDefinitionsPhoneNumberType](../../models/shared/onecompanies1percent7bcompanyidpercent7d1data1infogetresponses200contentapplication1jsonschemapropertiesphonenumbersitemsdefinitionsphonenumbertype.md) | :heavy_check_mark: | The type of phone number | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationweblink.md b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationweblink.md
new file mode 100755
index 000000000..ee089aa16
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationweblink.md
@@ -0,0 +1,11 @@
+# GetAccountingProfileCompanyInformationWeblink
+
+Weblink associated with the company.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
+| `type` | [Optional[GetAccountingProfileCompanyInformationWeblinkType]](../../models/operations/getaccountingprofilecompanyinformationweblinktype.md) | :heavy_minus_sign: | The type of the weblink. |
+| `url` | *Optional[str]* | :heavy_minus_sign: | The full URL for the weblink. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationweblinktype.md b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationweblinktype.md
new file mode 100755
index 000000000..37222edd8
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/getaccountingprofilecompanyinformationweblinktype.md
@@ -0,0 +1,12 @@
+# GetAccountingProfileCompanyInformationWeblinkType
+
+The type of the weblink.
+
+
+## Values
+
+| Name | Value |
+| --------- | --------- |
+| `WEBSITE` | Website |
+| `SOCIAL` | Social |
+| `UNKNOWN` | Unknown |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/operations/getaccountingprofilerequest.md b/sync-for-payables/docs/models/operations/getaccountingprofilerequest.md
new file mode 100755
index 000000000..563353fc3
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/getaccountingprofilerequest.md
@@ -0,0 +1,8 @@
+# GetAccountingProfileRequest
+
+
+## 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-payables/docs/models/operations/getaccountingprofileresponse.md b/sync-for-payables/docs/models/operations/getaccountingprofileresponse.md
new file mode 100755
index 000000000..136bff4e5
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/getaccountingprofileresponse.md
@@ -0,0 +1,12 @@
+# GetAccountingProfileResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
+| `company_information` | [Optional[GetAccountingProfileCompanyInformation]](../../models/operations/getaccountingprofilecompanyinformation.md) | :heavy_minus_sign: | Success |
+| `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-payables/docs/models/operations/unlinkconnectionrequest.md b/sync-for-payables/docs/models/operations/unlinkconnectionrequest.md
index 2ed1d78dc..d20863dce 100755
--- a/sync-for-payables/docs/models/operations/unlinkconnectionrequest.md
+++ b/sync-for-payables/docs/models/operations/unlinkconnectionrequest.md
@@ -3,8 +3,8 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
-| `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 |
-| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
+| `request_body` | [Optional[UnlinkConnectionUpdateConnection]](../../models/operations/unlinkconnectionupdateconnection.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 |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/operations/unlinkconnectionrequestbody.md b/sync-for-payables/docs/models/operations/unlinkconnectionrequestbody.md
deleted file mode 100755
index 276bf1330..000000000
--- a/sync-for-payables/docs/models/operations/unlinkconnectionrequestbody.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# 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-payables/docs/models/operations/unlinkconnectionupdateconnection.md b/sync-for-payables/docs/models/operations/unlinkconnectionupdateconnection.md
new file mode 100755
index 000000000..5a5f2911b
--- /dev/null
+++ b/sync-for-payables/docs/models/operations/unlinkconnectionupdateconnection.md
@@ -0,0 +1,8 @@
+# UnlinkConnectionUpdateConnection
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `status` | [Optional[shared.DataConnectionStatus]](../../models/shared/dataconnectionstatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/account.md b/sync-for-payables/docs/models/shared/account.md
index 9dd0c38eb..9087c7a34 100755
--- a/sync-for-payables/docs/models/shared/account.md
+++ b/sync-for-payables/docs/models/shared/account.md
@@ -35,7 +35,7 @@ To determine the list of allowed categories for a specific integration, you can:
| 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 |
+| `current_balance` | *Optional[Decimal]* | :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 |
diff --git a/sync-for-payables/docs/models/shared/accounts.md b/sync-for-payables/docs/models/shared/accounts.md
index b75102877..c1e6401bd 100755
--- a/sync-for-payables/docs/models/shared/accounts.md
+++ b/sync-for-payables/docs/models/shared/accounts.md
@@ -1,7 +1,5 @@
# Accounts
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/supplieraddresses.md b/sync-for-payables/docs/models/shared/addressesitems.md
similarity index 99%
rename from sync-for-payables/docs/models/shared/supplieraddresses.md
rename to sync-for-payables/docs/models/shared/addressesitems.md
index 3c909b291..e087286c3 100755
--- a/sync-for-payables/docs/models/shared/supplieraddresses.md
+++ b/sync-for-payables/docs/models/shared/addressesitems.md
@@ -1,4 +1,4 @@
-# SupplierAddresses
+# Addressesitems
## Fields
diff --git a/sync-for-payables/docs/models/shared/attachments.md b/sync-for-payables/docs/models/shared/attachments.md
index 6c2c43ec8..f1f20d820 100755
--- a/sync-for-payables/docs/models/shared/attachments.md
+++ b/sync-for-payables/docs/models/shared/attachments.md
@@ -1,7 +1,5 @@
# Attachments
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/bill.md b/sync-for-payables/docs/models/shared/bill.md
index c1efc5df8..40380a3db 100755
--- a/sync-for-payables/docs/models/shared/bill.md
+++ b/sync-for-payables/docs/models/shared/bill.md
@@ -25,9 +25,9 @@ You can find these types of transactions in our [Direct costs](https://docs.coda
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `amount_due` | *Optional[float]* | :heavy_minus_sign: | Amount outstanding on the bill. | |
+| `amount_due` | *Optional[Decimal]* | :heavy_minus_sign: | Amount outstanding on the bill. | |
| `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 |
-| `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 \| | |
+| `currency_rate` | *Optional[Decimal]* | :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 \| | |
| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting platform. | |
| `issue_date` | *str* | :heavy_check_mark: | N/A | 2022-10-23T00:00:00.000Z |
@@ -40,9 +40,9 @@ You can find these types of transactions in our [Direct costs](https://docs.coda
| `reference` | *Optional[str]* | :heavy_minus_sign: | User-friendly reference for the bill. | |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
| `status` | [BillStatus](../../models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | |
-| `sub_total` | *float* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | |
-| `supplemental_data` | [Optional[BillSupplementalData]](../../models/shared/billsupplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | |
+| `sub_total` | *Decimal* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | |
+| `supplemental_data` | [Optional[BillSupplementalData]](../../models/shared/billsupplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
| `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | |
-| `tax_amount` | *float* | :heavy_check_mark: | Amount of tax on the bill. | |
-| `total_amount` | *float* | :heavy_check_mark: | Amount of the bill, including tax. | |
+| `tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax on the bill. | |
+| `total_amount` | *Decimal* | :heavy_check_mark: | Amount of the bill, including tax. | |
| `withholding_tax` | list[[BillWithholdingTax](../../models/shared/billwithholdingtax.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billcreditnote.md b/sync-for-payables/docs/models/shared/billcreditnote.md
index e07b1a8ff..93167f514 100755
--- a/sync-for-payables/docs/models/shared/billcreditnote.md
+++ b/sync-for-payables/docs/models/shared/billcreditnote.md
@@ -25,8 +25,8 @@ A bill credit note includes details of:
| `allocated_on_date` | *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 |
| `bill_credit_note_number` | *Optional[str]* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 |
| `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 |
-| `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 \| | |
-| `discount_percentage` | *float* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 |
+| `currency_rate` | *Optional[Decimal]* | :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 \| | |
+| `discount_percentage` | *Decimal* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 |
| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting platform. | 1509398f-98e2-436d-8a5d-c042e0c74ffc |
| `issue_date` | *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 |
| `line_items` | list[[BillCreditNoteLineItem](../../models/shared/billcreditnotelineitem.md)] | :heavy_minus_sign: | An array of line | |
@@ -34,13 +34,13 @@ A bill credit note includes details of:
| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
| `note` | *Optional[str]* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 |
| `payment_allocations` | list[[Items](../../models/shared/items.md)] | :heavy_minus_sign: | An array of payment allocations. | |
-| `remaining_credit` | *Optional[float]* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 |
+| `remaining_credit` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
| `status` | [BillCreditNoteStatus](../../models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid |
-| `sub_total` | *float* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 |
-| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | |
+| `sub_total` | *Decimal* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 |
+| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
| `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | |
-| `total_amount` | *float* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 |
-| `total_discount` | *float* | :heavy_check_mark: | Total value of any discounts applied. | 0 |
-| `total_tax_amount` | *float* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 |
+| `total_amount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 |
+| `total_discount` | *Decimal* | :heavy_check_mark: | Total value of any discounts applied. | 0 |
+| `total_tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 |
| `withholding_tax` | list[[WithholdingTaxitems](../../models/shared/withholdingtaxitems.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billcreditnotelineitem.md b/sync-for-payables/docs/models/shared/billcreditnotelineitem.md
index 227c72b63..c268c83ef 100755
--- a/sync-for-payables/docs/models/shared/billcreditnotelineitem.md
+++ b/sync-for-payables/docs/models/shared/billcreditnotelineitem.md
@@ -7,14 +7,14 @@
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. |
| `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been received. |
-| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Value of any discounts applied. |
-| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. |
+| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Value of any discounts applied. |
+| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. |
| `item_ref` | [Optional[BillCreditNoteLineItemItemReference]](../../models/shared/billcreditnotelineitemitemreference.md) | :heavy_minus_sign: | Reference to the item the line is linked to. |
-| `quantity` | *float* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. |
-| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. |
-| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax associated with the line item. |
+| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. |
+| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. |
+| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax associated with the line item. |
| `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.
Found on:
- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items |
-| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. |
+| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. |
| `tracking` | [Optional[BillCreditNoteLineItemTracking]](../../models/shared/billcreditnotelineitemtracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. |
| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Reference to the tracking categories to which the line item is linked. |
-| `unit_amount` | *float* | :heavy_check_mark: | Unit price of the goods or service. |
\ No newline at end of file
+| `unit_amount` | *Decimal* | :heavy_check_mark: | Unit price of the goods or service. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billcreditnotelineitemtracking.md b/sync-for-payables/docs/models/shared/billcreditnotelineitemtracking.md
index 68d244a98..617cbb7bf 100755
--- a/sync-for-payables/docs/models/shared/billcreditnotelineitemtracking.md
+++ b/sync-for-payables/docs/models/shared/billcreditnotelineitemtracking.md
@@ -5,10 +5,10 @@ Categories, and a project and customer, against which the item is tracked.
## Fields
-| Field | Type | Required | Description |
-| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
-| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A |
-| `customer_ref` | [Optional[BillCreditNoteLineItemTrackingCustomerRef]](../../models/shared/billcreditnotelineitemtrackingcustomerref.md) | :heavy_minus_sign: | N/A |
-| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
-| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
-| `project_ref` | [Optional[BillCreditNoteLineItemTrackingProjectRef]](../../models/shared/billcreditnotelineitemtrackingprojectref.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
+| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A |
+| `customer_ref` | [Optional[BillCreditNoteLineItemTrackingCustomerRef]](../../models/shared/billcreditnotelineitemtrackingcustomerref.md) | :heavy_minus_sign: | N/A |
+| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
+| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
+| `project_ref` | [Optional[BillCreditNoteLineItemTrackingProjectReference]](../../models/shared/billcreditnotelineitemtrackingprojectreference.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billcreditnotelineitemtrackingprojectref.md b/sync-for-payables/docs/models/shared/billcreditnotelineitemtrackingprojectreference.md
similarity index 87%
rename from sync-for-payables/docs/models/shared/billcreditnotelineitemtrackingprojectref.md
rename to sync-for-payables/docs/models/shared/billcreditnotelineitemtrackingprojectreference.md
index 922aa48ff..5e05fd31c 100755
--- a/sync-for-payables/docs/models/shared/billcreditnotelineitemtrackingprojectref.md
+++ b/sync-for-payables/docs/models/shared/billcreditnotelineitemtrackingprojectreference.md
@@ -1,4 +1,4 @@
-# BillCreditNoteLineItemTrackingProjectRef
+# BillCreditNoteLineItemTrackingProjectReference
## Fields
diff --git a/sync-for-payables/docs/models/shared/billcreditnotes.md b/sync-for-payables/docs/models/shared/billcreditnotes.md
index 5f5476a5c..4c045cbc5 100755
--- a/sync-for-payables/docs/models/shared/billcreditnotes.md
+++ b/sync-for-payables/docs/models/shared/billcreditnotes.md
@@ -1,7 +1,5 @@
# BillCreditNotes
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/billlineitem.md b/sync-for-payables/docs/models/shared/billlineitem.md
index c349a269c..fde5b1c7b 100755
--- a/sync-for-payables/docs/models/shared/billlineitem.md
+++ b/sync-for-payables/docs/models/shared/billlineitem.md
@@ -7,15 +7,15 @@
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. |
| `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of the goods or services received. |
-| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Numerical value of any discounts applied.
Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. |
-| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | N/A |
+| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Numerical value of any discounts applied.
Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. |
+| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | N/A |
| `is_direct_cost` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. |
-| `quantity` | *float* | :heavy_check_mark: | Number of units of goods or services received. |
-| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. |
-| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax for the line. |
+| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of goods or services received. |
+| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. |
+| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax for the line. |
| `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.
Found on:
- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items |
-| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line, including tax. |
+| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line, including tax. |
| `tracking` | [Optional[Tracking]](../../models/shared/tracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. |
| `tracking_category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | Collection of categories against which this item is tracked. |
-| `unit_amount` | *float* | :heavy_check_mark: | Price of each unit of goods or services. |
\ No newline at end of file
+| `unit_amount` | *Decimal* | :heavy_check_mark: | Price of each unit of goods or services. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billpayment.md b/sync-for-payables/docs/models/shared/billpayment.md
index b68054e92..535a8a42a 100755
--- a/sync-for-payables/docs/models/shared/billpayment.md
+++ b/sync-for-payables/docs/models/shared/billpayment.md
@@ -159,7 +159,7 @@ These two rates allow the calculation of currency loss or gain for any of the tr
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | |
| `currency` | *Optional[str]* | :heavy_minus_sign: | N/A | 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 \| | |
+| `currency_rate` | *Optional[Decimal]* | :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 \| | |
| `date_` | *str* | :heavy_check_mark: | N/A | 2022-10-23T00:00:00.000Z |
| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bill payment, unique for the company in the accounting platform. | 3d5a8e00-d108-4045-8823-7f342676cffa |
| `lines` | list[[BillPaymentLine](../../models/shared/billpaymentline.md)] | :heavy_minus_sign: | An array of bill payment lines. | |
@@ -169,6 +169,6 @@ These two rates allow the calculation of currency loss or gain for any of the tr
| `payment_method_ref` | *Optional[Any]* | :heavy_minus_sign: | N/A | |
| `reference` | *Optional[str]* | :heavy_minus_sign: | Additional information associated with the payment. | |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
-| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | |
+| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
| `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | N/A | |
-| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. | 1329.54 |
\ No newline at end of file
+| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. | 1329.54 |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billpaymentallocationallocation.md b/sync-for-payables/docs/models/shared/billpaymentallocationallocation.md
index 8dcf326ba..a01cef670 100755
--- a/sync-for-payables/docs/models/shared/billpaymentallocationallocation.md
+++ b/sync-for-payables/docs/models/shared/billpaymentallocationallocation.md
@@ -7,5 +7,5 @@
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allocated_on_date` | *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 |
| `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 |
-| `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 \| | |
-| `total_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount that has been allocated. | |
\ No newline at end of file
+| `currency_rate` | *Optional[Decimal]* | :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 \| | |
+| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | The total amount that has been allocated. | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billpaymentline.md b/sync-for-payables/docs/models/shared/billpaymentline.md
index 7548a4682..bba4eb109 100755
--- a/sync-for-payables/docs/models/shared/billpaymentline.md
+++ b/sync-for-payables/docs/models/shared/billpaymentline.md
@@ -6,5 +6,5 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allocated_on_date` | *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 |
-| `amount` | *float* | :heavy_check_mark: | Amount in the bill payment currency. | |
+| `amount` | *Decimal* | :heavy_check_mark: | Amount in the bill payment currency. | |
| `links` | list[[BillPaymentLineLink](../../models/shared/billpaymentlinelink.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billpaymentlinelink.md b/sync-for-payables/docs/models/shared/billpaymentlinelink.md
index 2e91fbc78..9087af70d 100755
--- a/sync-for-payables/docs/models/shared/billpaymentlinelink.md
+++ b/sync-for-payables/docs/models/shared/billpaymentlinelink.md
@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `amount` | *Optional[float]* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.
- A negative link amount reduces the outstanding amount on the accounts payable account.
- A positive link amount increases the outstanding amount on the accounts payable account. |
-| `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 \| |
+| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.
- A negative link amount reduces the outstanding amount on the accounts payable account.
- A positive link amount increases the outstanding amount on the accounts payable account. |
+| `currency_rate` | *Optional[Decimal]* | :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 \| |
| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. |
| `type` | [BillPaymentLineLinkType](../../models/shared/billpaymentlinelinktype.md) | :heavy_check_mark: | Types of links to bill payment lines. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/billpayments.md b/sync-for-payables/docs/models/shared/billpayments.md
index 18b2cc4b9..f688108c0 100755
--- a/sync-for-payables/docs/models/shared/billpayments.md
+++ b/sync-for-payables/docs/models/shared/billpayments.md
@@ -1,7 +1,5 @@
# BillPayments
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/bills.md b/sync-for-payables/docs/models/shared/bills.md
index 4e633e5b6..406959654 100755
--- a/sync-for-payables/docs/models/shared/bills.md
+++ b/sync-for-payables/docs/models/shared/bills.md
@@ -1,7 +1,5 @@
# Bills
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/billsupplementaldata.md b/sync-for-payables/docs/models/shared/billsupplementaldata.md
index 736ce1cda..dada772db 100755
--- a/sync-for-payables/docs/models/shared/billsupplementaldata.md
+++ b/sync-for-payables/docs/models/shared/billsupplementaldata.md
@@ -2,7 +2,7 @@
Supplemental data is additional data you can include in our standard data types.
-It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
## Fields
diff --git a/sync-for-payables/docs/models/shared/billwithholdingtax.md b/sync-for-payables/docs/models/shared/billwithholdingtax.md
index a2b842658..4e6a95fa2 100755
--- a/sync-for-payables/docs/models/shared/billwithholdingtax.md
+++ b/sync-for-payables/docs/models/shared/billwithholdingtax.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `amount` | *float* | :heavy_check_mark: | N/A |
+| `amount` | *Decimal* | :heavy_check_mark: | N/A |
| `name` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/companies.md b/sync-for-payables/docs/models/shared/companies.md
index 621899fbb..c4c6e0399 100755
--- a/sync-for-payables/docs/models/shared/companies.md
+++ b/sync-for-payables/docs/models/shared/companies.md
@@ -1,7 +1,5 @@
# Companies
-OK
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/connections.md b/sync-for-payables/docs/models/shared/connections.md
index ba1135508..d9a1a748e 100755
--- a/sync-for-payables/docs/models/shared/connections.md
+++ b/sync-for-payables/docs/models/shared/connections.md
@@ -1,7 +1,5 @@
# Connections
-OK
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createaccountresponse.md b/sync-for-payables/docs/models/shared/createaccountresponse.md
index 5c85a35eb..0b96d3a90 100755
--- a/sync-for-payables/docs/models/shared/createaccountresponse.md
+++ b/sync-for-payables/docs/models/shared/createaccountresponse.md
@@ -1,7 +1,5 @@
# CreateAccountResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createbillcreditnoteresponse.md b/sync-for-payables/docs/models/shared/createbillcreditnoteresponse.md
index 9dc752f3a..2a92ffd30 100755
--- a/sync-for-payables/docs/models/shared/createbillcreditnoteresponse.md
+++ b/sync-for-payables/docs/models/shared/createbillcreditnoteresponse.md
@@ -1,7 +1,5 @@
# CreateBillCreditNoteResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createbillpaymentresponse.md b/sync-for-payables/docs/models/shared/createbillpaymentresponse.md
index d94d98165..03b7ffe61 100755
--- a/sync-for-payables/docs/models/shared/createbillpaymentresponse.md
+++ b/sync-for-payables/docs/models/shared/createbillpaymentresponse.md
@@ -1,7 +1,5 @@
# CreateBillPaymentResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createbillresponse.md b/sync-for-payables/docs/models/shared/createbillresponse.md
index 4784edb7b..616dc960c 100755
--- a/sync-for-payables/docs/models/shared/createbillresponse.md
+++ b/sync-for-payables/docs/models/shared/createbillresponse.md
@@ -1,7 +1,5 @@
# CreateBillResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createjournalentryresponse.md b/sync-for-payables/docs/models/shared/createjournalentryresponse.md
index 0f460fa78..dee0841df 100755
--- a/sync-for-payables/docs/models/shared/createjournalentryresponse.md
+++ b/sync-for-payables/docs/models/shared/createjournalentryresponse.md
@@ -1,7 +1,5 @@
# CreateJournalEntryResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createjournalresponse.md b/sync-for-payables/docs/models/shared/createjournalresponse.md
index aef3a0122..67ee8f368 100755
--- a/sync-for-payables/docs/models/shared/createjournalresponse.md
+++ b/sync-for-payables/docs/models/shared/createjournalresponse.md
@@ -1,7 +1,5 @@
# CreateJournalResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/createsupplierresponse.md b/sync-for-payables/docs/models/shared/createsupplierresponse.md
index 74317f15f..e7278343d 100755
--- a/sync-for-payables/docs/models/shared/createsupplierresponse.md
+++ b/sync-for-payables/docs/models/shared/createsupplierresponse.md
@@ -1,7 +1,5 @@
# CreateSupplierResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/errormessage.md b/sync-for-payables/docs/models/shared/errormessage.md
index b32400646..4f34c9a64 100755
--- a/sync-for-payables/docs/models/shared/errormessage.md
+++ b/sync-for-payables/docs/models/shared/errormessage.md
@@ -1,7 +1,5 @@
# ErrorMessage
-Your `query` parameter was not correctly formed
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/itemsallocation.md b/sync-for-payables/docs/models/shared/itemsallocation.md
index 1678c4912..94c6b4893 100755
--- a/sync-for-payables/docs/models/shared/itemsallocation.md
+++ b/sync-for-payables/docs/models/shared/itemsallocation.md
@@ -7,5 +7,5 @@
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allocated_on_date` | *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 |
| `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 |
-| `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 \| | |
-| `total_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount that has been allocated. | |
\ No newline at end of file
+| `currency_rate` | *Optional[Decimal]* | :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 \| | |
+| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | The total amount that has been allocated. | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/journalentry.md b/sync-for-payables/docs/models/shared/journalentry.md
index efa5243ff..c13d52247 100755
--- a/sync-for-payables/docs/models/shared/journalentry.md
+++ b/sync-for-payables/docs/models/shared/journalentry.md
@@ -38,5 +38,5 @@ In Codat a journal entry contains details of:
| `posted_on` | *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 |
| `record_ref` | [Optional[JournalEntryRecordReference]](../../models/shared/journalentryrecordreference.md) | :heavy_minus_sign: | Links the current record to the underlying record or data type that created it.
For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. | |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
-| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | |
+| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
| `updated_on` | *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 |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/journalline.md b/sync-for-payables/docs/models/shared/journalline.md
index 383211ebb..689da407c 100755
--- a/sync-for-payables/docs/models/shared/journalline.md
+++ b/sync-for-payables/docs/models/shared/journalline.md
@@ -8,5 +8,5 @@
| `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. |
| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency for the journal line item. |
| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the journal line item. |
-| `net_amount` | *float* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. |
+| `net_amount` | *Decimal* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. |
| `tracking` | [Optional[JournalLineTracking]](../../models/shared/journallinetracking.md) | :heavy_minus_sign: | List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/journals.md b/sync-for-payables/docs/models/shared/journals.md
index 281db1f21..b6b1f628a 100755
--- a/sync-for-payables/docs/models/shared/journals.md
+++ b/sync-for-payables/docs/models/shared/journals.md
@@ -1,7 +1,5 @@
# Journals
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/onecompanies1percent7bcompanyidpercent7d1data1infogetresponses200contentapplication1jsonschemapropertiesphonenumbersitemsdefinitionsphonenumbertype.md b/sync-for-payables/docs/models/shared/onecompanies1percent7bcompanyidpercent7d1data1infogetresponses200contentapplication1jsonschemapropertiesphonenumbersitemsdefinitionsphonenumbertype.md
new file mode 100755
index 000000000..af9635e0e
--- /dev/null
+++ b/sync-for-payables/docs/models/shared/onecompanies1percent7bcompanyidpercent7d1data1infogetresponses200contentapplication1jsonschemapropertiesphonenumbersitemsdefinitionsphonenumbertype.md
@@ -0,0 +1,14 @@
+# Onecompanies1Percent7BcompanyIDPercent7D1data1infoGetResponses200ContentApplication1jsonSchemaPropertiesPhoneNumbersItemsDefinitionsPhoneNumberType
+
+The type of phone number
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `PRIMARY` | Primary |
+| `LANDLINE` | Landline |
+| `MOBILE` | Mobile |
+| `FAX` | Fax |
+| `UNKNOWN` | Unknown |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/paymentallocationpayment.md b/sync-for-payables/docs/models/shared/paymentallocationpayment.md
index 7c7dab9fc..dca76f389 100755
--- a/sync-for-payables/docs/models/shared/paymentallocationpayment.md
+++ b/sync-for-payables/docs/models/shared/paymentallocationpayment.md
@@ -7,9 +7,9 @@
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | |
| `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 |
-| `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 \| | |
+| `currency_rate` | *Optional[Decimal]* | :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 \| | |
| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the allocated payment. | |
| `note` | *Optional[str]* | :heavy_minus_sign: | Notes attached to the allocated payment. | |
| `paid_on_date` | *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 |
| `reference` | *Optional[str]* | :heavy_minus_sign: | Reference to the allocated payment. | |
-| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount that was paid. | |
\ No newline at end of file
+| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount that was paid. | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/paymentmethods.md b/sync-for-payables/docs/models/shared/paymentmethods.md
index abbd8439c..fc831fcfa 100755
--- a/sync-for-payables/docs/models/shared/paymentmethods.md
+++ b/sync-for-payables/docs/models/shared/paymentmethods.md
@@ -1,7 +1,5 @@
# PaymentMethods
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/pulloperations.md b/sync-for-payables/docs/models/shared/pulloperations.md
index 497d66e3f..afe4f6f90 100755
--- a/sync-for-payables/docs/models/shared/pulloperations.md
+++ b/sync-for-payables/docs/models/shared/pulloperations.md
@@ -1,7 +1,5 @@
# PullOperations
-OK
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/pushoperation.md b/sync-for-payables/docs/models/shared/pushoperation.md
index b90de2409..8537a2c10 100755
--- a/sync-for-payables/docs/models/shared/pushoperation.md
+++ b/sync-for-payables/docs/models/shared/pushoperation.md
@@ -1,7 +1,5 @@
# PushOperation
-OK
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/pushoperations.md b/sync-for-payables/docs/models/shared/pushoperations.md
index 4967d37e5..83fd674fe 100755
--- a/sync-for-payables/docs/models/shared/pushoperations.md
+++ b/sync-for-payables/docs/models/shared/pushoperations.md
@@ -1,7 +1,5 @@
# PushOperations
-OK
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/pushoption.md b/sync-for-payables/docs/models/shared/pushoption.md
index 5a6b4939e..a9a0e479a 100755
--- a/sync-for-payables/docs/models/shared/pushoption.md
+++ b/sync-for-payables/docs/models/shared/pushoption.md
@@ -1,7 +1,5 @@
# PushOption
-OK
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/supplementaldata.md b/sync-for-payables/docs/models/shared/supplementaldata.md
index 2a938b3cf..f18fbb90d 100755
--- a/sync-for-payables/docs/models/shared/supplementaldata.md
+++ b/sync-for-payables/docs/models/shared/supplementaldata.md
@@ -2,7 +2,7 @@
Supplemental data is additional data you can include in our standard data types.
-It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
## Fields
diff --git a/sync-for-payables/docs/models/shared/supplier.md b/sync-for-payables/docs/models/shared/supplier.md
index a468223a3..7c916bb80 100755
--- a/sync-for-payables/docs/models/shared/supplier.md
+++ b/sync-for-payables/docs/models/shared/supplier.md
@@ -9,19 +9,19 @@ From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `addresses` | list[[SupplierAddresses](../../models/shared/supplieraddresses.md)] | :heavy_minus_sign: | An array of Addresses. | |
-| `contact_name` | *Optional[str]* | :heavy_minus_sign: | Name of the main contact for the supplier. | |
-| `default_currency` | *Optional[str]* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | |
-| `email_address` | *Optional[str]* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | |
-| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting platform. | |
-| `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | |
-| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
-| `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 |
-| `registration_number` | *Optional[str]* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | |
-| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
-| `status` | [SupplierStatus](../../models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | |
-| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | |
-| `supplier_name` | *Optional[str]* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | |
-| `tax_number` | *Optional[str]* | :heavy_minus_sign: | Supplier's company tax number. | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `addresses` | list[[SupplierAccountingAddress](../../models/shared/supplieraccountingaddress.md)] | :heavy_minus_sign: | An array of Addresses. | |
+| `contact_name` | *Optional[str]* | :heavy_minus_sign: | Name of the main contact for the supplier. | |
+| `default_currency` | *Optional[str]* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | |
+| `email_address` | *Optional[str]* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting platform. | |
+| `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | |
+| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
+| `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 |
+| `registration_number` | *Optional[str]* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | |
+| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
+| `status` | [SupplierStatus](../../models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | |
+| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
+| `supplier_name` | *Optional[str]* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | |
+| `tax_number` | *Optional[str]* | :heavy_minus_sign: | Supplier's company tax number. | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/supplieraccountingaddress.md b/sync-for-payables/docs/models/shared/supplieraccountingaddress.md
new file mode 100755
index 000000000..7d316b0ae
--- /dev/null
+++ b/sync-for-payables/docs/models/shared/supplieraccountingaddress.md
@@ -0,0 +1,14 @@
+# SupplierAccountingAddress
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
+| `city` | *Optional[str]* | :heavy_minus_sign: | City of the customer address. |
+| `country` | *Optional[str]* | :heavy_minus_sign: | Country of the customer address. |
+| `line1` | *Optional[str]* | :heavy_minus_sign: | Line 1 of the customer address. |
+| `line2` | *Optional[str]* | :heavy_minus_sign: | Line 2 of the customer address. |
+| `postal_code` | *Optional[str]* | :heavy_minus_sign: | Postal code or zip code. |
+| `region` | *Optional[str]* | :heavy_minus_sign: | Region of the customer address. |
+| `type` | [AccountingAddressType](../../models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/suppliers.md b/sync-for-payables/docs/models/shared/suppliers.md
index 88c7249aa..2c8d57400 100755
--- a/sync-for-payables/docs/models/shared/suppliers.md
+++ b/sync-for-payables/docs/models/shared/suppliers.md
@@ -1,7 +1,5 @@
# Suppliers
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/taxrate.md b/sync-for-payables/docs/models/shared/taxrate.md
index ba75029e4..993d3dfe3 100755
--- a/sync-for-payables/docs/models/shared/taxrate.md
+++ b/sync-for-payables/docs/models/shared/taxrate.md
@@ -28,12 +28,12 @@ In some cases, a tax is made up of multiple sub taxes, often called _components_
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `code` | *Optional[str]* | :heavy_minus_sign: | Code for the tax rate from the accounting platform. | |
| `components` | list[[TaxRateComponent](../../models/shared/taxratecomponent.md)] | :heavy_minus_sign: | N/A | |
-| `effective_tax_rate` | *Optional[float]* | :heavy_minus_sign: | See Effective tax rates description. | |
+| `effective_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | See Effective tax rates description. | |
| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the tax rate, unique for the company in the accounting platform. | |
| `metadata` | [Optional[Metadata]](../../models/shared/metadata.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: | Codat-augmented name of the tax rate in the accounting platform. | |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
| `status` | [Optional[TaxRateStatus]](../../models/shared/taxratestatus.md) | :heavy_minus_sign: | Status of the tax rate in the accounting platform.
- `Active` - An active tax rate in use by a company.
- `Archived` - A tax rate that has been archived or is inactive in the accounting platform.
- `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. | |
-| `total_tax_rate` | *Optional[float]* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | |
+| `total_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | |
| `valid_datatype_links` | list[[ValidDatatypeLinksitems](../../models/shared/validdatatypelinksitems.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/taxratecomponent.md b/sync-for-payables/docs/models/shared/taxratecomponent.md
index 148878a7e..c82ee7bb5 100755
--- a/sync-for-payables/docs/models/shared/taxratecomponent.md
+++ b/sync-for-payables/docs/models/shared/taxratecomponent.md
@@ -9,4 +9,4 @@ A tax rate can be made up of multiple sub taxes, often called components of the
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `is_compound` | *bool* | :heavy_check_mark: | A flag to indicate with the tax is calculated using the principle of compounding. |
| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tax rate component. |
-| `rate` | *Optional[float]* | :heavy_minus_sign: | The rate of the tax rate component, usually a percentage. |
\ No newline at end of file
+| `rate` | *Optional[Decimal]* | :heavy_minus_sign: | The rate of the tax rate component, usually a percentage. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/taxrateref.md b/sync-for-payables/docs/models/shared/taxrateref.md
index 22e79fc30..5b7eb1cd9 100755
--- a/sync-for-payables/docs/models/shared/taxrateref.md
+++ b/sync-for-payables/docs/models/shared/taxrateref.md
@@ -16,6 +16,6 @@ Found on:
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
-| `effective_tax_rate` | *Optional[float]* | :heavy_minus_sign: | Applicable tax rate. |
+| `effective_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Applicable tax rate. |
| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting platform. |
| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tax rate in the accounting platform. |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/taxrates.md b/sync-for-payables/docs/models/shared/taxrates.md
index 39ab1328f..c570791a4 100755
--- a/sync-for-payables/docs/models/shared/taxrates.md
+++ b/sync-for-payables/docs/models/shared/taxrates.md
@@ -1,7 +1,5 @@
# TaxRates
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/tracking.md b/sync-for-payables/docs/models/shared/tracking.md
index 788899368..cc01c811f 100755
--- a/sync-for-payables/docs/models/shared/tracking.md
+++ b/sync-for-payables/docs/models/shared/tracking.md
@@ -5,10 +5,10 @@ Categories, and a project and customer, against which the item is tracked.
## Fields
-| Field | Type | Required | Description |
-| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A |
-| `customer_ref` | [Optional[TrackingCustomerRef]](../../models/shared/trackingcustomerref.md) | :heavy_minus_sign: | N/A |
-| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
-| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
-| `project_ref` | [Optional[TrackingProjectRef]](../../models/shared/trackingprojectref.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A |
+| `customer_ref` | [Optional[TrackingCustomerRef]](../../models/shared/trackingcustomerref.md) | :heavy_minus_sign: | N/A |
+| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
+| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A |
+| `project_ref` | [Optional[TrackingProjectReference]](../../models/shared/trackingprojectreference.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/sync-for-payables/docs/models/shared/trackingcategories.md b/sync-for-payables/docs/models/shared/trackingcategories.md
index 091e6623c..f328dbae4 100755
--- a/sync-for-payables/docs/models/shared/trackingcategories.md
+++ b/sync-for-payables/docs/models/shared/trackingcategories.md
@@ -1,7 +1,5 @@
# TrackingCategories
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/trackingprojectref.md b/sync-for-payables/docs/models/shared/trackingprojectreference.md
similarity index 92%
rename from sync-for-payables/docs/models/shared/trackingprojectref.md
rename to sync-for-payables/docs/models/shared/trackingprojectreference.md
index 11fb273da..54a9976f2 100755
--- a/sync-for-payables/docs/models/shared/trackingprojectref.md
+++ b/sync-for-payables/docs/models/shared/trackingprojectreference.md
@@ -1,4 +1,4 @@
-# TrackingProjectRef
+# TrackingProjectReference
## Fields
diff --git a/sync-for-payables/docs/models/shared/updatebillcreditnoteresponse.md b/sync-for-payables/docs/models/shared/updatebillcreditnoteresponse.md
index 6a83daee8..df4e8dcc1 100755
--- a/sync-for-payables/docs/models/shared/updatebillcreditnoteresponse.md
+++ b/sync-for-payables/docs/models/shared/updatebillcreditnoteresponse.md
@@ -1,7 +1,5 @@
# UpdateBillCreditNoteResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/updatebillresponse.md b/sync-for-payables/docs/models/shared/updatebillresponse.md
index f13949a34..43669362a 100755
--- a/sync-for-payables/docs/models/shared/updatebillresponse.md
+++ b/sync-for-payables/docs/models/shared/updatebillresponse.md
@@ -1,7 +1,5 @@
# UpdateBillResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/updatesupplierresponse.md b/sync-for-payables/docs/models/shared/updatesupplierresponse.md
index 5ef1f757c..ba77e1827 100755
--- a/sync-for-payables/docs/models/shared/updatesupplierresponse.md
+++ b/sync-for-payables/docs/models/shared/updatesupplierresponse.md
@@ -1,7 +1,5 @@
# UpdateSupplierResponse
-Success
-
## Fields
diff --git a/sync-for-payables/docs/models/shared/withholdingtaxitems.md b/sync-for-payables/docs/models/shared/withholdingtaxitems.md
index 6f338896d..6a0c34fb3 100755
--- a/sync-for-payables/docs/models/shared/withholdingtaxitems.md
+++ b/sync-for-payables/docs/models/shared/withholdingtaxitems.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
-| `amount` | *float* | :heavy_check_mark: | N/A |
+| `amount` | *Decimal* | :heavy_check_mark: | N/A |
| `name` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/sync-for-payables/docs/sdks/accounts/README.md b/sync-for-payables/docs/sdks/accounts/README.md
index 602df7295..06fd2c7ef 100755
--- a/sync-for-payables/docs/sdks/accounts/README.md
+++ b/sync-for-payables/docs/sdks/accounts/README.md
@@ -29,6 +29,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -38,11 +39,11 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateAccountRequest(
account=shared.Account(
- currency='USD',
- current_balance=0,
+ currency='EUR',
+ current_balance=Decimal('0'),
description='Invoices the business has issued but has not yet collected payment on.',
fully_qualified_category='Asset.Current',
- fully_qualified_name='Fixed Asset',
+ fully_qualified_name='Cash On Hand',
id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e',
is_bank_account=False,
metadata=shared.Metadata(
@@ -57,24 +58,15 @@ req = operations.CreateAccountRequest(
valid_datatype_links=[
shared.AccountValidDataTypeLinks(
links=[
- 'nisi',
- 'recusandae',
- 'temporibus',
+ 'suscipit',
],
- property='ab',
- ),
- shared.AccountValidDataTypeLinks(
- links=[
- 'veritatis',
- 'deserunt',
- ],
- property='perferendis',
+ property='iure',
),
],
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=368241,
+ timeout_in_minutes=297534,
)
res = s.accounts.create(req)
@@ -120,7 +112,7 @@ s = codatsyncpayables.CodatSyncPayables(
)
req = operations.GetAccountRequest(
- account_id='repellendus',
+ account_id='debitis',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
@@ -145,15 +137,15 @@ if res.account is not None:
## get_create_model
- The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company and integration.
-
- [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions.
-
- **Integration-specific behaviour**
-
- See the *response examples* for integration-specific indicative models.
-
- 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.
+The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company and integration.
+
+[Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions.
+
+**Integration-specific behaviour**
+
+See the *response examples* for integration-specific indicative models.
+
+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
@@ -217,7 +209,7 @@ req = operations.ListAccountsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='sapiente',
+ query='ipsa',
)
res = s.accounts.list(req)
diff --git a/sync-for-payables/docs/sdks/billcreditnotes/README.md b/sync-for-payables/docs/sdks/billcreditnotes/README.md
index b217ffde6..b30008a20 100755
--- a/sync-for-payables/docs/sdks/billcreditnotes/README.md
+++ b/sync-for-payables/docs/sdks/billcreditnotes/README.md
@@ -30,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -42,218 +43,57 @@ req = operations.CreateBillCreditNoteRequest(
allocated_on_date='2022-10-23T00:00:00.000Z',
bill_credit_note_number='91fe2a83-e161-4c21-929d-c5c10c4b07e5',
currency='GBP',
- currency_rate=8700.13,
- discount_percentage=0,
+ currency_rate=Decimal('3834.41'),
+ discount_percentage=Decimal('0'),
id='1509398f-98e2-436d-8a5d-c042e0c74ffc',
issue_date='2022-10-23T00:00:00.000Z',
line_items=[
shared.BillCreditNoteLineItem(
account_ref=shared.AccountRef(
- id='7cc78ca1-ba92-48fc-8167-42cb73920592',
- name='Curtis Morissette',
+ id='cc8796ed-151a-405d-bc2d-df7cc78ca1ba',
+ name='Wayne Lind',
),
- description='saepe',
- discount_amount=6818.2,
- discount_percentage=4499.5,
+ description='totam',
+ discount_amount=Decimal('1059.07'),
+ discount_percentage=Decimal('4146.62'),
item_ref=shared.BillCreditNoteLineItemItemReference(
- id='596eb10f-aaa2-4352-8595-5907aff1a3a2',
- name='Shaun McCullough',
+ id='742cb739-2059-4293-96fe-a7596eb10faa',
+ name='Ernest Ebert',
),
- quantity=4663.11,
- sub_total=4746.97,
- tax_amount=2444.25,
+ quantity=Decimal('7506.86'),
+ sub_total=Decimal('3154.28'),
+ tax_amount=Decimal('6078.31'),
tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=6235.1,
- id='251aa52c-3f5a-4d01-9da1-ffe78f097b00',
- name='Mrs. April Wuckert',
+ effective_tax_rate=Decimal('3637.11'),
+ id='5907aff1-a3a2-4fa9-8677-39251aa52c3f',
+ name='Mr. Alberta Schuster',
),
- total_amount=4808.94,
+ total_amount=Decimal('8379.45'),
tracking=shared.BillCreditNoteLineItemTracking(
category_refs=[
shared.TrackingCategoryRef(
- id='b5e6e13b-99d4-488e-9e91-e450ad2abd44',
- name='Beth McGlynn Sr.',
+ id='a1ffe78f-097b-4007-8f15-471b5e6e13b9',
+ name='Ervin Gleason',
),
],
customer_ref=shared.BillCreditNoteLineItemTrackingCustomerRef(
- company_name='assumenda',
- id='502a94bb-4f63-4c96-9e9a-3efa77dfb14c',
- ),
- is_billed_to=shared.BilledToType.PROJECT,
- is_rebilled_to=shared.BilledToType.NOT_APPLICABLE,
- project_ref=shared.BillCreditNoteLineItemTrackingProjectRef(
- id='6ae395ef-b9ba-488f-ba66-997074ba4469',
- name='Duane Thiel II',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='959890af-a563-4e25-96fe-4c8b711e5b7f',
- name='Louis Turner Sr.',
- ),
- ],
- unit_amount=5083.15,
- ),
- shared.BillCreditNoteLineItem(
- account_ref=shared.AccountRef(
- id='921cddc6-9260-41fb-976b-0d5f0d30c5fb',
- name='Ernest Hayes',
- ),
- description='eaque',
- discount_amount=3389.85,
- discount_percentage=1999.96,
- item_ref=shared.BillCreditNoteLineItemItemReference(
- id='202c73d5-fe9b-490c-a890-9b3fe49a8d9c',
- name='Toby Hahn',
- ),
- quantity=2123.9,
- sub_total=2098.43,
- tax_amount=2224.43,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=1861.93,
- id='3f9b77f3-a410-4067-8ebf-69280d1ba77a',
- name='Arturo Treutel',
- ),
- total_amount=4694.97,
- tracking=shared.BillCreditNoteLineItemTracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='7ae4203c-e5e6-4a95-98a0-d446ce2af7a7',
- name='Rosalie White',
- ),
- ],
- customer_ref=shared.BillCreditNoteLineItemTrackingCustomerRef(
- company_name='accusamus',
- id='453f870b-326b-45a7-b429-cdb1a8422bb6',
- ),
- is_billed_to=shared.BilledToType.NOT_APPLICABLE,
- is_rebilled_to=shared.BilledToType.CUSTOMER,
- project_ref=shared.BillCreditNoteLineItemTrackingProjectRef(
- id='d2322715-bf0c-4bb1-a31b-8b90f3443a11',
- name='Miss Billie Ward',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='f4b92187-9fce-4953-b73e-f7fbc7abd74d',
- name='Earl Mosciski DVM',
- ),
- shared.TrackingCategoryRef(
- id='5d2cff7c-70a4-4562-ad43-6813f16d9f5f',
- name='Elbert Jenkins',
- ),
- shared.TrackingCategoryRef(
- id='56146c3e-250f-4b00-8c42-e141aac366c8',
- name='Drew Hoeger I',
- ),
- shared.TrackingCategoryRef(
- id='42907474-778a-47bd-866d-28c10ab3cdca',
- name='Ms. Ruby Hintz II',
- ),
- ],
- unit_amount=8920.5,
- ),
- shared.BillCreditNoteLineItem(
- account_ref=shared.AccountRef(
- id='523c7e0b-c717-48e4-b96f-2a70c688282a',
- name='Randall Lindgren',
- ),
- description='nisi',
- discount_amount=1470.14,
- discount_percentage=9564.06,
- item_ref=shared.BillCreditNoteLineItemItemReference(
- id='222e9817-ee17-4cbe-a1e6-b7b95bc0ab3c',
- name='Elizabeth Schinner',
- ),
- quantity=2328.65,
- sub_total=4581.39,
- tax_amount=5034.27,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=5909.84,
- id='fd871f99-dd2e-4fd1-a1aa-6f1e674bdb04',
- name='Samuel Hermiston',
- ),
- total_amount=3917.74,
- tracking=shared.BillCreditNoteLineItemTracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='82d68ea1-9f1d-4170-9133-9d08086a1840',
- name='Toni Fritsch',
- ),
- ],
- customer_ref=shared.BillCreditNoteLineItemTrackingCustomerRef(
- company_name='voluptas',
- id='071f93f5-f064-42da-87af-515cc413aa63',
- ),
- is_billed_to=shared.BilledToType.CUSTOMER,
- is_rebilled_to=shared.BilledToType.CUSTOMER,
- project_ref=shared.BillCreditNoteLineItemTrackingProjectRef(
- id='e8d67864-dbb6-475f-95e6-0b375ed4f6fb',
- name='Dr. Terence Gulgowski',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='317fe35b-60eb-41ea-8265-55ba3c28744e',
- name='Dustin Ferry',
- ),
- ],
- unit_amount=5553.61,
- ),
- shared.BillCreditNoteLineItem(
- account_ref=shared.AccountRef(
- id='f3a8d8f5-c0b2-4f2f-b7b1-94a276b26916',
- name='Rogelio Bins V',
- ),
- description='maiores',
- discount_amount=2748.23,
- discount_percentage=1484.78,
- item_ref=shared.BillCreditNoteLineItemItemReference(
- id='94e3698f-447f-4603-a8b4-45e80ca55efd',
- name='Deborah Turcotte',
- ),
- quantity=4461.35,
- sub_total=8892.34,
- tax_amount=1046.27,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=5124.52,
- id='58b6a89f-be3a-45aa-8e48-24d0ab407508',
- name='Ms. Lamar Hessel',
- ),
- total_amount=1536.27,
- tracking=shared.BillCreditNoteLineItemTracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='65e904f3-b119-44b8-abf6-03a79f9dfe0a',
- name='Ron Schulist',
- ),
- ],
- customer_ref=shared.BillCreditNoteLineItemTrackingCustomerRef(
- company_name='mollitia',
- id='50ce187f-86bc-4173-9689-eee9526f8d98',
+ company_name='voluptates',
+ id='1e91e450-ad2a-4bd4-8269-802d502a94bb',
),
is_billed_to=shared.BilledToType.NOT_APPLICABLE,
is_rebilled_to=shared.BilledToType.PROJECT,
- project_ref=shared.BillCreditNoteLineItemTrackingProjectRef(
- id='881ead4f-0e10-4125-a3f9-4e29e973e922',
- name='Leo Kiehn II',
+ project_ref=shared.BillCreditNoteLineItemTrackingProjectReference(
+ id='63c969e9-a3ef-4a77-9fb1-4cd66ae395ef',
+ name='Rene Reinger',
),
),
tracking_category_refs=[
shared.TrackingCategoryRef(
- id='e3e06080-7e2b-46e3-ab88-45f0597a60ff',
- name='Alberta Harber',
- ),
- shared.TrackingCategoryRef(
- id='31e94764-a3e8-465e-b956-f9251a5a9da6',
- name='Ruth Zulauf',
- ),
- shared.TrackingCategoryRef(
- id='7bfaad4f-9efc-41b4-912c-1032648dc2f6',
- name='Cathy Breitenberg',
+ id='8f3a6699-7074-4ba4-869b-6e2141959890',
+ name='Abel O'Hara',
),
],
- unit_amount=9364.69,
+ unit_amount=Decimal('2212.62'),
),
],
metadata=shared.Metadata(
@@ -262,137 +102,56 @@ req = operations.CreateBillCreditNoteRequest(
modified_date='2022-10-23T00:00:00.000Z',
note='Bill Credit Note with 1 line items, totaling 805.78',
payment_allocations=[
- shared.Items(
- allocation=shared.ItemsAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='GBP',
- currency_rate=9358.33,
- total_amount=5962.11,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='fe6c632c-a3ae-4d01-9799-6312fde04771',
- name='Tamara Lang',
- ),
- currency='USD',
- currency_rate=999.58,
- id='d0174763-60a1-45db-aa66-0659a1adeaab',
- note='ad',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='enim',
- total_amount=1104.77,
- ),
- ),
shared.Items(
allocation=shared.ItemsAllocation(
allocated_on_date='2022-10-23T00:00:00.000Z',
currency='USD',
- currency_rate=7758.03,
- total_amount=4053.73,
+ currency_rate=Decimal('972.6'),
+ total_amount=Decimal('4358.65'),
),
payment=shared.PaymentAllocationPayment(
account_ref=shared.AccountRef(
- id='45b08b61-891b-4aa0-be1a-de008e6f8c5f',
- name='Marion Aufderhar',
+ id='fe4c8b71-1e5b-47fd-aed0-28921cddc692',
+ name='Donna Bernhard',
),
- currency='EUR',
- currency_rate=8427.77,
- id='b5a34181-4301-4042-9813-d5208ece7e25',
- note='nesciunt',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='eum',
- total_amount=4269.43,
- ),
- ),
- shared.Items(
- allocation=shared.ItemsAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='GBP',
- currency_rate=3494.4,
- total_amount=704.1,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='c6c6e205-e16d-4eab-bfec-9578a6458427',
- name='Lee Larkin IV',
- ),
- currency='EUR',
- currency_rate=1173.8,
- id='62309fb0-9299-421a-afb9-f58c4d86e68e',
- note='modi',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='vero',
- total_amount=329.01,
- ),
- ),
- shared.Items(
- allocation=shared.ItemsAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
currency='USD',
- currency_rate=13.83,
- total_amount=938.94,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='3f59da75-7a59-4ecf-af66-ef1caa3383c2',
- name='Lamar Reichert',
- ),
- currency='USD',
- currency_rate=1940.23,
- id='73c8d72f-64d1-4db1-b2c4-310661e96349',
- note='earum',
+ currency_rate=Decimal('4535.43'),
+ id='6b0d5f0d-30c5-4fbb-a587-053202c73d5f',
+ note='recusandae',
paid_on_date='2022-10-23T00:00:00.000Z',
- reference='impedit',
- total_amount=9758.84,
+ reference='facilis',
+ total_amount=Decimal('5966.56'),
),
),
],
- remaining_credit=0,
+ remaining_credit=Decimal('0'),
source_modified_date='2022-10-23T00:00:00.000Z',
status=shared.BillCreditNoteStatus.PAID,
- sub_total=805.78,
+ sub_total=Decimal('805.78'),
supplemental_data=shared.SupplementalData(
content={
- "alias": {
- "itaque": 'velit',
- "laborum": 'non',
- },
- "dolor": {
- "sit": 'doloremque',
- "consequatur": 'officia',
- },
- "recusandae": {
- "quidem": 'voluptas',
- "facilis": 'placeat',
- },
- "perspiciatis": {
- "deleniti": 'a',
- "voluptate": 'ullam',
- "unde": 'necessitatibus',
+ "porro": {
+ "consequuntur": 'blanditiis',
},
},
),
supplier_ref=shared.SupplierRef(
- id='ac55a974-1d31-4135-a965-bb8a72026114',
- supplier_name='neque',
+ id='909b3fe4-9a8d-49cb-b486-33323f9b77f3',
+ supplier_name='dolorum',
),
- total_amount=805.78,
- total_discount=0,
- total_tax_amount=0,
+ total_amount=Decimal('805.78'),
+ total_discount=Decimal('0'),
+ total_tax_amount=Decimal('0'),
withholding_tax=[
shared.WithholdingTaxitems(
- amount=9323.94,
- name='Tracy Mills',
- ),
- shared.WithholdingTaxitems(
- amount=8028.94,
- name='Marilyn Heaney',
+ amount=Decimal('2543.56'),
+ name='Melissa Bednar',
),
],
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=115661,
+ timeout_in_minutes=311796,
)
res = s.bill_credit_notes.create(req)
@@ -438,7 +197,7 @@ s = codatsyncpayables.CodatSyncPayables(
)
req = operations.GetBillCreditNoteRequest(
- bill_credit_note_id='id',
+ bill_credit_note_id='accusamus',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
@@ -536,7 +295,7 @@ req = operations.ListBillCreditNotesRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='libero',
+ query='quidem',
)
res = s.bill_credit_notes.list(req)
@@ -576,6 +335,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -588,61 +348,57 @@ req = operations.UpdateBillCreditNoteRequest(
allocated_on_date='2022-10-23T00:00:00.000Z',
bill_credit_note_number='91fe2a83-e161-4c21-929d-c5c10c4b07e5',
currency='USD',
- currency_rate=5546.03,
- discount_percentage=0,
+ currency_rate=Decimal('6176.58'),
+ discount_percentage=Decimal('0'),
id='1509398f-98e2-436d-8a5d-c042e0c74ffc',
issue_date='2022-10-23T00:00:00.000Z',
line_items=[
shared.BillCreditNoteLineItem(
account_ref=shared.AccountRef(
- id='70e1084c-b067-42d1-ad87-9eeb9665b85e',
- name='Mr. Jonathon Swaniawski',
+ id='80d1ba77-a89e-4bf7-b7ae-4203ce5e6a95',
+ name='Dr. Jimmie Murphy',
),
- description='fuga',
- discount_amount=9195.08,
- discount_percentage=340.7,
+ description='tempora',
+ discount_amount=Decimal('4254.51'),
+ discount_percentage=Decimal('7980.47'),
item_ref=shared.BillCreditNoteLineItemItemReference(
- id='be2d7822-59e3-4ea4-b519-7f92443da7ce',
- name='Phyllis Quitzon',
+ id='e2af7a73-cf3b-4e45-bf87-0b326b5a7342',
+ name='Simon Stracke MD',
),
- quantity=3262.69,
- sub_total=8095.94,
- tax_amount=3165.42,
+ quantity=Decimal('5173.79'),
+ sub_total=Decimal('2768.94'),
+ tax_amount=Decimal('1320.68'),
tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=2040.72,
- id='7c6454ef-b0b3-4489-ac3c-a5acfbe2fd57',
- name='Viola Hane',
+ effective_tax_rate=Decimal('1749.09'),
+ id='bb679d23-2271-45bf-8cbb-1e31b8b90f34',
+ name='Mr. Josephine Pagac V',
),
- total_amount=5678.46,
+ total_amount=Decimal('9295.3'),
tracking=shared.BillCreditNoteLineItemTracking(
category_refs=[
shared.TrackingCategoryRef(
- id='9177deac-646e-4cb5-b340-9e3eb1e5a2b1',
- name='Ms. Kelley Rogahn',
+ id='0adcf4b9-2187-49fc-a953-f73ef7fbc7ab',
+ name='Allan Greenholt',
),
],
customer_ref=shared.BillCreditNoteLineItemTrackingCustomerRef(
- company_name='veritatis',
- id='16db9954-5fc9-45fa-8897-0e189dbb30fc',
+ company_name='sequi',
+ id='9c0f5d2c-ff7c-470a-8562-6d436813f16d',
),
is_billed_to=shared.BilledToType.CUSTOMER,
- is_rebilled_to=shared.BilledToType.UNKNOWN,
- project_ref=shared.BillCreditNoteLineItemTrackingProjectRef(
- id='3ea055b1-97cd-444e-af52-d82d3513bb6f',
- name='Mattie Raynor',
+ is_rebilled_to=shared.BilledToType.PROJECT,
+ project_ref=shared.BillCreditNoteLineItemTrackingProjectReference(
+ id='5fce6c55-6146-4c3e-a50f-b008c42e141a',
+ name='Clark Franecki',
),
),
tracking_category_refs=[
shared.TrackingCategoryRef(
- id='bcdb35ff-2e4b-4275-b7a8-cd9e7319c177',
- name='Leon Collier',
- ),
- shared.TrackingCategoryRef(
- id='77b114ee-b52f-4f78-9fc3-7814d4c98e0c',
- name='Candice Rath',
+ id='c8dd6b14-4290-4747-8778-a7bd466d28c1',
+ name='Amelia Predovic',
),
],
- unit_amount=9222.99,
+ unit_amount=Decimal('8472.76'),
),
],
metadata=shared.Metadata(
@@ -654,90 +410,55 @@ req = operations.UpdateBillCreditNoteRequest(
shared.Items(
allocation=shared.ItemsAllocation(
allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='EUR',
- currency_rate=6293.77,
- total_amount=8339.82,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='636c6005-03d8-4bb3-9180-f739ae9e057e',
- name='Johnnie Baumbach',
- ),
currency='GBP',
- currency_rate=5200.81,
- id='10331f39-81d4-4c70-8b60-7f3c93c73b9d',
- note='officia',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='tenetur',
- total_amount=1339.49,
- ),
- ),
- shared.Items(
- allocation=shared.ItemsAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='EUR',
- currency_rate=8483.46,
- total_amount=6707.62,
+ currency_rate=Decimal('1783.67'),
+ total_amount=Decimal('3738.13'),
),
payment=shared.PaymentAllocationPayment(
account_ref=shared.AccountRef(
- id='7e23f225-7411-4faf-8b75-44e472e80285',
- name='Marguerite Hansen',
+ id='1904e523-c7e0-4bc7-978e-4796f2a70c68',
+ name='Eugene Leuschke',
),
- currency='GBP',
- currency_rate=2667.88,
- id='63a7d575-f140-40e7-a4ad-7334ec1b781b',
- note='amet',
+ currency='USD',
+ currency_rate=Decimal('2775.96'),
+ id='82562f22-2e98-417e-a17c-be61e6b7b95b',
+ note='eligendi',
paid_on_date='2022-10-23T00:00:00.000Z',
- reference='fuga',
- total_amount=53.1,
+ reference='culpa',
+ total_amount=Decimal('7313.98'),
),
),
],
- remaining_credit=0,
+ remaining_credit=Decimal('0'),
source_modified_date='2022-10-23T00:00:00.000Z',
status=shared.BillCreditNoteStatus.PAID,
- sub_total=805.78,
+ sub_total=Decimal('805.78'),
supplemental_data=shared.SupplementalData(
content={
- "quos": {
- "repellendus": 'veritatis',
- "quae": 'eaque',
- "saepe": 'delectus',
+ "cumque": {
+ "consequuntur": 'consequatur',
},
},
),
supplier_ref=shared.SupplierRef(
- id='ada200ef-0422-4eb2-964c-f9ab8366c723',
- supplier_name='reiciendis',
+ id='c4f3789f-d871-4f99-9d2e-fd121aa6f1e6',
+ supplier_name='in',
),
- total_amount=805.78,
- total_discount=0,
- total_tax_amount=0,
+ total_amount=Decimal('805.78'),
+ total_discount=Decimal('0'),
+ total_tax_amount=Decimal('0'),
withholding_tax=[
shared.WithholdingTaxitems(
- amount=8611.23,
- name='Mrs. Luther Torp',
- ),
- shared.WithholdingTaxitems(
- amount=9248.4,
- name='Kyle Leffler',
- ),
- shared.WithholdingTaxitems(
- amount=7868.6,
- name='Dr. Shari Roob Sr.',
- ),
- shared.WithholdingTaxitems(
- amount=3178.98,
- name='Ian Auer',
+ amount=Decimal('2586.84'),
+ name='Mrs. Gilberto Roberts',
),
],
),
- bill_credit_note_id='a',
+ bill_credit_note_id='dicta',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
force_update=False,
- timeout_in_minutes=615058,
+ timeout_in_minutes=355369,
)
res = s.bill_credit_notes.update(req)
diff --git a/sync-for-payables/docs/sdks/billpayments/README.md b/sync-for-payables/docs/sdks/billpayments/README.md
index 38128251e..1a7a048f6 100755
--- a/sync-for-payables/docs/sdks/billpayments/README.md
+++ b/sync-for-payables/docs/sdks/billpayments/README.md
@@ -7,6 +7,7 @@ Bill payments
### Available Operations
* [create](#create) - Create bill payments
+* [delete](#delete) - Delete bill payment
* [get](#get) - Get bill payment
* [get_create_model](#get_create_model) - Get create bill payment model
* [list](#list) - List bill payments
@@ -29,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -39,35 +41,23 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateBillPaymentRequest(
bill_payment=shared.BillPayment(
account_ref=shared.AccountRef(
- id='18544ec4-2def-4cce-8f19-77773e63562a',
- name='Ms. Verna Gislason',
+ id='756082d6-8ea1-49f1-9170-51339d08086a',
+ name='Mrs. Priscilla Fritsch',
),
currency='GBP',
- currency_rate=3314.52,
+ currency_rate=Decimal('7710.89'),
date_='2022-10-23T00:00:00.000Z',
id='3d5a8e00-d108-4045-8823-7f342676cffa',
lines=[
shared.BillPaymentLine(
allocated_on_date='2022-10-23T00:00:00.000Z',
- amount=3071.73,
+ amount=Decimal('120.36'),
links=[
shared.BillPaymentLineLink(
- amount=9847.73,
- currency_rate=8518.09,
- id='af313a1f-5fd9-4425-9c0b-36f25ea944f3',
- type=shared.BillPaymentLineLinkType.REFUND,
- ),
- shared.BillPaymentLineLink(
- amount=4483.86,
- currency_rate=3296.51,
- id='6c11f6c3-7a51-4262-8383-5bbc05a23a45',
- type=shared.BillPaymentLineLinkType.MANUAL_JOURNAL,
- ),
- shared.BillPaymentLineLink(
- amount=9322.5,
- currency_rate=9555.69,
- id='c5fde10a-0ce2-4169-a510-019c6dc5e347',
- type=shared.BillPaymentLineLinkType.OTHER,
+ amount=Decimal('4910.25'),
+ currency_rate=Decimal('1154.84'),
+ id='f93f5f06-42da-4c7a-b515-cc413aa63aae',
+ type=shared.BillPaymentLineLinkType.BILL_PAYMENT,
),
],
),
@@ -77,38 +67,25 @@ req = operations.CreateBillPaymentRequest(
),
modified_date='2022-10-23T00:00:00.000Z',
note='Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44',
- payment_method_ref='odio',
- reference='natus',
+ payment_method_ref='vel',
+ reference='ducimus',
source_modified_date='2022-10-23T00:00:00.000Z',
supplemental_data=shared.SupplementalData(
content={
- "doloribus": {
- "quidem": 'itaque',
- "laboriosam": 'unde',
- "modi": 'perspiciatis',
- },
- "hic": {
- "aspernatur": 'libero',
- "nam": 'incidunt',
- "recusandae": 'quod',
- },
- "id": {
- "autem": 'quo',
- "nesciunt": 'illum',
- "nemo": 'illum',
- "facilis": 'non',
+ "vel": {
+ "labore": 'possimus',
},
},
),
supplier_ref=shared.SupplierRef(
- id='adebd5da-ea4c-4506-a8aa-94c02644cf5e',
- supplier_name='unde',
+ id='bb675fd5-e60b-4375-ad4f-6fbee41f3331',
+ supplier_name='dignissimos',
),
- total_amount=1329.54,
+ total_amount=Decimal('1329.54'),
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=860311,
+ timeout_in_minutes=950953,
)
res = s.bill_payments.create(req)
@@ -130,6 +107,68 @@ if res.create_bill_payment_response is not None:
**[operations.CreateBillPaymentResponse](../../models/operations/createbillpaymentresponse.md)**
+## delete
+
+The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting platform.
+
+[Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account.
+
+### Process
+1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned.
+2. Check the status of the delete operation by checking the status of push operation either via
+ 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised),
+ 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation).
+
+ A `Success` status indicates that the bill payment object was deleted from the accounting platform.
+3. (Optional) Check that the bill payment was deleted from the accounting platform.
+
+### Effect on related objects
+Be aware that deleting a bill payment from an accounting platform might cause related objects to be modified.
+
+## Integration specifics
+Integrations that support soft delete do not permanently delete the object in the accounting platform.
+
+| Integration | Soft Delete | Details |
+|-------------|-------------|-----------------------------------------------------------------------------------------------------|
+| Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/accounting-netsuite-how-deleting-bill-payments-works) to learn more. |
+
+
+### Example Usage
+
+```python
+import codatsyncpayables
+from codatsyncpayables.models import operations, shared
+
+s = codatsyncpayables.CodatSyncPayables(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.DeleteBillPaymentRequest(
+ bill_payment_id='debitis',
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.bill_payments.delete(req)
+
+if res.push_operation is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `request` | [operations.DeleteBillPaymentRequest](../../models/operations/deletebillpaymentrequest.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.DeleteBillPaymentResponse](../../models/operations/deletebillpaymentresponse.md)**
+
+
## get
The *Get bill payment* endpoint returns a single bill payment for a given `billPaymentId`.
@@ -154,7 +193,7 @@ s = codatsyncpayables.CodatSyncPayables(
)
req = operations.GetBillPaymentsRequest(
- bill_payment_id='error',
+ bill_payment_id='consectetur',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
@@ -252,7 +291,7 @@ req = operations.ListBillPaymentsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='mollitia',
+ query='corporis',
)
res = s.bill_payments.list(req)
diff --git a/sync-for-payables/docs/sdks/bills/README.md b/sync-for-payables/docs/sdks/bills/README.md
index a1dfa4972..bd5735416 100755
--- a/sync-for-payables/docs/sdks/bills/README.md
+++ b/sync-for-payables/docs/sdks/bills/README.md
@@ -7,6 +7,7 @@ Bills
### Available Operations
* [create](#create) - Create bill
+* [delete](#delete) - Delete bill
* [download_attachment](#download_attachment) - Download bill attachment
* [get](#get) - Get bill
* [get_attachment](#get_attachment) - Get bill attachment
@@ -34,6 +35,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -43,361 +45,123 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateBillRequest(
bill=shared.Bill(
- amount_due=2986.13,
+ amount_due=Decimal('6897.68'),
currency='USD',
- currency_rate=4609.09,
+ currency_rate=Decimal('583.56'),
due_date='2022-10-23T00:00:00.000Z',
- id='adc1ac60-0dec-4001-ac80-2e2ec09ff8f0',
+ id='b1ea4265-55ba-43c2-8744-ed53b88f3a8d',
issue_date='2022-10-23T00:00:00.000Z',
line_items=[
shared.BillLineItem(
account_ref=shared.AccountRef(
- id='16ff3477-c13e-4902-8141-25b0960a6681',
- name='Amy Murray',
+ id='f5c0b2f2-fb7b-4194-a276-b26916fe1f08',
+ name='Troy Cormier',
),
- description='magni',
- discount_amount=6463.29,
- discount_percentage=9650.95,
+ description='necessitatibus',
+ discount_amount=Decimal('2155.29'),
+ discount_percentage=Decimal('4067.33'),
is_direct_cost=False,
item_ref=shared.ItemRef(
- id='923c5949-f83f-4350-8f87-6ffb901c6ecb',
- name='Joel Von',
+ id='98f447f6-03e8-4b44-9e80-ca55efd20e45',
+ name='Cecelia Braun',
),
- quantity=1940.58,
- sub_total=7581.94,
- tax_amount=9928.87,
+ quantity=Decimal('5106.29'),
+ sub_total=Decimal('7400.98'),
+ tax_amount=Decimal('3868.27'),
tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=4598.75,
- id='89ffafed-a53e-45ae-ae0a-c184c2b9c247',
- name='Isaac Lowe',
+ effective_tax_rate=Decimal('6805.15'),
+ id='89fbe3a5-aa8e-4482-8d0a-b4075088e518',
+ name='Jane Bailey',
),
- total_amount=2271.56,
+ total_amount=Decimal('9061.72'),
tracking=shared.Tracking(
category_refs=[
shared.TrackingCategoryRef(
- id='40e1942f-32e5-4505-9756-f5d56d0bd0af',
- name='Elena Zieme I',
- ),
- shared.TrackingCategoryRef(
- id='db4f62cb-a3f8-4941-aebc-0b80a6924d3b',
- name='Eloise Rowe',
- ),
- shared.TrackingCategoryRef(
- id='c8f89501-0f5d-4d3d-afa1-804e54c82f16',
- name='Rex Ernser',
+ id='904f3b11-94b8-4abf-a03a-79f9dfe0ab7d',
+ name='Max O'Connell DDS',
),
],
customer_ref=shared.TrackingCustomerRef(
- company_name='cumque',
- id='8873e484-380b-41f6-b8ca-275a60a04c49',
+ company_name='repudiandae',
+ id='187f86bc-173d-4689-aee9-526f8d986e88',
),
- is_billed_to=shared.BilledToType.NOT_APPLICABLE,
+ is_billed_to=shared.BilledToType.UNKNOWN,
is_rebilled_to=shared.BilledToType.PROJECT,
- project_ref=shared.TrackingProjectRef(
- id='c699171b-51c1-4bdb-9cf4-b888ebdfc4cc',
- name='Lynn Marks',
+ project_ref=shared.TrackingProjectReference(
+ id='ad4f0e10-1256-43f9-8e29-e973e922a57a',
+ name='Ana Predovic',
),
),
tracking_category_refs=[
shared.TrackingCategoryRef(
- id='7fc0b2dc-e108-473e-82b0-06d678878ba8',
- name='Kay Bradtke',
- ),
- shared.TrackingCategoryRef(
- id='8208c54f-efa9-4c95-b2ea-c5565d307cfe',
- name='Hugh Carroll III',
- ),
- shared.TrackingCategoryRef(
- id='e2813fa4-a41c-4480-93f2-132af03102d5',
- name='Danielle Willms',
- ),
- shared.TrackingCategoryRef(
- id='c6f18bf9-621a-46a4-b77a-87ee3e4be752',
- name='Gilbert Hayes',
+ id='e060807e-2b6e-43ab-8845-f0597a60ff2a',
+ name='Joanne Parisian DVM',
),
],
- unit_amount=2848.85,
- ),
- shared.BillLineItem(
- account_ref=shared.AccountRef(
- id='418e3bb9-1c8d-4975-a0e8-419d8f84f144',
- name='Ms. Jimmy Turcotte',
- ),
- description='facere',
- discount_amount=7890.16,
- discount_percentage=7690.47,
- is_direct_cost=False,
- item_ref=shared.ItemRef(
- id='4aa5f3ca-bd90-45a9-b2e0-56728227b2d3',
- name='Bobbie Greenfelder MD',
- ),
- quantity=9565.45,
- sub_total=4630.5,
- tax_amount=6671.69,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=3073.06,
- id='fa87cf53-5a6f-4ae5-8ebf-60c321f023b7',
- name='Paulette Dibbert',
- ),
- total_amount=4939.45,
- tracking=shared.Tracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='e1a0cc8d-f79f-40a3-96d9-0c364b7c15df',
- name='Hubert Russel V',
- ),
- shared.TrackingCategoryRef(
- id='8b1c4ee2-c8c6-4ce6-91fe-eb1c7cbdb6ee',
- name='Jessie Hahn',
- ),
- shared.TrackingCategoryRef(
- id='8ba25317-747d-4c91-9ad2-caf5dd6723dc',
- name='Shawna Heller',
- ),
- shared.TrackingCategoryRef(
- id='2f3a6b70-0878-4756-943f-5a6c98b55554',
- name='Naomi Bauch',
- ),
- ],
- customer_ref=shared.TrackingCustomerRef(
- company_name='doloremque',
- id='bcacc6cb-d6b5-4f3e-8909-304f926bad25',
- ),
- is_billed_to=shared.BilledToType.NOT_APPLICABLE,
- is_rebilled_to=shared.BilledToType.UNKNOWN,
- project_ref=shared.TrackingProjectRef(
- id='819b474b-0ed2-40e5-a248-fff639a910ab',
- name='Salvatore Paucek',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='676696e1-ec00-4221-b335-d89acb3ecfda',
- name='Ellis Balistreri',
- ),
- ],
- unit_amount=3075.32,
- ),
- shared.BillLineItem(
- account_ref=shared.AccountRef(
- id='9ef03004-978a-461f-a1cf-20688f77c1ff',
- name='Jared Blick',
- ),
- description='fuga',
- discount_amount=665.96,
- discount_percentage=4057.89,
- is_direct_cost=False,
- item_ref=shared.ItemRef(
- id='3f2a3c80-a97f-4f33-8cdd-f857a9e61876',
- name='Marc O'Connell Sr.',
- ),
- quantity=8600.27,
- sub_total=1665.42,
- tax_amount=6180.73,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=8511.99,
- id='fc94d6fe-cd79-4939-8066-a6d2d0003553',
- name='Billie Schmitt',
- ),
- total_amount=390.47,
- tracking=shared.Tracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='6fa21e91-52cb-4311-9167-b8e3c8db0340',
- name='Levi Johns',
- ),
- shared.TrackingCategoryRef(
- id='64ffd455-906d-4126-bd48-e935c2c9e81f',
- name='Elizabeth Roberts',
- ),
- shared.TrackingCategoryRef(
- id='e43202d7-2165-4765-8664-1870d9d21f9a',
- name='Miss Michael Ferry',
- ),
- ],
- customer_ref=shared.TrackingCustomerRef(
- company_name='debitis',
- id='cc11a083-6429-4068-b850-2a55e7f73bc8',
- ),
- is_billed_to=shared.BilledToType.NOT_APPLICABLE,
- is_rebilled_to=shared.BilledToType.NOT_APPLICABLE,
- project_ref=shared.TrackingProjectRef(
- id='e320a319-f4ba-4df9-87c9-a867bc424266',
- name='Mrs. Geraldine Lueilwitz',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='ca8ef51f-cb4c-4593-ac12-cdaad0ec7afe',
- name='Robin Strosin PhD',
- ),
- shared.TrackingCategoryRef(
- id='f448a47f-9390-4c58-8809-83dabf9ef3ff',
- name='Levi Mohr',
- ),
- shared.TrackingCategoryRef(
- id='f079af4d-3572-44cd-b0f4-d281187d5684',
- name='Eloise Stoltenberg',
- ),
- shared.TrackingCategoryRef(
- id='85a9065e-628b-4dfc-a032-b6c879923b7e',
- name='Rosa Hand',
- ),
- ],
- unit_amount=9897.65,
+ unit_amount=Decimal('6072.49'),
),
],
metadata=shared.Metadata(
is_deleted=False,
),
modified_date='2022-10-23T00:00:00.000Z',
- note='deserunt',
+ note='molestiae',
payment_allocations=[
shared.BillPaymentAllocation(
allocation=shared.BillPaymentAllocationAllocation(
allocated_on_date='2022-10-23T00:00:00.000Z',
currency='GBP',
- currency_rate=7733.55,
- total_amount=4013.88,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='891f82ce-1157-4172-b053-77dcfa89df97',
- name='Tasha Dickinson',
- ),
- currency='USD',
- currency_rate=5228.24,
- id='6092e9c3-ddc5-4f11-9dea-1026d541a4d1',
- note='omnis',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='sapiente',
- total_amount=8876,
- ),
- ),
- shared.BillPaymentAllocation(
- allocation=shared.BillPaymentAllocationAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='GBP',
- currency_rate=1127.51,
- total_amount=4878.39,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='80bccc0d-bbdd-4b48-8708-fb4e391e6bc1',
- name='Vickie Sauer',
- ),
- currency='GBP',
- currency_rate=9365.18,
- id='54599ea3-4226-40e9-b200-ce78a1bd8fb7',
- note='culpa',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='fuga',
- total_amount=1175.46,
- ),
- ),
- shared.BillPaymentAllocation(
- allocation=shared.BillPaymentAllocationAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='USD',
- currency_rate=7574.38,
- total_amount=8855.23,
+ currency_rate=Decimal('6330.62'),
+ total_amount=Decimal('2384.13'),
),
payment=shared.PaymentAllocationPayment(
account_ref=shared.AccountRef(
- id='723d4097-fa30-4e9a-b725-b29122030d83',
- name='Dan Nolan',
+ id='e865e795-6f92-451a-9a9d-a660ff57bfaa',
+ name='Edwin Wolf',
),
- currency='USD',
- currency_rate=4938.65,
- id='99d22e8c-1f84-4938-a5fd-c42c876c2c2d',
- note='delectus',
- paid_on_date='2022-10-23T00:00:00.000Z',
- reference='aliquam',
- total_amount=7579.62,
- ),
- ),
- shared.BillPaymentAllocation(
- allocation=shared.BillPaymentAllocationAllocation(
- allocated_on_date='2022-10-23T00:00:00.000Z',
currency='EUR',
- currency_rate=756.1,
- total_amount=7513.47,
- ),
- payment=shared.PaymentAllocationPayment(
- account_ref=shared.AccountRef(
- id='76230f84-1fb1-4bd2-bfdb-14db6be5a685',
- name='Luther Leuschke',
- ),
- currency='GBP',
- currency_rate=6715.68,
- id='e20da16f-c2b2-471a-a89c-57e854e90439',
- note='quibusdam',
+ currency_rate=Decimal('7645.62'),
+ id='1b4512c1-0326-448d-82f6-15199ebfd0e9',
+ note='maiores',
paid_on_date='2022-10-23T00:00:00.000Z',
- reference='consequuntur',
- total_amount=1594.69,
+ reference='aliquid',
+ total_amount=Decimal('7809.31'),
),
),
],
purchase_order_refs=[
shared.BillPurchaseOrderReference(
- id='65694624-0708-44f7-ab37-cef02225194d',
- purchase_order_number='quidem',
- ),
- shared.BillPurchaseOrderReference(
- id='55410adc-669a-4f90-a26c-7cdc981f0689',
- purchase_order_number='corrupti',
+ id='632ca3ae-d011-4799-a312-fde04771778f',
+ purchase_order_number='reiciendis',
),
],
- reference='quae',
+ reference='vel',
source_modified_date='2022-10-23T00:00:00.000Z',
- status=shared.BillStatus.PARTIALLY_PAID,
- sub_total=7304.37,
+ status=shared.BillStatus.DRAFT,
+ sub_total=Decimal('396.5'),
supplemental_data=shared.BillSupplementalData(
content={
- "amet": {
- "minus": 'hic',
- },
- "similique": {
- "consectetur": 'labore',
- "laudantium": 'cumque',
- "adipisci": 'veritatis',
- },
- "nam": {
- "magnam": 'aperiam',
- "ducimus": 'itaque',
- "necessitatibus": 'numquam',
- "doloribus": 'eligendi',
+ "dicta": {
+ "odio": 'tempora',
},
},
),
supplier_ref=shared.SupplierRef(
- id='f0c42b78-f156-4263-98a0-dc766324ccb0',
- supplier_name='ea',
+ id='76360a15-db6a-4660-a59a-1adeaab5851d',
+ supplier_name='ex',
),
- tax_amount=7713.21,
- total_amount=5184.32,
+ tax_amount=Decimal('7758.03'),
+ total_amount=Decimal('4053.73'),
withholding_tax=[
shared.BillWithholdingTax(
- amount=6651.83,
- name='Mr. Louise Sipes',
- ),
- shared.BillWithholdingTax(
- amount=1364.32,
- name='Miss Victor Kuhlman',
- ),
- shared.BillWithholdingTax(
- amount=8196.9,
- name='Courtney Conroy',
- ),
- shared.BillWithholdingTax(
- amount=8506.28,
- name='Kirk Heidenreich',
+ amount=Decimal('2811.53'),
+ name='Lula Bartell',
),
],
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=704665,
+ timeout_in_minutes=399660,
)
res = s.bills.create(req)
@@ -419,6 +183,74 @@ if res.create_bill_response is not None:
**[operations.CreateBillResponse](../../models/operations/createbillresponse.md)**
+## delete
+
+The *Delete bill* endpoint allows you to delete a specified bill from an accounting platform.
+
+[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are itemized records of goods received or services provided to the SMB.
+
+### Process
+1. Pass the `{billId}` to the *Delete bill* endpoint and store the `pushOperationKey` returned.
+2. Check the status of the delete operation by checking the status of push operation either via
+ 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised),
+ 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation).
+
+ A `Success` status indicates that the bill object was deleted from the accounting platform.
+3. (Optional) Check that the bill was deleted from the accounting platform.
+
+### Effect on related objects
+
+Be aware that deleting a bill from an accounting platform might cause related objects to be modified. For example, if you delete a paid bill in QuickBooks Online, the bill is deleted but the bill payment against that bill is not. The bill payment is converted to a payment on account.
+
+## Integration specifics
+Integrations that support soft delete do not permanently delete the object in the accounting platform.
+
+| Integration | Soft Delete | Details |
+|-------------|-------------|--------------------------------------------------------------------------------------------------------------|
+| QuickBooks Online | No | - |
+| Oracle NetSuite | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. |
+
+> **Supported Integrations**
+>
+> This functionality is currently only supported for our QuickBooks Online abd Oracle NetSuite integrations. Check out our [public roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) to see what we're building next, and to submit ideas for new features.
+
+### Example Usage
+
+```python
+import codatsyncpayables
+from codatsyncpayables.models import operations, shared
+
+s = codatsyncpayables.CodatSyncPayables(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.DeleteBillRequest(
+ bill_id='13d946f0-c5d5-42bc-b092-97ece17923ab',
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+ connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
+)
+
+res = s.bills.delete(req)
+
+if res.push_operation is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| `request` | [operations.DeleteBillRequest](../../models/operations/deletebillrequest.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.DeleteBillResponse](../../models/operations/deletebillresponse.md)**
+
+
## download_attachment
The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`.
@@ -442,7 +274,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.DownloadBillAttachmentRequest(
attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- bill_id='EILBDVJVNUAGVKRQ',
+ bill_id='7110701885',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
)
@@ -490,7 +322,7 @@ s = codatsyncpayables.CodatSyncPayables(
)
req = operations.GetBillRequest(
- bill_id='EILBDVJVNUAGVKRQ',
+ bill_id='7110701885',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
@@ -635,7 +467,7 @@ req = operations.ListBillsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='dolore',
+ query='rerum',
)
res = s.bills.list(req)
@@ -679,7 +511,7 @@ s = codatsyncpayables.CodatSyncPayables(
)
req = operations.ListBillAttachmentsRequest(
- bill_id='EILBDVJVNUAGVKRQ',
+ bill_id='7110701885',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
)
@@ -721,6 +553,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -730,274 +563,125 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.UpdateBillRequest(
bill=shared.Bill(
- amount_due=7053.07,
- currency='USD',
- currency_rate=3656.76,
+ amount_due=Decimal('6347.86'),
+ currency='GBP',
+ currency_rate=Decimal('9591.43'),
due_date='2022-10-23T00:00:00.000Z',
- id='693352f7-4533-4994-978d-e3b6e9389f5a',
+ id='1ade008e-6f8c-45f3-90d8-cdb5a3418143',
issue_date='2022-10-23T00:00:00.000Z',
line_items=[
shared.BillLineItem(
account_ref=shared.AccountRef(
- id='7f662550-a283-482a-8483-afd2315bba65',
- name='Debra Kerluke',
+ id='10421813-d520-48ec-a7e2-53b668451c6c',
+ name='Mrs. Kate Cronin',
),
- description='quae',
- discount_amount=4090.21,
- discount_percentage=9891.22,
+ description='quasi',
+ discount_amount=Decimal('3925.69'),
+ discount_percentage=Decimal('8711.03'),
is_direct_cost=False,
item_ref=shared.ItemRef(
- id='5bf6ae59-1bc8-4bde-b361-2b63c205fda8',
- name='Sarah Kuhn',
+ id='eab3fec9-578a-4645-8427-3a8418d16230',
+ name='Miss Dominick Rogahn',
),
- quantity=6839.8,
- sub_total=4359.31,
- tax_amount=5383.68,
+ quantity=Decimal('5790.11'),
+ sub_total=Decimal('6128.67'),
+ tax_amount=Decimal('1700.99'),
tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=6382.19,
- id='9a35d086-b6f6-46fe-b020-e9f443b4257b',
- name='Marshall Daugherty',
+ effective_tax_rate=Decimal('813.69'),
+ id='aefb9f58-c4d8-46e6-8e4b-e056013f59da',
+ name='Ida Kilback',
),
- total_amount=8301.97,
+ total_amount=Decimal('5718.44'),
tracking=shared.Tracking(
category_refs=[
shared.TrackingCategoryRef(
- id='da6a61ef-a219-4825-8fd0-a9eba47f7d3e',
- name='Thomas Hahn',
- ),
- shared.TrackingCategoryRef(
- id='40d6a183-1c87-4adf-996f-df1ad837ae80',
- name='Ms. Terry Runolfsson',
- ),
- shared.TrackingCategoryRef(
- id='95ba9986-78fa-43f6-9699-1af388ce0361',
- name='Eva Gleichner',
+ id='ecfef66e-f1ca-4a33-83c2-beb477373c8d',
+ name='Christina Wolf',
),
],
customer_ref=shared.TrackingCustomerRef(
- company_name='voluptate',
- id='977a0ef2-f536-4028-afee-f934152ed7e2',
+ company_name='quibusdam',
+ id='1db1f2c4-3106-461e-9634-9e1cf9e06e3a',
),
is_billed_to=shared.BilledToType.NOT_APPLICABLE,
is_rebilled_to=shared.BilledToType.UNKNOWN,
- project_ref=shared.TrackingProjectRef(
- id='f4c157de-aa71-470f-845a-ccf667aaf9bb',
- name='Laurence Blick',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='e431d6bf-5c83-48fb-b8c2-0cb67fc4b425',
- name='Perry Mayert',
- ),
- shared.TrackingCategoryRef(
- id='234c9f7b-79df-4eb7-ba5c-38d4baf91e50',
- name='Olive Windler',
- ),
- shared.TrackingCategoryRef(
- id='0a54b475-f16f-456d-b85a-3c4ac631b99e',
- name='Ella Runolfsdottir',
- ),
- shared.TrackingCategoryRef(
- id='8f9fdb94-10f6-43bb-b817-837b01afdd78',
- name='Chester Daugherty IV',
- ),
- ],
- unit_amount=6138.48,
- ),
- shared.BillLineItem(
- account_ref=shared.AccountRef(
- id='eb44873f-5033-4f19-9bf1-25ce4152eab9',
- name='Lionel Klocko',
- ),
- description='odit',
- discount_amount=1383.06,
- discount_percentage=2593.74,
- is_direct_cost=False,
- item_ref=shared.ItemRef(
- id='a6a0e123-b784-47ec-99e1-f67f3c4cce4b',
- name='Angel Kris',
- ),
- quantity=4001.45,
- sub_total=9961.01,
- tax_amount=9570.32,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=2322.09,
- id='c5747501-357e-444f-91f8-b084c3197e19',
- name='Rosie Conroy',
- ),
- total_amount=3088.66,
- tracking=shared.Tracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='7f94874c-2d5c-4c49-b223-3e66bd8fe5d0',
- name='Jeannette Mante',
- ),
- shared.TrackingCategoryRef(
- id='ef203873-2059-40cc-8109-6400313b3e50',
- name='Debbie Windler',
- ),
- ],
- customer_ref=shared.TrackingCustomerRef(
- company_name='maiores',
- id='e72dc407-7d0c-4c3f-808e-fc15ceb4d6e1',
- ),
- is_billed_to=shared.BilledToType.PROJECT,
- is_rebilled_to=shared.BilledToType.CUSTOMER,
- project_ref=shared.TrackingProjectRef(
- id='e0f75aed-f2ac-4ab5-8b99-1c926ddb5894',
- name='Joyce Terry',
- ),
- ),
- tracking_category_refs=[
- shared.TrackingCategoryRef(
- id='1cbe6d95-02f0-4ea9-b0b6-9f7ac2f72f88',
- name='Karen Barrows I',
- ),
- ],
- unit_amount=5776.22,
- ),
- shared.BillLineItem(
- account_ref=shared.AccountRef(
- id='11608207-888e-4c66-983b-fe9659eb40ec',
- name='Loretta Wehner',
- ),
- description='nihil',
- discount_amount=3452.7,
- discount_percentage=7023.39,
- is_direct_cost=False,
- item_ref=shared.ItemRef(
- id='0b532a4d-a37c-4baa-b445-2c4842c9b2ad',
- name='Rose Stoltenberg',
- ),
- quantity=8968.11,
- sub_total=5316.06,
- tax_amount=981.23,
- tax_rate_ref=shared.TaxRateRef(
- effective_tax_rate=6493.73,
- id='88f44445-73fe-4cd4-b353-f63c8209379a',
- name='Reginald McClure',
- ),
- total_amount=3210.07,
- tracking=shared.Tracking(
- category_refs=[
- shared.TrackingCategoryRef(
- id='bcf79da1-8a78-422b-b958-94e6861adb55',
- name='Nick Torp',
- ),
- shared.TrackingCategoryRef(
- id='751c9fe8-f750-42bf-9c34-50841f176445',
- name='Wendy Kling',
- ),
- shared.TrackingCategoryRef(
- id='3fb27e21-f862-4657-b36f-c6b9f587ce52',
- name='Brooke Jacobs',
- ),
- shared.TrackingCategoryRef(
- id='41a8312e-5047-4b4c-a1cc-b423abcdc91f',
- name='Rex Rau',
- ),
- ],
- customer_ref=shared.TrackingCustomerRef(
- company_name='totam',
- id='8e71f6c4-8252-4d77-b1e7-fd074009ef8d',
- ),
- is_billed_to=shared.BilledToType.UNKNOWN,
- is_rebilled_to=shared.BilledToType.CUSTOMER,
- project_ref=shared.TrackingProjectRef(
- id='de1dd709-7b5d-4a08-857f-a6c78a216e19',
- name='Pablo Wilkinson',
+ project_ref=shared.TrackingProjectReference(
+ id='7000ae6b-6bc9-4b8f-b59e-ac55a9741d31',
+ name='Florence Hand',
),
),
tracking_category_refs=[
shared.TrackingCategoryRef(
- id='61914981-40b6-44ff-8ae1-70ef03b5f37e',
- name='Angie O'Hara',
- ),
- shared.TrackingCategoryRef(
- id='85559667-32aa-45dc-b668-2cb70f8cfd5f',
- name='Brent Weber MD',
- ),
- shared.TrackingCategoryRef(
- id='9a9f7484-6e2c-4330-9db0-536d9e75ca00',
- name='Lana Hauck',
+ id='65bb8a72-0261-4143-9e13-9dbc2259b1ab',
+ name='Oliver Luettgen IV',
),
],
- unit_amount=1500.91,
+ unit_amount=Decimal('573.2'),
),
],
metadata=shared.Metadata(
is_deleted=False,
),
modified_date='2022-10-23T00:00:00.000Z',
- note='et',
+ note='inventore',
payment_allocations=[
shared.BillPaymentAllocation(
allocation=shared.BillPaymentAllocationAllocation(
allocated_on_date='2022-10-23T00:00:00.000Z',
- currency='GBP',
- currency_rate=3322.37,
- total_amount=6650.82,
+ currency='USD',
+ currency_rate=Decimal('2928.88'),
+ total_amount=Decimal('7551.06'),
),
payment=shared.PaymentAllocationPayment(
account_ref=shared.AccountRef(
- id='8bf92f97-428a-4d9a-9f8b-f8221125359d',
- name='Guy Feest',
+ id='b0672d1a-d879-4eeb-9665-b85efbd02bae',
+ name='Mamie Torp',
),
- currency='EUR',
- currency_rate=4820.62,
- id='a79cd72c-d248-44da-a172-9f2ac41ef572',
- note='quis',
+ currency='USD',
+ currency_rate=Decimal('5101.28'),
+ id='2259e3ea-4b51-497f-9244-3da7ce52b895',
+ note='placeat',
paid_on_date='2022-10-23T00:00:00.000Z',
- reference='dicta',
- total_amount=1158.49,
+ reference='neque',
+ total_amount=Decimal('4468.77'),
),
),
],
purchase_order_refs=[
shared.BillPurchaseOrderReference(
- id='9ac1e41d-8a23-4c23-a34f-2dfa4a197f6d',
- purchase_order_number='recusandae',
- ),
- shared.BillPurchaseOrderReference(
- id='922151fe-1712-4099-853e-9f543d854439',
- purchase_order_number='accusamus',
+ id='c6454efb-0b34-4896-83ca-5acfbe2fd570',
+ purchase_order_number='odio',
),
],
- reference='voluptates',
+ reference='minima',
source_modified_date='2022-10-23T00:00:00.000Z',
- status=shared.BillStatus.UNKNOWN,
- sub_total=2805.9,
+ status=shared.BillStatus.PARTIALLY_PAID,
+ sub_total=Decimal('5678.46'),
supplemental_data=shared.BillSupplementalData(
content={
- "laboriosam": {
- "tempora": 'aliquam',
- },
- "dolorem": {
- "impedit": 'architecto',
- "minima": 'magnam',
- "vitae": 'quos',
+ "dolores": {
+ "error": 'veritatis',
},
},
),
supplier_ref=shared.SupplierRef(
- id='8c2f56e8-5da7-4832-aabd-617c3b0d51a4',
- supplier_name='ut',
+ id='77deac64-6ecb-4573-809e-3eb1e5a2b12e',
+ supplier_name='nobis',
),
- tax_amount=6942.92,
- total_amount=9852.65,
+ tax_amount=Decimal('568.77'),
+ total_amount=Decimal('4973.57'),
withholding_tax=[
shared.BillWithholdingTax(
- amount=1013.18,
- name='Doug Stiedemann',
+ amount=Decimal('9804.86'),
+ name='Joyce Howe',
),
],
),
- bill_id='13d946f0-c5d5-42bc-b092-97ece17923ab',
+ bill_id='7110701885',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
force_update=False,
- timeout_in_minutes=434330,
+ timeout_in_minutes=578210,
)
res = s.bills.update(req)
@@ -1046,8 +730,8 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.UploadBillAttachmentRequest(
request_body=operations.UploadBillAttachmentRequestBody(
- content='temporibus'.encode(),
- request_body='incidunt',
+ content='nemo'.encode(),
+ request_body='aliquam',
),
bill_id='9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2',
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
diff --git a/sync-for-payables/docs/sdks/codatsyncpayables/README.md b/sync-for-payables/docs/sdks/codatsyncpayables/README.md
index a14bddee2..a4a3624b1 100755
--- a/sync-for-payables/docs/sdks/codatsyncpayables/README.md
+++ b/sync-for-payables/docs/sdks/codatsyncpayables/README.md
@@ -6,7 +6,29 @@ Sync for Payables: The API for Sync for Payables.
Sync for Payables is an API and a set of supporting tools built to help integrate with your customers' accounting software, and keep their supplier information, invoices, and payments in sync.
-[Read More...](https://docs.codat.io/payables/overview)
+[Explore product](https://docs.codat.io/payables/overview) | [See OpenAPI spec](https://github.com/codatio/oas)
+
+---
+
+## Endpoints
+
+| Endpoints | Description |
+|:---------------------|:-----------------------------------------------------------------------------------------------------------|
+| Companies | Create and manage your SMB users' companies. |
+| Connections | Create new and manage existing data connections for a company. |
+| Accounts | Get, create, and update Accounts |
+| Bills | Get, create, and update Bills |
+| Bill credit notes | Get, create, and update Bill credit notes |
+| Bill payments | Get, create, and update Bill payments |
+| Journals | Get, create, and update Journals |
+| Journal entries | Get, create, and update Journal entries |
+| Payment methods | Get, create, and update Payment methods |
+| Suppliers | Get, create, and update Suppliers |
+| Tax rates | Get, create, and update Tax rates |
+| Tracking categories | Get, create, and update Tracking categories |
+| Push operations | View historic push operations |
+| Company info | View company profile from the source platform. |
+| Manage data | Control how data is retrieved from an integration. |
### Available Operations
diff --git a/sync-for-payables/docs/sdks/companies/README.md b/sync-for-payables/docs/sdks/companies/README.md
index 76ce8a1c2..9dba3d7be 100755
--- a/sync-for-payables/docs/sdks/companies/README.md
+++ b/sync-for-payables/docs/sdks/companies/README.md
@@ -155,7 +155,7 @@ req = operations.ListCompaniesRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='alias',
+ query='doloribus',
)
res = s.companies.list(req)
diff --git a/sync-for-payables/docs/sdks/companyinfo/README.md b/sync-for-payables/docs/sdks/companyinfo/README.md
new file mode 100755
index 000000000..787ecd1db
--- /dev/null
+++ b/sync-for-payables/docs/sdks/companyinfo/README.md
@@ -0,0 +1,48 @@
+# company_info
+
+## Overview
+
+View company information fetched from the source platform.
+
+### Available Operations
+
+* [get_accounting_profile](#get_accounting_profile) - Get company accounting profile
+
+## get_accounting_profile
+
+Gets the latest basic info for a company.
+
+### Example Usage
+
+```python
+import codatsyncpayables
+from codatsyncpayables.models import operations, shared
+
+s = codatsyncpayables.CodatSyncPayables(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+req = operations.GetAccountingProfileRequest(
+ company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
+)
+
+res = s.company_info.get_accounting_profile(req)
+
+if res.company_information is not None:
+ # handle response
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetAccountingProfileRequest](../../models/operations/getaccountingprofilerequest.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.GetAccountingProfileResponse](../../models/operations/getaccountingprofileresponse.md)**
+
diff --git a/sync-for-payables/docs/sdks/connections/README.md b/sync-for-payables/docs/sdks/connections/README.md
index 73d871765..c8c152509 100755
--- a/sync-for-payables/docs/sdks/connections/README.md
+++ b/sync-for-payables/docs/sdks/connections/README.md
@@ -32,7 +32,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateConnectionRequest(
request_body=operations.CreateConnectionRequestBody(
- platform_key='laudantium',
+ platform_key='eligendi',
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
)
@@ -158,7 +158,7 @@ req = operations.ListConnectionsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='qui',
+ query='sint',
)
res = s.connections.list(req)
@@ -197,8 +197,8 @@ s = codatsyncpayables.CodatSyncPayables(
)
req = operations.UnlinkConnectionRequest(
- request_body=operations.UnlinkConnectionRequestBody(
- status='libero',
+ request_body=operations.UnlinkConnectionUpdateConnection(
+ status=shared.DataConnectionStatus.LINKED,
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
diff --git a/sync-for-payables/docs/sdks/journalentries/README.md b/sync-for-payables/docs/sdks/journalentries/README.md
index 85683ff2b..93c2dd21c 100755
--- a/sync-for-payables/docs/sdks/journalentries/README.md
+++ b/sync-for-payables/docs/sdks/journalentries/README.md
@@ -27,6 +27,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
```python
import codatsyncpayables
from codatsyncpayables.models import operations, shared
+from decimal import Decimal
s = codatsyncpayables.CodatSyncPayables(
security=shared.Security(
@@ -37,92 +38,30 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateJournalEntryRequest(
journal_entry=shared.JournalEntry(
created_on='2022-10-23T00:00:00.000Z',
- description='nam',
- id='dc41ff5d-4e2a-4e4f-b5cb-35d17638f1ed',
+ description='animi',
+ id='88970e18-9dbb-430f-8b33-ea055b197cd4',
journal_lines=[
shared.JournalLine(
account_ref=shared.AccountRef(
- id='78359ecc-5cb8-460f-8cd5-80ba73810e4f',
- name='Don Hagenes',
+ id='4e2f52d8-2d35-413b-b6f4-8b656bcdb35f',
+ name='Russell Toy',
),
- currency='magni',
- description='excepturi',
- net_amount=4576.85,
+ currency='eos',
+ description='reprehenderit',
+ net_amount=Decimal('3455.06'),
tracking=shared.JournalLineTracking(
record_refs=[
- shared.RecordRef(
- data_type='transfer',
- id='3b1dd3bb-ce24-47b7-a84e-ff50126d71cf',
- ),
- shared.RecordRef(
- data_type='transfer',
- id='bd0eb74b-8421-4953-b44b-d3c43159d33e',
- ),
- shared.RecordRef(
- data_type='invoice',
- id='953c0011-3986-43aa-81e6-c31cc2f1fcb5',
- ),
shared.RecordRef(
data_type='journalEntry',
- id='c9a41ffb-e9cb-4d79-9ee6-5e076cc7abf6',
- ),
- ],
- ),
- ),
- shared.JournalLine(
- account_ref=shared.AccountRef(
- id='16ea5c71-6419-434b-90f2-e09d19d2fc2f',
- name='Merle Cormier Jr.',
- ),
- currency='nemo',
- description='provident',
- net_amount=2529.57,
- tracking=shared.JournalLineTracking(
- record_refs=[
- shared.RecordRef(
- data_type='accountTransaction',
- id='935d237a-72f9-4084-9d6a-ed4aecb7537c',
- ),
- shared.RecordRef(
- data_type='transfer',
- id='9222c9ff-5749-41aa-bfa2-e761f0ca4d45',
- ),
- ],
- ),
- ),
- shared.JournalLine(
- account_ref=shared.AccountRef(
- id='6ef1031e-6899-4f0c-a001-e22cd55cc058',
- name='Hattie Botsford',
- ),
- currency='possimus',
- description='nihil',
- net_amount=3758.77,
- tracking=shared.JournalLineTracking(
- record_refs=[
- shared.RecordRef(
- data_type='accountTransaction',
- id='71fc820c-65b0-437b-b8e0-cc885187e4de',
- ),
- shared.RecordRef(
- data_type='journalEntry',
- id='4af28c5d-ddb4-46aa-9cfd-6d828da01319',
- ),
- shared.RecordRef(
- data_type='journalEntry',
- id='12964664-5c1d-481f-a904-2f569b7aff0e',
- ),
- shared.RecordRef(
- data_type='accountTransaction',
- id='2216cbe0-71bc-4163-a279-a3b084da9925',
+ id='7a8cd9e7-319c-4177-9525-f77b114eeb52',
),
],
),
),
],
journal_ref=shared.JournalRef(
- id='7d04f408-47a7-442d-8449-6cbdeecf6b99',
- name='Wilbert Jerde',
+ id='ff785fc3-7814-4d4c-98e0-c2bb89eb75da',
+ name='Elmer Emard',
),
metadata=shared.Metadata(
is_deleted=False,
@@ -130,18 +69,14 @@ req = operations.CreateJournalEntryRequest(
modified_date='2022-10-23T00:00:00.000Z',
posted_on='2022-10-23T00:00:00.000Z',
record_ref=shared.JournalEntryRecordReference(
- data_type='transfer',
- id='bfdf55c2-94c0-460b-86a1-287764eef6d0',
+ data_type='journalEntry',
+ id='503d8bb3-1180-4f73-9ae9-e057eb809e28',
),
source_modified_date='2022-10-23T00:00:00.000Z',
supplemental_data=shared.SupplementalData(
content={
- "temporibus": {
- "itaque": 'nulla',
- "excepturi": 'quod',
- },
- "in": {
- "temporibus": 'temporibus',
+ "voluptatem": {
+ "velit": 'dolor',
},
},
),
@@ -149,7 +84,7 @@ req = operations.CreateJournalEntryRequest(
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=247927,
+ timeout_in_minutes=953676,
)
res = s.journal_entries.create(req)
diff --git a/sync-for-payables/docs/sdks/journals/README.md b/sync-for-payables/docs/sdks/journals/README.md
index c001d53e1..cb064a7e2 100755
--- a/sync-for-payables/docs/sdks/journals/README.md
+++ b/sync-for-payables/docs/sdks/journals/README.md
@@ -40,21 +40,21 @@ req = operations.CreateJournalRequest(
journal=shared.Journal(
created_on='2022-10-23T00:00:00.000Z',
has_children=False,
- id='571509a8-e870-4d3c-9a1f-9c242c7b66a1',
- journal_code='reiciendis',
+ id='981d4c70-0b60-47f3-893c-73b9da3f2ced',
+ journal_code='laborum',
metadata=shared.Metadata(
is_deleted=False,
),
modified_date='2022-10-23T00:00:00.000Z',
- name='Sadie Kulas',
- parent_id='repellat',
+ name='Clarence Feeney Sr.',
+ parent_id='exercitationem',
source_modified_date='2022-10-23T00:00:00.000Z',
- status=shared.JournalStatus.ARCHIVED,
- type='ea',
+ status=shared.JournalStatus.UNKNOWN,
+ type='ab',
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=477222,
+ timeout_in_minutes=72754,
)
res = s.journals.create(req)
@@ -101,7 +101,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.GetJournalRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- journal_id='vitae',
+ journal_id='hic',
)
res = s.journals.get(req)
@@ -198,7 +198,7 @@ req = operations.ListJournalsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='excepturi',
+ query='deserunt',
)
res = s.journals.list(req)
diff --git a/sync-for-payables/docs/sdks/managedata/README.md b/sync-for-payables/docs/sdks/managedata/README.md
index 24c6444ce..44254f043 100755
--- a/sync-for-payables/docs/sdks/managedata/README.md
+++ b/sync-for-payables/docs/sdks/managedata/README.md
@@ -112,7 +112,7 @@ req = operations.ListPullOperationsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='voluptatum',
+ query='delectus',
)
res = s.manage_data.list_pull_operations(req)
@@ -197,7 +197,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.RefreshDataTypeRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='90f42a4b-b438-4d85-b260-591d745e3c20',
+ connection_id='4b7544e4-72e8-4028-97a5-b40463a7d575',
data_type=shared.DataType.INVOICES,
)
diff --git a/sync-for-payables/docs/sdks/paymentmethods/README.md b/sync-for-payables/docs/sdks/paymentmethods/README.md
index ecd589e2f..2990a0986 100755
--- a/sync-for-payables/docs/sdks/paymentmethods/README.md
+++ b/sync-for-payables/docs/sdks/paymentmethods/README.md
@@ -34,7 +34,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.GetPaymentMethodRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- payment_method_id='veniam',
+ payment_method_id='reiciendis',
)
res = s.payment_methods.get(req)
@@ -82,7 +82,7 @@ req = operations.ListPaymentMethodsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='sint',
+ query='ab',
)
res = s.payment_methods.list(req)
diff --git a/sync-for-payables/docs/sdks/pushoperations/README.md b/sync-for-payables/docs/sdks/pushoperations/README.md
index 303008f8c..0982dd740 100755
--- a/sync-for-payables/docs/sdks/pushoperations/README.md
+++ b/sync-for-payables/docs/sdks/pushoperations/README.md
@@ -27,7 +27,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.GetPushOperationRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- push_operation_key='c9c3f567-e0e2-4527-a5b1-d62fcdace1f0',
+ push_operation_key='400e764a-d733-44ec-9b78-1b36a08088d1',
)
res = s.push_operations.get(req)
@@ -70,7 +70,7 @@ req = operations.ListPushOperationsRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='sunt',
+ query='quae',
)
res = s.push_operations.list(req)
diff --git a/sync-for-payables/docs/sdks/suppliers/README.md b/sync-for-payables/docs/sdks/suppliers/README.md
index cb1f8acfd..b66f8e6ab 100755
--- a/sync-for-payables/docs/sdks/suppliers/README.md
+++ b/sync-for-payables/docs/sdks/suppliers/README.md
@@ -40,51 +40,41 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.CreateSupplierRequest(
supplier=shared.Supplier(
addresses=[
- shared.SupplierAddresses(
- city='South Pollyshire',
- country='Cayman Islands',
- line1='aspernatur',
- line2='sequi',
- postal_code='85913-7808',
- region='inventore',
- type=shared.AccountingAddressType.BILLING,
+ shared.SupplierAccountingAddress(
+ city='Fort Virgilfurt',
+ country='Sweden',
+ line1='officia',
+ line2='sed',
+ postal_code='09902',
+ region='qui',
+ type=shared.AccountingAddressType.UNKNOWN,
),
],
- contact_name='quibusdam',
- default_currency='excepturi',
- email_address='nostrum',
- id='9f439e39-266c-4bd9-9f7a-a2b24113695d',
+ contact_name='necessitatibus',
+ default_currency='harum',
+ email_address='explicabo',
+ id='164cf9ab-8366-4c72-bffd-a9e06bee4825',
metadata=shared.Metadata(
is_deleted=False,
),
modified_date='2022-10-23T00:00:00.000Z',
- phone='01224 658 999',
- registration_number='nisi',
+ phone='+44 25691 154789',
+ registration_number='voluptatibus',
source_modified_date='2022-10-23T00:00:00.000Z',
- status=shared.SupplierStatus.ACTIVE,
+ status=shared.SupplierStatus.UNKNOWN,
supplemental_data=shared.SupplementalData(
content={
- "repellat": {
- "eligendi": 'quaerat',
- "veniam": 'perspiciatis',
- "commodi": 'dolores',
- "dicta": 'molestiae',
- },
- "maxime": {
- "molestias": 'quam',
- },
- "molestiae": {
- "voluptate": 'eum',
- "consectetur": 'velit',
+ "officiis": {
+ "architecto": 'architecto',
},
},
),
- supplier_name='tempora',
- tax_number='aspernatur',
+ supplier_name='enim',
+ tax_number='optio',
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- timeout_in_minutes=323569,
+ timeout_in_minutes=525951,
)
res = s.suppliers.create(req)
@@ -131,7 +121,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.GetSupplierRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- supplier_id='incidunt',
+ supplier_id='perferendis',
)
res = s.suppliers.get(req)
@@ -228,7 +218,7 @@ req = operations.ListSuppliersRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='alias',
+ query='facilis',
)
res = s.suppliers.list(req)
@@ -278,48 +268,43 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.UpdateSupplierRequest(
supplier=shared.Supplier(
addresses=[
- shared.SupplierAddresses(
- city='Murlworth',
- country='Portugal',
- line1='minima',
- line2='cupiditate',
- postal_code='08550',
- region='perspiciatis',
- type=shared.AccountingAddressType.UNKNOWN,
+ shared.SupplierAccountingAddress(
+ city='Wauwatosa',
+ country='Nauru',
+ line1='dicta',
+ line2='quos',
+ postal_code='22982',
+ region='consequuntur',
+ type=shared.AccountingAddressType.DELIVERY,
),
],
- contact_name='corporis',
- default_currency='ullam',
- email_address='molestiae',
- id='389cedba-c7fd-4a39-994d-66bc2ae48063',
+ contact_name='vero',
+ default_currency='doloribus',
+ email_address='impedit',
+ id='ce8f1977-773e-4635-a2a7-b408f05e3d48',
metadata=shared.Metadata(
is_deleted=False,
),
modified_date='2022-10-23T00:00:00.000Z',
phone='01224 658 999',
- registration_number='iste',
+ registration_number='est',
source_modified_date='2022-10-23T00:00:00.000Z',
status=shared.SupplierStatus.UNKNOWN,
supplemental_data=shared.SupplementalData(
content={
- "libero": {
- "voluptatibus": 'id',
- "qui": 'explicabo',
- },
- "accusantium": {
- "nesciunt": 'commodi',
- "molestias": 'atque',
+ "vitae": {
+ "nesciunt": 'similique',
},
},
),
- supplier_name='explicabo',
- tax_number='totam',
+ supplier_name='illo',
+ tax_number='repellat',
),
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
force_update=False,
- supplier_id='ipsam',
- timeout_in_minutes=367727,
+ supplier_id='nemo',
+ timeout_in_minutes=987890,
)
res = s.suppliers.update(req)
diff --git a/sync-for-payables/docs/sdks/taxrates/README.md b/sync-for-payables/docs/sdks/taxrates/README.md
index 7421ec91d..5b5c8815f 100755
--- a/sync-for-payables/docs/sdks/taxrates/README.md
+++ b/sync-for-payables/docs/sdks/taxrates/README.md
@@ -34,7 +34,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.GetTaxRateRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- tax_rate_id='sequi',
+ tax_rate_id='possimus',
)
res = s.tax_rates.get(req)
@@ -82,7 +82,7 @@ req = operations.ListTaxRatesRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='optio',
+ query='unde',
)
res = s.tax_rates.list(req)
diff --git a/sync-for-payables/docs/sdks/trackingcategories/README.md b/sync-for-payables/docs/sdks/trackingcategories/README.md
index 4b313e9ce..bb3875b9e 100755
--- a/sync-for-payables/docs/sdks/trackingcategories/README.md
+++ b/sync-for-payables/docs/sdks/trackingcategories/README.md
@@ -34,7 +34,7 @@ s = codatsyncpayables.CodatSyncPayables(
req = operations.GetTrackingCategoryRequest(
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- tracking_category_id='libero',
+ tracking_category_id='incidunt',
)
res = s.tracking_categories.get(req)
@@ -82,7 +82,7 @@ req = operations.ListTrackingCategoriesRequest(
order_by='-modifiedDate',
page=1,
page_size=100,
- query='ab',
+ query='explicabo',
)
res = s.tracking_categories.list(req)
diff --git a/sync-for-payables/files.gen b/sync-for-payables/files.gen
index 1c4645d83..b7fee4a0f 100755
--- a/sync-for-payables/files.gen
+++ b/sync-for-payables/files.gen
@@ -4,6 +4,7 @@ src/codatsyncpayables/bill_credit_notes.py
src/codatsyncpayables/bill_payments.py
src/codatsyncpayables/bills.py
src/codatsyncpayables/companies.py
+src/codatsyncpayables/company_info.py
src/codatsyncpayables/connections.py
src/codatsyncpayables/journal_entries.py
src/codatsyncpayables/journals.py
@@ -32,10 +33,12 @@ src/codatsyncpayables/models/operations/get_create_update_billcreditnote_model.p
src/codatsyncpayables/models/operations/list_bill_credit_notes.py
src/codatsyncpayables/models/operations/update_bill_credit_note.py
src/codatsyncpayables/models/operations/create_bill_payment.py
+src/codatsyncpayables/models/operations/delete_billpayment.py
src/codatsyncpayables/models/operations/get_bill_payments.py
src/codatsyncpayables/models/operations/get_create_billpayment_model.py
src/codatsyncpayables/models/operations/list_bill_payments.py
src/codatsyncpayables/models/operations/create_bill.py
+src/codatsyncpayables/models/operations/delete_bill.py
src/codatsyncpayables/models/operations/download_bill_attachment.py
src/codatsyncpayables/models/operations/get_bill.py
src/codatsyncpayables/models/operations/get_bill_attachment.py
@@ -49,6 +52,7 @@ src/codatsyncpayables/models/operations/delete_company.py
src/codatsyncpayables/models/operations/get_company.py
src/codatsyncpayables/models/operations/list_companies.py
src/codatsyncpayables/models/operations/update_company.py
+src/codatsyncpayables/models/operations/get_accounting_profile.py
src/codatsyncpayables/models/operations/create_connection.py
src/codatsyncpayables/models/operations/delete_connection.py
src/codatsyncpayables/models/operations/get_connection.py
@@ -121,6 +125,7 @@ src/codatsyncpayables/models/shared/billpayment.py
src/codatsyncpayables/models/shared/billpaymentline.py
src/codatsyncpayables/models/shared/billpaymentlinelink.py
src/codatsyncpayables/models/shared/billpaymentlinelinktype.py
+src/codatsyncpayables/models/shared/pushoperation.py
src/codatsyncpayables/models/shared/billpayments.py
src/codatsyncpayables/models/shared/createbillresponse.py
src/codatsyncpayables/models/shared/bill.py
@@ -138,6 +143,9 @@ src/codatsyncpayables/models/shared/dataconnectionstatus.py
src/codatsyncpayables/models/shared/dataconnectionerror.py
src/codatsyncpayables/models/shared/companyrequestbody.py
src/codatsyncpayables/models/shared/companies.py
+src/codatsyncpayables/models/shared/onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype.py
+src/codatsyncpayables/models/shared/addressesitems.py
+src/codatsyncpayables/models/shared/accountingaddresstype.py
src/codatsyncpayables/models/shared/connections.py
src/codatsyncpayables/models/shared/createjournalentryresponse.py
src/codatsyncpayables/models/shared/journalentry.py
@@ -155,12 +163,10 @@ src/codatsyncpayables/models/shared/paymentmethod.py
src/codatsyncpayables/models/shared/paymentmethodtype.py
src/codatsyncpayables/models/shared/paymentmethodstatus.py
src/codatsyncpayables/models/shared/paymentmethods.py
-src/codatsyncpayables/models/shared/pushoperation.py
src/codatsyncpayables/models/shared/pushoperations.py
src/codatsyncpayables/models/shared/createsupplierresponse.py
src/codatsyncpayables/models/shared/supplier.py
src/codatsyncpayables/models/shared/supplierstatus.py
-src/codatsyncpayables/models/shared/accountingaddresstype.py
src/codatsyncpayables/models/shared/suppliers.py
src/codatsyncpayables/models/shared/updatesupplierresponse.py
src/codatsyncpayables/models/shared/taxrate.py
@@ -182,6 +188,7 @@ docs/sdks/billcreditnotes/README.md
docs/sdks/billpayments/README.md
docs/sdks/bills/README.md
docs/sdks/companies/README.md
+docs/sdks/companyinfo/README.md
docs/sdks/connections/README.md
docs/sdks/journalentries/README.md
docs/sdks/journals/README.md
@@ -212,6 +219,8 @@ docs/models/operations/updatebillcreditnoterequest.md
docs/models/operations/updatebillcreditnoteresponse.md
docs/models/operations/createbillpaymentrequest.md
docs/models/operations/createbillpaymentresponse.md
+docs/models/operations/deletebillpaymentrequest.md
+docs/models/operations/deletebillpaymentresponse.md
docs/models/operations/getbillpaymentsrequest.md
docs/models/operations/getbillpaymentsresponse.md
docs/models/operations/getcreatebillpaymentmodelrequest.md
@@ -220,6 +229,8 @@ docs/models/operations/listbillpaymentsrequest.md
docs/models/operations/listbillpaymentsresponse.md
docs/models/operations/createbillrequest.md
docs/models/operations/createbillresponse.md
+docs/models/operations/deletebillrequest.md
+docs/models/operations/deletebillresponse.md
docs/models/operations/downloadbillattachmentrequest.md
docs/models/operations/downloadbillattachmentresponse.md
docs/models/operations/getbillrequest.md
@@ -246,6 +257,12 @@ docs/models/operations/listcompaniesrequest.md
docs/models/operations/listcompaniesresponse.md
docs/models/operations/updatecompanyrequest.md
docs/models/operations/updatecompanyresponse.md
+docs/models/operations/getaccountingprofilerequest.md
+docs/models/operations/getaccountingprofilecompanyinformationphone.md
+docs/models/operations/getaccountingprofilecompanyinformationweblinktype.md
+docs/models/operations/getaccountingprofilecompanyinformationweblink.md
+docs/models/operations/getaccountingprofilecompanyinformation.md
+docs/models/operations/getaccountingprofileresponse.md
docs/models/operations/createconnectionrequestbody.md
docs/models/operations/createconnectionrequest.md
docs/models/operations/createconnectionresponse.md
@@ -255,7 +272,7 @@ 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/unlinkconnectionupdateconnection.md
docs/models/operations/unlinkconnectionrequest.md
docs/models/operations/unlinkconnectionresponse.md
docs/models/operations/createjournalentryrequest.md
@@ -341,7 +358,7 @@ docs/models/shared/paymentallocationpayment.md
docs/models/shared/accountref.md
docs/models/shared/billcreditnotelineitemitemreference.md
docs/models/shared/billcreditnotelineitemtrackingcustomerref.md
-docs/models/shared/billcreditnotelineitemtrackingprojectref.md
+docs/models/shared/billcreditnotelineitemtrackingprojectreference.md
docs/models/shared/billcreditnotelineitemtracking.md
docs/models/shared/billcreditnotelineitem.md
docs/models/shared/trackingcategoryref.md
@@ -354,6 +371,7 @@ docs/models/shared/billpayment.md
docs/models/shared/billpaymentline.md
docs/models/shared/billpaymentlinelink.md
docs/models/shared/billpaymentlinelinktype.md
+docs/models/shared/pushoperation.md
docs/models/shared/billpayments.md
docs/models/shared/createbillresponse.md
docs/models/shared/billpaymentallocationallocation.md
@@ -365,7 +383,7 @@ docs/models/shared/bill.md
docs/models/shared/billstatus.md
docs/models/shared/billlineitem.md
docs/models/shared/trackingcustomerref.md
-docs/models/shared/trackingprojectref.md
+docs/models/shared/trackingprojectreference.md
docs/models/shared/tracking.md
docs/models/shared/itemref.md
docs/models/shared/attachment.md
@@ -379,6 +397,9 @@ docs/models/shared/dataconnectionstatus.md
docs/models/shared/dataconnectionerror.md
docs/models/shared/companyrequestbody.md
docs/models/shared/companies.md
+docs/models/shared/onecompanies1percent7bcompanyidpercent7d1data1infogetresponses200contentapplication1jsonschemapropertiesphonenumbersitemsdefinitionsphonenumbertype.md
+docs/models/shared/addressesitems.md
+docs/models/shared/accountingaddresstype.md
docs/models/shared/connections.md
docs/models/shared/createjournalentryresponse.md
docs/models/shared/journalentryrecordreference.md
@@ -399,13 +420,11 @@ docs/models/shared/paymentmethod.md
docs/models/shared/paymentmethodtype.md
docs/models/shared/paymentmethodstatus.md
docs/models/shared/paymentmethods.md
-docs/models/shared/pushoperation.md
docs/models/shared/pushoperations.md
docs/models/shared/createsupplierresponse.md
-docs/models/shared/supplieraddresses.md
+docs/models/shared/supplieraccountingaddress.md
docs/models/shared/supplier.md
docs/models/shared/supplierstatus.md
-docs/models/shared/accountingaddresstype.md
docs/models/shared/suppliers.md
docs/models/shared/updatesupplierresponse.md
docs/models/shared/taxrate.md
diff --git a/sync-for-payables/gen.yaml b/sync-for-payables/gen.yaml
index 7a7cc7cba..f55bd64a4 100644
--- a/sync-for-payables/gen.yaml
+++ b/sync-for-payables/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: 13b21756003feefc9d736e498c338eca
+ docVersion: 3.0.0
+ speakeasyVersion: 1.82.5
+ generationVersion: 2.108.3
generation:
sdkClassName: CodatSyncPayables
singleTagPerOp: false
telemetryEnabled: true
+features:
+ python:
+ core: 2.85.4
+ deprecations: 2.81.1
+ examples: 2.81.2
+ globalSecurity: 2.81.1
+ globalServerURLs: 2.82.0
+ nameOverrides: 2.81.1
+ retries: 2.82.0
python:
- version: 0.1.0
+ version: 0.2.0
author: Codat
description: Streamline your customers' accounts payable workflow.
maxMethodParams: 0
diff --git a/sync-for-payables/setup.py b/sync-for-payables/setup.py
index 96a93ba0f..2d2f17f4a 100755
--- a/sync-for-payables/setup.py
+++ b/sync-for-payables/setup.py
@@ -10,7 +10,7 @@
setuptools.setup(
name="codat-sync-for-payables",
- version="0.1.0",
+ version="0.2.0",
author="Codat",
description="Streamline your customers' accounts payable workflow.",
long_description=long_description,
diff --git a/sync-for-payables/src/codatsyncpayables/accounts.py b/sync-for-payables/src/codatsyncpayables/accounts.py
index 0e69d0688..190baf674 100755
--- a/sync-for-payables/src/codatsyncpayables/accounts.py
+++ b/sync-for-payables/src/codatsyncpayables/accounts.py
@@ -38,9 +38,13 @@ def create(self, request: operations.CreateAccountRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -89,9 +93,13 @@ def get(self, request: operations.GetAccountRequest, retries: Optional[utils.Ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -125,13 +133,13 @@ def get_create_model(self, request: operations.GetCreateAccountModelRequest, ret
r"""Get create account model
The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company and integration.
- [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions.
+ [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions.
- **Integration-specific behaviour**
+ **Integration-specific behaviour**
- See the *response examples* for integration-specific indicative models.
+ See the *response examples* for integration-specific indicative models.
- 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.
+ 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())
@@ -142,9 +150,13 @@ def get_create_model(self, request: operations.GetCreateAccountModelRequest, ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -192,9 +204,13 @@ def list(self, request: operations.ListAccountsRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/bill_credit_notes.py b/sync-for-payables/src/codatsyncpayables/bill_credit_notes.py
index 0628fff6f..d70e81c47 100755
--- a/sync-for-payables/src/codatsyncpayables/bill_credit_notes.py
+++ b/sync-for-payables/src/codatsyncpayables/bill_credit_notes.py
@@ -38,9 +38,13 @@ def create(self, request: operations.CreateBillCreditNoteRequest, retries: Optio
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -89,9 +93,13 @@ def get(self, request: operations.GetBillCreditNoteRequest, retries: Optional[ut
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -142,9 +150,13 @@ def get_create_update_model(self, request: operations.GetCreateUpdateBillCreditN
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -192,9 +204,13 @@ def list(self, request: operations.ListBillCreditNotesRequest, retries: Optional
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -249,9 +265,13 @@ def update(self, request: operations.UpdateBillCreditNoteRequest, retries: Optio
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/bill_payments.py b/sync-for-payables/src/codatsyncpayables/bill_payments.py
index 94f066b2b..fdc151704 100755
--- a/sync-for-payables/src/codatsyncpayables/bill_payments.py
+++ b/sync-for-payables/src/codatsyncpayables/bill_payments.py
@@ -38,9 +38,13 @@ def create(self, request: operations.CreateBillPaymentRequest, retries: Optional
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -70,6 +74,76 @@ def do_request():
return res
+ def delete(self, request: operations.DeleteBillPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBillPaymentResponse:
+ r"""Delete bill payment
+ The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting platform.
+
+ [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account.
+
+ ### Process
+ 1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned.
+ 2. Check the status of the delete operation by checking the status of push operation either via
+ 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised),
+ 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation).
+
+ A `Success` status indicates that the bill payment object was deleted from the accounting platform.
+ 3. (Optional) Check that the bill payment was deleted from the accounting platform.
+
+ ### Effect on related objects
+ Be aware that deleting a bill payment from an accounting platform might cause related objects to be modified.
+
+ ## Integration specifics
+ Integrations that support soft delete do not permanently delete the object in the accounting platform.
+
+ | Integration | Soft Delete | Details |
+ |-------------|-------------|-----------------------------------------------------------------------------------------------------|
+ | Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/accounting-netsuite-how-deleting-bill-payments-works) to learn more. |
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.DeleteBillPaymentRequest, base_url, '/companies/{companyId}/data/billPayments/{billPaymentId}', 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
+
+ global_retry_config = self.sdk_configuration.retry_config
+ retry_config = retries
+ if retry_config is None:
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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.DeleteBillPaymentResponse(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 get(self, request: operations.GetBillPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillPaymentsResponse:
r"""Get bill payment
The *Get bill payment* endpoint returns a single bill payment for a given `billPaymentId`.
@@ -89,9 +163,13 @@ def get(self, request: operations.GetBillPaymentsRequest, retries: Optional[util
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -142,9 +220,13 @@ def get_create_model(self, request: operations.GetCreateBillPaymentModelRequest,
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -192,9 +274,13 @@ def list(self, request: operations.ListBillPaymentsRequest, retries: Optional[ut
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/bills.py b/sync-for-payables/src/codatsyncpayables/bills.py
index 1d952b9da..e514b48c1 100755
--- a/sync-for-payables/src/codatsyncpayables/bills.py
+++ b/sync-for-payables/src/codatsyncpayables/bills.py
@@ -43,9 +43,13 @@ def create(self, request: operations.CreateBillRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -75,6 +79,82 @@ def do_request():
return res
+ def delete(self, request: operations.DeleteBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBillResponse:
+ r"""Delete bill
+ The *Delete bill* endpoint allows you to delete a specified bill from an accounting platform.
+
+ [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are itemized records of goods received or services provided to the SMB.
+
+ ### Process
+ 1. Pass the `{billId}` to the *Delete bill* endpoint and store the `pushOperationKey` returned.
+ 2. Check the status of the delete operation by checking the status of push operation either via
+ 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised),
+ 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation).
+
+ A `Success` status indicates that the bill object was deleted from the accounting platform.
+ 3. (Optional) Check that the bill was deleted from the accounting platform.
+
+ ### Effect on related objects
+
+ Be aware that deleting a bill from an accounting platform might cause related objects to be modified. For example, if you delete a paid bill in QuickBooks Online, the bill is deleted but the bill payment against that bill is not. The bill payment is converted to a payment on account.
+
+ ## Integration specifics
+ Integrations that support soft delete do not permanently delete the object in the accounting platform.
+
+ | Integration | Soft Delete | Details |
+ |-------------|-------------|--------------------------------------------------------------------------------------------------------------|
+ | QuickBooks Online | No | - |
+ | Oracle NetSuite | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. |
+
+ > **Supported Integrations**
+ >
+ > This functionality is currently only supported for our QuickBooks Online abd Oracle NetSuite integrations. Check out our [public roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) to see what we're building next, and to submit ideas for new features.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.DeleteBillRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bills/{billId}', 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
+
+ global_retry_config = self.sdk_configuration.retry_config
+ retry_config = retries
+ if retry_config is None:
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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.DeleteBillResponse(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 download_attachment(self, request: operations.DownloadBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadBillAttachmentResponse:
r"""Download bill attachment
The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`.
@@ -95,9 +175,13 @@ def download_attachment(self, request: operations.DownloadBillAttachmentRequest,
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -145,9 +229,13 @@ def get(self, request: operations.GetBillRequest, retries: Optional[utils.RetryC
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -194,9 +282,13 @@ def get_attachment(self, request: operations.GetBillAttachmentRequest, retries:
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -247,9 +339,13 @@ def get_create_update_model(self, request: operations.GetCreateUpdateBillModelRe
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -297,9 +393,13 @@ def list(self, request: operations.ListBillsRequest, retries: Optional[utils.Ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -346,9 +446,13 @@ def list_attachments(self, request: operations.ListBillAttachmentsRequest, retri
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -403,9 +507,13 @@ def update(self, request: operations.UpdateBillRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -459,9 +567,13 @@ def upload_attachment(self, request: operations.UploadBillAttachmentRequest, ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/companies.py b/sync-for-payables/src/codatsyncpayables/companies.py
index 2d80cfc54..0ee567c6a 100755
--- a/sync-for-payables/src/codatsyncpayables/companies.py
+++ b/sync-for-payables/src/codatsyncpayables/companies.py
@@ -31,9 +31,13 @@ def create(self, request: shared.CompanyRequestBody, retries: Optional[utils.Ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -76,9 +80,13 @@ def delete(self, request: operations.DeleteCompanyRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('DELETE', url, headers=headers)
@@ -117,9 +125,13 @@ def get(self, request: operations.GetCompanyRequest, retries: Optional[utils.Ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -163,9 +175,13 @@ def list(self, request: operations.ListCompaniesRequest, retries: Optional[utils
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -211,9 +227,13 @@ def update(self, request: operations.UpdateCompanyRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/company_info.py b/sync-for-payables/src/codatsyncpayables/company_info.py
new file mode 100755
index 000000000..3f7e286b6
--- /dev/null
+++ b/sync-for-payables/src/codatsyncpayables/company_info.py
@@ -0,0 +1,64 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from .sdkconfiguration import SDKConfiguration
+from codatsyncpayables import utils
+from codatsyncpayables.models import errors, operations, shared
+from typing import Optional
+
+class CompanyInfo:
+ r"""View company information fetched from the source platform."""
+ sdk_configuration: SDKConfiguration
+
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
+
+ def get_accounting_profile(self, request: operations.GetAccountingProfileRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAccountingProfileResponse:
+ r"""Get company accounting profile
+ Gets the latest basic info for a company.
+ """
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+
+ url = utils.generate_url(operations.GetAccountingProfileRequest, base_url, '/companies/{companyId}/data/info', 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
+
+ global_retry_config = self.sdk_configuration.retry_config
+ retry_config = retries
+ if retry_config is None:
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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.GetAccountingProfileResponse(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[operations.GetAccountingProfileCompanyInformation])
+ res.company_information = 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
+
+
\ No newline at end of file
diff --git a/sync-for-payables/src/codatsyncpayables/connections.py b/sync-for-payables/src/codatsyncpayables/connections.py
index 9057131ef..ec0a9eada 100755
--- a/sync-for-payables/src/codatsyncpayables/connections.py
+++ b/sync-for-payables/src/codatsyncpayables/connections.py
@@ -31,9 +31,13 @@ def create(self, request: operations.CreateConnectionRequest, retries: Optional[
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -77,9 +81,13 @@ def delete(self, request: operations.DeleteConnectionRequest, retries: Optional[
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('DELETE', url, headers=headers)
@@ -118,9 +126,13 @@ def get(self, request: operations.GetConnectionRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -164,9 +176,13 @@ def list(self, request: operations.ListConnectionsRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -212,9 +228,13 @@ def unlink(self, request: operations.UnlinkConnectionRequest, retries: Optional[
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/journal_entries.py b/sync-for-payables/src/codatsyncpayables/journal_entries.py
index c80f60468..79aaa9204 100755
--- a/sync-for-payables/src/codatsyncpayables/journal_entries.py
+++ b/sync-for-payables/src/codatsyncpayables/journal_entries.py
@@ -38,9 +38,13 @@ def create(self, request: operations.CreateJournalEntryRequest, retries: Optiona
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -91,9 +95,13 @@ def get_create_model(self, request: operations.GetCreateJournalEntryModelRequest
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
diff --git a/sync-for-payables/src/codatsyncpayables/journals.py b/sync-for-payables/src/codatsyncpayables/journals.py
index d08c3e388..c72aae86a 100755
--- a/sync-for-payables/src/codatsyncpayables/journals.py
+++ b/sync-for-payables/src/codatsyncpayables/journals.py
@@ -38,9 +38,13 @@ def create(self, request: operations.CreateJournalRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -89,9 +93,13 @@ def get(self, request: operations.GetJournalRequest, retries: Optional[utils.Ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -142,9 +150,13 @@ def get_create_model(self, request: operations.GetCreateJournalModelRequest, ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -192,9 +204,13 @@ def list(self, request: operations.ListJournalsRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/manage_data.py b/sync-for-payables/src/codatsyncpayables/manage_data.py
index 088fb61a3..6c6f5223d 100755
--- a/sync-for-payables/src/codatsyncpayables/manage_data.py
+++ b/sync-for-payables/src/codatsyncpayables/manage_data.py
@@ -26,9 +26,13 @@ def get(self, request: operations.GetDataStatusRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -71,9 +75,13 @@ def get_pull_operation(self, request: operations.GetPullOperationRequest, retrie
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -117,9 +125,13 @@ def list_pull_operations(self, request: operations.ListPullOperationsRequest, re
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -166,9 +178,13 @@ def refresh_all_data_types(self, request: operations.RefreshAllDataTypesRequest,
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('POST', url, headers=headers)
@@ -210,9 +226,13 @@ def refresh_data_type(self, request: operations.RefreshDataTypeRequest, retries:
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('POST', url, params=query_params, headers=headers)
diff --git a/sync-for-payables/src/codatsyncpayables/models/operations/__init__.py b/sync-for-payables/src/codatsyncpayables/models/operations/__init__.py
index f3f394124..c53a46f4e 100755
--- a/sync-for-payables/src/codatsyncpayables/models/operations/__init__.py
+++ b/sync-for-payables/src/codatsyncpayables/models/operations/__init__.py
@@ -9,10 +9,13 @@
from .create_journal import *
from .create_journal_entry import *
from .create_supplier import *
+from .delete_bill import *
+from .delete_billpayment import *
from .delete_company import *
from .delete_connection import *
from .download_bill_attachment import *
from .get_account import *
+from .get_accounting_profile import *
from .get_bill import *
from .get_bill_attachment import *
from .get_bill_credit_note import *
@@ -57,4 +60,4 @@
from .update_supplier import *
from .upload_bill_attachment import *
-__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateBillCreditNoteRequest","CreateBillCreditNoteResponse","CreateBillPaymentRequest","CreateBillPaymentResponse","CreateBillRequest","CreateBillResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateJournalEntryRequest","CreateJournalEntryResponse","CreateJournalRequest","CreateJournalResponse","CreateSupplierRequest","CreateSupplierResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","DownloadBillAttachmentRequest","DownloadBillAttachmentResponse","GetAccountRequest","GetAccountResponse","GetBillAttachmentRequest","GetBillAttachmentResponse","GetBillCreditNoteRequest","GetBillCreditNoteResponse","GetBillPaymentsRequest","GetBillPaymentsResponse","GetBillRequest","GetBillResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCreateAccountModelRequest","GetCreateAccountModelResponse","GetCreateBillPaymentModelRequest","GetCreateBillPaymentModelResponse","GetCreateJournalEntryModelRequest","GetCreateJournalEntryModelResponse","GetCreateJournalModelRequest","GetCreateJournalModelResponse","GetCreateUpdateBillCreditNoteModelRequest","GetCreateUpdateBillCreditNoteModelResponse","GetCreateUpdateBillModelRequest","GetCreateUpdateBillModelResponse","GetCreateUpdateSupplierModelRequest","GetCreateUpdateSupplierModelResponse","GetDataStatusRequest","GetDataStatusResponse","GetJournalRequest","GetJournalResponse","GetPaymentMethodRequest","GetPaymentMethodResponse","GetPullOperationRequest","GetPullOperationResponse","GetPushOperationRequest","GetPushOperationResponse","GetSupplierRequest","GetSupplierResponse","GetTaxRateRequest","GetTaxRateResponse","GetTrackingCategoryRequest","GetTrackingCategoryResponse","ListAccountsRequest","ListAccountsResponse","ListBillAttachmentsRequest","ListBillAttachmentsResponse","ListBillCreditNotesRequest","ListBillCreditNotesResponse","ListBillPaymentsRequest","ListBillPaymentsResponse","ListBillsRequest","ListBillsResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListJournalsRequest","ListJournalsResponse","ListPaymentMethodsRequest","ListPaymentMethodsResponse","ListPullOperationsRequest","ListPullOperationsResponse","ListPushOperationsRequest","ListPushOperationsResponse","ListSuppliersRequest","ListSuppliersResponse","ListTaxRatesRequest","ListTaxRatesResponse","ListTrackingCategoriesRequest","ListTrackingCategoriesResponse","RefreshAllDataTypesRequest","RefreshAllDataTypesResponse","RefreshDataTypeRequest","RefreshDataTypeResponse","UnlinkConnectionRequest","UnlinkConnectionRequestBody","UnlinkConnectionResponse","UpdateBillCreditNoteRequest","UpdateBillCreditNoteResponse","UpdateBillRequest","UpdateBillResponse","UpdateCompanyRequest","UpdateCompanyResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadBillAttachmentRequest","UploadBillAttachmentRequestBody","UploadBillAttachmentResponse"]
+__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateBillCreditNoteRequest","CreateBillCreditNoteResponse","CreateBillPaymentRequest","CreateBillPaymentResponse","CreateBillRequest","CreateBillResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateJournalEntryRequest","CreateJournalEntryResponse","CreateJournalRequest","CreateJournalResponse","CreateSupplierRequest","CreateSupplierResponse","DeleteBillPaymentRequest","DeleteBillPaymentResponse","DeleteBillRequest","DeleteBillResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","DownloadBillAttachmentRequest","DownloadBillAttachmentResponse","GetAccountRequest","GetAccountResponse","GetAccountingProfileCompanyInformation","GetAccountingProfileCompanyInformationPhone","GetAccountingProfileCompanyInformationWeblink","GetAccountingProfileCompanyInformationWeblinkType","GetAccountingProfileRequest","GetAccountingProfileResponse","GetBillAttachmentRequest","GetBillAttachmentResponse","GetBillCreditNoteRequest","GetBillCreditNoteResponse","GetBillPaymentsRequest","GetBillPaymentsResponse","GetBillRequest","GetBillResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCreateAccountModelRequest","GetCreateAccountModelResponse","GetCreateBillPaymentModelRequest","GetCreateBillPaymentModelResponse","GetCreateJournalEntryModelRequest","GetCreateJournalEntryModelResponse","GetCreateJournalModelRequest","GetCreateJournalModelResponse","GetCreateUpdateBillCreditNoteModelRequest","GetCreateUpdateBillCreditNoteModelResponse","GetCreateUpdateBillModelRequest","GetCreateUpdateBillModelResponse","GetCreateUpdateSupplierModelRequest","GetCreateUpdateSupplierModelResponse","GetDataStatusRequest","GetDataStatusResponse","GetJournalRequest","GetJournalResponse","GetPaymentMethodRequest","GetPaymentMethodResponse","GetPullOperationRequest","GetPullOperationResponse","GetPushOperationRequest","GetPushOperationResponse","GetSupplierRequest","GetSupplierResponse","GetTaxRateRequest","GetTaxRateResponse","GetTrackingCategoryRequest","GetTrackingCategoryResponse","ListAccountsRequest","ListAccountsResponse","ListBillAttachmentsRequest","ListBillAttachmentsResponse","ListBillCreditNotesRequest","ListBillCreditNotesResponse","ListBillPaymentsRequest","ListBillPaymentsResponse","ListBillsRequest","ListBillsResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListJournalsRequest","ListJournalsResponse","ListPaymentMethodsRequest","ListPaymentMethodsResponse","ListPullOperationsRequest","ListPullOperationsResponse","ListPushOperationsRequest","ListPushOperationsResponse","ListSuppliersRequest","ListSuppliersResponse","ListTaxRatesRequest","ListTaxRatesResponse","ListTrackingCategoriesRequest","ListTrackingCategoriesResponse","RefreshAllDataTypesRequest","RefreshAllDataTypesResponse","RefreshDataTypeRequest","RefreshDataTypeResponse","UnlinkConnectionRequest","UnlinkConnectionResponse","UnlinkConnectionUpdateConnection","UpdateBillCreditNoteRequest","UpdateBillCreditNoteResponse","UpdateBillRequest","UpdateBillResponse","UpdateCompanyRequest","UpdateCompanyResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadBillAttachmentRequest","UploadBillAttachmentRequestBody","UploadBillAttachmentResponse"]
diff --git a/sync-for-payables/src/codatsyncpayables/models/operations/delete_bill.py b/sync-for-payables/src/codatsyncpayables/models/operations/delete_bill.py
new file mode 100755
index 000000000..11e7e799d
--- /dev/null
+++ b/sync-for-payables/src/codatsyncpayables/models/operations/delete_bill.py
@@ -0,0 +1,33 @@
+"""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 DeleteBillRequest:
+ bill_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'billId', 'style': 'simple', 'explode': False }})
+ r"""Unique identifier for a bill"""
+ 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 DeleteBillResponse:
+ 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-payables/src/codatsyncpayables/models/operations/delete_billpayment.py b/sync-for-payables/src/codatsyncpayables/models/operations/delete_billpayment.py
new file mode 100755
index 000000000..f9e56ad5b
--- /dev/null
+++ b/sync-for-payables/src/codatsyncpayables/models/operations/delete_billpayment.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 errormessage as shared_errormessage
+from ..shared import pushoperation as shared_pushoperation
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class DeleteBillPaymentRequest:
+ bill_payment_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'billPaymentId', 'style': 'simple', 'explode': False }})
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+
+
+
+
+
+@dataclasses.dataclass
+class DeleteBillPaymentResponse:
+ 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-payables/src/codatsyncpayables/models/operations/get_accounting_profile.py b/sync-for-payables/src/codatsyncpayables/models/operations/get_accounting_profile.py
new file mode 100755
index 000000000..0acc3963c
--- /dev/null
+++ b/sync-for-payables/src/codatsyncpayables/models/operations/get_accounting_profile.py
@@ -0,0 +1,167 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import requests as requests_http
+from ..shared import addressesitems as shared_addressesitems
+from ..shared import errormessage as shared_errormessage
+from ..shared import onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype as shared_onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype
+from codatsyncpayables import utils
+from dataclasses_json import Undefined, dataclass_json
+from enum import Enum
+from typing import Optional
+
+
+
+@dataclasses.dataclass
+class GetAccountingProfileRequest:
+ company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
+
+
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class GetAccountingProfileCompanyInformationPhone:
+ number: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('number') }})
+ r"""A phone number."""
+ type: shared_onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype.Onecompanies1Percent7BcompanyIDPercent7D1data1infoGetResponses200ContentApplication1jsonSchemaPropertiesPhoneNumbersItemsDefinitionsPhoneNumberType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
+ r"""The type of phone number"""
+
+
+
+class GetAccountingProfileCompanyInformationWeblinkType(str, Enum):
+ r"""The type of the weblink."""
+ WEBSITE = 'Website'
+ SOCIAL = 'Social'
+ UNKNOWN = 'Unknown'
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class GetAccountingProfileCompanyInformationWeblink:
+ r"""Weblink associated with the company."""
+ type: Optional[GetAccountingProfileCompanyInformationWeblinkType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
+ r"""The type of the weblink."""
+ url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('url'), 'exclude': lambda f: f is None }})
+ r"""The full URL for the weblink."""
+
+
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class GetAccountingProfileCompanyInformation:
+ r"""> View the coverage for company info in the Data coverage explorer.
+
+ Company info provides standard details about a linked company such as their address, phone number, and company registration.
+
+ > **Company information or companies?**
+ >
+ > Company information is standard information that is held in the accounting platform about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.
+ """
+ accounting_platform_ref: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountingPlatformRef'), 'exclude': lambda f: f is None }})
+ r"""Identifier or reference for the company in the accounting platform."""
+ addresses: Optional[list[shared_addressesitems.Addressesitems]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses'), 'exclude': lambda f: f is None }})
+ r"""An array of Addresses."""
+ base_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('baseCurrency'), 'exclude': lambda f: f is None }})
+ r"""Currency set in the accounting platform of the linked company. Used by the currency rate."""
+ company_legal_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyLegalName'), 'exclude': lambda f: f is None }})
+ r"""Registered legal name of the linked company."""
+ company_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyName'), 'exclude': lambda f: f is None }})
+ r"""Name of the linked company."""
+ created_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdDate'), '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.
+ """
+ financial_year_start_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('financialYearStartDate'), '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.
+ """
+ ledger_lock_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ledgerLockDate'), '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.
+ """
+ phone_numbers: Optional[list[GetAccountingProfileCompanyInformationPhone]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phoneNumbers'), 'exclude': lambda f: f is None }})
+ r"""An array of phone numbers."""
+ registration_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('registrationNumber'), 'exclude': lambda f: f is None }})
+ r"""Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House."""
+ source_urls: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceUrls'), 'exclude': lambda f: f is None }})
+ r"""URL addresses for the accounting source.
+
+ For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero).
+ """
+ tax_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxNumber'), 'exclude': lambda f: f is None }})
+ r"""Company tax number."""
+ web_links: Optional[list[GetAccountingProfileCompanyInformationWeblink]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('webLinks'), 'exclude': lambda f: f is None }})
+ r"""An array of weblinks."""
+
+
+
+
+
+@dataclasses.dataclass
+class GetAccountingProfileResponse:
+ content_type: str = dataclasses.field()
+ status_code: int = dataclasses.field()
+ company_information: Optional[GetAccountingProfileCompanyInformation] = 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-payables/src/codatsyncpayables/models/operations/unlink_connection.py b/sync-for-payables/src/codatsyncpayables/models/operations/unlink_connection.py
index b96711fec..1836f4edf 100755
--- a/sync-for-payables/src/codatsyncpayables/models/operations/unlink_connection.py
+++ b/sync-for-payables/src/codatsyncpayables/models/operations/unlink_connection.py
@@ -4,6 +4,7 @@
import dataclasses
import requests as requests_http
from ..shared import connection as shared_connection
+from ..shared import dataconnectionstatus as shared_dataconnectionstatus
from ..shared import errormessage as shared_errormessage
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
@@ -13,8 +14,9 @@
@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 }})
+class UnlinkConnectionUpdateConnection:
+ status: Optional[shared_dataconnectionstatus.DataConnectionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
+ r"""The current authorization status of the data connection."""
@@ -24,7 +26,7 @@ class UnlinkConnectionRequestBody:
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' }})
+ request_body: Optional[UnlinkConnectionUpdateConnection] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/__init__.py b/sync-for-payables/src/codatsyncpayables/models/shared/__init__.py
index 638cfd361..884b9a5f5 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/__init__.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/__init__.py
@@ -6,6 +6,7 @@
from .accounts import *
from .accountstatus import *
from .accounttype import *
+from .addressesitems import *
from .attachment import *
from .attachments import *
from .bill import *
@@ -50,6 +51,7 @@
from .journalstatus import *
from .links import *
from .metadata import *
+from .onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype import *
from .paymentallocationpayment import *
from .paymentmethod import *
from .paymentmethods import *
@@ -95,4 +97,4 @@
from .validdatatypelinksitems import *
from .withholdingtaxitems import *
-__all__ = ["Account","AccountRef","AccountStatus","AccountType","AccountValidDataTypeLinks","AccountingAddressType","Accounts","Attachment","Attachments","Bill","BillCreditNote","BillCreditNoteLineItem","BillCreditNoteLineItemItemReference","BillCreditNoteLineItemTracking","BillCreditNoteLineItemTrackingCustomerRef","BillCreditNoteLineItemTrackingProjectRef","BillCreditNoteStatus","BillCreditNotes","BillLineItem","BillPayment","BillPaymentAllocation","BillPaymentAllocationAllocation","BillPaymentLine","BillPaymentLineLink","BillPaymentLineLinkType","BillPayments","BillPurchaseOrderReference","BillStatus","BillSupplementalData","BillWithholdingTax","BilledToType","Bills","Companies","Company","CompanyRequestBody","Connection","ConnectionSourceType","Connections","CreateAccountResponse","CreateBillCreditNoteResponse","CreateBillPaymentResponse","CreateBillResponse","CreateJournalEntryResponse","CreateJournalResponse","CreateSupplierResponse","DataConnectionError","DataConnectionStatus","DataStatus","DataType","ErrorMessage","HalRef","ItemRef","Items","ItemsAllocation","Journal","JournalEntry","JournalEntryRecordReference","JournalLine","JournalLineTracking","JournalRef","JournalStatus","Journals","Links","Metadata","PaymentAllocationPayment","PaymentMethod","PaymentMethodStatus","PaymentMethodType","PaymentMethods","PullOperation","PullOperationStatus","PullOperations","PushChangeType","PushFieldValidation","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","RecordRef","Security","Status","SupplementalData","Supplier","SupplierAddresses","SupplierRef","SupplierStatus","Suppliers","TaxRate","TaxRateComponent","TaxRateRef","TaxRateStatus","TaxRates","Tracking","TrackingCategories","TrackingCategory","TrackingCategoryRef","TrackingCategoryTree","TrackingCustomerRef","TrackingProjectRef","UpdateBillCreditNoteResponse","UpdateBillResponse","UpdateSupplierResponse","ValidDatatypeLinksitems","Validation","ValidationItem","WithholdingTaxitems"]
+__all__ = ["Account","AccountRef","AccountStatus","AccountType","AccountValidDataTypeLinks","AccountingAddressType","Accounts","Addressesitems","Attachment","Attachments","Bill","BillCreditNote","BillCreditNoteLineItem","BillCreditNoteLineItemItemReference","BillCreditNoteLineItemTracking","BillCreditNoteLineItemTrackingCustomerRef","BillCreditNoteLineItemTrackingProjectReference","BillCreditNoteStatus","BillCreditNotes","BillLineItem","BillPayment","BillPaymentAllocation","BillPaymentAllocationAllocation","BillPaymentLine","BillPaymentLineLink","BillPaymentLineLinkType","BillPayments","BillPurchaseOrderReference","BillStatus","BillSupplementalData","BillWithholdingTax","BilledToType","Bills","Companies","Company","CompanyRequestBody","Connection","ConnectionSourceType","Connections","CreateAccountResponse","CreateBillCreditNoteResponse","CreateBillPaymentResponse","CreateBillResponse","CreateJournalEntryResponse","CreateJournalResponse","CreateSupplierResponse","DataConnectionError","DataConnectionStatus","DataStatus","DataType","ErrorMessage","HalRef","ItemRef","Items","ItemsAllocation","Journal","JournalEntry","JournalEntryRecordReference","JournalLine","JournalLineTracking","JournalRef","JournalStatus","Journals","Links","Metadata","Onecompanies1Percent7BcompanyIDPercent7D1data1infoGetResponses200ContentApplication1jsonSchemaPropertiesPhoneNumbersItemsDefinitionsPhoneNumberType","PaymentAllocationPayment","PaymentMethod","PaymentMethodStatus","PaymentMethodType","PaymentMethods","PullOperation","PullOperationStatus","PullOperations","PushChangeType","PushFieldValidation","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","RecordRef","Security","Status","SupplementalData","Supplier","SupplierAccountingAddress","SupplierRef","SupplierStatus","Suppliers","TaxRate","TaxRateComponent","TaxRateRef","TaxRateStatus","TaxRates","Tracking","TrackingCategories","TrackingCategory","TrackingCategoryRef","TrackingCategoryTree","TrackingCustomerRef","TrackingProjectReference","UpdateBillCreditNoteResponse","UpdateBillResponse","UpdateSupplierResponse","ValidDatatypeLinksitems","Validation","ValidationItem","WithholdingTaxitems"]
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/account.py b/sync-for-payables/src/codatsyncpayables/models/shared/account.py
index 7574c5759..4ef79d7d8 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/account.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/account.py
@@ -7,6 +7,7 @@
from ..shared import metadata as shared_metadata
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -105,7 +106,7 @@ class Account:
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 }})
+ current_balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/accounts.py b/sync-for-payables/src/codatsyncpayables/models/shared/accounts.py
index 8db631cd2..a5f1b002e 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/accounts.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/accounts.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class Accounts:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/addressesitems.py b/sync-for-payables/src/codatsyncpayables/models/shared/addressesitems.py
new file mode 100755
index 000000000..1e4668173
--- /dev/null
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/addressesitems.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from ..shared import accountingaddresstype as shared_accountingaddresstype
+from codatsyncpayables import utils
+from dataclasses_json import Undefined, dataclass_json
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+
+@dataclasses.dataclass
+class Addressesitems:
+ type: shared_accountingaddresstype.AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
+ r"""The type of the address"""
+ city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city'), 'exclude': lambda f: f is None }})
+ r"""City of the customer address."""
+ country: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('country'), 'exclude': lambda f: f is None }})
+ r"""Country of the customer address."""
+ line1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('line1'), 'exclude': lambda f: f is None }})
+ r"""Line 1 of the customer address."""
+ line2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('line2'), 'exclude': lambda f: f is None }})
+ r"""Line 2 of the customer address."""
+ postal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postalCode'), 'exclude': lambda f: f is None }})
+ r"""Postal code or zip code."""
+ region: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('region'), 'exclude': lambda f: f is None }})
+ r"""Region of the customer address."""
+
+
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/attachments.py b/sync-for-payables/src/codatsyncpayables/models/shared/attachments.py
index 4543bc33c..fa36574f7 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/attachments.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/attachments.py
@@ -12,7 +12,6 @@
@dataclasses.dataclass
class Attachments:
- r"""Success"""
attachments: Optional[list[shared_attachment.Attachment]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachments'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/bill.py b/sync-for-payables/src/codatsyncpayables/models/shared/bill.py
index 837aacefd..80f76be77 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/bill.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/bill.py
@@ -9,6 +9,7 @@
from ..shared import supplierref as shared_supplierref
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Any, Optional
@@ -46,7 +47,7 @@ class BillPaymentAllocationAllocation:
There are only a very small number of edge cases where this currency code is returned by the Codat system.
"""
- currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
@@ -73,7 +74,7 @@ class BillPaymentAllocationAllocation:
| **EUR** | €20 | 1.134 | $22.68 |
| **RUB** | ₽20 | 0.015 | $0.30 |
"""
- total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }})
+ total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""The total amount that has been allocated."""
@@ -107,7 +108,7 @@ class BillPurchaseOrderReference:
class BillSupplementalData:
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
content: Optional[dict[str, dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }})
@@ -118,7 +119,7 @@ class BillSupplementalData:
@dataclasses.dataclass
class BillWithholdingTax:
- amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
+ amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
@@ -151,13 +152,13 @@ class Bill:
issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }})
status: shared_billstatus.BillStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
r"""Current state of the bill."""
- sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }})
+ sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Total amount of the bill, excluding any taxes."""
- tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount') }})
+ tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Amount of tax on the bill."""
- total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }})
+ total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Amount of the bill, including tax."""
- amount_due: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amountDue'), 'exclude': lambda f: f is None }})
+ amount_due: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amountDue'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount outstanding on the bill."""
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_.
@@ -168,7 +169,7 @@ class Bill:
There are only a very small number of edge cases where this currency code is returned by the Codat system.
"""
- currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
@@ -213,7 +214,7 @@ class Bill:
supplemental_data: Optional[BillSupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }})
r"""Reference to the supplier the record relates to."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnote.py b/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnote.py
index eee71289c..f65fb2d4d 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnote.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnote.py
@@ -11,6 +11,7 @@
from ..shared import withholdingtaxitems as shared_withholdingtaxitems
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -35,17 +36,17 @@ class BillCreditNote:
* Any allocations of the credit against other records, such as [bills](https://docs.codat.io/accounting-api#/schemas/Bill).
* The supplier that issued the bill credit note.
"""
- discount_percentage: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage') }})
+ discount_percentage: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Percentage rate of any discount applied to the bill credit note."""
status: shared_billcreditnotestatus.BillCreditNoteStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
r"""Current state of the bill credit note"""
- sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }})
+ sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Total amount of the bill credit note, including discounts but excluding tax."""
- total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }})
+ total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax."""
- total_discount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount') }})
+ total_discount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Total value of any discounts applied."""
- total_tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount') }})
+ total_tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Amount of tax included in the bill credit note."""
allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), '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:
@@ -79,7 +80,7 @@ class BillCreditNote:
There are only a very small number of edge cases where this currency code is returned by the Codat system.
"""
- currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
@@ -137,13 +138,13 @@ class BillCreditNote:
r"""Any additional information about the bill credit note."""
payment_allocations: Optional[list[shared_items.Items]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentAllocations'), 'exclude': lambda f: f is None }})
r"""An array of payment allocations."""
- remaining_credit: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit'), 'exclude': lambda f: f is None }})
+ remaining_credit: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount of the bill credit note that is still outstanding."""
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 }})
supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }})
r"""Reference to the supplier the record relates to."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotelineitem.py b/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotelineitem.py
index a6f76c3c8..698bcedc2 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotelineitem.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotelineitem.py
@@ -8,6 +8,7 @@
from ..shared import trackingcategoryref as shared_trackingcategoryref
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -39,7 +40,7 @@ class BillCreditNoteLineItemTrackingCustomerRef:
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class BillCreditNoteLineItemTrackingProjectRef:
+class BillCreditNoteLineItemTrackingProjectReference:
id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
@@ -55,7 +56,7 @@ class BillCreditNoteLineItemTracking:
is_billed_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }})
is_rebilled_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }})
customer_ref: Optional[BillCreditNoteLineItemTrackingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }})
- project_ref: Optional[BillCreditNoteLineItemTrackingProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }})
+ project_ref: Optional[BillCreditNoteLineItemTrackingProjectReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }})
@@ -64,23 +65,23 @@ class BillCreditNoteLineItemTracking:
@dataclasses.dataclass
class BillCreditNoteLineItem:
- quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }})
+ quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Number of units of the goods or service for which credit has been received."""
- unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }})
+ unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Unit price of the goods or service."""
account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }})
r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked 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"""Friendly name of each line item. For example, the goods or service for which credit has been received."""
- discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }})
+ discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Value of any discounts applied."""
- discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }})
+ discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Percentage rate of any discount applied to the line item."""
item_ref: Optional[BillCreditNoteLineItemItemReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }})
r"""Reference to the item the line is linked to."""
- sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }})
+ sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount of credit associated with the line item, including discounts but excluding tax."""
- tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }})
+ tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount of tax associated with the line item."""
tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }})
r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.
@@ -94,7 +95,7 @@ class BillCreditNoteLineItem:
- Invoice line items
- Items
"""
- total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }})
+ total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Total amount of the line item, including discounts and tax."""
tracking: Optional[BillCreditNoteLineItemTracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }})
r"""Categories, and a project and customer, against which the item is tracked."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotes.py b/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotes.py
index 3015987ba..63287f979 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotes.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billcreditnotes.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class BillCreditNotes:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billlineitem.py b/sync-for-payables/src/codatsyncpayables/models/shared/billlineitem.py
index e8ca582b1..650d6fce5 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billlineitem.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billlineitem.py
@@ -9,6 +9,7 @@
from ..shared import trackingcategoryref as shared_trackingcategoryref
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -16,26 +17,26 @@
@dataclasses.dataclass
class BillLineItem:
- quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }})
+ quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Number of units of goods or services received."""
- unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }})
+ unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Price of each unit of goods or services."""
account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }})
r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked 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"""Friendly name of the goods or services received."""
- discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }})
+ discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Numerical value of any discounts applied.
Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference.
"""
- discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }})
+ discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
is_direct_cost: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDirectCost'), 'exclude': lambda f: f is None }})
item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }})
r"""Reference to the item the line is linked to."""
- sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }})
+ sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount of the line, inclusive of discounts but exclusive of tax."""
- tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }})
+ tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount of tax for the line."""
tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }})
r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.
@@ -49,7 +50,7 @@ class BillLineItem:
- Invoice line items
- Items
"""
- total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }})
+ total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Total amount of the line, including tax."""
tracking: Optional[shared_tracking.Tracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }})
r"""Categories, and a project and customer, against which the item is tracked."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billpayment.py b/sync-for-payables/src/codatsyncpayables/models/shared/billpayment.py
index 809e8eaa9..b803b6f70 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billpayment.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billpayment.py
@@ -9,6 +9,7 @@
from ..shared import supplierref as shared_supplierref
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Any, Optional
@@ -171,7 +172,7 @@ class BillPayment:
account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }})
r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account."""
currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), '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 }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
@@ -213,10 +214,10 @@ class BillPayment:
supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }})
- total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }})
+ total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentline.py b/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentline.py
index c59c47f8d..4a7f461bc 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentline.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentline.py
@@ -5,6 +5,7 @@
from ..shared import billpaymentlinelink as shared_billpaymentlinelink
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -12,7 +13,7 @@
@dataclasses.dataclass
class BillPaymentLine:
- amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
+ amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Amount in the bill payment currency."""
allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), '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:
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentlinelink.py b/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentlinelink.py
index 36bb0ab91..ee2bb6293 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentlinelink.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billpaymentlinelink.py
@@ -5,6 +5,7 @@
from ..shared import billpaymentlinelinktype as shared_billpaymentlinelinktype
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -14,13 +15,13 @@
class BillPaymentLineLink:
type: shared_billpaymentlinelinktype.BillPaymentLineLinkType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
r"""Types of links to bill payment lines."""
- amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }})
+ amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Amount by which the balance of the linked entity is altered, in the currency of the linked entity.
- A negative link amount reduces the outstanding amount on the accounts payable account.
- A positive link amount increases the outstanding amount on the accounts payable account.
"""
- currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/billpayments.py b/sync-for-payables/src/codatsyncpayables/models/shared/billpayments.py
index 14e6fa935..f5a6b06cb 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/billpayments.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/billpayments.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class BillPayments:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/bills.py b/sync-for-payables/src/codatsyncpayables/models/shared/bills.py
index 2e9af7716..3f23c8c67 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/bills.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/bills.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class Bills:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/companies.py b/sync-for-payables/src/codatsyncpayables/models/shared/companies.py
index ec28992a7..bf4cfc4a1 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/companies.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/companies.py
@@ -13,7 +13,6 @@
@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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/connections.py b/sync-for-payables/src/codatsyncpayables/models/shared/connections.py
index 842d3c471..3d949e1fa 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/connections.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/connections.py
@@ -13,7 +13,6 @@
@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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createaccountresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createaccountresponse.py
index 34d750369..9ea95e1c7 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createaccountresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createaccountresponse.py
@@ -16,7 +16,6 @@
@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') }})
@@ -103,6 +102,7 @@ class CreateAccountResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createbillcreditnoteresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createbillcreditnoteresponse.py
index 3ccd2a10b..79d9c3909 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createbillcreditnoteresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createbillcreditnoteresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class CreateBillCreditNoteResponse:
- 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') }})
@@ -91,6 +90,7 @@ class CreateBillCreditNoteResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createbillpaymentresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createbillpaymentresponse.py
index be8999169..ac8d12c7e 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createbillpaymentresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createbillpaymentresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class CreateBillPaymentResponse:
- 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') }})
@@ -225,6 +224,7 @@ class CreateBillPaymentResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createbillresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createbillresponse.py
index 23f1ef2e5..4de20d7ba 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createbillresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createbillresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class CreateBillResponse:
- 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') }})
@@ -94,6 +93,7 @@ class CreateBillResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createjournalentryresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createjournalentryresponse.py
index b70b6027f..8beddbdc4 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createjournalentryresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createjournalentryresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class CreateJournalEntryResponse:
- 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') }})
@@ -97,6 +96,7 @@ class CreateJournalEntryResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createjournalresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createjournalresponse.py
index b88a56d81..30441a64b 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createjournalresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createjournalresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class CreateJournalResponse:
- 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') }})
@@ -97,6 +96,7 @@ class CreateJournalResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/createsupplierresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/createsupplierresponse.py
index db1169210..2ed17ac7c 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/createsupplierresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/createsupplierresponse.py
@@ -16,7 +16,6 @@
@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') }})
@@ -80,6 +79,7 @@ class CreateSupplierResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/errormessage.py b/sync-for-payables/src/codatsyncpayables/models/shared/errormessage.py
index 5537eef90..169bc5449 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/errormessage.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/errormessage.py
@@ -11,7 +11,6 @@
@dataclasses.dataclass
class ErrorMessage:
- 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-payables/src/codatsyncpayables/models/shared/items.py b/sync-for-payables/src/codatsyncpayables/models/shared/items.py
index df4daf50d..0cb800092 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/items.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/items.py
@@ -5,6 +5,7 @@
from ..shared import paymentallocationpayment as shared_paymentallocationpayment
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -42,7 +43,7 @@ class ItemsAllocation:
There are only a very small number of edge cases where this currency code is returned by the Codat system.
"""
- currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
@@ -69,7 +70,7 @@ class ItemsAllocation:
| **EUR** | €20 | 1.134 | $22.68 |
| **RUB** | ₽20 | 0.015 | $0.30 |
"""
- total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }})
+ total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""The total amount that has been allocated."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/journalentry.py b/sync-for-payables/src/codatsyncpayables/models/shared/journalentry.py
index 374750554..d88ec1408 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/journalentry.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/journalentry.py
@@ -115,7 +115,7 @@ class JournalEntry:
supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
updated_on: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedOn'), '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:
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/journalline.py b/sync-for-payables/src/codatsyncpayables/models/shared/journalline.py
index 01ca97bf4..a56230030 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/journalline.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/journalline.py
@@ -6,6 +6,7 @@
from ..shared import recordref as shared_recordref
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -23,7 +24,7 @@ class JournalLineTracking:
@dataclasses.dataclass
class JournalLine:
- net_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAmount') }})
+ net_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
r"""Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative."""
account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }})
r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/journals.py b/sync-for-payables/src/codatsyncpayables/models/shared/journals.py
index a4a81f5af..e109b41a9 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/journals.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/journals.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class Journals:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype.py b/sync-for-payables/src/codatsyncpayables/models/shared/onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype.py
new file mode 100755
index 000000000..2b6cde771
--- /dev/null
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/onecompanies_1percent_7bcompanyidpercent_7d_1data_1info_get_responses_200_content_application_1json_schema_properties_phonenumbers_items_definitions_phonenumbertype.py
@@ -0,0 +1,12 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+class Onecompanies1Percent7BcompanyIDPercent7D1data1infoGetResponses200ContentApplication1jsonSchemaPropertiesPhoneNumbersItemsDefinitionsPhoneNumberType(str, Enum):
+ r"""The type of phone number"""
+ PRIMARY = 'Primary'
+ LANDLINE = 'Landline'
+ MOBILE = 'Mobile'
+ FAX = 'Fax'
+ UNKNOWN = 'Unknown'
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/paymentallocationpayment.py b/sync-for-payables/src/codatsyncpayables/models/shared/paymentallocationpayment.py
index 48e50bbdc..b7852c45d 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/paymentallocationpayment.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/paymentallocationpayment.py
@@ -5,6 +5,7 @@
from ..shared import accountref as shared_accountref
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -23,7 +24,7 @@ class PaymentAllocationPayment:
There are only a very small number of edge cases where this currency code is returned by the Codat system.
"""
- currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }})
+ currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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.
Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.
@@ -77,7 +78,7 @@ class PaymentAllocationPayment:
"""
reference: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is None }})
r"""Reference to the allocated payment."""
- total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }})
+ total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Total amount that was paid."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/paymentmethods.py b/sync-for-payables/src/codatsyncpayables/models/shared/paymentmethods.py
index 09dc2e3c4..3850ecdc3 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/paymentmethods.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/paymentmethods.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class PaymentMethods:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/pulloperations.py b/sync-for-payables/src/codatsyncpayables/models/shared/pulloperations.py
index 4e44506dc..1032b95d9 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/pulloperations.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/pulloperations.py
@@ -13,7 +13,6 @@
@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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/pushoperation.py b/sync-for-payables/src/codatsyncpayables/models/shared/pushoperation.py
index bcded6f5c..59bfb87c2 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/pushoperation.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/pushoperation.py
@@ -15,7 +15,6 @@
@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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/pushoperations.py b/sync-for-payables/src/codatsyncpayables/models/shared/pushoperations.py
index 3400a1f9c..93b996f2f 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/pushoperations.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/pushoperations.py
@@ -13,7 +13,6 @@
@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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/pushoption.py b/sync-for-payables/src/codatsyncpayables/models/shared/pushoption.py
index 22bf329eb..85c4eb0f0 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/pushoption.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/pushoption.py
@@ -15,7 +15,6 @@
@dataclasses.dataclass
class PushOption:
- r"""OK"""
display_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayName') }})
required: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required') }})
type: shared_pushoptiontype.PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/supplementaldata.py b/sync-for-payables/src/codatsyncpayables/models/shared/supplementaldata.py
index 5aa6bb26f..5677cc2a5 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/supplementaldata.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/supplementaldata.py
@@ -13,7 +13,7 @@
class SupplementalData:
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
content: Optional[dict[str, dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/supplier.py b/sync-for-payables/src/codatsyncpayables/models/shared/supplier.py
index cc56728ef..a62a6182a 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/supplier.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/supplier.py
@@ -14,7 +14,7 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class SupplierAddresses:
+class SupplierAccountingAddress:
type: shared_accountingaddresstype.AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
r"""The type of the address"""
city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city'), 'exclude': lambda f: f is None }})
@@ -45,7 +45,7 @@ class Supplier:
"""
status: shared_supplierstatus.SupplierStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
r"""Status of the supplier."""
- addresses: Optional[list[SupplierAddresses]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses'), 'exclude': lambda f: f is None }})
+ addresses: Optional[list[SupplierAccountingAddress]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses'), 'exclude': lambda f: f is None }})
r"""An array of Addresses."""
contact_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactName'), 'exclude': lambda f: f is None }})
r"""Name of the main contact for the supplier."""
@@ -65,7 +65,7 @@ class Supplier:
supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
r"""Supplemental data is additional data you can include in our standard data types.
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data.
+ It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
"""
supplier_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierName'), 'exclude': lambda f: f is None }})
r"""Name of the supplier as recorded in the accounting system, typically the company name."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/suppliers.py b/sync-for-payables/src/codatsyncpayables/models/shared/suppliers.py
index 52f8cdb12..52832ec23 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/suppliers.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/suppliers.py
@@ -13,7 +13,6 @@
@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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/taxrate.py b/sync-for-payables/src/codatsyncpayables/models/shared/taxrate.py
index fc7c62ad2..23e61db32 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/taxrate.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/taxrate.py
@@ -8,6 +8,7 @@
from ..shared import validdatatypelinksitems as shared_validdatatypelinksitems
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -39,7 +40,7 @@ class TaxRate:
code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }})
r"""Code for the tax rate from the accounting platform."""
components: Optional[list[shared_taxratecomponent.TaxRateComponent]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('components'), 'exclude': lambda f: f is None }})
- effective_tax_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'exclude': lambda f: f is None }})
+ effective_tax_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""See Effective tax rates description."""
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 tax rate, unique for the company in the accounting platform."""
@@ -54,7 +55,7 @@ class TaxRate:
- `Archived` - A tax rate that has been archived or is inactive in the accounting platform.
- `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform.
"""
- total_tax_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxRate'), 'exclude': lambda f: f is None }})
+ total_tax_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Total (not compounded) sum of the components of a tax rate."""
valid_datatype_links: Optional[list[shared_validdatatypelinksitems.ValidDatatypeLinksitems]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validDatatypeLinks'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/taxratecomponent.py b/sync-for-payables/src/codatsyncpayables/models/shared/taxratecomponent.py
index b1de89bae..e1b8c9642 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/taxratecomponent.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/taxratecomponent.py
@@ -4,6 +4,7 @@
import dataclasses
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -16,7 +17,7 @@ class TaxRateComponent:
r"""A flag to indicate with the tax is calculated using the principle of compounding."""
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 tax rate component."""
- rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate'), 'exclude': lambda f: f is None }})
+ rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""The rate of the tax rate component, usually a percentage."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/taxrateref.py b/sync-for-payables/src/codatsyncpayables/models/shared/taxrateref.py
index d2c36d2db..85df98636 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/taxrateref.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/taxrateref.py
@@ -4,6 +4,7 @@
import dataclasses
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
from typing import Optional
@@ -22,7 +23,7 @@ class TaxRateRef:
- Invoice line items
- Items
"""
- effective_tax_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'exclude': lambda f: f is None }})
+ effective_tax_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
r"""Applicable tax rate."""
id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
r"""Unique identifier for the tax rate in the accounting platform."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/taxrates.py b/sync-for-payables/src/codatsyncpayables/models/shared/taxrates.py
index 974a491d0..54f1e4528 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/taxrates.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/taxrates.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class TaxRates:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/tracking.py b/sync-for-payables/src/codatsyncpayables/models/shared/tracking.py
index 2f0066ee2..0a2ee582d 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/tracking.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/tracking.py
@@ -24,7 +24,7 @@ class TrackingCustomerRef:
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
-class TrackingProjectRef:
+class TrackingProjectReference:
id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
@@ -40,6 +40,6 @@ class Tracking:
is_billed_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }})
is_rebilled_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }})
customer_ref: Optional[TrackingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }})
- project_ref: Optional[TrackingProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }})
+ project_ref: Optional[TrackingProjectReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/trackingcategories.py b/sync-for-payables/src/codatsyncpayables/models/shared/trackingcategories.py
index 7b6830af1..eed3814ec 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/trackingcategories.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/trackingcategories.py
@@ -13,7 +13,6 @@
@dataclasses.dataclass
class TrackingCategories:
- 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') }})
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/updatebillcreditnoteresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/updatebillcreditnoteresponse.py
index 1882ab90e..4d7909443 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/updatebillcreditnoteresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/updatebillcreditnoteresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class UpdateBillCreditNoteResponse:
- 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') }})
@@ -91,6 +90,7 @@ class UpdateBillCreditNoteResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/updatebillresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/updatebillresponse.py
index 6dcabd9dd..3d0e7c674 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/updatebillresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/updatebillresponse.py
@@ -16,7 +16,6 @@
@dataclasses.dataclass
class UpdateBillResponse:
- 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') }})
@@ -94,6 +93,7 @@ class UpdateBillResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/updatesupplierresponse.py b/sync-for-payables/src/codatsyncpayables/models/shared/updatesupplierresponse.py
index 10c96ca95..cbaf1fd95 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/updatesupplierresponse.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/updatesupplierresponse.py
@@ -16,7 +16,6 @@
@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') }})
@@ -80,6 +79,7 @@ class UpdateSupplierResponse:
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 }})
+ r"""The request made is not valid."""
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."""
diff --git a/sync-for-payables/src/codatsyncpayables/models/shared/withholdingtaxitems.py b/sync-for-payables/src/codatsyncpayables/models/shared/withholdingtaxitems.py
index da59246c0..fd7e8a323 100755
--- a/sync-for-payables/src/codatsyncpayables/models/shared/withholdingtaxitems.py
+++ b/sync-for-payables/src/codatsyncpayables/models/shared/withholdingtaxitems.py
@@ -4,13 +4,14 @@
import dataclasses
from codatsyncpayables import utils
from dataclasses_json import Undefined, dataclass_json
+from decimal import Decimal
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class WithholdingTaxitems:
- amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
+ amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }})
name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
diff --git a/sync-for-payables/src/codatsyncpayables/payment_methods.py b/sync-for-payables/src/codatsyncpayables/payment_methods.py
index 61d9df65e..fdddfa5da 100755
--- a/sync-for-payables/src/codatsyncpayables/payment_methods.py
+++ b/sync-for-payables/src/codatsyncpayables/payment_methods.py
@@ -32,9 +32,13 @@ def get(self, request: operations.GetPaymentMethodRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -82,9 +86,13 @@ def list(self, request: operations.ListPaymentMethodsRequest, retries: Optional[
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/push_operations.py b/sync-for-payables/src/codatsyncpayables/push_operations.py
index 4c665752b..ff6f2e86a 100755
--- a/sync-for-payables/src/codatsyncpayables/push_operations.py
+++ b/sync-for-payables/src/codatsyncpayables/push_operations.py
@@ -26,9 +26,13 @@ def get(self, request: operations.GetPushOperationRequest, retries: Optional[uti
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -72,9 +76,13 @@ def list(self, request: operations.ListPushOperationsRequest, retries: Optional[
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/sdk.py b/sync-for-payables/src/codatsyncpayables/sdk.py
index 5420b4b80..44864fd66 100755
--- a/sync-for-payables/src/codatsyncpayables/sdk.py
+++ b/sync-for-payables/src/codatsyncpayables/sdk.py
@@ -6,6 +6,7 @@
from .bill_payments import BillPayments
from .bills import Bills
from .companies import Companies
+from .company_info import CompanyInfo
from .connections import Connections
from .journal_entries import JournalEntries
from .journals import Journals
@@ -24,7 +25,29 @@ class CodatSyncPayables:
Sync for Payables is an API and a set of supporting tools built to help integrate with your customers' accounting software, and keep their supplier information, invoices, and payments in sync.
- [Read More...](https://docs.codat.io/payables/overview)
+ [Explore product](https://docs.codat.io/payables/overview) | [See OpenAPI spec](https://github.com/codatio/oas)
+
+ ---
+
+ ## Endpoints
+
+ | Endpoints | Description |
+ |:---------------------|:-----------------------------------------------------------------------------------------------------------|
+ | Companies | Create and manage your SMB users' companies. |
+ | Connections | Create new and manage existing data connections for a company. |
+ | Accounts | Get, create, and update Accounts |
+ | Bills | Get, create, and update Bills |
+ | Bill credit notes | Get, create, and update Bill credit notes |
+ | Bill payments | Get, create, and update Bill payments |
+ | Journals | Get, create, and update Journals |
+ | Journal entries | Get, create, and update Journal entries |
+ | Payment methods | Get, create, and update Payment methods |
+ | Suppliers | Get, create, and update Suppliers |
+ | Tax rates | Get, create, and update Tax rates |
+ | Tracking categories | Get, create, and update Tracking categories |
+ | Push operations | View historic push operations |
+ | Company info | View company profile from the source platform. |
+ | Manage data | Control how data is retrieved from an integration. |
"""
accounts: Accounts
r"""Accounts"""
@@ -36,6 +59,8 @@ class CodatSyncPayables:
r"""Bills"""
companies: Companies
r"""Create and manage your Codat companies."""
+ company_info: CompanyInfo
+ r"""View company information fetched from the source platform."""
connections: Connections
r"""Manage your companies' data connections."""
journal_entries: JournalEntries
@@ -62,7 +87,8 @@ def __init__(self,
server_idx: int = None,
server_url: str = None,
url_params: dict[str, str] = None,
- client: requests_http.Session = None
+ client: requests_http.Session = None,
+ retry_config: utils.RetryConfig = None
) -> None:
"""Instantiates the SDK configuring it with the provided parameters.
@@ -75,7 +101,9 @@ def __init__(self,
:param url_params: Parameters to optionally template the server URL with
:type url_params: dict[str, str]
:param client: The requests.Session HTTP client to use for all operations
- :type client: requests_http.Session
+ :type client: requests_http.Session
+ :param retry_config: The utils.RetryConfig to use globally
+ :type retry_config: utils.RetryConfig
"""
if client is None:
client = requests_http.Session()
@@ -86,7 +114,7 @@ def __init__(self,
if url_params is not None:
server_url = utils.template_url(server_url, url_params)
- self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx)
+ self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx, retry_config=retry_config)
self._init_sdks()
@@ -96,6 +124,7 @@ def _init_sdks(self):
self.bill_payments = BillPayments(self.sdk_configuration)
self.bills = Bills(self.sdk_configuration)
self.companies = Companies(self.sdk_configuration)
+ self.company_info = CompanyInfo(self.sdk_configuration)
self.connections = Connections(self.sdk_configuration)
self.journal_entries = JournalEntries(self.sdk_configuration)
self.journals = Journals(self.sdk_configuration)
diff --git a/sync-for-payables/src/codatsyncpayables/sdkconfiguration.py b/sync-for-payables/src/codatsyncpayables/sdkconfiguration.py
index b76f7c247..270f22517 100755
--- a/sync-for-payables/src/codatsyncpayables/sdkconfiguration.py
+++ b/sync-for-payables/src/codatsyncpayables/sdkconfiguration.py
@@ -3,6 +3,8 @@
import requests
from dataclasses import dataclass
+from .utils.retries import RetryConfig
+
SERVERS = [
'https://api.codat.io',
@@ -18,8 +20,9 @@ class SDKConfiguration:
server_idx: int = 0
language: str = 'python'
openapi_doc_version: str = '3.0.0'
- sdk_version: str = '0.1.0'
- gen_version: str = '2.91.4'
+ sdk_version: str = '0.2.0'
+ gen_version: str = '2.108.3'
+ retry_config: RetryConfig = None
def get_server_details(self) -> tuple[str, dict[str, str]]:
if self.server_url:
diff --git a/sync-for-payables/src/codatsyncpayables/suppliers.py b/sync-for-payables/src/codatsyncpayables/suppliers.py
index 1089ea3e2..ceb0c9d06 100755
--- a/sync-for-payables/src/codatsyncpayables/suppliers.py
+++ b/sync-for-payables/src/codatsyncpayables/suppliers.py
@@ -38,9 +38,13 @@ def create(self, request: operations.CreateSupplierRequest, retries: Optional[ut
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -89,9 +93,13 @@ def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.Re
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -142,9 +150,13 @@ def get_create_update_model(self, request: operations.GetCreateUpdateSupplierMod
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -192,9 +204,13 @@ def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
@@ -249,9 +265,13 @@ def update(self, request: operations.UpdateSupplierRequest, retries: Optional[ut
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/tax_rates.py b/sync-for-payables/src/codatsyncpayables/tax_rates.py
index 7dd336c6e..523715d0c 100755
--- a/sync-for-payables/src/codatsyncpayables/tax_rates.py
+++ b/sync-for-payables/src/codatsyncpayables/tax_rates.py
@@ -32,9 +32,13 @@ def get(self, request: operations.GetTaxRateRequest, retries: Optional[utils.Ret
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -82,9 +86,13 @@ def list(self, request: operations.ListTaxRatesRequest, retries: Optional[utils.
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/tracking_categories.py b/sync-for-payables/src/codatsyncpayables/tracking_categories.py
index 9c67e2667..3d4ad4e4a 100755
--- a/sync-for-payables/src/codatsyncpayables/tracking_categories.py
+++ b/sync-for-payables/src/codatsyncpayables/tracking_categories.py
@@ -32,9 +32,13 @@ def get(self, request: operations.GetTrackingCategoryRequest, retries: Optional[
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
def do_request():
return client.request('GET', url, headers=headers)
@@ -82,9 +86,13 @@ def list(self, request: operations.ListTrackingCategoriesRequest, retries: Optio
client = self.sdk_configuration.security_client
+ global_retry_config = self.sdk_configuration.retry_config
retry_config = retries
if retry_config is None:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
+ if global_retry_config:
+ retry_config = global_retry_config
+ else:
+ 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)
diff --git a/sync-for-payables/src/codatsyncpayables/utils/utils.py b/sync-for-payables/src/codatsyncpayables/utils/utils.py
index ea9792d0d..05eafba6c 100755
--- a/sync-for-payables/src/codatsyncpayables/utils/utils.py
+++ b/sync-for-payables/src/codatsyncpayables/utils/utils.py
@@ -5,6 +5,7 @@
import re
from dataclasses import Field, dataclass, fields, is_dataclass, make_dataclass
from datetime import date, datetime
+from decimal import Decimal
from email.message import Message
from enum import Enum
from typing import Any, Callable, Optional, Tuple, Union, get_args, get_origin
@@ -112,7 +113,8 @@ def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: dict,
client.client.headers[header_name] = value
elif scheme_type == 'http':
if sub_type == 'bearer':
- client.client.headers[header_name] = value.lower().startswith('bearer ') and value or f'Bearer {value}'
+ client.client.headers[header_name] = value.lower().startswith(
+ 'bearer ') and value or f'Bearer {value}'
else:
raise Exception('not supported')
else:
@@ -192,7 +194,7 @@ def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass
f"{pp_key},{_val_to_string(param[pp_key])}")
path = path.replace(
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
- elif not isinstance(param, (str, int, float, complex, bool)):
+ elif not isinstance(param, (str, int, float, complex, bool, Decimal)):
pp_vals: list[str] = []
param_fields: Tuple[Field, ...] = fields(param)
for param_field in param_fields:
@@ -235,7 +237,7 @@ def template_url(url_with_params: str, params: dict[str, str]) -> str:
def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> dict[
- str, list[str]]:
+ str, list[str]]:
params: dict[str, list[str]] = {}
param_fields: Tuple[Field, ...] = fields(clazz)
@@ -377,7 +379,7 @@ def _get_query_param_field_name(obj_field: Field) -> str:
def _get_delimited_query_params(metadata: dict, field_name: str, obj: any, delimiter: str) -> dict[
- str, list[str]]:
+ str, list[str]]:
return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name, delimiter)
@@ -391,9 +393,9 @@ def _get_delimited_query_params(metadata: dict, field_name: str, obj: any, delim
def serialize_request_body(request: dataclass, request_field_name: str, serialization_method: str) -> Tuple[
- str, any, any]:
+ str, any, any]:
if request is None:
- return None, None, None, None
+ return None, None, None
if not is_dataclass(request) or not hasattr(request, request_field_name):
return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method],
@@ -486,7 +488,7 @@ def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str,
def serialize_dict(original: dict, explode: bool, field_name, existing: Optional[dict[str, list[str]]]) -> dict[
- str, list[str]]:
+ str, list[str]]:
if existing is None:
existing = []
@@ -604,7 +606,8 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f
items.append(_val_to_string(value))
if len(items) > 0:
- params[field_name] = [delimiter.join([str(item) for item in items])]
+ params[field_name] = [delimiter.join(
+ [str(item) for item in items])]
else:
params[field_name] = [_val_to_string(obj)]
@@ -681,7 +684,8 @@ def unmarshal_json(data, typ):
try:
out = unmarshal.from_dict({"res": json_dict})
except AttributeError as attr_err:
- raise AttributeError(f'unable to unmarshal {data} as {typ}') from attr_err
+ raise AttributeError(
+ f'unable to unmarshal {data} as {typ}') from attr_err
return out.res
@@ -734,6 +738,36 @@ def datefromisoformat(date_str: str):
return dateutil.parser.parse(date_str).date()
+def bigintencoder(optional: bool):
+ def bigintencode(val: int):
+ if optional and val is None:
+ return None
+ return str(val)
+
+ return bigintencode
+
+
+def bigintdecoder(val):
+ return int(val)
+
+
+def decimalencoder(optional: bool, as_str: bool):
+ def decimalencode(val: Decimal):
+ if optional and val is None:
+ return None
+
+ if as_str:
+ return str(val)
+
+ return float(val)
+
+ return decimalencode
+
+
+def decimaldecoder(val):
+ return Decimal(str(val))
+
+
def get_field_name(name):
def override(_, _field_name=name):
return _field_name