From 90ea18597ce9a0a829ae3eb68bf76b82535a9336 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 22 May 2023 17:52:44 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 2.1.0, Speakeay CLI 1.37.4 --- accounting/README.md | 13 +- accounting/RELEASES.md | 10 +- accounting/USAGE.md | 1 - accounting/docs/accounts/README.md | 28 +- accounting/docs/accounttransactions/README.md | 7 +- accounting/docs/bankaccounts/README.md | 101 +- .../docs/bankaccounttransactions/README.md | 40 +- accounting/docs/billcreditnotes/README.md | 585 +++++++----- accounting/docs/billpayments/README.md | 186 ++-- accounting/docs/bills/README.md | 862 ++++++++++------- accounting/docs/companyinfo/README.md | 2 - accounting/docs/creditnotes/README.md | 700 +++++++------- accounting/docs/customers/README.md | 350 ++++--- accounting/docs/directcosts/README.md | 369 +++++--- accounting/docs/directincomes/README.md | 251 +++-- accounting/docs/financials/README.md | 101 -- accounting/docs/invoices/README.md | 877 +++++++++++------- accounting/docs/items/README.md | 56 +- accounting/docs/journalentries/README.md | 166 ++-- accounting/docs/journals/README.md | 32 +- accounting/docs/paymentmethods/README.md | 6 +- accounting/docs/payments/README.md | 129 +-- accounting/docs/purchaseorders/README.md | 383 +++++--- accounting/docs/reports/README.md | 94 +- accounting/docs/salesorders/README.md | 6 +- accounting/docs/suppliers/README.md | 196 ++-- accounting/docs/taxrates/README.md | 6 +- accounting/docs/trackingcategories/README.md | 6 +- accounting/docs/transfers/README.md | 93 +- accounting/files.gen | 88 +- accounting/gen.yaml | 11 +- accounting/setup.py | 2 +- .../codataccounting/account_transactions.py | 16 +- accounting/src/codataccounting/accounts.py | 45 +- .../bank_account_transactions.py | 57 +- .../src/codataccounting/bank_accounts.py | 33 +- .../src/codataccounting/bill_credit_notes.py | 37 +- .../src/codataccounting/bill_payments.py | 65 +- accounting/src/codataccounting/bills.py | 106 ++- .../src/codataccounting/company_info.py | 14 +- .../src/codataccounting/credit_notes.py | 37 +- accounting/src/codataccounting/customers.py | 62 +- .../src/codataccounting/direct_costs.py | 54 +- .../src/codataccounting/direct_incomes.py | 54 +- accounting/src/codataccounting/financials.py | 136 --- accounting/src/codataccounting/invoices.py | 110 ++- accounting/src/codataccounting/items.py | 29 +- .../src/codataccounting/journal_entries.py | 62 +- accounting/src/codataccounting/journals.py | 29 +- .../models/operations/__init__.py | 5 +- ...ent.py => download_invoices_attachment.py} | 4 +- .../models/operations/get_balance_sheet.py | 2 + .../operations/get_cash_flow_statement.py | 2 + .../models/operations/get_profit_and_loss.py | 2 + .../operations/list_account_transactions.py | 4 +- .../models/operations/list_accounts.py | 4 +- .../list_bank_account_transactions.py | 4 +- .../models/operations/list_bank_accounts.py | 4 +- .../operations/list_bank_transactions.py | 34 - .../operations/list_bill_credit_notes.py | 4 +- .../models/operations/list_bill_payments.py | 4 +- .../models/operations/list_bills.py | 4 +- .../models/operations/list_credit_notes.py | 4 +- .../models/operations/list_customers.py | 4 +- .../models/operations/list_direct_costs.py | 4 +- .../models/operations/list_direct_incomes.py | 4 +- .../models/operations/list_invoices.py | 4 +- .../models/operations/list_items.py | 4 +- .../models/operations/list_journal_entries.py | 4 +- .../models/operations/list_journals.py | 4 +- .../models/operations/list_payment_methods.py | 4 +- .../models/operations/list_payments.py | 4 +- .../models/operations/list_purchase_orders.py | 4 +- .../models/operations/list_sales_orders.py | 4 +- .../models/operations/list_suppliers.py | 4 +- .../models/operations/list_tax_rates.py | 4 +- .../operations/list_tracking_categories.py | 4 +- .../models/operations/list_transfers.py | 4 +- .../codataccounting/models/shared/__init__.py | 65 +- .../codataccounting/models/shared/account.py | 8 +- ...accountstatus_enum.py => accountstatus.py} | 2 +- .../models/shared/accounttransaction.py | 4 +- .../{accounttype_enum.py => accounttype.py} | 2 +- .../models/shared/addressesitems.py | 4 +- .../{addresstype_enum.py => addresstype.py} | 2 +- .../models/shared/bankaccount.py | 4 +- .../models/shared/bankaccounttransactions.py | 22 - .../models/shared/banktransactionline.py | 4 +- ...iontype_enum.py => banktransactiontype.py} | 2 +- .../src/codataccounting/models/shared/bill.py | 4 +- .../models/shared/billcreditnote.py | 8 +- .../models/shared/billcreditnotelineitem.py | 6 +- ...status_enum.py => billcreditnotestatus.py} | 2 +- .../{billedtotype_enum.py => billedtotype.py} | 2 +- ...billedtotype_enum1.py => billedtotype1.py} | 2 +- .../models/shared/billpaymentlinelink.py | 4 +- ...ype_enum.py => billpaymentlinelinktype.py} | 2 +- .../{billstatus_enum.py => billstatus.py} | 2 +- .../models/shared/cashflowstatement1.py | 8 +- .../models/shared/companydataset.py | 12 +- .../codataccounting/models/shared/contact.py | 4 +- .../models/shared/createaccountresponse.py | 8 +- .../shared/createbankaccountresponse.py | 8 +- .../shared/createbanktransactionsresponse.py | 8 +- .../shared/createbillcreditnoteresponse.py | 8 +- .../shared/createbillpaymentresponse.py | 8 +- .../models/shared/createbillresponse.py | 8 +- .../models/shared/createcreditnoteresponse.py | 8 +- .../models/shared/createcustomerresponse.py | 8 +- .../models/shared/createdirectcostresponse.py | 8 +- .../shared/createdirectincomeresponse.py | 8 +- .../models/shared/createinvoiceresponse.py | 8 +- .../models/shared/createitemresponse.py | 8 +- .../shared/createjournalentryresponse.py | 8 +- .../models/shared/createjournalresponse.py | 8 +- .../models/shared/createpaymentresponse.py | 8 +- .../shared/createpurchaseorderresponse.py | 8 +- .../models/shared/createsupplierresponse.py | 8 +- .../models/shared/createtransferresponse.py | 8 +- .../models/shared/creditnote.py | 4 +- .../models/shared/creditnotelineitem.py | 6 +- ...notestatus_enum.py => creditnotestatus.py} | 2 +- .../codataccounting/models/shared/customer.py | 4 +- ...stomerstatus_enum.py => customerstatus.py} | 2 +- .../codataccounting/models/shared/dataset.py | 4 +- .../shared/{datatype_enum.py => datatype.py} | 2 +- .../codataccounting/models/shared/invoice.py | 7 +- ...invoicestatus_enum.py => invoicestatus.py} | 2 +- .../src/codataccounting/models/shared/item.py | 10 +- .../{itemstatus_enum.py => itemstatus.py} | 2 +- .../codataccounting/models/shared/itemtype.py | 11 + .../codataccounting/models/shared/journal.py | 4 +- ...journalstatus_enum.py => journalstatus.py} | 2 +- .../models/shared/paymentlinelink.py | 4 +- ...entlinktype_enum.py => paymentlinktype.py} | 2 +- .../models/shared/paymentmethod.py | 8 +- .../models/shared/paymentmethods.py | 4 +- ...dstatus_enum.py => paymentmethodstatus.py} | 2 +- ...ethodtype_enum.py => paymentmethodtype.py} | 2 +- .../models/shared/phonenumbersitems.py | 4 +- ...enumbertype_enum.py => phonenumbertype.py} | 2 +- .../models/shared/profitandlossreport1.py | 4 +- .../models/shared/propertiestracking.py | 6 +- .../models/shared/propertiestracking1.py | 6 +- .../models/shared/purchaseorder.py | 4 +- ...rstatus_enum.py => purchaseorderstatus.py} | 2 +- ...shchangetype_enum.py => pushchangetype.py} | 2 +- .../models/shared/pushoperationchange.py | 4 +- .../models/shared/pushoperationref.py | 4 +- ...nstatus_enum.py => pushoperationstatus.py} | 2 +- .../models/shared/pushoperationsummary.py | 8 +- .../models/shared/pushoption.py | 4 +- .../models/shared/pushoptionchoice.py | 4 +- .../models/shared/pushoptionproperty.py | 4 +- ...shoptiontype_enum.py => pushoptiontype.py} | 2 +- .../{reportbasis_enum.py => reportbasis.py} | 2 +- .../{reportinput_enum.py => reportinput.py} | 2 +- .../models/shared/salesorder.py | 8 +- ...tus_enum.py => salesorderinvoicestatus.py} | 2 +- .../models/shared/salesorderref.py | 16 + ...rderstatus_enum.py => salesorderstatus.py} | 2 +- .../shared/{status_enum.py => status.py} | 2 +- .../codataccounting/models/shared/supplier.py | 4 +- ...pplierstatus_enum.py => supplierstatus.py} | 2 +- .../codataccounting/models/shared/taxrate.py | 4 +- ...taxratestatus_enum.py => taxratestatus.py} | 2 +- .../codataccounting/models/shared/tracking.py | 4 +- .../models/shared/trackingcategory.py | 4 +- .../models/shared/trackingcategorytree.py | 4 +- .../codataccounting/models/shared/transfer.py | 3 +- .../shared/updatebankaccountresponse.py | 8 +- .../shared/updatebillcreditnoteresponse.py | 8 +- .../models/shared/updatebillresponse.py | 8 +- .../models/shared/updatecreditnoteresponse.py | 8 +- .../models/shared/updatecustomerresponse.py | 8 +- .../models/shared/updateinvoiceresponse.py | 8 +- .../shared/updatepurchaseorderresponse.py | 8 +- .../models/shared/updatesupplierresponse.py | 8 +- .../src/codataccounting/payment_methods.py | 14 +- accounting/src/codataccounting/payments.py | 29 +- .../src/codataccounting/purchase_orders.py | 35 +- accounting/src/codataccounting/reports.py | 148 ++- .../src/codataccounting/sales_orders.py | 14 +- accounting/src/codataccounting/sdk.py | 16 +- accounting/src/codataccounting/suppliers.py | 54 +- accounting/src/codataccounting/tax_rates.py | 14 +- .../codataccounting/tracking_categories.py | 14 +- accounting/src/codataccounting/transfers.py | 29 +- accounting/src/codataccounting/utils/utils.py | 63 +- 189 files changed, 4434 insertions(+), 3430 deletions(-) delete mode 100755 accounting/docs/financials/README.md delete mode 100755 accounting/src/codataccounting/financials.py rename accounting/src/codataccounting/models/operations/{download_invoice_attachment.py => download_invoices_attachment.py} (93%) delete mode 100755 accounting/src/codataccounting/models/operations/list_bank_transactions.py rename accounting/src/codataccounting/models/shared/{accountstatus_enum.py => accountstatus.py} (87%) rename accounting/src/codataccounting/models/shared/{accounttype_enum.py => accounttype.py} (89%) rename accounting/src/codataccounting/models/shared/{addresstype_enum.py => addresstype.py} (87%) delete mode 100755 accounting/src/codataccounting/models/shared/bankaccounttransactions.py rename accounting/src/codataccounting/models/shared/{banktransactiontype_enum.py => banktransactiontype.py} (93%) rename accounting/src/codataccounting/models/shared/{billcreditnotestatus_enum.py => billcreditnotestatus.py} (88%) rename accounting/src/codataccounting/models/shared/{billedtotype_enum.py => billedtotype.py} (87%) rename accounting/src/codataccounting/models/shared/{billedtotype_enum1.py => billedtotype1.py} (85%) rename accounting/src/codataccounting/models/shared/{billpaymentlinelinktype_enum.py => billpaymentlinelinktype.py} (90%) rename accounting/src/codataccounting/models/shared/{billstatus_enum.py => billstatus.py} (90%) rename accounting/src/codataccounting/models/shared/{creditnotestatus_enum.py => creditnotestatus.py} (87%) rename accounting/src/codataccounting/models/shared/{customerstatus_enum.py => customerstatus.py} (86%) rename accounting/src/codataccounting/models/shared/{datatype_enum.py => datatype.py} (98%) rename accounting/src/codataccounting/models/shared/{invoicestatus_enum.py => invoicestatus.py} (97%) rename accounting/src/codataccounting/models/shared/{itemstatus_enum.py => itemstatus.py} (94%) create mode 100755 accounting/src/codataccounting/models/shared/itemtype.py rename accounting/src/codataccounting/models/shared/{journalstatus_enum.py => journalstatus.py} (87%) rename accounting/src/codataccounting/models/shared/{paymentlinktype_enum.py => paymentlinktype.py} (95%) rename accounting/src/codataccounting/models/shared/{paymentmethodstatus_enum.py => paymentmethodstatus.py} (85%) rename accounting/src/codataccounting/models/shared/{paymentmethodtype_enum.py => paymentmethodtype.py} (89%) rename accounting/src/codataccounting/models/shared/{phonenumbertype_enum.py => phonenumbertype.py} (88%) rename accounting/src/codataccounting/models/shared/{purchaseorderstatus_enum.py => purchaseorderstatus.py} (87%) rename accounting/src/codataccounting/models/shared/{pushchangetype_enum.py => pushchangetype.py} (88%) rename accounting/src/codataccounting/models/shared/{pushoperationstatus_enum.py => pushoperationstatus.py} (86%) rename accounting/src/codataccounting/models/shared/{pushoptiontype_enum.py => pushoptiontype.py} (89%) rename accounting/src/codataccounting/models/shared/{reportbasis_enum.py => reportbasis.py} (89%) rename accounting/src/codataccounting/models/shared/{reportinput_enum.py => reportinput.py} (89%) rename accounting/src/codataccounting/models/shared/{salesorderinvoicestatus_enum.py => salesorderinvoicestatus.py} (90%) create mode 100755 accounting/src/codataccounting/models/shared/salesorderref.py rename accounting/src/codataccounting/models/shared/{salesorderstatus_enum.py => salesorderstatus.py} (87%) rename accounting/src/codataccounting/models/shared/{status_enum.py => status.py} (89%) rename accounting/src/codataccounting/models/shared/{supplierstatus_enum.py => supplierstatus.py} (86%) rename accounting/src/codataccounting/models/shared/{taxratestatus_enum.py => taxratestatus.py} (93%) diff --git a/accounting/README.md b/accounting/README.md index 1f5472230..0f922025a 100755 --- a/accounting/README.md +++ b/accounting/README.md @@ -23,7 +23,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetAccountTransactionRequest( account_transaction_id='corrupti', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -58,12 +57,11 @@ if res.account_transaction is not None: * [create](docs/bankaccounttransactions/README.md#create) - Create bank transactions * [get_create_model](docs/bankaccounttransactions/README.md#get_create_model) - List push options for bank account bank transactions * [list](docs/bankaccounttransactions/README.md#list) - List bank transactions for bank account -* [list_transactions](docs/bankaccounttransactions/README.md#list_transactions) - List all bank transactions ### [bank_accounts](docs/bankaccounts/README.md) * [create](docs/bankaccounts/README.md#create) - Create bank account -* [get](docs/bankaccounts/README.md#get) - Get bank account +* [~~get~~](docs/bankaccounts/README.md#get) - Get bank account :warning: **Deprecated** * [get_create_update_model](docs/bankaccounts/README.md#get_create_update_model) - Get create/update bank account model * [list](docs/bankaccounts/README.md#list) - List bank accounts * [update](docs/bankaccounts/README.md#update) - Update bank account @@ -143,12 +141,6 @@ if res.account_transaction is not None: * [list_attachments](docs/directincomes/README.md#list_attachments) - List direct income attachments * [upload_attachment](docs/directincomes/README.md#upload_attachment) - Create direct income attachment -### [financials](docs/financials/README.md) - -* [get_balance_sheet](docs/financials/README.md#get_balance_sheet) - Get balance sheet -* [get_cash_flow_statement](docs/financials/README.md#get_cash_flow_statement) - Get cash flow statement -* [get_profit_and_loss](docs/financials/README.md#get_profit_and_loss) - Get profit and loss - ### [invoices](docs/invoices/README.md) * [create](docs/invoices/README.md#create) - Create invoice @@ -209,6 +201,9 @@ if res.account_transaction is not None: * [get_aged_creditors_report](docs/reports/README.md#get_aged_creditors_report) - Aged creditors report * [get_aged_debtors_report](docs/reports/README.md#get_aged_debtors_report) - Aged debtors report +* [get_balance_sheet](docs/reports/README.md#get_balance_sheet) - Get balance sheet +* [get_cash_flow_statement](docs/reports/README.md#get_cash_flow_statement) - Get cash flow statement +* [get_profit_and_loss](docs/reports/README.md#get_profit_and_loss) - Get profit and loss * [is_aged_creditors_report_available](docs/reports/README.md#is_aged_creditors_report_available) - Aged creditors report available * [is_aged_debtor_report_available](docs/reports/README.md#is_aged_debtor_report_available) - Aged debtors report available diff --git a/accounting/RELEASES.md b/accounting/RELEASES.md index d0d51e91e..b673a18ff 100644 --- a/accounting/RELEASES.md +++ b/accounting/RELEASES.md @@ -334,4 +334,12 @@ Based on: - OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml - Speakeasy CLI 1.27.0 (2.24.0) https://github.com/speakeasy-api/speakeasy ### Releases -- [PyPI v0.15.0] https://pypi.org/project/codat-accounting/0.15.0 - accounting \ No newline at end of file +- [PyPI v0.15.0] https://pypi.org/project/codat-accounting/0.15.0 - accounting + +## 2023-05-22 17:52:18 +### Changes +Based on: +- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml +- Speakeasy CLI 1.37.4 (2.32.0) https://github.com/speakeasy-api/speakeasy +### Releases +- [PyPI v0.16.0] https://pypi.org/project/codat-accounting/0.16.0 - accounting \ No newline at end of file diff --git a/accounting/USAGE.md b/accounting/USAGE.md index 816c10ac7..0524f39e3 100755 --- a/accounting/USAGE.md +++ b/accounting/USAGE.md @@ -9,7 +9,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetAccountTransactionRequest( account_transaction_id='corrupti', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', diff --git a/accounting/docs/accounts/README.md b/accounting/docs/accounts/README.md index fdcfcbc13..e1511717a 100755 --- a/accounting/docs/accounts/README.md +++ b/accounting/docs/accounts/README.md @@ -13,13 +13,15 @@ Accounts ## create -Creates a new account for a given company. +The *Create accounts* endpoint creates a new [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given company. Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. +> 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. + +[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. ### Example Usage @@ -33,7 +35,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateAccountRequest( account=shared.Account( currency='quibusdam', @@ -50,8 +51,8 @@ req = operations.CreateAccountRequest( name='Accounts Receivable', nominal_code='610', source_modified_date='corrupti', - status=shared.AccountStatusEnum.ACTIVE, - type=shared.AccountTypeEnum.ASSET, + status=shared.AccountStatus.ACTIVE, + type=shared.AccountType.ASSET, valid_datatype_links=[ shared.ValidDataTypeLinks( links=[ @@ -99,7 +100,9 @@ if res.create_account_response is not None: ## get -Gets a single account corresponding to the given ID. +The *Get account* endpoint returns a single [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given `accountId`. + +[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. ### Example Usage @@ -113,7 +116,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetAccountRequest( account_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -127,13 +129,15 @@ if res.account is not None: ## get_create_model -Get create account model. Returns the expected data for the request payload. +The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/accounting-api#/schemas/Account) for a given company and integration. See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. +> 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. + +[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. ### Example Usage @@ -147,7 +151,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateChartOfAccountsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -161,7 +164,9 @@ if res.push_option is not None: ## list -Gets the latest accounts for a company +The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection. + +[Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. ### Example Usage @@ -175,7 +180,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListAccountsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', diff --git a/accounting/docs/accounttransactions/README.md b/accounting/docs/accounttransactions/README.md index be9901950..5d5907aa5 100755 --- a/accounting/docs/accounttransactions/README.md +++ b/accounting/docs/accounttransactions/README.md @@ -11,7 +11,7 @@ Account transactions ## get -Returns a specific [account transaction](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). +Returns a specific [account transaction](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). ### Example Usage @@ -25,7 +25,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetAccountTransactionRequest( account_transaction_id='provident', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -40,7 +39,8 @@ if res.account_transaction is not None: ## list -Returns a list of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) for a given company's connection. +The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) for a given company's connection. + ### Example Usage @@ -54,7 +54,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListAccountTransactionsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', diff --git a/accounting/docs/bankaccounts/README.md b/accounting/docs/bankaccounts/README.md index 19aee0fe8..dcc777dbd 100755 --- a/accounting/docs/bankaccounts/README.md +++ b/accounting/docs/bankaccounts/README.md @@ -7,20 +7,21 @@ Bank accounts ### Available Operations * [create](#create) - Create bank account -* [get](#get) - Get bank account +* [~~get~~](#get) - Get bank account :warning: **Deprecated** * [get_create_update_model](#get_create_update_model) - Get create/update bank account model * [list](#list) - List bank accounts * [update](#update) - Update bank account ## create -Posts a new bank account to the accounting package for a given company. +Posts a new bank account to the accounting package for a given company. + +Required data may vary by integration. To see what data to post, first call [](). + +> **Supported Integrations** +> +> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating bank accounts. -Required data may vary by integration. To see what data to post, first call [](). - -> **Supported Integrations** -> -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating bank accounts. ### Example Usage @@ -34,31 +35,30 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateBankAccountRequest( bank_account=shared.BankAccount( - account_name='natus', - account_number='laboriosam', - account_type=shared.BankAccountBankAccountTypeEnum.DEBIT, - available_balance=9025.99, - balance=6818.2, - currency='in', - i_ban='corporis', - id='96eb10fa-aa23-452c-9955-907aff1a3a2f', - institution='mollitia', + account_name='dolor', + account_number='natus', + account_type=shared.BankAccountBankAccountType.CREDIT, + available_balance=9437.49, + balance=9025.99, + currency='fuga', + i_ban='in', + id='596eb10f-aaa2-4352-8595-5907aff1a3a2', + institution='repellat', metadata=shared.Metadata( is_deleted=False, ), - modified_date='occaecati', - nominal_code='numquam', - overdraft_limit=4143.69, - sort_code='quam', - source_modified_date='molestiae', + modified_date='mollitia', + nominal_code='occaecati', + overdraft_limit=2532.91, + sort_code='commodi', + source_modified_date='quam', ), allow_sync_on_push_complete=False, company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=244425, + timeout_in_minutes=474697, ) res = s.bank_accounts.create(req) @@ -67,10 +67,12 @@ if res.create_bank_account_response is not None: # handle response ``` -## get +## ~~get~~ Gets the bank account with a given ID +> :warning: **DEPRECATED**: this method will be removed in a future release, please migrate away from it as soon as possible. + ### Example Usage ```python @@ -83,7 +85,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetBankAccountRequest( account_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -98,13 +99,14 @@ if res.bank_account is not None: ## get_create_update_model -Get create/update bank account model. Returns the expected data for the request payload. +Get create/update bank account model. Returns the expected data for the request payload. + +See the examples for integration-specific indicative models. + +> **Supported Integrations** +> +> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating bank accounts. -See the examples for integration-specific indicative models. - -> **Supported Integrations** -> -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating bank accounts. ### Example Usage @@ -118,7 +120,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateBankAccountsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -146,14 +147,13 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListBankAccountsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', order_by='-modifiedDate', page=1, page_size=100, - query='error', + query='velit', ) res = s.bank_accounts.list(req) @@ -170,7 +170,7 @@ Required data may vary by integration. To see what data to post, first call []() > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support updating bank accounts. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support updating bank accounts. ### Example Usage @@ -184,32 +184,31 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateBankAccountRequest( bank_account=shared.BankAccount( - account_name='quia', - account_number='quis', - account_type=shared.BankAccountBankAccountTypeEnum.UNKNOWN, - available_balance=6747.52, - balance=6563.3, - currency='enim', - i_ban='odit', - id='c3f5ad01-9da1-4ffe-b8f0-97b0074f1547', - institution='dicta', + account_name='error', + account_number='quia', + account_type=shared.BankAccountBankAccountType.CREDIT, + available_balance=1103.75, + balance=6747.52, + currency='animi', + i_ban='enim', + id='2c3f5ad0-19da-41ff-a78f-097b0074f154', + institution='iusto', metadata=shared.Metadata( is_deleted=False, ), - modified_date='harum', - nominal_code='enim', - overdraft_limit=8804.76, - sort_code='commodi', - source_modified_date='repudiandae', + modified_date='dicta', + nominal_code='harum', + overdraft_limit=3179.83, + sort_code='accusamus', + source_modified_date='commodi', ), bank_account_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - timeout_in_minutes=64147, + timeout_in_minutes=918236, ) res = s.bank_accounts.update(req) diff --git a/accounting/docs/bankaccounttransactions/README.md b/accounting/docs/bankaccounttransactions/README.md index 11ac1f181..4cb13280b 100755 --- a/accounting/docs/bankaccounttransactions/README.md +++ b/accounting/docs/bankaccounttransactions/README.md @@ -9,7 +9,6 @@ Bank transactions for bank accounts * [create](#create) - Create bank transactions * [get_create_model](#get_create_model) - List push options for bank account bank transactions * [list](#list) - List bank transactions for bank account -* [list_transactions](#list_transactions) - List all bank transactions ## create @@ -17,7 +16,7 @@ Posts bank transactions to the accounting package for a given company. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support POST methods. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support POST methods. ### Example Usage @@ -31,7 +30,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateBankTransactionsRequest( bank_transactions=shared.BankTransactions( account_id='quis', @@ -47,7 +45,7 @@ req = operations.CreateBankTransactionsRequest( reconciled=False, reference='perferendis', source_modified_date='ad', - transaction_type=shared.BankTransactionTypeEnum.CHECK, + transaction_type=shared.BankTransactionType.CHECK, ), ], ), @@ -80,7 +78,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateBankAccountModelRequest( account_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -109,7 +106,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListBankAccountTransactionsRequest( account_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -125,35 +121,3 @@ res = s.bank_account_transactions.list(req) if res.bank_transactions_response is not None: # handle response ``` - -## list_transactions - -Gets the latest bank transactions for given account ID and company. Doesn't require connection ID. - -### Example Usage - -```python -import codataccounting -from codataccounting.models import operations - -s = codataccounting.CodatAccounting( - security=shared.Security( - auth_header="YOUR_API_KEY_HERE", - ), -) - - -req = operations.ListBankTransactionsRequest( - account_id='8a210b68-6988-11ed-a1eb-0242ac120002', - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - order_by='-modifiedDate', - page=1, - page_size=100, - query='dolor', -) - -res = s.bank_account_transactions.list_transactions(req) - -if res.bank_account_transactions is not None: - # handle response -``` diff --git a/accounting/docs/billcreditnotes/README.md b/accounting/docs/billcreditnotes/README.md index 1936aee07..59b84bd86 100755 --- a/accounting/docs/billcreditnotes/README.md +++ b/accounting/docs/billcreditnotes/README.md @@ -14,13 +14,13 @@ Bill credit notes ## create -Posts a new billCreditNote to the accounting package for a given company. +Posts a new billCreditNote to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-billCreditNotes-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating bill credit notes. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating bill credit notes. ### Example Usage @@ -34,36 +34,35 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateBillCreditNoteRequest( bill_credit_note=shared.BillCreditNote( - allocated_on_date='ipsum', + allocated_on_date='quae', bill_credit_note_number='91fe2a83-e161-4c21-929d-c5c10c4b07e5', - currency='quidem', - currency_rate=5651.89, - discount_percentage=5666.02, + currency='ipsum', + currency_rate=6924.72, + discount_percentage=5651.89, id='1509398f-98e2-436d-8a5d-c042e0c74ffc', - issue_date='pariatur', + issue_date='excepturi', line_items=[ shared.BillCreditNoteLineItem( account_ref=shared.AccountRef( - id='88e1e91e-450a-4d2a-bd44-269802d502a9', - name='Olivia Rice', + id='488e1e91-e450-4ad2-abd4-4269802d502a', + name='Eddie Prosacco', ), - description='eum', - discount_amount=2487.53, - discount_percentage=7561.07, + description='delectus', + discount_amount=4332.88, + discount_percentage=2487.53, item_ref=shared.ItemRef( - id='969e9a3e-fa77-4dfb-94cd-66ae395efb9b', - name='Nelson Lesch', + id='c969e9a3-efa7-47df-b14c-d66ae395efb9', + name='Lynn Kuvalis', ), - quantity=6439.9, - sub_total=3948.69, - tax_amount=4238.55, + quantity=2305.33, + sub_total=6439.9, + tax_amount=3948.69, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6188.09, - id='97074ba4-469b-46e2-9419-59890afa563e', - name='Vivian Boyle', + effective_tax_rate=4238.55, + id='997074ba-4469-4b6e-a141-959890afa563', + name='Ms. Fred Hilll', ), total_amount=8919.24, tracking=shared.BillCreditNoteLineItemTracking( @@ -81,8 +80,8 @@ req = operations.CreateBillCreditNoteRequest( company_name='blanditiis', id='909b3fe4-9a8d-49cb-b486-33323f9b77f3', ), - is_billed_to=shared.BilledToTypeEnum.CUSTOMER, - is_rebilled_to=shared.BilledToTypeEnum.NOT_APPLICABLE, + is_billed_to=shared.BilledToType.CUSTOMER, + is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, project_ref=shared.ProjectRef( id='100674eb-f692-480d-9ba7-7a89ebf737ae', name='Judy Aufderhar', @@ -144,8 +143,8 @@ req = operations.CreateBillCreditNoteRequest( company_name='eveniet', id='fd121aa6-f1e6-474b-9b04-f15756082d68', ), - is_billed_to=shared.BilledToTypeEnum.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum.CUSTOMER, + is_billed_to=shared.BilledToType.PROJECT, + is_rebilled_to=shared.BilledToType.CUSTOMER, project_ref=shared.ProjectRef( id='19f1d170-5133-49d0-8086-a1840394c260', name='Jean Wunsch', @@ -171,6 +170,120 @@ req = operations.CreateBillCreditNoteRequest( ], unit_amount=2155.29, ), + shared.BillCreditNoteLineItem( + account_ref=shared.AccountRef( + id='698f447f-603e-48b4-85e8-0ca55efd20e4', + name='Ms. Pearl Towne', + ), + description='praesentium', + discount_amount=7400.98, + discount_percentage=3868.27, + item_ref=shared.ItemRef( + id='a89fbe3a-5aa8-4e48-a4d0-ab4075088e51', + name='Ms. Ruben Cremin', + ), + quantity=9061.72, + sub_total=6222.31, + tax_amount=85.11, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=2790.68, + id='f3b1194b-8abf-4603-a79f-9dfe0ab7da8a', + name='Helen Schiller IV', + ), + total_amount=4420.36, + tracking=shared.BillCreditNoteLineItemTracking( + category_refs=[ + shared.TrackingCategoryRef( + id='86bc173d-689e-4ee9-926f-8d986e881ead', + name='Lela Baumbach Jr.', + ), + shared.TrackingCategoryRef( + id='12563f94-e29e-4973-a922-a57a15be3e06', + name='Lena Beier', + ), + shared.TrackingCategoryRef( + id='2b6e3ab8-845f-4059-ba60-ff2a54a31e94', + name='Carla Graham', + ), + shared.TrackingCategoryRef( + id='e865e795-6f92-451a-9a9d-a660ff57bfaa', + name='Edwin Wolf', + ), + ], + customer_ref=shared.CustomerRef( + company_name='sapiente', + id='c1b4512c-1032-4648-9c2f-615199ebfd0e', + ), + is_billed_to=shared.BilledToType.CUSTOMER, + is_rebilled_to=shared.BilledToType.PROJECT, + project_ref=shared.ProjectRef( + id='e6c632ca-3aed-4011-b996-312fde047717', + name='Irma Wuckert', + ), + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='d0174763-60a1-45db-aa66-0659a1adeaab', + name='Dr. Cassandra Halvorson', + ), + ], + unit_amount=7758.03, + ), + shared.BillCreditNoteLineItem( + account_ref=shared.AccountRef( + id='645b08b6-1891-4baa-8fe1-ade008e6f8c5', + name='Dr. Chris Hermiston', + ), + description='impedit', + discount_amount=8427.77, + discount_percentage=7205.28, + item_ref=shared.ItemRef( + id='5a341814-3010-4421-813d-5208ece7e253', + name='Andre Kautzer', + ), + quantity=3494.4, + sub_total=704.1, + tax_amount=7814.8, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=4218.44, + id='c6e205e1-6dea-4b3f-ac95-78a64584273a', + name='Randall Boyle', + ), + total_amount=1173.8, + tracking=shared.BillCreditNoteLineItemTracking( + category_refs=[ + shared.TrackingCategoryRef( + id='2309fb09-2992-41ae-bb9f-58c4d86e68e4', + name='Ignacio Bartoletti', + ), + shared.TrackingCategoryRef( + id='013f59da-757a-459e-8fef-66ef1caa3383', + name='Victor Rogahn', + ), + ], + customer_ref=shared.CustomerRef( + company_name='dolore', + id='77373c8d-72f6-44d1-9b1f-2c4310661e96', + ), + is_billed_to=shared.BilledToType.UNKNOWN, + is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, + project_ref=shared.ProjectRef( + id='9e1cf9e0-6e3a-4437-800a-e6b6bc9b8f75', + name='Terence O'Keefe', + ), + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='a9741d31-1352-4965-bb8a-7202611435e1', + name='Lindsay Stiedemann', + ), + shared.TrackingCategoryRef( + id='2259b1ab-da8c-4070-a108-4cb0672d1ad8', + name='Daisy Tillman', + ), + ], + unit_amount=5750.78, + ), ], metadata=shared.Metadata( is_deleted=False, @@ -180,105 +293,90 @@ req = operations.CreateBillCreditNoteRequest( payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='quos', - currency='voluptatibus', - currency_rate=2716.53, - total_amount=2730.09, + allocated_on_date='ipsam', + currency='rerum', + currency_rate=5156.38, + total_amount=3572.07, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='7f603e8b-445e-480c-a55e-fd20e457e185', - name='Bennie Howe', + id='efbd02ba-e0be-42d7-8225-9e3ea4b5197f', + name='Steve Fritsch', ), - currency='error', - currency_rate=9447.08, - id='be3a5aa8-e482-44d0-ab40-75088e518620', - note='vel', + currency='at', + currency_rate=6378.56, + id='7ce52b89-5c53-47c6-854e-fb0b34896c3c', + note='fuga', paid_on_date='nostrum', - reference='saepe', - total_amount=6222.31, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='consequatur', - currency='incidunt', - currency_rate=9688.65, - total_amount=2097.5, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='b1194b8a-bf60-43a7-9f9d-fe0ab7da8a50', - name='Phil Boyer', - ), - currency='asperiores', - currency_rate=5199.52, - id='6bc173d6-89ee-4e95-a6f8-d986e881ead4', - note='reiciendis', - paid_on_date='doloremque', - reference='repudiandae', - total_amount=1160.98, + reference='est', + total_amount=7708.73, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='accusantium', - currency='beatae', - currency_rate=1747.72, - total_amount=3164.88, + allocated_on_date='delectus', + currency='tempore', + currency_rate=8786.01, + total_amount=1415.06, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='63f94e29-e973-4e92-aa57-a15be3e06080', - name='Tricia Denesik', + id='fd570757-7929-4177-9eac-646ecb573409', + name='Earl VonRueden DVM', ), - currency='necessitatibus', - currency_rate=1875.52, - id='ab8845f0-597a-460f-b2a5-4a31e94764a3', - note='debitis', - paid_on_date='laudantium', - reference='eum', - total_amount=3679.27, + currency='veniam', + currency_rate=6592.68, + id='2b12eb07-f116-4db9-9545-fc95fa88970e', + note='architecto', + paid_on_date='quos', + reference='iste', + total_amount=8268.62, ), ), ], - remaining_credit=9282.19, - source_modified_date='esse', - status=shared.BillCreditNoteStatusEnum.PAID, + remaining_credit=7316.34, + source_modified_date='libero', + status=shared.BillCreditNoteStatus.PAID, sub_total=805.78, supplemental_data=shared.SupplementalData( content={ - "quis": { - "reiciendis": 'provident', - "aspernatur": 'ullam', - }, - "quasi": { - "nostrum": 'mollitia', - "provident": 'possimus', - "animi": 'ex', - }, - "aliquid": { - "repellat": 'doloribus', + "doloremque": { + "impedit": 'cum', + "ipsum": 'adipisci', + "saepe": 'deserunt', + "doloremque": 'quis', }, }, ), supplier_ref=shared.SupplierRef( - id='57bfaad4-f9ef-4c1b-8512-c1032648dc2f', - supplier_name='eum', + id='5b197cd4-4e2f-452d-82d3-513bb6f48b65', + supplier_name='nisi', ), total_amount=805.78, - total_discount=1173.2, - total_tax_amount=3251.18, + total_discount=7277.71, + total_tax_amount=7945.07, withholding_tax=[ shared.WithholdingTaxitems( - amount=5834.04, - name='Darin Rodriguez', + amount=7060.61, + name='Erin Wiza', + ), + shared.WithholdingTaxitems( + amount=8915.81, + name='Susie Davis', + ), + shared.WithholdingTaxitems( + amount=2072.96, + name='Genevieve Lebsack', + ), + shared.WithholdingTaxitems( + amount=6040.78, + name='Miss Kelly Ernser', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=52508, + timeout_in_minutes=111496, ) res = s.bill_credit_notes.create(req) @@ -289,7 +387,7 @@ if res.create_bill_credit_note_response is not None: ## get -Gets a single billCreditNote corresponding to the given ID. +Gets a single billCreditNote corresponding to the given ID. ### Example Usage @@ -303,9 +401,8 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetBillCreditNoteRequest( - bill_credit_note_id='earum', + bill_credit_note_id='dignissimos', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -317,11 +414,11 @@ if res.bill_credit_note is not None: ## get_create_update_model -Get create/update bill credit note model. +Get create/update bill credit note model. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating bill credit notes. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating bill credit notes. ### Example Usage @@ -335,7 +432,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateBillCreditNotesModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -349,7 +445,7 @@ if res.push_option is not None: ## list -Gets a list of all bill credit notes for a company, with pagination +Gets a list of all bill credit notes for a company, with pagination. ### Example Usage @@ -363,13 +459,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListBillCreditNotesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='perspiciatis', + query='esse', ) res = s.bill_credit_notes.list(req) @@ -380,13 +475,13 @@ if res.bill_credit_notes is not None: ## update -Posts an updated billCreditNote to the accounting package for a given company. +Posts an updated billCreditNote to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-billCreditNotes-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support updating bill credit notes. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support updating bill credit notes. ### Example Usage @@ -400,220 +495,212 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateBillCreditNoteRequest( bill_credit_note=shared.BillCreditNote( - allocated_on_date='maiores', + allocated_on_date='fugiat', bill_credit_note_number='91fe2a83-e161-4c21-929d-c5c10c4b07e5', - currency='debitis', - currency_rate=3998.02, - discount_percentage=7809.31, + currency='ad', + currency_rate=1348.18, + discount_percentage=3165.01, id='1509398f-98e2-436d-8a5d-c042e0c74ffc', - issue_date='suscipit', + issue_date='delectus', line_items=[ shared.BillCreditNoteLineItem( account_ref=shared.AccountRef( - id='2ca3aed0-1179-4963-92fd-e04771778ff6', - name='Ms. Janis Batz', + id='7b114eeb-52ff-4785-bc37-814d4c98e0c2', + name='Rudolph Macejkovic', + ), + description='rerum', + discount_amount=4923.61, + discount_percentage=3609.34, + item_ref=shared.ItemRef( + id='dad636c6-0050-43d8-bb31-180f739ae9e0', + name='Nellie Waters', + ), + quantity=439.75, + sub_total=5740.92, + tax_amount=8795.22, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=1786.35, + id='810331f3-981d-44c7-80b6-07f3c93c73b9', + name='Luke Fay', + ), + total_amount=7782.76, + tracking=shared.BillCreditNoteLineItemTracking( + category_refs=[ + shared.TrackingCategoryRef( + id='da7e23f2-2574-411f-af4b-7544e472e802', + name='Bill Kling', + ), + shared.TrackingCategoryRef( + id='b40463a7-d575-4f14-80e7-64ad7334ec1b', + name='Tracey Bosco', + ), + shared.TrackingCategoryRef( + id='6a08088d-100e-4fad-a200-ef0422eb2164', + name='Courtney Maggio', + ), + shared.TrackingCategoryRef( + id='8366c723-ffda-49e0-abee-4825c1fc0e11', + name='Miss Marianne Leffler', + ), + ], + customer_ref=shared.CustomerRef( + company_name='a', + id='918544ec-42de-4fcc-a8f1-977773e63562', + ), + is_billed_to=shared.BilledToType.CUSTOMER, + is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, + project_ref=shared.ProjectRef( + id='b408f05e-3d48-4fda-b313-a1f5fd94259c', + name='Yvette Dooley', + ), + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='5ea944f3-b756-4c11-b6c3-7a5126243835', + name='Mrs. Johnathan Russel', + ), + ], + unit_amount=1593.93, + ), + shared.BillCreditNoteLineItem( + account_ref=shared.AccountRef( + id='3a45cefc-5fde-410a-8ce2-169e510019c6', + name='Jermaine Hettinger', ), - description='esse', - discount_amount=4037.93, - discount_percentage=2352.63, + description='magnam', + discount_amount=4935.91, + discount_percentage=3884.04, item_ref=shared.ItemRef( - id='60a15db6-a660-4659-a1ad-eaab5851d6c6', - name='Ms. Geraldine Ratke', + id='2799bfbb-e694-49fb-abb4-ecae6c3d5db3', + name='Kristopher Walter', ), - quantity=3996.6, - sub_total=1097.84, - tax_amount=5308.6, + quantity=3233.65, + sub_total=8161.51, + tax_amount=6746.83, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6063.08, - id='1baa0fe1-ade0-408e-af8c-5f350d8cdb5a', - name='Michele Bode II', + effective_tax_rate=9114.51, + id='a4c506a8-aa94-4c02-a44c-f5e9d9a4578a', + name='Edmund Boyle', ), - total_amount=2213.96, + total_amount=3857.39, tracking=shared.BillCreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='10421813-d520-48ec-a7e2-53b668451c6c', - name='Mrs. Kate Cronin', + id='0dec001a-c802-4e2e-809f-f8f0f816ff34', + name='Mrs. Pearl Rosenbaum', ), ], customer_ref=shared.CustomerRef( - company_name='quasi', - id='6deab3fe-c957-48a6-8584-273a8418d162', + company_name='excepturi', + id='02c14125-b096-40a6-a815-1a472af923c5', ), - is_billed_to=shared.BilledToTypeEnum.UNKNOWN, - is_rebilled_to=shared.BilledToTypeEnum.UNKNOWN, + is_billed_to=shared.BilledToType.CUSTOMER, + is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='9fb09299-21ae-4fb9-b58c-4d86e68e4be0', - name='Mrs. Gina Abbott', + id='9f83f350-cf87-46ff-b901-c6ecbb4e243c', + name='Claude Kutch', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='9da757a5-9ecf-4ef6-aef1-caa3383c2beb', - name='Glenda Kling', + id='afeda53e-5ae6-4e0a-8184-c2b9c247c883', + name='Grace Padberg PhD', + ), + shared.TrackingCategoryRef( + id='1942f32e-5505-4575-af5d-56d0bd0af2df', + name='Joe Fisher', ), shared.TrackingCategoryRef( - id='3c8d72f6-4d1d-4b1f-ac43-10661e96349e', - name='Pat Wolf', + id='4f62cba3-f894-41ae-bc0b-80a6924d3b2e', + name='Van Schiller', + ), + shared.TrackingCategoryRef( + id='f895010f-5dd3-4d6f-a180-4e54c82f168a', + name='Vicki Feeney', ), ], - unit_amount=26.77, + unit_amount=5277.15, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='nisi', + modified_date='ducimus', note='Bill Credit Note with 1 line items, totaling 805.78', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='velit', - currency='laborum', - currency_rate=2503.98, - total_amount=2244.67, + allocated_on_date='recusandae', + currency='tempora', + currency_rate=5034.49, + total_amount=2580.59, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='7000ae6b-6bc9-4b8f-b59e-ac55a9741d31', - name='Florence Hand', + id='380b1f6b-8ca2-475a-a0a0-4c495cc69917', + name='Miss Juana Hilpert MD', ), - currency='ex', - currency_rate=3676.26, - id='bb8a7202-6114-435e-939d-bc2259b1abda', - note='quos', - paid_on_date='placeat', - reference='sit', - total_amount=4793.85, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='ipsa', - currency='voluptates', - currency_rate=800.61, - total_amount=493.48, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='84cb0672-d1ad-4879-aeb9-665b85efbd02', - name='Miss Grant VonRueden', - ), - currency='eos', - currency_rate=8448.54, - id='782259e3-ea4b-4519-bf92-443da7ce52b8', - note='cupiditate', - paid_on_date='minima', - reference='placeat', - total_amount=3165.42, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='neque', - currency='in', - currency_rate=7963.97, - total_amount=4330.77, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='454efb0b-3489-46c3-8a5a-cfbe2fd57075', - name='Dora Mante', - ), - currency='veritatis', - currency_rate=4981.8, - id='7deac646-ecb5-4734-89e3-eb1e5a2b12eb', - note='ipsa', - paid_on_date='ducimus', - reference='maiores', - total_amount=873.82, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='quasi', - currency='laboriosam', - currency_rate=8634.71, - total_amount=7294.48, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='99545fc9-5fa8-4897-8e18-9dbb30fcb33e', - name='Anthony Hayes', - ), - currency='architecto', - currency_rate=5845.93, - id='7cd44e2f-52d8-42d3-913b-b6f48b656bcd', - note='facilis', - paid_on_date='ipsum', - reference='ad', - total_amount=9738.19, + currency='facere', + currency_rate=7079.83, + id='1cf4b888-ebdf-4c4c-8ca9-9bc7fc0b2dce', + note='veritatis', + paid_on_date='aut', + reference='laudantium', + total_amount=4804.21, ), ), ], - remaining_credit=9745.89, - source_modified_date='consequuntur', - status=shared.BillCreditNoteStatusEnum.PAID, + remaining_credit=2198.6, + source_modified_date='voluptates', + status=shared.BillCreditNoteStatus.PAID, sub_total=805.78, supplemental_data=shared.SupplementalData( content={ - "labore": { - "eos": 'reprehenderit', - "nostrum": 'neque', - "iusto": 'est', - }, - "rem": { - "fugiat": 'unde', - "officiis": 'ducimus', - "dolor": 'dicta', - "error": 'porro', - }, - "vitae": { - "esse": 'fugiat', - "ad": 'aspernatur', + "magni": { + "doloremque": 'voluptatem', + "eum": 'at', + "eum": 'reprehenderit', }, - "enim": { - "iusto": 'dignissimos', - "libero": 'illo', - "ab": 'incidunt', - "accusamus": 'saepe', + "voluptatum": { + "nihil": 'atque', + "rerum": 'deserunt', + "atque": 'nostrum', }, }, ), supplier_ref=shared.SupplierRef( - id='b52ff785-fc37-4814-94c9-8e0c2bb89eb7', - supplier_name='corporis', + id='81a58208-c54f-4efa-9c95-f2eac5565d30', + supplier_name='odio', ), total_amount=805.78, - total_discount=8738.33, - total_tax_amount=6293.77, + total_discount=7943.06, + total_tax_amount=9903.69, withholding_tax=[ shared.WithholdingTaxitems( - amount=4348.27, - name='Gertrude Russel Jr.', + amount=9121.51, + name='Mrs. Samuel Considine', ), shared.WithholdingTaxitems( - amount=3228.29, - name='Wendy Stanton', + amount=1489.75, + name='Ralph Dooley', ), shared.WithholdingTaxitems( - amount=7368.53, - name='Joyce Carroll DVM', + amount=3034.21, + name='Edwin Cartwright', ), shared.WithholdingTaxitems( - amount=4797.07, - name='Shelly Pagac', + amount=5283.2, + name='Cristina Ebert', ), ], ), - bill_credit_note_id='repudiandae', + bill_credit_note_id='inventore', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - timeout_in_minutes=10063, + timeout_in_minutes=193236, ) res = s.bill_credit_notes.update(req) diff --git a/accounting/docs/billpayments/README.md b/accounting/docs/billpayments/README.md index 8f26dce50..393334938 100755 --- a/accounting/docs/billpayments/README.md +++ b/accounting/docs/billpayments/README.md @@ -14,13 +14,13 @@ Bill payments ## create -Posts a new bill payment to the accounting package for a given company. +Posts a new bill payment to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create bill payment model](https://docs.codat.io/accounting-api#/operations/get-create-billPayments-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating bill payments. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating bill payments. ### Example Usage @@ -34,75 +34,110 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateBillPaymentRequest( bill_payment=shared.BillPayment( account_ref=shared.AccountRef( - id='57eb809e-2810-4331-b398-1d4c700b607f', - name='Francis McKenzie', + id='2af03102-d514-4f4c-86f1-8bf9621a6a4f', + name='Tamara O'Kon', ), - currency='dignissimos', - currency_rate=2358.34, - date_='soluta', + currency='eveniet', + currency_rate=9351.61, + date_='velit', id='3d5a8e00-d108-4045-8823-7f342676cffa', lines=[ shared.BillPaymentLine( - allocated_on_date='temporibus', - amount=6396.22, + allocated_on_date='eius', + amount=7019.78, links=[ shared.BillPaymentLineLink( - amount=9485.41, - currency_rate=1339.49, - id='ceda7e23-f225-4741-9faf-4b7544e472e8', - type=shared.BillPaymentLineLinkTypeEnum.UNKNOWN, + amount=4896.85, + currency_rate=3734.49, + id='2c65b344-18e3-4bb9-9c8d-975e0e8419d8', + type=shared.BillPaymentLineLinkType.DISCOUNT, + ), + shared.BillPaymentLineLink( + amount=5379.46, + currency_rate=2649.58, + id='f144f3e0-7edc-4c4a-a5f3-cabd905a972e', + type=shared.BillPaymentLineLinkType.UNKNOWN, + ), + shared.BillPaymentLineLink( + amount=3214.73, + currency_rate=3927.52, + id='728227b2-d309-4470-bf7a-4fa87cf535a6', + type=shared.BillPaymentLineLinkType.DISCOUNT, + ), + shared.BillPaymentLineLink( + amount=6578.62, + currency_rate=9259.94, + id='54ebf60c-321f-4023-b75d-2367fe1a0cc8', + type=shared.BillPaymentLineLinkType.MANUAL_JOURNAL, ), ], ), shared.BillPaymentLine( - allocated_on_date='odit', - amount=5358.02, + allocated_on_date='maiores', + amount=4857.95, links=[ shared.BillPaymentLineLink( - amount=4527.3, - currency_rate=6267.07, - id='5b40463a-7d57-45f1-800e-764ad7334ec1', - type=shared.BillPaymentLineLinkTypeEnum.REFUND, + amount=9609.33, + currency_rate=455.1, + id='a396d90c-364b-47c1-9dfb-ace188b1c4ee', + type=shared.BillPaymentLineLinkType.UNLINKED, ), shared.BillPaymentLineLink( - amount=4813.75, - currency_rate=5580.51, - id='1b36a080-88d1-400e-bada-200ef0422eb2', - type=shared.BillPaymentLineLinkTypeEnum.UNLINKED, + amount=7726.28, + currency_rate=5582.83, + id='c6ce611f-eeb1-4c7c-bdb6-eec74378ba25', + type=shared.BillPaymentLineLinkType.UNLINKED, + ), + shared.BillPaymentLineLink( + amount=1068.06, + currency_rate=4810.42, + id='747dc915-ad2c-4af5-9d67-23dc0f5ae2f3', + type=shared.BillPaymentLineLinkType.PAYMENT_ON_ACCOUNT, ), ], ), shared.BillPaymentLine( - allocated_on_date='aliquid', - amount=2646.49, + allocated_on_date='suscipit', + amount=6886.49, links=[ shared.BillPaymentLineLink( - amount=9750.95, - currency_rate=5629.48, - id='ab8366c7-23ff-4da9-a06b-ee4825c1fc0e', - type=shared.BillPaymentLineLinkTypeEnum.UNLINKED, + amount=424.54, + currency_rate=201.41, + id='87875614-3f5a-46c9-8b55-554080d40bca', + type=shared.BillPaymentLineLinkType.REFUND, ), shared.BillPaymentLineLink( - amount=1002.51, - currency_rate=3178.98, - id='c80bff91-8544-4ec4-adef-cce8f1977773', - type=shared.BillPaymentLineLinkTypeEnum.MANUAL_JOURNAL, + amount=7697.89, + currency_rate=3947.24, + id='cbd6b5f3-ec90-4930-8f92-6bad2553819b', + type=shared.BillPaymentLineLinkType.BILL, ), + ], + ), + shared.BillPaymentLine( + allocated_on_date='voluptate', + amount=2611.7, + links=[ shared.BillPaymentLineLink( - amount=4235.88, - currency_rate=2086.83, - id='562a7b40-8f05-4e3d-88fd-af313a1f5fd9', - type=shared.BillPaymentLineLinkTypeEnum.BILL, + amount=463.84, + currency_rate=9154.08, + id='d20e5624-8fff-4639-a910-abdcab626766', + type=shared.BillPaymentLineLinkType.BILL_PAYMENT, ), shared.BillPaymentLineLink( - amount=1280.21, - currency_rate=3684.91, - id='9c0b36f2-5ea9-444f-bb75-6c11f6c37a51', - type=shared.BillPaymentLineLinkTypeEnum.UNLINKED, + amount=3857.6, + currency_rate=8815.68, + id='1ec00221-b335-4d89-acb3-ecfda8d0c549', + type=shared.BillPaymentLineLinkType.MANUAL_JOURNAL, + ), + shared.BillPaymentLineLink( + amount=9380.94, + currency_rate=427.63, + id='3004978a-61fa-41cf-a068-8f77c1ffc71d', + type=shared.BillPaymentLineLinkType.MANUAL_JOURNAL, ), ], ), @@ -110,30 +145,30 @@ req = operations.CreateBillPaymentRequest( metadata=shared.Metadata( is_deleted=False, ), - modified_date='aliquid', + modified_date='fuga', note='Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44', payment_method_ref=shared.PaymentMethodRef( - id='243835bb-c05a-423a-85ce-fc5fde10a0ce', - name='Mildred Kautzer', + id='163f2a3c-80a9-47ff-b34c-ddf857a9e618', + name='Tonya Sauer', ), - reference='ullam', - source_modified_date='architecto', + reference='quidem', + source_modified_date='explicabo', supplemental_data=shared.SupplementalData( content={ - "perferendis": { - "provident": 'cumque', + "nulla": { + "natus": 'illum', }, }, ), supplier_ref=shared.SupplierRef( - id='6dc5e347-6279-49bf-bbe6-949fb2bb4eca', - supplier_name='saepe', + id='fc94d6fe-cd79-4939-8066-a6d2d0003553', + supplier_name='ratione', ), total_amount=1329.54, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=423054, + timeout_in_minutes=555386, ) res = s.bill_payments.create(req) @@ -144,11 +179,30 @@ if res.create_bill_payment_response is not None: ## delete -Deletes a bill payment from the accounting package for a given company. +The _Delete Bill Payments_ endpoint allows you to delete a specified Bill Payment from an accounting platform. + +### Process +1. Pass the `{billPaymentId}` to the _Delete Bill Payments_ 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](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-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/how-deleting-bill-payments-works) to learn more. | > **Supported Integrations** -> -> This functionality is currently only supported for our Oracle NetSuite integration. 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. +> +> 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 @@ -162,11 +216,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DeleteBillPaymentRequest( - bill_payment_id='quo', - company_id='nesciunt', - connection_id='illum', + bill_payment_id='maxime', + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) res = s.bill_payments.delete(req) @@ -177,7 +230,7 @@ if res.push_operation_summary is not None: ## get -Get a bill payment +Get a bill payment. ### Example Usage @@ -191,9 +244,8 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetBillPaymentsRequest( - bill_payment_id='nemo', + bill_payment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -205,11 +257,11 @@ if res.bill_payment is not None: ## get_create_model -Get create bill payment model. +Get create bill payment model. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating and deleting bill payments. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating and deleting bill payments. ### Example Usage @@ -223,7 +275,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateBillPaymentsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -237,7 +288,7 @@ if res.push_option is not None: ## list -Gets the latest billPayments for a company, with pagination +Gets the latest billPayments for a company, with pagination. ### Example Usage @@ -251,13 +302,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListBillPaymentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='illum', + query='recusandae', ) res = s.bill_payments.list(req) diff --git a/accounting/docs/bills/README.md b/accounting/docs/bills/README.md index 04a4538ac..52eedc5b9 100755 --- a/accounting/docs/bills/README.md +++ b/accounting/docs/bills/README.md @@ -19,13 +19,13 @@ Bills ## create -Posts a new bill to the accounting package for a given company. +Posts a new bill to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/accounting-api#/operations/get-create-update-bills-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. ### Example Usage @@ -39,269 +39,299 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateBillRequest( bill=shared.Bill( - amount_due=7068.72, - currency='non', - currency_rate=6495.34, - due_date='assumenda', - id='ebd5daea-4c50-46a8-aa94-c02644cf5e9d', - issue_date='error', + amount_due=7674.66, + currency='doloremque', + currency_rate=5168.33, + due_date='iure', + id='fa21e915-2cb3-4119-967b-8e3c8db03408', + issue_date='repellendus', line_items=[ shared.BillLineItem( account_ref=shared.AccountRef( - id='4578adc1-ac60-40de-8001-ac802e2ec09f', - name='Dr. Armando Wunsch', + id='d364ffd4-5590-46d1-a63d-48e935c2c9e8', + name='Miss Jeannie Emmerich', ), - description='dicta', - discount_amount=3805.95, - discount_percentage=9382.57, + description='sequi', + discount_amount=9258.47, + discount_percentage=2863.29, is_direct_cost=False, item_ref=shared.ItemRef( - id='f3477c13-e902-4c14-925b-0960a668151a', - name='Constance Dach', + id='3202d721-6576-4506-a418-70d9d21f9ad0', + name='Sharon Ruecker', ), - quantity=6095.37, - sub_total=1512.3, - tax_amount=2009.5, + quantity=7639.37, + sub_total=8061.24, + tax_amount=922.64, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8054.63, - id='5949f83f-350c-4f87-affb-901c6ecbb4e2', - name='Lillian Rosenbaum', + effective_tax_rate=1073.01, + id='a0836429-068b-4850-aa55-e7f73bc845e3', + name='Helen O'Reilly V', ), - total_amount=5000.21, + total_amount=9738.94, tracking=shared.Propertiestracking( category_refs=[ shared.TrackingCategoryRef( - id='ffafeda5-3e5a-4e6e-8ac1-84c2b9c247c8', - name='Allen Kozey', - ), - shared.TrackingCategoryRef( - id='40e1942f-32e5-4505-9756-f5d56d0bd0af', - name='Elena Zieme I', + id='badf947c-9a86-47bc-8242-6665816ddca8', + name='Dr. Emilio Hilll', ), shared.TrackingCategoryRef( - id='db4f62cb-a3f8-4941-aebc-0b80a6924d3b', - name='Eloise Rowe', + id='b4c593ec-12cd-4aad-8ec7-afedbd80df44', + name='Otis Greenholt', ), ], customer_ref=shared.CustomerRef( - company_name='quo', - id='8f895010-f5dd-43d6-ba18-04e54c82f168', + company_name='iste', + id='390c5888-0983-4dab-b9ef-3ffdd9f7f079', ), - is_billed_to=shared.BilledToTypeEnum.CUSTOMER, - is_rebilled_to=shared.BilledToTypeEnum.UNKNOWN, + is_billed_to=shared.BilledToType.CUSTOMER, + is_rebilled_to=shared.BilledToType.PROJECT, project_ref=shared.ProjectRef( - id='63c8873e-4843-480b-9f6b-8ca275a60a04', - name='Jay Morar', + id='4d35724c-db0f-44d2-8118-7d56844eded8', + name='Ms. Madeline Miller', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='699171b5-1c1b-4db1-8f4b-888ebdfc4ccc', - name='Marshall McClure', + id='628bdfc2-032b-46c8-b992-3b7e13584f7a', + name='Carl Davis', ), shared.TrackingCategoryRef( - id='7fc0b2dc-e108-473e-82b0-06d678878ba8', - name='Kay Bradtke', + id='891f82ce-1157-4172-b053-77dcfa89df97', + name='Tasha Dickinson', ), shared.TrackingCategoryRef( - id='8208c54f-efa9-4c95-b2ea-c5565d307cfe', - name='Hugh Carroll III', + id='686092e9-c3dd-4c5f-911d-ea1026d541a4', + name='Dr. Terry Mohr', ), shared.TrackingCategoryRef( - id='e2813fa4-a41c-4480-93f2-132af03102d5', - name='Danielle Willms', + id='b21780bc-cc0d-4bbd-9b48-4708fb4e391e', + name='Mrs. Susie Schowalter', ), ], - unit_amount=7505.37, + unit_amount=7803.7, ), shared.BillLineItem( account_ref=shared.AccountRef( - id='6f18bf96-21a6-4a4f-b7a8-7ee3e4be752c', - name='Beatrice Purdy', + id='4c4e5459-9ea3-4422-a0e9-b200ce78a1bd', + name='Cary Predovic', ), - description='quaerat', - discount_amount=1039.88, - discount_percentage=5069.66, + description='doloremque', + discount_amount=6813.36, + discount_percentage=1175.46, is_direct_cost=False, item_ref=shared.ItemRef( - id='e3bb91c8-d975-4e0e-8419-d8f84f144f3e', - name='Joy Toy', + id='16ce723d-4097-4fa3-8e9a-f725b2912203', + name='Hope Lemke', ), - quantity=7690.47, - sub_total=3028.78, - tax_amount=6778.95, + quantity=3564.85, + sub_total=6442.99, + tax_amount=9319.53, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6448.27, - id='5f3cabd9-05a9-472e-8567-28227b2d3094', - name='Sharon Raynor', + effective_tax_rate=7143, + id='7799d22e-8c1f-4849-b825-fdc42c876c2c', + name='Marcella Windler', ), - total_amount=6671.69, + total_amount=7579.62, tracking=shared.Propertiestracking( category_refs=[ shared.TrackingCategoryRef( - id='fa87cf53-5a6f-4ae5-8ebf-60c321f023b7', - name='Paulette Dibbert', + id='c1c76230-f841-4fb1-bd23-fdb14db6be5a', + name='Lena Herzog', ), shared.TrackingCategoryRef( - id='7fe1a0cc-8df7-49f0-a396-d90c364b7c15', - name='Emilio Rau', - ), - ], - customer_ref=shared.CustomerRef( - company_name='accusamus', - id='188b1c4e-e2c8-4c6c-a611-feeb1c7cbdb6', - ), - is_billed_to=shared.BilledToTypeEnum.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum.PROJECT, - project_ref=shared.ProjectRef( - id='c74378ba-2531-4774-bdc9-15ad2caf5dd6', - name='Judith Feest', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='f5ae2f3a-6b70-4087-8756-143f5a6c98b5', - name='Holly Harber V', - ), - ], - unit_amount=408.74, - ), - shared.BillLineItem( - account_ref=shared.AccountRef( - id='d40bcacc-6cbd-46b5-b3ec-909304f926ba', - name='Wayne Hintz', - ), - description='voluptatum', - discount_amount=987.59, - discount_percentage=6225.66, - is_direct_cost=False, - item_ref=shared.ItemRef( - id='b474b0ed-20e5-4624-8fff-639a910abdca', - name='Edgar Corkery', - ), - quantity=3931.22, - sub_total=3971.6, - tax_amount=5897.12, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=3857.6, - id='e1ec0022-1b33-45d8-9acb-3ecfda8d0c54', - name='Mrs. Hugo Wehner Jr.', - ), - total_amount=2737.32, - tracking=shared.Propertiestracking( - category_refs=[ - shared.TrackingCategoryRef( - id='78a61fa1-cf20-4688-b77c-1ffc71dca163', - name='Aaron O'Kon', + id='8e22ae20-da16-4fc2-b271-a289c57e854e', + name='Jeffrey Gutmann', ), shared.TrackingCategoryRef( - id='80a97ff3-34cd-4df8-97a9-e61876c6ab21', - name='Victor Mosciski', + id='d2224656-9462-4407-884f-7ab37cef0222', + name='Jean Mayert', ), shared.TrackingCategoryRef( - id='c94d6fec-d799-4390-866a-6d2d00035533', - name='Wilbert Walsh IV', + id='b55410ad-c669-4af9-8a26-c7cdc981f068', + name='Johnnie Berge', ), ], customer_ref=shared.CustomerRef( - company_name='iure', - id='fa21e915-2cb3-4119-967b-8e3c8db03408', + company_name='libero', + id='b33cfaa3-48c3-41bf-807e-e4fcf0c42b78', ), - is_billed_to=shared.BilledToTypeEnum.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum.NOT_APPLICABLE, + is_billed_to=shared.BilledToType.PROJECT, + is_rebilled_to=shared.BilledToType.UNKNOWN, project_ref=shared.ProjectRef( - id='d364ffd4-5590-46d1-a63d-48e935c2c9e8', - name='Miss Jeannie Emmerich', + id='5626398a-0dc7-4663-a4cc-b06c8ca12d02', + name='Judy Mertz', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='e43202d7-2165-4765-8664-1870d9d21f9a', - name='Miss Michael Ferry', + id='b8d5722d-d895-4b8b-8f24-db959693352f', + name='Joanne Hermiston', ), ], - unit_amount=8907.65, + unit_amount=5831.38, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='cumque', - note='maxime', + modified_date='occaecati', + note='numquam', payment_allocations=[ shared.BillPaymentAllocation( allocation=shared.BillPaymentAllocationAllocation( - allocated_on_date='beatae', - currency='id', - currency_rate=90.6, - total_amount=5515.76, + allocated_on_date='molestiae', + currency='quas', + currency_rate=8341.77, + total_amount=9065.24, + ), + payment=shared.PaymentAllocationPayment( + account_ref=shared.AccountRef( + id='3b6e9389-f5ab-4b7f-a625-50a28382ac48', + name='Monique Wisoky', + ), + currency='consectetur', + currency_rate=809.98, + id='5bba6501-64e0-46f5-bf6a-e591bc8bdef3', + note='commodi', + paid_on_date='vitae', + reference='fugit', + total_amount=7240.73, + ), + ), + shared.BillPaymentAllocation( + allocation=shared.BillPaymentAllocationAllocation( + allocated_on_date='ex', + currency='neque', + currency_rate=7977.12, + total_amount=1761.04, + ), + payment=shared.PaymentAllocationPayment( + account_ref=shared.AccountRef( + id='05fda840-774a-468a-9a35-d086b6f66fef', + name='Tammy Bartoletti', + ), + currency='maiores', + currency_rate=3114.49, + id='43b4257b-992c-48db-9a6a-61efa2198258', + note='doloribus', + paid_on_date='pariatur', + reference='aut', + total_amount=6302.86, + ), + ), + shared.BillPaymentAllocation( + allocation=shared.BillPaymentAllocationAllocation( + allocated_on_date='iste', + currency='eveniet', + currency_rate=7236.23, + total_amount=6585.44, + ), + payment=shared.PaymentAllocationPayment( + account_ref=shared.AccountRef( + id='47f7d3ef-0496-440d-aa18-31c87adf596f', + name='Winston Bergstrom', + ), + currency='praesentium', + currency_rate=2053.9, + id='7ae80c1c-19c9-45ba-9986-78fa3f696991', + note='fuga', + paid_on_date='a', + reference='dolor', + total_amount=5280.82, + ), + ), + shared.BillPaymentAllocation( + allocation=shared.BillPaymentAllocationAllocation( + allocated_on_date='molestias', + currency='quod', + currency_rate=9203.89, + total_amount=502.91, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='36429068-b850-42a5-9e7f-73bc845e320a', - name='Christine Mueller', + id='3614448c-7977-4a0e-b2f5-36028efeef93', + name='Kathleen Harris', ), - currency='rerum', - currency_rate=6786.95, - id='df947c9a-867b-4c42-8266-65816ddca8ef', - note='nemo', - paid_on_date='illo', - reference='doloribus', - total_amount=7666.7, + currency='possimus', + currency_rate=4917.84, + id='e253f4c1-57de-4aa7-970f-445accf667aa', + note='repellat', + paid_on_date='cupiditate', + reference='soluta', + total_amount=7332.26, ), ), ], purchase_order_refs=[ shared.PurchaseOrderRef( - id='4c593ec1-2cda-4ad0-ac7a-fedbd80df448', - purchase_order_number='similique', + id='d185fe43-1d6b-4f5c-838f-bb8c20cb67fc', + purchase_order_number='ut', ), shared.PurchaseOrderRef( - id='47f9390c-5888-4098-bdab-f9ef3ffdd9f7', - purchase_order_number='voluptatibus', + id='b425e99e-6234-4c9f-bb79-dfeb77a5c38d', + purchase_order_number='dolore', ), shared.PurchaseOrderRef( - id='079af4d3-5724-4cdb-8f4d-281187d56844', - purchase_order_number='accusamus', + id='baf91e50-6ef8-490a-94b4-75f16f56d385', + purchase_order_number='fuga', ), ], - reference='nulla', - source_modified_date='repudiandae', - status=shared.BillStatusEnum.DRAFT, - sub_total=5057.99, + reference='sequi', + source_modified_date='maxime', + status=shared.BillStatus.OPEN, + sub_total=6714.28, supplemental_data=shared.BillSupplementalData( content={ - "animi": { - "quae": 'eum', - "nostrum": 'eveniet', - "laboriosam": 'ratione', + "autem": { + "sunt": 'rerum', + }, + "occaecati": { + "necessitatibus": 'fugit', + "autem": 'optio', + "eveniet": 'fugiat', }, "blanditiis": { - "illum": 'reiciendis', - "placeat": 'dolores', - "consequatur": 'nesciunt', + "natus": 'sapiente', + "repellendus": 'facilis', + "molestias": 'dolore', + "et": 'accusantium', + }, + "maiores": { + "velit": 'tempore', + "expedita": 'hic', }, }, ), supplier_ref=shared.SupplierRef( - id='2b6c8799-23b7-4e13-984f-7ae12c6891f8', - supplier_name='aspernatur', + id='817837b0-1afd-4d78-8624-189eb44873f5', + supplier_name='accusantium', ), - tax_amount=7552.4, - total_amount=9178.77, + tax_amount=1902.6, + total_amount=2358.13, withholding_tax=[ shared.BillWithholdingTax( - amount=810.53, - name='Heidi Bode', + amount=1030.53, + name='Rufus Reynolds Sr.', + ), + shared.BillWithholdingTax( + amount=3661.17, + name='Mrs. Darrel Grant', + ), + shared.BillWithholdingTax( + amount=9298.49, + name='Damon Mueller', + ), + shared.BillWithholdingTax( + amount=4547.61, + name='Warren Conroy', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=209602, + timeout_in_minutes=625378, ) res = s.bills.create(req) @@ -312,11 +342,32 @@ if res.create_bill_response is not None: ## delete -Deletes a bill from the accounting package for a given company. +The _Delete Bills_ endpoint allows you to delete a specified Bill from an accounting platform. + +### Process +1. Pass the `{billId}` to the _Delete Bills_ 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](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-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 Oracle NetSuite and QuickBooks Online 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. +> 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 @@ -330,7 +381,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DeleteBillRequest( bill_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -345,7 +395,7 @@ if res.push_operation_summary is not None: ## download_attachment -Download bill attachment +Download bill attachment. ### Example Usage @@ -359,7 +409,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DownloadBillAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', bill_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -375,7 +424,7 @@ if res.data is not None: ## get -Get bill +Get a bill. ### Example Usage @@ -389,7 +438,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetBillRequest( bill_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -403,7 +451,7 @@ if res.bill is not None: ## get_attachment -Get bill attachment +Get bill attachment. ### Example Usage @@ -417,7 +465,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetBillAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', bill_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -433,11 +480,11 @@ if res.attachment is not None: ## get_create_update_model -Get create/update bill model. +Get create/update bill model. - > **Supported Integrations** +> **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. ### Example Usage @@ -451,7 +498,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateBillsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -465,7 +511,7 @@ if res.push_option is not None: ## list -Gets the latest bills for a company, with pagination +Gets the latest bills for a company, with pagination. ### Example Usage @@ -479,13 +525,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListBillsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='eaque', + query='vel', ) res = s.bills.list(req) @@ -496,7 +541,7 @@ if res.bills is not None: ## list_attachments -List bill attachments +List bill attachments. ### Example Usage @@ -510,7 +555,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListBillAttachmentsRequest( bill_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -525,13 +569,13 @@ if res.attachments_dataset is not None: ## update -Posts an updated bill to the accounting package for a given company. +Posts an updated bill to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/accounting-api#/operations/get-create-update-bills-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support updating a bill. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support updating a bill. ### Example Usage @@ -545,232 +589,371 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateBillRequest( bill=shared.Bill( - amount_due=3474.6, - currency='amet', - currency_rate=4541.65, - due_date='voluptate', - id='dcfa89df-975e-4356-a860-92e9c3ddc5f1', - issue_date='vitae', + amount_due=6798.35, + currency='alias', + currency_rate=9303.98, + due_date='ab', + id='23b7847e-c59e-41f6-bf3c-4cce4b6d7696', + issue_date='repellat', line_items=[ shared.BillLineItem( account_ref=shared.AccountRef( - id='dea1026d-541a-44d1-90fe-b21780bccc0d', - name='Kelvin Shanahan', + id='3c574750-1357-4e44-b51f-8b084c3197e1', + name='Glenn Nolan', ), - description='magnam', - discount_amount=5123.49, - discount_percentage=2726.35, + description='corporis', + discount_amount=3088.66, + discount_percentage=3816.39, is_direct_cost=False, item_ref=shared.ItemRef( - id='708fb4e3-91e6-4bc1-98c4-c4e54599ea34', - name='Dr. Rose Hoeger', + id='7f94874c-2d5c-4c49-b223-3e66bd8fe5d0', + name='Jeannette Mante', ), - quantity=7495.37, - sub_total=1861.3, - tax_amount=374.77, + quantity=8874.22, + sub_total=9615.76, + tax_amount=1692.29, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=92.48, - id='ce78a1bd-8fb7-4a0a-916c-e723d4097fa3', - name='Alyssa Morar', + effective_tax_rate=232.36, + id='38732059-0ccc-4109-a400-313b3e5044f6', + name='Shawna Trantow', ), - total_amount=4974.8, + total_amount=8248.61, tracking=shared.Propertiestracking( category_refs=[ shared.TrackingCategoryRef( - id='5b291220-30d8-43f5-aeb7-799d22e8c1f8', - name='Erika Farrell III', + id='4077d0cc-3f40-48ef-815c-eb4d6e1eae0f', + name='Sally Paucek', + ), + shared.TrackingCategoryRef( + id='f2acab58-b991-4c92-addb-589461e7421c', + name='Rolando Jerde', + ), + shared.TrackingCategoryRef( + id='502f0ea9-30b6-49f7-ac2f-72f885009049', + name='Ms. Carolyn Jacobson', + ), + shared.TrackingCategoryRef( + id='07888ec6-6183-4bfe-9659-eb40ec16faf7', + name='Olivia Auer', ), ], customer_ref=shared.CustomerRef( - company_name='delectus', - id='dc42c876-c2c2-4dfb-8cfc-1c76230f841f', + company_name='ratione', + id='2a4da37c-baaf-4445-ac48-42c9b2ad32da', ), - is_billed_to=shared.BilledToTypeEnum.CUSTOMER, - is_rebilled_to=shared.BilledToTypeEnum.UNKNOWN, + is_billed_to=shared.BilledToType.PROJECT, + is_rebilled_to=shared.BilledToType.PROJECT, project_ref=shared.ProjectRef( - id='bd23fdb1-4db6-4be5-a685-998e22ae20da', - name='Lucy Wilkinson', + id='81a88f44-4457-43fe-8d47-353f63c82093', + name='Geneva Oberbrunner', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='271a289c-57e8-454e-9043-9d2224656946', - name='Juanita Batz IV', + id='cd5fbcf7-9da1-48a7-822b-f95894e6861a', + name='Marco Hermann', ), shared.TrackingCategoryRef( - id='4f7ab37c-ef02-4225-994d-b55410adc669', - name='Miss Cary McKenzie', + id='9e5d751c-9fe8-4f75-82bf-dc3450841f17', + name='Eleanor Gibson', ), shared.TrackingCategoryRef( - id='6c7cdc98-1f06-4898-9d6b-b33cfaa348c3', - name='Antoinette Wolf IV', + id='379f3fb2-7e21-4f86-a657-b36fc6b9f587', + name='Bert Hand', ), ], - unit_amount=9334.56, + unit_amount=7934.02, ), - ], - metadata=shared.Metadata( - is_deleted=False, - ), - modified_date='necessitatibus', - note='numquam', - payment_allocations=[ - shared.BillPaymentAllocation( - allocation=shared.BillPaymentAllocationAllocation( - allocated_on_date='eligendi', - currency='sapiente', - currency_rate=0.73, - total_amount=7704.67, + shared.BillLineItem( + account_ref=shared.AccountRef( + id='67641a83-12e5-4047-b4c2-1ccb423abcdc', + name='Carl Weimann', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='42b78f15-6263-498a-8dc7-66324ccb06c8', - name='Rex Bode', - ), - currency='sit', - currency_rate=1720.42, - id='529270b8-d572-42dd-895b-8bcf24db9596', - note='provident', - paid_on_date='amet', - reference='dolor', - total_amount=3440.1, + description='distinctio', + discount_amount=8546.46, + discount_percentage=8621.67, + is_direct_cost=False, + item_ref=shared.ItemRef( + id='88e71f6c-4825-42d7-b71e-7fd074009ef8', + name='Carlos Morissette', ), + quantity=717.41, + sub_total=8135.82, + tax_amount=8536.25, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=4986.39, + id='097b5da0-8c57-4fa6-878a-216e19bafeca', + name='Mrs. Kathleen McDermott', + ), + total_amount=5410.46, + tracking=shared.Propertiestracking( + category_refs=[ + shared.TrackingCategoryRef( + id='40b64ff8-ae17-40ef-83b5-f37e4aa86855', + name='Cora Jenkins', + ), + ], + customer_ref=shared.CustomerRef( + company_name='nesciunt', + id='2aa5dcb6-682c-4b70-b8cf-d5fb6e91b9a9', + ), + is_billed_to=shared.BilledToType.PROJECT, + is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, + project_ref=shared.ProjectRef( + id='4846e2c3-309d-4b05-b6d9-e75ca006f539', + name='Miss Krista Bosco', + ), + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='a8bf92f9-7428-4ad9-a9f8-bf8221125359', + name='Joey Labadie', + ), + shared.TrackingCategoryRef( + id='7f7a79cd-72cd-4248-8da2-1729f2ac41ef', + name='Jackie Crist', + ), + ], + unit_amount=1168.07, ), - shared.BillPaymentAllocation( - allocation=shared.BillPaymentAllocationAllocation( - allocated_on_date='qui', - currency='tenetur', - currency_rate=4773.52, - total_amount=2925.71, + shared.BillLineItem( + account_ref=shared.AccountRef( + id='169ac1e4-1d8a-423c-a3e3-4f2dfa4a197f', + name='Betsy Walter', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='533994d7-8de3-4b6e-9389-f5abb7f66255', - name='Monique Denesik', + description='aspernatur', + discount_amount=911.36, + discount_percentage=3687.61, + is_direct_cost=False, + item_ref=shared.ItemRef( + id='1fe17120-9985-43e9-b543-d854439ee224', + name='Kristen Bashirian', + ), + quantity=2107.1, + sub_total=7122.09, + tax_amount=7711.46, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=1027.34, + id='54188c2f-56e8-45da-b832-eabd617c3b0d', + name='Heather Nader', + ), + total_amount=6942.92, + tracking=shared.Propertiestracking( + category_refs=[ + shared.TrackingCategoryRef( + id='01bad870-6d46-4082-bfbd-c41ff5d4e2ae', + name='Ora Purdy', + ), + shared.TrackingCategoryRef( + id='b35d1763-8f1e-4db7-8359-ecc5cb860f8c', + name='Miss Dan Lakin', + ), + shared.TrackingCategoryRef( + id='73810e4f-e444-4729-bcd3-b1dd3bbce247', + name='Karl Jacobs', + ), + shared.TrackingCategoryRef( + id='eff50126-d71c-4ffb-90eb-74b8421953b4', + name='Melody Stoltenberg', + ), + ], + customer_ref=shared.CustomerRef( + company_name='labore', + id='3159d33e-5953-4c00-9139-863aa41e6c31', + ), + is_billed_to=shared.BilledToType.PROJECT, + is_rebilled_to=shared.BilledToType.PROJECT, + project_ref=shared.ProjectRef( + id='2f1fcb51-c9a4-41ff-be9c-bd795ee65e07', + name='Johnnie Schamberger', ), - currency='totam', - currency_rate=1835.04, - id='ac483afd-2315-4bba-a501-64e06f5bf6ae', - note='nemo', - paid_on_date='molestias', - reference='architecto', - total_amount=7112.75, ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='f616ea5c-7164-4193-8b90-f2e09d19d2fc', + name='Faith Mosciski', + ), + shared.TrackingCategoryRef( + id='e105944b-935d-4237-a72f-90849d6aed4a', + name='Earnest Rogahn', + ), + shared.TrackingCategoryRef( + id='37cd9222-c9ff-4574-91aa-bfa2e761f0ca', + name='Meredith Green', + ), + ], + unit_amount=8757.66, ), + shared.BillLineItem( + account_ref=shared.AccountRef( + id='f1031e68-99f0-4c20-81e2-2cd55cc0584a', + name='Lena Goyette', + ), + description='voluptas', + discount_amount=8175.09, + discount_percentage=6079.37, + is_direct_cost=False, + item_ref=shared.ItemRef( + id='71fc820c-65b0-437b-b8e0-cc885187e4de', + name='Leslie Pacocha', + ), + quantity=5461.33, + sub_total=8037.63, + tax_amount=3236.14, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=8450.13, + id='ddb46aa1-cfd6-4d82-8da0-131911296466', + name='Dr. Veronica Runte', + ), + total_amount=932.99, + tracking=shared.Propertiestracking( + category_refs=[ + shared.TrackingCategoryRef( + id='29042f56-9b7a-4ff0-aa22-16cbe071bc16', + name='Rochelle Cormier', + ), + shared.TrackingCategoryRef( + id='a3b084da-9925-47d0-8f40-847a742d8449', + name='Chelsea Reynolds', + ), + shared.TrackingCategoryRef( + id='ecf6b99b-c635-462e-bfdf-55c294c060b0', + name='Janie Bogisich', + ), + shared.TrackingCategoryRef( + id='7764eef6-d0c6-4d6e-99c7-3dd634571509', + name='Nelson Walker', + ), + ], + customer_ref=shared.CustomerRef( + company_name='doloremque', + id='d3c5a1f9-c242-4c7b-a6a1-f30c73df5b67', + ), + is_billed_to=shared.BilledToType.UNKNOWN, + is_rebilled_to=shared.BilledToType.CUSTOMER, + project_ref=shared.ProjectRef( + id='890f42a4-bb43-48d8-9b26-0591d745e3c2', + name='Lorraine Marquardt', + ), + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='3f567e0e-2527-465b-9d62-fcdace1f0121', + name='Bernadette Waelchi', + ), + shared.TrackingCategoryRef( + id='39e8f25c-d0d1-49d9-99f4-39e39266cbd9', + name='Marta Kreiger', + ), + shared.TrackingCategoryRef( + id='2b241136-95d1-4e66-98fc-c4596217c297', + name='Beth Klocko', + ), + shared.TrackingCategoryRef( + id='34254038-bfb5-4971-a981-90557389cedb', + name='Spencer Kirlin', + ), + ], + unit_amount=6340.91, + ), + ], + metadata=shared.Metadata( + is_deleted=False, + ), + modified_date='dolor', + note='occaecati', + payment_allocations=[ shared.BillPaymentAllocation( allocation=shared.BillPaymentAllocationAllocation( - allocated_on_date='quisquam', - currency='praesentium', - currency_rate=7080.75, - total_amount=8264.78, + allocated_on_date='unde', + currency='labore', + currency_rate=8658.06, + total_amount=4269.42, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='ef3612b6-3c20-45fd-a840-774a68a9a35d', - name='Leona Hodkiewicz', + id='6bc2ae48-0632-4b99-94b6-fa2206369828', + name='Vivian Dietrich', ), - currency='maiores', - currency_rate=4120.24, - id='6fef020e-9f44-43b4-a57b-992c8dbda6a6', - note='dicta', - paid_on_date='recusandae', - reference='sapiente', - total_amount=6617.64, + currency='ab', + currency_rate=32.41, + id='006bef49-21ec-4205-bb74-9366ac8ee0f2', + note='libero', + paid_on_date='sapiente', + reference='veritatis', + total_amount=5927.91, ), ), shared.BillPaymentAllocation( allocation=shared.BillPaymentAllocationAllocation( - allocated_on_date='odit', - currency='inventore', - currency_rate=6122.38, - total_amount=5421.87, + allocated_on_date='veniam', + currency='quos', + currency_rate=5216.94, + total_amount=8135.44, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='258fd0a9-eba4-47f7-93ef-049640d6a183', - name='Rosalie Lindgren', + id='40d03f3d-eba2-497b-a3e9-0bc40df868fd', + name='Mrs. Norma Greenholt', ), - currency='temporibus', - currency_rate=9559.13, - id='596fdf1a-d837-4ae8-8c1c-19c95ba99867', - note='voluptatum', - paid_on_date='sapiente', - reference='deserunt', - total_amount=2212.4, + currency='libero', + currency_rate=2213.92, + id='31d492f4-f127-4fb0-a0bf-1f8217978d0a', + note='eligendi', + paid_on_date='impedit', + reference='officia', + total_amount=4850.97, ), ), ], purchase_order_refs=[ shared.PurchaseOrderRef( - id='696991af-388c-4e03-a144-48c7977a0ef2', - purchase_order_number='delectus', - ), - shared.PurchaseOrderRef( - id='536028ef-eef9-4341-92ed-7e253f4c157d', - purchase_order_number='voluptates', - ), - shared.PurchaseOrderRef( - id='aa7170f4-45ac-4cf6-a7aa-f9bbad185fe4', - purchase_order_number='nesciunt', + id='aeb7b702-1a52-4046-b64e-99fb0e67e094', + purchase_order_number='hic', ), shared.PurchaseOrderRef( - id='1d6bf5c8-38fb-4b8c-a0cb-67fc4b425e99', - purchase_order_number='debitis', + id='dfed5540-ef53-4a34-a1b8-fe99731adc05', + purchase_order_number='fugiat', ), ], - reference='laboriosam', - source_modified_date='eos', - status=shared.BillStatusEnum.OPEN, - sub_total=2796.79, + reference='quas', + source_modified_date='quis', + status=shared.BillStatus.VOID, + sub_total=9080.3, supplemental_data=shared.BillSupplementalData( content={ - "occaecati": { - "voluptate": 'tempore', - "in": 'omnis', - "possimus": 'tenetur', - "recusandae": 'expedita', - }, - "iusto": { - "harum": 'ad', - "quod": 'ratione', - }, - "totam": { - "dolore": 'nam', - "officia": 'maiores', - "cupiditate": 'illo', - "saepe": 'enim', - }, - "eaque": { - "eveniet": 'delectus', - "deleniti": 'provident', + "illum": { + "rerum": 'voluptate', + "perferendis": 'maiores', + "harum": 'ratione', + "molestias": 'odio', }, }, ), supplier_ref=shared.SupplierRef( - id='0a54b475-f16f-456d-b85a-3c4ac631b99e', - supplier_name='fugit', + id='4290d336-561e-4ca1-aef8-9451bd76eeeb', + supplier_name='nemo', ), - tax_amount=4188.92, - total_amount=7637.09, + tax_amount=841.54, + total_amount=5623.39, withholding_tax=[ shared.BillWithholdingTax( - amount=8528.73, - name='Tommie Mraz', + amount=2657.73, + name='Dana Bradtke', ), shared.BillWithholdingTax( - amount=7063.71, - name='Dr. Marcus Bosco', + amount=8325.89, + name='Mr. Vivian Harvey', ), shared.BillWithholdingTax( - amount=2458.49, - name='Rudolph Weimann IV', + amount=437.97, + name='Janis Greenholt', ), shared.BillWithholdingTax( - amount=5422.42, - name='Mr. Nellie Reichert', + amount=7217.73, + name='Dr. Louise Will', ), ], ), @@ -778,7 +961,7 @@ req = operations.UpdateBillRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - timeout_in_minutes=990454, + timeout_in_minutes=296127, ) res = s.bills.update(req) @@ -789,7 +972,7 @@ if res.update_bill_response is not None: ## upload_attachment -Upload bill attachment +Upload bill attachment. ### Example Usage @@ -803,11 +986,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UploadBillAttachmentRequest( request_body=operations.UploadBillAttachmentRequestBody( - content='at'.encode(), - request_body='quibusdam', + content='corrupti'.encode(), + request_body='exercitationem', ), bill_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', diff --git a/accounting/docs/companyinfo/README.md b/accounting/docs/companyinfo/README.md index 206b74718..bb18d89cc 100755 --- a/accounting/docs/companyinfo/README.md +++ b/accounting/docs/companyinfo/README.md @@ -25,7 +25,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCompanyInfoRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -52,7 +51,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.RefreshCompanyInfoRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) diff --git a/accounting/docs/creditnotes/README.md b/accounting/docs/creditnotes/README.md index 3c34662c6..61667d329 100755 --- a/accounting/docs/creditnotes/README.md +++ b/accounting/docs/creditnotes/README.md @@ -14,14 +14,14 @@ Credit notes ## create -Push credit note +Push credit note Required data may vary by integration. To see what data to post, first call [Get create/update credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-creditNotes-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating a credit note. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating a credit note. ### Example Usage @@ -35,205 +35,260 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateCreditNoteRequest( credit_note=shared.CreditNote( - additional_tax_amount=4618.53, - additional_tax_percentage=5345.09, - allocated_on_date='rem', - credit_note_number='vel', - currency='eos', - currency_rate=2864.64, + additional_tax_amount=4169.63, + additional_tax_percentage=5118.07, + allocated_on_date='est', + credit_note_number='consequatur', + currency='incidunt', + currency_rate=1748.36, customer_ref=shared.CustomerRef( - company_name='sunt', - id='89eb4487-3f50-433f-99db-f125ce4152ea', + company_name='labore', + id='e00a1d6e-b943-4464-9d03-084fbba5ccef', ), - discount_percentage=7125.23, - id='9cd7e522-4a6a-40e1-a3b7-847ec59e1f67', - issue_date='repellat', + discount_percentage=9488.1, + id='5cb01fe5-1e52-48a4-9ac8-2b85f8bc2cab', + issue_date='laborum', line_items=[ shared.CreditNoteLineItem( account_ref=shared.AccountRef( - id='c4cce4b6-d769-46ff-bc57-47501357e44f', - name='Jean Welch', + id='da4127dd-597f-4f47-91aa-1bc74b86cecc', + name='Eva Wolf', ), - description='consequatur', - discount_amount=5167.39, - discount_percentage=2725.18, + description='nam', + discount_amount=2787.91, + discount_percentage=5341.75, is_direct_income=False, item_ref=shared.ItemRef( - id='c3197e19-3a24-4546-bf94-874c2d5cc497', - name='Norma Feest', + id='48bd6a6f-0441-4d2c-bb80-8094373e0604', + name='Velma Rogahn', ), - quantity=4358.41, - sub_total=3961.88, - tax_amount=7385.92, + quantity=7386.39, + sub_total=6653.11, + tax_amount=8566.67, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8537.01, - id='8fe5d00b-979e-4f20-b873-20590ccc1096', - name='Sarah Bartell I', + effective_tax_rate=214.7, + id='2f2586bc-f152-4558-9aa9-5be6cd02756c', + name='Regina Grady', ), - total_amount=6992.15, + total_amount=2877.97, tracking=shared.CreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='e5044f65-fe72-4dc4-877d-0cc3f408efc1', - name='Pat Upton', + id='2b47e176-3c52-408c-a3e9-802d82f0d45e', + name='Ray Pfannerstill', ), ], customer_ref=shared.CustomerRef( - company_name='illum', - id='6e1eae0f-75ae-4df2-acab-58b991c926dd', + company_name='ea', + id='74ee5cfc-18ed-4c7f-b87e-32e04b3d3ed0', ), - is_billed_to=shared.BilledToTypeEnum1.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum1.UNKNOWN, + is_billed_to=shared.BilledToType1.PROJECT, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='89461e74-21cb-4e6d-9502-f0ea930b69f7', - name='Spencer Crooks', + id='670ef42b-d3c9-4f1c-8503-f6c39bcd0a62', + name='Edward Wolf', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='f8850090-4911-4608-a078-88ec66183bfe', - name='Ricardo Hermiston', + id='f385189a-d7ef-4807-aae0-3f33ca79fb9d', + name='Francis Anderson', + ), + shared.TrackingCategoryRef( + id='ba26fd36-8ba9-4216-bcb4-15835c736417', + name='Diana Bogisich', ), ], - unit_amount=6946.11, + unit_amount=9262.29, ), - ], - metadata=shared.Metadata( - is_deleted=False, - ), - modified_date='magnam', - note='doloremque', - payment_allocations=[ - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='quod', - currency='sunt', - currency_rate=3774.3, - total_amount=9382.3, + shared.CreditNoteLineItem( + account_ref=shared.AccountRef( + id='dc046bc5-163b-4bca-8922-7c42c22c5535', + name='Eva McDermott', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='af75b0b5-32a4-4da3-bcba-af4452c4842c', - name='Garry Conn', - ), - currency='ipsum', - currency_rate=1292.7, - id='dafe81a8-8f44-4445-b3fe-cd47353f63c8', - note='sed', - paid_on_date='eaque', - reference='natus', - total_amount=1912.02, + description='quis', + discount_amount=8177.29, + discount_percentage=6963.68, + is_direct_income=False, + item_ref=shared.ItemRef( + id='b3c57c1e-4981-4e8a-a257-ddc1912ebde6', + name='Juana Williamson', ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='nihil', - currency='unde', - currency_rate=6463.21, - total_amount=6621.84, + quantity=3303.58, + sub_total=3003.21, + tax_amount=4362.35, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=6168.21, + id='d4015dfa-7962-406b-af2b-0a3e42c1aa01', + name='Laverne Mante', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='69cd5fbc-f79d-4a18-a782-2bf95894e686', - name='Lynda Schuppe', + total_amount=7755.85, + tracking=shared.CreditNoteLineItemTracking( + category_refs=[ + shared.TrackingCategoryRef( + id='e9135586-d18f-49f9-ba4b-fad2bf7d67ca', + name='Edwin Olson', + ), + ], + customer_ref=shared.CustomerRef( + company_name='unde', + id='b41d6124-3531-4870-8f68-b03ad421bd43', + ), + is_billed_to=shared.BilledToType1.PROJECT, + is_rebilled_to=shared.BilledToType1.UNKNOWN, + project_ref=shared.ProjectRef( + id='f0cb0a00-03eb-422d-9b3a-70d94faa741c', + name='Dr. Lydia Spencer', ), - currency='quaerat', - currency_rate=9830.67, - id='9e5d751c-9fe8-4f75-82bf-dc3450841f17', - note='autem', - paid_on_date='dolore', - reference='eius', - total_amount=3423.93, ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='c2050d38-dc3c-4e18-9472-f9ee69166a8b', + name='Jeff Grimes', + ), + shared.TrackingCategoryRef( + id='eac8b3a2-875c-46c1-be60-6d07d2a9c87a', + name='Herman Barrows III', + ), + shared.TrackingCategoryRef( + id='661a1d91-36a7-4e8d-9321-3f3f658752db', + name='Stacey Haag', + ), + shared.TrackingCategoryRef( + id='9f0a56ce-bcad-4a29-8a79-181c95671663', + name='Miss Tommy Emard', + ), + ], + unit_amount=4263.08, ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='ex', - currency='amet', - currency_rate=4543.86, - total_amount=5653.04, + shared.CreditNoteLineItem( + account_ref=shared.AccountRef( + id='65163a36-3851-42ab-a521-b9f2e072467b', + name='Miss Homer Gislason', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='f3fb27e2-1f86-4265-bb36-fc6b9f587ce5', - name='Audrey Schimmel', + description='sit', + discount_amount=3356.88, + discount_percentage=9426.04, + is_direct_income=False, + item_ref=shared.ItemRef( + id='ab0d650e-df22-4a94-920e-c90ea41d1f46', + name='Jenna Lakin II', + ), + quantity=3916.67, + sub_total=9957.33, + tax_amount=9573.95, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=9524.11, + id='73fdf54f-dd5e-4a95-8339-8dafb42a8d63', + name='Marsha Lueilwitz', + ), + total_amount=8648.87, + tracking=shared.CreditNoteLineItemTracking( + category_refs=[ + shared.TrackingCategoryRef( + id='039ea5f9-b18a-4244-bd61-9039dacd38ed', + name='Krystal Rolfson', + ), + shared.TrackingCategoryRef( + id='1dc7f1e3-af15-4920-890d-1b4901f2bd89', + name='Everett Ondricka', + ), + shared.TrackingCategoryRef( + id='639da5b7-b690-42b8-81a9-4f643664a8f0', + name='Marlon Leffler', + ), + ], + customer_ref=shared.CustomerRef( + company_name='natus', + id='1d732d9f-baf9-4476-a2ae-8dcc50c8a351', + ), + is_billed_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.PROJECT, + project_ref=shared.ProjectRef( + id='73784893-0750-4a00-a966-ec736d431943', + name='Sidney Ruecker', ), - currency='ea', - currency_rate=2569.41, - id='1a8312e5-047b-44c2-9ccb-423abcdc91fa', - note='est', - paid_on_date='distinctio', - reference='fugiat', - total_amount=8621.67, ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='c92398ed-3d3a-4b7c-a3c5-ca8649a70cfd', + name='Freda Johnson', + ), + ], + unit_amount=6125.84, ), + ], + metadata=shared.Metadata( + is_deleted=False, + ), + modified_date='distinctio', + note='in', + payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='totam', - currency='praesentium', - currency_rate=8857.21, - total_amount=4610.94, + allocated_on_date='voluptatem', + currency='voluptas', + currency_rate=2991.8, + total_amount=3189, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='1f6c4825-2d77-471e-bfd0-74009ef8d29d', - name='Raymond Schulist', + id='1077d19e-a83d-4492-ad14-b8a2c1954545', + name='Austin Hermann', ), - currency='aut', - currency_rate=5912.2, - id='7b5da08c-57fa-46c7-8a21-6e19bafeca61', - note='cupiditate', - paid_on_date='veritatis', - reference='aliquam', - total_amount=5682.31, + currency='cumque', + currency_rate=7659, + id='185ea490-1c7c-443a-92da-a784aba3d230', + note='voluptates', + paid_on_date='nulla', + reference='tenetur', + total_amount=4923.66, ), ), ], - remaining_credit=5410.46, - source_modified_date='dicta', - status=shared.CreditNoteStatusEnum.DRAFT, - sub_total=428.84, + remaining_credit=2200.49, + source_modified_date='totam', + status=shared.CreditNoteStatus.UNKNOWN, + sub_total=1147.62, supplemental_data=shared.SupplementalData( content={ - "suscipit": { - "maiores": 'delectus', - "quos": 'id', + "beatae": { + "veniam": 'non', }, - "officiis": { - "voluptate": 'consequatur', + "laudantium": { + "rerum": 'nulla', }, - "itaque": { - "voluptatem": 'dolor', - "distinctio": 'quaerat', - "a": 'neque', - "nihil": 'recusandae', + "ducimus": { + "repellendus": 'enim', + "voluptas": 'veniam', + "voluptatem": 'quam', + "vel": 'aspernatur', }, }, ), - total_amount=2538.55, - total_discount=6520.13, - total_tax_amount=6515.04, + total_amount=850.02, + total_discount=7810.03, + total_tax_amount=3220.54, withholding_tax=[ shared.WithholdingTaxitems( - amount=3819.74, - name='Tim Hamill', + amount=9851.55, + name='Janis Kshlerin', ), shared.WithholdingTaxitems( - amount=4116.69, - name='Maureen Dooley', + amount=3759.62, + name='Natalie Gleichner', ), shared.WithholdingTaxitems( - amount=6762.74, - name='Mona Schaden', + amount=334.57, + name='Mr. Brian Kihn', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=419585, + timeout_in_minutes=608208, ) res = s.credit_notes.create(req) @@ -244,7 +299,7 @@ if res.create_credit_note_response is not None: ## get -Gets a single creditNote corresponding to the given ID. +Gets a single creditNote corresponding to the given ID. ### Example Usage @@ -258,10 +313,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreditNoteRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - credit_note_id='praesentium', + credit_note_id='commodi', ) res = s.credit_notes.get(req) @@ -272,13 +326,13 @@ if res.credit_note is not None: ## get_create_update_model -Get create/update credit note model. Returns the expected data for the request payload. +Get create/update credit note model. Returns the expected data for the request payload. See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating and updating a credit note. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating and updating a credit note. ### Example Usage @@ -292,7 +346,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateCreditNotesModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -306,7 +359,7 @@ if res.push_option is not None: ## list -Gets a list of all credit notes for a company, with pagination +Gets a list of all credit notes for a company, with pagination. ### Example Usage @@ -320,13 +373,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListCreditNotesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='magni', + query='dicta', ) res = s.credit_notes.list(req) @@ -337,13 +389,13 @@ if res.credit_notes is not None: ## update -Posts an updated credit note to the accounting package for a given company. +Posts an updated credit note to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-creditNotes-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support updating a credit note. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support updating a credit note. ### Example Usage @@ -357,337 +409,303 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateCreditNoteRequest( credit_note=shared.CreditNote( - additional_tax_amount=7874.67, - additional_tax_percentage=7118.19, - allocated_on_date='in', - credit_note_number='eaque', - currency='delectus', - currency_rate=5019.46, + additional_tax_amount=8489.26, + additional_tax_percentage=1334.52, + allocated_on_date='ut', + credit_note_number='deserunt', + currency='dignissimos', + currency_rate=8604.11, customer_ref=shared.CustomerRef( - company_name='minus', - id='fd5fb6e9-1b9a-49f7-8846-e2c3309db053', + company_name='facilis', + id='b8f532d8-92cf-4781-acb5-12c878240bf5', ), - discount_percentage=4343.82, - id='d9e75ca0-06f5-4392-811a-25a8bf92f974', - issue_date='aspernatur', + discount_percentage=2743.68, + id='8f88f8f1-bf0b-4c8e-9f20-6d5d831d0081', + issue_date='voluptatem', line_items=[ shared.CreditNoteLineItem( account_ref=shared.AccountRef( - id='ad9a9f8b-f822-4112-9359-d98387f7a79c', - name='Christian Corwin', + id='0f670667-3f3a-4681-8576-8dce742409a2', + name='Ms. Annette Towne', ), - description='magni', - discount_amount=2657.08, - discount_percentage=5319.67, + description='aut', + discount_amount=1141.51, + discount_percentage=2710.98, is_direct_income=False, item_ref=shared.ItemRef( - id='4da21729-f2ac-441e-b572-5f1169ac1e41', - name='Wallace Oberbrunner', + id='89a5f63e-3af3-4dd9-9da3-3dcd63483e4a', + name='Amelia Morissette', ), - quantity=7720.48, - sub_total=1609.09, - tax_amount=2042.92, + quantity=2688.31, + sub_total=8278.13, + tax_amount=9784.16, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=9044.85, - id='34f2dfa4-a197-4f6d-a922-151fe1712099', - name='Ronnie Donnelly', + effective_tax_rate=2045.17, + id='7e45b895-5d41-43e1-ba48-2310907bd354', + name='Charles McGlynn', ), - total_amount=9711.55, + total_amount=8744.46, tracking=shared.CreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='43d85443-9ee2-4244-a044-3bc154188c2f', - name='Kristin Tillman', + id='34f02449-d86f-44bb-a0fe-5d911cbfe749', + name='Omar Wolf', ), shared.TrackingCategoryRef( - id='da7832ea-bd61-47c3-b0d5-1a44bf01bad8', - name='Patricia Kerluke', + id='a27f69e2-c9e6-4d10-a9db-3ad4c6b03108', + name='Seth Schaefer', ), ], customer_ref=shared.CustomerRef( - company_name='ea', - id='082bfbdc-41ff-45d4-a2ae-4fb5cb35d176', + company_name='in', + id='473082b9-4f2a-4b1f-9567-1e9c326350a4', ), - is_billed_to=shared.BilledToTypeEnum1.UNKNOWN, - is_rebilled_to=shared.BilledToTypeEnum1.NOT_APPLICABLE, + is_billed_to=shared.BilledToType1.NOT_APPLICABLE, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='f1edb783-59ec-4c5c-b860-f8cd580ba738', - name='Kimberly Waters', + id='143789ce-0e99-4159-8d93-a74c0252fe3b', + name='Bridget Greenholt', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='4447297c-d3b1-4dd3-bbce-247b7684eff5', - name='Teresa Denesik', - ), - shared.TrackingCategoryRef( - id='71cffbd0-eb74-4b84-a195-3b44bd3c4315', - name='Sammy Fisher', + id='b778ebb6-e1d2-4cf5-82ba-fb2cbc4635d5', + name='Andre Heidenreich', ), shared.TrackingCategoryRef( - id='5953c001-1398-463a-a41e-6c31cc2f1fcb', - name='Joan Schaefer', + id='028c3e95-1a1e-430f-9a96-6489d7b78673', + name='Peter Feeney Sr.', ), shared.TrackingCategoryRef( - id='41ffbe9c-bd79-45ee-a5e0-76cc7abf616e', - name='Vernon Sauer III', + id='a6b99249-4594-4487-b5c8-43836b86b3cd', + name='Mrs. Marc Grimes', ), ], - unit_amount=2640.9, + unit_amount=223.76, ), shared.CreditNoteLineItem( account_ref=shared.AccountRef( - id='1934b90f-2e09-4d19-92fc-2f9e2e105944', - name='Virgil Fahey', + id='449f9df1-3f4e-4edb-a78b-f606825894ea', + name='Jeanne Farrell', ), - description='sed', - discount_amount=2405.55, - discount_percentage=4444.94, + description='impedit', + discount_amount=4457.32, + discount_percentage=1479.33, is_direct_income=False, item_ref=shared.ItemRef( - id='a72f9084-9d6a-4ed4-aecb-7537cd9222c9', - name='Elijah Hegmann', + id='795b7851-48d6-4d54-9e56-35b33bc0f970', + name='Micheal Cummings', ), - quantity=6152.06, - sub_total=817.75, - tax_amount=6258.15, + quantity=5918.35, + sub_total=9624.68, + tax_amount=2930.13, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6644.91, - id='bfa2e761-f0ca-44d4-96ef-1031e6899f0c', - name='Dr. Sharon Bednar', + effective_tax_rate=5170.23, + id='44225e75-b796-4065-80ef-a6f93b90a1b8', + name='Austin Hartmann', ), - total_amount=1347.95, + total_amount=1147.52, tracking=shared.CreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='d55cc058-4a18-44d7-ad97-1fc820c65b03', - name='Luz Rau', - ), - shared.TrackingCategoryRef( - id='0cc88518-7e4d-4e04-af28-c5dddb46aa1c', - name='Clint Jast', - ), - shared.TrackingCategoryRef( - id='28da0131-9112-4964-a645-c1d81f29042f', - name='Vanessa Monahan', - ), - shared.TrackingCategoryRef( - id='aff0ea22-16cb-4e07-9bc1-63e279a3b084', - name='Lorenzo Monahan', + id='54b739f4-fe77-4210-91f6-558c99c722d2', + name='Lucas Barton', ), ], customer_ref=shared.CustomerRef( - company_name='veniam', - id='7d04f408-47a7-442d-8449-6cbdeecf6b99', + company_name='numquam', + id='087d9caa-e042-4dd7-8aac-9b4caa1cfe9e', ), - is_billed_to=shared.BilledToTypeEnum1.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum1.PROJECT, + is_billed_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.UNKNOWN, project_ref=shared.ProjectRef( - id='63562ebf-df55-4c29-8c06-0b06a1287764', - name='Darrel Wehner', + id='df903907-f378-4319-83d4-2e54a8546659', + name='Mr. Kara Hintz', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='c6d6ed9c-73dd-4634-9715-09a8e870d3c5', - name='Juan Wolff', + id='c1471d51-aaa6-4ddf-9abd-6487c5fc2b86', + name='Miss Monique Bartell', ), ], - unit_amount=1690.72, + unit_amount=9832.72, ), shared.CreditNoteLineItem( account_ref=shared.AccountRef( - id='42c7b66a-1f30-4c73-9f5b-6719890f42a4', - name='Malcolm Gleichner', + id='69e10015-7630-4bda-bafd-ed84a35a4123', + name='Stewart Bode', ), - description='at', - discount_amount=5236.07, - discount_percentage=3465.34, + description='sequi', + discount_amount=3217.24, + discount_percentage=6847.17, is_direct_income=False, item_ref=shared.ItemRef( - id='b260591d-745e-43c2-859c-9c3f567e0e25', - name='Courtney Hoeger', + id='c26ae33b-ef97-41a8-b46b-ca1106fe965b', + name='Evelyn Braun IV', ), - quantity=1074.24, - sub_total=8313.04, - tax_amount=4021.21, + quantity=7565.71, + sub_total=9475.73, + tax_amount=5358.76, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=1628.49, - id='fcdace1f-0121-46ce-a239-e8f25cd0d19d', - name='Greg Mayer', + effective_tax_rate=5373.21, + id='ec9f7b99-a550-4a65-aed3-33bb0ce8aa65', + name='Victoria Denesik', ), - total_amount=2363.72, + total_amount=5250.89, tracking=shared.CreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='e39266cb-d95f-47aa-ab24-113695d1e669', - name='Jerald Schowalter', - ), - shared.TrackingCategoryRef( - id='596217c2-9776-4763-b425-4038bfb5971e', - name='Casey Block II', + id='eb7e14ca-5640-4891-9009-7019a48f88ec', + name='Ron Ratke', ), shared.TrackingCategoryRef( - id='57389ced-bac7-4fda-b959-4d66bc2ae480', - name='Dawn Cole', + id='04e01105-d389-4081-a2c6-beb68a0f657b', + name='Teri Abshire', ), ], customer_ref=shared.CustomerRef( - company_name='occaecati', - id='54b6fa22-0636-4982-8553-cb10006bef49', + company_name='beatae', + id='480f8de3-0f06-49d8-9061-8d97e1522975', ), - is_billed_to=shared.BilledToTypeEnum1.UNKNOWN, - is_rebilled_to=shared.BilledToTypeEnum1.UNKNOWN, + is_billed_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.UNKNOWN, project_ref=shared.ProjectRef( - id='ec2053b7-4936-46ac-8ee0-f2bf19588d40', - name='Richard Dietrich', + id='da803122-92cc-461c-aa70-2bb97ee102da', + name='Hope Walsh', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='eba297be-3e90-4bc4-8df8-68fd52405cb3', - name='Evelyn Stracke', + id='8e01bf33-eaab-4454-82ac-1704bf1cc9fc', + name='Katherine Oberbrunner', ), shared.TrackingCategoryRef( - id='2f4f127f-b0e0-4bf1-b821-7978d0acca77', - name='Phil Rice', + id='5eb5f0c4-92b5-4744-908a-2267aaee79e3', + name='Fernando Blanda', ), shared.TrackingCategoryRef( - id='7021a520-46b6-44e9-9fb0-e67e094fdfed', - name='Dr. Yvonne Grimes', + id='31becb83-d237-48ae-bbfc-23d9450a986a', + name='Faye Hammes', ), shared.TrackingCategoryRef( - id='53a34a1b-8fe9-4973-9adc-05d85ae2dfb7', - name='Shawna Pouros', + id='c707f06b-28ec-4c86-8923-86f62c969c4c', + name='Rick Predovic', ), ], - unit_amount=4837.74, + unit_amount=5207.16, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='non', - note='magni', + modified_date='error', + note='alias', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='consequatur', - currency='illum', - currency_rate=2378.75, - total_amount=2106.51, + allocated_on_date='sequi', + currency='sapiente', + currency_rate=8471.37, + total_amount=2026.93, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='6561eca1-6ef8-4945-9bd7-6eeeb518c4da', - name='Ollie Osinski', + id='c81da10f-8c23-4df9-b1da-3edb51fad94a', + name='Roosevelt Marvin', ), - currency='nemo', - currency_rate=3353.52, - id='12f06d4e-5b72-4f0f-9485-68a0424e00a1', - note='quibusdam', - paid_on_date='autem', - reference='voluptates', - total_amount=7314.5, + currency='ullam', + currency_rate=1158.79, + id='37726d15-321b-4832-a56d-69180ff60eb9', + note='fuga', + paid_on_date='ex', + reference='autem', + total_amount=3460.72, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='cupiditate', - currency='modi', - currency_rate=1916.53, - total_amount=3059.65, + allocated_on_date='atque', + currency='saepe', + currency_rate=4320.55, + total_amount=5652.45, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='645d0308-4fbb-4a5c-8eff-5cb01fe51e52', - name='Lyle Gislason', + id='a4b843d3-82db-4ec7-9c68-c60659468ce3', + name='Anita Spinka', ), - currency='minus', - currency_rate=5544.29, - id='2b85f8bc-2cab-4a8d-a412-7dd597ff4711', - note='similique', - paid_on_date='id', - reference='et', - total_amount=7167.79, + currency='magnam', + currency_rate=5876.67, + id='bf8214c3-37f9-46bb-8c69-e372db1344ba', + note='error', + paid_on_date='doloribus', + reference='reprehenderit', + total_amount=5256.79, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='porro', - currency='nihil', - currency_rate=2567.42, - total_amount=7030.15, + allocated_on_date='est', + currency='quis', + currency_rate=7709.69, + total_amount=343.42, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='86cecc74-f77b-4484-8bd6-a6f0441d2c3b', - name='Ms. Daniel Langworth', + id='ed7aab62-e972-461f-b0c5-8d27b51996b5', + name='Joel Rath DVM', ), - currency='nesciunt', - currency_rate=4744.53, - id='3e060459-bebb-4ad0-af25-86bcf152558d', - note='fuga', - paid_on_date='fuga', - reference='excepturi', - total_amount=3583.94, + currency='saepe', + currency_rate=9596.73, + id='712b7a7a-b034-44b1-b106-88deebef897f', + note='velit', + paid_on_date='fugiat', + reference='pariatur', + total_amount=276.76, ), ), ], - remaining_credit=7230.31, - source_modified_date='itaque', - status=shared.CreditNoteStatusEnum.SUBMITTED, - sub_total=7837.02, + remaining_credit=7998.57, + source_modified_date='minus', + status=shared.CreditNoteStatus.PARTIALLY_PAID, + sub_total=2232.35, supplemental_data=shared.SupplementalData( content={ - "consequatur": { - "in": 'enim', - }, - "vel": { - "consectetur": 'quis', - "ut": 'est', - "fuga": 'labore', - "adipisci": 'ratione', - }, - "cum": { - "nihil": 'officiis', - "inventore": 'esse', - }, - "ex": { - "minus": 'ad', + "tenetur": { + "dicta": 'rerum', }, }, ), - total_amount=1292.57, - total_discount=27.7, - total_tax_amount=5026.86, + total_amount=2054.73, + total_discount=9131.52, + total_tax_amount=3033.65, withholding_tax=[ shared.WithholdingTaxitems( - amount=1863.18, - name='Kate Metz Sr.', + amount=30.91, + name='Richard Nitzsche Jr.', ), shared.WithholdingTaxitems( - amount=8344.99, - name='Dr. Sean Williamson', + amount=2752.88, + name='Cassandra Kerluke', ), shared.WithholdingTaxitems( - amount=3401.07, - name='Gerardo Gislason', + amount=4841.4, + name='Mr. Sherri Torphy', ), shared.WithholdingTaxitems( - amount=7482.66, - name='Glenda Grimes', + amount=2244.51, + name='Laura Cronin', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - credit_note_id='ipsam', + credit_note_id='cumque', force_update=False, - timeout_in_minutes=788995, + timeout_in_minutes=513307, ) res = s.credit_notes.update(req) diff --git a/accounting/docs/customers/README.md b/accounting/docs/customers/README.md index 8c2c50d67..5bc7d2e55 100755 --- a/accounting/docs/customers/README.md +++ b/accounting/docs/customers/README.md @@ -17,13 +17,13 @@ Customers ## create -Posts an individual customer for a given company. +Posts an individual customer for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating customers. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating customers. ### Example Usage @@ -37,104 +37,121 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateCustomerRequest( customer=shared.Customer( addresses=[ shared.Addressesitems( - city='Cartwrightstad', - country='Ukraine', - line1='assumenda', - line2='optio', - postal_code='94549', - region='adipisci', - type=shared.AddressTypeEnum.UNKNOWN, + city='Port Clevelandtown', + country='Turkmenistan', + line1='culpa', + line2='at', + postal_code='10296', + region='dolore', + type=shared.AddressType.UNKNOWN, ), shared.Addressesitems( - city='Apopka', - country='Equatorial Guinea', - line1='rerum', - line2='nesciunt', - postal_code='28807-3440', - region='recusandae', - type=shared.AddressTypeEnum.DELIVERY, + city='Abbyport', + country='Philippines', + line1='voluptatibus', + line2='sequi', + postal_code='37221', + region='quas', + type=shared.AddressType.UNKNOWN, ), shared.Addressesitems( - city='East Martina', - country='Svalbard & Jan Mayen Islands', - line1='dolor', - line2='porro', - postal_code='91773-0293', - region='quod', - type=shared.AddressTypeEnum.UNKNOWN, + city='Burdetteland', + country='Vietnam', + line1='nulla', + line2='libero', + postal_code='94593', + region='unde', + type=shared.AddressType.UNKNOWN, ), shared.Addressesitems( - city='Reichelfort', - country='South Africa', - line1='alias', - line2='deserunt', - postal_code='15095', - region='nemo', - type=shared.AddressTypeEnum.BILLING, + city='South Paul', + country='Lesotho', + line1='ab', + line2='quo', + postal_code='58178-2135', + region='temporibus', + type=shared.AddressType.UNKNOWN, ), ], - contact_name='reiciendis', + contact_name='amet', contacts=[ shared.Contact( address=shared.Addressesitems( - city='Freedaton', - country='Mali', - line1='natus', - line2='culpa', - postal_code='48950-4669', - region='quae', - type=shared.AddressTypeEnum.UNKNOWN, + city='Margaretestad', + country='Burkina Faso', + line1='placeat', + line2='rem', + postal_code='59914', + region='ullam', + type=shared.AddressType.UNKNOWN, ), - email='Cristal_Fisher48@hotmail.com', - modified_date='unde', - name='Alton McKenzie', + email='Buster49@hotmail.com', + modified_date='quod', + name='Marjorie Funk', phone=[ shared.PhoneNumbersitems( - number='aut', - type=shared.PhoneNumberTypeEnum.LANDLINE, + number='quaerat', + type=shared.PhoneNumberType.LANDLINE, ), + ], + status=shared.CustomerStatus.ARCHIVED, + ), + shared.Contact( + address=shared.Addressesitems( + city='Howellland', + country='Mayotte', + line1='distinctio', + line2='cum', + postal_code='82083', + region='laborum', + type=shared.AddressType.UNKNOWN, + ), + email='Warren19@gmail.com', + modified_date='autem', + name='Edgar Cremin', + phone=[ shared.PhoneNumbersitems( - number='quia', - type=shared.PhoneNumberTypeEnum.FAX, + number='velit', + type=shared.PhoneNumberType.LANDLINE, ), ], - status=shared.CustomerStatusEnum.ARCHIVED, + status=shared.CustomerStatus.ARCHIVED, ), ], - customer_name='qui', - default_currency='commodi', - email_address='a', - id='d368ba92-16bc-4b41-9835-c73641723133', + customer_name='natus', + default_currency='minima', + email_address='minus', + id='9d237397-c785-4b5d-b4f5-00183febdf67', metadata=shared.Metadata( is_deleted=False, ), - modified_date='recusandae', - phone='(802) 568-3142 x77862', - registration_number='molestias', - source_modified_date='dolores', - status=shared.CustomerStatusEnum.UNKNOWN, + modified_date='aliquid', + phone='510.586.7430 x0316', + registration_number='ad', + source_modified_date='nisi', + status=shared.CustomerStatus.UNKNOWN, supplemental_data=shared.SupplementalData( content={ - "minus": { - "odit": 'maxime', - "aspernatur": 'magni', + "officiis": { + "minus": 'tempora', + "sequi": 'natus', + "saepe": 'quibusdam', + "corrupti": 'maxime', }, - "minus": { - "ipsam": 'sequi', - "quaerat": 'accusantium', + "aliquam": { + "explicabo": 'eaque', }, }, ), - tax_number='incidunt', + tax_number='hic', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=583959, + timeout_in_minutes=276828, ) res = s.customers.create(req) @@ -145,7 +162,7 @@ if res.create_customer_response is not None: ## download_attachment -Download customer attachment +Download customer attachment. ### Example Usage @@ -159,12 +176,11 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DownloadCustomerAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='minima', + customer_id='quae', ) res = s.customers.download_attachment(req) @@ -175,7 +191,7 @@ if res.data is not None: ## get -Gets a single customer corresponding to the given ID. +Gets a single customer corresponding to the given ID. ### Example Usage @@ -189,10 +205,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCustomerRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - customer_id='quo', + customer_id='eos', ) res = s.customers.get(req) @@ -203,7 +218,7 @@ if res.customer is not None: ## get_attachment -Get customer attachment +Get customer attachment. ### Example Usage @@ -217,12 +232,11 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCustomerAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='quis', + customer_id='eius', ) res = s.customers.get_attachment(req) @@ -233,13 +247,13 @@ if res.attachment is not None: ## get_create_update_model -Get create/update customer model. Returns the expected data for the request payload. +Get create/update customer model. Returns the expected data for the request payload. See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating and updating customers. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating and updating customers. ### Example Usage @@ -253,7 +267,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateCustomersModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -267,7 +280,7 @@ if res.push_option is not None: ## list -Gets the latest customers for a company, with pagination +Gets the latest customers for a company, with pagination. ### Example Usage @@ -281,13 +294,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListCustomersRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='facere', + query='voluptatem', ) res = s.customers.list(req) @@ -298,7 +310,7 @@ if res.customers is not None: ## list_attachments -List customer attachments +List customer attachments ### Example Usage @@ -312,11 +324,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListCustomerAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='quidem', + customer_id='temporibus', ) res = s.customers.list_attachments(req) @@ -327,13 +338,13 @@ if res.attachments_dataset is not None: ## update -Posts an updated customer for a given company. +Posts an updated customer for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model). > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support updating customers. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support updating customers. ### Example Usage @@ -347,148 +358,119 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateCustomerRequest( customer=shared.Customer( addresses=[ shared.Addressesitems( - city='Port Eriberto', - country='Jersey', - line1='quo', - line2='vitae', - postal_code='26519-5661', - region='enim', - type=shared.AddressTypeEnum.BILLING, - ), - shared.Addressesitems( - city='South San Francisco', - country='Sao Tome and Principe', - line1='quasi', - line2='sint', - postal_code='19688', - region='eum', - type=shared.AddressTypeEnum.UNKNOWN, + city='New Jayde', + country='Nigeria', + line1='porro', + line2='voluptas', + postal_code='27537-1668', + region='magni', + type=shared.AddressType.UNKNOWN, ), shared.Addressesitems( - city='Williamsonfield', - country='Samoa', - line1='veniam', - line2='magnam', - postal_code='68300', - region='quis', - type=shared.AddressTypeEnum.DELIVERY, + city='Joanhaven', + country='Lebanon', + line1='unde', + line2='ad', + postal_code='62198-2033', + region='laboriosam', + type=shared.AddressType.BILLING, ), ], - contact_name='reiciendis', + contact_name='tenetur', contacts=[ shared.Contact( address=shared.Addressesitems( - city='Lesterview', - country='Burundi', - line1='voluptatem', - line2='voluptas', - postal_code='89160-6192', - region='quia', - type=shared.AddressTypeEnum.DELIVERY, + city='O'Konton', + country='Argentina', + line1='voluptas', + line2='pariatur', + postal_code='01252', + region='ullam', + type=shared.AddressType.UNKNOWN, ), - email='Lydia7@gmail.com', - modified_date='perferendis', - name='Andy Paucek', + email='Aurelia.Mraz77@yahoo.com', + modified_date='ipsum', + name='Carl Pollich IV', phone=[ shared.PhoneNumbersitems( - number='necessitatibus', - type=shared.PhoneNumberTypeEnum.FAX, - ), - ], - status=shared.CustomerStatusEnum.UNKNOWN, - ), - shared.Contact( - address=shared.Addressesitems( - city='West Ethelyn', - country='Martinique', - line1='ea', - line2='fugiat', - postal_code='59595', - region='reprehenderit', - type=shared.AddressTypeEnum.BILLING, - ), - email='Mittie_Williamson13@gmail.com', - modified_date='nam', - name='Erik Stehr', - phone=[ - shared.PhoneNumbersitems( - number='deserunt', - type=shared.PhoneNumberTypeEnum.MOBILE, + number='incidunt', + type=shared.PhoneNumberType.PRIMARY, ), shared.PhoneNumbersitems( - number='modi', - type=shared.PhoneNumberTypeEnum.FAX, - ), - shared.PhoneNumbersitems( - number='repellendus', - type=shared.PhoneNumberTypeEnum.MOBILE, - ), - shared.PhoneNumbersitems( - number='unde', - type=shared.PhoneNumberTypeEnum.FAX, + number='nisi', + type=shared.PhoneNumberType.PRIMARY, ), ], - status=shared.CustomerStatusEnum.UNKNOWN, + status=shared.CustomerStatus.ARCHIVED, ), shared.Contact( address=shared.Addressesitems( - city='Port Gavinland', - country='Central African Republic', - line1='numquam', - line2='velit', - postal_code='21540', - region='cumque', - type=shared.AddressTypeEnum.DELIVERY, + city='North Cloydton', + country='Austria', + line1='possimus', + line2='perferendis', + postal_code='28760', + region='beatae', + type=shared.AddressType.DELIVERY, ), - email='Josiah19@yahoo.com', - modified_date='fuga', - name='Miss Don Dach', + email='Mae.Willms66@yahoo.com', + modified_date='commodi', + name='Tom Gutkowski', phone=[ shared.PhoneNumbersitems( - number='nesciunt', - type=shared.PhoneNumberTypeEnum.UNKNOWN, + number='id', + type=shared.PhoneNumberType.UNKNOWN, ), shared.PhoneNumbersitems( - number='beatae', - type=shared.PhoneNumberTypeEnum.UNKNOWN, + number='molestias', + type=shared.PhoneNumberType.UNKNOWN, ), ], - status=shared.CustomerStatusEnum.UNKNOWN, + status=shared.CustomerStatus.ACTIVE, ), ], - customer_name='quo', - default_currency='libero', - email_address='eaque', - id='a0003eb2-2d9b-43a7-8d94-faa741c57d1f', + customer_name='occaecati', + default_currency='eos', + email_address='veniam', + id='3c8962f4-896b-4f51-a465-2d3c343d6177', metadata=shared.Metadata( is_deleted=False, ), - modified_date='vero', - phone='(810) 408-1587 x17905', - registration_number='nostrum', - source_modified_date='labore', - status=shared.CustomerStatusEnum.ACTIVE, + modified_date='atque', + phone='1-935-212-4413 x9410', + registration_number='iste', + source_modified_date='aut', + status=shared.CustomerStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "tenetur": { - "necessitatibus": 'necessitatibus', - "autem": 'natus', - "quasi": 'iure', + "error": { + "ipsa": 'dolore', + }, + "labore": { + "ullam": 'quibusdam', + "recusandae": 'ad', + "omnis": 'mollitia', + }, + "placeat": { + "ducimus": 'eaque', + "aliquid": 'ea', + }, + "odio": { + "quisquam": 'delectus', }, }, ), - tax_number='ex', + tax_number='et', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='error', + customer_id='optio', force_update=False, - timeout_in_minutes=535903, + timeout_in_minutes=953679, ) res = s.customers.update(req) diff --git a/accounting/docs/directcosts/README.md b/accounting/docs/directcosts/README.md index 630c58a5b..b48ee1e81 100755 --- a/accounting/docs/directcosts/README.md +++ b/accounting/docs/directcosts/README.md @@ -23,7 +23,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. ### Example Usage @@ -37,243 +37,325 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateDirectCostRequest( direct_cost=shared.DirectCost( contact_ref=shared.ContactRef( - data_type='tempore', - id='e3444eac-8b3a-4287-9c6c-1fe606d07d2a', + data_type='quis', + id='93260525-1e66-4bb4-a689-7d99a2d33567', ), - currency='error', - currency_rate=7699.22, - id='87ae50c1-6661-4a1d-9136-a7e8d53213f3', - issue_date='asperiores', + currency='ipsa', + currency_rate=8842.06, + id='93ee6cf5-9f35-48aa-aaca-e323a31bf7ba', + issue_date='architecto', line_items=[ shared.DirectCostLineItem( account_ref=shared.AccountRef( - id='58752db7-64c5-49f0-a56c-ebcada29ca79', - name='Margie Bosco', + id='c97716c8-02cc-49e0-87d9-d323f1aa63ed', + name='Miss Earnest Zemlak', ), - description='ipsam', - discount_amount=3887.15, - discount_percentage=4752.38, + description='nemo', + discount_amount=4125.09, + discount_percentage=7425.62, item_ref=shared.ItemRef( - id='1663c530-b566-4516-ba36-38512ab2521b', - name='Emmett Daugherty IV', + id='cba51ef2-454a-447f-acf1-16cdd5444a75', + name='Andrea Lang', ), - quantity=1632.92, - sub_total=3028.14, - tax_amount=4199.95, + quantity=8116.96, + sub_total=4938, + tax_amount=8445.24, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=4450.23, - id='b8a40bc0-5fab-40d6-90ed-f22a94d20ec9', - name='Raquel O'Keefe PhD', + effective_tax_rate=8127.53, + id='9efaf43d-c623-4620-b313-8f30df3db022', + name='Donnie Ondricka', ), - total_amount=1004.36, + total_amount=3413.59, tracking=shared.Tracking( - invoice_to=shared.TrackingInvoiceTo( - data_type='hic', - id='465e8515-6fff-473f-9f54-fdd5ea954339', + invoice_to=shared.TrackingRecordReference( + data_type='delectus', + id='b8f652eb-b9d3-4838-b879-0243b293dab3', ), record_refs=[ shared.InvoiceTo( - data_type='illum', - id='afb42a8d-6338-48e4-9803-9ea5f9b18a24', + data_type='vero', + id='917f50fd-a04c-48b1-bb55-a292b0bc3bb7', ), + ], + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='4664eb1d-0338-48b0-91bb-17afee74b6fe', + name='Marion Greenfelder', + ), + shared.TrackingCategoryRef( + id='c7edaf39-d16f-4bf7-afd1-62b303e3023b', + name='Manuel Tillman', + ), + ], + unit_amount=1973.88, + ), + shared.DirectCostLineItem( + account_ref=shared.AccountRef( + id='16cf55b4-3135-453c-8f1c-204c4adcc990', + name='Ms. Jody Hamill', + ), + description='cum', + discount_amount=5405.93, + discount_percentage=3840.98, + item_ref=shared.ItemRef( + id='48cefa78-f1e2-4d3b-901e-0952bbb4cbb1', + name='Mrs. Courtney Kuhic', + ), + quantity=5685.48, + sub_total=3158.92, + tax_amount=6366.25, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=2930.95, + id='169c1387-271e-418e-a9e4-5118c2cc57fb', + name='Tyler Abernathy MD', + ), + total_amount=4645.41, + tracking=shared.Tracking( + invoice_to=shared.TrackingRecordReference( + data_type='molestias', + id='ed29a9d4-eea8-4565-8c2d-4f4c88be4f27', + ), + record_refs=[ shared.InvoiceTo( - data_type='modi', - id='fd619039-dacd-438e-90dc-671dc7f1e3af', + data_type='tenetur', + id='d9667e46-c51d-42ff-aa58-dcef234c955b', ), shared.InvoiceTo( - data_type='quasi', - id='5920c90d-1b49-401f-abd8-9c8a32639da5', + data_type='natus', + id='bdf2190a-bd9b-4bcc-a725-ec2659ce0280', + ), + shared.InvoiceTo( + data_type='corrupti', + id='40c69ef6-8e45-4c8a-9dfa-c754500430c6', ), ], ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='7b6902b8-81a9-44f6-8366-4a8f0af8c691', - name='Clinton Ernser', + id='32b4391f-df01-4c3e-91e8-f7bc69d460a7', + name='Alyssa Satterfield', ), shared.TrackingCategoryRef( - id='9fbaf947-6a2a-4e8d-8c50-c8a3512c7378', - name='Gwendolyn McLaughlin IV', + id='26d10f1e-f263-41c7-80f0-f873f9d5c25f', + name='Miss Alfred VonRueden', + ), + ], + unit_amount=6464.87, + ), + shared.DirectCostLineItem( + account_ref=shared.AccountRef( + id='4a4253c3-0257-411f-82c7-e7dc548be09e', + name='Diane Paucek', + ), + description='dolores', + discount_amount=816.73, + discount_percentage=3686.17, + item_ref=shared.ItemRef( + id='ca12a4ba-9d59-4988-992c-fd0c77c53e7e', + name='Chelsea Gibson', + ), + quantity=3952.6, + sub_total=9251.57, + tax_amount=5344.54, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=7493.37, + id='90bac384-e239-4670-bfec-31c50824d189', + name='Curtis Keebler', + ), + total_amount=6908.65, + tracking=shared.Tracking( + invoice_to=shared.TrackingRecordReference( + data_type='sunt', + id='d27eb707-aa60-4c8f-a46e-6177db9db3b7', ), + record_refs=[ + shared.InvoiceTo( + data_type='voluptatibus', + id='fbb6970e-e770-4e36-897e-f7c206e61b0d', + ), + ], + ), + tracking_category_refs=[ shared.TrackingCategoryRef( - id='50a00e96-6ec7-436d-8319-4398c783c923', - name='Max Tillman', + id='08714c20-a3d9-4863-bca8-5c3fe65574db', + name='Dominick Mraz', ), ], - unit_amount=8639.57, + unit_amount=4622.78, ), shared.DirectCostLineItem( account_ref=shared.AccountRef( - id='3ab7ca3c-5ca8-4649-a70c-fd5d6989b720', - name='Mr. Danielle Hamill', + id='c98f13af-28db-42cf-abf4-f3ded356d7e1', + name='Miss Whitney Dach', ), - description='voluptate', - discount_amount=8494.86, - discount_percentage=879.6, + description='occaecati', + discount_amount=5317.63, + discount_percentage=1078.63, item_ref=shared.ItemRef( - id='9ea83d49-2ed1-44b8-a2c1-954545e955dc', - name='Henry Langosh', + id='96d55af6-9a1c-44b7-9ae3-3681c23c39a7', + name='Ms. Michael Torphy', ), - quantity=6691.93, - sub_total=3007.59, - tax_amount=6029.32, + quantity=7162.96, + sub_total=938.38, + tax_amount=1709.49, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=65.39, - id='1c7c43ad-2daa-4784-aba3-d230edf73811', - name='Albert Bruen', + effective_tax_rate=7710.42, + id='5ba825fe-22cd-45cb-a6fb-fec932af6813', + name='Angel Harvey', ), - total_amount=5162.31, + total_amount=9353.01, tracking=shared.Tracking( - invoice_to=shared.TrackingInvoiceTo( - data_type='consequuntur', - id='bd7ed565-0762-41c5-8f4d-7396564c20a0', + invoice_to=shared.TrackingRecordReference( + data_type='placeat', + id='ec2dd691-6f7f-4c7d-9a70-ec60e6075894', ), record_refs=[ shared.InvoiceTo( - data_type='dicta', - id='1a961d24-a7db-4b8f-932d-892cf7812cb5', + data_type='autem', + id='1c14cd90-227e-437c-8d97-7f1a5491abe9', + ), + shared.InvoiceTo( + data_type='dignissimos', + id='51b106d2-3e03-4e69-815a-ae99fcde9e72', ), shared.InvoiceTo( - data_type='architecto', - id='2c878240-bf54-48f8-8f8f-1bf0bc8e1f20', + data_type='iste', + id='c9d4f2d8-a446-440c-a60d-b73a2f93f467', + ), + shared.InvoiceTo( + data_type='at', + id='c0d8da56-1220-426a-b8f2-77485c1976af', ), ], ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='d5d831d0-0810-490f-a706-673f3a681c57', - name='Vickie Simonis', + id='80da7a08-9fc4-44db-a745-30e5cc7c6d0c', + name='Spencer Wintheiser', + ), + shared.TrackingCategoryRef( + id='d334b6f6-23bc-4eca-b50a-ee5e0da8b9af', + name='Mrs. Alberta Stoltenberg', ), shared.TrackingCategoryRef( - id='742409a2-15e0-4860-9489-a5f63e3af3dd', - name='Marty Spencer', + id='86e7b413-cbe2-4d17-adc1-c43d40f61d17', + name='Christine Hane', ), ], - unit_amount=2439.65, + unit_amount=7322.16, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='vero', - note='placeat', + modified_date='debitis', + note='enim', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='vel', + allocated_on_date='saepe', currency='non', - currency_rate=2799.65, - total_amount=5083.73, + currency_rate=9407.97, + total_amount=4601.8, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='3e4a7a98-e4df-437e-85b8-955d413e13a4', - name='Mr. Todd Feil', + id='21184077-2f32-4e3b-89db-e0f23b7b6d99', + name='Dianne Simonis', ), - currency='perferendis', - currency_rate=4391.35, - id='bd354c09-2bd7-434f-8244-9d86f4bb20fe', - note='nostrum', - paid_on_date='quibusdam', - reference='provident', - total_amount=857.97, + currency='facere', + currency_rate=8999.7, + id='d477680f-c7a1-47a8-ae5e-82fd28d1040a', + note='iusto', + paid_on_date='debitis', + reference='sint', + total_amount=1083.49, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='sunt', - currency='quod', - currency_rate=7101.48, - total_amount=9611.71, + allocated_on_date='ratione', + currency='omnis', + currency_rate=1850.41, + total_amount=6781.29, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='e749caf4-5a27-4f69-a2c9-e6d10e9db3ad', - name='Rosalie Kautzer I', + id='b44cb183-5008-4f46-9ce5-3e914498a9ba', + name='Alma Beahan', ), - currency='quasi', - currency_rate=374.55, - id='8d9c3374-7308-42b9-8f2a-b1fd5671e9c3', - note='dolores', - paid_on_date='commodi', - reference='neque', - total_amount=3182.94, + currency='pariatur', + currency_rate=9692.94, + id='de410c37-daa9-4182-a49d-9625d3caffc1', + note='cupiditate', + paid_on_date='blanditiis', + reference='voluptates', + total_amount=9025.46, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='eaque', - currency='officia', - currency_rate=2702.53, - total_amount=4310.35, + allocated_on_date='animi', + currency='modi', + currency_rate=3101.3, + total_amount=3390.36, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='7143789c-e0e9-4915-94d9-3a74c0252fe3', - name='Alex Rippin', + id='2792bcd4-40ea-498b-acce-0486de0d56d7', + name='Mrs. Verna Anderson', ), - currency='rerum', - currency_rate=5394.26, - id='b778ebb6-e1d2-4cf5-82ba-fb2cbc4635d5', - note='eveniet', - paid_on_date='eum', - reference='exercitationem', - total_amount=8718.88, + currency='accusantium', + currency_rate=2062.3, + id='e8dc626f-f77c-4656-b5f5-b70e3e4cfcc6', + note='dolorum', + paid_on_date='cupiditate', + reference='ab', + total_amount=8969.21, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='culpa', - currency='alias', - currency_rate=1759.37, - total_amount=5500.66, + allocated_on_date='maxime', + currency='veniam', + currency_rate=1816.73, + total_amount=3974.18, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='c3e951a1-e30f-4da9-a648-9d7b78673e13', - name='Arthur Dare', + id='24d00014-ef45-4cea-91ac-53ebb6587f34', + name='Megan Bergnaum', ), - currency='rerum', - currency_rate=5872.48, - id='92494594-487f-45c8-8383-6b86b3cdf641', - note='minima', - paid_on_date='facilis', - reference='sit', - total_amount=2799.72, + currency='ipsam', + currency_rate=7395.69, + id='9acee400-ae9f-492c-af1b-025f1d14718c', + note='nisi', + paid_on_date='voluptatibus', + reference='est', + total_amount=1274.87, ), ), ], - reference='magnam', - source_modified_date='molestias', - sub_total=9417.1, + reference='doloribus', + source_modified_date='mollitia', + sub_total=8418.47, supplemental_data=shared.SupplementalData( content={ - "repellendus": { - "dicta": 'ratione', - "delectus": 'ut', - "officiis": 'itaque', - "nulla": 'distinctio', - }, - "recusandae": { - "deleniti": 'tempore', - "reiciendis": 'commodi', - }, - "sit": { - "molestias": 'quia', - "ipsam": 'rem', + "cumque": { + "commodi": 'porro', }, }, ), - tax_amount=5640.67, - total_amount=2626.64, + tax_amount=3298.49, + total_amount=8155.84, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=898366, + timeout_in_minutes=571303, ) res = s.direct_costs.create(req) @@ -298,7 +380,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DownloadDirectCostAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -328,7 +409,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetDirectCostRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -357,7 +437,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetDirectCostAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -379,7 +458,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. ### Example Usage @@ -393,7 +472,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateDirectCostsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -421,14 +499,13 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListDirectCostsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', order_by='-modifiedDate', page=1, page_size=100, - query='culpa', + query='exercitationem', ) res = s.direct_costs.list(req) @@ -453,7 +530,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListDirectCostAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -482,11 +558,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UploadDirectCostAttachmentRequest( request_body=operations.UploadDirectCostAttachmentRequestBody( - content='in'.encode(), - request_body='aliquid', + content='quaerat'.encode(), + request_body='in', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', diff --git a/accounting/docs/directincomes/README.md b/accounting/docs/directincomes/README.md index 0455b029c..57cc4effa 100755 --- a/accounting/docs/directincomes/README.md +++ b/accounting/docs/directincomes/README.md @@ -23,7 +23,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. ### Example Usage @@ -37,139 +37,219 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateDirectIncomeRequest( direct_income=shared.DirectIncome( contact_ref=shared.ContactRef( - data_type='amet', - id='d5c72795-b785-4148-96d5-49e5635b33bc', + data_type='magni', + id='cdd14fc4-3b70-4bca-88fa-70c43351c3dd', ), - currency='voluptatem', - currency_rate=9791.61, - id='970c42fc-9f48-4442-a5e7-5b796065c0ef', - issue_date='culpa', + currency='beatae', + currency_rate=8962.8, + id='b8f7f75f-4f23-4f1c-8a58-6c3ae7d7b67f', + issue_date='officiis', line_items=[ shared.DirectIncomeLineItem( account_ref=shared.AccountRef( - id='f93b90a1-b8c9-45be-9254-b739f4fe7721', - name='Muriel Carroll', + id='f5e142d9-5b1d-4bec-aff7-c4b156e92782', + name='Holly Toy', ), - description='exercitationem', - discount_amount=3381.01, - discount_percentage=5546.44, + description='esse', + discount_amount=3851.06, + discount_percentage=5122.23, item_ref=shared.ItemRef( - id='c99c722d-2bc0-4f94-887d-9caae042dd7c', - name='Carlton Schowalter', + id='17468063-f799-4b79-96c0-b0fa0bb20a40', + name='Roland Ryan', ), - quantity=2667.52, - sub_total=7955.01, - tax_amount=6633.35, + quantity=8828.41, + sub_total=3996.96, + tax_amount=3081.27, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6360.7, - id='1cfe9e15-df90-4390-bf37-831983d42e54', - name='Ken Herzog', + effective_tax_rate=498.27, + id='64272657-b01a-407c-88fd-3921c257930d', + name='Elisa Bailey', ), - total_amount=4168.84, + total_amount=6488.15, tracking_category_refs=[ shared.TrackingCategoryRef( - id='97c50233-c147-41d5-9aaa-6ddf5abd6487', - name='Bill Wisoky', + id='efa46d36-6dfa-4101-9a09-1b3ec8b53862', + name='Alonzo Bins', ), + ], + unit_amount=8706.71, + ), + shared.DirectIncomeLineItem( + account_ref=shared.AccountRef( + id='14fe72e5-21f9-4030-bdfc-338397fffa6d', + name='Meredith Dickinson V', + ), + description='alias', + discount_amount=9869.41, + discount_percentage=7770.83, + item_ref=shared.ItemRef( + id='157ac9fe-1961-4ce9-be41-c869dd7d9719', + name='Michael Kulas', + ), + quantity=154.46, + sub_total=498.92, + tax_amount=6470.89, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=3619.89, + id='8ffd2967-df8f-4d88-aa8e-60be620cd9c5', + name='Darrin Schuppe II', + ), + total_amount=7561.02, + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='752512be-ae1d-487e-8c5f-dcea8e7a8831', + name='Lucy Howell', + ), + ], + unit_amount=8726.91, + ), + shared.DirectIncomeLineItem( + account_ref=shared.AccountRef( + id='a6d77c1d-8606-4623-bd42-27866db8a749', + name='Glenn McLaughlin', + ), + description='exercitationem', + discount_amount=988.25, + discount_percentage=1089.18, + item_ref=shared.ItemRef( + id='cc75e4f0-c004-4b5b-b758-cc94562f0069', + name='Gwendolyn Hickle', + ), + quantity=8194.9, + sub_total=955.55, + tax_amount=6650.46, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=1149.02, + id='73d84bbe-24f2-4983-8afb-0735cb6285d4', + name='Fred Mitchell', + ), + total_amount=6662.15, + tracking_category_refs=[ shared.TrackingCategoryRef( - id='b862a00b-ef69-4e10-8157-630bda7afded', - name='Eddie Murazik', + id='e169156f-7d2e-4e20-9505-bf03a93e9448', + name='Myra Pfannerstill', ), ], - unit_amount=6774.73, + unit_amount=9771.81, ), shared.DirectIncomeLineItem( account_ref=shared.AccountRef( - id='41238e1a-735a-4c26-ae33-bef971a8f46b', - name='Mr. Angelo Brakus', + id='b1078903-2ac3-4331-b2e2-dd79ec74ba7e', + name='Jaime Schuster', ), - description='delectus', - discount_amount=8871.37, - discount_percentage=6076.72, + description='ipsum', + discount_amount=4175.44, + discount_percentage=9669.27, item_ref=shared.ItemRef( - id='65b711d0-8cf8-48ec-9f7b-99a550a656ed', - name='Paula Frami', + id='d1ccc341-c865-4734-b4f0-a740fb4ab441', + name='Ms. Dale Nolan', ), - quantity=375.63, - sub_total=7773.99, - tax_amount=8863.66, + quantity=4588.95, + sub_total=4145.21, + tax_amount=2428.43, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=5147.78, - id='aa65432a-986e-4b7e-94ca-564089150097', - name='Catherine Mitchell', + effective_tax_rate=5966.4, + id='95d808bb-e794-4455-abc5-50a1c426b59c', + name='Rodney Jerde', ), - total_amount=5264.96, + total_amount=8142.27, tracking_category_refs=[ shared.TrackingCategoryRef( - id='88ece7bf-904e-4011-85d3-8908162c6beb', - name='Dr. Mattie Nader', + id='c135582c-1b85-45e8-89d9-ef932e9000a1', + name='Sandy Stokes Sr.', ), shared.TrackingCategoryRef( - id='57b7d03a-1480-4f8d-a30f-069d810618d9', - name='Alyssa Casper', + id='4208efd2-3411-4898-a738-79efbe8baeba', + name='Geoffrey Kuhic', ), shared.TrackingCategoryRef( - id='297510da-8031-4229-acc6-1c2a702bb97e', - name='Carl Batz', + id='536e9035-1bb9-4763-9720-b77a5a5365a7', + name='Timmy Bernier', ), shared.TrackingCategoryRef( - id='a2de35f8-e01b-4f33-aaab-45402ac1704b', - name='Justin Schmitt', + id='71f01c0d-361f-4ed8-9c5e-ffb453e9089e', + name='Roland Bode', ), ], - unit_amount=9890.79, + unit_amount=7471.07, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='maxime', - note='ex', + modified_date='ut', + note='at', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='deserunt', - currency='laborum', - currency_rate=9299.41, - total_amount=3241.51, + allocated_on_date='perspiciatis', + currency='molestiae', + currency_rate=7361.58, + total_amount=8169.35, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='eb5f0c49-2b57-444d-88a2-267aaee79e3c', - name='Martha Orn', + id='d9c985e4-3734-4a5d-b2d9-edd785be5e7a', + name='Sheldon Hermann', ), - currency='et', - currency_rate=7321.72, - id='ecb83d23-78ae-43bf-823d-9450a986a495', - note='cum', - paid_on_date='dolorum', - reference='quod', - total_amount=4715.35, + currency='occaecati', + currency_rate=4720.94, + id='ba6281f4-4e3a-4233-94a6-8cc80d30ff72', + note='illo', + paid_on_date='aliquid', + reference='quaerat', + total_amount=8368.03, + ), + ), + shared.Items( + allocation=shared.ItemsAllocation( + allocated_on_date='alias', + currency='deserunt', + currency_rate=5794.14, + total_amount=1167.29, + ), + payment=shared.PaymentAllocationPayment( + account_ref=shared.AccountRef( + id='fe9d9655-3b89-4e00-89c6-692de7b35622', + name='Christine Nikolaus', + ), + currency='error', + currency_rate=7417.47, + id='4ae7b1a5-b908-4d4e-b049-1aa35d4a839f', + note='consequatur', + paid_on_date='ipsum', + reference='quidem', + total_amount=6785.88, ), ), ], - reference='quae', - source_modified_date='ducimus', - sub_total=9483.77, + reference='quidem', + source_modified_date='molestiae', + sub_total=4410.01, supplemental_data=shared.SupplementalData( content={ - "ex": { - "magni": 'laudantium', - "repudiandae": 'minus', - "porro": 'atque', + "occaecati": { + "blanditiis": 'a', + }, + "aut": { + "dicta": 'dolor', + }, + "iste": { + "ut": 'exercitationem', + "sit": 'reprehenderit', + "officiis": 'accusantium', }, }, ), - tax_amount=4203.54, - total_amount=2588.07, + tax_amount=9159.68, + total_amount=2348.84, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=599915, + timeout_in_minutes=577369, ) res = s.direct_incomes.create(req) @@ -194,7 +274,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DownloadDirectIncomeAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -224,11 +303,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetDirectIncomeRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='sunt', + direct_income_id='impedit', ) res = s.direct_incomes.get(req) @@ -253,13 +331,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetDirectIncomeAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', direct_income_id='8a210b68-6988-11ed-a1eb-0242ac120002', - timeout_in_minutes=226197, + timeout_in_minutes=461855, ) res = s.direct_incomes.get_attachment(req) @@ -276,7 +353,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. ### Example Usage @@ -290,7 +367,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateDirectIncomesModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -318,14 +394,13 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListDirectIncomesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', order_by='-modifiedDate', page=1, page_size=100, - query='laudantium', + query='saepe', ) res = s.direct_incomes.list(req) @@ -350,7 +425,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListDirectIncomeAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -379,15 +453,14 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UploadDirectIncomeAttachmentRequest( request_body=operations.UploadDirectIncomeAttachmentRequestBody( - content='commodi'.encode(), - request_body='a', + content='odit'.encode(), + request_body='consectetur', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='aliquid', + direct_income_id='itaque', ) res = s.direct_incomes.upload_attachment(req) diff --git a/accounting/docs/financials/README.md b/accounting/docs/financials/README.md deleted file mode 100755 index 2cbf0b45b..000000000 --- a/accounting/docs/financials/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# financials - -## Overview - -Financials - -### Available Operations - -* [get_balance_sheet](#get_balance_sheet) - Get balance sheet -* [get_cash_flow_statement](#get_cash_flow_statement) - Get cash flow statement -* [get_profit_and_loss](#get_profit_and_loss) - Get profit and loss - -## get_balance_sheet - -Gets the latest balance sheet for a company. - -### Example Usage - -```python -import codataccounting -from codataccounting.models import operations - -s = codataccounting.CodatAccounting( - security=shared.Security( - auth_header="YOUR_API_KEY_HERE", - ), -) - - -req = operations.GetBalanceSheetRequest( - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - period_length=181836, - periods_to_compare=754041, - start_month='perspiciatis', -) - -res = s.financials.get_balance_sheet(req) - -if res.balance_sheet is not None: - # handle response -``` - -## get_cash_flow_statement - -Gets the latest cash flow statement for a company. - -### Example Usage - -```python -import codataccounting -from codataccounting.models import operations - -s = codataccounting.CodatAccounting( - security=shared.Security( - auth_header="YOUR_API_KEY_HERE", - ), -) - - -req = operations.GetCashFlowStatementRequest( - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - period_length=431723, - periods_to_compare=576232, - start_month='eligendi', -) - -res = s.financials.get_cash_flow_statement(req) - -if res.cash_flow_statement is not None: - # handle response -``` - -## get_profit_and_loss - -Gets the latest profit and loss for a company. - -### Example Usage - -```python -import codataccounting -from codataccounting.models import operations - -s = codataccounting.CodatAccounting( - security=shared.Security( - auth_header="YOUR_API_KEY_HERE", - ), -) - - -req = operations.GetProfitAndLossRequest( - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - period_length=276507, - periods_to_compare=790080, - start_month='quod', -) - -res = s.financials.get_profit_and_loss(req) - -if res.profit_and_loss_report is not None: - # handle response -``` diff --git a/accounting/docs/invoices/README.md b/accounting/docs/invoices/README.md index 03eaf7b56..142cfc57c 100755 --- a/accounting/docs/invoices/README.md +++ b/accounting/docs/invoices/README.md @@ -20,7 +20,7 @@ Invoices ## create -Posts a new invoice to the accounting package for a given company. +Posts a new invoice to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update invoice model](https://docs.codat.io/accounting-api#/operations/get-create-update-invoices-model). @@ -40,309 +40,333 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateInvoiceRequest( invoice=shared.Invoice( - additional_tax_amount=3856.2, - additional_tax_percentage=6970.56, - amount_due=4400.63, - currency='praesentium', - currency_rate=5207.16, + additional_tax_amount=7733.49, + additional_tax_percentage=6927.98, + amount_due=289.46, + currency='voluptas', + currency_rate=447.24, customer_ref=shared.CustomerRef( - company_name='error', - id='0a3fd3c8-1da1-40f8-823d-f931da3edb51', + company_name='numquam', + id='652e23a3-d6c6-457e-9de8-f7f002d1986a', ), - discount_percentage=9961.99, - due_date='est', - id='d94acc94-3513-4772-ad15-321b832a56d6', - invoice_number='sint', - issue_date='architecto', + discount_percentage=6416.3, + due_date='natus', + id='9d3a1d32-329e-4458-b7e8-f2ad6bb10e25', + invoice_number='ipsam', + issue_date='reiciendis', line_items=[ shared.InvoiceLineItem( account_ref=shared.AccountRef( - id='0ff60eb9-a665-48e6-9a4b-843d382dbec7', - name='Jacquelyn Jast', + id='c480d6e3-3086-475c-bf18-6856a7e82cdf', + name='Sammy Barrows', ), - description='autem', - discount_amount=163.03, - discount_percentage=3914.99, + description='fugit', + discount_amount=5376.88, + discount_percentage=1666.02, is_direct_income=False, item_ref=shared.ItemRef( - id='59468ce3-04d8-4849-bf82-14c337f96bb0', - name='Cecil Mohr', + id='c666af3c-3f55-489b-aa5d-264e41e2ca84', + name='Bobby Crooks', ), - quantity=4625.93, - sub_total=1436.68, - tax_amount=8176.23, + quantity=684, + sub_total=2081.12, + tax_amount=9914.72, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=7291.09, - id='1344ba9f-78a5-4c0e-97aa-b62e97261fb0', - name='Jerome Lowe', + effective_tax_rate=4176.65, + id='d9d2ad37-c309-4907-bc10-b68792163e67', + name='Kyle Ledner', ), - total_amount=4514.48, + total_amount=608.42, tracking=shared.Propertiestracking1( category_refs=[ shared.TrackingCategoryRef( - id='51996b5b-4b50-4eef-b12b-7a7ab0344b17', - name='Nancy Johnson', + id='43c0a304-9c3c-4f6c-8276-e7b21bad90d2', + name='April Frami', ), shared.TrackingCategoryRef( - id='deebef89-7f3d-4d0c-8d33-f11b3e4e080a', - name='Terry Bednar IV', + id='6c2a10e6-c297-48ec-a56a-5b09227fcc47', + name='Wendell Huels', ), + ], + customer_ref=shared.CustomerRef( + company_name='esse', + id='7bbc57f3-8928-4a86-80c5-8d67d63e4aa5', + ), + is_billed_to=shared.BilledToType1.NOT_APPLICABLE, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, + project_ref=shared.ProjectRef( + id='464579cf-c6c0-4e50-bf56-831f1d8ed87b', + name='Christy Walter', + ), + ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='abc986e2-41e4-43b2-b424-17d13e3f62aa', + name='Shannon Walker', + ), + shared.TrackingCategoryRef( + id='e8ab4a9c-492c-45e8-ba5d-4aa4a508bd38', + name='Kara Cremin', + ), + shared.TrackingCategoryRef( + id='a8dd71bd-daa3-40b7-b914-49ae69c088d4', + name='Cassandra Rice', + ), + shared.TrackingCategoryRef( + id='1804f423-d543-4935-b377-ac5c9b7e93b6', + name='Earl Ruecker', + ), + ], + unit_amount=2263.68, + ), + shared.InvoiceLineItem( + account_ref=shared.AccountRef( + id='105e7c34-cab0-4ecb-812a-66148944a8e9', + name='Ms. Jennie Hartmann', + ), + description='nam', + discount_amount=7904.63, + discount_percentage=1817.55, + is_direct_income=False, + item_ref=shared.ItemRef( + id='53825334-3fb0-4a4e-a6ea-47578d171e29', + name='Ms. Christine Leannon', + ), + quantity=7630.13, + sub_total=3993.59, + tax_amount=4504.05, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=5874.59, + id='b6b2f253-59b8-455d-815b-62c8b83a38a8', + name='Dwayne MacGyver I', + ), + total_amount=2857.2, + tracking=shared.Propertiestracking1( + category_refs=[ shared.TrackingCategoryRef( - id='6ec759e0-2f37-402c-9c8e-2d30ead3104f', - name='Theodore Gerlach IV', + id='00c2caeb-1ae1-4ecf-8c34-946bba7a05a8', + name='Oscar O'Connell', ), ], customer_ref=shared.CustomerRef( - company_name='rerum', - id='f375b442-8282-41fd-b2f6-9e59267c71cc', + company_name='impedit', + id='5b3688cc-a363-4272-b60e-966e97e05410', ), - is_billed_to=shared.BilledToTypeEnum1.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToTypeEnum1.PROJECT, + is_billed_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.UNKNOWN, project_ref=shared.ProjectRef( - id='3cd4258d-0358-4a82-8808-fe2751a2047c', - name='Marjorie Funk', + id='47d78ff2-4911-445f-ab9e-59a4af336664', + name='Gerard O'Conner', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='43f9619b-b7d4-40d5-a11f-a436e6259233', - name='Luther Hane', + id='2ff14e8c-1b35-42ac-8eda-cc5227814eca', + name='Alice Kautzer', + ), + shared.TrackingCategoryRef( + id='41ea1342-d410-44a2-9ef7-1de57a11d614', + name='Ms. Eddie Frami', + ), + shared.TrackingCategoryRef( + id='92ea4867-3d52-42b8-a8a9-030660f024c7', + name='Abraham Goyette', + ), + shared.TrackingCategoryRef( + id='64c2b3a3-2c48-48ad-a62f-6aa558a65e20', + name='Mrs. Marvin Armstrong', ), ], - unit_amount=8428.91, + unit_amount=6853.65, ), shared.InvoiceLineItem( account_ref=shared.AccountRef( - id='237397c7-85b5-4db4-b500-183febdf676b', - name='Andrea Bashirian', + id='34bb87d4-f621-427a-a07d-1606294514c3', + name='Preston McCullough', ), - description='deserunt', - discount_amount=7054.18, - discount_percentage=4503.12, + description='omnis', + discount_amount=9600.37, + discount_percentage=2360.34, is_direct_income=False, item_ref=shared.ItemRef( - id='50052a56-47ed-4c43-9ed8-c4320f41240d', - name='Eva Lebsack', + id='8bd2be87-8703-4493-b49a-a8465a328327', + name='Miss Cesar Konopelski', ), - quantity=7842.87, - sub_total=3778.95, - tax_amount=5909.98, + quantity=707.2, + sub_total=7573.22, + tax_amount=8840.57, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=2042.83, - id='b94c3b9d-2488-4d79-9aa4-2fc405669f69', - name='Frank Batz', + effective_tax_rate=6422.68, + id='673d86e3-b35e-449a-b135-778ce54cacb0', + name='Chris Terry', ), - total_amount=1466.93, + total_amount=4960.42, tracking=shared.Propertiestracking1( category_refs=[ shared.TrackingCategoryRef( - id='24945081-9d7c-43b1-b418-44060e00310d', - name='Norma Frami', + id='045bacf6-3b21-4518-aab5-e3a022614315', + name='Dennis Heathcote', + ), + shared.TrackingCategoryRef( + id='299e61af-c718-46ff-a0b7-a73df40ca0d7', + name='Erin Kihn III', ), ], customer_ref=shared.CustomerRef( - company_name='error', - id='01f5afd2-a6c4-4484-aae9-d89253c8962f', + company_name='eius', + id='1bbf0552-71b2-4511-9d60-6dd1b28272bc', ), - is_billed_to=shared.BilledToTypeEnum1.UNKNOWN, - is_rebilled_to=shared.BilledToTypeEnum1.NOT_APPLICABLE, + is_billed_to=shared.BilledToType1.NOT_APPLICABLE, + is_rebilled_to=shared.BilledToType1.PROJECT, project_ref=shared.ProjectRef( - id='96bf51e4-652d-43c3-83d6-1778af491247', - name='Anne Hamill', + id='3221697b-1880-4fcb-b2b9-3c15f670bd17', + name='Francis Labadie III', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='1909e910-44a5-4de5-9ac7-706670cf1cf5', - name='Jeffery Dibbert II', + id='3eeb3b6e-241c-4310-9983-663c66dcbb7d', + name='Gilbert Schaden V', + ), + shared.TrackingCategoryRef( + id='c8b408e0-7137-474d-a4fe-e101d9780a10', + name='Frederick Kub', ), ], - unit_amount=1280.87, + unit_amount=3444.01, ), shared.InvoiceLineItem( account_ref=shared.AccountRef( - id='51e66bb4-2689-47d9-9a2d-335670e93ee6', - name='Dominick Hammes', + id='040d6c8b-2a5f-4002-a07e-4048f90009ed', + name='Violet Baumbach', ), - description='dolorem', - discount_amount=3687.85, - discount_percentage=5295.29, + description='quos', + discount_amount=8818.91, + discount_percentage=6977.83, is_direct_income=False, item_ref=shared.ItemRef( - id='aaeacae3-23a3-41bf-bba1-cc97716c802c', - name='Dr. Kirk Veum', + id='4ae9d641-61e9-4150-8323-b2c09b924771', + name='Herman Howe', ), - quantity=8218.96, - sub_total=6105.84, - tax_amount=8294.02, + quantity=9129.86, + sub_total=3652.88, + tax_amount=7053.17, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=2051.2, - id='23f1aa63-ed9c-4f1c-856b-cba51ef2454a', - name='Marlene Wolf', + effective_tax_rate=4498.47, + id='ec762664-9d84-4eb9-a4cf-d2276e0b88fb', + name='Brad Stoltenberg', ), - total_amount=9973.54, + total_amount=6278.38, tracking=shared.Propertiestracking1( category_refs=[ shared.TrackingCategoryRef( - id='16cdd544-4a75-4628-b3c7-dd9efaf43dc6', - name='Victoria Jenkins DVM', + id='b6e8dbf8-12f8-43b1-8a6a-9ffc561929cc', + name='Tracy Hilll MD', + ), + shared.TrackingCategoryRef( + id='1395918d-a1d4-48e7-8e3c-f8e1143da930', + name='Robin Cummerata', ), ], customer_ref=shared.CustomerRef( - company_name='nesciunt', - id='138f30df-3db0-422f-aa56-5fb8f652ebb9', + company_name='aut', + id='8af22184-439b-43de-8756-ccce470cd214', ), - is_billed_to=shared.BilledToTypeEnum1.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum1.UNKNOWN, + is_billed_to=shared.BilledToType1.NOT_APPLICABLE, + is_rebilled_to=shared.BilledToType1.PROJECT, project_ref=shared.ProjectRef( - id='83838790-243b-4293-9ab3-0e917f50fda0', - name='Francis Lesch MD', + id='6e6152cf-01d0-4d8c-ba4b-9a5bf935dfe9', + name='Debbie Zieme', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='55a292b0-bc3b-4b74-8664-eb1d03388b0d', - name='Ms. Jeannette Price', + id='1e9c097e-da62-4344-ae1a-9237e9984c80', + name='Alexander Koss', ), shared.TrackingCategoryRef( - id='fee74b6f-eb94-457c-beda-f39d16fbf76f', - name='Andrew Kerluke', + id='891923c1-8ca8-4d69-8568-9214fa20207e', + name='Marta Murphy I', ), shared.TrackingCategoryRef( - id='303e3023-b93e-4343-96cf-55b4313553cc', - name='Justin Schaefer II', + id='8cd7f1bc-2cab-4af7-bc2c-cba4bef0df68', + name='Shaun Swift', ), ], - unit_amount=8084.57, + unit_amount=1625.48, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='labore', - note='culpa', - paid_on_date='illum', + modified_date='earum', + note='necessitatibus', + paid_on_date='quam', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='minus', - currency='sint', - currency_rate=5786.36, - total_amount=286.46, + allocated_on_date='expedita', + currency='itaque', + currency_rate=40.87, + total_amount=4114.07, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='4c5195b8-648c-4efa-b8f1-e2d3b901e095', - name='Beulah Pouros', + id='9fb36add-7040-480e-8a3f-c73a5a034b11', + name='Bobbie Mayer', ), - currency='minus', - currency_rate=6917.42, - id='b19f713d-95a4-4169-8138-7271e18ea9e4', - note='veniam', - paid_on_date='illo', - reference='illo', - total_amount=5361.81, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='quisquam', - currency='fugit', - currency_rate=7587.36, - total_amount=7784.03, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='57fbd60b-1a78-4ed2-9a9d-4eea85658c2d', - name='Dixie Hackett', - ), - currency='quas', - currency_rate=6955.11, - id='e4f278fd-9667-4e46-851d-2ffaa58dcef2', - note='ratione', - paid_on_date='quaerat', - reference='minus', - total_amount=6170.85, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='nostrum', - currency='veniam', - currency_rate=7312.33, - total_amount=6180.63, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='bdf2190a-bd9b-4bcc-a725-ec2659ce0280', - name='Jesus Abernathy', - ), - currency='excepturi', - currency_rate=9071.7, - id='f68e45c8-addf-4ac7-9450-0430c6632b43', - note='provident', - paid_on_date='inventore', - reference='sapiente', - total_amount=8387.98, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='sapiente', - currency='ipsa', - currency_rate=1140.37, - total_amount=7509.59, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='3e91e8f7-bc69-4d46-8a77-eceb26d10f1e', - name='Alan Howell DDS', - ), - currency='nihil', - currency_rate=7867.65, - id='0f0f873f-9d5c-425f-93e0-b4a4a4253c30', - note='consequuntur', - paid_on_date='ullam', - reference='molestiae', - total_amount=1037.45, + currency='ratione', + currency_rate=6253.92, + id='fa6987a4-72b7-409a-953e-22301068539c', + note='saepe', + paid_on_date='ipsa', + reference='perspiciatis', + total_amount=2348.29, ), ), ], sales_order_refs=[ - 'maiores', + shared.SalesOrderRef( + data_type='repellendus', + id='10acd15d-8cc3-406b-b86b-3d37bd204a1f', + ), ], - source_modified_date='labore', - status=shared.InvoiceStatusEnum.UNKNOWN, - sub_total=8074.3, + source_modified_date='ipsum', + status=shared.InvoiceStatus.DRAFT, + sub_total=378.08, supplemental_data=shared.SupplementalData( content={ - "recusandae": { - "pariatur": 'porro', - "enim": 'tempora', + "rerum": { + "ex": 'voluptatibus', + }, + "voluptas": { + "odio": 'dolorum', + "eius": 'praesentium', }, - "voluptatum": { - "itaque": 'sit', - "excepturi": 'recusandae', - "numquam": 'architecto', + "corporis": { + "provident": 'quod', }, }, ), - total_amount=6845.98, - total_discount=4808.29, - total_tax_amount=6330.56, + total_amount=2245.24, + total_discount=2424.79, + total_tax_amount=4619.68, withholding_tax=[ shared.WithholdingTaxitems( - amount=816.73, - name='Mr. Leticia Nitzsche', + amount=5749.23, + name='Christina Luettgen', + ), + shared.WithholdingTaxitems( + amount=5522.12, + name='Vicki Reilly I', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=289108, + timeout_in_minutes=784316, ) res = s.invoices.create(req) @@ -353,11 +377,32 @@ if res.create_invoice_response is not None: ## delete -Deletes an invoice from the accounting package for a given company. +The _Delete Invoices_ endpoint allows you to delete a specified Invoice from an accounting platform. + +### Process +1. Pass the `{invoiceId}` to the _Delete Invoices_ 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](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). + + A `Success` status indicates that the Invoice object was deleted from the accounting platform. +3. (Optional) Check that the Invoice was deleted from the accounting platform. + +### Effect on related objects + +Be aware that deleting an Invoice from an accounting platform might cause related objects to be modified. For example, if you delete a paid invoice from QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The 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 Deleted | +|-------------|--------------| +| QuickBooks Online | Yes | > **Supported Integrations** > > This functionality is currently only supported for our QuickBooks Online integration. 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. +> We're increasing support for object deletion across various accounting platforms and data types. You can check our [Accounting API Public Product Roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) for the latest status. ### Example Usage @@ -371,7 +416,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DeleteInvoiceRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -386,7 +430,7 @@ if res.push_operation_summary is not None: ## download_attachment -Download invoice attachments +Download invoice attachment. ### Example Usage @@ -400,8 +444,7 @@ s = codataccounting.CodatAccounting( ), ) - -req = operations.DownloadInvoiceAttachmentRequest( +req = operations.DownloadInvoicesAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -416,7 +459,7 @@ if res.data is not None: ## download_pdf -Get invoice as PDF +Download invoice as a pdf. ### Example Usage @@ -430,7 +473,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DownloadInvoicePdfRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', invoice_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -444,7 +486,7 @@ if res.data is not None: ## get -Get invoice +Get an invoice. ### Example Usage @@ -458,7 +500,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetInvoiceRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', invoice_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -472,7 +513,7 @@ if res.invoice is not None: ## get_attachment -Get invoice attachment +Get invoice attachment. ### Example Usage @@ -486,7 +527,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetInvoiceAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -502,7 +542,7 @@ if res.attachment is not None: ## get_create_update_model -Get create/update invoice model. Returns the expected data for the request payload. +Get create/update invoice model. Returns the expected data for the request payload. See the examples for integration-specific indicative models. @@ -522,7 +562,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateInvoicesModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -536,7 +575,7 @@ if res.push_option is not None: ## list -Gets the latest invoices for a company, with pagination +Gets the latest invoices for a company, with pagination. ### Example Usage @@ -550,13 +589,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListInvoicesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='harum', + query='nihil', ) res = s.invoices.list(req) @@ -567,7 +605,7 @@ if res.invoices is not None: ## list_attachments -List invoice attachments +List invoice attachments ### Example Usage @@ -581,7 +619,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListInvoiceAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -596,13 +633,14 @@ if res.attachments_dataset is not None: ## update -Posts an updated invoice to the accounting package for a given company. +Posts an updated invoice to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create/update invoice model](https://docs.codat.io/accounting-api#/operations/get-create-update-invoices-model). > **Supported Integrations** > > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support updating invoices. +operationId: update-invoice ### Example Usage @@ -616,224 +654,346 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateInvoiceRequest( invoice=shared.Invoice( - additional_tax_amount=6791.83, - additional_tax_percentage=5932.05, - amount_due=8445.45, - currency='ipsam', - currency_rate=5928.98, + additional_tax_amount=9937.18, + additional_tax_percentage=8210.46, + amount_due=1600.93, + currency='odit', + currency_rate=3147.32, customer_ref=shared.CustomerRef( - company_name='omnis', - id='88192cfd-0c77-4c53-a7e7-d4ee6e8b90ba', + company_name='debitis', + id='47871a88-ed72-4a2d-8af4-158ac2d0f0f5', ), - discount_percentage=7821.55, - due_date='consectetur', - id='84e23967-03fe-4c31-8508-24d189a36a6b', - invoice_number='sunt', - issue_date='facere', + discount_percentage=5522.56, + due_date='optio', + id='3b87b470-40d0-4d98-a9d8-2c5e306f5576', + invoice_number='maiores', + issue_date='nemo', line_items=[ shared.InvoiceLineItem( account_ref=shared.AccountRef( - id='7eb707aa-60c8-4fe4-ae61-77db9db3b70f', - name='Jonathon Quigley', + id='deb0286d-0bc4-43b1-8ab3-78f2fcff81dd', + name='Ms. Lance Thiel', ), - description='ducimus', - discount_amount=451.76, - discount_percentage=9196.52, + description='repellat', + discount_amount=4819.23, + discount_percentage=2892.95, is_direct_income=False, item_ref=shared.ItemRef( - id='e770e360-97ef-47c2-86e6-1b0d308714c2', - name='Genevieve Erdman', + id='ef54c921-6e89-4263-93bb-6fc2c8d27010', + name='Duane Pouros', ), - quantity=5444.06, - sub_total=4105.74, - tax_amount=1937.94, + quantity=6641.93, + sub_total=8554.62, + tax_amount=3899.32, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=4604.15, - id='ca85c3fe-6557-44db-af94-a7c98f13af28', - name='Pete Crona', + effective_tax_rate=8980.86, + id='3e1d9d3b-6603-434a-91aa-1d5d2247de9b', + name='Meredith Greenfelder IV', ), - total_amount=1646.09, + total_amount=514.52, tracking=shared.Propertiestracking1( category_refs=[ shared.TrackingCategoryRef( - id='f4f3ded3-56d7-4e14-b21c-d98196d55af6', - name='Hubert Casper', + id='768a96bb-3987-4883-98eb-a1bbf7143356', + name='Marc Fay', + ), + shared.TrackingCategoryRef( + id='a164249b-211c-4e46-b951-652b158ca914', + name='Johanna Bartoletti', ), shared.TrackingCategoryRef( - id='b79ae336-81c2-43c3-9a7c-0e17cb12c5ba', - name='Steve Herzog', + id='632b31ca-d692-4ffc-8745-005e9d3d934e', + name='Sheila Jerde', ), shared.TrackingCategoryRef( - id='22cd5cba-6fbf-4ec9-b2af-6813d65bfece', - name='Fred Shields', + id='c388664f-6985-4530-a2e2-aed6aaf863c2', + name='Clint Beatty DDS', ), ], customer_ref=shared.CustomerRef( - company_name='provident', - id='16f7fc7d-da70-4ec6-8e60-75894d61c14c', + company_name='vel', + id='9a3d906f-6ebd-45ad-bec7-394f25f634b3', ), - is_billed_to=shared.BilledToTypeEnum1.PROJECT, - is_rebilled_to=shared.BilledToTypeEnum1.NOT_APPLICABLE, + is_billed_to=shared.BilledToType1.NOT_APPLICABLE, + is_rebilled_to=shared.BilledToType1.UNKNOWN, project_ref=shared.ProjectRef( - id='0227e37c-0d97-47f1-a549-1abe9751b106', - name='Clarence Dicki I', + id='0714e6be-8c3e-409c-a4d3-42ac299a6e5e', + name='Lee Weber I', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='69815aae-99fc-4de9-a729-c9d4f2d8a446', - name='Mary Schamberger', + id='02e945f5-3743-4efd-a119-8221f9b1f7d9', + name='Amos Wilkinson', ), shared.TrackingCategoryRef( - id='0db73a2f-93f4-467d-80d8-da56122026ab', - name='Emmett Davis', + id='9682acee-fb04-4f8c-912c-aabea708ed57', + name='Wallace Schultz', + ), + ], + unit_amount=3304.22, + ), + shared.InvoiceLineItem( + account_ref=shared.AccountRef( + id='d460599d-5c33-4495-b6d5-5209e9a2253b', + name='Elena Kreiger', + ), + description='praesentium', + discount_amount=5156.7, + discount_percentage=3967.41, + is_direct_income=False, + item_ref=shared.ItemRef( + id='eeae5fd4-b39f-48a1-8906-78f13c686d83', + name='Amos Roob', + ), + quantity=756.85, + sub_total=4594.79, + tax_amount=3137.17, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=9721.89, + id='fa906ae5-59b7-42eb-a746-030fe18376c2', + name='Merle Strosin', + ), + total_amount=4381.93, + tracking=shared.Propertiestracking1( + category_refs=[ + shared.TrackingCategoryRef( + id='790ed0c1-6a7b-4a47-8404-489f6770ef04', + name='Miss Brian McCullough', + ), + shared.TrackingCategoryRef( + id='ba25ee6c-75af-48a6-8a7a-e346e0979e5a', + name='Miss Darrel Keeling', + ), + ], + customer_ref=shared.CustomerRef( + company_name='culpa', + id='ca645de9-8675-451a-9cce-61ec2c79a39a', + ), + is_billed_to=shared.BilledToType1.PROJECT, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, + project_ref=shared.ProjectRef( + id='a4d5a65b-4d55-462d-9b7d-9e2d6fcf5576', + name='Bobbie Stoltenberg', ), + ), + tracking_category_refs=[ shared.TrackingCategoryRef( - id='485c1976-af98-40da-ba08-9fc44db27453', - name='Rochelle Hermiston', + id='5c3a8902-82a5-41f4-9cf6-796ed3d724c1', + name='Jerald Hand PhD', ), shared.TrackingCategoryRef( - id='7c6d0cbc-fdcd-4334-b6f6-23bcecab50ae', - name='Dr. Alvin Weber', + id='98cce3f7-1660-40da-8e3a-a61c6fe09d85', + name='Shelia Hand', ), ], - unit_amount=5565.17, + unit_amount=2018.2, ), - ], - metadata=shared.Metadata( - is_deleted=False, - ), - modified_date='cum', - note='sint', - paid_on_date='laborum', - payment_allocations=[ - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='nisi', - currency='id', - currency_rate=8611.66, - total_amount=202.23, + shared.InvoiceLineItem( + account_ref=shared.AccountRef( + id='2c8c7c3c-710e-4167-bd90-5cb4bedef3c1', + name='Pearl Ruecker', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='5486e7b4-13cb-4e2d-976d-c1c43d40f61d', - name='Mrs. Melinda Borer', + description='aperiam', + discount_amount=5631.81, + discount_percentage=6128.99, + is_direct_income=False, + item_ref=shared.ItemRef( + id='5528250d-cbbc-4d3b-921b-88c1ee5e7a06', + name='Dr. Sherry Marks', + ), + quantity=5137.75, + sub_total=9667.54, + tax_amount=6470.68, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=140.4, + id='b7d17649-26b0-4cf5-a6cb-6ebabe5e0b99', + name='Mrs. Lee Rogahn', + ), + total_amount=5558.1, + tracking=shared.Propertiestracking1( + category_refs=[ + shared.TrackingCategoryRef( + id='6a87bb7a-ecbe-4569-970c-b069907f9894', + name='Gloria Gottlieb V', + ), + shared.TrackingCategoryRef( + id='9f01f344-2c61-4be1-b3ba-cde532b6526f', + name='Sam Cole', + ), + shared.TrackingCategoryRef( + id='3fe2859c-e322-4231-be66-64c41d2fba5c', + name='Shannon Bahringer', + ), + shared.TrackingCategoryRef( + id='b8d291be-b810-4a2a-a874-9479edd4fcf7', + name='Dan Bechtelar', + ), + ], + customer_ref=shared.CustomerRef( + company_name='blanditiis', + id='7f08f392-7107-46a2-8b40-c8f08bff1081', + ), + is_billed_to=shared.BilledToType1.PROJECT, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, + project_ref=shared.ProjectRef( + id='8f86996c-8e22-4be0-a3cf-47893bd23f86', + name='Mary Beatty', ), - currency='cumque', - currency_rate=7322.16, - id='e5ee4f72-1184-4077-af32-e3b49dbe0f23', - note='harum', - paid_on_date='voluptate', - reference='distinctio', - total_amount=3820.07, ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='c7834273-caa9-4118-b38f-1b61a331a54d', + name='Stephen Bartell', + ), + ], + unit_amount=2674.45, ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='fugiat', - currency='perspiciatis', - currency_rate=5855.5, - total_amount=2959.58, + shared.InvoiceLineItem( + account_ref=shared.AccountRef( + id='f92fed93-9ba8-4f71-a299-2c20ee1228ac', + name='Alberta Shanahan', ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='8d6eded4-7768-40fc-ba17-a82e5e82fd28', - name='Albert Auer MD', + description='dolore', + discount_amount=4824, + discount_percentage=8600.36, + is_direct_income=False, + item_ref=shared.ItemRef( + id='240bc11e-a482-4824-8cc6-a2f0f5b9d3cb', + name='Doris Murray', + ), + quantity=5367.04, + sub_total=4891.64, + tax_amount=8210.12, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=2214.66, + id='100e8e2b-9b0d-4746-92a7-c7d1ea0e79fa', + name='Robin Rau', + ), + total_amount=9824.77, + tracking=shared.Propertiestracking1( + category_refs=[ + shared.TrackingCategoryRef( + id='79f650b1-e707-4e7e-8396-713bacce072a', + name='Ms. Taylor Jacobson IV', + ), + ], + customer_ref=shared.CustomerRef( + company_name='facere', + id='279c10c1-8516-4fd7-8be2-621272628fa5', + ), + is_billed_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.UNKNOWN, + project_ref=shared.ProjectRef( + id='962867e7-2b3a-4650-a4b1-57f9bb6ef72a', + name='Brenda Legros PhD', ), - currency='iusto', - currency_rate=8934.34, - id='91392ab4-4cb1-4835-808f-461ce53e9144', - note='perspiciatis', - paid_on_date='rem', - reference='animi', - total_amount=6129.79, ), + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='9b661a7d-ef16-48b6-8cb2-822b4a9850ed', + name='Ora Greenholt DVM', + ), + shared.TrackingCategoryRef( + id='9c4ae551-40e7-4572-ae00-3c2f02941925', + name='Kay Runolfsdottir', + ), + shared.TrackingCategoryRef( + id='41c999f4-69f6-4f1c-b1a3-f023c669e6a6', + name='Mr. Vicki Bartoletti', + ), + ], + unit_amount=7126.9, ), + ], + metadata=shared.Metadata( + is_deleted=False, + ), + modified_date='id', + note='consequatur', + paid_on_date='quis', + payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='libero', - currency='deserunt', - currency_rate=2957.26, - total_amount=3918.99, + allocated_on_date='unde', + currency='quos', + currency_rate=5264.74, + total_amount=8122.68, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='0addfde4-10c3-47da-a918-2a49d9625d3c', - name='Toby Wisoky V', + id='6720c310-3f1a-440c-8f3e-c8688fd8ec6f', + name='Mr. Michael Feest', ), - currency='blanditiis', - currency_rate=9171.68, - id='ea445279-2bcd-4440-aa98-becce0486de0', - note='repellendus', - paid_on_date='ipsam', - reference='aliquid', - total_amount=8330.92, + currency='voluptatibus', + currency_rate=42.61, + id='aaaeee00-4eba-47bf-8732-be509c508713', + note='quae', + paid_on_date='a', + reference='eaque', + total_amount=3967.4, ), ), shared.Items( allocation=shared.ItemsAllocation( - allocated_on_date='nihil', - currency='non', - currency_rate=7171.48, - total_amount=121.81, + allocated_on_date='maiores', + currency='voluptatem', + currency_rate=7324.85, + total_amount=7767.95, ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='05503e8d-c626-4ff7-bc65-675f5b70e3e4', - name='Darrin Sawayn', + id='e55a8687-143c-4979-85ff-797a5da664b7', + name='Mitchell Kuhn', ), - currency='dolorum', - currency_rate=5828.22, - id='1ec52624-d000-414e-b45c-ea11ac53ebb6', - note='nostrum', - paid_on_date='corrupti', - reference='odio', - total_amount=9462.07, + currency='nihil', + currency_rate=2955.37, + id='baaa2832-bb65-4862-92a3-1f9b14aa6bde', + note='quo', + paid_on_date='reprehenderit', + reference='repellat', + total_amount=2617.34, ), ), ], sales_order_refs=[ - 'eius', + shared.SalesOrderRef( + data_type='dolore', + id='232e9a5d-ee1a-4cd7-aa89-981b58fe682e', + ), + shared.SalesOrderRef( + data_type='sunt', + id='c2dbe23d-58e8-4247-9122-c9f67678fa27', + ), ], - source_modified_date='voluptatem', - status=shared.InvoiceStatusEnum.DRAFT, - sub_total=647.33, + source_modified_date='occaecati', + status=shared.InvoiceStatus.SUBMITTED, + sub_total=5416.5, supplemental_data=shared.SupplementalData( content={ - "placeat": { - "cum": 'sint', - "est": 'quod', - }, - "voluptates": { - "non": 'quae', - "perferendis": 'mollitia', - "voluptates": 'provident', - "doloribus": 'unde', + "commodi": { + "dolor": 'voluptas', + "dolor": 'facere', }, }, ), - total_amount=1671.44, - total_discount=7933.34, - total_tax_amount=6618.61, + total_amount=6680.48, + total_discount=152.97, + total_tax_amount=4809.17, withholding_tax=[ shared.WithholdingTaxitems( - amount=1012.53, - name='Jose D'Amore', + amount=426.64, + name='Brett Yundt', ), shared.WithholdingTaxitems( - amount=1005.96, - name='Justin Gusikowski IV', + amount=7200.66, + name='Ruben Green III', ), shared.WithholdingTaxitems( - amount=8059.91, - name='Dr. Tami O'Reilly', - ), - shared.WithholdingTaxitems( - amount=8418.47, - name='Erma Barton', + amount=2407.81, + name='Angel Larkin', ), ], ), @@ -841,7 +1001,7 @@ req = operations.UpdateInvoiceRequest( connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, invoice_id='8a210b68-6988-11ed-a1eb-0242ac120002', - timeout_in_minutes=329849, + timeout_in_minutes=701054, ) res = s.invoices.update(req) @@ -852,7 +1012,7 @@ if res.update_invoice_response is not None: ## upload_attachment -Push invoice attachment +Upload invoice attachment. ### Example Usage @@ -866,11 +1026,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UploadInvoiceAttachmentRequest( request_body=operations.UploadInvoiceAttachmentRequestBody( - content='facere'.encode(), - request_body='excepturi', + content='rem'.encode(), + request_body='unde', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', diff --git a/accounting/docs/items/README.md b/accounting/docs/items/README.md index b9c6f148d..c5c3bf098 100755 --- a/accounting/docs/items/README.md +++ b/accounting/docs/items/README.md @@ -19,7 +19,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. ### Example Usage @@ -33,51 +33,50 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateItemRequest( item=shared.Item( bill_item=shared.BillItem( account_ref=shared.AccountRef( - id='5472cdd1-4fc4-43b7-8bca-88fa70c43351', - name='Luis Swaniawski PhD', + id='d9ca6075-656f-4c0e-be67-155e2d06a307', + name='Janis Kautzer', ), - description='harum', + description='natus', tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=5331.06, - id='f7f75f4f-23f1-4c0a-986c-3ae7d7b67fee', - name='Mrs. Floyd Torphy', + effective_tax_rate=4461.28, + id='f581faba-aa7d-4801-8880-76ff5f6ed298', + name='Carrie Beer', ), - unit_price=8642.28, + unit_price=1272.71, ), - code='perspiciatis', - id='5b1dbece-ff7c-44b1-96e9-278275eea768', + code='aliquid', + id='9b6a70b0-dd82-4f94-bffb-d1e1e21ddc69', invoice_item=shared.InvoiceItem( account_ref=shared.AccountRef( - id='17468063-f799-4b79-96c0-b0fa0bb20a40', - name='Roland Ryan', + id='038b1d18-7b51-4eb5-bd30-bfe03490cf20', + name='Annette Hackett', ), - description='accusamus', + description='ad', tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=3996.96, - id='40642726-57b0-41a0-bc08-fd3921c25793', - name='Mercedes Kemmer V', + effective_tax_rate=6012.27, + id='043cb462-d6bc-4991-bf98-e4792b979a41', + name='Eula Hudson', ), - unit_price=2095.62, + unit_price=7729.87, ), is_bill_item=False, is_invoice_item=False, - item_status=shared.ItemStatusEnum.ACTIVE, + item_status=shared.ItemStatus.ACTIVE, metadata=shared.Metadata( is_deleted=False, ), - modified_date='sequi', - name='Dominick Pagac', - source_modified_date='temporibus', - type='adipisci', + modified_date='vitae', + name='Christy Douglas', + source_modified_date='rem', + type=shared.ItemType.INVENTORY, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=420757, + timeout_in_minutes=99209, ) res = s.items.create(req) @@ -102,10 +101,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetItemRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - item_id='ea', + item_id='illum', ) res = s.items.get(req) @@ -122,7 +120,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. ### Example Usage @@ -136,7 +134,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateItemsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -164,13 +161,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListItemsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='nulla', + query='quae', ) res = s.items.list(req) diff --git a/accounting/docs/journalentries/README.md b/accounting/docs/journalentries/README.md index 290c82135..ef2dde951 100755 --- a/accounting/docs/journalentries/README.md +++ b/accounting/docs/journalentries/README.md @@ -14,13 +14,14 @@ Journal entries ## create -Posts a new journalEntry to the accounting package for a given company. +Posts a new journalEntry to the accounting package for a given company. Required data may vary by integration. To see what data to post, first call [Get create journal entry model](https://docs.codat.io/accounting-api#/operations/get-create-journalEntries-model). > **Supported Integrations** > > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating journal entries. + ### Example Usage @@ -34,140 +35,89 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateJournalEntryRequest( journal_entry=shared.JournalEntry( - created_on='delectus', - description='id', - id='1011a091-b3ec-48b5-b862-de1a9d14fe72', + created_on='quibusdam', + description='natus', + id='8ccf89d3-8611-486e-976c-002facb13ac2', journal_lines=[ shared.JournalLine( account_ref=shared.AccountRef( - id='521f9030-3dfc-4338-b97f-ffa6d1d32090', - name='Salvatore Boyer', + id='c8143b86-6c57-45a1-a266-8730be37b0e8', + name='Alton Schmitt', ), - currency='mollitia', - description='cumque', - net_amount=5632.6, + currency='facere', + description='temporibus', + net_amount=7790.58, tracking=shared.Propertiestracking2( record_refs=[ shared.InvoiceTo( - data_type='accusamus', - id='1961ce9b-e41c-4869-9d7d-9719d07b200a', - ), - shared.InvoiceTo( - data_type='corporis', - id='8ffd2967-df8f-4d88-aa8e-60be620cd9c5', - ), - shared.InvoiceTo( - data_type='officia', - id='fdd04c37-5251-42be-ae1d-87ecc5fdcea8', - ), - shared.InvoiceTo( - data_type='eveniet', - id='7a883116-62cd-4a6d-b7c1-d86066237d42', - ), - ], - ), - ), - shared.JournalLine( - account_ref=shared.AccountRef( - id='27866db8-a749-4e39-8451-1cc75e4f0c00', - name='Patty Harber', - ), - currency='molestiae', - description='ipsam', - net_amount=5541.62, - tracking=shared.Propertiestracking2( - record_refs=[ - shared.InvoiceTo( - data_type='nobis', - id='94562f00-6968-45fc-91a1-73d84bbe24f2', - ), - shared.InvoiceTo( - data_type='error', - id='834afb07-35cb-4628-9d4a-29aaa1e16915', - ), - shared.InvoiceTo( - data_type='nisi', - id='f7d2ee20-9505-4bf0-ba93-e94480ca37fb', + data_type='officiis', + id='69b53510-5050-414d-8a10-5882484c36e9', ), shared.InvoiceTo( - data_type='ab', - id='0789032a-c333-4172-a2dd-79ec74ba7e88', + data_type='ut', + id='8892782d-34e0-4b8f-80d5-9f57b9f9820b', ), ], ), ), shared.JournalLine( account_ref=shared.AccountRef( - id='ddb36fd1-ccc3-441c-8657-3474f0a740fb', - name='Sandy Reichel', + id='e07808c3-6c9e-42f7-8344-e00f478eb539', + name='Maxine Dietrich', ), - currency='illo', - description='impedit', - net_amount=2164.48, + currency='dolore', + description='blanditiis', + net_amount=9119.94, tracking=shared.Propertiestracking2( record_refs=[ shared.InvoiceTo( - data_type='doloremque', - id='9e763995-d808-4bbe-b944-55ebc550a1c4', + data_type='delectus', + id='ccb69d54-1b4b-4393-b356-6625bea32201', ), shared.InvoiceTo( - data_type='qui', - id='6b59c836-6fdc-4c13-9582-c1b855e889d9', + data_type='temporibus', + id='ec379c59-8ea1-4d48-85c2-f9e21d90fd53', ), shared.InvoiceTo( - data_type='officiis', - id='f932e900-0a13-4ad8-9242-08efd2341189', + data_type='esse', + id='76bfc767-7f0f-4504-a6e4-828fb6daee19', ), - ], - ), - ), - shared.JournalLine( - account_ref=shared.AccountRef( - id='8e73879e-fbe8-4bae-babb-794536e90351', - name='Rickey Miller', - ), - currency='adipisci', - description='architecto', - net_amount=4393.34, - tracking=shared.Propertiestracking2( - record_refs=[ shared.InvoiceTo( - data_type='voluptatem', - id='b77a5a53-65a7-49f1-9271-f01c0d361fed', + data_type='cumque', + id='26c0cb61-8c63-431c-abda-b767a444dd0d', ), ], ), ), ], journal_ref=shared.JournalRef( - id='8dc5effb-453e-4908-9e87-1fdb4d697bdd', - name='Sylvester Maggio', + id='a0abe58e-b3d5-44ba-9cb3-ad49b8e5c18b', + name='Holly Trantow', ), metadata=shared.Metadata( is_deleted=False, ), - modified_date='repudiandae', - posted_on='incidunt', + modified_date='maiores', + posted_on='ea', record_ref=shared.InvoiceTo( - data_type='neque', - id='734a5d72-d9ed-4d78-9be5-e7afe55297ba', + data_type='incidunt', + id='823255be-95c0-4cbc-b2ca-87908d73809a', ), - source_modified_date='laboriosam', + source_modified_date='aut', supplemental_data=shared.SupplementalData( content={ - "laudantium": { - "repellat": 'aliquam', + "doloribus": { + "eum": 'itaque', }, }, ), - updated_on='modi', + updated_on='unde', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=907650, + timeout_in_minutes=148478, ) res = s.journal_entries.create(req) @@ -178,7 +128,33 @@ if res.create_journal_entry_response is not None: ## delete -Deletes a journal entry from the accounting package for a given company. +> **Use with caution** +> +>Because Journal Entries underpin every transaction in an accounting platform, deleting a Journal Entry can affect every transaction for a given company. +> +> **Before you proceed, make sure you understand the implications of deleting Journal Entries from an accounting perspective.** + +The _Delete Journal entries_ endpoint allows you to delete a specified Journal entry from an accounting platform. + +### Process +1. Pass the `{journalEntryId}` to the _Delete Journal Entries_ endpoint and store the `pushOperationKey` returned. +2. Check the status of the delete by checking the status of push operation either via + 1. [Push operation webhook](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). + + A `Success` status indicates that the Journal Entry object was deleted from the accounting platform. +3. (Optional) Check that the Journal Entry was deleted from the accounting platform. + +### Effect on related objects + +Be aware that deleting a Journal Entry from an accounting platform might cause related objects to be modified. For example, if you delete the Journal Entry for a paid invoice in QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The 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 Deleted | +|-------------|--------------| +| QuickBooks Online | Yes | > **Supported Integrations** > @@ -196,7 +172,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DeleteJournalEntryRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -225,10 +200,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetJournalEntryRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - journal_entry_id='dolorem', + journal_entry_id='qui', ) res = s.journal_entries.get(req) @@ -239,7 +213,7 @@ if res.journal_entry is not None: ## get_create_model -Get create journal entry model. Returns the expected data for the request payload. +Get create journal entry model. Returns the expected data for the request payload. See the examples for integration-specific indicative models. @@ -259,7 +233,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateJournalEntriesModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -273,7 +246,7 @@ if res.push_option is not None: ## list -Gets the latest journal entries for a company, with pagination +Gets the latest journal entries for a company, with pagination. ### Example Usage @@ -287,13 +260,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListJournalEntriesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='laborum', + query='totam', ) res = s.journal_entries.list(req) diff --git a/accounting/docs/journals/README.md b/accounting/docs/journals/README.md index 497111f92..c5504059d 100755 --- a/accounting/docs/journals/README.md +++ b/accounting/docs/journals/README.md @@ -19,7 +19,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. ### Example Usage @@ -33,26 +33,25 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateJournalRequest( journal=shared.Journal( - created_on='eos', + created_on='cum', has_children=False, - id='3394a68c-c80d-430f-b721-64d0a91fe9d9', - journal_code='autem', + id='56065a50-74be-4fb8-af68-49d2b9940436', + journal_code='adipisci', metadata=shared.Metadata( is_deleted=False, ), - modified_date='minima', - name='Sherry Reynolds', - parent_id='necessitatibus', - source_modified_date='perferendis', - status=shared.JournalStatusEnum.UNKNOWN, - type='doloremque', + modified_date='mollitia', + name='Faye Huels', + parent_id='voluptatem', + source_modified_date='ipsam', + status=shared.JournalStatus.UNKNOWN, + type='praesentium', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=569651, + timeout_in_minutes=452831, ) res = s.journals.create(req) @@ -77,10 +76,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetJournalRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - journal_id='quod', + journal_id='ea', ) res = s.journals.get(req) @@ -97,7 +95,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. ### Example Usage @@ -111,7 +109,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateJournalsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -139,13 +136,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListJournalsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='vel', + query='eveniet', ) res = s.journals.list(req) diff --git a/accounting/docs/paymentmethods/README.md b/accounting/docs/paymentmethods/README.md index 766c0684a..114d37bb8 100755 --- a/accounting/docs/paymentmethods/README.md +++ b/accounting/docs/paymentmethods/README.md @@ -25,10 +25,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetPaymentMethodRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - payment_method_id='ea', + payment_method_id='ratione', ) res = s.payment_methods.get(req) @@ -53,13 +52,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListPaymentMethodsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='error', + query='iste', ) res = s.payment_methods.list(req) diff --git a/accounting/docs/payments/README.md b/accounting/docs/payments/README.md index 94e862c76..443389540 100755 --- a/accounting/docs/payments/README.md +++ b/accounting/docs/payments/README.md @@ -19,7 +19,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. ### Example Usage @@ -33,73 +33,36 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreatePaymentRequest( payment=shared.Payment( account_ref=shared.AccountRef( - id='2de7b356-2201-4a6a-ab4a-e7b1a5b908d4', - name='Jeffery Aufderhar', + id='def9c765-dfd7-4354-a5cb-94977017a262', + name='Monica Reinger', ), - currency='quae', - currency_rate=6765.76, + currency='eum', + currency_rate=7979.17, customer_ref=shared.CustomerRef( - company_name='fuga', - id='35d4a839-f03b-4ab7-bb91-8f0313984507', + company_name='laborum', + id='4e999828-79de-4fc0-b239-606cf90ad989', ), - date_='officiis', - id='0e39c7e2-3ecb-4060-8652-e23a3d6c657e', + date_='recusandae', + id='1a34715a-cda0-444f-aaed-6e13a620e2e9', lines=[ shared.PaymentLine( - allocated_on_date='quibusdam', - amount=8936.05, - links=[ - shared.PaymentLineLink( - amount=9387.2, - currency_rate=4758.76, - id='f002d198-6aa9-49d3-a1d3-2329e45837e8', - type=shared.PaymentLinkTypeEnum.DISCOUNT, - ), - shared.PaymentLineLink( - amount=1859.89, - currency_rate=6377.7, - id='d6bb10e2-55fd-4c48-8d6e-3308675cbf18', - type=shared.PaymentLinkTypeEnum.CREDIT_NOTE, - ), - shared.PaymentLineLink( - amount=5604.72, - currency_rate=3424.33, - id='6a7e82cd-f9d0-4fc2-82c6-66af3c3f5589', - type=shared.PaymentLinkTypeEnum.PAYMENT_ON_ACCOUNT, - ), - ], - ), - shared.PaymentLine( - allocated_on_date='accusamus', - amount=6668.05, + allocated_on_date='totam', + amount=7539.55, links=[ shared.PaymentLineLink( - amount=8213.45, - currency_rate=1736.08, - id='64e41e2c-a848-422e-913f-6d9d2ad37c30', - type=shared.PaymentLinkTypeEnum.PAYMENT, + amount=3390.23, + currency_rate=7169.63, + id='0486cf39-8a0b-4374-a17d-d95ce3044be4', + type=shared.PaymentLinkType.DISCOUNT, ), shared.PaymentLineLink( - amount=5821.15, - currency_rate=328.36, - id='77c10b68-7921-463e-a7d4-8860543c0a30', - type=shared.PaymentLinkTypeEnum.INVOICE, - ), - ], - ), - shared.PaymentLine( - allocated_on_date='excepturi', - amount=7879.41, - links=[ - shared.PaymentLineLink( - amount=8004.56, - currency_rate=9757.5, - id='6c0276e7-b21b-4ad9-8d27-43fd6c2a10e6', - type=shared.PaymentLinkTypeEnum.MANUAL_JOURNAL, + amount=7139.18, + currency_rate=2076.75, + id='b31cb503-c314-40d8-b72c-535e1dd6bf64', + type=shared.PaymentLinkType.PAYMENT_ON_ACCOUNT, ), ], ), @@ -107,37 +70,44 @@ req = operations.CreatePaymentRequest( metadata=shared.Metadata( is_deleted=False, ), - modified_date='odit', - note='natus', + modified_date='non', + note='quis', payment_method_ref=shared.PaymentMethodRef( - id='78ec256a-5b09-4227-bcc4-7996c977bbc5', - name='Jeannie Dibbert', + id='4e9831e7-95f0-4e57-b54e-bf2d2b46097e', + name='Carlton Grady', ), - reference='eos', - source_modified_date='quos', + reference='voluptatum', + source_modified_date='quibusdam', supplemental_data=shared.SupplementalData( content={ - "blanditiis": { - "ipsa": 'eaque', - "quo": 'ad', + "earum": { + "sit": 'cumque', + "quibusdam": 'quibusdam', + }, + "inventore": { + "enim": 'perferendis', + "soluta": 'tenetur', + "ipsam": 'dolorum', }, - "atque": { - "eum": 'iusto', - "facere": 'ea', - "sequi": 'voluptates', - "tempora": 'similique', + "ipsa": { + "soluta": 'impedit', + "quas": 'facilis', + "quam": 'blanditiis', + "commodi": 'eaque', }, - "officia": { - "laboriosam": 'quos', - "aliquam": 'vel', + "similique": { + "voluptates": 'similique', + "autem": 'nobis', + "laboriosam": 'non', + "corporis": 'ab', }, }, ), - total_amount=2546.16, + total_amount=1991.9, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=321921, + timeout_in_minutes=179221, ) res = s.payments.create(req) @@ -162,10 +132,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetPaymentRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - payment_id='odio', + payment_id='repellendus', ) res = s.payments.get(req) @@ -182,7 +151,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. ### Example Usage @@ -196,7 +165,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreatePaymentsModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -224,13 +192,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListPaymentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='omnis', + query='ipsam', ) res = s.payments.list(req) diff --git a/accounting/docs/purchaseorders/README.md b/accounting/docs/purchaseorders/README.md index 4bb3c74c2..420cb5538 100755 --- a/accounting/docs/purchaseorders/README.md +++ b/accounting/docs/purchaseorders/README.md @@ -20,7 +20,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating purchase orders. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating purchase orders. ### Example Usage @@ -34,116 +34,197 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreatePurchaseOrderRequest( purchase_order=shared.PurchaseOrder( - currency='quo', - currency_rate=9804.63, - delivery_date='maxime', - expected_delivery_date='suscipit', - id='c0e503f5-6831-4f1d-8ed8-7b28e8afabc9', - issue_date='laudantium', + currency='amet', + currency_rate=256.85, + delivery_date='quos', + expected_delivery_date='voluptas', + id='c10a856a-19d4-4665-ba97-259875dc0cec', + issue_date='facilis', line_items=[ shared.PurchaseOrderLineItem( account_ref=shared.AccountRef( - id='e241e43b-2342-4417-913e-3f62aa9ae4ae', - name='Lyle Rath', + id='78bd248e-c6e8-4b24-8b1c-06c9c0649d2b', + name='Laurence Mraz', + ), + description='deleniti', + discount_amount=8562.89, + discount_percentage=8359.95, + item_ref=shared.ItemRef( + id='b1665c31-2c7f-4550-9472-1c176292dd78', + name='Mattie Treutel DDS', + ), + quantity=9633.21, + sub_total=5503.18, + tax_amount=7788.66, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=1193.26, + id='41841fe1-f87e-4a10-ba98-06ea1606399e', + name='Jack Kris', + ), + total_amount=1221.4, + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='58d4ab5b-c80d-4ea7-bfd9-931ec9d106cf', + name='Bobby Schiller', + ), + shared.TrackingCategoryRef( + id='ab840a28-ea06-472d-ab73-a34ca434cdb3', + name='Rhonda Medhurst V', + ), + ], + unit_amount=9691.25, + ), + shared.PurchaseOrderLineItem( + account_ref=shared.AccountRef( + id='252078a1-8a4b-40da-ad4b-5cf0616ee922', + name='Samantha Kuhic', ), - description='provident', - discount_amount=7674.79, - discount_percentage=2960.36, + description='nulla', + discount_amount=4354.13, + discount_percentage=416.21, item_ref=shared.ItemRef( - id='92c5e8ba-5d4a-4a4a-908b-d380c29aa8dd', - name='Teresa Predovic', + id='daa0e149-cd1c-4cdd-b62b-bf92390015f2', + name='Cassandra Mann', ), - quantity=6509.18, - sub_total=6484.89, - tax_amount=2149.29, + quantity=9894.06, + sub_total=2550.98, + tax_amount=9668.03, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=623.49, - id='b7b91449-ae69-4c08-8d41-8bb71804f423', - name='Clyde Goldner', + effective_tax_rate=9639.86, + id='eb9bec50-318a-481e-b01d-297f7b456a85', + name='Ms. Casey Heathcote', ), - total_amount=1897.28, + total_amount=8073.54, tracking_category_refs=[ shared.TrackingCategoryRef( - id='f377ac5c-9b7e-493b-aa3c-523105e7c34c', - name='Preston Abernathy', + id='a326341a-cccc-4a66-bd4a-8595c1b32bb2', + name='Edith VonRueden', + ), + shared.TrackingCategoryRef( + id='31cd6a5b-e749-406b-96c6-36e74d28a481', + name='Miss Velma Murphy', ), shared.TrackingCategoryRef( - id='b812a661-4894-44a8-a908-5075bc253825', - name='Robin Goodwin', + id='41198640-5876-4b30-8711-3de4061082d0', + name='Zachary Effertz', ), ], - unit_amount=7488.6, + unit_amount=5757.79, ), shared.PurchaseOrderLineItem( account_ref=shared.AccountRef( - id='0a4e66ea-4757-48d1-b1e2-941818fc679b', - name='Shelley Cronin II', + id='cd927a5b-a551-41bb-8370-d9784fb14647', + name='Emily Brakus', ), - description='dolorem', - discount_amount=3596.63, - discount_percentage=6053.38, + description='minima', + discount_amount=7006.85, + discount_percentage=9129.06, item_ref=shared.ItemRef( - id='b855d015-b62c-48b8-ba38-a8a88c144200', - name='Benjamin Schoen', + id='61b3f371-7287-44c3-b7c8-d439ec6bd2ca', + name='John Beatty', ), - quantity=7210.53, - sub_total=879.15, - tax_amount=6295.87, + quantity=4610.28, + sub_total=4580.46, + tax_amount=7955.57, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=9062.13, - id='1ecf8c34-946b-4ba7-a05a-8b4a9ec5b368', - name='Simon Rutherford', + effective_tax_rate=4356.49, + id='ebbbc9e9-744c-45b6-85a4-af2fcabccbca', + name='Denise Marks', ), - total_amount=4247.55, + total_amount=8858.4, tracking_category_refs=[ shared.TrackingCategoryRef( - id='272760e9-66e9-47e0-9410-3347d78ff249', - name='Evelyn Gutkowski', + id='06a6cabe-22a1-41f7-ba75-d8ff4452bed7', + name='Dora Ankunding', + ), + shared.TrackingCategoryRef( + id='48c282b8-716c-427f-ab17-5780304c40ac', + name='Lula Gulgowski', + ), + shared.TrackingCategoryRef( + id='8254fde3-7724-4350-ad85-a7f8cc2911a6', + name='Cory Toy', ), ], - unit_amount=6574.81, + unit_amount=7840.43, + ), + shared.PurchaseOrderLineItem( + account_ref=shared.AccountRef( + id='6009f01d-d385-423c-9a4e-bb9fd83f83df', + name='Abraham Anderson', + ), + description='vel', + discount_amount=6843.48, + discount_percentage=534.75, + item_ref=shared.ItemRef( + id='94e2e9c2-205d-4fe7-a5bf-fbcb86015f21', + name='Mrs. Genevieve Pfannerstill IV', + ), + quantity=99.38, + sub_total=4855.86, + tax_amount=9424.35, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=6764.72, + id='7398247a-8721-47fe-9962-df3eee7c385c', + name='Dr. Ada King MD', + ), + total_amount=1095.45, + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='8dbcf6e1-9b90-412c-844e-231ba147727d', + name='Nick Hermann', + ), + shared.TrackingCategoryRef( + id='2adabf68-00b0-41bc-bc03-2f2c19dbf711', + name='Kristi Mann', + ), + shared.TrackingCategoryRef( + id='f21523e3-7136-4521-ba6e-596aa41b9e20', + name='Edna O'Reilly', + ), + ], + unit_amount=8049.73, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='soluta', - note='excepturi', - payment_due_date='voluptates', - purchase_order_number='veniam', + modified_date='nesciunt', + note='ab', + payment_due_date='ullam', + purchase_order_number='consectetur', ship_to=shared.ShipTo( address=shared.Addressesitems( - city='Marcusboro', - country='Palestinian Territory', - line1='a', - line2='ipsum', - postal_code='33428', - region='deserunt', - type=shared.AddressTypeEnum.BILLING, + city='West Melvinaborough', + country='Turkey', + line1='eaque', + line2='dolores', + postal_code='62413', + region='assumenda', + type=shared.AddressType.BILLING, ), contact=shared.ShipToContact( - email='Maxine96@yahoo.com', - name='Ryan Hagenes', - phone='272-416-7898 x68731', + email='Bo_Ernser@yahoo.com', + name='Lucas Ward', + phone='(360) 661-7480 x44002', ), ), - source_modified_date='qui', - status=shared.PurchaseOrderStatusEnum.OPEN, - sub_total=5437.75, + source_modified_date='sequi', + status=shared.PurchaseOrderStatus.CLOSED, + sub_total=4563.81, supplier_ref=shared.SupplierRef( - id='14eca016-bc41-4ea1-b42d-4104a25ef71d', - supplier_name='debitis', + id='99a2a18d-b129-4dc5-a4ab-b7b10caf244d', + supplier_name='itaque', ), - total_amount=3264.43, - total_discount=4979.58, - total_tax_amount=6690.5, + total_amount=1039.82, + total_discount=522.31, + total_tax_amount=2042.81, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=117700, + timeout_in_minutes=861729, ) res = s.purchase_orders.create(req) @@ -168,10 +249,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetPurchaseOrderRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - purchase_order_id='architecto', + purchase_order_id='consequatur', ) res = s.purchase_orders.get(req) @@ -188,7 +268,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating and updating purchase orders. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating and updating purchase orders. ### Example Usage @@ -202,7 +282,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdatePurchaseOrdersModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -230,13 +309,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListPurchaseOrdersRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='fugiat', + query='quos', ) res = s.purchase_orders.list(req) @@ -253,7 +331,7 @@ Required data may vary by integration. To see what data to post, first call []() > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support updating purchase orders. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support updating purchase orders. ### Example Usage @@ -267,93 +345,146 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdatePurchaseOrderRequest( purchase_order=shared.PurchaseOrder( - currency='eum', - currency_rate=1110.45, - delivery_date='numquam', - expected_delivery_date='deserunt', - id='4317692e-a486-473d-922b-828a9030660f', - issue_date='doloremque', + currency='ratione', + currency_rate=313.23, + delivery_date='id', + expected_delivery_date='eligendi', + id='4d070c4e-396e-4562-85cc-b16373314dad', + issue_date='minima', line_items=[ shared.PurchaseOrderLineItem( account_ref=shared.AccountRef( - id='4c79b4cc-64c2-4b3a-b2c4-88ade62f6aa5', - name='Leona Olson', + id='b890542e-5a55-4a10-bd8a-c0f482f9e9a5', + name='Mrs. Marianne Dibbert', ), - description='eveniet', - discount_amount=1787.12, - discount_percentage=483.47, + description='dolorum', + discount_amount=8885.29, + discount_percentage=1224.04, item_ref=shared.ItemRef( - id='83016ca3-4bb8-47d4-b621-27a607d16062', - name='Mrs. Alex Heaney', + id='22f0bfec-c419-432d-b04b-3ae70934d9eb', + name='Rick O'Reilly', ), - quantity=2049.69, - sub_total=8634.15, - tax_amount=7188.22, + quantity=9449.55, + sub_total=4261.48, + tax_amount=9895.04, tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=5826.59, - id='ca9f38bd-2be8-4787-8349-3f49aa8465a3', - name='Myrtle Feil', + effective_tax_rate=4380.7, + id='1b0652fe-6536-4fb3-8a41-4aa294d64c08', + name='Alan Torp MD', ), - total_amount=6184.81, + total_amount=5153.47, tracking_category_refs=[ shared.TrackingCategoryRef( - id='719d1cea-673d-486e-bb35-e49a3135778c', - name='Derek Funk', + id='7151a354-ba1a-46d7-9dc3-9917b844c850', + name='Brandi Moen', + ), + ], + unit_amount=3811.97, + ), + shared.PurchaseOrderLineItem( + account_ref=shared.AccountRef( + id='2f4946ca-2d72-466c-9763-812723aa03f8', + name='Kristi Bins PhD', + ), + description='quam', + discount_amount=6684.99, + discount_percentage=6945.05, + item_ref=shared.ItemRef( + id='3e07c05e-13db-488f-991f-98329f91922f', + name='Angelica Nienow IV', + ), + quantity=7196.87, + sub_total=3786.8, + tax_amount=3422.36, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=2715.17, + id='5000a5b3-6a22-42e3-bf77-0a2b42e5edf6', + name='Isabel Dare', + ), + total_amount=4624.39, + tracking_category_refs=[ + shared.TrackingCategoryRef( + id='c6a710e5-4b47-4ec6-aaf9-bd8327e8f7d3', + name='Alma Brown', ), shared.TrackingCategoryRef( - id='cb0e3ea9-7504-45ba-8f63-b215186ab5e3', - name='Robert Daugherty', + id='ebdd822a-f2c1-4679-98a0-a46646ec658e', + name='Gwendolyn Bernhard', ), + ], + unit_amount=8534.49, + ), + shared.PurchaseOrderLineItem( + account_ref=shared.AccountRef( + id='e0aee8c7-2213-4f42-9a03-38b71b3d2fd3', + name='Brad Farrell', + ), + description='accusantium', + discount_amount=4920.29, + discount_percentage=2368.27, + item_ref=shared.ItemRef( + id='088e75ab-7ff2-4a12-bb07-4cd44c23c0b1', + name='Dr. Norma Kuvalis', + ), + quantity=4240.66, + sub_total=5411.69, + tax_amount=2221.75, + tax_rate_ref=shared.TaxRateRef( + effective_tax_rate=3622.4, + id='b93ced68-7bb4-453f-84af-461c7cb91c79', + name='Stuart Howe', + ), + total_amount=8904.64, + tracking_category_refs=[ shared.TrackingCategoryRef( - id='14315d15-6829-49e6-9afc-7186ff20b7a7', - name='Elena Wisoky DDS', + id='23875a4a-2e87-4d87-b51e-22e77c0e6e11', + name='Dave Lockman', ), ], - unit_amount=6606.02, + unit_amount=1771.68, ), ], metadata=shared.Metadata( is_deleted=False, ), - modified_date='alias', - note='at', - payment_due_date='dignissimos', - purchase_order_number='aliquid', + modified_date='laboriosam', + note='pariatur', + payment_due_date='minus', + purchase_order_number='ipsam', ship_to=shared.ShipTo( address=shared.Addressesitems( - city='South Raheem', - country='Bahrain', - line1='ex', - line2='eius', - postal_code='77903', - region='veniam', - type=shared.AddressTypeEnum.UNKNOWN, + city='Breitenbergton', + country='Cuba', + line1='voluptatem', + line2='suscipit', + postal_code='65659', + region='aspernatur', + type=shared.AddressType.UNKNOWN, ), contact=shared.ShipToContact( - email='Augusta31@yahoo.com', - name='Heather Simonis', - phone='588-271-5141', + email='Grady78@hotmail.com', + name='Ellen Willms V', + phone='454.712.0503 x206', ), ), - source_modified_date='quidem', - status=shared.PurchaseOrderStatusEnum.CLOSED, - sub_total=5873.6, + source_modified_date='dicta', + status=shared.PurchaseOrderStatus.DRAFT, + sub_total=4036.82, supplier_ref=shared.SupplierRef( - id='c3221697-b188-40fc-bb2b-93c15f670bd1', - supplier_name='nihil', + id='0070c0bc-de7e-450e-a441-101c138b4629', + supplier_name='fugit', ), - total_amount=5049.32, - total_discount=2535.46, - total_tax_amount=5040.97, + total_amount=2485.73, + total_discount=8394.11, + total_tax_amount=3242.71, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - purchase_order_id='sequi', - timeout_in_minutes=122858, + purchase_order_id='sit', + timeout_in_minutes=985872, ) res = s.purchase_orders.update(req) diff --git a/accounting/docs/reports/README.md b/accounting/docs/reports/README.md index 59f887a82..b4a5e3459 100755 --- a/accounting/docs/reports/README.md +++ b/accounting/docs/reports/README.md @@ -8,6 +8,9 @@ Reports * [get_aged_creditors_report](#get_aged_creditors_report) - Aged creditors report * [get_aged_debtors_report](#get_aged_debtors_report) - Aged debtors report +* [get_balance_sheet](#get_balance_sheet) - Get balance sheet +* [get_cash_flow_statement](#get_cash_flow_statement) - Get cash flow statement +* [get_profit_and_loss](#get_profit_and_loss) - Get profit and loss * [is_aged_creditors_report_available](#is_aged_creditors_report_available) - Aged creditors report available * [is_aged_debtor_report_available](#is_aged_debtor_report_available) - Aged debtors report available @@ -28,7 +31,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetAgedCreditorsReportRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', number_of_periods=12, @@ -59,7 +61,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetAgedDebtorsReportRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', number_of_periods=12, @@ -73,6 +74,93 @@ if res.aged_debtor_report is not None: # handle response ``` +## get_balance_sheet + +Gets the latest balance sheet for a company. + +### Example Usage + +```python +import codataccounting +from codataccounting.models import operations + +s = codataccounting.CodatAccounting( + security=shared.Security( + auth_header="YOUR_API_KEY_HERE", + ), +) + +req = operations.GetBalanceSheetRequest( + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + period_length=4, + periods_to_compare=20, + start_month='ducimus', +) + +res = s.reports.get_balance_sheet(req) + +if res.balance_sheet is not None: + # handle response +``` + +## get_cash_flow_statement + +Gets the latest cash flow statement for a company. + +### Example Usage + +```python +import codataccounting +from codataccounting.models import operations + +s = codataccounting.CodatAccounting( + security=shared.Security( + auth_header="YOUR_API_KEY_HERE", + ), +) + +req = operations.GetCashFlowStatementRequest( + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + period_length=4, + periods_to_compare=20, + start_month='nemo', +) + +res = s.reports.get_cash_flow_statement(req) + +if res.cash_flow_statement is not None: + # handle response +``` + +## get_profit_and_loss + +Gets the latest profit and loss for a company. + +### Example Usage + +```python +import codataccounting +from codataccounting.models import operations + +s = codataccounting.CodatAccounting( + security=shared.Security( + auth_header="YOUR_API_KEY_HERE", + ), +) + +req = operations.GetProfitAndLossRequest( + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + period_length=4, + periods_to_compare=20, + start_month='illo', +) + +res = s.reports.get_profit_and_loss(req) + +if res.profit_and_loss_report is not None: + # handle response +``` + ## is_aged_creditors_report_available Indicates whether the aged creditor report is available for the company. @@ -89,7 +177,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.IsAgedCreditorsReportAvailableRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -116,7 +203,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.IsAgedDebtorReportAvailableRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) diff --git a/accounting/docs/salesorders/README.md b/accounting/docs/salesorders/README.md index 9f95b26f2..6ed26a3ad 100755 --- a/accounting/docs/salesorders/README.md +++ b/accounting/docs/salesorders/README.md @@ -25,10 +25,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetSalesOrderRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - sales_order_id='vel', + sales_order_id='distinctio', ) res = s.sales_orders.get(req) @@ -53,13 +52,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListSalesOrdersRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='exercitationem', + query='fugit', ) res = s.sales_orders.list(req) diff --git a/accounting/docs/suppliers/README.md b/accounting/docs/suppliers/README.md index 9eb65ad40..cd0f6cbda 100755 --- a/accounting/docs/suppliers/README.md +++ b/accounting/docs/suppliers/README.md @@ -17,13 +17,14 @@ Suppliers ## create -Push suppliers +Push suppliers + +Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model). + +> **Supported Integrations** +> +> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating suppliers. -Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model). - -> **Supported Integrations** -> -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating suppliers. ### Example Usage @@ -37,48 +38,74 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateSupplierRequest( supplier=shared.Supplier( addresses=[ shared.Addressesitems( - city='Thousand Oaks', - country='Papua New Guinea', - line1='amet', - line2='tempore', - postal_code='81317', - region='adipisci', - type=shared.AddressTypeEnum.UNKNOWN, + city='Madelynnberg', + country='Denmark', + line1='culpa', + line2='corrupti', + postal_code='77168', + region='voluptatibus', + type=shared.AddressType.BILLING, + ), + shared.Addressesitems( + city='East Isabella', + country='British Indian Ocean Territory (Chagos Archipelago)', + line1='est', + line2='consequatur', + postal_code='32501', + region='incidunt', + type=shared.AddressType.DELIVERY, + ), + shared.Addressesitems( + city='Arlington', + country='Mongolia', + line1='assumenda', + line2='alias', + postal_code='74089-9599', + region='aut', + type=shared.AddressType.DELIVERY, ), ], - contact_name='alias', - default_currency='occaecati', - email_address='perspiciatis', - id='83663c66-dcbb-47df-acb0-9c8b408e0713', + contact_name='eaque', + default_currency='officiis', + email_address='tempora', + id='6f225e29-d79d-439d-8790-e2e6014a33d9', metadata=shared.Metadata( is_deleted=False, ), - modified_date='molestiae', - phone='489.499.8000 x854', - registration_number='praesentium', - source_modified_date='aperiam', - status=shared.SupplierStatusEnum.ARCHIVED, + modified_date='iusto', + phone='717-420-7972', + registration_number='doloremque', + source_modified_date='necessitatibus', + status=shared.SupplierStatus.ARCHIVED, supplemental_data=shared.SupplementalData( content={ - "doloremque": { - "eius": 'odio', - "rerum": 'provident', - "nostrum": 'perferendis', - "aliquam": 'accusantium', + "dolor": { + "rem": 'eveniet', + "veniam": 'vero', + "dolor": 'occaecati', + "explicabo": 'delectus', + }, + "fugit": { + "dolorum": 'voluptate', + }, + "ducimus": { + "rerum": 'iusto', + "deserunt": 'asperiores', + "ab": 'tempore', + "suscipit": 'neque', }, }, ), - supplier_name='possimus', - tax_number='vel', + supplier_name='eveniet', + tax_number='placeat', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=796063, + timeout_in_minutes=867440, ) res = s.suppliers.create(req) @@ -103,7 +130,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.DownloadSupplierAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -133,7 +159,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetSupplierRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', supplier_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -147,7 +172,7 @@ if res.supplier is not None: ## get_attachment -Get supplier attachment +Get supplier attachment. ### Example Usage @@ -161,7 +186,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetSupplierAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -177,12 +201,12 @@ if res.attachment is not None: ## get_create_update_model -Get create/update supplier model. Returns the expected data for the request payload. - -See the examples for integration-specific indicative models. - -> **Supported Integrations** -> +Get create/update supplier model. Returns the expected data for the request payload. + +See the examples for integration-specific indicative models. + +> **Supported Integrations** +> > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating and updating suppliers. ### Example Usage @@ -197,7 +221,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateUpdateSuppliersModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -225,13 +248,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListSuppliersRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='blanditiis', + query='officiis', ) res = s.suppliers.list(req) @@ -256,7 +278,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListSupplierAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -277,7 +298,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support updating suppliers. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support updating suppliers. ### Example Usage @@ -291,75 +312,62 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.UpdateSupplierRequest( supplier=shared.Supplier( addresses=[ shared.Addressesitems( - city='Lake Gabriellashire', - country='Afghanistan', - line1='perferendis', - line2='aspernatur', - postal_code='04820', - region='dolore', - type=shared.AddressTypeEnum.BILLING, - ), - shared.Addressesitems( - city='Mountain View', - country='Armenia', - line1='alias', - line2='sit', - postal_code='98150-1458', - region='quidem', - type=shared.AddressTypeEnum.UNKNOWN, - ), - shared.Addressesitems( - city='Watersfurt', - country='Syrian Arab Republic', - line1='suscipit', - line2='ut', - postal_code='40961', - region='corporis', - type=shared.AddressTypeEnum.UNKNOWN, + city='Alyceworth', + country='Peru', + line1='deleniti', + line2='consequatur', + postal_code='03324-7318', + region='ut', + type=shared.AddressType.UNKNOWN, ), ], - contact_name='alias', - default_currency='ratione', - email_address='sed', - id='3b2c09b9-2477-41f5-a69e-5b7ec7626649', + contact_name='ipsam', + default_currency='occaecati', + email_address='error', + id='55c5c717-6045-497f-b771-9dd8c8482c02', metadata=shared.Metadata( is_deleted=False, ), - modified_date='possimus', - phone='487-692-7981 x1448', - registration_number='sit', - source_modified_date='expedita', - status=shared.SupplierStatusEnum.ACTIVE, + modified_date='aliquid', + phone='(851) 827-5759 x560', + registration_number='deserunt', + source_modified_date='impedit', + status=shared.SupplierStatus.UNKNOWN, supplemental_data=shared.SupplementalData( content={ - "repellat": { - "atque": 'iure', - "nulla": 'aliquid', - "asperiores": 'similique', + "perferendis": { + "illum": 'aspernatur', + "officia": 'cumque', + }, + "eveniet": { + "aut": 'minus', + "temporibus": 'repudiandae', + "perferendis": 'aperiam', }, - "veniam": { - "vel": 'earum', - "corrupti": 'temporibus', - "libero": 'sapiente', + "itaque": { + "necessitatibus": 'quisquam', + "delectus": 'blanditiis', + "inventore": 'quos', }, - "praesentium": { - "qui": 'asperiores', + "culpa": { + "amet": 'consequatur', + "dolor": 'saepe', + "sint": 'dolorem', }, }, ), - supplier_name='blanditiis', - tax_number='nesciunt', + supplier_name='doloribus', + tax_number='sit', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, supplier_id='8a210b68-6988-11ed-a1eb-0242ac120002', - timeout_in_minutes=721212, + timeout_in_minutes=40967, ) res = s.suppliers.update(req) diff --git a/accounting/docs/taxrates/README.md b/accounting/docs/taxrates/README.md index b552c5ba3..2dc4c01b4 100755 --- a/accounting/docs/taxrates/README.md +++ b/accounting/docs/taxrates/README.md @@ -25,10 +25,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetTaxRateRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - tax_rate_id='inventore', + tax_rate_id='culpa', ) res = s.tax_rates.get(req) @@ -53,13 +52,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListTaxRatesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='eligendi', + query='sunt', ) res = s.tax_rates.list(req) diff --git a/accounting/docs/trackingcategories/README.md b/accounting/docs/trackingcategories/README.md index eab1e445d..93b3897ec 100755 --- a/accounting/docs/trackingcategories/README.md +++ b/accounting/docs/trackingcategories/README.md @@ -25,10 +25,9 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetTrackingCategoryRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - tracking_category_id='animi', + tracking_category_id='quas', ) res = s.tracking_categories.get(req) @@ -53,13 +52,12 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListTrackingCategoriesRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', order_by='-modifiedDate', page=1, page_size=100, - query='autem', + query='expedita', ) res = s.tracking_categories.list(req) diff --git a/accounting/docs/transfers/README.md b/accounting/docs/transfers/README.md index beccc4c64..4191f06d1 100755 --- a/accounting/docs/transfers/README.md +++ b/accounting/docs/transfers/README.md @@ -19,7 +19,7 @@ Required data may vary by integration. To see what data to post, first call [Get > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. ### Example Usage @@ -33,74 +33,80 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.CreateTransferRequest( transfer=shared.Transfer( contact_ref=shared.TransferContactRef( - data_type='laborum', - id='9ffc5619-29cc-4a95-a0a1-395918da1d48', + data_type='explicabo', + id='1f06d4d1-7852-4d28-be1d-b01d6919f831', ), - date_='recusandae', + date_='nemo', deposited_record_refs=[ - 'quas', - 'officiis', + shared.InvoiceTo( + data_type='dolorem', + id='a84ea7db-15c4-4c15-be6c-d097a675597e', + ), + shared.InvoiceTo( + data_type='cumque', + id='beb7982b-af9a-47da-ac29-b938e51a7e6e', + ), + shared.InvoiceTo( + data_type='nulla', + id='6f7ff04f-da04-4669-aae8-182403655aa9', + ), ], - description='ipsum', + description='consequuntur', from_=shared.TransferAccount( account_ref=shared.AccountRef( - id='cf8e1143-da93-408b-a7a0-8af22184439b', - name='Desiree Walsh', + id='3c49919e-bd1c-4f77-9538-cbbfcdf4ece9', + name='Jodi Schamberger', ), - amount=3395.66, - currency='eum', + amount=7140.11, + currency='modi', ), - id='ccce470c-d214-47b6-a615-2cf01d0d8c3a', + id='2c330496-17cb-471d-9c25-0b60c751d2ae', metadata=shared.Metadata( is_deleted=False, ), - modified_date='magnam', - source_modified_date='facilis', + modified_date='expedita', + source_modified_date='necessitatibus', supplemental_data=shared.SupplementalData( content={ - "laborum": { - "quidem": 'repellat', - "molestias": 'amet', + "tempore": { + "rem": 'consequuntur', + "molestias": 'officiis', + "qui": 'vel', }, - "veniam": { - "voluptatibus": 'vero', - "provident": 'iure', - "incidunt": 'repellat', - "similique": 'ut', + "aliquam": { + "ab": 'dolorum', + "veniam": 'officiis', }, - "tempore": { - "voluptates": 'excepturi', + "minus": { + "corrupti": 'reprehenderit', + "a": 'quam', + "cupiditate": 'incidunt', }, }, ), to=shared.TransferAccount( account_ref=shared.AccountRef( - id='c097eda6-2344-42e1-a923-7e9984c80b47', - name='Bert Lind V', + id='f04f4144-6f79-43d3-b100-20147cd1b831', + name='Amy Price', ), - amount=1752.16, - currency='dolorem', + amount=2218.09, + currency='voluptates', ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='18ca8d69-c568-4921-8fa2-0207e4fae038', - name='Carroll Klocko DDS', + id='8960a0aa-fc7a-4867-8ba5-00a8f4cb72ed', + name='Kara Wilderman', ), shared.TrackingCategoryRef( - id='c2cabaf7-fc2c-4cba-8bef-0df68eaedb2e', - name='Darryl Altenwerth', + id='25d55615-8803-4212-b7b5-9b7154642b9e', + name='Stella Schroeder', ), shared.TrackingCategoryRef( - id='069fb36a-dd70-4408-8e0a-3fc73a5a034b', - name='Rebecca Graham', - ), - shared.TrackingCategoryRef( - id='243afa69-87a4-472b-b09a-153e22301068', - name='Tracy Monahan', + id='c3d3ca49-1837-4978-88d1-56f01ae36bb8', + name='Jose Adams', ), ], ), @@ -130,11 +136,10 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetTransferRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - transfer_id='ipsa', + transfer_id='eveniet', ) res = s.transfers.get(req) @@ -151,7 +156,7 @@ See the examples for integration-specific indicative models. > **Supported Integrations** > -> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. +> Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. ### Example Usage @@ -165,7 +170,6 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.GetCreateTransfersModelRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', @@ -193,14 +197,13 @@ s = codataccounting.CodatAccounting( ), ) - req = operations.ListTransfersRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', order_by='-modifiedDate', page=1, page_size=100, - query='perspiciatis', + query='ratione', ) res = s.transfers.list(req) diff --git a/accounting/files.gen b/accounting/files.gen index 04d20f11a..f4e531fb2 100755 --- a/accounting/files.gen +++ b/accounting/files.gen @@ -10,7 +10,6 @@ src/codataccounting/credit_notes.py src/codataccounting/customers.py src/codataccounting/direct_costs.py src/codataccounting/direct_incomes.py -src/codataccounting/financials.py src/codataccounting/invoices.py src/codataccounting/items.py src/codataccounting/journal_entries.py @@ -41,7 +40,6 @@ src/codataccounting/models/operations/list_accounts.py src/codataccounting/models/operations/create_bank_transactions.py src/codataccounting/models/operations/get_create_bank_account_model.py src/codataccounting/models/operations/list_bank_account_transactions.py -src/codataccounting/models/operations/list_bank_transactions.py src/codataccounting/models/operations/create_bank_account.py src/codataccounting/models/operations/get_bank_account.py src/codataccounting/models/operations/get_create_update_bankaccounts_model.py @@ -98,12 +96,9 @@ src/codataccounting/models/operations/get_create_directincomes_model.py src/codataccounting/models/operations/list_direct_incomes.py src/codataccounting/models/operations/list_direct_income_attachments.py src/codataccounting/models/operations/upload_direct_income_attachment.py -src/codataccounting/models/operations/get_balance_sheet.py -src/codataccounting/models/operations/get_cash_flow_statement.py -src/codataccounting/models/operations/get_profit_and_loss.py src/codataccounting/models/operations/create_invoice.py src/codataccounting/models/operations/delete_invoice.py -src/codataccounting/models/operations/download_invoice_attachment.py +src/codataccounting/models/operations/download_invoices_attachment.py src/codataccounting/models/operations/download_invoice_pdf.py src/codataccounting/models/operations/get_invoice.py src/codataccounting/models/operations/get_invoice_attachment.py @@ -138,6 +133,9 @@ src/codataccounting/models/operations/list_purchase_orders.py src/codataccounting/models/operations/update_purchase_order.py src/codataccounting/models/operations/get_aged_creditors_report.py src/codataccounting/models/operations/get_aged_debtors_report.py +src/codataccounting/models/operations/get_balance_sheet.py +src/codataccounting/models/operations/get_cash_flow_statement.py +src/codataccounting/models/operations/get_profit_and_loss.py src/codataccounting/models/operations/is_aged_creditors_report_available.py src/codataccounting/models/operations/is_aged_debtor_report_available.py src/codataccounting/models/operations/get_sales_order.py @@ -170,28 +168,27 @@ src/codataccounting/models/shared/halref.py src/codataccounting/models/shared/createaccountresponse.py src/codataccounting/models/shared/validation.py src/codataccounting/models/shared/validationitem.py -src/codataccounting/models/shared/pushoperationstatus_enum.py -src/codataccounting/models/shared/datatype_enum.py +src/codataccounting/models/shared/pushoperationstatus.py +src/codataccounting/models/shared/datatype.py src/codataccounting/models/shared/account.py src/codataccounting/models/shared/validdatatypelinks.py -src/codataccounting/models/shared/accounttype_enum.py -src/codataccounting/models/shared/accountstatus_enum.py +src/codataccounting/models/shared/accounttype.py +src/codataccounting/models/shared/accountstatus.py src/codataccounting/models/shared/pushoperationchange.py -src/codataccounting/models/shared/pushchangetype_enum.py +src/codataccounting/models/shared/pushchangetype.py src/codataccounting/models/shared/pushoperationref.py src/codataccounting/models/shared/pushoption.py src/codataccounting/models/shared/pushvalidationinfo.py src/codataccounting/models/shared/pushfieldvalidation.py -src/codataccounting/models/shared/pushoptiontype_enum.py +src/codataccounting/models/shared/pushoptiontype.py src/codataccounting/models/shared/pushoptionproperty.py src/codataccounting/models/shared/pushoptionchoice.py src/codataccounting/models/shared/accounts.py src/codataccounting/models/shared/createbanktransactionsresponse.py src/codataccounting/models/shared/banktransactions.py src/codataccounting/models/shared/banktransactionline.py -src/codataccounting/models/shared/banktransactiontype_enum.py +src/codataccounting/models/shared/banktransactiontype.py src/codataccounting/models/shared/banktransactionsresponse.py -src/codataccounting/models/shared/bankaccounttransactions.py src/codataccounting/models/shared/createbankaccountresponse.py src/codataccounting/models/shared/bankaccount.py src/codataccounting/models/shared/bankaccounts.py @@ -201,14 +198,14 @@ src/codataccounting/models/shared/billcreditnote.py src/codataccounting/models/shared/withholdingtaxitems.py src/codataccounting/models/shared/supplierref.py src/codataccounting/models/shared/supplementaldata.py -src/codataccounting/models/shared/billcreditnotestatus_enum.py +src/codataccounting/models/shared/billcreditnotestatus.py src/codataccounting/models/shared/items.py src/codataccounting/models/shared/paymentallocationpayment.py src/codataccounting/models/shared/accountref.py src/codataccounting/models/shared/billcreditnotelineitem.py src/codataccounting/models/shared/trackingcategoryref.py src/codataccounting/models/shared/projectref.py -src/codataccounting/models/shared/billedtotype_enum.py +src/codataccounting/models/shared/billedtotype.py src/codataccounting/models/shared/customerref.py src/codataccounting/models/shared/taxrateref.py src/codataccounting/models/shared/itemref.py @@ -219,12 +216,12 @@ src/codataccounting/models/shared/billpayment.py src/codataccounting/models/shared/paymentmethodref.py src/codataccounting/models/shared/billpaymentline.py src/codataccounting/models/shared/billpaymentlinelink.py -src/codataccounting/models/shared/billpaymentlinelinktype_enum.py +src/codataccounting/models/shared/billpaymentlinelinktype.py src/codataccounting/models/shared/pushoperationsummary.py src/codataccounting/models/shared/billpayments.py src/codataccounting/models/shared/createbillresponse.py src/codataccounting/models/shared/bill.py -src/codataccounting/models/shared/billstatus_enum.py +src/codataccounting/models/shared/billstatus.py src/codataccounting/models/shared/purchaseorderref.py src/codataccounting/models/shared/billlineitem.py src/codataccounting/models/shared/propertiestracking.py @@ -233,19 +230,19 @@ src/codataccounting/models/shared/bills.py src/codataccounting/models/shared/attachmentsdataset.py src/codataccounting/models/shared/updatebillresponse.py src/codataccounting/models/shared/companydataset.py -src/codataccounting/models/shared/phonenumbertype_enum.py -src/codataccounting/models/shared/addresstype_enum.py +src/codataccounting/models/shared/phonenumbertype.py +src/codataccounting/models/shared/addresstype.py src/codataccounting/models/shared/dataset.py src/codataccounting/models/shared/createcreditnoteresponse.py src/codataccounting/models/shared/creditnote.py -src/codataccounting/models/shared/creditnotestatus_enum.py +src/codataccounting/models/shared/creditnotestatus.py src/codataccounting/models/shared/creditnotelineitem.py -src/codataccounting/models/shared/billedtotype_enum1.py +src/codataccounting/models/shared/billedtotype1.py src/codataccounting/models/shared/creditnotes.py src/codataccounting/models/shared/updatecreditnoteresponse.py src/codataccounting/models/shared/createcustomerresponse.py src/codataccounting/models/shared/customer.py -src/codataccounting/models/shared/customerstatus_enum.py +src/codataccounting/models/shared/customerstatus.py src/codataccounting/models/shared/contact.py src/codataccounting/models/shared/phonenumbersitems.py src/codataccounting/models/shared/addressesitems.py @@ -261,25 +258,18 @@ src/codataccounting/models/shared/createdirectincomeresponse.py src/codataccounting/models/shared/directincome.py src/codataccounting/models/shared/directincomelineitem.py src/codataccounting/models/shared/directincomes.py -src/codataccounting/models/shared/balancesheet1.py -src/codataccounting/models/shared/balancesheet.py -src/codataccounting/models/shared/reportline.py -src/codataccounting/models/shared/cashflowstatement1.py -src/codataccounting/models/shared/cashflowstatement.py -src/codataccounting/models/shared/reportinput_enum.py -src/codataccounting/models/shared/reportbasis_enum.py -src/codataccounting/models/shared/profitandlossreport1.py -src/codataccounting/models/shared/profitandlossreport.py src/codataccounting/models/shared/createinvoiceresponse.py src/codataccounting/models/shared/invoice.py -src/codataccounting/models/shared/invoicestatus_enum.py +src/codataccounting/models/shared/invoicestatus.py +src/codataccounting/models/shared/salesorderref.py src/codataccounting/models/shared/invoicelineitem.py src/codataccounting/models/shared/propertiestracking1.py src/codataccounting/models/shared/invoices.py src/codataccounting/models/shared/updateinvoiceresponse.py src/codataccounting/models/shared/createitemresponse.py src/codataccounting/models/shared/item.py -src/codataccounting/models/shared/itemstatus_enum.py +src/codataccounting/models/shared/itemtype.py +src/codataccounting/models/shared/itemstatus.py src/codataccounting/models/shared/invoiceitem.py src/codataccounting/models/shared/billitem.py src/codataccounting/models/shared/items1.py @@ -291,21 +281,21 @@ src/codataccounting/models/shared/propertiestracking2.py src/codataccounting/models/shared/journalentries.py src/codataccounting/models/shared/createjournalresponse.py src/codataccounting/models/shared/journal.py -src/codataccounting/models/shared/journalstatus_enum.py +src/codataccounting/models/shared/journalstatus.py src/codataccounting/models/shared/journals.py src/codataccounting/models/shared/paymentmethod.py -src/codataccounting/models/shared/paymentmethodtype_enum.py -src/codataccounting/models/shared/paymentmethodstatus_enum.py +src/codataccounting/models/shared/paymentmethodtype.py +src/codataccounting/models/shared/paymentmethodstatus.py src/codataccounting/models/shared/paymentmethods.py src/codataccounting/models/shared/createpaymentresponse.py src/codataccounting/models/shared/payment.py src/codataccounting/models/shared/paymentline.py src/codataccounting/models/shared/paymentlinelink.py -src/codataccounting/models/shared/paymentlinktype_enum.py +src/codataccounting/models/shared/paymentlinktype.py src/codataccounting/models/shared/payments.py src/codataccounting/models/shared/createpurchaseorderresponse.py src/codataccounting/models/shared/purchaseorder.py -src/codataccounting/models/shared/purchaseorderstatus_enum.py +src/codataccounting/models/shared/purchaseorderstatus.py src/codataccounting/models/shared/shipto.py src/codataccounting/models/shared/purchaseorderlineitem.py src/codataccounting/models/shared/purchaseorders.py @@ -315,22 +305,31 @@ src/codataccounting/models/shared/agedcreditor.py src/codataccounting/models/shared/ageddebtorreport.py src/codataccounting/models/shared/ageddebtor.py src/codataccounting/models/shared/agedcurrencyoutstandingitems.py +src/codataccounting/models/shared/balancesheet1.py +src/codataccounting/models/shared/balancesheet.py +src/codataccounting/models/shared/reportline.py +src/codataccounting/models/shared/cashflowstatement1.py +src/codataccounting/models/shared/cashflowstatement.py +src/codataccounting/models/shared/reportinput.py +src/codataccounting/models/shared/reportbasis.py +src/codataccounting/models/shared/profitandlossreport1.py +src/codataccounting/models/shared/profitandlossreport.py src/codataccounting/models/shared/salesorder.py -src/codataccounting/models/shared/salesorderstatus_enum.py +src/codataccounting/models/shared/salesorderstatus.py src/codataccounting/models/shared/salesorderlineitem.py -src/codataccounting/models/shared/salesorderinvoicestatus_enum.py +src/codataccounting/models/shared/salesorderinvoicestatus.py src/codataccounting/models/shared/salesorders.py src/codataccounting/models/shared/createsupplierresponse.py src/codataccounting/models/shared/supplier.py -src/codataccounting/models/shared/supplierstatus_enum.py +src/codataccounting/models/shared/supplierstatus.py src/codataccounting/models/shared/suppliers.py src/codataccounting/models/shared/updatesupplierresponse.py src/codataccounting/models/shared/taxrate.py -src/codataccounting/models/shared/taxratestatus_enum.py +src/codataccounting/models/shared/taxratestatus.py src/codataccounting/models/shared/taxratecomponent.py src/codataccounting/models/shared/taxrates.py src/codataccounting/models/shared/trackingcategorytree.py -src/codataccounting/models/shared/status_enum.py +src/codataccounting/models/shared/status.py src/codataccounting/models/shared/trackingcategories.py src/codataccounting/models/shared/trackingcategory.py src/codataccounting/models/shared/createtransferresponse.py @@ -352,7 +351,6 @@ docs/creditnotes/README.md docs/customers/README.md docs/directcosts/README.md docs/directincomes/README.md -docs/financials/README.md docs/invoices/README.md docs/items/README.md docs/journalentries/README.md diff --git a/accounting/gen.yaml b/accounting/gen.yaml index 1fdb891f1..b2c68bd62 100644 --- a/accounting/gen.yaml +++ b/accounting/gen.yaml @@ -1,15 +1,16 @@ configVersion: 1.0.0 management: - docChecksum: d63c1d5e49b47159c13ca935e4ee445f + docChecksum: d35fbb42a498408d7f6d93f68158f07d docVersion: 2.1.0 - speakeasyVersion: 1.27.0 - generationVersion: 2.24.0 + speakeasyVersion: 1.37.4 + generationVersion: 2.32.0 generation: - telemetryEnabled: true sdkClassName: CodatAccounting singleTagPerOp: false + telemetryEnabled: true python: - version: 0.15.0 + version: 0.16.0 author: Speakeasy description: Python Client SDK Generated by Speakeasy + maxMethodParams: 0 packageName: codat-accounting diff --git a/accounting/setup.py b/accounting/setup.py index 59b394ef9..ebad2aba3 100755 --- a/accounting/setup.py +++ b/accounting/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="codat-accounting", - version="0.15.0", + version="0.16.0", author="Speakeasy", description="Python Client SDK Generated by Speakeasy", long_description=long_description, diff --git a/accounting/src/codataccounting/account_transactions.py b/accounting/src/codataccounting/account_transactions.py index 7a8159063..399f03ca5 100755 --- a/accounting/src/codataccounting/account_transactions.py +++ b/accounting/src/codataccounting/account_transactions.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get(self, request: operations.GetAccountTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAccountTransactionResponse: r"""Get account transaction Returns a specific [account transaction](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). @@ -29,7 +30,9 @@ def get(self, request: operations.GetAccountTransactionRequest, retries: Optiona base_url = self._server_url url = utils.generate_url(operations.GetAccountTransactionRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/accountTransactions/{accountTransactionId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -40,7 +43,7 @@ def get(self, request: operations.GetAccountTransactionRequest, retries: Optiona def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -58,15 +61,18 @@ def do_request(): return res + def list(self, request: operations.ListAccountTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListAccountTransactionsResponse: r"""List account transactions - Returns a list of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) for a given company's connection. + The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) for a given company's connection. """ base_url = self._server_url url = utils.generate_url(operations.ListAccountTransactionsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/accountTransactions', request) - + headers = {} query_params = utils.get_query_params(operations.ListAccountTransactionsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -77,7 +83,7 @@ def list(self, request: operations.ListAccountTransactionsRequest, retries: Opti def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/accounts.py b/accounting/src/codataccounting/accounts.py index ebf545ec9..da74bd74f 100755 --- a/accounting/src/codataccounting/accounts.py +++ b/accounting/src/codataccounting/accounts.py @@ -22,25 +22,29 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateAccountResponse: r"""Create account - Creates a new account for a given company. + The *Create accounts* endpoint creates a new [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given company. Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model). > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + > 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. + + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. """ base_url = self._server_url url = utils.generate_url(operations.CreateAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/accounts', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "account", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateAccountRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,14 +73,19 @@ def do_request(): return res + def get(self, request: operations.GetAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAccountResponse: r"""Get account - Gets a single account corresponding to the given ID. + The *Get account* endpoint returns a single [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given `accountId`. + + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. """ base_url = self._server_url url = utils.generate_url(operations.GetAccountRequest, base_url, '/companies/{companyId}/data/accounts/{accountId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +96,7 @@ def get(self, request: operations.GetAccountRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,20 +114,25 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateChartOfAccountsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateChartOfAccountsModelResponse: r"""Get create account model - Get create account model. Returns the expected data for the request payload. + The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/accounting-api#/schemas/Account) for a given company and integration. See the examples for integration-specific indicative models. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + > 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. + + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateChartOfAccountsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -129,7 +143,7 @@ def get_create_model(self, request: operations.GetCreateChartOfAccountsModelRequ def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -147,15 +161,20 @@ def do_request(): return res + def list(self, request: operations.ListAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListAccountsResponse: r"""List accounts - Gets the latest accounts for a company + The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection. + + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. """ base_url = self._server_url url = utils.generate_url(operations.ListAccountsRequest, base_url, '/companies/{companyId}/data/accounts', request) - + headers = {} query_params = utils.get_query_params(operations.ListAccountsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -166,7 +185,7 @@ def list(self, request: operations.ListAccountsRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/bank_account_transactions.py b/accounting/src/codataccounting/bank_account_transactions.py index 732d8787a..8df8ea62d 100755 --- a/accounting/src/codataccounting/bank_account_transactions.py +++ b/accounting/src/codataccounting/bank_account_transactions.py @@ -22,23 +22,25 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateBankTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankTransactionsResponse: r"""Create bank transactions Posts bank transactions to the accounting package for a given company. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support POST methods. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support POST methods. """ base_url = self._server_url url = utils.generate_url(operations.CreateBankTransactionsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bank_transactions", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBankTransactionsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -67,6 +69,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateBankAccountModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateBankAccountModelResponse: r"""List push options for bank account bank transactions Gets the options of pushing bank account transactions. @@ -74,7 +77,9 @@ def get_create_model(self, request: operations.GetCreateBankAccountModelRequest, base_url = self._server_url url = utils.generate_url(operations.GetCreateBankAccountModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -85,7 +90,7 @@ def get_create_model(self, request: operations.GetCreateBankAccountModelRequest, def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -103,6 +108,7 @@ def do_request(): return res + def list(self, request: operations.ListBankAccountTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBankAccountTransactionsResponse: r"""List bank transactions for bank account Gets bank transactions for a given bank account ID @@ -110,8 +116,10 @@ def list(self, request: operations.ListBankAccountTransactionsRequest, retries: base_url = self._server_url url = utils.generate_url(operations.ListBankAccountTransactionsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}/bankTransactions', request) - + headers = {} query_params = utils.get_query_params(operations.ListBankAccountTransactionsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -122,7 +130,7 @@ def list(self, request: operations.ListBankAccountTransactionsRequest, retries: def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -140,41 +148,4 @@ def do_request(): return res - def list_transactions(self, request: operations.ListBankTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBankTransactionsResponse: - r"""List all bank transactions - Gets the latest bank transactions for given account ID and company. Doesn't require connection ID. - """ - base_url = self._server_url - - url = utils.generate_url(operations.ListBankTransactionsRequest, base_url, '/companies/{companyId}/data/bankAccounts/{accountId}/transactions', request) - - query_params = utils.get_query_params(operations.ListBankTransactionsRequest, request) - - client = self._security_client - - retry_config = retries - if retry_config is None: - retry_config = utils.RetryConfig('backoff', True) - retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) - - - def do_request(): - return client.request('GET', url, params=query_params) - - http_res = utils.retry(do_request, utils.Retries(retry_config, [ - '408', - '429', - '5XX' - ])) - content_type = http_res.headers.get('Content-Type') - - res = operations.ListBankTransactionsResponse(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.BankAccountTransactions]) - res.bank_account_transactions = out - - return res - \ No newline at end of file diff --git a/accounting/src/codataccounting/bank_accounts.py b/accounting/src/codataccounting/bank_accounts.py index 62b008c28..acc36a465 100755 --- a/accounting/src/codataccounting/bank_accounts.py +++ b/accounting/src/codataccounting/bank_accounts.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankAccountResponse: r"""Create bank account Posts a new bank account to the accounting package for a given company. @@ -35,12 +36,13 @@ def create(self, request: operations.CreateBankAccountRequest, retries: Optional base_url = self._server_url url = utils.generate_url(operations.CreateBankAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bankAccounts', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bank_account", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBankAccountRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,14 +71,19 @@ def do_request(): return res + def get(self, request: operations.GetBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBankAccountResponse: r"""Get bank account Gets the bank account with a given ID + + Deprecated: this method will be removed in a future release, please migrate away from it as soon as possible """ base_url = self._server_url url = utils.generate_url(operations.GetBankAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +94,7 @@ def get(self, request: operations.GetBankAccountRequest, retries: Optional[utils def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,6 +112,7 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateBankAccountsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateBankAccountsModelResponse: r"""Get create/update bank account model Get create/update bank account model. Returns the expected data for the request payload. @@ -118,7 +126,9 @@ def get_create_update_model(self, request: operations.GetCreateUpdateBankAccount base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateBankAccountsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bankAccounts', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -129,7 +139,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateBankAccount def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -147,6 +157,7 @@ def do_request(): return res + def list(self, request: operations.ListBankAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBankAccountsResponse: r"""List bank accounts Gets the list of bank accounts for a given connection @@ -154,8 +165,10 @@ def list(self, request: operations.ListBankAccountsRequest, retries: Optional[ut base_url = self._server_url url = utils.generate_url(operations.ListBankAccountsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts', request) - + headers = {} query_params = utils.get_query_params(operations.ListBankAccountsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -166,7 +179,7 @@ def list(self, request: operations.ListBankAccountsRequest, retries: Optional[ut def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -184,6 +197,7 @@ def do_request(): return res + def update(self, request: operations.UpdateBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateBankAccountResponse: r"""Update bank account Posts an updated bank account to the accounting package for a given company. @@ -192,17 +206,18 @@ def update(self, request: operations.UpdateBankAccountRequest, retries: Optional > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support updating bank accounts. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support updating bank accounts. """ base_url = self._server_url url = utils.generate_url(operations.UpdateBankAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{bankAccountId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bank_account", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateBankAccountRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/bill_credit_notes.py b/accounting/src/codataccounting/bill_credit_notes.py index 1ec8b5764..cb8047050 100755 --- a/accounting/src/codataccounting/bill_credit_notes.py +++ b/accounting/src/codataccounting/bill_credit_notes.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateBillCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBillCreditNoteResponse: r"""Create bill credit note Posts a new billCreditNote to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateBillCreditNoteRequest, retries: Optio > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating bill credit notes. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating bill credit notes. """ base_url = self._server_url url = utils.generate_url(operations.CreateBillCreditNoteRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/billCreditNotes', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bill_credit_note", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBillCreditNoteRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def get(self, request: operations.GetBillCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillCreditNoteResponse: r"""Get bill credit note Gets a single billCreditNote corresponding to the given ID. @@ -76,7 +79,9 @@ def get(self, request: operations.GetBillCreditNoteRequest, retries: Optional[ut base_url = self._server_url url = utils.generate_url(operations.GetBillCreditNoteRequest, base_url, '/companies/{companyId}/data/billCreditNotes/{billCreditNoteId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def get(self, request: operations.GetBillCreditNoteRequest, retries: Optional[ut def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,18 +110,21 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateBillCreditNotesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateBillCreditNotesModelResponse: r"""Get create/update bill credit note model Get create/update bill credit note model. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating bill credit notes. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating bill credit notes. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateBillCreditNotesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/billCreditNotes', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -127,7 +135,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateBillCreditN def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -145,15 +153,18 @@ def do_request(): return res + def list(self, request: operations.ListBillCreditNotesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillCreditNotesResponse: r"""List bill credit notes - Gets a list of all bill credit notes for a company, with pagination + Gets a list of all bill credit notes for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListBillCreditNotesRequest, base_url, '/companies/{companyId}/data/billCreditNotes', request) - + headers = {} query_params = utils.get_query_params(operations.ListBillCreditNotesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -164,7 +175,7 @@ def list(self, request: operations.ListBillCreditNotesRequest, retries: Optional def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -182,6 +193,7 @@ def do_request(): return res + def update(self, request: operations.UpdateBillCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateBillCreditNoteResponse: r"""Update bill credit note Posts an updated billCreditNote to the accounting package for a given company. @@ -190,17 +202,18 @@ def update(self, request: operations.UpdateBillCreditNoteRequest, retries: Optio > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support updating bill credit notes. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support updating bill credit notes. """ base_url = self._server_url url = utils.generate_url(operations.UpdateBillCreditNoteRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/billCreditNotes/{billCreditNoteId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bill_credit_note", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateBillCreditNoteRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/bill_payments.py b/accounting/src/codataccounting/bill_payments.py index 2b2f15848..9aa5b709c 100755 --- a/accounting/src/codataccounting/bill_payments.py +++ b/accounting/src/codataccounting/bill_payments.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateBillPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBillPaymentResponse: r"""Create bill payments Posts a new bill payment to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateBillPaymentRequest, retries: Optional > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating bill payments. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating bill payments. """ base_url = self._server_url url = utils.generate_url(operations.CreateBillPaymentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/billPayments', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bill_payment", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBillPaymentRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,18 +71,40 @@ def do_request(): return res + def delete(self, request: operations.DeleteBillPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBillPaymentResponse: r"""Delete bill payment - Deletes a bill payment from the accounting package for a given company. + The _Delete Bill Payments_ endpoint allows you to delete a specified Bill Payment from an accounting platform. + + ### Process + 1. Pass the `{billPaymentId}` to the _Delete Bill Payments_ 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](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-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/how-deleting-bill-payments-works) to learn more. | > **Supported Integrations** - > - > This functionality is currently only supported for our Oracle NetSuite integration. 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. + > + > 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 = self._server_url url = utils.generate_url(operations.DeleteBillPaymentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/billPayments/{billPaymentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -91,7 +115,7 @@ def delete(self, request: operations.DeleteBillPaymentRequest, retries: Optional def do_request(): - return client.request('DELETE', url) + return client.request('DELETE', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -109,14 +133,17 @@ def do_request(): return res + def get(self, request: operations.GetBillPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillPaymentsResponse: r"""Get bill payment - Get a bill payment + Get a bill payment. """ base_url = self._server_url url = utils.generate_url(operations.GetBillPaymentsRequest, base_url, '/companies/{companyId}/data/billPayments/{billPaymentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -127,7 +154,7 @@ def get(self, request: operations.GetBillPaymentsRequest, retries: Optional[util def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -145,18 +172,21 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateBillPaymentsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateBillPaymentsModelResponse: r"""Get create bill payment model Get create bill payment model. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating and deleting bill payments. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating and deleting bill payments. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateBillPaymentsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/billPayments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -167,7 +197,7 @@ def get_create_model(self, request: operations.GetCreateBillPaymentsModelRequest def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -185,15 +215,18 @@ def do_request(): return res + def list(self, request: operations.ListBillPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillPaymentsResponse: r"""List bill payments - Gets the latest billPayments for a company, with pagination + Gets the latest billPayments for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListBillPaymentsRequest, base_url, '/companies/{companyId}/data/billPayments', request) - + headers = {} query_params = utils.get_query_params(operations.ListBillPaymentsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -204,7 +237,7 @@ def list(self, request: operations.ListBillPaymentsRequest, retries: Optional[ut def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/bills.py b/accounting/src/codataccounting/bills.py index 70f899cbc..664640e5f 100755 --- a/accounting/src/codataccounting/bills.py +++ b/accounting/src/codataccounting/bills.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBillResponse: r"""Create bill Posts a new bill to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateBillRequest, retries: Optional[utils. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. """ base_url = self._server_url url = utils.generate_url(operations.CreateBillRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bills', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bill", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBillRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,18 +71,42 @@ def do_request(): return res + def delete(self, request: operations.DeleteBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBillResponse: r"""Delete bill - Deletes a bill from the accounting package for a given company. + The _Delete Bills_ endpoint allows you to delete a specified Bill from an accounting platform. + + ### Process + 1. Pass the `{billId}` to the _Delete Bills_ 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](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-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 Oracle NetSuite and QuickBooks Online 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. + > 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 = self._server_url 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._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -91,7 +117,7 @@ def delete(self, request: operations.DeleteBillRequest, retries: Optional[utils. def do_request(): - return client.request('DELETE', url) + return client.request('DELETE', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -109,14 +135,17 @@ def do_request(): return res + def download_attachment(self, request: operations.DownloadBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadBillAttachmentResponse: r"""Download bill attachment - Download bill attachment + Download bill attachment. """ base_url = self._server_url url = utils.generate_url(operations.DownloadBillAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download', request) - + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -127,7 +156,7 @@ def download_attachment(self, request: operations.DownloadBillAttachmentRequest, def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -144,14 +173,17 @@ def do_request(): return res + def get(self, request: operations.GetBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillResponse: r"""Get bill - Get bill + Get a bill. """ base_url = self._server_url url = utils.generate_url(operations.GetBillRequest, base_url, '/companies/{companyId}/data/bills/{billId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -162,7 +194,7 @@ def get(self, request: operations.GetBillRequest, retries: Optional[utils.RetryC def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -180,14 +212,17 @@ def do_request(): return res + def get_attachment(self, request: operations.GetBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillAttachmentResponse: r"""Get bill attachment - Get bill attachment + Get bill attachment. """ base_url = self._server_url url = utils.generate_url(operations.GetBillAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -198,7 +233,7 @@ def get_attachment(self, request: operations.GetBillAttachmentRequest, retries: def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -216,18 +251,21 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateBillsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateBillsModelResponse: r"""Get create/update bill model Get create/update bill model. - > **Supported Integrations** + > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateBillsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bills', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -238,7 +276,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateBillsModelR def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -256,15 +294,18 @@ def do_request(): return res + def list(self, request: operations.ListBillsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillsResponse: r"""List bills - Gets the latest bills for a company, with pagination + Gets the latest bills for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListBillsRequest, base_url, '/companies/{companyId}/data/bills', request) - + headers = {} query_params = utils.get_query_params(operations.ListBillsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -275,7 +316,7 @@ def list(self, request: operations.ListBillsRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -293,14 +334,17 @@ def do_request(): return res + def list_attachments(self, request: operations.ListBillAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillAttachmentsResponse: r"""List bill attachments - List bill attachments + List bill attachments. """ base_url = self._server_url url = utils.generate_url(operations.ListBillAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -311,7 +355,7 @@ def list_attachments(self, request: operations.ListBillAttachmentsRequest, retri def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -329,6 +373,7 @@ def do_request(): return res + def update(self, request: operations.UpdateBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateBillResponse: r"""Update bill Posts an updated bill to the accounting package for a given company. @@ -337,17 +382,18 @@ def update(self, request: operations.UpdateBillRequest, retries: Optional[utils. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support updating a bill. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support updating a bill. """ base_url = self._server_url url = utils.generate_url(operations.UpdateBillRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bills/{billId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "bill", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateBillRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -376,18 +422,20 @@ def do_request(): return res + def upload_attachment(self, request: operations.UploadBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadBillAttachmentResponse: r"""Upload bill attachment - Upload bill attachment + Upload bill attachment. """ base_url = self._server_url url = utils.generate_url(operations.UploadBillAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bills/{billId}/attachments', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type + headers['Accept'] = '*/*' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/company_info.py b/accounting/src/codataccounting/company_info.py index eb5772321..2f2b0e3db 100755 --- a/accounting/src/codataccounting/company_info.py +++ b/accounting/src/codataccounting/company_info.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get(self, request: operations.GetCompanyInfoRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyInfoResponse: r"""Get company info Gets the latest basic info for a company. @@ -29,7 +30,9 @@ def get(self, request: operations.GetCompanyInfoRequest, retries: Optional[utils base_url = self._server_url url = utils.generate_url(operations.GetCompanyInfoRequest, base_url, '/companies/{companyId}/data/info', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -40,7 +43,7 @@ def get(self, request: operations.GetCompanyInfoRequest, retries: Optional[utils def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -58,6 +61,7 @@ def do_request(): return res + def refresh(self, request: operations.RefreshCompanyInfoRequest, retries: Optional[utils.RetryConfig] = None) -> operations.RefreshCompanyInfoResponse: r"""Refresh company info Initiates the process of synchronising basic info for a company @@ -65,7 +69,9 @@ def refresh(self, request: operations.RefreshCompanyInfoRequest, retries: Option base_url = self._server_url url = utils.generate_url(operations.RefreshCompanyInfoRequest, base_url, '/companies/{companyId}/data/info', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -76,7 +82,7 @@ def refresh(self, request: operations.RefreshCompanyInfoRequest, retries: Option def do_request(): - return client.request('POST', url) + return client.request('POST', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/credit_notes.py b/accounting/src/codataccounting/credit_notes.py index 04632f6c9..a688567dd 100755 --- a/accounting/src/codataccounting/credit_notes.py +++ b/accounting/src/codataccounting/credit_notes.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCreditNoteResponse: r"""Create credit note Push credit note @@ -31,17 +32,18 @@ def create(self, request: operations.CreateCreditNoteRequest, retries: Optional[ > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating a credit note. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating a credit note. """ base_url = self._server_url url = utils.generate_url(operations.CreateCreditNoteRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/creditNotes', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "credit_note", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateCreditNoteRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -70,6 +72,7 @@ def do_request(): return res + def get(self, request: operations.GetCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreditNoteResponse: r"""Get credit note Gets a single creditNote corresponding to the given ID. @@ -77,7 +80,9 @@ def get(self, request: operations.GetCreditNoteRequest, retries: Optional[utils. base_url = self._server_url url = utils.generate_url(operations.GetCreditNoteRequest, base_url, '/companies/{companyId}/data/creditNotes/{creditNoteId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -88,7 +93,7 @@ def get(self, request: operations.GetCreditNoteRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -106,6 +111,7 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateCreditNotesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateCreditNotesModelResponse: r"""Get create/update credit note model Get create/update credit note model. Returns the expected data for the request payload. @@ -114,12 +120,14 @@ def get_create_update_model(self, request: operations.GetCreateUpdateCreditNotes > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating and updating a credit note. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating and updating a credit note. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateCreditNotesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/creditNotes', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -130,7 +138,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateCreditNotes def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -148,15 +156,18 @@ def do_request(): return res + def list(self, request: operations.ListCreditNotesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCreditNotesResponse: r"""List credit notes - Gets a list of all credit notes for a company, with pagination + Gets a list of all credit notes for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListCreditNotesRequest, base_url, '/companies/{companyId}/data/creditNotes', request) - + headers = {} query_params = utils.get_query_params(operations.ListCreditNotesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -167,7 +178,7 @@ def list(self, request: operations.ListCreditNotesRequest, retries: Optional[uti def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -185,6 +196,7 @@ def do_request(): return res + def update(self, request: operations.UpdateCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCreditNoteResponse: r"""Update creditNote Posts an updated credit note to the accounting package for a given company. @@ -193,17 +205,18 @@ def update(self, request: operations.UpdateCreditNoteRequest, retries: Optional[ > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support updating a credit note. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support updating a credit note. """ base_url = self._server_url url = utils.generate_url(operations.UpdateCreditNoteRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/creditNotes/{creditNoteId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "credit_note", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateCreditNoteRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/customers.py b/accounting/src/codataccounting/customers.py index 55eba2086..2bb29a16d 100755 --- a/accounting/src/codataccounting/customers.py +++ b/accounting/src/codataccounting/customers.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCustomerResponse: r"""Create customer Posts an individual customer for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateCustomerRequest, retries: Optional[ut > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating customers. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating customers. """ base_url = self._server_url url = utils.generate_url(operations.CreateCustomerRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/customers', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "customer", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateCustomerRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,14 +71,17 @@ def do_request(): return res + def download_attachment(self, request: operations.DownloadCustomerAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadCustomerAttachmentResponse: r"""Download customer attachment - Download customer attachment + Download customer attachment. """ base_url = self._server_url url = utils.generate_url(operations.DownloadCustomerAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}/download', request) - + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def download_attachment(self, request: operations.DownloadCustomerAttachmentRequ def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -104,6 +109,7 @@ def do_request(): return res + def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCustomerResponse: r"""Get customer Gets a single customer corresponding to the given ID. @@ -111,7 +117,9 @@ def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.Re base_url = self._server_url url = utils.generate_url(operations.GetCustomerRequest, base_url, '/companies/{companyId}/data/customers/{customerId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -122,7 +130,7 @@ def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.Re def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -140,14 +148,17 @@ def do_request(): return res + def get_attachment(self, request: operations.GetCustomerAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCustomerAttachmentResponse: r"""Get customer attachment - Get customer attachment + Get customer attachment. """ base_url = self._server_url url = utils.generate_url(operations.GetCustomerAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -158,7 +169,7 @@ def get_attachment(self, request: operations.GetCustomerAttachmentRequest, retri def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -176,6 +187,7 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateCustomersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateCustomersModelResponse: r"""Get create/update customer model Get create/update customer model. Returns the expected data for the request payload. @@ -184,12 +196,14 @@ def get_create_update_model(self, request: operations.GetCreateUpdateCustomersMo > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating and updating customers. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating and updating customers. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateCustomersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/customers', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -200,7 +214,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateCustomersMo def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -218,15 +232,18 @@ def do_request(): return res + def list(self, request: operations.ListCustomersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomersResponse: r"""List customers - Gets the latest customers for a company, with pagination + Gets the latest customers for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListCustomersRequest, base_url, '/companies/{companyId}/data/customers', request) - + headers = {} query_params = utils.get_query_params(operations.ListCustomersRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -237,7 +254,7 @@ def list(self, request: operations.ListCustomersRequest, retries: Optional[utils def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -255,6 +272,7 @@ def do_request(): return res + def list_attachments(self, request: operations.ListCustomerAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomerAttachmentsResponse: r"""List customer attachments List customer attachments @@ -262,7 +280,9 @@ def list_attachments(self, request: operations.ListCustomerAttachmentsRequest, r base_url = self._server_url url = utils.generate_url(operations.ListCustomerAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -273,7 +293,7 @@ def list_attachments(self, request: operations.ListCustomerAttachmentsRequest, r def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -291,6 +311,7 @@ def do_request(): return res + def update(self, request: operations.UpdateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCustomerResponse: r"""Update customer Posts an updated customer for a given company. @@ -299,17 +320,18 @@ def update(self, request: operations.UpdateCustomerRequest, retries: Optional[ut > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support updating customers. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support updating customers. """ base_url = self._server_url url = utils.generate_url(operations.UpdateCustomerRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/customers/{customerId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "customer", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateCustomerRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/direct_costs.py b/accounting/src/codataccounting/direct_costs.py index 13760df40..56b3df2ed 100755 --- a/accounting/src/codataccounting/direct_costs.py +++ b/accounting/src/codataccounting/direct_costs.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateDirectCostRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateDirectCostResponse: r"""Create direct cost Posts a new direct cost to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateDirectCostRequest, retries: Optional[ > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. """ base_url = self._server_url url = utils.generate_url(operations.CreateDirectCostRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/directCosts', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "direct_cost", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateDirectCostRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def download_attachment(self, request: operations.DownloadDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadDirectCostAttachmentResponse: r"""Download direct cost attachment Downloads an attachment for the specified direct cost for a given company. @@ -76,7 +79,9 @@ def download_attachment(self, request: operations.DownloadDirectCostAttachmentRe base_url = self._server_url url = utils.generate_url(operations.DownloadDirectCostAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}/download', request) - + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def download_attachment(self, request: operations.DownloadDirectCostAttachmentRe def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -104,6 +109,7 @@ def do_request(): return res + def get(self, request: operations.GetDirectCostRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectCostResponse: r"""Get direct cost Gets the specified direct cost for a given company. @@ -111,7 +117,9 @@ def get(self, request: operations.GetDirectCostRequest, retries: Optional[utils. base_url = self._server_url url = utils.generate_url(operations.GetDirectCostRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -122,7 +130,7 @@ def get(self, request: operations.GetDirectCostRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -140,6 +148,7 @@ def do_request(): return res + def get_attachment(self, request: operations.GetDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectCostAttachmentResponse: r"""Get direct cost attachment Gets the specified direct cost attachment for a given company. @@ -147,7 +156,9 @@ def get_attachment(self, request: operations.GetDirectCostAttachmentRequest, ret base_url = self._server_url url = utils.generate_url(operations.GetDirectCostAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -158,7 +169,7 @@ def get_attachment(self, request: operations.GetDirectCostAttachmentRequest, ret def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -176,6 +187,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateDirectCostsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateDirectCostsModelResponse: r"""Get create direct cost model Get create direct cost model. Returns the expected data for the request payload. @@ -184,12 +196,14 @@ def get_create_model(self, request: operations.GetCreateDirectCostsModelRequest, > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating direct costs. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateDirectCostsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/directCosts', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -200,7 +214,7 @@ def get_create_model(self, request: operations.GetCreateDirectCostsModelRequest, def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -218,6 +232,7 @@ def do_request(): return res + def list(self, request: operations.ListDirectCostsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectCostsResponse: r"""List direct costs Gets the direct costs for the company. @@ -225,8 +240,10 @@ def list(self, request: operations.ListDirectCostsRequest, retries: Optional[uti base_url = self._server_url url = utils.generate_url(operations.ListDirectCostsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts', request) - + headers = {} query_params = utils.get_query_params(operations.ListDirectCostsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -237,7 +254,7 @@ def list(self, request: operations.ListDirectCostsRequest, retries: Optional[uti def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -255,6 +272,7 @@ def do_request(): return res + def list_attachments(self, request: operations.ListDirectCostAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectCostAttachmentsResponse: r"""List direct cost attachments Gets all attachments for the specified direct cost for a given company. @@ -262,7 +280,9 @@ def list_attachments(self, request: operations.ListDirectCostAttachmentsRequest, base_url = self._server_url url = utils.generate_url(operations.ListDirectCostAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -273,7 +293,7 @@ def list_attachments(self, request: operations.ListDirectCostAttachmentsRequest, def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -291,6 +311,7 @@ def do_request(): return res + def upload_attachment(self, request: operations.UploadDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadDirectCostAttachmentResponse: r"""Upload direct cost attachment Posts a new direct cost attachment for a given company. @@ -298,11 +319,12 @@ def upload_attachment(self, request: operations.UploadDirectCostAttachmentReques base_url = self._server_url url = utils.generate_url(operations.UploadDirectCostAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/directCosts/{directCostId}/attachment', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type + headers['Accept'] = '*/*' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/direct_incomes.py b/accounting/src/codataccounting/direct_incomes.py index 0dead7824..c0df83de3 100755 --- a/accounting/src/codataccounting/direct_incomes.py +++ b/accounting/src/codataccounting/direct_incomes.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateDirectIncomeRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateDirectIncomeResponse: r"""Create direct income Posts a new direct income to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateDirectIncomeRequest, retries: Optiona > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. """ base_url = self._server_url url = utils.generate_url(operations.CreateDirectIncomeRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/directIncomes', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "direct_income", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateDirectIncomeRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def download_attachment(self, request: operations.DownloadDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadDirectIncomeAttachmentResponse: r"""Download direct income attachment Downloads an attachment for the specified direct income for a given company. @@ -76,7 +79,9 @@ def download_attachment(self, request: operations.DownloadDirectIncomeAttachment base_url = self._server_url url = utils.generate_url(operations.DownloadDirectIncomeAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}/download', request) - + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def download_attachment(self, request: operations.DownloadDirectIncomeAttachment def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -104,6 +109,7 @@ def do_request(): return res + def get(self, request: operations.GetDirectIncomeRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectIncomeResponse: r"""Get direct income Gets the specified direct income for a given company and connection. @@ -111,7 +117,9 @@ def get(self, request: operations.GetDirectIncomeRequest, retries: Optional[util base_url = self._server_url url = utils.generate_url(operations.GetDirectIncomeRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -122,7 +130,7 @@ def get(self, request: operations.GetDirectIncomeRequest, retries: Optional[util def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -140,6 +148,7 @@ def do_request(): return res + def get_attachment(self, request: operations.GetDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectIncomeAttachmentResponse: r"""Get direct income attachment Gets the specified direct income attachment for a given company. @@ -147,8 +156,10 @@ def get_attachment(self, request: operations.GetDirectIncomeAttachmentRequest, r base_url = self._server_url url = utils.generate_url(operations.GetDirectIncomeAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}', request) - + headers = {} query_params = utils.get_query_params(operations.GetDirectIncomeAttachmentRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -159,7 +170,7 @@ def get_attachment(self, request: operations.GetDirectIncomeAttachmentRequest, r def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -177,6 +188,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateDirectIncomesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateDirectIncomesModelResponse: r"""Get create direct income model Get create direct income model. Returns the expected data for the request payload. @@ -185,12 +197,14 @@ def get_create_model(self, request: operations.GetCreateDirectIncomesModelReques > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating direct incomes. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateDirectIncomesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/directIncomes', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -201,7 +215,7 @@ def get_create_model(self, request: operations.GetCreateDirectIncomesModelReques def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -219,6 +233,7 @@ def do_request(): return res + def list(self, request: operations.ListDirectIncomesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectIncomesResponse: r"""List direct incomes Lists the direct incomes for a given company. @@ -226,8 +241,10 @@ def list(self, request: operations.ListDirectIncomesRequest, retries: Optional[u base_url = self._server_url url = utils.generate_url(operations.ListDirectIncomesRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes', request) - + headers = {} query_params = utils.get_query_params(operations.ListDirectIncomesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -238,7 +255,7 @@ def list(self, request: operations.ListDirectIncomesRequest, retries: Optional[u def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -256,6 +273,7 @@ def do_request(): return res + def list_attachments(self, request: operations.ListDirectIncomeAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectIncomeAttachmentsResponse: r"""List direct income attachments Gets all attachments for the specified direct income for a given company. @@ -263,7 +281,9 @@ def list_attachments(self, request: operations.ListDirectIncomeAttachmentsReques base_url = self._server_url url = utils.generate_url(operations.ListDirectIncomeAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -274,7 +294,7 @@ def list_attachments(self, request: operations.ListDirectIncomeAttachmentsReques def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -292,6 +312,7 @@ def do_request(): return res + def upload_attachment(self, request: operations.UploadDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadDirectIncomeAttachmentResponse: r"""Create direct income attachment Posts a new direct income attachment for a given company. @@ -299,11 +320,12 @@ def upload_attachment(self, request: operations.UploadDirectIncomeAttachmentRequ base_url = self._server_url url = utils.generate_url(operations.UploadDirectIncomeAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/directIncomes/{directIncomeId}/attachment', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type + headers['Accept'] = '*/*' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/financials.py b/accounting/src/codataccounting/financials.py deleted file mode 100755 index e8455c98e..000000000 --- a/accounting/src/codataccounting/financials.py +++ /dev/null @@ -1,136 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -import requests as requests_http -from . import utils -from codataccounting.models import operations, shared -from typing import Optional - -class Financials: - r"""Financials""" - _client: requests_http.Session - _security_client: requests_http.Session - _server_url: str - _language: str - _sdk_version: str - _gen_version: str - - def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None: - self._client = client - self._security_client = security_client - self._server_url = server_url - self._language = language - self._sdk_version = sdk_version - self._gen_version = gen_version - - def get_balance_sheet(self, request: operations.GetBalanceSheetRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBalanceSheetResponse: - r"""Get balance sheet - Gets the latest balance sheet for a company. - """ - base_url = self._server_url - - url = utils.generate_url(operations.GetBalanceSheetRequest, base_url, '/companies/{companyId}/data/financials/balanceSheet', request) - - query_params = utils.get_query_params(operations.GetBalanceSheetRequest, request) - - client = self._security_client - - retry_config = retries - if retry_config is None: - retry_config = utils.RetryConfig('backoff', True) - retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) - - - def do_request(): - return client.request('GET', url, params=query_params) - - http_res = utils.retry(do_request, utils.Retries(retry_config, [ - '408', - '429', - '5XX' - ])) - content_type = http_res.headers.get('Content-Type') - - res = operations.GetBalanceSheetResponse(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.BalanceSheet1]) - res.balance_sheet = out - - return res - - def get_cash_flow_statement(self, request: operations.GetCashFlowStatementRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCashFlowStatementResponse: - r"""Get cash flow statement - Gets the latest cash flow statement for a company. - """ - base_url = self._server_url - - url = utils.generate_url(operations.GetCashFlowStatementRequest, base_url, '/companies/{companyId}/data/financials/cashFlowStatement', request) - - query_params = utils.get_query_params(operations.GetCashFlowStatementRequest, request) - - client = self._security_client - - retry_config = retries - if retry_config is None: - retry_config = utils.RetryConfig('backoff', True) - retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) - - - def do_request(): - return client.request('GET', url, params=query_params) - - http_res = utils.retry(do_request, utils.Retries(retry_config, [ - '408', - '429', - '5XX' - ])) - content_type = http_res.headers.get('Content-Type') - - res = operations.GetCashFlowStatementResponse(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.CashFlowStatement1]) - res.cash_flow_statement = out - - return res - - def get_profit_and_loss(self, request: operations.GetProfitAndLossRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetProfitAndLossResponse: - r"""Get profit and loss - Gets the latest profit and loss for a company. - """ - base_url = self._server_url - - url = utils.generate_url(operations.GetProfitAndLossRequest, base_url, '/companies/{companyId}/data/financials/profitAndLoss', request) - - query_params = utils.get_query_params(operations.GetProfitAndLossRequest, request) - - client = self._security_client - - retry_config = retries - if retry_config is None: - retry_config = utils.RetryConfig('backoff', True) - retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) - - - def do_request(): - return client.request('GET', url, params=query_params) - - http_res = utils.retry(do_request, utils.Retries(retry_config, [ - '408', - '429', - '5XX' - ])) - content_type = http_res.headers.get('Content-Type') - - res = operations.GetProfitAndLossResponse(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.ProfitAndLossReport1]) - res.profit_and_loss_report = out - - return res - - \ No newline at end of file diff --git a/accounting/src/codataccounting/invoices.py b/accounting/src/codataccounting/invoices.py index 717d0c51e..89c1c3ca9 100755 --- a/accounting/src/codataccounting/invoices.py +++ b/accounting/src/codataccounting/invoices.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateInvoiceResponse: r"""Create invoice Posts a new invoice to the accounting package for a given company. @@ -35,12 +36,13 @@ def create(self, request: operations.CreateInvoiceRequest, retries: Optional[uti base_url = self._server_url url = utils.generate_url(operations.CreateInvoiceRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/invoices', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "invoice", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateInvoiceRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,18 +71,42 @@ def do_request(): return res + def delete(self, request: operations.DeleteInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteInvoiceResponse: r"""Delete invoice - Deletes an invoice from the accounting package for a given company. + The _Delete Invoices_ endpoint allows you to delete a specified Invoice from an accounting platform. + + ### Process + 1. Pass the `{invoiceId}` to the _Delete Invoices_ 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](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). + + A `Success` status indicates that the Invoice object was deleted from the accounting platform. + 3. (Optional) Check that the Invoice was deleted from the accounting platform. + + ### Effect on related objects + + Be aware that deleting an Invoice from an accounting platform might cause related objects to be modified. For example, if you delete a paid invoice from QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The 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 Deleted | + |-------------|--------------| + | QuickBooks Online | Yes | > **Supported Integrations** > > This functionality is currently only supported for our QuickBooks Online integration. 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. + > We're increasing support for object deletion across various accounting platforms and data types. You can check our [Accounting API Public Product Roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) for the latest status. """ base_url = self._server_url url = utils.generate_url(operations.DeleteInvoiceRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/invoices/{invoiceId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -91,7 +117,7 @@ def delete(self, request: operations.DeleteInvoiceRequest, retries: Optional[uti def do_request(): - return client.request('DELETE', url) + return client.request('DELETE', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -109,14 +135,17 @@ def do_request(): return res - def download_attachment(self, request: operations.DownloadInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadInvoiceAttachmentResponse: + + def download_attachment(self, request: operations.DownloadInvoicesAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadInvoicesAttachmentResponse: r"""Download invoice attachment - Download invoice attachments + Download invoice attachment. """ base_url = self._server_url - url = utils.generate_url(operations.DownloadInvoiceAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}/download', request) - + url = utils.generate_url(operations.DownloadInvoicesAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}/download', request) + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -127,7 +156,7 @@ def download_attachment(self, request: operations.DownloadInvoiceAttachmentReque def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -136,7 +165,7 @@ def do_request(): ])) content_type = http_res.headers.get('Content-Type') - res = operations.DownloadInvoiceAttachmentResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) + res = operations.DownloadInvoicesAttachmentResponse(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/octet-stream'): @@ -144,14 +173,17 @@ def do_request(): return res + def download_pdf(self, request: operations.DownloadInvoicePdfRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadInvoicePdfResponse: r"""Get invoice as PDF - Get invoice as PDF + Download invoice as a pdf. """ base_url = self._server_url url = utils.generate_url(operations.DownloadInvoicePdfRequest, base_url, '/companies/{companyId}/data/invoices/{invoiceId}/pdf', request) - + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -162,7 +194,7 @@ def download_pdf(self, request: operations.DownloadInvoicePdfRequest, retries: O def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -179,14 +211,17 @@ def do_request(): return res + def get(self, request: operations.GetInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetInvoiceResponse: r"""Get invoice - Get invoice + Get an invoice. """ base_url = self._server_url url = utils.generate_url(operations.GetInvoiceRequest, base_url, '/companies/{companyId}/data/invoices/{invoiceId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -197,7 +232,7 @@ def get(self, request: operations.GetInvoiceRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -215,14 +250,17 @@ def do_request(): return res + def get_attachment(self, request: operations.GetInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetInvoiceAttachmentResponse: r"""Get invoice attachment - Get invoice attachment + Get invoice attachment. """ base_url = self._server_url url = utils.generate_url(operations.GetInvoiceAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -233,7 +271,7 @@ def get_attachment(self, request: operations.GetInvoiceAttachmentRequest, retrie def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -251,6 +289,7 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateInvoicesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateInvoicesModelResponse: r"""Get create/update invoice model Get create/update invoice model. Returns the expected data for the request payload. @@ -264,7 +303,9 @@ def get_create_update_model(self, request: operations.GetCreateUpdateInvoicesMod base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateInvoicesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/invoices', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -275,7 +316,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateInvoicesMod def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -293,15 +334,18 @@ def do_request(): return res + def list(self, request: operations.ListInvoicesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListInvoicesResponse: r"""List invoices - Gets the latest invoices for a company, with pagination + Gets the latest invoices for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListInvoicesRequest, base_url, '/companies/{companyId}/data/invoices', request) - + headers = {} query_params = utils.get_query_params(operations.ListInvoicesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -312,7 +356,7 @@ def list(self, request: operations.ListInvoicesRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -330,6 +374,7 @@ def do_request(): return res + def list_attachments(self, request: operations.ListInvoiceAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListInvoiceAttachmentsResponse: r"""List invoice attachments List invoice attachments @@ -337,7 +382,9 @@ def list_attachments(self, request: operations.ListInvoiceAttachmentsRequest, re base_url = self._server_url url = utils.generate_url(operations.ListInvoiceAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -348,7 +395,7 @@ def list_attachments(self, request: operations.ListInvoiceAttachmentsRequest, re def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -366,6 +413,7 @@ def do_request(): return res + def update(self, request: operations.UpdateInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateInvoiceResponse: r"""Update invoice Posts an updated invoice to the accounting package for a given company. @@ -375,16 +423,18 @@ def update(self, request: operations.UpdateInvoiceRequest, retries: Optional[uti > **Supported Integrations** > > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support updating invoices. + operationId: update-invoice """ base_url = self._server_url url = utils.generate_url(operations.UpdateInvoiceRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/invoices/{invoiceId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "invoice", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateInvoiceRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -413,18 +463,20 @@ def do_request(): return res + def upload_attachment(self, request: operations.UploadInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadInvoiceAttachmentResponse: r"""Push invoice attachment - Push invoice attachment + Upload invoice attachment. """ base_url = self._server_url url = utils.generate_url(operations.UploadInvoiceAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/invoices/{invoiceId}/attachment', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type + headers['Accept'] = '*/*' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/items.py b/accounting/src/codataccounting/items.py index f152c218c..f2380cc60 100755 --- a/accounting/src/codataccounting/items.py +++ b/accounting/src/codataccounting/items.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateItemRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateItemResponse: r"""Create item Posts a new item to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateItemRequest, retries: Optional[utils. > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. """ base_url = self._server_url url = utils.generate_url(operations.CreateItemRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/items', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "item", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateItemRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def get(self, request: operations.GetItemRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetItemResponse: r"""Get item Gets the specified item for a given company. @@ -76,7 +79,9 @@ def get(self, request: operations.GetItemRequest, retries: Optional[utils.RetryC base_url = self._server_url url = utils.generate_url(operations.GetItemRequest, base_url, '/companies/{companyId}/data/items/{itemId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def get(self, request: operations.GetItemRequest, retries: Optional[utils.RetryC def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,6 +110,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateItemsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateItemsModelResponse: r"""Get create item model Get create item model. Returns the expected data for the request payload. @@ -113,12 +119,14 @@ def get_create_model(self, request: operations.GetCreateItemsModelRequest, retri > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating items. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateItemsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/items', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -129,7 +137,7 @@ def get_create_model(self, request: operations.GetCreateItemsModelRequest, retri def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -147,6 +155,7 @@ def do_request(): return res + def list(self, request: operations.ListItemsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListItemsResponse: r"""List items Gets the items for a given company. @@ -154,8 +163,10 @@ def list(self, request: operations.ListItemsRequest, retries: Optional[utils.Ret base_url = self._server_url url = utils.generate_url(operations.ListItemsRequest, base_url, '/companies/{companyId}/data/items', request) - + headers = {} query_params = utils.get_query_params(operations.ListItemsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -166,7 +177,7 @@ def list(self, request: operations.ListItemsRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/journal_entries.py b/accounting/src/codataccounting/journal_entries.py index a9ad24a97..9725fa4ce 100755 --- a/accounting/src/codataccounting/journal_entries.py +++ b/accounting/src/codataccounting/journal_entries.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateJournalEntryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateJournalEntryResponse: r"""Create journal entry Posts a new journalEntry to the accounting package for a given company. @@ -35,12 +36,13 @@ def create(self, request: operations.CreateJournalEntryRequest, retries: Optiona base_url = self._server_url url = utils.generate_url(operations.CreateJournalEntryRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/journalEntries', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "journal_entry", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateJournalEntryRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,9 +71,36 @@ def do_request(): return res + def delete(self, request: operations.DeleteJournalEntryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteJournalEntryResponse: r"""Delete journal entry - Deletes a journal entry from the accounting package for a given company. + > **Use with caution** + > + >Because Journal Entries underpin every transaction in an accounting platform, deleting a Journal Entry can affect every transaction for a given company. + > + > **Before you proceed, make sure you understand the implications of deleting Journal Entries from an accounting perspective.** + + The _Delete Journal entries_ endpoint allows you to delete a specified Journal entry from an accounting platform. + + ### Process + 1. Pass the `{journalEntryId}` to the _Delete Journal Entries_ endpoint and store the `pushOperationKey` returned. + 2. Check the status of the delete by checking the status of push operation either via + 1. [Push operation webhook](/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). + + A `Success` status indicates that the Journal Entry object was deleted from the accounting platform. + 3. (Optional) Check that the Journal Entry was deleted from the accounting platform. + + ### Effect on related objects + + Be aware that deleting a Journal Entry from an accounting platform might cause related objects to be modified. For example, if you delete the Journal Entry for a paid invoice in QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The 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 Deleted | + |-------------|--------------| + | QuickBooks Online | Yes | > **Supported Integrations** > @@ -80,7 +109,9 @@ def delete(self, request: operations.DeleteJournalEntryRequest, retries: Optiona base_url = self._server_url url = utils.generate_url(operations.DeleteJournalEntryRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/journalEntries/{journalEntryId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -91,7 +122,7 @@ def delete(self, request: operations.DeleteJournalEntryRequest, retries: Optiona def do_request(): - return client.request('DELETE', url) + return client.request('DELETE', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -109,6 +140,7 @@ def do_request(): return res + def get(self, request: operations.GetJournalEntryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetJournalEntryResponse: r"""Get journal entry Gets a single JournalEntry corresponding to the given ID. @@ -116,7 +148,9 @@ def get(self, request: operations.GetJournalEntryRequest, retries: Optional[util base_url = self._server_url url = utils.generate_url(operations.GetJournalEntryRequest, base_url, '/companies/{companyId}/data/journalEntries/{journalEntryId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -127,7 +161,7 @@ def get(self, request: operations.GetJournalEntryRequest, retries: Optional[util def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -145,6 +179,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateJournalEntriesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateJournalEntriesModelResponse: r"""Get create journal entry model Get create journal entry model. Returns the expected data for the request payload. @@ -158,7 +193,9 @@ def get_create_model(self, request: operations.GetCreateJournalEntriesModelReque base_url = self._server_url url = utils.generate_url(operations.GetCreateJournalEntriesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/journalEntries', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -169,7 +206,7 @@ def get_create_model(self, request: operations.GetCreateJournalEntriesModelReque def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -187,15 +224,18 @@ def do_request(): return res + def list(self, request: operations.ListJournalEntriesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListJournalEntriesResponse: r"""List journal entries - Gets the latest journal entries for a company, with pagination + Gets the latest journal entries for a company, with pagination. """ base_url = self._server_url url = utils.generate_url(operations.ListJournalEntriesRequest, base_url, '/companies/{companyId}/data/journalEntries', request) - + headers = {} query_params = utils.get_query_params(operations.ListJournalEntriesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -206,7 +246,7 @@ def list(self, request: operations.ListJournalEntriesRequest, retries: Optional[ def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/journals.py b/accounting/src/codataccounting/journals.py index 057422b53..c0be64a8d 100755 --- a/accounting/src/codataccounting/journals.py +++ b/accounting/src/codataccounting/journals.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateJournalRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateJournalResponse: r"""Create journal Posts a new journal to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreateJournalRequest, retries: Optional[uti > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. """ base_url = self._server_url url = utils.generate_url(operations.CreateJournalRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/journals', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "journal", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateJournalRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def get(self, request: operations.GetJournalRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetJournalResponse: r"""Get journal Gets a single journal corresponding to the given ID. @@ -76,7 +79,9 @@ def get(self, request: operations.GetJournalRequest, retries: Optional[utils.Ret base_url = self._server_url url = utils.generate_url(operations.GetJournalRequest, base_url, '/companies/{companyId}/data/journals/{journalId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def get(self, request: operations.GetJournalRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,6 +110,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateJournalsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateJournalsModelResponse: r"""Get create journal model Get create journal model. Returns the expected data for the request payload. @@ -113,12 +119,14 @@ def get_create_model(self, request: operations.GetCreateJournalsModelRequest, re > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating journals. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateJournalsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/journals', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -129,7 +137,7 @@ def get_create_model(self, request: operations.GetCreateJournalsModelRequest, re def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -147,6 +155,7 @@ def do_request(): return res + def list(self, request: operations.ListJournalsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListJournalsResponse: r"""List journals Gets the latest journals for a company, with pagination @@ -154,8 +163,10 @@ def list(self, request: operations.ListJournalsRequest, retries: Optional[utils. base_url = self._server_url url = utils.generate_url(operations.ListJournalsRequest, base_url, '/companies/{companyId}/data/journals', request) - + headers = {} query_params = utils.get_query_params(operations.ListJournalsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -166,7 +177,7 @@ def list(self, request: operations.ListJournalsRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/models/operations/__init__.py b/accounting/src/codataccounting/models/operations/__init__.py index 09a791cd8..d09461a22 100755 --- a/accounting/src/codataccounting/models/operations/__init__.py +++ b/accounting/src/codataccounting/models/operations/__init__.py @@ -26,8 +26,8 @@ from .download_customer_attachment import * from .download_direct_cost_attachment import * from .download_direct_income_attachment import * -from .download_invoice_attachment import * from .download_invoice_pdf import * +from .download_invoices_attachment import * from .download_supplier_attachment import * from .get_account import * from .get_account_transaction import * @@ -87,7 +87,6 @@ from .list_accounts import * from .list_bank_account_transactions import * from .list_bank_accounts import * -from .list_bank_transactions import * from .list_bill_attachments import * from .list_bill_credit_notes import * from .list_bill_payments import * @@ -127,4 +126,4 @@ from .upload_direct_income_attachment import * from .upload_invoice_attachment import * -__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateBankAccountRequest","CreateBankAccountResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateBillCreditNoteRequest","CreateBillCreditNoteResponse","CreateBillPaymentRequest","CreateBillPaymentResponse","CreateBillRequest","CreateBillResponse","CreateCreditNoteRequest","CreateCreditNoteResponse","CreateCustomerRequest","CreateCustomerResponse","CreateDirectCostRequest","CreateDirectCostResponse","CreateDirectIncomeRequest","CreateDirectIncomeResponse","CreateInvoiceRequest","CreateInvoiceResponse","CreateItemRequest","CreateItemResponse","CreateJournalEntryRequest","CreateJournalEntryResponse","CreateJournalRequest","CreateJournalResponse","CreatePaymentRequest","CreatePaymentResponse","CreatePurchaseOrderRequest","CreatePurchaseOrderResponse","CreateSupplierRequest","CreateSupplierResponse","CreateTransferRequest","CreateTransferResponse","DeleteBillPaymentRequest","DeleteBillPaymentResponse","DeleteBillRequest","DeleteBillResponse","DeleteInvoiceRequest","DeleteInvoiceResponse","DeleteJournalEntryRequest","DeleteJournalEntryResponse","DownloadBillAttachmentRequest","DownloadBillAttachmentResponse","DownloadCustomerAttachmentRequest","DownloadCustomerAttachmentResponse","DownloadDirectCostAttachmentRequest","DownloadDirectCostAttachmentResponse","DownloadDirectIncomeAttachmentRequest","DownloadDirectIncomeAttachmentResponse","DownloadInvoiceAttachmentRequest","DownloadInvoiceAttachmentResponse","DownloadInvoicePdfRequest","DownloadInvoicePdfResponse","DownloadSupplierAttachmentRequest","DownloadSupplierAttachmentResponse","GetAccountRequest","GetAccountResponse","GetAccountTransactionRequest","GetAccountTransactionResponse","GetAgedCreditorsReportRequest","GetAgedCreditorsReportResponse","GetAgedDebtorsReportRequest","GetAgedDebtorsReportResponse","GetBalanceSheetRequest","GetBalanceSheetResponse","GetBankAccountRequest","GetBankAccountResponse","GetBillAttachmentRequest","GetBillAttachmentResponse","GetBillCreditNoteRequest","GetBillCreditNoteResponse","GetBillPaymentsRequest","GetBillPaymentsResponse","GetBillRequest","GetBillResponse","GetCashFlowStatementRequest","GetCashFlowStatementResponse","GetCompanyInfoRequest","GetCompanyInfoResponse","GetCreateBankAccountModelRequest","GetCreateBankAccountModelResponse","GetCreateBillPaymentsModelRequest","GetCreateBillPaymentsModelResponse","GetCreateChartOfAccountsModelRequest","GetCreateChartOfAccountsModelResponse","GetCreateDirectCostsModelRequest","GetCreateDirectCostsModelResponse","GetCreateDirectIncomesModelRequest","GetCreateDirectIncomesModelResponse","GetCreateItemsModelRequest","GetCreateItemsModelResponse","GetCreateJournalEntriesModelRequest","GetCreateJournalEntriesModelResponse","GetCreateJournalsModelRequest","GetCreateJournalsModelResponse","GetCreatePaymentsModelRequest","GetCreatePaymentsModelResponse","GetCreateTransfersModelRequest","GetCreateTransfersModelResponse","GetCreateUpdateBankAccountsModelRequest","GetCreateUpdateBankAccountsModelResponse","GetCreateUpdateBillCreditNotesModelRequest","GetCreateUpdateBillCreditNotesModelResponse","GetCreateUpdateBillsModelRequest","GetCreateUpdateBillsModelResponse","GetCreateUpdateCreditNotesModelRequest","GetCreateUpdateCreditNotesModelResponse","GetCreateUpdateCustomersModelRequest","GetCreateUpdateCustomersModelResponse","GetCreateUpdateInvoicesModelRequest","GetCreateUpdateInvoicesModelResponse","GetCreateUpdatePurchaseOrdersModelRequest","GetCreateUpdatePurchaseOrdersModelResponse","GetCreateUpdateSuppliersModelRequest","GetCreateUpdateSuppliersModelResponse","GetCreditNoteRequest","GetCreditNoteResponse","GetCustomerAttachmentRequest","GetCustomerAttachmentResponse","GetCustomerRequest","GetCustomerResponse","GetDirectCostAttachmentRequest","GetDirectCostAttachmentResponse","GetDirectCostRequest","GetDirectCostResponse","GetDirectIncomeAttachmentRequest","GetDirectIncomeAttachmentResponse","GetDirectIncomeRequest","GetDirectIncomeResponse","GetInvoiceAttachmentRequest","GetInvoiceAttachmentResponse","GetInvoiceRequest","GetInvoiceResponse","GetItemRequest","GetItemResponse","GetJournalEntryRequest","GetJournalEntryResponse","GetJournalRequest","GetJournalResponse","GetPaymentMethodRequest","GetPaymentMethodResponse","GetPaymentRequest","GetPaymentResponse","GetProfitAndLossRequest","GetProfitAndLossResponse","GetPurchaseOrderRequest","GetPurchaseOrderResponse","GetSalesOrderRequest","GetSalesOrderResponse","GetSupplierAttachmentRequest","GetSupplierAttachmentResponse","GetSupplierRequest","GetSupplierResponse","GetTaxRateRequest","GetTaxRateResponse","GetTrackingCategoryRequest","GetTrackingCategoryResponse","GetTransferRequest","GetTransferResponse","IsAgedCreditorsReportAvailableRequest","IsAgedCreditorsReportAvailableResponse","IsAgedDebtorReportAvailableRequest","IsAgedDebtorReportAvailableResponse","ListAccountTransactionsRequest","ListAccountTransactionsResponse","ListAccountsRequest","ListAccountsResponse","ListBankAccountTransactionsRequest","ListBankAccountTransactionsResponse","ListBankAccountsRequest","ListBankAccountsResponse","ListBankTransactionsRequest","ListBankTransactionsResponse","ListBillAttachmentsRequest","ListBillAttachmentsResponse","ListBillCreditNotesRequest","ListBillCreditNotesResponse","ListBillPaymentsRequest","ListBillPaymentsResponse","ListBillsRequest","ListBillsResponse","ListCreditNotesRequest","ListCreditNotesResponse","ListCustomerAttachmentsRequest","ListCustomerAttachmentsResponse","ListCustomersRequest","ListCustomersResponse","ListDirectCostAttachmentsRequest","ListDirectCostAttachmentsResponse","ListDirectCostsRequest","ListDirectCostsResponse","ListDirectIncomeAttachmentsRequest","ListDirectIncomeAttachmentsResponse","ListDirectIncomesRequest","ListDirectIncomesResponse","ListInvoiceAttachmentsRequest","ListInvoiceAttachmentsResponse","ListInvoicesRequest","ListInvoicesResponse","ListItemsRequest","ListItemsResponse","ListJournalEntriesRequest","ListJournalEntriesResponse","ListJournalsRequest","ListJournalsResponse","ListPaymentMethodsRequest","ListPaymentMethodsResponse","ListPaymentsRequest","ListPaymentsResponse","ListPurchaseOrdersRequest","ListPurchaseOrdersResponse","ListSalesOrdersRequest","ListSalesOrdersResponse","ListSupplierAttachmentsRequest","ListSupplierAttachmentsResponse","ListSuppliersRequest","ListSuppliersResponse","ListTaxRatesRequest","ListTaxRatesResponse","ListTrackingCategoriesRequest","ListTrackingCategoriesResponse","ListTransfersRequest","ListTransfersResponse","RefreshCompanyInfoRequest","RefreshCompanyInfoResponse","UpdateBankAccountRequest","UpdateBankAccountResponse","UpdateBillCreditNoteRequest","UpdateBillCreditNoteResponse","UpdateBillRequest","UpdateBillResponse","UpdateCreditNoteRequest","UpdateCreditNoteResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateInvoiceRequest","UpdateInvoiceResponse","UpdatePurchaseOrderRequest","UpdatePurchaseOrderResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadBillAttachmentRequest","UploadBillAttachmentRequestBody","UploadBillAttachmentResponse","UploadDirectCostAttachmentRequest","UploadDirectCostAttachmentRequestBody","UploadDirectCostAttachmentResponse","UploadDirectIncomeAttachmentRequest","UploadDirectIncomeAttachmentRequestBody","UploadDirectIncomeAttachmentResponse","UploadInvoiceAttachmentRequest","UploadInvoiceAttachmentRequestBody","UploadInvoiceAttachmentResponse"] +__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateBankAccountRequest","CreateBankAccountResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateBillCreditNoteRequest","CreateBillCreditNoteResponse","CreateBillPaymentRequest","CreateBillPaymentResponse","CreateBillRequest","CreateBillResponse","CreateCreditNoteRequest","CreateCreditNoteResponse","CreateCustomerRequest","CreateCustomerResponse","CreateDirectCostRequest","CreateDirectCostResponse","CreateDirectIncomeRequest","CreateDirectIncomeResponse","CreateInvoiceRequest","CreateInvoiceResponse","CreateItemRequest","CreateItemResponse","CreateJournalEntryRequest","CreateJournalEntryResponse","CreateJournalRequest","CreateJournalResponse","CreatePaymentRequest","CreatePaymentResponse","CreatePurchaseOrderRequest","CreatePurchaseOrderResponse","CreateSupplierRequest","CreateSupplierResponse","CreateTransferRequest","CreateTransferResponse","DeleteBillPaymentRequest","DeleteBillPaymentResponse","DeleteBillRequest","DeleteBillResponse","DeleteInvoiceRequest","DeleteInvoiceResponse","DeleteJournalEntryRequest","DeleteJournalEntryResponse","DownloadBillAttachmentRequest","DownloadBillAttachmentResponse","DownloadCustomerAttachmentRequest","DownloadCustomerAttachmentResponse","DownloadDirectCostAttachmentRequest","DownloadDirectCostAttachmentResponse","DownloadDirectIncomeAttachmentRequest","DownloadDirectIncomeAttachmentResponse","DownloadInvoicePdfRequest","DownloadInvoicePdfResponse","DownloadInvoicesAttachmentRequest","DownloadInvoicesAttachmentResponse","DownloadSupplierAttachmentRequest","DownloadSupplierAttachmentResponse","GetAccountRequest","GetAccountResponse","GetAccountTransactionRequest","GetAccountTransactionResponse","GetAgedCreditorsReportRequest","GetAgedCreditorsReportResponse","GetAgedDebtorsReportRequest","GetAgedDebtorsReportResponse","GetBalanceSheetRequest","GetBalanceSheetResponse","GetBankAccountRequest","GetBankAccountResponse","GetBillAttachmentRequest","GetBillAttachmentResponse","GetBillCreditNoteRequest","GetBillCreditNoteResponse","GetBillPaymentsRequest","GetBillPaymentsResponse","GetBillRequest","GetBillResponse","GetCashFlowStatementRequest","GetCashFlowStatementResponse","GetCompanyInfoRequest","GetCompanyInfoResponse","GetCreateBankAccountModelRequest","GetCreateBankAccountModelResponse","GetCreateBillPaymentsModelRequest","GetCreateBillPaymentsModelResponse","GetCreateChartOfAccountsModelRequest","GetCreateChartOfAccountsModelResponse","GetCreateDirectCostsModelRequest","GetCreateDirectCostsModelResponse","GetCreateDirectIncomesModelRequest","GetCreateDirectIncomesModelResponse","GetCreateItemsModelRequest","GetCreateItemsModelResponse","GetCreateJournalEntriesModelRequest","GetCreateJournalEntriesModelResponse","GetCreateJournalsModelRequest","GetCreateJournalsModelResponse","GetCreatePaymentsModelRequest","GetCreatePaymentsModelResponse","GetCreateTransfersModelRequest","GetCreateTransfersModelResponse","GetCreateUpdateBankAccountsModelRequest","GetCreateUpdateBankAccountsModelResponse","GetCreateUpdateBillCreditNotesModelRequest","GetCreateUpdateBillCreditNotesModelResponse","GetCreateUpdateBillsModelRequest","GetCreateUpdateBillsModelResponse","GetCreateUpdateCreditNotesModelRequest","GetCreateUpdateCreditNotesModelResponse","GetCreateUpdateCustomersModelRequest","GetCreateUpdateCustomersModelResponse","GetCreateUpdateInvoicesModelRequest","GetCreateUpdateInvoicesModelResponse","GetCreateUpdatePurchaseOrdersModelRequest","GetCreateUpdatePurchaseOrdersModelResponse","GetCreateUpdateSuppliersModelRequest","GetCreateUpdateSuppliersModelResponse","GetCreditNoteRequest","GetCreditNoteResponse","GetCustomerAttachmentRequest","GetCustomerAttachmentResponse","GetCustomerRequest","GetCustomerResponse","GetDirectCostAttachmentRequest","GetDirectCostAttachmentResponse","GetDirectCostRequest","GetDirectCostResponse","GetDirectIncomeAttachmentRequest","GetDirectIncomeAttachmentResponse","GetDirectIncomeRequest","GetDirectIncomeResponse","GetInvoiceAttachmentRequest","GetInvoiceAttachmentResponse","GetInvoiceRequest","GetInvoiceResponse","GetItemRequest","GetItemResponse","GetJournalEntryRequest","GetJournalEntryResponse","GetJournalRequest","GetJournalResponse","GetPaymentMethodRequest","GetPaymentMethodResponse","GetPaymentRequest","GetPaymentResponse","GetProfitAndLossRequest","GetProfitAndLossResponse","GetPurchaseOrderRequest","GetPurchaseOrderResponse","GetSalesOrderRequest","GetSalesOrderResponse","GetSupplierAttachmentRequest","GetSupplierAttachmentResponse","GetSupplierRequest","GetSupplierResponse","GetTaxRateRequest","GetTaxRateResponse","GetTrackingCategoryRequest","GetTrackingCategoryResponse","GetTransferRequest","GetTransferResponse","IsAgedCreditorsReportAvailableRequest","IsAgedCreditorsReportAvailableResponse","IsAgedDebtorReportAvailableRequest","IsAgedDebtorReportAvailableResponse","ListAccountTransactionsRequest","ListAccountTransactionsResponse","ListAccountsRequest","ListAccountsResponse","ListBankAccountTransactionsRequest","ListBankAccountTransactionsResponse","ListBankAccountsRequest","ListBankAccountsResponse","ListBillAttachmentsRequest","ListBillAttachmentsResponse","ListBillCreditNotesRequest","ListBillCreditNotesResponse","ListBillPaymentsRequest","ListBillPaymentsResponse","ListBillsRequest","ListBillsResponse","ListCreditNotesRequest","ListCreditNotesResponse","ListCustomerAttachmentsRequest","ListCustomerAttachmentsResponse","ListCustomersRequest","ListCustomersResponse","ListDirectCostAttachmentsRequest","ListDirectCostAttachmentsResponse","ListDirectCostsRequest","ListDirectCostsResponse","ListDirectIncomeAttachmentsRequest","ListDirectIncomeAttachmentsResponse","ListDirectIncomesRequest","ListDirectIncomesResponse","ListInvoiceAttachmentsRequest","ListInvoiceAttachmentsResponse","ListInvoicesRequest","ListInvoicesResponse","ListItemsRequest","ListItemsResponse","ListJournalEntriesRequest","ListJournalEntriesResponse","ListJournalsRequest","ListJournalsResponse","ListPaymentMethodsRequest","ListPaymentMethodsResponse","ListPaymentsRequest","ListPaymentsResponse","ListPurchaseOrdersRequest","ListPurchaseOrdersResponse","ListSalesOrdersRequest","ListSalesOrdersResponse","ListSupplierAttachmentsRequest","ListSupplierAttachmentsResponse","ListSuppliersRequest","ListSuppliersResponse","ListTaxRatesRequest","ListTaxRatesResponse","ListTrackingCategoriesRequest","ListTrackingCategoriesResponse","ListTransfersRequest","ListTransfersResponse","RefreshCompanyInfoRequest","RefreshCompanyInfoResponse","UpdateBankAccountRequest","UpdateBankAccountResponse","UpdateBillCreditNoteRequest","UpdateBillCreditNoteResponse","UpdateBillRequest","UpdateBillResponse","UpdateCreditNoteRequest","UpdateCreditNoteResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateInvoiceRequest","UpdateInvoiceResponse","UpdatePurchaseOrderRequest","UpdatePurchaseOrderResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadBillAttachmentRequest","UploadBillAttachmentRequestBody","UploadBillAttachmentResponse","UploadDirectCostAttachmentRequest","UploadDirectCostAttachmentRequestBody","UploadDirectCostAttachmentResponse","UploadDirectIncomeAttachmentRequest","UploadDirectIncomeAttachmentRequestBody","UploadDirectIncomeAttachmentResponse","UploadInvoiceAttachmentRequest","UploadInvoiceAttachmentRequestBody","UploadInvoiceAttachmentResponse"] diff --git a/accounting/src/codataccounting/models/operations/download_invoice_attachment.py b/accounting/src/codataccounting/models/operations/download_invoices_attachment.py similarity index 93% rename from accounting/src/codataccounting/models/operations/download_invoice_attachment.py rename to accounting/src/codataccounting/models/operations/download_invoices_attachment.py index 4fe9e44a9..b72f3893a 100755 --- a/accounting/src/codataccounting/models/operations/download_invoice_attachment.py +++ b/accounting/src/codataccounting/models/operations/download_invoices_attachment.py @@ -7,7 +7,7 @@ @dataclasses.dataclass -class DownloadInvoiceAttachmentRequest: +class DownloadInvoicesAttachmentRequest: attachment_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'attachmentId', 'style': 'simple', 'explode': False }}) r"""Unique identifier for an attachment""" @@ -18,7 +18,7 @@ class DownloadInvoiceAttachmentRequest: @dataclasses.dataclass -class DownloadInvoiceAttachmentResponse: +class DownloadInvoicesAttachmentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() diff --git a/accounting/src/codataccounting/models/operations/get_balance_sheet.py b/accounting/src/codataccounting/models/operations/get_balance_sheet.py index 1af93445c..a4aad6fb9 100755 --- a/accounting/src/codataccounting/models/operations/get_balance_sheet.py +++ b/accounting/src/codataccounting/models/operations/get_balance_sheet.py @@ -12,7 +12,9 @@ class GetBalanceSheetRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) period_length: int = dataclasses.field(metadata={'query_param': { 'field_name': 'periodLength', 'style': 'form', 'explode': True }}) + r"""Number of months defining the period of interest.""" periods_to_compare: int = dataclasses.field(metadata={'query_param': { 'field_name': 'periodsToCompare', 'style': 'form', 'explode': True }}) + r"""Number of periods with `periodLength` to compare.""" start_month: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'startMonth', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py b/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py index 7330bb1c8..159ea70a3 100755 --- a/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py +++ b/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py @@ -12,7 +12,9 @@ class GetCashFlowStatementRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) period_length: int = dataclasses.field(metadata={'query_param': { 'field_name': 'periodLength', 'style': 'form', 'explode': True }}) + r"""Number of months defining the period of interest.""" periods_to_compare: int = dataclasses.field(metadata={'query_param': { 'field_name': 'periodsToCompare', 'style': 'form', 'explode': True }}) + r"""Number of periods with `periodLength` to compare.""" start_month: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'startMonth', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/get_profit_and_loss.py b/accounting/src/codataccounting/models/operations/get_profit_and_loss.py index 51a71cf99..dd0ae252f 100755 --- a/accounting/src/codataccounting/models/operations/get_profit_and_loss.py +++ b/accounting/src/codataccounting/models/operations/get_profit_and_loss.py @@ -12,7 +12,9 @@ class GetProfitAndLossRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) period_length: int = dataclasses.field(metadata={'query_param': { 'field_name': 'periodLength', 'style': 'form', 'explode': True }}) + r"""Number of months defining the period of interest.""" periods_to_compare: int = dataclasses.field(metadata={'query_param': { 'field_name': 'periodsToCompare', 'style': 'form', 'explode': True }}) + r"""Number of periods with `periodLength` to compare.""" start_month: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'startMonth', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_account_transactions.py b/accounting/src/codataccounting/models/operations/list_account_transactions.py index 186aa3c73..b3a3ab47c 100755 --- a/accounting/src/codataccounting/models/operations/list_account_transactions.py +++ b/accounting/src/codataccounting/models/operations/list_account_transactions.py @@ -12,10 +12,10 @@ class ListAccountTransactionsRequest: 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 }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_accounts.py b/accounting/src/codataccounting/models/operations/list_accounts.py index a97177ddb..5262c627a 100755 --- a/accounting/src/codataccounting/models/operations/list_accounts.py +++ b/accounting/src/codataccounting/models/operations/list_accounts.py @@ -11,10 +11,10 @@ class ListAccountsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py b/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py index aca95e514..17125bfae 100755 --- a/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py +++ b/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py @@ -14,10 +14,10 @@ class ListBankAccountTransactionsRequest: r"""Unique identifier for an account""" 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 }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_bank_accounts.py b/accounting/src/codataccounting/models/operations/list_bank_accounts.py index ef48d8ce5..355b7097a 100755 --- a/accounting/src/codataccounting/models/operations/list_bank_accounts.py +++ b/accounting/src/codataccounting/models/operations/list_bank_accounts.py @@ -12,10 +12,10 @@ class ListBankAccountsRequest: 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 }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_bank_transactions.py b/accounting/src/codataccounting/models/operations/list_bank_transactions.py deleted file mode 100755 index 939651213..000000000 --- a/accounting/src/codataccounting/models/operations/list_bank_transactions.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -import requests as requests_http -from ..shared import bankaccounttransactions as shared_bankaccounttransactions -from typing import Optional - - -@dataclasses.dataclass -class ListBankTransactionsRequest: - - account_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'accountId', 'style': 'simple', 'explode': False }}) - r"""Unique identifier for an account""" - company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" - order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) - r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" - page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) - r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" - query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) - r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).""" - - -@dataclasses.dataclass -class ListBankTransactionsResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() - bank_account_transactions: Optional[shared_bankaccounttransactions.BankAccountTransactions] = dataclasses.field(default=None) - r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - \ No newline at end of file diff --git a/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py b/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py index 1f82bdaff..955ae8c41 100755 --- a/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py +++ b/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py @@ -11,10 +11,10 @@ class ListBillCreditNotesRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_bill_payments.py b/accounting/src/codataccounting/models/operations/list_bill_payments.py index b9820a7ef..d3616af9f 100755 --- a/accounting/src/codataccounting/models/operations/list_bill_payments.py +++ b/accounting/src/codataccounting/models/operations/list_bill_payments.py @@ -11,10 +11,10 @@ class ListBillPaymentsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_bills.py b/accounting/src/codataccounting/models/operations/list_bills.py index fd21a4081..17917c4a4 100755 --- a/accounting/src/codataccounting/models/operations/list_bills.py +++ b/accounting/src/codataccounting/models/operations/list_bills.py @@ -11,10 +11,10 @@ class ListBillsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_credit_notes.py b/accounting/src/codataccounting/models/operations/list_credit_notes.py index 81f3c91a9..db2e55db3 100755 --- a/accounting/src/codataccounting/models/operations/list_credit_notes.py +++ b/accounting/src/codataccounting/models/operations/list_credit_notes.py @@ -11,10 +11,10 @@ class ListCreditNotesRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_customers.py b/accounting/src/codataccounting/models/operations/list_customers.py index c15206d50..a63fd9f06 100755 --- a/accounting/src/codataccounting/models/operations/list_customers.py +++ b/accounting/src/codataccounting/models/operations/list_customers.py @@ -11,10 +11,10 @@ class ListCustomersRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_direct_costs.py b/accounting/src/codataccounting/models/operations/list_direct_costs.py index 74c568976..b6a81f93b 100755 --- a/accounting/src/codataccounting/models/operations/list_direct_costs.py +++ b/accounting/src/codataccounting/models/operations/list_direct_costs.py @@ -12,10 +12,10 @@ class ListDirectCostsRequest: 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 }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_direct_incomes.py b/accounting/src/codataccounting/models/operations/list_direct_incomes.py index 5a8001df6..7b7f5ba9e 100755 --- a/accounting/src/codataccounting/models/operations/list_direct_incomes.py +++ b/accounting/src/codataccounting/models/operations/list_direct_incomes.py @@ -12,10 +12,10 @@ class ListDirectIncomesRequest: 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 }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_invoices.py b/accounting/src/codataccounting/models/operations/list_invoices.py index 11cec010c..a57ea8ad2 100755 --- a/accounting/src/codataccounting/models/operations/list_invoices.py +++ b/accounting/src/codataccounting/models/operations/list_invoices.py @@ -11,10 +11,10 @@ class ListInvoicesRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_items.py b/accounting/src/codataccounting/models/operations/list_items.py index 22ae8e890..662338bf9 100755 --- a/accounting/src/codataccounting/models/operations/list_items.py +++ b/accounting/src/codataccounting/models/operations/list_items.py @@ -11,10 +11,10 @@ class ListItemsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_journal_entries.py b/accounting/src/codataccounting/models/operations/list_journal_entries.py index cc011d7d1..cddc7cb83 100755 --- a/accounting/src/codataccounting/models/operations/list_journal_entries.py +++ b/accounting/src/codataccounting/models/operations/list_journal_entries.py @@ -11,10 +11,10 @@ class ListJournalEntriesRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_journals.py b/accounting/src/codataccounting/models/operations/list_journals.py index 01428957e..93274945c 100755 --- a/accounting/src/codataccounting/models/operations/list_journals.py +++ b/accounting/src/codataccounting/models/operations/list_journals.py @@ -11,10 +11,10 @@ class ListJournalsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_payment_methods.py b/accounting/src/codataccounting/models/operations/list_payment_methods.py index c26d90f7c..1ce5426e9 100755 --- a/accounting/src/codataccounting/models/operations/list_payment_methods.py +++ b/accounting/src/codataccounting/models/operations/list_payment_methods.py @@ -11,10 +11,10 @@ class ListPaymentMethodsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_payments.py b/accounting/src/codataccounting/models/operations/list_payments.py index b5493158b..c44ddc8b9 100755 --- a/accounting/src/codataccounting/models/operations/list_payments.py +++ b/accounting/src/codataccounting/models/operations/list_payments.py @@ -11,10 +11,10 @@ class ListPaymentsRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_purchase_orders.py b/accounting/src/codataccounting/models/operations/list_purchase_orders.py index 4b498a336..a2fcc25ad 100755 --- a/accounting/src/codataccounting/models/operations/list_purchase_orders.py +++ b/accounting/src/codataccounting/models/operations/list_purchase_orders.py @@ -11,10 +11,10 @@ class ListPurchaseOrdersRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_sales_orders.py b/accounting/src/codataccounting/models/operations/list_sales_orders.py index 157133e06..2fd140b1e 100755 --- a/accounting/src/codataccounting/models/operations/list_sales_orders.py +++ b/accounting/src/codataccounting/models/operations/list_sales_orders.py @@ -11,10 +11,10 @@ class ListSalesOrdersRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_suppliers.py b/accounting/src/codataccounting/models/operations/list_suppliers.py index a9eabed2e..f1528fccf 100755 --- a/accounting/src/codataccounting/models/operations/list_suppliers.py +++ b/accounting/src/codataccounting/models/operations/list_suppliers.py @@ -11,10 +11,10 @@ class ListSuppliersRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_tax_rates.py b/accounting/src/codataccounting/models/operations/list_tax_rates.py index ca6c7f5cc..5a141838c 100755 --- a/accounting/src/codataccounting/models/operations/list_tax_rates.py +++ b/accounting/src/codataccounting/models/operations/list_tax_rates.py @@ -11,10 +11,10 @@ class ListTaxRatesRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_tracking_categories.py b/accounting/src/codataccounting/models/operations/list_tracking_categories.py index 1bcf38945..8b6dec9c6 100755 --- a/accounting/src/codataccounting/models/operations/list_tracking_categories.py +++ b/accounting/src/codataccounting/models/operations/list_tracking_categories.py @@ -11,10 +11,10 @@ class ListTrackingCategoriesRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/operations/list_transfers.py b/accounting/src/codataccounting/models/operations/list_transfers.py index eff405a2b..b490f7789 100755 --- a/accounting/src/codataccounting/models/operations/list_transfers.py +++ b/accounting/src/codataccounting/models/operations/list_transfers.py @@ -12,10 +12,10 @@ class ListTransfersRequest: 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 }}) - page: int = dataclasses.field(metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) - r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }}) r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).""" + page: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }}) + r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging).""" page_size: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }}) r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).""" query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }}) diff --git a/accounting/src/codataccounting/models/shared/__init__.py b/accounting/src/codataccounting/models/shared/__init__.py index 78b1532dd..5479bcc51 100755 --- a/accounting/src/codataccounting/models/shared/__init__.py +++ b/accounting/src/codataccounting/models/shared/__init__.py @@ -3,13 +3,13 @@ from .account import * from .accountref import * from .accounts import * -from .accountstatus_enum import * +from .accountstatus import * from .accounttransaction import * from .accounttransactionline import * from .accounttransactions import * -from .accounttype_enum import * +from .accounttype import * from .addressesitems import * -from .addresstype_enum import * +from .addresstype import * from .agedcreditor import * from .agedcreditorreport import * from .agedcurrencyoutstandingitems import * @@ -22,27 +22,26 @@ from .bankaccount import * from .bankaccountref import * from .bankaccounts import * -from .bankaccounttransactions import * from .banktransactionline import * from .banktransactions import * from .banktransactionsresponse import * -from .banktransactiontype_enum import * +from .banktransactiontype import * from .bill import * from .billcreditnote import * from .billcreditnotelineitem import * from .billcreditnotes import * -from .billcreditnotestatus_enum import * -from .billedtotype_enum import * -from .billedtotype_enum1 import * +from .billcreditnotestatus import * +from .billedtotype import * +from .billedtotype1 import * from .billitem import * from .billlineitem import * from .billpayment import * from .billpaymentline import * from .billpaymentlinelink import * -from .billpaymentlinelinktype_enum import * +from .billpaymentlinelinktype import * from .billpayments import * from .bills import * -from .billstatus_enum import * +from .billstatus import * from .cashflowstatement import * from .cashflowstatement1 import * from .companydataset import * @@ -69,13 +68,13 @@ from .creditnote import * from .creditnotelineitem import * from .creditnotes import * -from .creditnotestatus_enum import * +from .creditnotestatus import * from .customer import * from .customerref import * from .customers import * -from .customerstatus_enum import * +from .customerstatus import * from .dataset import * -from .datatype_enum import * +from .datatype import * from .directcost import * from .directcostlineitem import * from .directcosts import * @@ -87,35 +86,36 @@ from .invoiceitem import * from .invoicelineitem import * from .invoices import * -from .invoicestatus_enum import * +from .invoicestatus import * from .invoiceto import * from .item import * from .itemref import * from .items import * from .items1 import * -from .itemstatus_enum import * +from .itemstatus import * +from .itemtype import * from .journal import * from .journalentries import * from .journalentry import * from .journalline import * from .journalref import * from .journals import * -from .journalstatus_enum import * +from .journalstatus import * from .links import * from .metadata import * from .payment import * from .paymentallocationpayment import * from .paymentline import * from .paymentlinelink import * -from .paymentlinktype_enum import * +from .paymentlinktype import * from .paymentmethod import * from .paymentmethodref import * from .paymentmethods import * -from .paymentmethodstatus_enum import * -from .paymentmethodtype_enum import * +from .paymentmethodstatus import * +from .paymentmethodtype import * from .payments import * from .phonenumbersitems import * -from .phonenumbertype_enum import * +from .phonenumbertype import * from .profitandlossreport import * from .profitandlossreport1 import * from .projectref import * @@ -126,39 +126,40 @@ from .purchaseorderlineitem import * from .purchaseorderref import * from .purchaseorders import * -from .purchaseorderstatus_enum import * -from .pushchangetype_enum import * +from .purchaseorderstatus import * +from .pushchangetype import * from .pushfieldvalidation import * from .pushoperationchange import * from .pushoperationref import * -from .pushoperationstatus_enum import * +from .pushoperationstatus import * from .pushoperationsummary import * from .pushoption import * from .pushoptionchoice import * from .pushoptionproperty import * -from .pushoptiontype_enum import * +from .pushoptiontype import * from .pushvalidationinfo import * -from .reportbasis_enum import * -from .reportinput_enum import * +from .reportbasis import * +from .reportinput import * from .reportline import * from .salesorder import * -from .salesorderinvoicestatus_enum import * +from .salesorderinvoicestatus import * from .salesorderlineitem import * +from .salesorderref import * from .salesorders import * -from .salesorderstatus_enum import * +from .salesorderstatus import * from .security import * from .shipto import * -from .status_enum import * +from .status import * from .supplementaldata import * from .supplier import * from .supplierref import * from .suppliers import * -from .supplierstatus_enum import * +from .supplierstatus import * from .taxrate import * from .taxratecomponent import * from .taxrateref import * from .taxrates import * -from .taxratestatus_enum import * +from .taxratestatus import * from .tracking import * from .trackingcategories import * from .trackingcategory import * @@ -180,4 +181,4 @@ from .validdatatypelinks import * from .withholdingtaxitems import * -__all__ = ["Account","AccountRef","AccountStatusEnum","AccountTransaction","AccountTransactionLine","AccountTransactionStatusEnum","AccountTransactions","AccountTypeEnum","Accounts","AddressTypeEnum","Addressesitems","AgedCreditor","AgedCreditorAgedCurrencyOutstanding","AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount","AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType","AgedCreditorReport","AgedCurrencyOutstandingitems","AgedDebtor","AgedDebtorReport","Attachment","AttachmentsDataset","BalanceSheet","BalanceSheet1","BankAccount","BankAccountBankAccountTypeEnum","BankAccountRef","BankAccountTransactions","BankAccounts","BankTransactionLine","BankTransactionTypeEnum","BankTransactions","BankTransactionsResponse","Bill","BillCreditNote","BillCreditNoteLineItem","BillCreditNoteLineItemTracking","BillCreditNoteStatusEnum","BillCreditNotes","BillItem","BillLineItem","BillPayment","BillPaymentAllocation","BillPaymentAllocationAllocation","BillPaymentLine","BillPaymentLineLink","BillPaymentLineLinkTypeEnum","BillPayments","BillStatusEnum","BillSupplementalData","BillWithholdingTax","BilledToTypeEnum","BilledToTypeEnum1","Bills","CashFlowStatement","CashFlowStatement1","CompanyDataset","CompanyDatasetAddresses","CompanyDatasetPhone","CompanyDatasetWeblink","CompanyDatasetWeblinkTypeEnum","Contact","ContactRef","CreateAccountResponse","CreateBankAccountResponse","CreateBankTransactionsResponse","CreateBillCreditNoteResponse","CreateBillPaymentResponse","CreateBillResponse","CreateCreditNoteResponse","CreateCustomerResponse","CreateDirectCostResponse","CreateDirectIncomeResponse","CreateInvoiceResponse","CreateItemResponse","CreateJournalEntryResponse","CreateJournalResponse","CreatePaymentResponse","CreatePurchaseOrderResponse","CreateSupplierResponse","CreateTransferResponse","CreditNote","CreditNoteLineItem","CreditNoteLineItemTracking","CreditNoteStatusEnum","CreditNotes","Customer","CustomerRef","CustomerStatusEnum","Customers","DataTypeEnum","Dataset","DatasetStatusEnum","DirectCost","DirectCostLineItem","DirectCosts","DirectIncome","DirectIncomeLineItem","DirectIncomes","HalRef","Invoice","InvoiceItem","InvoiceLineItem","InvoiceStatusEnum","InvoiceTo","Invoices","Item","ItemRef","ItemStatusEnum","Items","Items1","ItemsAgedOutstandingAmount","ItemsAgedOutstandingAmountAmountsOutstandingByDataType","ItemsAllocation","Journal","JournalEntries","JournalEntry","JournalLine","JournalRef","JournalStatusEnum","Journals","Links","Metadata","Payment","PaymentAllocationPayment","PaymentLine","PaymentLineLink","PaymentLinkTypeEnum","PaymentMethod","PaymentMethodRef","PaymentMethodStatusEnum","PaymentMethodTypeEnum","PaymentMethods","Payments","PhoneNumberTypeEnum","PhoneNumbersitems","ProfitAndLossReport","ProfitAndLossReport1","ProjectRef","Propertiestracking","Propertiestracking1","Propertiestracking2","PurchaseOrder","PurchaseOrderLineItem","PurchaseOrderRef","PurchaseOrderStatusEnum","PurchaseOrders","PushChangeTypeEnum","PushFieldValidation","PushOperationChange","PushOperationRef","PushOperationStatusEnum","PushOperationSummary","PushOption","PushOptionChoice","PushOptionProperty","PushOptionTypeEnum","PushValidationInfo","ReportBasisEnum","ReportInputEnum","ReportLine","SalesOrder","SalesOrderInvoiceStatusEnum","SalesOrderLineItem","SalesOrderLineItemTracking","SalesOrderShipTo","SalesOrderShipToContact","SalesOrderStatusEnum","SalesOrders","Security","ShipTo","ShipToContact","StatusEnum","SupplementalData","Supplier","SupplierRef","SupplierStatusEnum","Suppliers","TaxRate","TaxRateComponent","TaxRateRef","TaxRateStatusEnum","TaxRates","Tracking","TrackingCategories","TrackingCategory","TrackingCategoryRef","TrackingCategoryTree","TrackingInvoiceTo","Transfer","TransferAccount","TransferContactRef","Transfers","UpdateBankAccountResponse","UpdateBillCreditNoteResponse","UpdateBillResponse","UpdateCreditNoteResponse","UpdateCustomerResponse","UpdateInvoiceResponse","UpdatePurchaseOrderResponse","UpdateSupplierResponse","ValidDataTypeLinks","Validation","ValidationItem","WithholdingTaxitems"] +__all__ = ["Account","AccountRef","AccountStatus","AccountTransaction","AccountTransactionLine","AccountTransactionStatus","AccountTransactions","AccountType","Accounts","AddressType","Addressesitems","AgedCreditor","AgedCreditorAgedCurrencyOutstanding","AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount","AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType","AgedCreditorReport","AgedCurrencyOutstandingitems","AgedDebtor","AgedDebtorReport","Attachment","AttachmentsDataset","BalanceSheet","BalanceSheet1","BankAccount","BankAccountBankAccountType","BankAccountRef","BankAccounts","BankTransactionLine","BankTransactionType","BankTransactions","BankTransactionsResponse","Bill","BillCreditNote","BillCreditNoteLineItem","BillCreditNoteLineItemTracking","BillCreditNoteStatus","BillCreditNotes","BillItem","BillLineItem","BillPayment","BillPaymentAllocation","BillPaymentAllocationAllocation","BillPaymentLine","BillPaymentLineLink","BillPaymentLineLinkType","BillPayments","BillStatus","BillSupplementalData","BillWithholdingTax","BilledToType","BilledToType1","Bills","CashFlowStatement","CashFlowStatement1","CompanyDataset","CompanyDatasetAddresses","CompanyDatasetPhone","CompanyDatasetWeblink","CompanyDatasetWeblinkType","Contact","ContactRef","CreateAccountResponse","CreateBankAccountResponse","CreateBankTransactionsResponse","CreateBillCreditNoteResponse","CreateBillPaymentResponse","CreateBillResponse","CreateCreditNoteResponse","CreateCustomerResponse","CreateDirectCostResponse","CreateDirectIncomeResponse","CreateInvoiceResponse","CreateItemResponse","CreateJournalEntryResponse","CreateJournalResponse","CreatePaymentResponse","CreatePurchaseOrderResponse","CreateSupplierResponse","CreateTransferResponse","CreditNote","CreditNoteLineItem","CreditNoteLineItemTracking","CreditNoteStatus","CreditNotes","Customer","CustomerRef","CustomerStatus","Customers","DataType","Dataset","DatasetStatus","DirectCost","DirectCostLineItem","DirectCosts","DirectIncome","DirectIncomeLineItem","DirectIncomes","HalRef","Invoice","InvoiceItem","InvoiceLineItem","InvoiceStatus","InvoiceTo","Invoices","Item","ItemRef","ItemStatus","ItemType","Items","Items1","ItemsAgedOutstandingAmount","ItemsAgedOutstandingAmountAmountsOutstandingByDataType","ItemsAllocation","Journal","JournalEntries","JournalEntry","JournalLine","JournalRef","JournalStatus","Journals","Links","Metadata","Payment","PaymentAllocationPayment","PaymentLine","PaymentLineLink","PaymentLinkType","PaymentMethod","PaymentMethodRef","PaymentMethodStatus","PaymentMethodType","PaymentMethods","Payments","PhoneNumberType","PhoneNumbersitems","ProfitAndLossReport","ProfitAndLossReport1","ProjectRef","Propertiestracking","Propertiestracking1","Propertiestracking2","PurchaseOrder","PurchaseOrderLineItem","PurchaseOrderRef","PurchaseOrderStatus","PurchaseOrders","PushChangeType","PushFieldValidation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperationSummary","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","ReportBasis","ReportInput","ReportLine","SalesOrder","SalesOrderInvoiceStatus","SalesOrderLineItem","SalesOrderLineItemTracking","SalesOrderRef","SalesOrderShipTo","SalesOrderShipToContact","SalesOrderStatus","SalesOrders","Security","ShipTo","ShipToContact","Status","SupplementalData","Supplier","SupplierRef","SupplierStatus","Suppliers","TaxRate","TaxRateComponent","TaxRateRef","TaxRateStatus","TaxRates","Tracking","TrackingCategories","TrackingCategory","TrackingCategoryRef","TrackingCategoryTree","TrackingRecordReference","Transfer","TransferAccount","TransferContactRef","Transfers","UpdateBankAccountResponse","UpdateBillCreditNoteResponse","UpdateBillResponse","UpdateCreditNoteResponse","UpdateCustomerResponse","UpdateInvoiceResponse","UpdatePurchaseOrderResponse","UpdateSupplierResponse","ValidDataTypeLinks","Validation","ValidationItem","WithholdingTaxitems"] diff --git a/accounting/src/codataccounting/models/shared/account.py b/accounting/src/codataccounting/models/shared/account.py index 29417b6d6..15db95c1e 100755 --- a/accounting/src/codataccounting/models/shared/account.py +++ b/accounting/src/codataccounting/models/shared/account.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import accountstatus_enum as shared_accountstatus_enum -from ..shared import accounttype_enum as shared_accounttype_enum +from ..shared import accountstatus as shared_accountstatus +from ..shared import accounttype as shared_accounttype from ..shared import metadata as shared_metadata from ..shared import validdatatypelinks as shared_validdatatypelinks from codataccounting import utils @@ -38,9 +38,9 @@ class Account: is_bank_account: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBankAccount') }}) r"""Confirms whether the account is a bank account or not.""" - status: shared_accountstatus_enum.AccountStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_accountstatus.AccountStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of the account""" - type: shared_accounttype_enum.AccountTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_accounttype.AccountType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""Type of account""" 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_. diff --git a/accounting/src/codataccounting/models/shared/accountstatus_enum.py b/accounting/src/codataccounting/models/shared/accountstatus.py similarity index 87% rename from accounting/src/codataccounting/models/shared/accountstatus_enum.py rename to accounting/src/codataccounting/models/shared/accountstatus.py index 5f001fab2..2335b70e5 100755 --- a/accounting/src/codataccounting/models/shared/accountstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/accountstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class AccountStatusEnum(str, Enum): +class AccountStatus(str, Enum): r"""Status of the account""" UNKNOWN = 'Unknown' ACTIVE = 'Active' diff --git a/accounting/src/codataccounting/models/shared/accounttransaction.py b/accounting/src/codataccounting/models/shared/accounttransaction.py index 4bfa4256b..eac4cf060 100755 --- a/accounting/src/codataccounting/models/shared/accounttransaction.py +++ b/accounting/src/codataccounting/models/shared/accounttransaction.py @@ -10,7 +10,7 @@ from enum import Enum from typing import Optional -class AccountTransactionStatusEnum(str, Enum): +class AccountTransactionStatus(str, Enum): r"""The status of the account transaction.""" UNKNOWN = 'Unknown' UNRECONCILED = 'Unreconciled' @@ -106,7 +106,7 @@ class AccountTransaction: note: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('note'), 'exclude': lambda f: f is None }}) r"""Additional information about the account transaction, if available.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[AccountTransactionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[AccountTransactionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""The status of the account transaction.""" total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) r"""Total amount of the account transactions, inclusive of tax.""" diff --git a/accounting/src/codataccounting/models/shared/accounttype_enum.py b/accounting/src/codataccounting/models/shared/accounttype.py similarity index 89% rename from accounting/src/codataccounting/models/shared/accounttype_enum.py rename to accounting/src/codataccounting/models/shared/accounttype.py index 93353773e..0ae490aa0 100755 --- a/accounting/src/codataccounting/models/shared/accounttype_enum.py +++ b/accounting/src/codataccounting/models/shared/accounttype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class AccountTypeEnum(str, Enum): +class AccountType(str, Enum): r"""Type of account""" UNKNOWN = 'Unknown' ASSET = 'Asset' diff --git a/accounting/src/codataccounting/models/shared/addressesitems.py b/accounting/src/codataccounting/models/shared/addressesitems.py index c76a6dff9..b9545a322 100755 --- a/accounting/src/codataccounting/models/shared/addressesitems.py +++ b/accounting/src/codataccounting/models/shared/addressesitems.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import addresstype_enum as shared_addresstype_enum +from ..shared import addresstype as shared_addresstype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -12,7 +12,7 @@ @dataclasses.dataclass class Addressesitems: - type: shared_addresstype_enum.AddressTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_addresstype.AddressType = 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.""" diff --git a/accounting/src/codataccounting/models/shared/addresstype_enum.py b/accounting/src/codataccounting/models/shared/addresstype.py similarity index 87% rename from accounting/src/codataccounting/models/shared/addresstype_enum.py rename to accounting/src/codataccounting/models/shared/addresstype.py index c6cfee5bb..4353fa624 100755 --- a/accounting/src/codataccounting/models/shared/addresstype_enum.py +++ b/accounting/src/codataccounting/models/shared/addresstype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class AddressTypeEnum(str, Enum): +class AddressType(str, Enum): r"""The type of the address""" UNKNOWN = 'Unknown' BILLING = 'Billing' diff --git a/accounting/src/codataccounting/models/shared/bankaccount.py b/accounting/src/codataccounting/models/shared/bankaccount.py index 9d73a3a83..93fc86f20 100755 --- a/accounting/src/codataccounting/models/shared/bankaccount.py +++ b/accounting/src/codataccounting/models/shared/bankaccount.py @@ -8,7 +8,7 @@ from enum import Enum from typing import Optional -class BankAccountBankAccountTypeEnum(str, Enum): +class BankAccountBankAccountType(str, Enum): r"""The type of transactions and balances on the account. For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. For Debit accounts, positive balances are assets, and positive transactions **increase** assets. @@ -50,7 +50,7 @@ class BankAccount: FreeAgent integrations For Credit accounts, only the last four digits are required. For other types, the field is optional. """ - account_type: Optional[BankAccountBankAccountTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is None }}) + account_type: Optional[BankAccountBankAccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is None }}) r"""The type of transactions and balances on the account. For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. For Debit accounts, positive balances are assets, and positive transactions **increase** assets. diff --git a/accounting/src/codataccounting/models/shared/bankaccounttransactions.py b/accounting/src/codataccounting/models/shared/bankaccounttransactions.py deleted file mode 100755 index fd978e1b4..000000000 --- a/accounting/src/codataccounting/models/shared/bankaccounttransactions.py +++ /dev/null @@ -1,22 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -from ..shared import banktransactionline as shared_banktransactionline -from ..shared import links as shared_links -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json -from typing import Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class BankAccountTransactions: - r"""Success""" - - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) - page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) - page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) - total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) - results: Optional[list[shared_banktransactionline.BankTransactionLine]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) - \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/banktransactionline.py b/accounting/src/codataccounting/models/shared/banktransactionline.py index 511c879b1..4f264dcfd 100755 --- a/accounting/src/codataccounting/models/shared/banktransactionline.py +++ b/accounting/src/codataccounting/models/shared/banktransactionline.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import banktransactiontype_enum as shared_banktransactiontype_enum +from ..shared import banktransactiontype as shared_banktransactiontype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -15,7 +15,7 @@ class BankTransactionLine: amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }}) balance: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance') }}) reconciled: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reconciled') }}) - transaction_type: shared_banktransactiontype_enum.BankTransactionTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactionType') }}) + transaction_type: shared_banktransactiontype.BankTransactionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactionType') }}) r"""Type of transaction for the bank statement line""" cleared_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clearedOnDate'), '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/accounting/src/codataccounting/models/shared/banktransactiontype_enum.py b/accounting/src/codataccounting/models/shared/banktransactiontype.py similarity index 93% rename from accounting/src/codataccounting/models/shared/banktransactiontype_enum.py rename to accounting/src/codataccounting/models/shared/banktransactiontype.py index 012b56a2d..a68d8322b 100755 --- a/accounting/src/codataccounting/models/shared/banktransactiontype_enum.py +++ b/accounting/src/codataccounting/models/shared/banktransactiontype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class BankTransactionTypeEnum(str, Enum): +class BankTransactionType(str, Enum): r"""Type of transaction for the bank statement line""" UNKNOWN = 'Unknown' CREDIT = 'Credit' diff --git a/accounting/src/codataccounting/models/shared/bill.py b/accounting/src/codataccounting/models/shared/bill.py index 68fd106fa..5971c8c51 100755 --- a/accounting/src/codataccounting/models/shared/bill.py +++ b/accounting/src/codataccounting/models/shared/bill.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import billlineitem as shared_billlineitem -from ..shared import billstatus_enum as shared_billstatus_enum +from ..shared import billstatus as shared_billstatus from ..shared import metadata as shared_metadata from ..shared import paymentallocationpayment as shared_paymentallocationpayment from ..shared import purchaseorderref as shared_purchaseorderref @@ -125,7 +125,7 @@ class Bill: """ issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }}) - status: shared_billstatus_enum.BillStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + 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') }}) r"""Total amount of the bill, excluding any taxes.""" diff --git a/accounting/src/codataccounting/models/shared/billcreditnote.py b/accounting/src/codataccounting/models/shared/billcreditnote.py index 0fe33eb86..b1cda9713 100755 --- a/accounting/src/codataccounting/models/shared/billcreditnote.py +++ b/accounting/src/codataccounting/models/shared/billcreditnote.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import billcreditnotelineitem as shared_billcreditnotelineitem -from ..shared import billcreditnotestatus_enum as shared_billcreditnotestatus_enum +from ..shared import billcreditnotestatus as shared_billcreditnotestatus from ..shared import items as shared_items from ..shared import metadata as shared_metadata from ..shared import supplementaldata as shared_supplementaldata @@ -37,9 +37,7 @@ class BillCreditNote: discount_percentage: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage') }}) r"""Percentage rate of any discount applied to the bill credit note.""" - remaining_credit: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit') }}) - r"""Amount of the bill credit note that is still outstanding.""" - status: shared_billcreditnotestatus_enum.BillCreditNoteStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + 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') }}) r"""Total amount of the bill credit note, including discounts but excluding tax.""" @@ -137,6 +135,8 @@ 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 }}) + 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"""Reference to a configured dynamic key value pair that is unique to the accounting platform. This feature is in private beta, contact us if you would like to learn more.""" diff --git a/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py b/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py index d38a53550..093831da3 100755 --- a/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py +++ b/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import accountref as shared_accountref -from ..shared import billedtotype_enum as shared_billedtotype_enum +from ..shared import billedtotype as shared_billedtotype from ..shared import customerref as shared_customerref from ..shared import itemref as shared_itemref from ..shared import projectref as shared_projectref @@ -20,8 +20,8 @@ class BillCreditNoteLineItemTracking: r"""Categories, and a project and customer, against which the item is tracked.""" category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) - is_billed_to: shared_billedtotype_enum.BilledToTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) - is_rebilled_to: shared_billedtotype_enum.BilledToTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) + 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[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/billcreditnotestatus_enum.py b/accounting/src/codataccounting/models/shared/billcreditnotestatus.py similarity index 88% rename from accounting/src/codataccounting/models/shared/billcreditnotestatus_enum.py rename to accounting/src/codataccounting/models/shared/billcreditnotestatus.py index 54f7e8586..c1128f790 100755 --- a/accounting/src/codataccounting/models/shared/billcreditnotestatus_enum.py +++ b/accounting/src/codataccounting/models/shared/billcreditnotestatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class BillCreditNoteStatusEnum(str, Enum): +class BillCreditNoteStatus(str, Enum): r"""Current state of the bill credit note""" UNKNOWN = 'Unknown' DRAFT = 'Draft' diff --git a/accounting/src/codataccounting/models/shared/billedtotype_enum.py b/accounting/src/codataccounting/models/shared/billedtotype.py similarity index 87% rename from accounting/src/codataccounting/models/shared/billedtotype_enum.py rename to accounting/src/codataccounting/models/shared/billedtotype.py index 91eaa3c1d..7784c4386 100755 --- a/accounting/src/codataccounting/models/shared/billedtotype_enum.py +++ b/accounting/src/codataccounting/models/shared/billedtotype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class BilledToTypeEnum(str, Enum): +class BilledToType(str, Enum): UNKNOWN = 'Unknown' NOT_APPLICABLE = 'NotApplicable' CUSTOMER = 'Customer' diff --git a/accounting/src/codataccounting/models/shared/billedtotype_enum1.py b/accounting/src/codataccounting/models/shared/billedtotype1.py similarity index 85% rename from accounting/src/codataccounting/models/shared/billedtotype_enum1.py rename to accounting/src/codataccounting/models/shared/billedtotype1.py index ca5fcd53c..6eeaacfb6 100755 --- a/accounting/src/codataccounting/models/shared/billedtotype_enum1.py +++ b/accounting/src/codataccounting/models/shared/billedtotype1.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class BilledToTypeEnum1(str, Enum): +class BilledToType1(str, Enum): UNKNOWN = 'Unknown' NOT_APPLICABLE = 'NotApplicable' PROJECT = 'Project' diff --git a/accounting/src/codataccounting/models/shared/billpaymentlinelink.py b/accounting/src/codataccounting/models/shared/billpaymentlinelink.py index 4a8311122..d950f1b00 100755 --- a/accounting/src/codataccounting/models/shared/billpaymentlinelink.py +++ b/accounting/src/codataccounting/models/shared/billpaymentlinelink.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import billpaymentlinelinktype_enum as shared_billpaymentlinelinktype_enum +from ..shared import billpaymentlinelinktype as shared_billpaymentlinelinktype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -12,7 +12,7 @@ @dataclasses.dataclass class BillPaymentLineLink: - type: shared_billpaymentlinelinktype_enum.BillPaymentLineLinkTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + 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 }}) r"""Amount by which the balance of the linked entity is altered, in the currency of the linked entity. diff --git a/accounting/src/codataccounting/models/shared/billpaymentlinelinktype_enum.py b/accounting/src/codataccounting/models/shared/billpaymentlinelinktype.py similarity index 90% rename from accounting/src/codataccounting/models/shared/billpaymentlinelinktype_enum.py rename to accounting/src/codataccounting/models/shared/billpaymentlinelinktype.py index 3cb4da093..4b9241f66 100755 --- a/accounting/src/codataccounting/models/shared/billpaymentlinelinktype_enum.py +++ b/accounting/src/codataccounting/models/shared/billpaymentlinelinktype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class BillPaymentLineLinkTypeEnum(str, Enum): +class BillPaymentLineLinkType(str, Enum): r"""Types of links to bill payment lines.""" UNKNOWN = 'Unknown' UNLINKED = 'Unlinked' diff --git a/accounting/src/codataccounting/models/shared/billstatus_enum.py b/accounting/src/codataccounting/models/shared/billstatus.py similarity index 90% rename from accounting/src/codataccounting/models/shared/billstatus_enum.py rename to accounting/src/codataccounting/models/shared/billstatus.py index c01523fcc..e3345892c 100755 --- a/accounting/src/codataccounting/models/shared/billstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/billstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class BillStatusEnum(str, Enum): +class BillStatus(str, Enum): r"""Current state of the bill.""" UNKNOWN = 'Unknown' OPEN = 'Open' diff --git a/accounting/src/codataccounting/models/shared/cashflowstatement1.py b/accounting/src/codataccounting/models/shared/cashflowstatement1.py index 18c9bc2d7..8a6c23ccb 100755 --- a/accounting/src/codataccounting/models/shared/cashflowstatement1.py +++ b/accounting/src/codataccounting/models/shared/cashflowstatement1.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses from ..shared import cashflowstatement as shared_cashflowstatement -from ..shared import reportbasis_enum as shared_reportbasis_enum -from ..shared import reportinput_enum as shared_reportinput_enum +from ..shared import reportbasis as shared_reportbasis +from ..shared import reportinput as shared_reportinput from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -37,9 +37,9 @@ class CashFlowStatement1: There are only a very small number of edge cases where this currency code is returned by the Codat system. """ - report_basis: shared_reportbasis_enum.ReportBasisEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportBasis') }}) + report_basis: shared_reportbasis.ReportBasis = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportBasis') }}) r"""Accounting method used when aggregating the report data. In this case, `Cash`.""" - report_input: shared_reportinput_enum.ReportInputEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportInput') }}) + report_input: shared_reportinput.ReportInput = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportInput') }}) r"""Accounting method used to prepare the cash flow statement.""" reports: list[shared_cashflowstatement.CashFlowStatement] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reports') }}) r"""Array of cash flow statements.""" diff --git a/accounting/src/codataccounting/models/shared/companydataset.py b/accounting/src/codataccounting/models/shared/companydataset.py index 0e1fc1e49..aa686dc72 100755 --- a/accounting/src/codataccounting/models/shared/companydataset.py +++ b/accounting/src/codataccounting/models/shared/companydataset.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import addresstype_enum as shared_addresstype_enum -from ..shared import phonenumbertype_enum as shared_phonenumbertype_enum +from ..shared import addresstype as shared_addresstype +from ..shared import phonenumbertype as shared_phonenumbertype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from enum import Enum @@ -14,7 +14,7 @@ @dataclasses.dataclass class CompanyDatasetAddresses: - type: shared_addresstype_enum.AddressTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_addresstype.AddressType = 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.""" @@ -36,10 +36,10 @@ class CompanyDatasetPhone: number: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('number') }}) r"""A phone number.""" - type: shared_phonenumbertype_enum.PhoneNumberTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_phonenumbertype.PhoneNumberType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of phone number""" -class CompanyDatasetWeblinkTypeEnum(str, Enum): +class CompanyDatasetWeblinkType(str, Enum): r"""The type of the weblink.""" WEBSITE = 'Website' SOCIAL = 'Social' @@ -51,7 +51,7 @@ class CompanyDatasetWeblinkTypeEnum(str, Enum): class CompanyDatasetWeblink: r"""Weblink associated with the company.""" - type: Optional[CompanyDatasetWeblinkTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + type: Optional[CompanyDatasetWeblinkType] = 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.""" diff --git a/accounting/src/codataccounting/models/shared/contact.py b/accounting/src/codataccounting/models/shared/contact.py index 12392b0a4..176b49da8 100755 --- a/accounting/src/codataccounting/models/shared/contact.py +++ b/accounting/src/codataccounting/models/shared/contact.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import addressesitems as shared_addressesitems -from ..shared import customerstatus_enum as shared_customerstatus_enum +from ..shared import customerstatus as shared_customerstatus from ..shared import phonenumbersitems as shared_phonenumbersitems from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -14,7 +14,7 @@ @dataclasses.dataclass class Contact: - status: shared_customerstatus_enum.CustomerStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_customerstatus.CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of customer.""" address: Optional[shared_addressesitems.Addressesitems] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('address'), 'exclude': lambda f: f is None }}) email: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('email'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createaccountresponse.py b/accounting/src/codataccounting/models/shared/createaccountresponse.py index 7c70697ca..00cb0ec4f 100755 --- a/accounting/src/codataccounting/models/shared/createaccountresponse.py +++ b/accounting/src/codataccounting/models/shared/createaccountresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import account as shared_account -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateAccountResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -91,7 +91,7 @@ class CreateAccountResponse: > > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createbankaccountresponse.py b/accounting/src/codataccounting/models/shared/createbankaccountresponse.py index 36e31a851..d3cfb221b 100755 --- a/accounting/src/codataccounting/models/shared/createbankaccountresponse.py +++ b/accounting/src/codataccounting/models/shared/createbankaccountresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import account as shared_account -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateBankAccountResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -91,7 +91,7 @@ class CreateBankAccountResponse: > > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py b/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py index f1b8859dd..d07bf193f 100755 --- a/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py +++ b/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import banktransactions as shared_banktransactions -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateBankTransactionsResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -87,7 +87,7 @@ class CreateBankTransactionsResponse: * Current account balance. * Transaction type, for example, credit, debit, or transfer. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py b/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py index feb853771..305fd41b3 100755 --- a/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py +++ b/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import billcreditnote as shared_billcreditnote -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateBillCreditNoteResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -87,7 +87,7 @@ class CreateBillCreditNoteResponse: * 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. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py b/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py index 19e727534..fd540d3fd 100755 --- a/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py +++ b/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import billpayment as shared_billpayment -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateBillPaymentResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -221,7 +221,7 @@ class CreateBillPaymentResponse: - The base currency for the accounts payable account. - The currency of the item. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createbillresponse.py b/accounting/src/codataccounting/models/shared/createbillresponse.py index fa1c408a5..d048f6a4b 100755 --- a/accounting/src/codataccounting/models/shared/createbillresponse.py +++ b/accounting/src/codataccounting/models/shared/createbillresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import bill as shared_bill -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateBillResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -90,7 +90,7 @@ class CreateBillResponse: You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py b/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py index 020515f2a..4505600a1 100755 --- a/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py +++ b/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import creditnote as shared_creditnote -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateCreditNoteResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -83,7 +83,7 @@ class CreateCreditNoteResponse: * Payment allocations against the payments type, in this case an invoice. * Which customers the credit notes have been issued to. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createcustomerresponse.py b/accounting/src/codataccounting/models/shared/createcustomerresponse.py index 09970068b..bc7da98b1 100755 --- a/accounting/src/codataccounting/models/shared/createcustomerresponse.py +++ b/accounting/src/codataccounting/models/shared/createcustomerresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import customer as shared_customer -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateCustomerResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -78,7 +78,7 @@ class CreateCustomerResponse: Customers' data links to accounts receivable [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createdirectcostresponse.py b/accounting/src/codataccounting/models/shared/createdirectcostresponse.py index 419d876bd..5197af776 100755 --- a/accounting/src/codataccounting/models/shared/createdirectcostresponse.py +++ b/accounting/src/codataccounting/models/shared/createdirectcostresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import directcost as shared_directcost from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateDirectCostResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -84,7 +84,7 @@ class CreateDirectCostResponse: Direct costs is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py b/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py index 92bb575ed..14318b7e4 100755 --- a/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py +++ b/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import directincome as shared_directincome from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateDirectIncomeResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -84,7 +84,7 @@ class CreateDirectIncomeResponse: Direct incomes is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createinvoiceresponse.py b/accounting/src/codataccounting/models/shared/createinvoiceresponse.py index d4610a34b..f17841a50 100755 --- a/accounting/src/codataccounting/models/shared/createinvoiceresponse.py +++ b/accounting/src/codataccounting/models/shared/createinvoiceresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import invoice as shared_invoice from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateInvoiceResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -100,7 +100,7 @@ class CreateInvoiceResponse: > > In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createitemresponse.py b/accounting/src/codataccounting/models/shared/createitemresponse.py index 971197a5d..0cbc798f7 100755 --- a/accounting/src/codataccounting/models/shared/createitemresponse.py +++ b/accounting/src/codataccounting/models/shared/createitemresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import item as shared_item from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateItemResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -76,7 +76,7 @@ class CreateItemResponse: **Items** allow your customers to save and track details of the products and services that they buy and sell. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createjournalentryresponse.py b/accounting/src/codataccounting/models/shared/createjournalentryresponse.py index 68973d1d6..5d3ec3b02 100755 --- a/accounting/src/codataccounting/models/shared/createjournalentryresponse.py +++ b/accounting/src/codataccounting/models/shared/createjournalentryresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import journalentry as shared_journalentry from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateJournalEntryResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -93,7 +93,7 @@ class CreateJournalEntryResponse: > **Pushing journal entries** > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createjournalresponse.py b/accounting/src/codataccounting/models/shared/createjournalresponse.py index 32eb34b23..e6b9cfa54 100755 --- a/accounting/src/codataccounting/models/shared/createjournalresponse.py +++ b/accounting/src/codataccounting/models/shared/createjournalresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import journal as shared_journal from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreateJournalResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -93,7 +93,7 @@ class CreateJournalResponse: > When pushing journal entries to an accounting platform that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createpaymentresponse.py b/accounting/src/codataccounting/models/shared/createpaymentresponse.py index 49bb1f96f..73d9f2dbe 100755 --- a/accounting/src/codataccounting/models/shared/createpaymentresponse.py +++ b/accounting/src/codataccounting/models/shared/createpaymentresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import payment as shared_payment from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreatePaymentResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -749,7 +749,7 @@ class CreatePaymentResponse: } ``` """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py b/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py index ac3a47a1c..9a4349312 100755 --- a/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py +++ b/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import purchaseorder as shared_purchaseorder from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class CreatePurchaseOrderResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -78,7 +78,7 @@ class CreatePurchaseOrderResponse: This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createsupplierresponse.py b/accounting/src/codataccounting/models/shared/createsupplierresponse.py index 7aff2914b..a2f6c8b20 100755 --- a/accounting/src/codataccounting/models/shared/createsupplierresponse.py +++ b/accounting/src/codataccounting/models/shared/createsupplierresponse.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import supplier as shared_supplier from ..shared import validation as shared_validation from codataccounting import utils @@ -44,7 +44,7 @@ class CreateSupplierResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -76,7 +76,7 @@ class CreateSupplierResponse: From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/createtransferresponse.py b/accounting/src/codataccounting/models/shared/createtransferresponse.py index 11239bafe..5bd5532ca 100755 --- a/accounting/src/codataccounting/models/shared/createtransferresponse.py +++ b/accounting/src/codataccounting/models/shared/createtransferresponse.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import transfer as shared_transfer from ..shared import validation as shared_validation from codataccounting import utils @@ -44,7 +44,7 @@ class CreateTransferResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -74,7 +74,7 @@ class CreateTransferResponse: A transfer records the movement of money between two bank accounts, or between a bank account and a nominal account. It is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/creditnote.py b/accounting/src/codataccounting/models/shared/creditnote.py index f68d0cc99..195f70c90 100755 --- a/accounting/src/codataccounting/models/shared/creditnote.py +++ b/accounting/src/codataccounting/models/shared/creditnote.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import creditnotelineitem as shared_creditnotelineitem -from ..shared import creditnotestatus_enum as shared_creditnotestatus_enum +from ..shared import creditnotestatus as shared_creditnotestatus from ..shared import customerref as shared_customerref from ..shared import items as shared_items from ..shared import metadata as shared_metadata @@ -35,7 +35,7 @@ class CreditNote: r"""Percentage rate (from 0 to 100) of discounts applied to the credit note.""" remaining_credit: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit') }}) r"""Unused balance of totalAmount originally raised.""" - status: shared_creditnotestatus_enum.CreditNoteStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_creditnotestatus.CreditNoteStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }}) r"""Value of the credit note, including discounts and excluding tax.""" total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) diff --git a/accounting/src/codataccounting/models/shared/creditnotelineitem.py b/accounting/src/codataccounting/models/shared/creditnotelineitem.py index 664f60477..0c54dd2bd 100755 --- a/accounting/src/codataccounting/models/shared/creditnotelineitem.py +++ b/accounting/src/codataccounting/models/shared/creditnotelineitem.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import accountref as shared_accountref -from ..shared import billedtotype_enum1 as shared_billedtotype_enum1 +from ..shared import billedtotype1 as shared_billedtotype1 from ..shared import customerref as shared_customerref from ..shared import itemref as shared_itemref from ..shared import projectref as shared_projectref @@ -20,8 +20,8 @@ class CreditNoteLineItemTracking: r"""Categories, and a project and customer, against which the item is tracked.""" category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) - is_billed_to: shared_billedtotype_enum1.BilledToTypeEnum1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) - is_rebilled_to: shared_billedtotype_enum1.BilledToTypeEnum1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) + is_billed_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) + is_rebilled_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/creditnotestatus_enum.py b/accounting/src/codataccounting/models/shared/creditnotestatus.py similarity index 87% rename from accounting/src/codataccounting/models/shared/creditnotestatus_enum.py rename to accounting/src/codataccounting/models/shared/creditnotestatus.py index ffaef408d..df12ba166 100755 --- a/accounting/src/codataccounting/models/shared/creditnotestatus_enum.py +++ b/accounting/src/codataccounting/models/shared/creditnotestatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class CreditNoteStatusEnum(str, Enum): +class CreditNoteStatus(str, Enum): UNKNOWN = 'Unknown' DRAFT = 'Draft' SUBMITTED = 'Submitted' diff --git a/accounting/src/codataccounting/models/shared/customer.py b/accounting/src/codataccounting/models/shared/customer.py index 187c596fb..8232702f5 100755 --- a/accounting/src/codataccounting/models/shared/customer.py +++ b/accounting/src/codataccounting/models/shared/customer.py @@ -4,7 +4,7 @@ import dataclasses from ..shared import addressesitems as shared_addressesitems from ..shared import contact as shared_contact -from ..shared import customerstatus_enum as shared_customerstatus_enum +from ..shared import customerstatus as shared_customerstatus from ..shared import metadata as shared_metadata from ..shared import supplementaldata as shared_supplementaldata from codataccounting import utils @@ -24,7 +24,7 @@ class Customer: Customers' data links to accounts receivable [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice). """ - status: shared_customerstatus_enum.CustomerStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_customerstatus.CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of customer.""" 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.""" diff --git a/accounting/src/codataccounting/models/shared/customerstatus_enum.py b/accounting/src/codataccounting/models/shared/customerstatus.py similarity index 86% rename from accounting/src/codataccounting/models/shared/customerstatus_enum.py rename to accounting/src/codataccounting/models/shared/customerstatus.py index 43535729e..345218f3e 100755 --- a/accounting/src/codataccounting/models/shared/customerstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/customerstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class CustomerStatusEnum(str, Enum): +class CustomerStatus(str, Enum): r"""Status of customer.""" UNKNOWN = 'Unknown' ACTIVE = 'Active' diff --git a/accounting/src/codataccounting/models/shared/dataset.py b/accounting/src/codataccounting/models/shared/dataset.py index f2a5974fd..81996ae06 100755 --- a/accounting/src/codataccounting/models/shared/dataset.py +++ b/accounting/src/codataccounting/models/shared/dataset.py @@ -7,7 +7,7 @@ from enum import Enum from typing import Optional -class DatasetStatusEnum(str, Enum): +class DatasetStatus(str, Enum): INITIAL = 'Initial' QUEUED = 'Queued' FETCHING = 'Fetching' @@ -63,7 +63,7 @@ class Dataset: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: DatasetStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: DatasetStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) completed: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completed'), '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/accounting/src/codataccounting/models/shared/datatype_enum.py b/accounting/src/codataccounting/models/shared/datatype.py similarity index 98% rename from accounting/src/codataccounting/models/shared/datatype_enum.py rename to accounting/src/codataccounting/models/shared/datatype.py index 3057feb36..ea726125d 100755 --- a/accounting/src/codataccounting/models/shared/datatype_enum.py +++ b/accounting/src/codataccounting/models/shared/datatype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class DataTypeEnum(str, Enum): +class DataType(str, Enum): r"""Available Data types""" ACCOUNT_TRANSACTIONS = 'accountTransactions' BALANCE_SHEET = 'balanceSheet' diff --git a/accounting/src/codataccounting/models/shared/invoice.py b/accounting/src/codataccounting/models/shared/invoice.py index c2f2d1e75..86ea61a47 100755 --- a/accounting/src/codataccounting/models/shared/invoice.py +++ b/accounting/src/codataccounting/models/shared/invoice.py @@ -4,9 +4,10 @@ import dataclasses from ..shared import customerref as shared_customerref from ..shared import invoicelineitem as shared_invoicelineitem -from ..shared import invoicestatus_enum as shared_invoicestatus_enum +from ..shared import invoicestatus as shared_invoicestatus from ..shared import items as shared_items from ..shared import metadata as shared_metadata +from ..shared import salesorderref as shared_salesorderref from ..shared import supplementaldata as shared_supplementaldata from ..shared import withholdingtaxitems as shared_withholdingtaxitems from codataccounting import utils @@ -71,7 +72,7 @@ class Invoice: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_invoicestatus_enum.InvoiceStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_invoicestatus.InvoiceStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Current state of the invoice: - `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email. @@ -177,7 +178,7 @@ class Invoice: """ 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.""" - sales_order_refs: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('salesOrderRefs'), 'exclude': lambda f: f is None }}) + sales_order_refs: Optional[list[shared_salesorderref.SalesOrderRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('salesOrderRefs'), 'exclude': lambda f: f is None }}) r"""List of references to related Sales orders.""" 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 }}) sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/invoicestatus_enum.py b/accounting/src/codataccounting/models/shared/invoicestatus.py similarity index 97% rename from accounting/src/codataccounting/models/shared/invoicestatus_enum.py rename to accounting/src/codataccounting/models/shared/invoicestatus.py index 47b74b7cb..1f7a92626 100755 --- a/accounting/src/codataccounting/models/shared/invoicestatus_enum.py +++ b/accounting/src/codataccounting/models/shared/invoicestatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class InvoiceStatusEnum(str, Enum): +class InvoiceStatus(str, Enum): r"""Current state of the invoice: - `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email. diff --git a/accounting/src/codataccounting/models/shared/item.py b/accounting/src/codataccounting/models/shared/item.py index 795f7257e..36c0eaf25 100755 --- a/accounting/src/codataccounting/models/shared/item.py +++ b/accounting/src/codataccounting/models/shared/item.py @@ -4,11 +4,12 @@ import dataclasses from ..shared import billitem as shared_billitem from ..shared import invoiceitem as shared_invoiceitem -from ..shared import itemstatus_enum as shared_itemstatus_enum +from ..shared import itemstatus as shared_itemstatus +from ..shared import itemtype as shared_itemtype from ..shared import metadata as shared_metadata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json -from typing import Any, Optional +from typing import Optional @dataclass_json(undefined=Undefined.EXCLUDE) @@ -25,7 +26,7 @@ class Item: r"""Whether you can use this item for bills.""" is_invoice_item: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isInvoiceItem') }}) r"""Whether you can use this item for invoices.""" - item_status: shared_itemstatus_enum.ItemStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemStatus') }}) + item_status: shared_itemstatus.ItemStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemStatus') }}) r"""Current state of the item, either: - `Active`: Available for use @@ -34,7 +35,8 @@ class Item: Due to a [limitation in Xero's API](https://docs.codat.io/integrations/accounting/xero/xero-faq#why-do-all-of-my-items-from-xero-have-their-status-as-unknown), all items from Xero are mapped as `Unknown`. """ - type: Any = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + r"""Type of the item.""" bill_item: Optional[shared_billitem.BillItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('billItem'), 'exclude': lambda f: f is None }}) r"""Item details that are only for bills.""" code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/itemstatus_enum.py b/accounting/src/codataccounting/models/shared/itemstatus.py similarity index 94% rename from accounting/src/codataccounting/models/shared/itemstatus_enum.py rename to accounting/src/codataccounting/models/shared/itemstatus.py index 22f4ac3f0..cbacf030d 100755 --- a/accounting/src/codataccounting/models/shared/itemstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/itemstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class ItemStatusEnum(str, Enum): +class ItemStatus(str, Enum): r"""Current state of the item, either: - `Active`: Available for use diff --git a/accounting/src/codataccounting/models/shared/itemtype.py b/accounting/src/codataccounting/models/shared/itemtype.py new file mode 100755 index 000000000..d4195ca1d --- /dev/null +++ b/accounting/src/codataccounting/models/shared/itemtype.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + +class ItemType(str, Enum): + r"""Type of the item.""" + UNKNOWN = 'Unknown' + INVENTORY = 'Inventory' + NON_INVENTORY = 'NonInventory' + SERVICE = 'Service' diff --git a/accounting/src/codataccounting/models/shared/journal.py b/accounting/src/codataccounting/models/shared/journal.py index 58e04b9c2..7e8d1bf8e 100755 --- a/accounting/src/codataccounting/models/shared/journal.py +++ b/accounting/src/codataccounting/models/shared/journal.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import journalstatus_enum as shared_journalstatus_enum +from ..shared import journalstatus as shared_journalstatus from ..shared import metadata as shared_metadata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -74,7 +74,7 @@ class Journal: If the journal is a parent journal, this value is not present. """ source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_journalstatus_enum.JournalStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_journalstatus.JournalStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current journal status.""" type: Optional[str] = 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 journal.""" diff --git a/accounting/src/codataccounting/models/shared/journalstatus_enum.py b/accounting/src/codataccounting/models/shared/journalstatus.py similarity index 87% rename from accounting/src/codataccounting/models/shared/journalstatus_enum.py rename to accounting/src/codataccounting/models/shared/journalstatus.py index 2c2decbd4..6fbb69944 100755 --- a/accounting/src/codataccounting/models/shared/journalstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/journalstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class JournalStatusEnum(str, Enum): +class JournalStatus(str, Enum): r"""Current journal status.""" UNKNOWN = 'Unknown' ACTIVE = 'Active' diff --git a/accounting/src/codataccounting/models/shared/paymentlinelink.py b/accounting/src/codataccounting/models/shared/paymentlinelink.py index 125f79821..b47a07ce2 100755 --- a/accounting/src/codataccounting/models/shared/paymentlinelink.py +++ b/accounting/src/codataccounting/models/shared/paymentlinelink.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import paymentlinktype_enum as shared_paymentlinktype_enum +from ..shared import paymentlinktype as shared_paymentlinktype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -12,7 +12,7 @@ @dataclasses.dataclass class PaymentLineLink: - type: shared_paymentlinktype_enum.PaymentLinkTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_paymentlinktype.PaymentLinkType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""Types of payment line links, either: `Unknown` `Unlinked` - Not used diff --git a/accounting/src/codataccounting/models/shared/paymentlinktype_enum.py b/accounting/src/codataccounting/models/shared/paymentlinktype.py similarity index 95% rename from accounting/src/codataccounting/models/shared/paymentlinktype_enum.py rename to accounting/src/codataccounting/models/shared/paymentlinktype.py index 8f80c7977..f1e7d90b3 100755 --- a/accounting/src/codataccounting/models/shared/paymentlinktype_enum.py +++ b/accounting/src/codataccounting/models/shared/paymentlinktype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PaymentLinkTypeEnum(str, Enum): +class PaymentLinkType(str, Enum): r"""Types of payment line links, either: `Unknown` `Unlinked` - Not used diff --git a/accounting/src/codataccounting/models/shared/paymentmethod.py b/accounting/src/codataccounting/models/shared/paymentmethod.py index d83116ec5..c45608ad3 100755 --- a/accounting/src/codataccounting/models/shared/paymentmethod.py +++ b/accounting/src/codataccounting/models/shared/paymentmethod.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses from ..shared import metadata as shared_metadata -from ..shared import paymentmethodstatus_enum as shared_paymentmethodstatus_enum -from ..shared import paymentmethodtype_enum as shared_paymentmethodtype_enum +from ..shared import paymentmethodstatus as shared_paymentmethodstatus +from ..shared import paymentmethodtype as shared_paymentmethodtype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -27,8 +27,8 @@ class PaymentMethod: 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 payment method.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_paymentmethodstatus_enum.PaymentMethodStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_paymentmethodstatus.PaymentMethodStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Status of the Payment Method.""" - type: Optional[shared_paymentmethodtype_enum.PaymentMethodTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + type: Optional[shared_paymentmethodtype.PaymentMethodType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) r"""Method of payment.""" \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/paymentmethods.py b/accounting/src/codataccounting/models/shared/paymentmethods.py index 08b58baa7..6ef653f4b 100755 --- a/accounting/src/codataccounting/models/shared/paymentmethods.py +++ b/accounting/src/codataccounting/models/shared/paymentmethods.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import bill as shared_bill from ..shared import links as shared_links +from ..shared import paymentmethod as shared_paymentmethod from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -18,5 +18,5 @@ class PaymentMethods: page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) - results: Optional[list[shared_bill.Bill]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[list[shared_paymentmethod.PaymentMethod]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/paymentmethodstatus_enum.py b/accounting/src/codataccounting/models/shared/paymentmethodstatus.py similarity index 85% rename from accounting/src/codataccounting/models/shared/paymentmethodstatus_enum.py rename to accounting/src/codataccounting/models/shared/paymentmethodstatus.py index 697cdd204..3c7429158 100755 --- a/accounting/src/codataccounting/models/shared/paymentmethodstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/paymentmethodstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PaymentMethodStatusEnum(str, Enum): +class PaymentMethodStatus(str, Enum): r"""Status of the Payment Method.""" UNKNOWN = 'Unknown' ACTIVE = 'Active' diff --git a/accounting/src/codataccounting/models/shared/paymentmethodtype_enum.py b/accounting/src/codataccounting/models/shared/paymentmethodtype.py similarity index 89% rename from accounting/src/codataccounting/models/shared/paymentmethodtype_enum.py rename to accounting/src/codataccounting/models/shared/paymentmethodtype.py index 185cf4076..21b69b9ad 100755 --- a/accounting/src/codataccounting/models/shared/paymentmethodtype_enum.py +++ b/accounting/src/codataccounting/models/shared/paymentmethodtype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PaymentMethodTypeEnum(str, Enum): +class PaymentMethodType(str, Enum): r"""Method of payment.""" UNKNOWN = 'Unknown' CASH = 'Cash' diff --git a/accounting/src/codataccounting/models/shared/phonenumbersitems.py b/accounting/src/codataccounting/models/shared/phonenumbersitems.py index 8b183e724..d4d3c26c5 100755 --- a/accounting/src/codataccounting/models/shared/phonenumbersitems.py +++ b/accounting/src/codataccounting/models/shared/phonenumbersitems.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import phonenumbertype_enum as shared_phonenumbertype_enum +from ..shared import phonenumbertype as shared_phonenumbertype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -13,6 +13,6 @@ class PhoneNumbersitems: number: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('number') }}) r"""A phone number.""" - type: shared_phonenumbertype_enum.PhoneNumberTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_phonenumbertype.PhoneNumberType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of phone number""" \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/phonenumbertype_enum.py b/accounting/src/codataccounting/models/shared/phonenumbertype.py similarity index 88% rename from accounting/src/codataccounting/models/shared/phonenumbertype_enum.py rename to accounting/src/codataccounting/models/shared/phonenumbertype.py index 6253c4958..5da847077 100755 --- a/accounting/src/codataccounting/models/shared/phonenumbertype_enum.py +++ b/accounting/src/codataccounting/models/shared/phonenumbertype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PhoneNumberTypeEnum(str, Enum): +class PhoneNumberType(str, Enum): r"""The type of phone number""" PRIMARY = 'Primary' LANDLINE = 'Landline' diff --git a/accounting/src/codataccounting/models/shared/profitandlossreport1.py b/accounting/src/codataccounting/models/shared/profitandlossreport1.py index 2fcaa8db0..21360f0b5 100755 --- a/accounting/src/codataccounting/models/shared/profitandlossreport1.py +++ b/accounting/src/codataccounting/models/shared/profitandlossreport1.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import profitandlossreport as shared_profitandlossreport -from ..shared import reportbasis_enum as shared_reportbasis_enum +from ..shared import reportbasis as shared_reportbasis from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -38,7 +38,7 @@ class ProfitAndLossReport1: currency: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency') }}) r"""Base currency of the company in which the profit and loss report is presented.""" - report_basis: shared_reportbasis_enum.ReportBasisEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportBasis') }}) + report_basis: shared_reportbasis.ReportBasis = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportBasis') }}) r"""The basis of a report.""" reports: list[shared_profitandlossreport.ProfitAndLossReport] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reports') }}) r"""An array of profit and loss reports.""" diff --git a/accounting/src/codataccounting/models/shared/propertiestracking.py b/accounting/src/codataccounting/models/shared/propertiestracking.py index 047583765..a835d7e15 100755 --- a/accounting/src/codataccounting/models/shared/propertiestracking.py +++ b/accounting/src/codataccounting/models/shared/propertiestracking.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import billedtotype_enum as shared_billedtotype_enum +from ..shared import billedtotype as shared_billedtotype from ..shared import customerref as shared_customerref from ..shared import projectref as shared_projectref from ..shared import trackingcategoryref as shared_trackingcategoryref @@ -17,8 +17,8 @@ class Propertiestracking: r"""Categories, and a project and customer, against which the item is tracked.""" category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) - is_billed_to: shared_billedtotype_enum.BilledToTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) - is_rebilled_to: shared_billedtotype_enum.BilledToTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) + 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[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/propertiestracking1.py b/accounting/src/codataccounting/models/shared/propertiestracking1.py index 913149ca9..8807cd80f 100755 --- a/accounting/src/codataccounting/models/shared/propertiestracking1.py +++ b/accounting/src/codataccounting/models/shared/propertiestracking1.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import billedtotype_enum1 as shared_billedtotype_enum1 +from ..shared import billedtotype1 as shared_billedtotype1 from ..shared import customerref as shared_customerref from ..shared import projectref as shared_projectref from ..shared import trackingcategoryref as shared_trackingcategoryref @@ -17,8 +17,8 @@ class Propertiestracking1: r"""Categories, and a project and customer, against which the item is tracked.""" category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) - is_billed_to: shared_billedtotype_enum1.BilledToTypeEnum1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) - is_rebilled_to: shared_billedtotype_enum1.BilledToTypeEnum1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) + is_billed_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) + is_rebilled_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/purchaseorder.py b/accounting/src/codataccounting/models/shared/purchaseorder.py index 2a46fc8a3..2fe5b811a 100755 --- a/accounting/src/codataccounting/models/shared/purchaseorder.py +++ b/accounting/src/codataccounting/models/shared/purchaseorder.py @@ -4,7 +4,7 @@ import dataclasses from ..shared import metadata as shared_metadata from ..shared import purchaseorderlineitem as shared_purchaseorderlineitem -from ..shared import purchaseorderstatus_enum as shared_purchaseorderstatus_enum +from ..shared import purchaseorderstatus as shared_purchaseorderstatus from ..shared import shipto as shared_shipto from ..shared import supplierref as shared_supplierref from codataccounting import utils @@ -155,7 +155,7 @@ class PurchaseOrder: ship_to: Optional[shared_shipto.ShipTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('shipTo'), 'exclude': lambda f: f is None }}) r"""Delivery details for any goods that have been ordered.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_purchaseorderstatus_enum.PurchaseOrderStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_purchaseorderstatus.PurchaseOrderStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current state of the purchase order""" sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) r"""Total amount of the purchase order, including discounts but excluding tax.""" diff --git a/accounting/src/codataccounting/models/shared/purchaseorderstatus_enum.py b/accounting/src/codataccounting/models/shared/purchaseorderstatus.py similarity index 87% rename from accounting/src/codataccounting/models/shared/purchaseorderstatus_enum.py rename to accounting/src/codataccounting/models/shared/purchaseorderstatus.py index d1338f760..e7463c3d3 100755 --- a/accounting/src/codataccounting/models/shared/purchaseorderstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/purchaseorderstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PurchaseOrderStatusEnum(str, Enum): +class PurchaseOrderStatus(str, Enum): r"""Current state of the purchase order""" UNKNOWN = 'Unknown' DRAFT = 'Draft' diff --git a/accounting/src/codataccounting/models/shared/pushchangetype_enum.py b/accounting/src/codataccounting/models/shared/pushchangetype.py similarity index 88% rename from accounting/src/codataccounting/models/shared/pushchangetype_enum.py rename to accounting/src/codataccounting/models/shared/pushchangetype.py index 5b26d7b9e..88e1a3ec7 100755 --- a/accounting/src/codataccounting/models/shared/pushchangetype_enum.py +++ b/accounting/src/codataccounting/models/shared/pushchangetype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PushChangeTypeEnum(str, Enum): +class PushChangeType(str, Enum): UNKNOWN = 'Unknown' CREATED = 'Created' MODIFIED = 'Modified' diff --git a/accounting/src/codataccounting/models/shared/pushoperationchange.py b/accounting/src/codataccounting/models/shared/pushoperationchange.py index f1298780c..a488b66d9 100755 --- a/accounting/src/codataccounting/models/shared/pushoperationchange.py +++ b/accounting/src/codataccounting/models/shared/pushoperationchange.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import pushchangetype_enum as shared_pushchangetype_enum +from ..shared import pushchangetype as shared_pushchangetype from ..shared import pushoperationref as shared_pushoperationref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -15,5 +15,5 @@ class PushOperationChange: attachment_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachmentId'), 'exclude': lambda f: f is None }}) record_ref: Optional[shared_pushoperationref.PushOperationRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) - type: Optional[shared_pushchangetype_enum.PushChangeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + type: Optional[shared_pushchangetype.PushChangeType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/pushoperationref.py b/accounting/src/codataccounting/models/shared/pushoperationref.py index e23c452ef..d934fb8a3 100755 --- a/accounting/src/codataccounting/models/shared/pushoperationref.py +++ b/accounting/src/codataccounting/models/shared/pushoperationref.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -12,7 +12,7 @@ @dataclasses.dataclass class PushOperationRef: - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/pushoperationstatus_enum.py b/accounting/src/codataccounting/models/shared/pushoperationstatus.py similarity index 86% rename from accounting/src/codataccounting/models/shared/pushoperationstatus_enum.py rename to accounting/src/codataccounting/models/shared/pushoperationstatus.py index 90d017bcf..fc391b0a2 100755 --- a/accounting/src/codataccounting/models/shared/pushoperationstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/pushoperationstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PushOperationStatusEnum(str, Enum): +class PushOperationStatus(str, Enum): r"""The status of the push operation.""" PENDING = 'Pending' FAILED = 'Failed' diff --git a/accounting/src/codataccounting/models/shared/pushoperationsummary.py b/accounting/src/codataccounting/models/shared/pushoperationsummary.py index 6e7adfe96..c2c27fb1a 100755 --- a/accounting/src/codataccounting/models/shared/pushoperationsummary.py +++ b/accounting/src/codataccounting/models/shared/pushoperationsummary.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -43,7 +43,7 @@ class PushOperationSummary: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -68,7 +68,7 @@ class PushOperationSummary: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/pushoption.py b/accounting/src/codataccounting/models/shared/pushoption.py index 5c75ea974..936d2cd5f 100755 --- a/accounting/src/codataccounting/models/shared/pushoption.py +++ b/accounting/src/codataccounting/models/shared/pushoption.py @@ -4,7 +4,7 @@ import dataclasses from ..shared import pushoptionchoice as shared_pushoptionchoice from ..shared import pushoptionproperty as shared_pushoptionproperty -from ..shared import pushoptiontype_enum as shared_pushoptiontype_enum +from ..shared import pushoptiontype as shared_pushoptiontype from ..shared import pushvalidationinfo as shared_pushvalidationinfo from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -18,7 +18,7 @@ class PushOption: 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_enum.PushOptionTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_pushoptiontype.PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) options: Optional[list[shared_pushoptionchoice.PushOptionChoice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options'), 'exclude': lambda f: f is None }}) properties: Optional[dict[str, shared_pushoptionproperty.PushOptionProperty]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/pushoptionchoice.py b/accounting/src/codataccounting/models/shared/pushoptionchoice.py index 9f5afeec9..f6404185a 100755 --- a/accounting/src/codataccounting/models/shared/pushoptionchoice.py +++ b/accounting/src/codataccounting/models/shared/pushoptionchoice.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import pushoptiontype_enum as shared_pushoptiontype_enum +from ..shared import pushoptiontype as shared_pushoptiontype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -15,7 +15,7 @@ class PushOptionChoice: description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) display_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayName'), 'exclude': lambda f: f is None }}) required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required'), 'exclude': lambda f: f is None }}) - type: Optional[shared_pushoptiontype_enum.PushOptionTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + type: Optional[shared_pushoptiontype.PushOptionType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) value: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value'), 'exclude': lambda f: f is None }}) r"""Allowed value for field.""" \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/pushoptionproperty.py b/accounting/src/codataccounting/models/shared/pushoptionproperty.py index f3cc3abdf..199508f41 100755 --- a/accounting/src/codataccounting/models/shared/pushoptionproperty.py +++ b/accounting/src/codataccounting/models/shared/pushoptionproperty.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses from ..shared import pushoptionchoice as shared_pushoptionchoice -from ..shared import pushoptiontype_enum as shared_pushoptiontype_enum +from ..shared import pushoptiontype as shared_pushoptiontype from ..shared import pushvalidationinfo as shared_pushvalidationinfo from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -17,7 +17,7 @@ class PushOptionProperty: description: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description') }}) 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_enum.PushOptionTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_pushoptiontype.PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) options: Optional[list[shared_pushoptionchoice.PushOptionChoice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options'), 'exclude': lambda f: f is None }}) properties: Optional[dict[str, PushOptionProperty]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties'), 'exclude': lambda f: f is None }}) validation: Optional[shared_pushvalidationinfo.PushValidationInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/pushoptiontype_enum.py b/accounting/src/codataccounting/models/shared/pushoptiontype.py similarity index 89% rename from accounting/src/codataccounting/models/shared/pushoptiontype_enum.py rename to accounting/src/codataccounting/models/shared/pushoptiontype.py index 5b15aa514..2de78dadf 100755 --- a/accounting/src/codataccounting/models/shared/pushoptiontype_enum.py +++ b/accounting/src/codataccounting/models/shared/pushoptiontype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class PushOptionTypeEnum(str, Enum): +class PushOptionType(str, Enum): ARRAY = 'Array' OBJECT = 'Object' STRING = 'String' diff --git a/accounting/src/codataccounting/models/shared/reportbasis_enum.py b/accounting/src/codataccounting/models/shared/reportbasis.py similarity index 89% rename from accounting/src/codataccounting/models/shared/reportbasis_enum.py rename to accounting/src/codataccounting/models/shared/reportbasis.py index d32490d44..82dbd7689 100755 --- a/accounting/src/codataccounting/models/shared/reportbasis_enum.py +++ b/accounting/src/codataccounting/models/shared/reportbasis.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class ReportBasisEnum(str, Enum): +class ReportBasis(str, Enum): r"""Accounting method used when aggregating the report data. In this case, `Cash`.""" UNKNOWN = 'Unknown' ACCRUAL = 'Accrual' diff --git a/accounting/src/codataccounting/models/shared/reportinput_enum.py b/accounting/src/codataccounting/models/shared/reportinput.py similarity index 89% rename from accounting/src/codataccounting/models/shared/reportinput_enum.py rename to accounting/src/codataccounting/models/shared/reportinput.py index 9fc25bc57..d0fbdb7f1 100755 --- a/accounting/src/codataccounting/models/shared/reportinput_enum.py +++ b/accounting/src/codataccounting/models/shared/reportinput.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class ReportInputEnum(str, Enum): +class ReportInput(str, Enum): r"""Accounting method used to prepare the cash flow statement.""" UNKNOWN = 'Unknown' INDIRECT = 'Indirect' diff --git a/accounting/src/codataccounting/models/shared/salesorder.py b/accounting/src/codataccounting/models/shared/salesorder.py index b09d6fced..dc122391a 100755 --- a/accounting/src/codataccounting/models/shared/salesorder.py +++ b/accounting/src/codataccounting/models/shared/salesorder.py @@ -5,9 +5,9 @@ from ..shared import addressesitems as shared_addressesitems from ..shared import customerref as shared_customerref from ..shared import metadata as shared_metadata -from ..shared import salesorderinvoicestatus_enum as shared_salesorderinvoicestatus_enum +from ..shared import salesorderinvoicestatus as shared_salesorderinvoicestatus from ..shared import salesorderlineitem as shared_salesorderlineitem -from ..shared import salesorderstatus_enum as shared_salesorderstatus_enum +from ..shared import salesorderstatus as shared_salesorderstatus from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -108,7 +108,7 @@ class SalesOrder: """ 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 sales order, unique for the company in the accounting platform.""" - invoicing_status: Optional[shared_salesorderinvoicestatus_enum.SalesOrderInvoiceStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoicingStatus'), 'exclude': lambda f: f is None }}) + invoicing_status: Optional[shared_salesorderinvoicestatus.SalesOrderInvoiceStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoicingStatus'), 'exclude': lambda f: f is None }}) r"""If the sales order is converted to an invoice, or will be in future, the invoicingStatus field indicates the current stage of the invoicing process.""" issue_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate'), '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: @@ -142,7 +142,7 @@ class SalesOrder: ship_to: Optional[SalesOrderShipTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('shipTo'), 'exclude': lambda f: f is None }}) r"""Delivery details for any goods that have been ordered.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_salesorderstatus_enum.SalesOrderStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_salesorderstatus.SalesOrderStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current state of the sales order.""" sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) r"""Total amount of the sales order, including discounts but excluding tax.""" diff --git a/accounting/src/codataccounting/models/shared/salesorderinvoicestatus_enum.py b/accounting/src/codataccounting/models/shared/salesorderinvoicestatus.py similarity index 90% rename from accounting/src/codataccounting/models/shared/salesorderinvoicestatus_enum.py rename to accounting/src/codataccounting/models/shared/salesorderinvoicestatus.py index ad0c136e0..72f39388e 100755 --- a/accounting/src/codataccounting/models/shared/salesorderinvoicestatus_enum.py +++ b/accounting/src/codataccounting/models/shared/salesorderinvoicestatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class SalesOrderInvoiceStatusEnum(str, Enum): +class SalesOrderInvoiceStatus(str, Enum): r"""If the sales order is converted to an invoice, or will be in future, the invoicingStatus field indicates the current stage of the invoicing process.""" UNKNOWN = 'Unknown' PARTIALLY_INVOICED = 'PartiallyInvoiced' diff --git a/accounting/src/codataccounting/models/shared/salesorderref.py b/accounting/src/codataccounting/models/shared/salesorderref.py new file mode 100755 index 000000000..f5cf63985 --- /dev/null +++ b/accounting/src/codataccounting/models/shared/salesorderref.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from codataccounting import utils +from dataclasses_json import Undefined, dataclass_json +from typing import Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class SalesOrderRef: + + data_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) + \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/salesorderstatus_enum.py b/accounting/src/codataccounting/models/shared/salesorderstatus.py similarity index 87% rename from accounting/src/codataccounting/models/shared/salesorderstatus_enum.py rename to accounting/src/codataccounting/models/shared/salesorderstatus.py index 12d8fcc13..21533ff01 100755 --- a/accounting/src/codataccounting/models/shared/salesorderstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/salesorderstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class SalesOrderStatusEnum(str, Enum): +class SalesOrderStatus(str, Enum): r"""Current state of the sales order.""" UNKNOWN = 'Unknown' DRAFT = 'Draft' diff --git a/accounting/src/codataccounting/models/shared/status_enum.py b/accounting/src/codataccounting/models/shared/status.py similarity index 89% rename from accounting/src/codataccounting/models/shared/status_enum.py rename to accounting/src/codataccounting/models/shared/status.py index 5619a5ee1..664c2610c 100755 --- a/accounting/src/codataccounting/models/shared/status_enum.py +++ b/accounting/src/codataccounting/models/shared/status.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class StatusEnum(str, Enum): +class Status(str, Enum): r"""Current state of the tracking category.""" UNKNOWN = 'Unknown' ACTIVE = 'Active' diff --git a/accounting/src/codataccounting/models/shared/supplier.py b/accounting/src/codataccounting/models/shared/supplier.py index ea23b2aeb..4ca5f2217 100755 --- a/accounting/src/codataccounting/models/shared/supplier.py +++ b/accounting/src/codataccounting/models/shared/supplier.py @@ -5,7 +5,7 @@ from ..shared import addressesitems as shared_addressesitems from ..shared import metadata as shared_metadata from ..shared import supplementaldata as shared_supplementaldata -from ..shared import supplierstatus_enum as shared_supplierstatus_enum +from ..shared import supplierstatus as shared_supplierstatus from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -21,7 +21,7 @@ class Supplier: From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). """ - status: shared_supplierstatus_enum.SupplierStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_supplierstatus.SupplierStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of the supplier.""" 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.""" diff --git a/accounting/src/codataccounting/models/shared/supplierstatus_enum.py b/accounting/src/codataccounting/models/shared/supplierstatus.py similarity index 86% rename from accounting/src/codataccounting/models/shared/supplierstatus_enum.py rename to accounting/src/codataccounting/models/shared/supplierstatus.py index 044c17964..b30be6a46 100755 --- a/accounting/src/codataccounting/models/shared/supplierstatus_enum.py +++ b/accounting/src/codataccounting/models/shared/supplierstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class SupplierStatusEnum(str, Enum): +class SupplierStatus(str, Enum): r"""Status of the supplier.""" UNKNOWN = 'Unknown' ACTIVE = 'Active' diff --git a/accounting/src/codataccounting/models/shared/taxrate.py b/accounting/src/codataccounting/models/shared/taxrate.py index b356bec70..b20a9377a 100755 --- a/accounting/src/codataccounting/models/shared/taxrate.py +++ b/accounting/src/codataccounting/models/shared/taxrate.py @@ -4,7 +4,7 @@ import dataclasses from ..shared import metadata as shared_metadata from ..shared import taxratecomponent as shared_taxratecomponent -from ..shared import taxratestatus_enum as shared_taxratestatus_enum +from ..shared import taxratestatus as shared_taxratestatus from ..shared import validdatatypelinks as shared_validdatatypelinks from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -48,7 +48,7 @@ class TaxRate: name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) r"""Codat-augmented name of the tax rate in the accounting platform.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_taxratestatus_enum.TaxRateStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_taxratestatus.TaxRateStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""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. diff --git a/accounting/src/codataccounting/models/shared/taxratestatus_enum.py b/accounting/src/codataccounting/models/shared/taxratestatus.py similarity index 93% rename from accounting/src/codataccounting/models/shared/taxratestatus_enum.py rename to accounting/src/codataccounting/models/shared/taxratestatus.py index c9c94c9c9..b4fbbaa40 100755 --- a/accounting/src/codataccounting/models/shared/taxratestatus_enum.py +++ b/accounting/src/codataccounting/models/shared/taxratestatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class TaxRateStatusEnum(str, Enum): +class TaxRateStatus(str, Enum): r"""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. diff --git a/accounting/src/codataccounting/models/shared/tracking.py b/accounting/src/codataccounting/models/shared/tracking.py index 570a7e03d..070b02a6a 100755 --- a/accounting/src/codataccounting/models/shared/tracking.py +++ b/accounting/src/codataccounting/models/shared/tracking.py @@ -10,7 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class TrackingInvoiceTo: +class TrackingRecordReference: r"""Links to the underlying record or data type. Found on: @@ -32,7 +32,7 @@ class TrackingInvoiceTo: class Tracking: record_refs: list[shared_invoiceto.InvoiceTo] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRefs') }}) - invoice_to: Optional[TrackingInvoiceTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoiceTo'), 'exclude': lambda f: f is None }}) + invoice_to: Optional[TrackingRecordReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoiceTo'), 'exclude': lambda f: f is None }}) r"""Links to the underlying record or data type. Found on: diff --git a/accounting/src/codataccounting/models/shared/trackingcategory.py b/accounting/src/codataccounting/models/shared/trackingcategory.py index 96ba6d2d7..5c58e5c4d 100755 --- a/accounting/src/codataccounting/models/shared/trackingcategory.py +++ b/accounting/src/codataccounting/models/shared/trackingcategory.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import status_enum as shared_status_enum +from ..shared import status as shared_status from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -49,6 +49,6 @@ class TrackingCategory: parent_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentId'), 'exclude': lambda f: f is None }}) r"""The identifier for this item's immediate parent""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_status_enum.StatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_status.Status] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current state of the tracking category.""" \ No newline at end of file diff --git a/accounting/src/codataccounting/models/shared/trackingcategorytree.py b/accounting/src/codataccounting/models/shared/trackingcategorytree.py index 182292756..aeb055261 100755 --- a/accounting/src/codataccounting/models/shared/trackingcategorytree.py +++ b/accounting/src/codataccounting/models/shared/trackingcategorytree.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import status_enum as shared_status_enum +from ..shared import status as shared_status from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -23,7 +23,7 @@ class TrackingCategoryTree: parent_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parentId'), 'exclude': lambda f: f is None }}) r"""The identifier for this item's immediate parent""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_status_enum.StatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[shared_status.Status] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current state of the tracking category.""" sub_categories: Optional[list[TrackingCategoryTree]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subCategories'), 'exclude': lambda f: f is None }}) r"""A collection of subcategories that are nested beneath this category.""" diff --git a/accounting/src/codataccounting/models/shared/transfer.py b/accounting/src/codataccounting/models/shared/transfer.py index 3ebee63f4..9d6f1e3cf 100755 --- a/accounting/src/codataccounting/models/shared/transfer.py +++ b/accounting/src/codataccounting/models/shared/transfer.py @@ -2,6 +2,7 @@ from __future__ import annotations import dataclasses +from ..shared import invoiceto as shared_invoiceto from ..shared import metadata as shared_metadata from ..shared import supplementaldata as shared_supplementaldata from ..shared import trackingcategoryref as shared_trackingcategoryref @@ -51,7 +52,7 @@ class Transfer: > 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. """ - deposited_record_refs: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('depositedRecordRefs'), 'exclude': lambda f: f is None }}) + deposited_record_refs: Optional[list[shared_invoiceto.InvoiceTo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('depositedRecordRefs'), 'exclude': lambda f: f is None }}) r"""List of selected transactions to associate with the transfer. Use this field to include transactions which are posted to the _undeposited funds_ (or other holding) account within the transfer.""" 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 of the transfer.""" diff --git a/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py b/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py index c21e0da07..37b916f80 100755 --- a/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py +++ b/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import bankaccount as shared_bankaccount -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdateBankAccountResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -87,7 +87,7 @@ class UpdateBankAccountResponse: * The currency and balance of the account. * The sort code and account number. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py b/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py index dd55dff95..16c466eb2 100755 --- a/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py +++ b/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import billcreditnote as shared_billcreditnote -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdateBillCreditNoteResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -87,7 +87,7 @@ class UpdateBillCreditNoteResponse: * 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. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updatebillresponse.py b/accounting/src/codataccounting/models/shared/updatebillresponse.py index 13ff9ee44..c94d27d3e 100755 --- a/accounting/src/codataccounting/models/shared/updatebillresponse.py +++ b/accounting/src/codataccounting/models/shared/updatebillresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import bill as shared_bill -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdateBillResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -90,7 +90,7 @@ class UpdateBillResponse: You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py b/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py index 36d4edbb8..457a85ac8 100755 --- a/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py +++ b/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import creditnote as shared_creditnote -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdateCreditNoteResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -83,7 +83,7 @@ class UpdateCreditNoteResponse: * Payment allocations against the payments type, in this case an invoice. * Which customers the credit notes have been issued to. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updatecustomerresponse.py b/accounting/src/codataccounting/models/shared/updatecustomerresponse.py index 918139279..a989ab85e 100755 --- a/accounting/src/codataccounting/models/shared/updatecustomerresponse.py +++ b/accounting/src/codataccounting/models/shared/updatecustomerresponse.py @@ -3,9 +3,9 @@ from __future__ import annotations import dataclasses from ..shared import customer as shared_customer -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdateCustomerResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -78,7 +78,7 @@ class UpdateCustomerResponse: Customers' data links to accounts receivable [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py b/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py index cb358eb65..1691df637 100755 --- a/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py +++ b/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import invoice as shared_invoice from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdateInvoiceResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -100,7 +100,7 @@ class UpdateInvoiceResponse: > > In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py b/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py index d75d4c133..193bb3864 100755 --- a/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py +++ b/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import purchaseorder as shared_purchaseorder from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import validation as shared_validation from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -44,7 +44,7 @@ class UpdatePurchaseOrderResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -78,7 +78,7 @@ class UpdatePurchaseOrderResponse: This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/models/shared/updatesupplierresponse.py b/accounting/src/codataccounting/models/shared/updatesupplierresponse.py index 2c1154628..9d99493d2 100755 --- a/accounting/src/codataccounting/models/shared/updatesupplierresponse.py +++ b/accounting/src/codataccounting/models/shared/updatesupplierresponse.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import datatype_enum as shared_datatype_enum +from ..shared import datatype as shared_datatype from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus_enum as shared_pushoperationstatus_enum +from ..shared import pushoperationstatus as shared_pushoperationstatus from ..shared import supplier as shared_supplier from ..shared import validation as shared_validation from codataccounting import utils @@ -44,7 +44,7 @@ class UpdateSupplierResponse: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus_enum.PushOperationStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) @@ -76,7 +76,7 @@ class UpdateSupplierResponse: From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). """ - data_type: Optional[shared_datatype_enum.DataTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) diff --git a/accounting/src/codataccounting/payment_methods.py b/accounting/src/codataccounting/payment_methods.py index 9f503f15a..8bfd829d2 100755 --- a/accounting/src/codataccounting/payment_methods.py +++ b/accounting/src/codataccounting/payment_methods.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get(self, request: operations.GetPaymentMethodRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPaymentMethodResponse: r"""Get payment method Gets the specified payment method for a given company. @@ -29,7 +30,9 @@ def get(self, request: operations.GetPaymentMethodRequest, retries: Optional[uti base_url = self._server_url url = utils.generate_url(operations.GetPaymentMethodRequest, base_url, '/companies/{companyId}/data/paymentMethods/{paymentMethodId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -40,7 +43,7 @@ def get(self, request: operations.GetPaymentMethodRequest, retries: Optional[uti def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -58,6 +61,7 @@ def do_request(): return res + def list(self, request: operations.ListPaymentMethodsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPaymentMethodsResponse: r"""List all payment methods Gets the payment methods for a given company. @@ -65,8 +69,10 @@ def list(self, request: operations.ListPaymentMethodsRequest, retries: Optional[ base_url = self._server_url url = utils.generate_url(operations.ListPaymentMethodsRequest, base_url, '/companies/{companyId}/data/paymentMethods', request) - + headers = {} query_params = utils.get_query_params(operations.ListPaymentMethodsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -77,7 +83,7 @@ def list(self, request: operations.ListPaymentMethodsRequest, retries: Optional[ def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/payments.py b/accounting/src/codataccounting/payments.py index 4b4975814..3c1a69467 100755 --- a/accounting/src/codataccounting/payments.py +++ b/accounting/src/codataccounting/payments.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreatePaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreatePaymentResponse: r"""Create payment Posts a new payment to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreatePaymentRequest, retries: Optional[uti > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. """ base_url = self._server_url url = utils.generate_url(operations.CreatePaymentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/payments', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "payment", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreatePaymentRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def get(self, request: operations.GetPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPaymentResponse: r"""Get payment Get payment @@ -76,7 +79,9 @@ def get(self, request: operations.GetPaymentRequest, retries: Optional[utils.Ret base_url = self._server_url url = utils.generate_url(operations.GetPaymentRequest, base_url, '/companies/{companyId}/data/payments/{paymentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def get(self, request: operations.GetPaymentRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,6 +110,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreatePaymentsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreatePaymentsModelResponse: r"""Get create payment model Get create payment model. Returns the expected data for the request payload. @@ -113,12 +119,14 @@ def get_create_model(self, request: operations.GetCreatePaymentsModelRequest, re > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating payments. """ base_url = self._server_url url = utils.generate_url(operations.GetCreatePaymentsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/payments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -129,7 +137,7 @@ def get_create_model(self, request: operations.GetCreatePaymentsModelRequest, re def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -147,6 +155,7 @@ def do_request(): return res + def list(self, request: operations.ListPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPaymentsResponse: r"""List payments Gets the latest payments for a company, with pagination @@ -154,8 +163,10 @@ def list(self, request: operations.ListPaymentsRequest, retries: Optional[utils. base_url = self._server_url url = utils.generate_url(operations.ListPaymentsRequest, base_url, '/companies/{companyId}/data/payments', request) - + headers = {} query_params = utils.get_query_params(operations.ListPaymentsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -166,7 +177,7 @@ def list(self, request: operations.ListPaymentsRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/purchase_orders.py b/accounting/src/codataccounting/purchase_orders.py index a1abe474c..df2405e5c 100755 --- a/accounting/src/codataccounting/purchase_orders.py +++ b/accounting/src/codataccounting/purchase_orders.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreatePurchaseOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreatePurchaseOrderResponse: r"""Create purchase order Posts a new purchase order to the accounting package for a given company. @@ -30,17 +31,18 @@ def create(self, request: operations.CreatePurchaseOrderRequest, retries: Option > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating purchase orders. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating purchase orders. """ base_url = self._server_url url = utils.generate_url(operations.CreatePurchaseOrderRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/purchaseOrders', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "purchase_order", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreatePurchaseOrderRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def get(self, request: operations.GetPurchaseOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPurchaseOrderResponse: r"""Get purchase order Get purchase order @@ -76,7 +79,9 @@ def get(self, request: operations.GetPurchaseOrderRequest, retries: Optional[uti base_url = self._server_url url = utils.generate_url(operations.GetPurchaseOrderRequest, base_url, '/companies/{companyId}/data/purchaseOrders/{purchaseOrderId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def get(self, request: operations.GetPurchaseOrderRequest, retries: Optional[uti def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -105,6 +110,7 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdatePurchaseOrdersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdatePurchaseOrdersModelResponse: r"""Get create/update purchase order model Get create/update purchase order model. Returns the expected data for the request payload. @@ -113,12 +119,14 @@ def get_create_update_model(self, request: operations.GetCreateUpdatePurchaseOrd > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating and updating purchase orders. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating and updating purchase orders. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdatePurchaseOrdersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/purchaseOrders', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -129,7 +137,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdatePurchaseOrd def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -147,6 +155,7 @@ def do_request(): return res + def list(self, request: operations.ListPurchaseOrdersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPurchaseOrdersResponse: r"""List purchase orders Get purchase orders @@ -154,8 +163,10 @@ def list(self, request: operations.ListPurchaseOrdersRequest, retries: Optional[ base_url = self._server_url url = utils.generate_url(operations.ListPurchaseOrdersRequest, base_url, '/companies/{companyId}/data/purchaseOrders', request) - + headers = {} query_params = utils.get_query_params(operations.ListPurchaseOrdersRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -166,7 +177,7 @@ def list(self, request: operations.ListPurchaseOrdersRequest, retries: Optional[ def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -184,6 +195,7 @@ def do_request(): return res + def update(self, request: operations.UpdatePurchaseOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdatePurchaseOrderResponse: r"""Update purchase order Posts an updated purchase order to the accounting package for a given company. @@ -192,17 +204,18 @@ def update(self, request: operations.UpdatePurchaseOrderRequest, retries: Option > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support updating purchase orders. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support updating purchase orders. """ base_url = self._server_url url = utils.generate_url(operations.UpdatePurchaseOrderRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/purchaseOrders/{purchaseOrderId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "purchase_order", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdatePurchaseOrderRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/reports.py b/accounting/src/codataccounting/reports.py index c980c4882..19ecf2879 100755 --- a/accounting/src/codataccounting/reports.py +++ b/accounting/src/codataccounting/reports.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get_aged_creditors_report(self, request: operations.GetAgedCreditorsReportRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAgedCreditorsReportResponse: r"""Aged creditors report Returns aged creditors report for company that shows the total balance owed by a business to its suppliers over time. @@ -29,8 +30,10 @@ def get_aged_creditors_report(self, request: operations.GetAgedCreditorsReportRe base_url = self._server_url url = utils.generate_url(operations.GetAgedCreditorsReportRequest, base_url, '/companies/{companyId}/reports/agedCreditor', request) - + headers = {} query_params = utils.get_query_params(operations.GetAgedCreditorsReportRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -41,7 +44,7 @@ def get_aged_creditors_report(self, request: operations.GetAgedCreditorsReportRe def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -59,6 +62,7 @@ def do_request(): return res + def get_aged_debtors_report(self, request: operations.GetAgedDebtorsReportRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAgedDebtorsReportResponse: r"""Aged debtors report Returns aged debtors report for company that shows the total outstanding balance due from customers to the business over time. @@ -66,8 +70,10 @@ def get_aged_debtors_report(self, request: operations.GetAgedDebtorsReportReques base_url = self._server_url url = utils.generate_url(operations.GetAgedDebtorsReportRequest, base_url, '/companies/{companyId}/reports/agedDebtor', request) - + headers = {} query_params = utils.get_query_params(operations.GetAgedDebtorsReportRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -78,7 +84,7 @@ def get_aged_debtors_report(self, request: operations.GetAgedDebtorsReportReques def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -96,6 +102,127 @@ def do_request(): return res + + def get_balance_sheet(self, request: operations.GetBalanceSheetRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBalanceSheetResponse: + r"""Get balance sheet + Gets the latest balance sheet for a company. + """ + base_url = self._server_url + + url = utils.generate_url(operations.GetBalanceSheetRequest, base_url, '/companies/{companyId}/data/financials/balanceSheet', request) + headers = {} + query_params = utils.get_query_params(operations.GetBalanceSheetRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' + + client = self._security_client + + retry_config = retries + if retry_config is None: + retry_config = utils.RetryConfig('backoff', True) + retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) + + + def do_request(): + return client.request('GET', url, params=query_params, headers=headers) + + http_res = utils.retry(do_request, utils.Retries(retry_config, [ + '408', + '429', + '5XX' + ])) + content_type = http_res.headers.get('Content-Type') + + res = operations.GetBalanceSheetResponse(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.BalanceSheet1]) + res.balance_sheet = out + + return res + + + def get_cash_flow_statement(self, request: operations.GetCashFlowStatementRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCashFlowStatementResponse: + r"""Get cash flow statement + Gets the latest cash flow statement for a company. + """ + base_url = self._server_url + + url = utils.generate_url(operations.GetCashFlowStatementRequest, base_url, '/companies/{companyId}/data/financials/cashFlowStatement', request) + headers = {} + query_params = utils.get_query_params(operations.GetCashFlowStatementRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' + + client = self._security_client + + retry_config = retries + if retry_config is None: + retry_config = utils.RetryConfig('backoff', True) + retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) + + + def do_request(): + return client.request('GET', url, params=query_params, headers=headers) + + http_res = utils.retry(do_request, utils.Retries(retry_config, [ + '408', + '429', + '5XX' + ])) + content_type = http_res.headers.get('Content-Type') + + res = operations.GetCashFlowStatementResponse(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.CashFlowStatement1]) + res.cash_flow_statement = out + + return res + + + def get_profit_and_loss(self, request: operations.GetProfitAndLossRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetProfitAndLossResponse: + r"""Get profit and loss + Gets the latest profit and loss for a company. + """ + base_url = self._server_url + + url = utils.generate_url(operations.GetProfitAndLossRequest, base_url, '/companies/{companyId}/data/financials/profitAndLoss', request) + headers = {} + query_params = utils.get_query_params(operations.GetProfitAndLossRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' + + client = self._security_client + + retry_config = retries + if retry_config is None: + retry_config = utils.RetryConfig('backoff', True) + retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000) + + + def do_request(): + return client.request('GET', url, params=query_params, headers=headers) + + http_res = utils.retry(do_request, utils.Retries(retry_config, [ + '408', + '429', + '5XX' + ])) + content_type = http_res.headers.get('Content-Type') + + res = operations.GetProfitAndLossResponse(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.ProfitAndLossReport1]) + res.profit_and_loss_report = out + + return res + + def is_aged_creditors_report_available(self, request: operations.IsAgedCreditorsReportAvailableRequest, retries: Optional[utils.RetryConfig] = None) -> operations.IsAgedCreditorsReportAvailableResponse: r"""Aged creditors report available Indicates whether the aged creditor report is available for the company. @@ -103,7 +230,9 @@ def is_aged_creditors_report_available(self, request: operations.IsAgedCreditors base_url = self._server_url url = utils.generate_url(operations.IsAgedCreditorsReportAvailableRequest, base_url, '/companies/{companyId}/reports/agedCreditor/available', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -114,7 +243,7 @@ def is_aged_creditors_report_available(self, request: operations.IsAgedCreditors def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -132,6 +261,7 @@ def do_request(): return res + def is_aged_debtor_report_available(self, request: operations.IsAgedDebtorReportAvailableRequest, retries: Optional[utils.RetryConfig] = None) -> operations.IsAgedDebtorReportAvailableResponse: r"""Aged debtors report available Indicates whether the aged debtor report is available for the company. @@ -139,7 +269,9 @@ def is_aged_debtor_report_available(self, request: operations.IsAgedDebtorReport base_url = self._server_url url = utils.generate_url(operations.IsAgedDebtorReportAvailableRequest, base_url, '/companies/{companyId}/reports/agedDebtor/available', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -150,7 +282,7 @@ def is_aged_debtor_report_available(self, request: operations.IsAgedDebtorReport def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/sales_orders.py b/accounting/src/codataccounting/sales_orders.py index 24952dfb8..e508d4799 100755 --- a/accounting/src/codataccounting/sales_orders.py +++ b/accounting/src/codataccounting/sales_orders.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get(self, request: operations.GetSalesOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSalesOrderResponse: r"""Get sales order Get sales order @@ -29,7 +30,9 @@ def get(self, request: operations.GetSalesOrderRequest, retries: Optional[utils. base_url = self._server_url url = utils.generate_url(operations.GetSalesOrderRequest, base_url, '/companies/{companyId}/data/salesOrders/{salesOrderId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -40,7 +43,7 @@ def get(self, request: operations.GetSalesOrderRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -58,6 +61,7 @@ def do_request(): return res + def list(self, request: operations.ListSalesOrdersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSalesOrdersResponse: r"""List sales orders Get sales orders @@ -65,8 +69,10 @@ def list(self, request: operations.ListSalesOrdersRequest, retries: Optional[uti base_url = self._server_url url = utils.generate_url(operations.ListSalesOrdersRequest, base_url, '/companies/{companyId}/data/salesOrders', request) - + headers = {} query_params = utils.get_query_params(operations.ListSalesOrdersRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -77,7 +83,7 @@ def list(self, request: operations.ListSalesOrdersRequest, retries: Optional[uti def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/sdk.py b/accounting/src/codataccounting/sdk.py index caffa19bc..3194bd0e7 100755 --- a/accounting/src/codataccounting/sdk.py +++ b/accounting/src/codataccounting/sdk.py @@ -14,7 +14,6 @@ from .customers import Customers from .direct_costs import DirectCosts from .direct_incomes import DirectIncomes -from .financials import Financials from .invoices import Invoices from .items import Items from .journal_entries import JournalEntries @@ -69,8 +68,6 @@ class CodatAccounting: r"""Direct costs""" direct_incomes: DirectIncomes r"""Direct incomes""" - financials: Financials - r"""Financials""" invoices: Invoices r"""Invoices""" items: Items @@ -102,8 +99,8 @@ class CodatAccounting: _security_client: requests_http.Session _server_url: str = SERVERS[0] _language: str = "python" - _sdk_version: str = "0.15.0" - _gen_version: str = "2.24.0" + _sdk_version: str = "0.16.0" + _gen_version: str = "2.32.0" def __init__(self, security: shared.Security = None, @@ -248,15 +245,6 @@ def _init_sdks(self): self._gen_version ) - self.financials = Financials( - self._client, - self._security_client, - self._server_url, - self._language, - self._sdk_version, - self._gen_version - ) - self.invoices = Invoices( self._client, self._security_client, diff --git a/accounting/src/codataccounting/suppliers.py b/accounting/src/codataccounting/suppliers.py index 310a806fa..de8eb685d 100755 --- a/accounting/src/codataccounting/suppliers.py +++ b/accounting/src/codataccounting/suppliers.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateSupplierResponse: r"""Create supplier Push suppliers @@ -35,12 +36,13 @@ def create(self, request: operations.CreateSupplierRequest, retries: Optional[ut base_url = self._server_url url = utils.generate_url(operations.CreateSupplierRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/suppliers', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "supplier", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateSupplierRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -69,6 +71,7 @@ def do_request(): return res + def download_attachment(self, request: operations.DownloadSupplierAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadSupplierAttachmentResponse: r"""Download supplier attachment Download supplier attachment @@ -76,7 +79,9 @@ def download_attachment(self, request: operations.DownloadSupplierAttachmentRequ base_url = self._server_url url = utils.generate_url(operations.DownloadSupplierAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}/download', request) - + headers = {} + headers['Accept'] = 'application/octet-stream' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -87,7 +92,7 @@ def download_attachment(self, request: operations.DownloadSupplierAttachmentRequ def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -104,6 +109,7 @@ def do_request(): return res + def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSupplierResponse: r"""Get supplier Gets a single supplier corresponding to the given ID. @@ -111,7 +117,9 @@ def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.Re base_url = self._server_url url = utils.generate_url(operations.GetSupplierRequest, base_url, '/companies/{companyId}/data/suppliers/{supplierId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -122,7 +130,7 @@ def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.Re def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -140,14 +148,17 @@ def do_request(): return res + def get_attachment(self, request: operations.GetSupplierAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSupplierAttachmentResponse: r"""Get supplier attachment - Get supplier attachment + Get supplier attachment. """ base_url = self._server_url url = utils.generate_url(operations.GetSupplierAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -158,7 +169,7 @@ def get_attachment(self, request: operations.GetSupplierAttachmentRequest, retri def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -176,6 +187,7 @@ def do_request(): return res + def get_create_update_model(self, request: operations.GetCreateUpdateSuppliersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateSuppliersModelResponse: r"""Get create/update supplier model Get create/update supplier model. Returns the expected data for the request payload. @@ -189,7 +201,9 @@ def get_create_update_model(self, request: operations.GetCreateUpdateSuppliersMo base_url = self._server_url url = utils.generate_url(operations.GetCreateUpdateSuppliersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/suppliers', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -200,7 +214,7 @@ def get_create_update_model(self, request: operations.GetCreateUpdateSuppliersMo def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -218,6 +232,7 @@ def do_request(): return res + def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSuppliersResponse: r"""List suppliers Gets the latest suppliers for a company, with pagination @@ -225,8 +240,10 @@ def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils base_url = self._server_url url = utils.generate_url(operations.ListSuppliersRequest, base_url, '/companies/{companyId}/data/suppliers', request) - + headers = {} query_params = utils.get_query_params(operations.ListSuppliersRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -237,7 +254,7 @@ def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -255,6 +272,7 @@ def do_request(): return res + def list_attachments(self, request: operations.ListSupplierAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSupplierAttachmentsResponse: r"""List supplier attachments Get supplier attachments @@ -262,7 +280,9 @@ def list_attachments(self, request: operations.ListSupplierAttachmentsRequest, r base_url = self._server_url url = utils.generate_url(operations.ListSupplierAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -273,7 +293,7 @@ def list_attachments(self, request: operations.ListSupplierAttachmentsRequest, r def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -291,6 +311,7 @@ def do_request(): return res + def update(self, request: operations.UpdateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateSupplierResponse: r"""Update supplier Update supplier @@ -299,17 +320,18 @@ def update(self, request: operations.UpdateSupplierRequest, retries: Optional[ut > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support updating suppliers. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support updating suppliers. """ base_url = self._server_url url = utils.generate_url(operations.UpdateSupplierRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "supplier", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateSupplierRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client diff --git a/accounting/src/codataccounting/tax_rates.py b/accounting/src/codataccounting/tax_rates.py index a17a8a38a..cb2ab7f58 100755 --- a/accounting/src/codataccounting/tax_rates.py +++ b/accounting/src/codataccounting/tax_rates.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get(self, request: operations.GetTaxRateRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetTaxRateResponse: r"""Get tax rate Gets the specified tax rate for a given company. @@ -29,7 +30,9 @@ def get(self, request: operations.GetTaxRateRequest, retries: Optional[utils.Ret base_url = self._server_url url = utils.generate_url(operations.GetTaxRateRequest, base_url, '/companies/{companyId}/data/taxRates/{taxRateId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -40,7 +43,7 @@ def get(self, request: operations.GetTaxRateRequest, retries: Optional[utils.Ret def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -58,6 +61,7 @@ def do_request(): return res + def list(self, request: operations.ListTaxRatesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListTaxRatesResponse: r"""List all tax rates Gets the latest tax rates for a given company. @@ -65,8 +69,10 @@ def list(self, request: operations.ListTaxRatesRequest, retries: Optional[utils. base_url = self._server_url url = utils.generate_url(operations.ListTaxRatesRequest, base_url, '/companies/{companyId}/data/taxRates', request) - + headers = {} query_params = utils.get_query_params(operations.ListTaxRatesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -77,7 +83,7 @@ def list(self, request: operations.ListTaxRatesRequest, retries: Optional[utils. def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/tracking_categories.py b/accounting/src/codataccounting/tracking_categories.py index 30e5bf390..37557c186 100755 --- a/accounting/src/codataccounting/tracking_categories.py +++ b/accounting/src/codataccounting/tracking_categories.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def get(self, request: operations.GetTrackingCategoryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetTrackingCategoryResponse: r"""Get tracking categories Gets the specified tracking categories for a given company. @@ -29,7 +30,9 @@ def get(self, request: operations.GetTrackingCategoryRequest, retries: Optional[ base_url = self._server_url url = utils.generate_url(operations.GetTrackingCategoryRequest, base_url, '/companies/{companyId}/data/trackingCategories/{trackingCategoryId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -40,7 +43,7 @@ def get(self, request: operations.GetTrackingCategoryRequest, retries: Optional[ def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -58,6 +61,7 @@ def do_request(): return res + def list(self, request: operations.ListTrackingCategoriesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListTrackingCategoriesResponse: r"""List tracking categories Gets the latest tracking categories for a given company. @@ -65,8 +69,10 @@ def list(self, request: operations.ListTrackingCategoriesRequest, retries: Optio base_url = self._server_url url = utils.generate_url(operations.ListTrackingCategoriesRequest, base_url, '/companies/{companyId}/data/trackingCategories', request) - + headers = {} query_params = utils.get_query_params(operations.ListTrackingCategoriesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -77,7 +83,7 @@ def list(self, request: operations.ListTrackingCategoriesRequest, retries: Optio def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/transfers.py b/accounting/src/codataccounting/transfers.py index 27875c3cc..1a7b9bd05 100755 --- a/accounting/src/codataccounting/transfers.py +++ b/accounting/src/codataccounting/transfers.py @@ -22,6 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http self._sdk_version = sdk_version self._gen_version = gen_version + def create(self, request: operations.CreateTransferRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateTransferResponse: r"""Create transfer Posts a new transfer to the accounting package for a given company. @@ -30,16 +31,17 @@ def create(self, request: operations.CreateTransferRequest, retries: Optional[ut > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. """ base_url = self._server_url url = utils.generate_url(operations.CreateTransferRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/transfers', request) - headers = {} req_content_type, data, form = utils.serialize_request_body(request, "transfer", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -68,6 +70,7 @@ def do_request(): return res + def get(self, request: operations.GetTransferRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetTransferResponse: r"""Get transfer Gets the specified transfer for a given company. @@ -75,7 +78,9 @@ def get(self, request: operations.GetTransferRequest, retries: Optional[utils.Re base_url = self._server_url url = utils.generate_url(operations.GetTransferRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/transfers/{transferId}', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -86,7 +91,7 @@ def get(self, request: operations.GetTransferRequest, retries: Optional[utils.Re def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -104,6 +109,7 @@ def do_request(): return res + def get_create_model(self, request: operations.GetCreateTransfersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateTransfersModelResponse: r"""Get create transfer model Get create transfer model. Returns the expected data for the request payload. @@ -112,12 +118,14 @@ def get_create_model(self, request: operations.GetCreateTransfersModelRequest, r > **Supported Integrations** > - > Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. + > Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating transfers. """ base_url = self._server_url url = utils.generate_url(operations.GetCreateTransfersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/transfers', request) - + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -128,7 +136,7 @@ def get_create_model(self, request: operations.GetCreateTransfersModelRequest, r def do_request(): - return client.request('GET', url) + return client.request('GET', url, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', @@ -146,6 +154,7 @@ def do_request(): return res + def list(self, request: operations.ListTransfersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListTransfersResponse: r"""List transfers Gets the transfers for a given company. @@ -153,8 +162,10 @@ def list(self, request: operations.ListTransfersRequest, retries: Optional[utils base_url = self._server_url url = utils.generate_url(operations.ListTransfersRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/transfers', request) - + headers = {} query_params = utils.get_query_params(operations.ListTransfersRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self._language} {self._sdk_version} {self._gen_version}' client = self._security_client @@ -165,7 +176,7 @@ def list(self, request: operations.ListTransfersRequest, retries: Optional[utils def do_request(): - return client.request('GET', url, params=query_params) + return client.request('GET', url, params=query_params, headers=headers) http_res = utils.retry(do_request, utils.Retries(retry_config, [ '408', diff --git a/accounting/src/codataccounting/utils/utils.py b/accounting/src/codataccounting/utils/utils.py index 63dce946b..6b39ecf74 100755 --- a/accounting/src/codataccounting/utils/utils.py +++ b/accounting/src/codataccounting/utils/utils.py @@ -112,7 +112,7 @@ 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 + client.client.headers[header_name] = value.lower().startswith('bearer ') and value or f'Bearer {value}' else: raise Exception('not supported') else: @@ -141,7 +141,8 @@ def _parse_basic_auth_scheme(client: SecurityClient, scheme: dataclass): client.client.headers['Authorization'] = f'Basic {base64.b64encode(data).decode()}' -def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> str: +def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass, + gbls: dict[str, dict[str, dict[str, Any]]] = None) -> str: path_param_fields: Tuple[Field, ...] = fields(clazz) for field in path_param_fields: request_metadata = field.metadata.get('request') @@ -233,7 +234,8 @@ def template_url(url_with_params: str, params: dict[str, str]) -> str: return url_with_params -def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> dict[str, list[str]]: +def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> dict[ + str, list[str]]: params: dict[str, list[str]] = {} param_fields: Tuple[Field, ...] = fields(clazz) @@ -267,8 +269,11 @@ def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[ params = params | _get_deep_object_query_params( metadata, f_name, value) elif style == 'form': - params = params | _get_form_query_params( - metadata, f_name, value) + params = params | _get_delimited_query_params( + metadata, f_name, value, ",") + elif style == 'pipeDelimited': + params = params | _get_delimited_query_params( + metadata, f_name, value, "|") else: raise Exception('not yet implemented') return params @@ -327,12 +332,15 @@ def _get_deep_object_query_params(metadata: dict, field_name: str, obj: any) -> if val is None: continue - if params.get(f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]') is None: - params[f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ + if params.get( + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]') is None: + params[ + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ ] params[ - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'].append(_val_to_string(val)) + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'].append( + _val_to_string(val)) else: params[ f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ @@ -368,25 +376,28 @@ def _get_query_param_field_name(obj_field: Field) -> str: return obj_param_metadata.get("field_name", obj_field.name) -def _get_form_query_params(metadata: dict, field_name: str, obj: any) -> dict[str, list[str]]: - return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name) +def _get_delimited_query_params(metadata: dict, field_name: str, obj: any, delimiter: str) -> dict[ + str, list[str]]: + return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name, delimiter) SERIALIZATION_METHOD_TO_CONTENT_TYPE = { - 'json': 'application/json', - 'form': 'application/x-www-form-urlencoded', + 'json': 'application/json', + 'form': 'application/x-www-form-urlencoded', 'multipart': 'multipart/form-data', - 'raw': 'application/octet-stream', - 'string': 'text/plain', + 'raw': 'application/octet-stream', + 'string': 'text/plain', } -def serialize_request_body(request: dataclass, request_field_name: str, serialization_method: str) -> Tuple[str, any, any]: +def serialize_request_body(request: dataclass, request_field_name: str, serialization_method: str) -> Tuple[ + str, any, any]: if request is None: return None, 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], request) + return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], + request) request_val = getattr(request, request_field_name) @@ -401,7 +412,8 @@ def serialize_request_body(request: dataclass, request_field_name: str, serializ if request_metadata is None: raise Exception('invalid request type') - return serialize_content_type(request_field_name, request_metadata.get('media_type', 'application/octet-stream'), request_val) + return serialize_content_type(request_field_name, request_metadata.get('media_type', 'application/octet-stream'), + request_val) def serialize_content_type(field_name: str, media_type: str, request: dataclass) -> Tuple[str, any, list[list[any]]]: @@ -474,7 +486,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 = [] @@ -514,7 +526,7 @@ def serialize_form_data(field_name: str, data: dataclass) -> dict[str, any]: else: if metadata.get('style', 'form') == 'form': form = form | _populate_form( - field_name, metadata.get('explode', True), val, _get_form_field_name) + field_name, metadata.get('explode', True), val, _get_form_field_name, ",") else: raise Exception( f'Invalid form style for field {field.name}') @@ -536,7 +548,8 @@ def _get_form_field_name(obj_field: Field) -> str: return obj_param_metadata.get("field_name", obj_field.name) -def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_func: Callable) -> dict[str, list[str]]: +def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_func: Callable, delimiter: str) -> \ + dict[str, list[str]]: params: dict[str, list[str]] = {} if obj is None: @@ -559,10 +572,10 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f params[obj_field_name] = [_val_to_string(val)] else: items.append( - f'{obj_field_name},{_val_to_string(val)}') + f'{obj_field_name}{delimiter}{_val_to_string(val)}') if len(items) > 0: - params[field_name] = [','.join(items)] + params[field_name] = [delimiter.join(items)] elif isinstance(obj, dict): items = [] for key, value in obj.items(): @@ -572,10 +585,10 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f if explode: params[key] = _val_to_string(value) else: - items.append(f'{key},{_val_to_string(value)}') + items.append(f'{key}{delimiter}{_val_to_string(value)}') if len(items) > 0: - params[field_name] = [','.join(items)] + params[field_name] = [delimiter.join(items)] elif isinstance(obj, list): items = [] @@ -591,7 +604,7 @@ 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] = [','.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)]