From 8aaafaa6b220102966f59b219155f2fee7d814b5 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 14 Dec 2023 14:09:03 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc prealpha, Speakeasy CLI 1.126.3 --- sync-for-expenses/.gitattributes | 0 sync-for-expenses/README.md | 315 ++++++++++++++---- sync-for-expenses/RELEASES.md | 12 +- sync-for-expenses/USAGE.md | 48 +-- .../models/{shared => errors}/errormessage.md | 2 + .../models/operations/createaccountrequest.md | 14 +- .../operations/createaccountresponse.md | 3 +- .../operations/createcompanyresponse.md | 3 +- .../operations/createconnectionrequest.md | 8 +- .../operations/createconnectionrequestbody.md | 0 .../operations/createconnectionresponse.md | 3 +- .../operations/createcustomerrequest.md | 0 .../operations/createcustomerresponse.md | 3 +- .../createexpensetransactionrequest.md | 0 .../createexpensetransactionresponse.md | 3 +- .../createpartnerexpenseconnectionrequest.md | 0 .../createpartnerexpenseconnectionresponse.md | 3 +- .../operations/createsupplierrequest.md | 0 .../operations/createsupplierresponse.md | 3 +- .../models/operations/deletecompanyrequest.md | 0 .../operations/deletecompanyresponse.md | 3 +- .../operations/deleteconnectionrequest.md | 0 .../operations/deleteconnectionresponse.md | 3 +- .../getcompanyconfigurationrequest.md | 0 .../getcompanyconfigurationresponse.md | 3 +- .../models/operations/getcompanyrequest.md | 0 .../models/operations/getcompanyresponse.md | 3 +- .../models/operations/getconnectionrequest.md | 0 .../operations/getconnectionresponse.md | 3 +- .../getcreatechartofaccountsmodelrequest.md | 0 .../getcreatechartofaccountsmodelresponse.md | 3 +- .../models/operations/getcustomerrequest.md | 0 .../models/operations/getcustomerresponse.md | 3 +- .../models/operations/getdatastatusrequest.md | 0 .../operations/getdatastatusresponse.md | 5 +- .../getlastsuccessfulsyncrequest.md | 0 .../getlastsuccessfulsyncresponse.md | 3 +- .../models/operations/getlatestsyncrequest.md | 0 .../operations/getlatestsyncresponse.md | 3 +- .../operations/getmappingoptionsrequest.md | 0 .../operations/getmappingoptionsresponse.md | 3 +- .../operations/getpulloperationrequest.md | 0 .../operations/getpulloperationresponse.md | 3 +- .../operations/getpushoperationrequest.md | 0 .../operations/getpushoperationresponse.md | 3 +- .../models/operations/getsupplierrequest.md | 0 .../models/operations/getsupplierresponse.md | 3 +- .../models/operations/getsyncbyidrequest.md | 0 .../models/operations/getsyncbyidresponse.md | 3 +- .../operations/getsynctransactionrequest.md | 0 .../operations/getsynctransactionresponse.md | 3 +- .../models/operations/initiatesyncrequest.md | 0 .../models/operations/initiatesyncresponse.md | 3 +- .../models/operations/listcompaniesrequest.md | 0 .../operations/listcompaniesresponse.md | 3 +- .../operations/listconnectionsrequest.md | 0 .../operations/listconnectionsresponse.md | 3 +- .../models/operations/listcustomersrequest.md | 0 .../operations/listcustomersresponse.md | 3 +- .../operations/listpulloperationsrequest.md | 0 .../operations/listpulloperationsresponse.md | 3 +- .../operations/listpushoperationsrequest.md | 0 .../operations/listpushoperationsresponse.md | 3 +- .../models/operations/listsuppliersrequest.md | 0 .../operations/listsuppliersresponse.md | 3 +- .../models/operations/listsyncsrequest.md | 0 .../models/operations/listsyncsresponse.md | 5 +- .../operations/listsynctransactionsrequest.md | 0 .../listsynctransactionsresponse.md | 3 +- .../operations/refreshalldatatypesrequest.md | 0 .../operations/refreshalldatatypesresponse.md | 3 +- .../operations/refreshdatatyperequest.md | 2 +- .../operations/refreshdatatyperesponse.md | 3 +- .../setcompanyconfigurationrequest.md | 0 .../setcompanyconfigurationresponse.md | 3 +- .../operations/unlinkconnectionrequest.md | 10 +- .../operations/unlinkconnectionresponse.md | 3 +- .../unlinkconnectionupdateconnection.md | 0 .../models/operations/updatecompanyrequest.md | 0 .../operations/updatecompanyresponse.md | 3 +- .../operations/updatecustomerrequest.md | 0 .../operations/updatecustomerresponse.md | 3 +- .../updateexpensetransactionrequest.md | 0 .../updateexpensetransactionresponse.md | 3 +- .../operations/updatesupplierrequest.md | 0 .../operations/updatesupplierresponse.md | 3 +- .../uploadexpenseattachmentrequest.md | 12 +- .../uploadexpenseattachmentresponse.md | 3 +- .../docs/models/shared/account.md | 40 +-- .../docs/models/shared/accountingaddress.md | 14 + .../models/shared/accountingaddresstype.md | 0 .../docs/models/shared/accountmappinginfo.md | 14 +- .../shared/accountmappinginfoaccounttype.md | 0 .../docs/models/shared/accountmetadata.md | 0 .../docs/models/shared/accountprototype.md | 19 ++ .../docs/models/shared/accountstatus.md | 0 .../docs/models/shared/accounttype.md | 0 .../shared/accountvaliddatatypelinks.md | 0 .../docs/models/shared/attachment.md | 0 .../docs/models/shared/attachmentupload.md | 8 + .../docs/models/shared/bankaccount.md | 0 ...ntreference.md => bankaccountreference.md} | 2 +- .../shared/clientratelimitreachedwebhook.md | 18 +- .../clientratelimitreachedwebhookdata.md | 2 +- .../shared/clientratelimitresetwebhook.md | 18 +- .../shared/clientratelimitresetwebhookdata.md | 2 +- .../codatfile.md} | 4 +- .../docs/models/shared/companies.md | 14 +- .../docs/models/shared/company.md | 6 +- .../models/shared/companyconfiguration.md | 10 +- .../docs/models/shared/companyrequestbody.md | 0 .../docs/models/shared/companysyncstatus.md | 2 +- .../docs/models/shared/connection.md | 10 +- .../docs/models/shared/connections.md | 14 +- .../docs/models/shared/contact.md | 8 +- .../docs/models/shared/contactphone.md | 9 - .../docs/models/shared/contactref.md | 8 +- .../models/shared/createaccountresponse.md | 32 +- .../models/shared/createcustomerresponse.md | 14 +- .../models/shared/createexpenserequest.md | 6 +- .../models/shared/createexpenseresponse.md | 0 .../models/shared/createsupplierresponse.md | 14 +- .../docs/models/shared/customer.md | 14 +- .../docs/models/shared/customerdetails.md | 0 .../docs/models/shared/customers.md | 14 +- .../docs/models/shared/customerstatus.md | 0 .../{syncstartedwebhookdata.md => data.md} | 6 +- .../docs/models/shared/dataconnectionerror.md | 2 +- .../models/shared/dataconnectionstatus.md | 0 .../docs/models/shared/datastatus.md | 4 +- .../docs/models/shared/datatype.md | 1 + .../{datastatusdatatypes.md => datatypes.md} | 3 +- .../docs/models/shared/expensetransaction.md | 25 +- .../models/shared/expensetransactionline.md | 15 +- .../models/shared/expensetransactiontype.md | 0 .../docs/models/shared/halref.md | 0 .../docs/models/shared/initiatesync.md | 0 .../docs/models/shared/integrationtype.md | 0 .../docs/models/shared/invoiceto.md | 9 + sync-for-expenses/docs/models/shared/items.md | 18 +- sync-for-expenses/docs/models/shared/links.md | 12 +- .../docs/models/shared/mappingoptions.md | 12 +- .../docs/models/shared/metadata.md | 0 sync-for-expenses/docs/models/shared/phone.md | 9 + .../docs/models/shared/phonenumbertype.md | 0 .../docs/models/shared/pulloperation.md | 11 +- .../docs/models/shared/pulloperations.md | 14 +- .../docs/models/shared/pushchangetype.md | 0 .../docs/models/shared/pushfieldvalidation.md | 0 .../docs/models/shared/pushoperation.md | 12 +- .../docs/models/shared/pushoperationchange.md | 10 +- .../docs/models/shared/pushoperationref.md | 8 +- .../docs/models/shared/pushoperations.md | 14 +- .../docs/models/shared/pushoperationstatus.md | 0 .../docs/models/shared/pushoption.md | 18 +- .../docs/models/shared/pushoptionchoice.md | 14 +- .../docs/models/shared/pushoptionproperty.md | 18 +- .../docs/models/shared/pushoptiontype.md | 0 .../docs/models/shared/pushvalidationinfo.md | 8 +- .../docs/models/shared/recordref.md | 0 .../docs/models/shared/schemadatatype.md | 52 +++ .../docs/models/shared/security.md | 0 ...{connectionsourcetype.md => sourcetype.md} | 2 +- .../{pulloperationstatus.md => status.md} | 2 +- .../docs/models/shared/supplementaldata.md | 0 .../docs/models/shared/supplier.md | 12 +- .../shared/supplieraccountingaddress.md | 14 - .../docs/models/shared/supplierdetails.md | 0 .../docs/models/shared/suppliers.md | 14 +- .../docs/models/shared/supplierstatus.md | 0 .../docs/models/shared/synccompletewebhook.md | 20 +- .../models/shared/synccompletewebhookdata.md | 4 +- .../docs/models/shared/syncfailedwebhook.md | 20 +- .../models/shared/syncfailedwebhookdata.md | 4 +- .../docs/models/shared/syncinitiated.md | 0 .../docs/models/shared/syncstartedwebhook.md | 20 +- .../docs/models/shared/taxratemappinginfo.md | 16 +- ...taxratemappinginfovalidtransactiontypes.md | 0 .../shared/trackingcategorymappinginfo.md | 2 +- .../docs/models/shared/trackingref.md | 9 + .../docs/models/shared/trackingrefdatatype.md | 11 + .../docs/models/shared/transaction.md | 4 +- .../docs/models/shared/transactions.md | 14 +- .../docs/models/shared/transactionstatus.md | 0 .../shared/{contactreftype.md => type.md} | 2 +- .../models/shared/updatecustomerresponse.md | 14 +- .../models/shared/updateexpenserequest.md | 22 +- ...pdateexpenserequestbankaccountreference.md | 0 .../models/shared/updateexpenseresponse.md | 0 .../models/shared/updatesupplierresponse.md | 14 +- .../docs/models/shared/validation.md | 8 +- .../docs/models/shared/validationitem.md | 0 .../docs/models/shared/validdatatypelinks.md | 50 +++ ...ctiontypes.md => validtransactiontypes.md} | 2 +- .../docs/models/utils/retryconfig.md | 0 .../clientratelimitreachedresponse.md | 2 +- .../webhooks/clientratelimitresetresponse.md | 2 +- .../models/webhooks/synccompleteresponse.md | 2 +- .../models/webhooks/syncfailedresponse.md | 2 +- .../models/webhooks/syncstartedresponse.md | 2 +- .../docs/sdks/accounts/README.md | 24 +- .../docs/sdks/codatsyncexpenses/README.md | 2 +- .../docs/sdks/companies/README.md | 25 ++ .../docs/sdks/configuration/README.md | 15 + .../docs/sdks/connections/README.md | 30 ++ .../docs/sdks/customers/README.md | 52 ++- .../docs/sdks/expenses/README.md | 85 ++++- .../docs/sdks/managedata/README.md | 29 +- .../docs/sdks/pushoperations/README.md | 10 + .../docs/sdks/suppliers/README.md | 42 ++- sync-for-expenses/docs/sdks/sync/README.md | 27 +- .../docs/sdks/transactionstatus/README.md | 10 + sync-for-expenses/files.gen | 250 +++++++------- sync-for-expenses/gen.yaml | 36 +- sync-for-expenses/pylintrc | 0 sync-for-expenses/setup.py | 4 +- .../src/codatsyncexpenses/__init__.py | 0 .../src/codatsyncexpenses/accounts.py | 36 +- .../src/codatsyncexpenses/companies.py | 91 +++-- .../src/codatsyncexpenses/configuration.py | 53 ++- .../src/codatsyncexpenses/connections.py | 106 ++++-- .../src/codatsyncexpenses/customers.py | 72 ++-- .../src/codatsyncexpenses/expenses.py | 97 ++++-- .../src/codatsyncexpenses/manage_data.py | 87 +++-- .../src/codatsyncexpenses/models/__init__.py | 3 +- .../models/errors/__init__.py | 6 +- .../models/{shared => errors}/errormessage.py | 6 +- .../models/errors/sdkerror.py | 0 .../models/operations/__init__.py | 2 +- .../models/operations/create_account.py | 13 +- .../models/operations/create_company.py | 9 +- .../models/operations/create_connection.py | 9 +- .../models/operations/create_customer.py | 11 +- .../operations/create_expense_transaction.py | 11 +- .../create_partner_expense_connection.py | 9 +- .../models/operations/create_supplier.py | 11 +- .../models/operations/delete_company.py | 8 +- .../models/operations/delete_connection.py | 8 +- .../models/operations/get_company.py | 9 +- .../operations/get_company_configuration.py | 9 +- .../models/operations/get_connection.py | 9 +- .../get_create_chartofaccounts_model.py | 9 +- .../models/operations/get_customer.py | 9 +- .../models/operations/get_data_status.py | 11 +- .../operations/get_last_successful_sync.py | 9 +- .../models/operations/get_latest_sync.py | 9 +- .../models/operations/get_mapping_options.py | 9 +- .../models/operations/get_pull_operation.py | 9 +- .../models/operations/get_push_operation.py | 9 +- .../models/operations/get_supplier.py | 9 +- .../models/operations/get_sync_by_id.py | 9 +- .../models/operations/get_sync_transaction.py | 9 +- .../models/operations/initiate_sync.py | 11 +- .../models/operations/list_companies.py | 9 +- .../models/operations/list_connections.py | 9 +- .../models/operations/list_customers.py | 9 +- .../models/operations/list_pull_operations.py | 9 +- .../models/operations/list_push_operations.py | 9 +- .../models/operations/list_suppliers.py | 9 +- .../operations/list_sync_transactions.py | 9 +- .../models/operations/list_syncs.py | 11 +- .../operations/refresh_all_data_types.py | 8 +- .../models/operations/refresh_data_type.py | 13 +- .../operations/set_company_configuration.py | 9 +- .../models/operations/unlink_connection.py | 11 +- .../models/operations/update_company.py | 11 +- .../models/operations/update_customer.py | 11 +- .../operations/update_expense_transaction.py | 11 +- .../models/operations/update_supplier.py | 11 +- .../operations/upload_expense_attachment.py | 20 +- .../models/shared/__init__.py | 9 +- .../models/shared/account.py | 36 +- .../models/shared/accountingaddresstype.py | 0 .../models/shared/accountmappinginfo.py | 4 +- .../models/shared/accountprototype.py | 111 ++++++ .../models/shared/accountstatus.py | 0 .../models/shared/accounttype.py | 0 .../models/shared/attachment.py | 0 .../models/shared/attachmentupload.py | 13 + .../models/shared/bankaccount.py | 0 .../shared/clientratelimitreachedwebhook.py | 4 +- .../clientratelimitreachedwebhookdata.py | 0 .../shared/clientratelimitresetwebhook.py | 4 +- .../shared/clientratelimitresetwebhookdata.py | 0 .../models/shared/codatfile.py | 12 + .../models/shared/companies.py | 8 +- .../models/shared/company.py | 4 +- .../models/shared/companyconfiguration.py | 12 +- .../models/shared/companyrequestbody.py | 0 .../models/shared/companysyncstatus.py | 0 .../models/shared/connection.py | 12 +- .../models/shared/connections.py | 8 +- .../models/shared/contact.py | 16 +- .../models/shared/contactref.py | 4 +- .../models/shared/createaccountresponse.py | 44 +-- .../models/shared/createcustomerresponse.py | 20 +- .../models/shared/createexpenserequest.py | 4 +- .../models/shared/createexpenseresponse.py | 0 .../models/shared/createsupplierresponse.py | 20 +- .../models/shared/customer.py | 41 ++- .../models/shared/customerdetails.py | 0 .../models/shared/customers.py | 8 +- .../models/shared/customerstatus.py | 0 .../models/shared/dataconnectionerror.py | 0 .../models/shared/dataconnectionstatus.py | 0 .../models/shared/datastatus.py | 5 +- .../models/shared/datatype.py | 1 + .../models/shared/expensetransaction.py | 21 +- .../models/shared/expensetransactionline.py | 12 +- .../codatsyncexpenses/models/shared/halref.py | 0 .../models/shared/initiatesync.py | 0 .../models/shared/integrationtype.py | 0 .../models/shared/invoiceto.py | 11 + .../codatsyncexpenses/models/shared/items.py | 4 +- .../codatsyncexpenses/models/shared/links.py | 10 +- .../models/shared/mappingoptions.py | 12 +- .../models/shared/metadata.py | 0 .../models/shared/phonenumbertype.py | 0 .../models/shared/pulloperation.py | 13 +- .../models/shared/pulloperations.py | 8 +- .../models/shared/pushchangetype.py | 0 .../models/shared/pushfieldvalidation.py | 0 .../models/shared/pushoperation.py | 16 +- .../models/shared/pushoperationchange.py | 8 +- .../models/shared/pushoperationref.py | 4 +- .../models/shared/pushoperations.py | 8 +- .../models/shared/pushoperationstatus.py | 0 .../models/shared/pushoption.py | 16 +- .../models/shared/pushoptionchoice.py | 4 +- .../models/shared/pushoptionproperty.py | 12 +- .../models/shared/pushoptiontype.py | 0 .../models/shared/pushvalidationinfo.py | 6 +- .../models/shared/recordref.py | 0 .../models/shared/schema_datatype.py | 50 +++ .../models/shared/security.py | 0 .../models/shared/supplementaldata.py | 0 .../models/shared/supplier.py | 37 +- .../models/shared/supplierdetails.py | 0 .../models/shared/suppliers.py | 8 +- .../models/shared/supplierstatus.py | 0 .../models/shared/synccompletewebhook.py | 4 +- .../models/shared/synccompletewebhookdata.py | 0 .../models/shared/syncfailedwebhook.py | 4 +- .../models/shared/syncfailedwebhookdata.py | 0 .../models/shared/syncinitiated.py | 0 .../models/shared/syncstartedwebhook.py | 4 +- .../models/shared/taxratemappinginfo.py | 0 .../shared/trackingcategorymappinginfo.py | 0 .../models/shared/trackingref.py | 24 ++ .../models/shared/transaction.py | 8 +- .../models/shared/transactions.py | 8 +- .../models/shared/transactionstatus.py | 0 .../models/shared/updatecustomerresponse.py | 20 +- .../models/shared/updateexpenserequest.py | 15 +- .../models/shared/updateexpenseresponse.py | 0 .../models/shared/updatesupplierresponse.py | 20 +- .../models/shared/validation.py | 6 +- .../models/shared/validationitem.py | 0 .../models/webhooks/__init__.py | 0 .../webhooks/client_rate_limit_reached.py | 5 +- .../webhooks/client_rate_limit_reset.py | 5 +- .../models/webhooks/sync_complete.py | 5 +- .../models/webhooks/sync_failed.py | 5 +- .../models/webhooks/sync_started.py | 5 +- .../src/codatsyncexpenses/push_operations.py | 34 +- .../src/codatsyncexpenses/sdk.py | 38 +-- .../src/codatsyncexpenses/sdkconfiguration.py | 11 +- .../src/codatsyncexpenses/suppliers.py | 72 ++-- .../src/codatsyncexpenses/sync.py | 89 +++-- .../codatsyncexpenses/transaction_status.py | 34 +- .../src/codatsyncexpenses/utils/__init__.py | 0 .../src/codatsyncexpenses/utils/retries.py | 0 .../src/codatsyncexpenses/utils/utils.py | 54 ++- sync-for-expenses/tests/helpers.py | 61 ++++ 374 files changed, 2657 insertions(+), 1592 deletions(-) mode change 100755 => 100644 sync-for-expenses/.gitattributes mode change 100755 => 100644 sync-for-expenses/USAGE.md rename sync-for-expenses/docs/models/{shared => errors}/errormessage.md (99%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createaccountrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createaccountresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createcompanyresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createconnectionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createconnectionrequestbody.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createconnectionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createcustomerrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createcustomerresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createexpensetransactionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createsupplierrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/createsupplierresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/deletecompanyrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/deletecompanyresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/deleteconnectionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/deleteconnectionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcompanyconfigurationrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcompanyconfigurationresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcompanyrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcompanyresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getconnectionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getconnectionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcustomerrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getcustomerresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getdatastatusrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getdatastatusresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getlastsuccessfulsyncrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getlastsuccessfulsyncresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getlatestsyncrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getlatestsyncresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getmappingoptionsrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getmappingoptionsresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getpulloperationrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getpulloperationresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getpushoperationrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getpushoperationresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getsupplierrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getsupplierresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getsyncbyidrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getsyncbyidresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getsynctransactionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/getsynctransactionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/initiatesyncrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/initiatesyncresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listcompaniesrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listcompaniesresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listconnectionsrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listconnectionsresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listcustomersrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listcustomersresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listpulloperationsrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listpulloperationsresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listpushoperationsrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listpushoperationsresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listsuppliersrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listsuppliersresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listsyncsrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listsyncsresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listsynctransactionsrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/refreshalldatatypesrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/refreshdatatyperequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/setcompanyconfigurationrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/unlinkconnectionupdateconnection.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updatecompanyrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updatecompanyresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updatecustomerrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updatecustomerresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updateexpensetransactionrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updatesupplierrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/updatesupplierresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/account.md create mode 100644 sync-for-expenses/docs/models/shared/accountingaddress.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accountingaddresstype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accountmappinginfo.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accountmappinginfoaccounttype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accountmetadata.md create mode 100644 sync-for-expenses/docs/models/shared/accountprototype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accountstatus.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accounttype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/accountvaliddatatypelinks.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/attachment.md create mode 100644 sync-for-expenses/docs/models/shared/attachmentupload.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/bankaccount.md rename sync-for-expenses/docs/models/shared/{expensetransactionbankaccountreference.md => bankaccountreference.md} (93%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/shared/clientratelimitreachedwebhook.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/clientratelimitreachedwebhookdata.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/clientratelimitresetwebhook.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/clientratelimitresetwebhookdata.md rename sync-for-expenses/docs/models/{operations/uploadexpenseattachmentrequestbody.md => shared/codatfile.md} (74%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/shared/companies.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/company.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/companyconfiguration.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/companyrequestbody.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/companysyncstatus.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/connection.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/connections.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/contact.md delete mode 100755 sync-for-expenses/docs/models/shared/contactphone.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/contactref.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/createaccountresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/createcustomerresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/createexpenserequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/createexpenseresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/createsupplierresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/customer.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/customerdetails.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/customers.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/customerstatus.md rename sync-for-expenses/docs/models/shared/{syncstartedwebhookdata.md => data.md} (99%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/shared/dataconnectionerror.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/dataconnectionstatus.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/datastatus.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/datatype.md rename sync-for-expenses/docs/models/shared/{datastatusdatatypes.md => datatypes.md} (97%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/shared/expensetransaction.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/expensetransactionline.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/expensetransactiontype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/halref.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/initiatesync.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/integrationtype.md create mode 100644 sync-for-expenses/docs/models/shared/invoiceto.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/items.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/links.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/mappingoptions.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/metadata.md create mode 100644 sync-for-expenses/docs/models/shared/phone.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/phonenumbertype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pulloperation.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pulloperations.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushchangetype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushfieldvalidation.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoperation.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoperationchange.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoperationref.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoperations.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoperationstatus.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoption.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoptionchoice.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoptionproperty.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushoptiontype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/pushvalidationinfo.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/recordref.md create mode 100644 sync-for-expenses/docs/models/shared/schemadatatype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/security.md rename sync-for-expenses/docs/models/shared/{connectionsourcetype.md => sourcetype.md} (92%) mode change 100755 => 100644 rename sync-for-expenses/docs/models/shared/{pulloperationstatus.md => status.md} (98%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/shared/supplementaldata.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/supplier.md delete mode 100755 sync-for-expenses/docs/models/shared/supplieraccountingaddress.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/supplierdetails.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/suppliers.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/supplierstatus.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/synccompletewebhook.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/synccompletewebhookdata.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/syncfailedwebhook.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/syncfailedwebhookdata.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/syncinitiated.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/syncstartedwebhook.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/taxratemappinginfo.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/taxratemappinginfovalidtransactiontypes.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/trackingcategorymappinginfo.md create mode 100644 sync-for-expenses/docs/models/shared/trackingref.md create mode 100644 sync-for-expenses/docs/models/shared/trackingrefdatatype.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/transaction.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/transactions.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/transactionstatus.md rename sync-for-expenses/docs/models/shared/{contactreftype.md => type.md} (87%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/shared/updatecustomerresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/updateexpenserequest.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/updateexpenserequestbankaccountreference.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/updateexpenseresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/updatesupplierresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/validation.md mode change 100755 => 100644 sync-for-expenses/docs/models/shared/validationitem.md create mode 100644 sync-for-expenses/docs/models/shared/validdatatypelinks.md rename sync-for-expenses/docs/models/shared/{accountmappinginfovalidtransactiontypes.md => validtransactiontypes.md} (90%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/docs/models/utils/retryconfig.md mode change 100755 => 100644 sync-for-expenses/docs/models/webhooks/clientratelimitreachedresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/webhooks/clientratelimitresetresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/webhooks/synccompleteresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/webhooks/syncfailedresponse.md mode change 100755 => 100644 sync-for-expenses/docs/models/webhooks/syncstartedresponse.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/accounts/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/codatsyncexpenses/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/companies/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/configuration/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/connections/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/customers/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/expenses/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/managedata/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/pushoperations/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/suppliers/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/sync/README.md mode change 100755 => 100644 sync-for-expenses/docs/sdks/transactionstatus/README.md mode change 100755 => 100644 sync-for-expenses/pylintrc mode change 100755 => 100644 sync-for-expenses/setup.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/__init__.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/accounts.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/companies.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/configuration.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/connections.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/customers.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/expenses.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/manage_data.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/__init__.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/errors/__init__.py rename sync-for-expenses/src/codatsyncexpenses/models/{shared => errors}/errormessage.py (92%) mode change 100755 => 100644 mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/errors/sdkerror.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_company_configuration.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_last_successful_sync.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_latest_sync.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_mapping_options.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_by_id.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/list_syncs.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/account.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/accountingaddresstype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/accountmappinginfo.py create mode 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/accountprototype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/accountstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/accounttype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/attachment.py create mode 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/attachmentupload.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/bankaccount.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhook.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhookdata.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhook.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhookdata.py create mode 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/codatfile.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/company.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/companyconfiguration.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/companyrequestbody.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/companysyncstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/contact.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/contactref.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenserequest.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenseresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/customerdetails.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/customerstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnectionerror.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnectionstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransactionline.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/halref.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/initiatesync.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/integrationtype.py create mode 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/invoiceto.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/items.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/links.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/mappingoptions.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/metadata.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/phonenumbertype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushchangetype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushfieldvalidation.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoption.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionchoice.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionproperty.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptiontype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/pushvalidationinfo.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/recordref.py create mode 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/schema_datatype.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/security.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/supplementaldata.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/supplierdetails.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/supplierstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhook.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhookdata.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhook.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhookdata.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/syncinitiated.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/syncstartedwebhook.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/taxratemappinginfo.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py create mode 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/trackingref.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/transactionstatus.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenseresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/shared/validationitem.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/webhooks/__init__.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reached.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reset.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_complete.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_failed.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_started.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/push_operations.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/sdk.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/suppliers.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/sync.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/transaction_status.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/utils/__init__.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/utils/retries.py mode change 100755 => 100644 sync-for-expenses/src/codatsyncexpenses/utils/utils.py create mode 100644 sync-for-expenses/tests/helpers.py diff --git a/sync-for-expenses/.gitattributes b/sync-for-expenses/.gitattributes old mode 100755 new mode 100644 diff --git a/sync-for-expenses/README.md b/sync-for-expenses/README.md index a191492f8..845a37560 100755 --- a/sync-for-expenses/README.md +++ b/sync-for-expenses/README.md @@ -4,20 +4,23 @@ Embedded accounting integrations for corporate card providers. - + ## SDK Installation ```bash pip install codat-sync-for-expenses ``` - + ## Example Usage - + +## SDK Example Usage + +### Example + ```python import codatsyncexpenses -from codatsyncexpenses.models import operations, shared -from decimal import Decimal +from codatsyncexpenses.models import shared s = codatsyncexpenses.CodatSyncExpenses( security=shared.Security( @@ -25,57 +28,22 @@ s = codatsyncexpenses.CodatSyncExpenses( ), ) -req = operations.CreateAccountRequest( - account=shared.Account( - currency='USD', - current_balance=Decimal('0'), - description='Invoices the business has issued but has not yet collected payment on.', - fully_qualified_category='Asset.Current', - fully_qualified_name='Cash On Hand', - id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e', - metadata=shared.AccountMetadata(), - modified_date='2022-10-23T00:00:00.000Z', - name='Accounts Receivable', - nominal_code='610', - source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.AccountStatus.ACTIVE, - supplemental_data=shared.SupplementalData( - content={ - "Money": { - "blue": 'shred', - }, - }, - ), - type=shared.AccountType.ASSET, - valid_datatype_links=[ - shared.AccountValidDataTypeLinks( - links=[ - 'abnormally', - ], - ), - ], - ), - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', ) -res = s.accounts.create(req) +res = s.companies.create(req) -if res.create_account_response is not None: +if res.company is not None: # handle response pass ``` - + - + ## Available Resources and Operations - -### [accounts](docs/sdks/accounts/README.md) - -* [create](docs/sdks/accounts/README.md#create) - Create account -* [get_create_model](docs/sdks/accounts/README.md#get_create_model) - Get create account model - ### [companies](docs/sdks/companies/README.md) * [create](docs/sdks/companies/README.md#create) - Create company @@ -84,12 +52,6 @@ if res.create_account_response is not None: * [list](docs/sdks/companies/README.md#list) - List companies * [update](docs/sdks/companies/README.md#update) - Update company -### [configuration](docs/sdks/configuration/README.md) - -* [get](docs/sdks/configuration/README.md#get) - Get company configuration -* [get_mapping_options](docs/sdks/configuration/README.md#get_mapping_options) - Mapping options -* [set](docs/sdks/configuration/README.md#set) - Set company configuration - ### [connections](docs/sdks/connections/README.md) * [create](docs/sdks/connections/README.md#create) - Create connection @@ -99,6 +61,11 @@ if res.create_account_response is not None: * [list](docs/sdks/connections/README.md#list) - List connections * [unlink](docs/sdks/connections/README.md#unlink) - Unlink connection +### [accounts](docs/sdks/accounts/README.md) + +* [create](docs/sdks/accounts/README.md#create) - Create account +* [get_create_model](docs/sdks/accounts/README.md#get_create_model) - Get create account model + ### [customers](docs/sdks/customers/README.md) * [create](docs/sdks/customers/README.md#create) - Create customer @@ -106,11 +73,12 @@ if res.create_account_response is not None: * [list](docs/sdks/customers/README.md#list) - List customers * [update](docs/sdks/customers/README.md#update) - Update customer -### [expenses](docs/sdks/expenses/README.md) +### [suppliers](docs/sdks/suppliers/README.md) -* [create](docs/sdks/expenses/README.md#create) - Create expense transaction -* [update](docs/sdks/expenses/README.md#update) - Update expense-transactions -* [upload_attachment](docs/sdks/expenses/README.md#upload_attachment) - Upload attachment +* [create](docs/sdks/suppliers/README.md#create) - Create supplier +* [get](docs/sdks/suppliers/README.md#get) - Get supplier +* [list](docs/sdks/suppliers/README.md#list) - List suppliers +* [update](docs/sdks/suppliers/README.md#update) - Update supplier ### [manage_data](docs/sdks/managedata/README.md) @@ -125,12 +93,17 @@ if res.create_account_response is not None: * [get](docs/sdks/pushoperations/README.md#get) - Get push operation * [list](docs/sdks/pushoperations/README.md#list) - List push operations -### [suppliers](docs/sdks/suppliers/README.md) +### [configuration](docs/sdks/configuration/README.md) -* [create](docs/sdks/suppliers/README.md#create) - Create supplier -* [get](docs/sdks/suppliers/README.md#get) - Get supplier -* [list](docs/sdks/suppliers/README.md#list) - List suppliers -* [update](docs/sdks/suppliers/README.md#update) - Update supplier +* [get](docs/sdks/configuration/README.md#get) - Get company configuration +* [get_mapping_options](docs/sdks/configuration/README.md#get_mapping_options) - Mapping options +* [set](docs/sdks/configuration/README.md#set) - Set company configuration + +### [expenses](docs/sdks/expenses/README.md) + +* [create](docs/sdks/expenses/README.md#create) - Create expense transaction +* [update](docs/sdks/expenses/README.md#update) - Update expense-transactions +* [upload_attachment](docs/sdks/expenses/README.md#upload_attachment) - Upload attachment ### [sync](docs/sdks/sync/README.md) @@ -144,25 +117,223 @@ if res.create_account_response is not None: * [get](docs/sdks/transactionstatus/README.md#get) - Get sync transaction * [list](docs/sdks/transactionstatus/README.md#list) - List sync transactions - + + + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: +```python +import codatsyncexpenses +from codatsyncexpenses.models import shared +from codatsyncexpenses.utils import BackoffStrategy, RetryConfig + +s = codatsyncexpenses.CodatSyncExpenses( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req, + RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)) + +if res.company is not None: + # handle response + pass +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: +```python +import codatsyncexpenses +from codatsyncexpenses.models import shared +from codatsyncexpenses.utils import BackoffStrategy, RetryConfig + +s = codatsyncexpenses.CodatSyncExpenses( + retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False) + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | + +### Example + +```python +import codatsyncexpenses +from codatsyncexpenses.models import shared + +s = codatsyncexpenses.CodatSyncExpenses( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = None +try: + res = s.companies.create(req) +except errors.ErrorMessage as e: + print(e) # handle exception + raise(e) +except errors.SDKError as e: + print(e) # handle exception + raise(e) + +if res.company is not None: + # handle response + pass +``` + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `https://api.codat.io` | None | + +#### Example + +```python +import codatsyncexpenses +from codatsyncexpenses.models import shared + +s = codatsyncexpenses.CodatSyncExpenses( + server_idx=0, + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + + +### Override Server URL Per-Client - +The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: +```python +import codatsyncexpenses +from codatsyncexpenses.models import shared + +s = codatsyncexpenses.CodatSyncExpenses( + server_url="https://api.codat.io", + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) - +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) +res = s.companies.create(req) +if res.company is not None: + # handle response + pass +``` + - -# Pagination + +## Custom HTTP Client -Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the -returned response object will have a `Next` method that can be called to pull down the next group of results. If the -return value of `Next` is `None`, then there are no more pages to be fetched. +The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object. -Here's an example of one such pagination call: +For example, you could specify a header for every request that this sdk makes as follows: +```python +import codatsyncexpenses +import requests +http_client = requests.Session() +http_client.headers.update({'x-custom-header': 'someValue'}) +s = codatsyncexpenses.CodatSyncExpenses(client: http_client) +``` + - + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ------------- | ------------- | ------------- | +| `auth_header` | apiKey | API key | + +You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example: +```python +import codatsyncexpenses +from codatsyncexpenses.models import shared + +s = codatsyncexpenses.CodatSyncExpenses( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + diff --git a/sync-for-expenses/RELEASES.md b/sync-for-expenses/RELEASES.md index d7e2b207e..7056ace46 100644 --- a/sync-for-expenses/RELEASES.md +++ b/sync-for-expenses/RELEASES.md @@ -676,4 +676,14 @@ Based on: ### Generated - [python v4.0.0] sync-for-expenses ### Releases -- [PyPI v4.0.0] https://pypi.org/project/codat-sync-for-expenses/4.0.0 - sync-for-expenses \ No newline at end of file +- [PyPI v4.0.0] https://pypi.org/project/codat-sync-for-expenses/4.0.0 - sync-for-expenses + +## 2023-12-14 14:08:44 +### Changes +Based on: +- OpenAPI Doc prealpha https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Expenses.yaml +- Speakeasy CLI 1.126.3 (2.214.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v5.0.0] sync-for-expenses +### Releases +- [PyPI v5.0.0] https://pypi.org/project/codat-sync-for-expenses/5.0.0 - sync-for-expenses \ No newline at end of file diff --git a/sync-for-expenses/USAGE.md b/sync-for-expenses/USAGE.md old mode 100755 new mode 100644 index 252bf4705..eb6348a92 --- a/sync-for-expenses/USAGE.md +++ b/sync-for-expenses/USAGE.md @@ -1,10 +1,7 @@ - - - + ```python import codatsyncexpenses -from codatsyncexpenses.models import operations, shared -from decimal import Decimal +from codatsyncexpenses.models import shared s = codatsyncexpenses.CodatSyncExpenses( security=shared.Security( @@ -12,44 +9,15 @@ s = codatsyncexpenses.CodatSyncExpenses( ), ) -req = operations.CreateAccountRequest( - account=shared.Account( - currency='USD', - current_balance=Decimal('0'), - description='Invoices the business has issued but has not yet collected payment on.', - fully_qualified_category='Asset.Current', - fully_qualified_name='Cash On Hand', - id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e', - metadata=shared.AccountMetadata(), - modified_date='2022-10-23T00:00:00.000Z', - name='Accounts Receivable', - nominal_code='610', - source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.AccountStatus.ACTIVE, - supplemental_data=shared.SupplementalData( - content={ - "Money": { - "blue": 'shred', - }, - }, - ), - type=shared.AccountType.ASSET, - valid_datatype_links=[ - shared.AccountValidDataTypeLinks( - links=[ - 'abnormally', - ], - ), - ], - ), - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', ) -res = s.accounts.create(req) +res = s.companies.create(req) -if res.create_account_response is not None: +if res.company is not None: # handle response pass ``` - \ No newline at end of file + \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/errormessage.md b/sync-for-expenses/docs/models/errors/errormessage.md old mode 100755 new mode 100644 similarity index 99% rename from sync-for-expenses/docs/models/shared/errormessage.md rename to sync-for-expenses/docs/models/errors/errormessage.md index 2d1289c0d..a2631711d --- a/sync-for-expenses/docs/models/shared/errormessage.md +++ b/sync-for-expenses/docs/models/errors/errormessage.md @@ -1,5 +1,7 @@ # ErrorMessage +The request made is not valid. + ## Fields diff --git a/sync-for-expenses/docs/models/operations/createaccountrequest.md b/sync-for-expenses/docs/models/operations/createaccountrequest.md old mode 100755 new mode 100644 index 9bb2d8077..f8733acf4 --- a/sync-for-expenses/docs/models/operations/createaccountrequest.md +++ b/sync-for-expenses/docs/models/operations/createaccountrequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `account` | [Optional[shared.Account]](../../models/shared/account.md) | :heavy_minus_sign: | N/A | | -| `allow_sync_on_push_complete` | *Optional[bool]* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `account_prototype` | [Optional[shared.AccountPrototype]](../../models/shared/accountprototype.md) | :heavy_minus_sign: | N/A | | +| `allow_sync_on_push_complete` | *Optional[bool]* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createaccountresponse.md b/sync-for-expenses/docs/models/operations/createaccountresponse.md old mode 100755 new mode 100644 index a91d51ce3..c98c449ea --- a/sync-for-expenses/docs/models/operations/createaccountresponse.md +++ b/sync-for-expenses/docs/models/operations/createaccountresponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `create_account_response` | [Optional[shared.CreateAccountResponse]](../../models/shared/createaccountresponse.md) | :heavy_minus_sign: | Success | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createcompanyresponse.md b/sync-for-expenses/docs/models/operations/createcompanyresponse.md old mode 100755 new mode 100644 index b780d6bc9..509542849 --- a/sync-for-expenses/docs/models/operations/createcompanyresponse.md +++ b/sync-for-expenses/docs/models/operations/createcompanyresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createconnectionrequest.md b/sync-for-expenses/docs/models/operations/createconnectionrequest.md old mode 100755 new mode 100644 index b315a6d5e..0998495bf --- a/sync-for-expenses/docs/models/operations/createconnectionrequest.md +++ b/sync-for-expenses/docs/models/operations/createconnectionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `request_body` | [Optional[CreateConnectionRequestBody]](../../models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | -| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `request_body` | [Optional[operations.CreateConnectionRequestBody]](../../models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | +| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createconnectionrequestbody.md b/sync-for-expenses/docs/models/operations/createconnectionrequestbody.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/createconnectionresponse.md b/sync-for-expenses/docs/models/operations/createconnectionresponse.md old mode 100755 new mode 100644 index 6cf898dc4..4f38451fa --- a/sync-for-expenses/docs/models/operations/createconnectionresponse.md +++ b/sync-for-expenses/docs/models/operations/createconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createcustomerrequest.md b/sync-for-expenses/docs/models/operations/createcustomerrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/createcustomerresponse.md b/sync-for-expenses/docs/models/operations/createcustomerresponse.md old mode 100755 new mode 100644 index 2577803fe..d13700cba --- a/sync-for-expenses/docs/models/operations/createcustomerresponse.md +++ b/sync-for-expenses/docs/models/operations/createcustomerresponse.md @@ -7,6 +7,5 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `create_customer_response` | [Optional[shared.CreateCustomerResponse]](../../models/shared/createcustomerresponse.md) | :heavy_minus_sign: | Success | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createexpensetransactionrequest.md b/sync-for-expenses/docs/models/operations/createexpensetransactionrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md b/sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md old mode 100755 new mode 100644 index ea454810e..8f724ef84 --- a/sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md +++ b/sync-for-expenses/docs/models/operations/createexpensetransactionresponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `create_expense_response` | [Optional[shared.CreateExpenseResponse]](../../models/shared/createexpenseresponse.md) | :heavy_minus_sign: | OK | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionrequest.md b/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md b/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md old mode 100755 new mode 100644 index 795803141..8cc71b0a9 --- a/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md +++ b/sync-for-expenses/docs/models/operations/createpartnerexpenseconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/createsupplierrequest.md b/sync-for-expenses/docs/models/operations/createsupplierrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/createsupplierresponse.md b/sync-for-expenses/docs/models/operations/createsupplierresponse.md old mode 100755 new mode 100644 index f8620575a..62b86c271 --- a/sync-for-expenses/docs/models/operations/createsupplierresponse.md +++ b/sync-for-expenses/docs/models/operations/createsupplierresponse.md @@ -7,6 +7,5 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `create_supplier_response` | [Optional[shared.CreateSupplierResponse]](../../models/shared/createsupplierresponse.md) | :heavy_minus_sign: | Success | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/deletecompanyrequest.md b/sync-for-expenses/docs/models/operations/deletecompanyrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/deletecompanyresponse.md b/sync-for-expenses/docs/models/operations/deletecompanyresponse.md old mode 100755 new mode 100644 index f3f21c2cb..7dfc00111 --- a/sync-for-expenses/docs/models/operations/deletecompanyresponse.md +++ b/sync-for-expenses/docs/models/operations/deletecompanyresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/deleteconnectionrequest.md b/sync-for-expenses/docs/models/operations/deleteconnectionrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md b/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md old mode 100755 new mode 100644 index 30889c508..373abf82a --- a/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md +++ b/sync-for-expenses/docs/models/operations/deleteconnectionresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getcompanyconfigurationrequest.md b/sync-for-expenses/docs/models/operations/getcompanyconfigurationrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getcompanyconfigurationresponse.md b/sync-for-expenses/docs/models/operations/getcompanyconfigurationresponse.md old mode 100755 new mode 100644 index 47d32738c..3bee465b8 --- a/sync-for-expenses/docs/models/operations/getcompanyconfigurationresponse.md +++ b/sync-for-expenses/docs/models/operations/getcompanyconfigurationresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company_configuration` | [Optional[shared.CompanyConfiguration]](../../models/shared/companyconfiguration.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getcompanyrequest.md b/sync-for-expenses/docs/models/operations/getcompanyrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getcompanyresponse.md b/sync-for-expenses/docs/models/operations/getcompanyresponse.md old mode 100755 new mode 100644 index 2f82e6ca0..98fd19b23 --- a/sync-for-expenses/docs/models/operations/getcompanyresponse.md +++ b/sync-for-expenses/docs/models/operations/getcompanyresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getconnectionrequest.md b/sync-for-expenses/docs/models/operations/getconnectionrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getconnectionresponse.md b/sync-for-expenses/docs/models/operations/getconnectionresponse.md old mode 100755 new mode 100644 index c308aece1..4dd62a7a6 --- a/sync-for-expenses/docs/models/operations/getconnectionresponse.md +++ b/sync-for-expenses/docs/models/operations/getconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelrequest.md b/sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelresponse.md b/sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelresponse.md old mode 100755 new mode 100644 index fa5a05fa4..9ba81a42b --- a/sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelresponse.md +++ b/sync-for-expenses/docs/models/operations/getcreatechartofaccountsmodelresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getcustomerrequest.md b/sync-for-expenses/docs/models/operations/getcustomerrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getcustomerresponse.md b/sync-for-expenses/docs/models/operations/getcustomerresponse.md old mode 100755 new mode 100644 index e9c7abe95..e2d29bc72 --- a/sync-for-expenses/docs/models/operations/getcustomerresponse.md +++ b/sync-for-expenses/docs/models/operations/getcustomerresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `customer` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | Success | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getdatastatusrequest.md b/sync-for-expenses/docs/models/operations/getdatastatusrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getdatastatusresponse.md b/sync-for-expenses/docs/models/operations/getdatastatusresponse.md old mode 100755 new mode 100644 index 18bcc12b7..ecc77b87b --- a/sync-for-expenses/docs/models/operations/getdatastatusresponse.md +++ b/sync-for-expenses/docs/models/operations/getdatastatusresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `data_status_response` | Dict[str, [shared.DataStatus](../../models/shared/datastatus.md)] | :heavy_minus_sign: | OK | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `data_statuses` | Dict[str, [shared.DataStatus](../../models/shared/datastatus.md)] | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getlastsuccessfulsyncrequest.md b/sync-for-expenses/docs/models/operations/getlastsuccessfulsyncrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getlastsuccessfulsyncresponse.md b/sync-for-expenses/docs/models/operations/getlastsuccessfulsyncresponse.md old mode 100755 new mode 100644 index bccf3a7da..05e7bbc95 --- a/sync-for-expenses/docs/models/operations/getlastsuccessfulsyncresponse.md +++ b/sync-for-expenses/docs/models/operations/getlastsuccessfulsyncresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company_sync_status` | [Optional[shared.CompanySyncStatus]](../../models/shared/companysyncstatus.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getlatestsyncrequest.md b/sync-for-expenses/docs/models/operations/getlatestsyncrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getlatestsyncresponse.md b/sync-for-expenses/docs/models/operations/getlatestsyncresponse.md old mode 100755 new mode 100644 index bd4e2cd6c..14ad8ea02 --- a/sync-for-expenses/docs/models/operations/getlatestsyncresponse.md +++ b/sync-for-expenses/docs/models/operations/getlatestsyncresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company_sync_status` | [Optional[shared.CompanySyncStatus]](../../models/shared/companysyncstatus.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getmappingoptionsrequest.md b/sync-for-expenses/docs/models/operations/getmappingoptionsrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getmappingoptionsresponse.md b/sync-for-expenses/docs/models/operations/getmappingoptionsresponse.md old mode 100755 new mode 100644 index 2da443b6c..872806635 --- a/sync-for-expenses/docs/models/operations/getmappingoptionsresponse.md +++ b/sync-for-expenses/docs/models/operations/getmappingoptionsresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `mapping_options` | [Optional[shared.MappingOptions]](../../models/shared/mappingoptions.md) | :heavy_minus_sign: | Success | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getpulloperationrequest.md b/sync-for-expenses/docs/models/operations/getpulloperationrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getpulloperationresponse.md b/sync-for-expenses/docs/models/operations/getpulloperationresponse.md old mode 100755 new mode 100644 index 41674afa9..6ed2cf572 --- a/sync-for-expenses/docs/models/operations/getpulloperationresponse.md +++ b/sync-for-expenses/docs/models/operations/getpulloperationresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `pull_operation` | [Optional[shared.PullOperation]](../../models/shared/pulloperation.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getpushoperationrequest.md b/sync-for-expenses/docs/models/operations/getpushoperationrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getpushoperationresponse.md b/sync-for-expenses/docs/models/operations/getpushoperationresponse.md old mode 100755 new mode 100644 index 7dd02aeed..bfc9ae726 --- a/sync-for-expenses/docs/models/operations/getpushoperationresponse.md +++ b/sync-for-expenses/docs/models/operations/getpushoperationresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_operation` | [Optional[shared.PushOperation]](../../models/shared/pushoperation.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getsupplierrequest.md b/sync-for-expenses/docs/models/operations/getsupplierrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getsupplierresponse.md b/sync-for-expenses/docs/models/operations/getsupplierresponse.md old mode 100755 new mode 100644 index 3af35ef18..267850d07 --- a/sync-for-expenses/docs/models/operations/getsupplierresponse.md +++ b/sync-for-expenses/docs/models/operations/getsupplierresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `supplier` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getsyncbyidrequest.md b/sync-for-expenses/docs/models/operations/getsyncbyidrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getsyncbyidresponse.md b/sync-for-expenses/docs/models/operations/getsyncbyidresponse.md old mode 100755 new mode 100644 index 7bca2f4ba..b07ccd872 --- a/sync-for-expenses/docs/models/operations/getsyncbyidresponse.md +++ b/sync-for-expenses/docs/models/operations/getsyncbyidresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company_sync_status` | [Optional[shared.CompanySyncStatus]](../../models/shared/companysyncstatus.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/getsynctransactionrequest.md b/sync-for-expenses/docs/models/operations/getsynctransactionrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md b/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md old mode 100755 new mode 100644 index a7b2408a3..210390a21 --- a/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md +++ b/sync-for-expenses/docs/models/operations/getsynctransactionresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `transaction` | [Optional[shared.Transaction]](../../models/shared/transaction.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/initiatesyncrequest.md b/sync-for-expenses/docs/models/operations/initiatesyncrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/initiatesyncresponse.md b/sync-for-expenses/docs/models/operations/initiatesyncresponse.md old mode 100755 new mode 100644 index ca473e61b..f1d90091b --- a/sync-for-expenses/docs/models/operations/initiatesyncresponse.md +++ b/sync-for-expenses/docs/models/operations/initiatesyncresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | If model is incorrect | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `sync_initiated` | [Optional[shared.SyncInitiated]](../../models/shared/syncinitiated.md) | :heavy_minus_sign: | Returns the newly created SyncId | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listcompaniesrequest.md b/sync-for-expenses/docs/models/operations/listcompaniesrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listcompaniesresponse.md b/sync-for-expenses/docs/models/operations/listcompaniesresponse.md old mode 100755 new mode 100644 index d9c512cea..42b07950c --- a/sync-for-expenses/docs/models/operations/listcompaniesresponse.md +++ b/sync-for-expenses/docs/models/operations/listcompaniesresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `companies` | [Optional[shared.Companies]](../../models/shared/companies.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listconnectionsrequest.md b/sync-for-expenses/docs/models/operations/listconnectionsrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listconnectionsresponse.md b/sync-for-expenses/docs/models/operations/listconnectionsresponse.md old mode 100755 new mode 100644 index 0de0ad796..dacec2f64 --- a/sync-for-expenses/docs/models/operations/listconnectionsresponse.md +++ b/sync-for-expenses/docs/models/operations/listconnectionsresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connections` | [Optional[shared.Connections]](../../models/shared/connections.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listcustomersrequest.md b/sync-for-expenses/docs/models/operations/listcustomersrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listcustomersresponse.md b/sync-for-expenses/docs/models/operations/listcustomersresponse.md old mode 100755 new mode 100644 index 27adb68ef..e82eedb8d --- a/sync-for-expenses/docs/models/operations/listcustomersresponse.md +++ b/sync-for-expenses/docs/models/operations/listcustomersresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `customers` | [Optional[shared.Customers]](../../models/shared/customers.md) | :heavy_minus_sign: | Success | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listpulloperationsrequest.md b/sync-for-expenses/docs/models/operations/listpulloperationsrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md b/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md old mode 100755 new mode 100644 index feff59654..b58dc8961 --- a/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md +++ b/sync-for-expenses/docs/models/operations/listpulloperationsresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `pull_operations` | [Optional[shared.PullOperations]](../../models/shared/pulloperations.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listpushoperationsrequest.md b/sync-for-expenses/docs/models/operations/listpushoperationsrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md b/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md old mode 100755 new mode 100644 index 57c1b20b3..73633c436 --- a/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md +++ b/sync-for-expenses/docs/models/operations/listpushoperationsresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `push_operations` | [Optional[shared.PushOperations]](../../models/shared/pushoperations.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listsuppliersrequest.md b/sync-for-expenses/docs/models/operations/listsuppliersrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listsuppliersresponse.md b/sync-for-expenses/docs/models/operations/listsuppliersresponse.md old mode 100755 new mode 100644 index 35d01e6ba..4cb4e0ce8 --- a/sync-for-expenses/docs/models/operations/listsuppliersresponse.md +++ b/sync-for-expenses/docs/models/operations/listsuppliersresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `suppliers` | [Optional[shared.Suppliers]](../../models/shared/suppliers.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listsyncsrequest.md b/sync-for-expenses/docs/models/operations/listsyncsrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listsyncsresponse.md b/sync-for-expenses/docs/models/operations/listsyncsresponse.md old mode 100755 new mode 100644 index 80378b970..9105ae46f --- a/sync-for-expenses/docs/models/operations/listsyncsresponse.md +++ b/sync-for-expenses/docs/models/operations/listsyncsresponse.md @@ -5,8 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `company_sync_statuses` | List[[shared.CompanySyncStatus](../../models/shared/companysyncstatus.md)] | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `classes` | List[[shared.CompanySyncStatus](../../models/shared/companysyncstatus.md)] | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/listsynctransactionsrequest.md b/sync-for-expenses/docs/models/operations/listsynctransactionsrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md b/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md old mode 100755 new mode 100644 index 73f78df9a..e8102e15c --- a/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md +++ b/sync-for-expenses/docs/models/operations/listsynctransactionsresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `transactions` | [Optional[shared.Transactions]](../../models/shared/transactions.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/refreshalldatatypesrequest.md b/sync-for-expenses/docs/models/operations/refreshalldatatypesrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md b/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md old mode 100755 new mode 100644 index 0788fc5da..4f79210f0 --- a/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md +++ b/sync-for-expenses/docs/models/operations/refreshalldatatypesresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md b/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md old mode 100755 new mode 100644 index 257381833..1047c2228 --- a/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md +++ b/sync-for-expenses/docs/models/operations/refreshdatatyperequest.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connection_id` | *Optional[str]* | :heavy_minus_sign: | Optionally, provide a data connection id to only queue pull operations on that connection. | | -| `data_type` | [shared.DataType](../../models/shared/datatype.md) | :heavy_check_mark: | The key of a Codat data type | invoices | \ No newline at end of file +| `data_type` | [shared.SchemaDataType](../../models/shared/schemadatatype.md) | :heavy_check_mark: | The key of a Codat data type | invoices | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md b/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md old mode 100755 new mode 100644 index 5a4e614bb..7be7f61b1 --- a/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md +++ b/sync-for-expenses/docs/models/operations/refreshdatatyperesponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `pull_operation` | [Optional[shared.PullOperation]](../../models/shared/pulloperation.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/setcompanyconfigurationrequest.md b/sync-for-expenses/docs/models/operations/setcompanyconfigurationrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md b/sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md old mode 100755 new mode 100644 index 4f53a61ad..18295e29e --- a/sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md +++ b/sync-for-expenses/docs/models/operations/setcompanyconfigurationresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company_configuration` | [Optional[shared.CompanyConfiguration]](../../models/shared/companyconfiguration.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md b/sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md old mode 100755 new mode 100644 index 1f83e7cfa..37c72c7bc --- a/sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md +++ b/sync-for-expenses/docs/models/operations/unlinkconnectionrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request_body` | [Optional[UnlinkConnectionUpdateConnection]](../../models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | -| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `request_body` | [Optional[operations.UnlinkConnectionUpdateConnection]](../../models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | +| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md b/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md old mode 100755 new mode 100644 index 642e8e815..d1754acb5 --- a/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md +++ b/sync-for-expenses/docs/models/operations/unlinkconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/unlinkconnectionupdateconnection.md b/sync-for-expenses/docs/models/operations/unlinkconnectionupdateconnection.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/updatecompanyrequest.md b/sync-for-expenses/docs/models/operations/updatecompanyrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/updatecompanyresponse.md b/sync-for-expenses/docs/models/operations/updatecompanyresponse.md old mode 100755 new mode 100644 index b60ed7a56..d299179e8 --- a/sync-for-expenses/docs/models/operations/updatecompanyresponse.md +++ b/sync-for-expenses/docs/models/operations/updatecompanyresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/updatecustomerrequest.md b/sync-for-expenses/docs/models/operations/updatecustomerrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/updatecustomerresponse.md b/sync-for-expenses/docs/models/operations/updatecustomerresponse.md old mode 100755 new mode 100644 index 90547c4f8..b8900289c --- a/sync-for-expenses/docs/models/operations/updatecustomerresponse.md +++ b/sync-for-expenses/docs/models/operations/updatecustomerresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `update_customer_response` | [Optional[shared.UpdateCustomerResponse]](../../models/shared/updatecustomerresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/updateexpensetransactionrequest.md b/sync-for-expenses/docs/models/operations/updateexpensetransactionrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md b/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md old mode 100755 new mode 100644 index f84937fc8..07256fb71 --- a/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md +++ b/sync-for-expenses/docs/models/operations/updateexpensetransactionresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `update_expense_response` | [Optional[shared.UpdateExpenseResponse]](../../models/shared/updateexpenseresponse.md) | :heavy_minus_sign: | Accepted | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/updatesupplierrequest.md b/sync-for-expenses/docs/models/operations/updatesupplierrequest.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/operations/updatesupplierresponse.md b/sync-for-expenses/docs/models/operations/updatesupplierresponse.md old mode 100755 new mode 100644 index d52d8fea0..150ad2a09 --- a/sync-for-expenses/docs/models/operations/updatesupplierresponse.md +++ b/sync-for-expenses/docs/models/operations/updatesupplierresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `update_supplier_response` | [Optional[shared.UpdateSupplierResponse]](../../models/shared/updatesupplierresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md old mode 100755 new mode 100644 index dc1a49039..747fb2886 --- a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md +++ b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request_body` | [Optional[UploadExpenseAttachmentRequestBody]](../../models/operations/uploadexpenseattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | -| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `sync_id` | *str* | :heavy_check_mark: | Unique identifier for a sync. | 6fb40d5e-b13e-11ed-afa1-0242ac120002 | -| `transaction_id` | *str* | :heavy_check_mark: | The unique identifier for your SMB's transaction. | 336694d8-2dca-4cb5-a28d-3ccb83e55eee | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `attachment_upload` | [Optional[shared.AttachmentUpload]](../../models/shared/attachmentupload.md) | :heavy_minus_sign: | N/A | | +| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `sync_id` | *str* | :heavy_check_mark: | Unique identifier for a sync. | 6fb40d5e-b13e-11ed-afa1-0242ac120002 | +| `transaction_id` | *str* | :heavy_check_mark: | The unique identifier for your SMB's transaction. | 336694d8-2dca-4cb5-a28d-3ccb83e55eee | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md old mode 100755 new mode 100644 index 43befdf6a..1c5ddb230 --- a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md +++ b/sync-for-expenses/docs/models/operations/uploadexpenseattachmentresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/account.md b/sync-for-expenses/docs/models/shared/account.md old mode 100755 new mode 100644 index 1cfb72f5d..44d97730f --- a/sync-for-expenses/docs/models/shared/account.md +++ b/sync-for-expenses/docs/models/shared/account.md @@ -1,32 +1,32 @@ # Account -> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. +> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. View the coverage for accounts in the Data coverage explorer. ## Overview -Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. +Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. The categories for an account include: - * Asset - * Expense - * Income - * Liability - * Equity. +* Asset +* Expense +* Income +* Liability +* Equity. -The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. +The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. -At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. +At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. -To determine the list of allowed categories for a specific integration, you can: +To determine the list of allowed categories for a specific integration, you can: - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). -- Refer to the integration's own documentation. +- Refer to the integration's own documentation. > **Accounts with no category** -> +> > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`. -> +> > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. @@ -41,12 +41,12 @@ To determine the list of allowed categories for a specific integration, you can: | `fully_qualified_name` | *Optional[str]* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e | | `is_bank_account` | *Optional[bool]* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | -| `metadata` | [Optional[AccountMetadata]](../../models/shared/accountmetadata.md) | :heavy_minus_sign: | N/A | | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `metadata` | [Optional[shared.AccountMetadata]](../../models/shared/accountmetadata.md) | :heavy_minus_sign: | N/A | | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | | `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. | 610 | -| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `status` | [Optional[AccountStatus]](../../models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | -| `type` | [Optional[AccountType]](../../models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | -| `valid_datatype_links` | List[[AccountValidDataTypeLinks](../../models/shared/accountvaliddatatypelinks.md)] | :heavy_minus_sign: | The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks). | | \ No newline at end of file +| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [Optional[shared.AccountStatus]](../../models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | +| `supplemental_data` | [Optional[shared.SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `type` | [Optional[shared.AccountType]](../../models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | +| `valid_datatype_links` | List[[shared.AccountValidDataTypeLinks](../../models/shared/accountvaliddatatypelinks.md)] | :heavy_minus_sign: | The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks). | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/accountingaddress.md b/sync-for-expenses/docs/models/shared/accountingaddress.md new file mode 100644 index 000000000..d1f4f82ec --- /dev/null +++ b/sync-for-expenses/docs/models/shared/accountingaddress.md @@ -0,0 +1,14 @@ +# AccountingAddress + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `city` | *Optional[str]* | :heavy_minus_sign: | City of the customer address. | +| `country` | *Optional[str]* | :heavy_minus_sign: | Country of the customer address. | +| `line1` | *Optional[str]* | :heavy_minus_sign: | Line 1 of the customer address. | +| `line2` | *Optional[str]* | :heavy_minus_sign: | Line 2 of the customer address. | +| `postal_code` | *Optional[str]* | :heavy_minus_sign: | Postal code or zip code. | +| `region` | *Optional[str]* | :heavy_minus_sign: | Region of the customer address. | +| `type` | [shared.AccountingAddressType](../../models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/accountingaddresstype.md b/sync-for-expenses/docs/models/shared/accountingaddresstype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/accountmappinginfo.md b/sync-for-expenses/docs/models/shared/accountmappinginfo.md old mode 100755 new mode 100644 index 0c8ff041b..abcee6c8b --- a/sync-for-expenses/docs/models/shared/accountmappinginfo.md +++ b/sync-for-expenses/docs/models/shared/accountmappinginfo.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `account_type` | [Optional[AccountMappingInfoAccountType]](../../models/shared/accountmappinginfoaccounttype.md) | :heavy_minus_sign: | Type of the account. | Expense | -| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency of the account. | GBP | -| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of account. | 6 | -| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the account as it appears in the companies accounting software. | Purchases | -| `valid_transaction_types` | List[[AccountMappingInfoValidTransactionTypes](../../models/shared/accountmappinginfovalidtransactiontypes.md)] | :heavy_minus_sign: | Supported transaction types for the account. | Payment | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `account_type` | [Optional[shared.AccountMappingInfoAccountType]](../../models/shared/accountmappinginfoaccounttype.md) | :heavy_minus_sign: | Type of the account. | Expense | +| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency of the account. | GBP | +| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of account. | 6 | +| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the account as it appears in the companies accounting software. | Purchases | +| `valid_transaction_types` | List[[shared.ValidTransactionTypes](../../models/shared/validtransactiontypes.md)] | :heavy_minus_sign: | Supported transaction types for the account. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/accountmappinginfoaccounttype.md b/sync-for-expenses/docs/models/shared/accountmappinginfoaccounttype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/accountmetadata.md b/sync-for-expenses/docs/models/shared/accountmetadata.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/accountprototype.md b/sync-for-expenses/docs/models/shared/accountprototype.md new file mode 100644 index 000000000..a4cf8c94a --- /dev/null +++ b/sync-for-expenses/docs/models/shared/accountprototype.md @@ -0,0 +1,19 @@ +# AccountPrototype + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `current_balance` | *Optional[Decimal]* | :heavy_minus_sign: | Current balance in the account. | 0 | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | +| `fully_qualified_category` | *Optional[str]* | :heavy_minus_sign: | Full category of the account.

For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. | Asset.Current | +| `fully_qualified_name` | *Optional[str]* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand | +| `is_bank_account` | *Optional[bool]* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | +| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | +| `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. | 610 | +| `status` | [Optional[shared.AccountStatus]](../../models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | +| `supplemental_data` | [Optional[shared.SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `type` | [Optional[shared.AccountType]](../../models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | +| `valid_datatype_links` | List[[shared.ValidDataTypeLinks](../../models/shared/validdatatypelinks.md)] | :heavy_minus_sign: | The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks). | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/accountstatus.md b/sync-for-expenses/docs/models/shared/accountstatus.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/accounttype.md b/sync-for-expenses/docs/models/shared/accounttype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/accountvaliddatatypelinks.md b/sync-for-expenses/docs/models/shared/accountvaliddatatypelinks.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/attachment.md b/sync-for-expenses/docs/models/shared/attachment.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/attachmentupload.md b/sync-for-expenses/docs/models/shared/attachmentupload.md new file mode 100644 index 000000000..02d7ac41a --- /dev/null +++ b/sync-for-expenses/docs/models/shared/attachmentupload.md @@ -0,0 +1,8 @@ +# AttachmentUpload + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `file` | [shared.CodatFile](../../models/shared/codatfile.md) | :heavy_check_mark: | The file to be uploaded as an attachment. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/bankaccount.md b/sync-for-expenses/docs/models/shared/bankaccount.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/expensetransactionbankaccountreference.md b/sync-for-expenses/docs/models/shared/bankaccountreference.md old mode 100755 new mode 100644 similarity index 93% rename from sync-for-expenses/docs/models/shared/expensetransactionbankaccountreference.md rename to sync-for-expenses/docs/models/shared/bankaccountreference.md index 588260c71..9e4e2473d --- a/sync-for-expenses/docs/models/shared/expensetransactionbankaccountreference.md +++ b/sync-for-expenses/docs/models/shared/bankaccountreference.md @@ -1,4 +1,4 @@ -# ExpenseTransactionBankAccountReference +# BankAccountReference ## Fields diff --git a/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhook.md b/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhook.md old mode 100755 new mode 100644 index 3d7030310..0e1855429 --- a/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhook.md +++ b/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhook.md @@ -5,12 +5,12 @@ Webhook request body for a client that has reached their rate limit. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | -| `data` | [Optional[ClientRateLimitReachedWebhookData]](../../models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A | -| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | -| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | -| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | +| `data` | [Optional[shared.ClientRateLimitReachedWebhookData]](../../models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A | +| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | +| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | +| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhookdata.md b/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhookdata.md old mode 100755 new mode 100644 index caa124b1b..bab6ec72f --- a/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhookdata.md +++ b/sync-for-expenses/docs/models/shared/clientratelimitreachedwebhookdata.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `daily_quota` | *Optional[int]* | :heavy_minus_sign: | The number of available requests per day. | | -| `expires_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | \ No newline at end of file +| `expires_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/clientratelimitresetwebhook.md b/sync-for-expenses/docs/models/shared/clientratelimitresetwebhook.md old mode 100755 new mode 100644 index 7336566a4..de4352761 --- a/sync-for-expenses/docs/models/shared/clientratelimitresetwebhook.md +++ b/sync-for-expenses/docs/models/shared/clientratelimitresetwebhook.md @@ -5,12 +5,12 @@ Webhook request body for a client that has had their rate limit reset. ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | -| `data` | [Optional[ClientRateLimitResetWebhookData]](../../models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A | -| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | -| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | -| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | +| `data` | [Optional[shared.ClientRateLimitResetWebhookData]](../../models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A | +| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | +| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | +| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/clientratelimitresetwebhookdata.md b/sync-for-expenses/docs/models/shared/clientratelimitresetwebhookdata.md old mode 100755 new mode 100644 index 1b2b1eb58..e62b34279 --- a/sync-for-expenses/docs/models/shared/clientratelimitresetwebhookdata.md +++ b/sync-for-expenses/docs/models/shared/clientratelimitresetwebhookdata.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `daily_quota` | *Optional[int]* | :heavy_minus_sign: | The number of available requests per day. | | -| `expires_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `expires_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `quota_remaining` | *Optional[int]* | :heavy_minus_sign: | Total number of request remaining for your client. | | | `reset_reason` | *Optional[str]* | :heavy_minus_sign: | The reason for your rate limit quota being reset. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequestbody.md b/sync-for-expenses/docs/models/shared/codatfile.md old mode 100755 new mode 100644 similarity index 74% rename from sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequestbody.md rename to sync-for-expenses/docs/models/shared/codatfile.md index 5c372515c..5ff354d51 --- a/sync-for-expenses/docs/models/operations/uploadexpenseattachmentrequestbody.md +++ b/sync-for-expenses/docs/models/shared/codatfile.md @@ -1,4 +1,4 @@ -# UploadExpenseAttachmentRequestBody +# CodatFile ## Fields @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `content` | *bytes* | :heavy_check_mark: | N/A | -| `request_body` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `file_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/companies.md b/sync-for-expenses/docs/models/shared/companies.md old mode 100755 new mode 100644 index eeaacf9de..05e8c5131 --- a/sync-for-expenses/docs/models/shared/companies.md +++ b/sync-for-expenses/docs/models/shared/companies.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/company.md b/sync-for-expenses/docs/models/shared/company.md old mode 100755 new mode 100644 index 9ce212b8f..bf9dab9ba --- a/sync-for-expenses/docs/models/shared/company.md +++ b/sync-for-expenses/docs/models/shared/company.md @@ -11,12 +11,12 @@ When you create a company, you can specify a `name` and we will automatically ge | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `created` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `created` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `created_by_user_name` | *Optional[str]* | :heavy_minus_sign: | Name of user that created the company in Codat. | | -| `data_connections` | List[[Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | | +| `data_connections` | List[[shared.Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | | | `description` | *Optional[str]* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | | `id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `name` | *str* | :heavy_check_mark: | The name of the company | Codat Ltd. | | ~~`platform`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

`platformKeys` name used when creating the company. | Xero | | `redirect` | *str* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/companyconfiguration.md b/sync-for-expenses/docs/models/shared/companyconfiguration.md old mode 100755 new mode 100644 index 45d797e3a..97f6351c0 --- a/sync-for-expenses/docs/models/shared/companyconfiguration.md +++ b/sync-for-expenses/docs/models/shared/companyconfiguration.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `bank_account` | [BankAccount](../../models/shared/bankaccount.md) | :heavy_check_mark: | N/A | -| `customer` | [CustomerDetails](../../models/shared/customerdetails.md) | :heavy_check_mark: | N/A | -| `supplier` | [SupplierDetails](../../models/shared/supplierdetails.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `bank_account` | [shared.BankAccount](../../models/shared/bankaccount.md) | :heavy_check_mark: | N/A | +| `customer` | [shared.CustomerDetails](../../models/shared/customerdetails.md) | :heavy_check_mark: | N/A | +| `supplier` | [shared.SupplierDetails](../../models/shared/supplierdetails.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/companyrequestbody.md b/sync-for-expenses/docs/models/shared/companyrequestbody.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/companysyncstatus.md b/sync-for-expenses/docs/models/shared/companysyncstatus.md old mode 100755 new mode 100644 index 564dc44df..caf0e0539 --- a/sync-for-expenses/docs/models/shared/companysyncstatus.md +++ b/sync-for-expenses/docs/models/shared/companysyncstatus.md @@ -12,4 +12,4 @@ | `sync_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the sync. | a6a22aff-a43a-411d-a910-2dae73217cce | | `sync_status` | *Optional[str]* | :heavy_minus_sign: | Text status of the sync. | Completed | | `sync_status_code` | *Optional[int]* | :heavy_minus_sign: | Status code of the sync. | 2000 | -| `sync_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | \ No newline at end of file +| `sync_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/connection.md b/sync-for-expenses/docs/models/shared/connection.md old mode 100755 new mode 100644 index b7c4beb6e..3b8fb01fe --- a/sync-for-expenses/docs/models/shared/connection.md +++ b/sync-for-expenses/docs/models/shared/connection.md @@ -18,14 +18,14 @@ Before you can use a data connection to pull or push data, the company must gran | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `additional_properties` | *Optional[Any]* | :heavy_minus_sign: | N/A | | | `connection_info` | Dict[str, *str*] | :heavy_minus_sign: | N/A | | -| `created` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `data_connection_errors` | List[[DataConnectionError](../../models/shared/dataconnectionerror.md)] | :heavy_minus_sign: | N/A | | +| `created` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `data_connection_errors` | List[[shared.DataConnectionError](../../models/shared/dataconnectionerror.md)] | :heavy_minus_sign: | N/A | | | `id` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `integration_id` | *str* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | | `integration_key` | *str* | :heavy_check_mark: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | -| `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `link_url` | *str* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | | `platform_name` | *str* | :heavy_check_mark: | Name of integration connected to company. | | | `source_id` | *str* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | -| `source_type` | [ConnectionSourceType](../../models/shared/connectionsourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | -| `status` | [DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file +| `source_type` | [shared.SourceType](../../models/shared/sourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | +| `status` | [shared.DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/connections.md b/sync-for-expenses/docs/models/shared/connections.md old mode 100755 new mode 100644 index 87ee809ab..5a69d197d --- a/sync-for-expenses/docs/models/shared/connections.md +++ b/sync-for-expenses/docs/models/shared/connections.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/contact.md b/sync-for-expenses/docs/models/shared/contact.md old mode 100755 new mode 100644 index 20c406468..da32b87b8 --- a/sync-for-expenses/docs/models/shared/contact.md +++ b/sync-for-expenses/docs/models/shared/contact.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `address` | [Optional[Items]](../../models/shared/items.md) | :heavy_minus_sign: | N/A | | +| `address` | [Optional[shared.Items]](../../models/shared/items.md) | :heavy_minus_sign: | N/A | | | `email` | *Optional[str]* | :heavy_minus_sign: | Email of a contact for a customer. | | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of a contact for a customer. | | -| `phone` | List[[ContactPhone](../../models/shared/contactphone.md)] | :heavy_minus_sign: | An array of Phone numbers. | | -| `status` | [CustomerStatus](../../models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | \ No newline at end of file +| `phone` | List[[shared.Phone](../../models/shared/phone.md)] | :heavy_minus_sign: | An array of Phone numbers. | | +| `status` | [shared.CustomerStatus](../../models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/contactphone.md b/sync-for-expenses/docs/models/shared/contactphone.md deleted file mode 100755 index c75207936..000000000 --- a/sync-for-expenses/docs/models/shared/contactphone.md +++ /dev/null @@ -1,9 +0,0 @@ -# ContactPhone - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `number` | *Optional[str]* | :heavy_check_mark: | A phone number. | +44 25691 154789 | -| `type` | [PhoneNumberType](../../models/shared/phonenumbertype.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/contactref.md b/sync-for-expenses/docs/models/shared/contactref.md old mode 100755 new mode 100644 index cd5da29ba..fca8b68cb --- a/sync-for-expenses/docs/models/shared/contactref.md +++ b/sync-for-expenses/docs/models/shared/contactref.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of supplier or customer. | 40e3e57c-2322-4898-966c-ca41adfd23fd | -| `type` | [Optional[ContactRefType]](../../models/shared/contactreftype.md) | :heavy_minus_sign: | The type of contact. | Supplier | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of supplier or customer. | 40e3e57c-2322-4898-966c-ca41adfd23fd | +| `type` | [Optional[shared.Type]](../../models/shared/type.md) | :heavy_minus_sign: | The type of contact. | Supplier | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/createaccountresponse.md b/sync-for-expenses/docs/models/shared/createaccountresponse.md old mode 100755 new mode 100644 index ea709394b..62fac78ad --- a/sync-for-expenses/docs/models/shared/createaccountresponse.md +++ b/sync-for-expenses/docs/models/shared/createaccountresponse.md @@ -3,19 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | -| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `data` | [Optional[Account]](../../models/shared/account.md) | :heavy_minus_sign: | > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.

View the coverage for accounts in the Data coverage explorer.

## Overview

Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.

The categories for an account include:
* Asset
* Expense
* Income
* Liability
* Equity.

The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.

At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.

To determine the list of allowed categories for a specific integration, you can:
- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model).
- Refer to the integration's own documentation.

> **Accounts with no category**
>
> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.
>
> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. | | -| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | -| `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | -| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | -| `status_code` | *int* | :heavy_check_mark: | Push status code. | | -| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `data` | [Optional[shared.Account]](../../models/shared/account.md) | :heavy_minus_sign: | > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.

View the coverage for accounts in the Data coverage explorer.

## Overview

Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.

The categories for an account include:
* Asset
* Expense
* Income
* Liability
* Equity.

The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.

At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.

To determine the list of allowed categories for a specific integration, you can:
- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model).
- Refer to the integration's own documentation.

> **Accounts with no category**
>
> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.
>
> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. | | +| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | +| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `status_code` | *int* | :heavy_check_mark: | Push status code. | | +| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | +| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/createcustomerresponse.md b/sync-for-expenses/docs/models/shared/createcustomerresponse.md old mode 100755 new mode 100644 index 09f6b8162..950bb62cf --- a/sync-for-expenses/docs/models/shared/createcustomerresponse.md +++ b/sync-for-expenses/docs/models/shared/createcustomerresponse.md @@ -5,17 +5,17 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `data` | [Optional[Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | > View the coverage for customers in the Data coverage explorer.

## Overview

A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers).

Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice).
| | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `data` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | > View the coverage for customers in the Data coverage explorer.

## Overview

A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers).

Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice).
| | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/createexpenserequest.md b/sync-for-expenses/docs/models/shared/createexpenserequest.md old mode 100755 new mode 100644 index f65a78658..80929e594 --- a/sync-for-expenses/docs/models/shared/createexpenserequest.md +++ b/sync-for-expenses/docs/models/shared/createexpenserequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `items` | List[[ExpenseTransaction](../../models/shared/expensetransaction.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `items` | List[[shared.ExpenseTransaction](../../models/shared/expensetransaction.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/createexpenseresponse.md b/sync-for-expenses/docs/models/shared/createexpenseresponse.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/createsupplierresponse.md b/sync-for-expenses/docs/models/shared/createsupplierresponse.md old mode 100755 new mode 100644 index 34eeef48f..bac7f947b --- a/sync-for-expenses/docs/models/shared/createsupplierresponse.md +++ b/sync-for-expenses/docs/models/shared/createsupplierresponse.md @@ -5,17 +5,17 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `data` | [Optional[Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | > View the coverage for suppliers in the Data coverage explorer.

## Overview

From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). | | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `data` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | > View the coverage for suppliers in the Data coverage explorer.

## Overview

From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). | | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/customer.md b/sync-for-expenses/docs/models/shared/customer.md old mode 100755 new mode 100644 index bb6ed2dc1..e400ced8b --- a/sync-for-expenses/docs/models/shared/customer.md +++ b/sync-for-expenses/docs/models/shared/customer.md @@ -14,18 +14,18 @@ Customers' data links to accounts receivable [invoices](https://docs.codat.io/sy | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addresses` | List[[Items](../../models/shared/items.md)] | :heavy_minus_sign: | An array of Addresses. | | +| `addresses` | List[[shared.AccountingAddress](../../models/shared/accountingaddress.md)] | :heavy_minus_sign: | An array of Addresses. | | | `contact_name` | *Optional[str]* | :heavy_minus_sign: | Name of the main contact for the identified customer. | | -| `contacts` | List[[Contact](../../models/shared/contact.md)] | :heavy_minus_sign: | An array of Contacts. | | +| `contacts` | List[[shared.Contact](../../models/shared/contact.md)] | :heavy_minus_sign: | An array of Contacts. | | | `customer_name` | *Optional[str]* | :heavy_minus_sign: | Name of the customer as recorded in the accounting system, typically the company name. | | | `default_currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | | `email_address` | *Optional[str]* | :heavy_minus_sign: | Email address the customer can be contacted by. | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the customer, unique to the company in the accounting platform. | | -| `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `metadata` | [Optional[shared.Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | | `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number the customer can be contacted by. | | | `registration_number` | *Optional[str]* | :heavy_minus_sign: | Company number. In the UK, this is typically the Companies House company registration number. | | -| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `status` | [CustomerStatus](../../models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.CustomerStatus](../../models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | +| `supplemental_data` | [Optional[shared.SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `tax_number` | *Optional[str]* | :heavy_minus_sign: | Company tax number. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/customerdetails.md b/sync-for-expenses/docs/models/shared/customerdetails.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/customers.md b/sync-for-expenses/docs/models/shared/customers.md old mode 100755 new mode 100644 index 0ef44bd32..ca79aa46d --- a/sync-for-expenses/docs/models/shared/customers.md +++ b/sync-for-expenses/docs/models/shared/customers.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Customer](../../models/shared/customer.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Customer](../../models/shared/customer.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/customerstatus.md b/sync-for-expenses/docs/models/shared/customerstatus.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/syncstartedwebhookdata.md b/sync-for-expenses/docs/models/shared/data.md old mode 100755 new mode 100644 similarity index 99% rename from sync-for-expenses/docs/models/shared/syncstartedwebhookdata.md rename to sync-for-expenses/docs/models/shared/data.md index b1f5ed14f..e0952fbb6 --- a/sync-for-expenses/docs/models/shared/syncstartedwebhookdata.md +++ b/sync-for-expenses/docs/models/shared/data.md @@ -1,11 +1,11 @@ -# SyncStartedWebhookData +# Data ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sync_date_range_finish_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `sync_date_range_start_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `sync_date_range_finish_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `sync_date_range_start_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `sync_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the failed sync. | a9367074-b5c3-42c4-9be4-be129f43577e | | `sync_type` | *Optional[str]* | :heavy_minus_sign: | The type of sync being performed. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/dataconnectionerror.md b/sync-for-expenses/docs/models/shared/dataconnectionerror.md old mode 100755 new mode 100644 index 7dd2be969..2c12bb648 --- a/sync-for-expenses/docs/models/shared/dataconnectionerror.md +++ b/sync-for-expenses/docs/models/shared/dataconnectionerror.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A brief message about the error. | | -| `errored_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `errored_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `status_code` | *Optional[str]* | :heavy_minus_sign: | The HTTP status code returned by the error. | | | `status_text` | *Optional[str]* | :heavy_minus_sign: | A non-numeric status code/text. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/dataconnectionstatus.md b/sync-for-expenses/docs/models/shared/dataconnectionstatus.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/datastatus.md b/sync-for-expenses/docs/models/shared/datastatus.md old mode 100755 new mode 100644 index e835378ab..3f72f0ed6 --- a/sync-for-expenses/docs/models/shared/datastatus.md +++ b/sync-for-expenses/docs/models/shared/datastatus.md @@ -8,7 +8,7 @@ Describes the state of data in the Codat cache for a company and data type | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `current_status` | *str* | :heavy_check_mark: | The current status of the dataset in Codat's cache. | | -| `data_type` | [DataStatusDataTypes](../../models/shared/datastatusdatatypes.md) | :heavy_check_mark: | Available Data types | invoices | -| `last_successful_sync` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `data_type` | [shared.DataTypes](../../models/shared/datatypes.md) | :heavy_check_mark: | Available Data types | invoices | +| `last_successful_sync` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `latest_successful_sync_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the most recent successful sync of data type. | 8220fc90-55b6-47bc-9417-48ac6ea93101 | | `latest_sync_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for most recent sync of data type. | ad474a37-2003-478e-baee-9af9f1ec2fe3 | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/datatype.md b/sync-for-expenses/docs/models/shared/datatype.md old mode 100755 new mode 100644 index 0e358dc70..7a5f16172 --- a/sync-for-expenses/docs/models/shared/datatype.md +++ b/sync-for-expenses/docs/models/shared/datatype.md @@ -22,6 +22,7 @@ Available Data types | `DIRECT_COSTS` | directCosts | | `DIRECT_INCOMES` | directIncomes | | `INVOICES` | invoices | +| `ITEM_RECEIPTS` | itemReceipts | | `ITEMS` | items | | `JOURNAL_ENTRIES` | journalEntries | | `JOURNALS` | journals | diff --git a/sync-for-expenses/docs/models/shared/datastatusdatatypes.md b/sync-for-expenses/docs/models/shared/datatypes.md old mode 100755 new mode 100644 similarity index 97% rename from sync-for-expenses/docs/models/shared/datastatusdatatypes.md rename to sync-for-expenses/docs/models/shared/datatypes.md index bb62bc2d3..ddabcb78f --- a/sync-for-expenses/docs/models/shared/datastatusdatatypes.md +++ b/sync-for-expenses/docs/models/shared/datatypes.md @@ -1,4 +1,4 @@ -# DataStatusDataTypes +# DataTypes Available Data types @@ -22,6 +22,7 @@ Available Data types | `DIRECT_COSTS` | directCosts | | `DIRECT_INCOMES` | directIncomes | | `INVOICES` | invoices | +| `ITEM_RECEIPTS` | itemReceipts | | `ITEMS` | items | | `JOURNAL_ENTRIES` | journalEntries | | `JOURNALS` | journals | diff --git a/sync-for-expenses/docs/models/shared/expensetransaction.md b/sync-for-expenses/docs/models/shared/expensetransaction.md old mode 100755 new mode 100644 index 35b6b6935..5db1f9144 --- a/sync-for-expenses/docs/models/shared/expensetransaction.md +++ b/sync-for-expenses/docs/models/shared/expensetransaction.md @@ -3,15 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `bank_account_ref` | [Optional[ExpenseTransactionBankAccountReference]](../../models/shared/expensetransactionbankaccountreference.md) | :heavy_minus_sign: | N/A | | -| `contact_ref` | [Optional[ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `currency` | *str* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP | -| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `id` | *str* | :heavy_check_mark: | Your unique identifier for the transaction. | 4d7c6929-7770-412b-91bb-44d3bc71d111 | -| `issue_date` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `lines` | List[[ExpenseTransactionLine](../../models/shared/expensetransactionline.md)] | :heavy_minus_sign: | Array of transaction lines. | | -| `merchant_name` | *Optional[str]* | :heavy_minus_sign: | Name of the merchant where the purchase took place | Amazon UK | -| `notes` | *Optional[str]* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 | -| `type` | [ExpenseTransactionType](../../models/shared/expensetransactiontype.md) | :heavy_check_mark: | The type of transaction. | Payment | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bank_account_ref` | [Optional[shared.BankAccountReference]](../../models/shared/bankaccountreference.md) | :heavy_minus_sign: | N/A | | +| `contact_ref` | [Optional[shared.ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | N/A | | +| `currency` | *str* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. \| | | +| `id` | *str* | :heavy_check_mark: | Your unique identifier for the transaction. | 4d7c6929-7770-412b-91bb-44d3bc71d111 | +| `issue_date` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `lines` | List[[shared.ExpenseTransactionLine](../../models/shared/expensetransactionline.md)] | :heavy_minus_sign: | Array of transaction lines. | | +| `merchant_name` | *Optional[str]* | :heavy_minus_sign: | Name of the merchant where the purchase took place | Amazon UK | +| `notes` | *Optional[str]* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 | +| `post_as_draft` | *Optional[bool]* | :heavy_minus_sign: | For supported accouting platforms, setting this optional property to true will post the transaction to a drafted state. | | +| `type` | [shared.ExpenseTransactionType](../../models/shared/expensetransactiontype.md) | :heavy_check_mark: | The type of transaction. | Payment | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/expensetransactionline.md b/sync-for-expenses/docs/models/shared/expensetransactionline.md old mode 100755 new mode 100644 index 8f63e4aa4..b3df08d1c --- a/sync-for-expenses/docs/models/shared/expensetransactionline.md +++ b/sync-for-expenses/docs/models/shared/expensetransactionline.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `account_ref` | [RecordRef](../../models/shared/recordref.md) | :heavy_check_mark: | N/A | | -| `net_amount` | *Decimal* | :heavy_check_mark: | Amount of the line, exclusive of tax. | 110.42 | -| `tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax for the line. | 14.43 | -| `tax_rate_ref` | [Optional[RecordRef]](../../models/shared/recordref.md) | :heavy_minus_sign: | N/A | | -| `tracking_refs` | List[[RecordRef](../../models/shared/recordref.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `account_ref` | [shared.RecordRef](../../models/shared/recordref.md) | :heavy_check_mark: | N/A | | +| `invoice_to` | [Optional[shared.InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Unique identifier of the customer the expense is billable to. The invoiceTo object is currently only supported for QBO. | | +| `net_amount` | *Decimal* | :heavy_check_mark: | Amount of the line, exclusive of tax. | 110.42 | +| `tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax for the line. | 14.43 | +| `tax_rate_ref` | [Optional[shared.RecordRef]](../../models/shared/recordref.md) | :heavy_minus_sign: | N/A | | +| `tracking_refs` | List[[shared.TrackingRef](../../models/shared/trackingref.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/expensetransactiontype.md b/sync-for-expenses/docs/models/shared/expensetransactiontype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/halref.md b/sync-for-expenses/docs/models/shared/halref.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/initiatesync.md b/sync-for-expenses/docs/models/shared/initiatesync.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/integrationtype.md b/sync-for-expenses/docs/models/shared/integrationtype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/invoiceto.md b/sync-for-expenses/docs/models/shared/invoiceto.md new file mode 100644 index 000000000..65939c6ec --- /dev/null +++ b/sync-for-expenses/docs/models/shared/invoiceto.md @@ -0,0 +1,9 @@ +# InvoiceTo + +Unique identifier of the customer the expense is billable to. The invoiceTo object is currently only supported for QBO. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/items.md b/sync-for-expenses/docs/models/shared/items.md old mode 100755 new mode 100644 index c0adcf092..6c2e07a2e --- a/sync-for-expenses/docs/models/shared/items.md +++ b/sync-for-expenses/docs/models/shared/items.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `city` | *Optional[str]* | :heavy_minus_sign: | City of the customer address. | -| `country` | *Optional[str]* | :heavy_minus_sign: | Country of the customer address. | -| `line1` | *Optional[str]* | :heavy_minus_sign: | Line 1 of the customer address. | -| `line2` | *Optional[str]* | :heavy_minus_sign: | Line 2 of the customer address. | -| `postal_code` | *Optional[str]* | :heavy_minus_sign: | Postal code or zip code. | -| `region` | *Optional[str]* | :heavy_minus_sign: | Region of the customer address. | -| `type` | [AccountingAddressType](../../models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `city` | *Optional[str]* | :heavy_minus_sign: | City of the customer address. | +| `country` | *Optional[str]* | :heavy_minus_sign: | Country of the customer address. | +| `line1` | *Optional[str]* | :heavy_minus_sign: | Line 1 of the customer address. | +| `line2` | *Optional[str]* | :heavy_minus_sign: | Line 2 of the customer address. | +| `postal_code` | *Optional[str]* | :heavy_minus_sign: | Postal code or zip code. | +| `region` | *Optional[str]* | :heavy_minus_sign: | Region of the customer address. | +| `type` | [shared.AccountingAddressType](../../models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/links.md b/sync-for-expenses/docs/models/shared/links.md old mode 100755 new mode 100644 index 7aad1ea5d..5f80d2652 --- a/sync-for-expenses/docs/models/shared/links.md +++ b/sync-for-expenses/docs/models/shared/links.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `current` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | -| `next` | [Optional[HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `previous` | [Optional[HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `self_` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `current` | [shared.HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | +| `next` | [Optional[shared.HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | +| `previous` | [Optional[shared.HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | +| `self_` | [shared.HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/mappingoptions.md b/sync-for-expenses/docs/models/shared/mappingoptions.md old mode 100755 new mode 100644 index 794a5ff03..4f615b4b0 --- a/sync-for-expenses/docs/models/shared/mappingoptions.md +++ b/sync-for-expenses/docs/models/shared/mappingoptions.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `accounts` | List[[AccountMappingInfo](../../models/shared/accountmappinginfo.md)] | :heavy_minus_sign: | Array of available accounts for mapping. | | -| `expense_provider` | *Optional[str]* | :heavy_minus_sign: | Name of the expense integration. | Partner Expense | -| `tax_rates` | List[[TaxRateMappingInfo](../../models/shared/taxratemappinginfo.md)] | :heavy_minus_sign: | Array of available tax rates for mapping. | | -| `tracking_categories` | List[[TrackingCategoryMappingInfo](../../models/shared/trackingcategorymappinginfo.md)] | :heavy_minus_sign: | Array of available tracking categories for mapping. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `accounts` | List[[shared.AccountMappingInfo](../../models/shared/accountmappinginfo.md)] | :heavy_minus_sign: | Array of available accounts for mapping. | | +| `expense_provider` | *Optional[str]* | :heavy_minus_sign: | Name of the expense integration. | Partner Expense | +| `tax_rates` | List[[shared.TaxRateMappingInfo](../../models/shared/taxratemappinginfo.md)] | :heavy_minus_sign: | Array of available tax rates for mapping. | | +| `tracking_categories` | List[[shared.TrackingCategoryMappingInfo](../../models/shared/trackingcategorymappinginfo.md)] | :heavy_minus_sign: | Array of available tracking categories for mapping. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/metadata.md b/sync-for-expenses/docs/models/shared/metadata.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/phone.md b/sync-for-expenses/docs/models/shared/phone.md new file mode 100644 index 000000000..c7eac7219 --- /dev/null +++ b/sync-for-expenses/docs/models/shared/phone.md @@ -0,0 +1,9 @@ +# Phone + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `number` | *Optional[str]* | :heavy_check_mark: | A phone number. | +44 25691 154789 | +| `type` | [shared.PhoneNumberType](../../models/shared/phonenumbertype.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/phonenumbertype.md b/sync-for-expenses/docs/models/shared/phonenumbertype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/pulloperation.md b/sync-for-expenses/docs/models/shared/pulloperation.md old mode 100755 new mode 100644 index 07104cbd5..629e645ab --- a/sync-for-expenses/docs/models/shared/pulloperation.md +++ b/sync-for-expenses/docs/models/shared/pulloperation.md @@ -9,13 +9,14 @@ Information about a queued, in progress or completed pull operation. | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | Unique identifier of the company associated to this pull operation. | 22ece347-e5f6-4896-95e0-35a4c7f17023 | -| `completed` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `completed` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `connection_id` | *str* | :heavy_check_mark: | Unique identifier of the connection associated to this pull operation. | 50830828-7d39-4367-b0eb-5ddb2de5faa5 | -| `data_type` | [DataType](../../models/shared/datatype.md) | :heavy_check_mark: | Available Data types | invoices | +| `data_type` | *str* | :heavy_check_mark: | The data type you are requesting in a pull operation. | | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about a transient or persistent error. | | | `id` | *str* | :heavy_check_mark: | Unique identifier of the pull operation. | 943accd0-4247-42d8-865b-363c8629e1da | -| `is_completed` | *bool* | :heavy_check_mark: | `True` if the pull operation completed successfully. | | +| `is_completed` | *bool* | :heavy_check_mark: | `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. | | | `is_errored` | *bool* | :heavy_check_mark: | `True` if the pull operation entered an error state. | | | `progress` | *int* | :heavy_check_mark: | An integer signifying the progress of the pull operation. | | -| `requested` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PullOperationStatus](../../models/shared/pulloperationstatus.md) | :heavy_check_mark: | The current status of the pull operation. | Complete | \ No newline at end of file +| `requested` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.Status](../../models/shared/status.md) | :heavy_check_mark: | The current status of the pull operation. | Complete | +| `status_description` | *Optional[str]* | :heavy_minus_sign: | Additional information about the dataset status. | Paused until 2022-10-23T00:00:00.000Z | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pulloperations.md b/sync-for-expenses/docs/models/shared/pulloperations.md old mode 100755 new mode 100644 index e15916751..bc8a8c451 --- a/sync-for-expenses/docs/models/shared/pulloperations.md +++ b/sync-for-expenses/docs/models/shared/pulloperations.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[PullOperation](../../models/shared/pulloperation.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.PullOperation](../../models/shared/pulloperation.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushchangetype.md b/sync-for-expenses/docs/models/shared/pushchangetype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/pushfieldvalidation.md b/sync-for-expenses/docs/models/shared/pushfieldvalidation.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/pushoperation.md b/sync-for-expenses/docs/models/shared/pushoperation.md old mode 100755 new mode 100644 index 4e0594ecc..4dd49b0f0 --- a/sync-for-expenses/docs/models/shared/pushoperation.md +++ b/sync-for-expenses/docs/models/shared/pushoperation.md @@ -5,16 +5,16 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoperationchange.md b/sync-for-expenses/docs/models/shared/pushoperationchange.md old mode 100755 new mode 100644 index cf6e86896..3238ecf64 --- a/sync-for-expenses/docs/models/shared/pushoperationchange.md +++ b/sync-for-expenses/docs/models/shared/pushoperationchange.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `attachment_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | -| `record_ref` | [Optional[PushOperationRef]](../../models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[PushChangeType]](../../models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `attachment_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | +| `record_ref` | [Optional[shared.PushOperationRef]](../../models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | +| `type` | [Optional[shared.PushChangeType]](../../models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoperationref.md b/sync-for-expenses/docs/models/shared/pushoperationref.md old mode 100755 new mode 100644 index df895faa0..44929acb0 --- a/sync-for-expenses/docs/models/shared/pushoperationref.md +++ b/sync-for-expenses/docs/models/shared/pushoperationref.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | -| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a push operation. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a push operation. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoperations.md b/sync-for-expenses/docs/models/shared/pushoperations.md old mode 100755 new mode 100644 index 1f224ca9b..be6e80331 --- a/sync-for-expenses/docs/models/shared/pushoperations.md +++ b/sync-for-expenses/docs/models/shared/pushoperations.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoperationstatus.md b/sync-for-expenses/docs/models/shared/pushoperationstatus.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/pushoption.md b/sync-for-expenses/docs/models/shared/pushoption.md old mode 100755 new mode 100644 index 72e02d203..e908d0b28 --- a/sync-for-expenses/docs/models/shared/pushoption.md +++ b/sync-for-expenses/docs/models/shared/pushoption.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `description` | *Optional[str]* | :heavy_minus_sign: | A description of the property. | -| `display_name` | *str* | :heavy_check_mark: | The property's display name. | -| `options` | List[[PushOptionChoice](../../models/shared/pushoptionchoice.md)] | :heavy_minus_sign: | N/A | -| `properties` | Dict[str, [PushOptionProperty](../../models/shared/pushoptionproperty.md)] | :heavy_minus_sign: | N/A | -| `required` | *bool* | :heavy_check_mark: | The property is required if `True`. | -| `type` | [PushOptionType](../../models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | -| `validation` | [Optional[PushValidationInfo]](../../models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `description` | *Optional[str]* | :heavy_minus_sign: | A description of the property. | +| `display_name` | *str* | :heavy_check_mark: | The property's display name. | +| `options` | List[[shared.PushOptionChoice](../../models/shared/pushoptionchoice.md)] | :heavy_minus_sign: | N/A | +| `properties` | Dict[str, [shared.PushOptionProperty](../../models/shared/pushoptionproperty.md)] | :heavy_minus_sign: | N/A | +| `required` | *bool* | :heavy_check_mark: | The property is required if `True`. | +| `type` | [shared.PushOptionType](../../models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | +| `validation` | [Optional[shared.PushValidationInfo]](../../models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoptionchoice.md b/sync-for-expenses/docs/models/shared/pushoptionchoice.md old mode 100755 new mode 100644 index 0b1c9b987..44e988b26 --- a/sync-for-expenses/docs/models/shared/pushoptionchoice.md +++ b/sync-for-expenses/docs/models/shared/pushoptionchoice.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `description` | *Optional[str]* | :heavy_minus_sign: | A description of the property. | -| `display_name` | *Optional[str]* | :heavy_minus_sign: | The property's display name. | -| `required` | *Optional[bool]* | :heavy_minus_sign: | The property is required if `True`. | -| `type` | [Optional[PushOptionType]](../../models/shared/pushoptiontype.md) | :heavy_minus_sign: | The option type. | -| `value` | *Optional[str]* | :heavy_minus_sign: | Allowed value for field. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `description` | *Optional[str]* | :heavy_minus_sign: | A description of the property. | +| `display_name` | *Optional[str]* | :heavy_minus_sign: | The property's display name. | +| `required` | *Optional[bool]* | :heavy_minus_sign: | The property is required if `True`. | +| `type` | [Optional[shared.PushOptionType]](../../models/shared/pushoptiontype.md) | :heavy_minus_sign: | The option type. | +| `value` | *Optional[str]* | :heavy_minus_sign: | Allowed value for field. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoptionproperty.md b/sync-for-expenses/docs/models/shared/pushoptionproperty.md old mode 100755 new mode 100644 index c53a8177f..2bedd19d3 --- a/sync-for-expenses/docs/models/shared/pushoptionproperty.md +++ b/sync-for-expenses/docs/models/shared/pushoptionproperty.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `description` | *str* | :heavy_check_mark: | A description of the property. | -| `display_name` | *str* | :heavy_check_mark: | The property's display name. | -| `options` | List[[PushOptionChoice](../../models/shared/pushoptionchoice.md)] | :heavy_minus_sign: | N/A | -| `properties` | Dict[str, [PushOptionProperty](../../models/shared/pushoptionproperty.md)] | :heavy_minus_sign: | N/A | -| `required` | *bool* | :heavy_check_mark: | The property is required if `True`. | -| `type` | [PushOptionType](../../models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | -| `validation` | [Optional[PushValidationInfo]](../../models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `description` | *str* | :heavy_check_mark: | A description of the property. | +| `display_name` | *str* | :heavy_check_mark: | The property's display name. | +| `options` | List[[shared.PushOptionChoice](../../models/shared/pushoptionchoice.md)] | :heavy_minus_sign: | N/A | +| `properties` | Dict[str, [shared.PushOptionProperty](../../models/shared/pushoptionproperty.md)] | :heavy_minus_sign: | N/A | +| `required` | *bool* | :heavy_check_mark: | The property is required if `True`. | +| `type` | [shared.PushOptionType](../../models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | +| `validation` | [Optional[shared.PushValidationInfo]](../../models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/pushoptiontype.md b/sync-for-expenses/docs/models/shared/pushoptiontype.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/pushvalidationinfo.md b/sync-for-expenses/docs/models/shared/pushvalidationinfo.md old mode 100755 new mode 100644 index bf2fdc062..110eb3f76 --- a/sync-for-expenses/docs/models/shared/pushvalidationinfo.md +++ b/sync-for-expenses/docs/models/shared/pushvalidationinfo.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `information` | List[[PushFieldValidation](../../models/shared/pushfieldvalidation.md)] | :heavy_minus_sign: | N/A | -| `warnings` | List[[PushFieldValidation](../../models/shared/pushfieldvalidation.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `information` | List[[shared.PushFieldValidation](../../models/shared/pushfieldvalidation.md)] | :heavy_minus_sign: | N/A | +| `warnings` | List[[shared.PushFieldValidation](../../models/shared/pushfieldvalidation.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/recordref.md b/sync-for-expenses/docs/models/shared/recordref.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/schemadatatype.md b/sync-for-expenses/docs/models/shared/schemadatatype.md new file mode 100644 index 000000000..6f6f50a0c --- /dev/null +++ b/sync-for-expenses/docs/models/shared/schemadatatype.md @@ -0,0 +1,52 @@ +# SchemaDataType + +Available Data types + + +## Values + +| Name | Value | +| -------------------------------- | -------------------------------- | +| `ACCOUNT_TRANSACTIONS` | accountTransactions | +| `BALANCE_SHEET` | balanceSheet | +| `BANK_ACCOUNTS` | bankAccounts | +| `BANK_TRANSACTIONS` | bankTransactions | +| `BILL_CREDIT_NOTES` | billCreditNotes | +| `BILL_PAYMENTS` | billPayments | +| `BILLS` | bills | +| `CASH_FLOW_STATEMENT` | cashFlowStatement | +| `CHART_OF_ACCOUNTS` | chartOfAccounts | +| `COMPANY` | company | +| `CREDIT_NOTES` | creditNotes | +| `CUSTOMERS` | customers | +| `DIRECT_COSTS` | directCosts | +| `DIRECT_INCOMES` | directIncomes | +| `INVOICES` | invoices | +| `ITEM_RECEIPTS` | itemReceipts | +| `ITEMS` | items | +| `JOURNAL_ENTRIES` | journalEntries | +| `JOURNALS` | journals | +| `PAYMENT_METHODS` | paymentMethods | +| `PAYMENTS` | payments | +| `PROFIT_AND_LOSS` | profitAndLoss | +| `PURCHASE_ORDERS` | purchaseOrders | +| `SALES_ORDERS` | salesOrders | +| `SUPPLIERS` | suppliers | +| `TAX_RATES` | taxRates | +| `TRACKING_CATEGORIES` | trackingCategories | +| `TRANSFERS` | transfers | +| `BANKING_ACCOUNT_BALANCES` | banking-accountBalances | +| `BANKING_ACCOUNTS` | banking-accounts | +| `BANKING_TRANSACTION_CATEGORIES` | banking-transactionCategories | +| `BANKING_TRANSACTIONS` | banking-transactions | +| `COMMERCE_COMPANY_INFO` | commerce-companyInfo | +| `COMMERCE_CUSTOMERS` | commerce-customers | +| `COMMERCE_DISPUTES` | commerce-disputes | +| `COMMERCE_LOCATIONS` | commerce-locations | +| `COMMERCE_ORDERS` | commerce-orders | +| `COMMERCE_PAYMENT_METHODS` | commerce-paymentMethods | +| `COMMERCE_PAYMENTS` | commerce-payments | +| `COMMERCE_PRODUCT_CATEGORIES` | commerce-productCategories | +| `COMMERCE_PRODUCTS` | commerce-products | +| `COMMERCE_TAX_COMPONENTS` | commerce-taxComponents | +| `COMMERCE_TRANSACTIONS` | commerce-transactions | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/security.md b/sync-for-expenses/docs/models/shared/security.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/connectionsourcetype.md b/sync-for-expenses/docs/models/shared/sourcetype.md old mode 100755 new mode 100644 similarity index 92% rename from sync-for-expenses/docs/models/shared/connectionsourcetype.md rename to sync-for-expenses/docs/models/shared/sourcetype.md index 85e691690..e32b27ce4 --- a/sync-for-expenses/docs/models/shared/connectionsourcetype.md +++ b/sync-for-expenses/docs/models/shared/sourcetype.md @@ -1,4 +1,4 @@ -# ConnectionSourceType +# SourceType The type of platform of the connection. diff --git a/sync-for-expenses/docs/models/shared/pulloperationstatus.md b/sync-for-expenses/docs/models/shared/status.md old mode 100755 new mode 100644 similarity index 98% rename from sync-for-expenses/docs/models/shared/pulloperationstatus.md rename to sync-for-expenses/docs/models/shared/status.md index 8f1bae914..564fc4f24 --- a/sync-for-expenses/docs/models/shared/pulloperationstatus.md +++ b/sync-for-expenses/docs/models/shared/status.md @@ -1,4 +1,4 @@ -# PullOperationStatus +# Status The current status of the pull operation. diff --git a/sync-for-expenses/docs/models/shared/supplementaldata.md b/sync-for-expenses/docs/models/shared/supplementaldata.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/supplier.md b/sync-for-expenses/docs/models/shared/supplier.md old mode 100755 new mode 100644 index 29804fee0..4454fe9ec --- a/sync-for-expenses/docs/models/shared/supplier.md +++ b/sync-for-expenses/docs/models/shared/supplier.md @@ -11,17 +11,17 @@ From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addresses` | List[[SupplierAccountingAddress](../../models/shared/supplieraccountingaddress.md)] | :heavy_minus_sign: | An array of Addresses. | | +| `addresses` | List[[shared.Items](../../models/shared/items.md)] | :heavy_minus_sign: | An array of Addresses. | | | `contact_name` | *Optional[str]* | :heavy_minus_sign: | Name of the main contact for the supplier. | | | `default_currency` | *Optional[str]* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | | `email_address` | *Optional[str]* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting platform. | | -| `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `metadata` | [Optional[shared.Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | | `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 | | `registration_number` | *Optional[str]* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | -| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `status` | [SupplierStatus](../../models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.SupplierStatus](../../models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | +| `supplemental_data` | [Optional[shared.SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `supplier_name` | *Optional[str]* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | | `tax_number` | *Optional[str]* | :heavy_minus_sign: | Supplier's company tax number. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/supplieraccountingaddress.md b/sync-for-expenses/docs/models/shared/supplieraccountingaddress.md deleted file mode 100755 index 7d316b0ae..000000000 --- a/sync-for-expenses/docs/models/shared/supplieraccountingaddress.md +++ /dev/null @@ -1,14 +0,0 @@ -# SupplierAccountingAddress - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `city` | *Optional[str]* | :heavy_minus_sign: | City of the customer address. | -| `country` | *Optional[str]* | :heavy_minus_sign: | Country of the customer address. | -| `line1` | *Optional[str]* | :heavy_minus_sign: | Line 1 of the customer address. | -| `line2` | *Optional[str]* | :heavy_minus_sign: | Line 2 of the customer address. | -| `postal_code` | *Optional[str]* | :heavy_minus_sign: | Postal code or zip code. | -| `region` | *Optional[str]* | :heavy_minus_sign: | Region of the customer address. | -| `type` | [AccountingAddressType](../../models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/supplierdetails.md b/sync-for-expenses/docs/models/shared/supplierdetails.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/suppliers.md b/sync-for-expenses/docs/models/shared/suppliers.md old mode 100755 new mode 100644 index c027182e6..5b6c7f7c5 --- a/sync-for-expenses/docs/models/shared/suppliers.md +++ b/sync-for-expenses/docs/models/shared/suppliers.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Supplier](../../models/shared/supplier.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Supplier](../../models/shared/supplier.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/supplierstatus.md b/sync-for-expenses/docs/models/shared/supplierstatus.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/synccompletewebhook.md b/sync-for-expenses/docs/models/shared/synccompletewebhook.md old mode 100755 new mode 100644 index 002c3ed9e..83f2d41d9 --- a/sync-for-expenses/docs/models/shared/synccompletewebhook.md +++ b/sync-for-expenses/docs/models/shared/synccompletewebhook.md @@ -5,13 +5,13 @@ Webhook request body used to notify that a sync has completed. ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | | -| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `data` | [Optional[SyncCompleteWebhookData]](../../models/shared/synccompletewebhookdata.md) | :heavy_minus_sign: | N/A | | -| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | | -| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | | +| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `data` | [Optional[shared.SyncCompleteWebhookData]](../../models/shared/synccompletewebhookdata.md) | :heavy_minus_sign: | N/A | | +| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | | +| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | | +| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/synccompletewebhookdata.md b/sync-for-expenses/docs/models/shared/synccompletewebhookdata.md old mode 100755 new mode 100644 index f6f6204bd..c91dfff38 --- a/sync-for-expenses/docs/models/shared/synccompletewebhookdata.md +++ b/sync-for-expenses/docs/models/shared/synccompletewebhookdata.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sync_date_range_finish_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `sync_date_range_start_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `sync_date_range_finish_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `sync_date_range_start_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `sync_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the failed sync. | a9367074-b5c3-42c4-9be4-be129f43577e | | `sync_type` | *Optional[str]* | :heavy_minus_sign: | The type of sync being performed. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/syncfailedwebhook.md b/sync-for-expenses/docs/models/shared/syncfailedwebhook.md old mode 100755 new mode 100644 index 4054cefff..3d9768522 --- a/sync-for-expenses/docs/models/shared/syncfailedwebhook.md +++ b/sync-for-expenses/docs/models/shared/syncfailedwebhook.md @@ -5,13 +5,13 @@ Webhook request body used to notify that a sync has failed. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | | -| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `data` | [Optional[SyncFailedWebhookData]](../../models/shared/syncfailedwebhookdata.md) | :heavy_minus_sign: | N/A | | -| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | | -| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | | +| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `data` | [Optional[shared.SyncFailedWebhookData]](../../models/shared/syncfailedwebhookdata.md) | :heavy_minus_sign: | N/A | | +| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | | +| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | | +| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/syncfailedwebhookdata.md b/sync-for-expenses/docs/models/shared/syncfailedwebhookdata.md old mode 100755 new mode 100644 index 6a40dc445..e0e0fad05 --- a/sync-for-expenses/docs/models/shared/syncfailedwebhookdata.md +++ b/sync-for-expenses/docs/models/shared/syncfailedwebhookdata.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `failure_stage` | *Optional[str]* | :heavy_minus_sign: | The stage of the job the sync failed. | | -| `sync_date_range_finish_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `sync_date_range_start_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `sync_date_range_finish_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `sync_date_range_start_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `sync_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the failed sync. | a9367074-b5c3-42c4-9be4-be129f43577e | | `sync_type` | *Optional[str]* | :heavy_minus_sign: | The type of sync being performed. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/syncinitiated.md b/sync-for-expenses/docs/models/shared/syncinitiated.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/syncstartedwebhook.md b/sync-for-expenses/docs/models/shared/syncstartedwebhook.md old mode 100755 new mode 100644 index 15f31c0c6..5c4d7a6db --- a/sync-for-expenses/docs/models/shared/syncstartedwebhook.md +++ b/sync-for-expenses/docs/models/shared/syncstartedwebhook.md @@ -5,13 +5,13 @@ Webhook request body used to notify that a sync has started. ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | | -| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `data` | [Optional[SyncStartedWebhookData]](../../models/shared/syncstartedwebhookdata.md) | :heavy_minus_sign: | N/A | | -| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | | -| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | | -| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. | | +| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `data` | [Optional[shared.Data]](../../models/shared/data.md) | :heavy_minus_sign: | N/A | | +| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. | | +| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. | | +| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/taxratemappinginfo.md b/sync-for-expenses/docs/models/shared/taxratemappinginfo.md old mode 100755 new mode 100644 index 32486fbc9..27698b835 --- a/sync-for-expenses/docs/models/shared/taxratemappinginfo.md +++ b/sync-for-expenses/docs/models/shared/taxratemappinginfo.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `code` | *Optional[str]* | :heavy_minus_sign: | Code for the tax rate from the accounting platform. | UK Standard Rate (Bills) | -| `effective_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Effective tax rate. | 20 | -| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of tax rate. | 59_Bills | -| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tax rate in the accounting platform. | UK Standard Rate (Bills) Bills | -| `total_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | 20 | -| `valid_transaction_types` | List[[TaxRateMappingInfoValidTransactionTypes](../../models/shared/taxratemappinginfovalidtransactiontypes.md)] | :heavy_minus_sign: | Supported transaction types for the account. | Payment | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `code` | *Optional[str]* | :heavy_minus_sign: | Code for the tax rate from the accounting platform. | UK Standard Rate (Bills) | +| `effective_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Effective tax rate. | 20 | +| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of tax rate. | 59_Bills | +| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tax rate in the accounting platform. | UK Standard Rate (Bills) Bills | +| `total_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | 20 | +| `valid_transaction_types` | List[[shared.TaxRateMappingInfoValidTransactionTypes](../../models/shared/taxratemappinginfovalidtransactiontypes.md)] | :heavy_minus_sign: | Supported transaction types for the account. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/taxratemappinginfovalidtransactiontypes.md b/sync-for-expenses/docs/models/shared/taxratemappinginfovalidtransactiontypes.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/trackingcategorymappinginfo.md b/sync-for-expenses/docs/models/shared/trackingcategorymappinginfo.md old mode 100755 new mode 100644 index b0efc30f6..daa85c2fa --- a/sync-for-expenses/docs/models/shared/trackingcategorymappinginfo.md +++ b/sync-for-expenses/docs/models/shared/trackingcategorymappinginfo.md @@ -7,6 +7,6 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `has_children` | *Optional[bool]* | :heavy_minus_sign: | Boolean of whether the tracking category has child categories. | | | `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the tracking category. | DEPARTMENT_2 | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tracking category as it appears in the accounting software. | New York | | `parent_id` | *Optional[str]* | :heavy_minus_sign: | ID of the parent tracking category | DEPARTMENTS | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/trackingref.md b/sync-for-expenses/docs/models/shared/trackingref.md new file mode 100644 index 000000000..3ca9e0262 --- /dev/null +++ b/sync-for-expenses/docs/models/shared/trackingref.md @@ -0,0 +1,9 @@ +# TrackingRef + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `data_type` | [Optional[shared.TrackingRefDataType]](../../models/shared/trackingrefdatatype.md) | :heavy_minus_sign: | The type of the linked reference | trackingCategories | +| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer. | e9a1b63d-9ff0-40e7-8038-016354b987e6 | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/trackingrefdatatype.md b/sync-for-expenses/docs/models/shared/trackingrefdatatype.md new file mode 100644 index 000000000..d51f15959 --- /dev/null +++ b/sync-for-expenses/docs/models/shared/trackingrefdatatype.md @@ -0,0 +1,11 @@ +# TrackingRefDataType + +The type of the linked reference + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `TRACKING_CATEGORIES` | trackingCategories | +| `CUSTOMERS` | customers | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/transaction.md b/sync-for-expenses/docs/models/shared/transaction.md old mode 100755 new mode 100644 index fa152f224..4ab7f9a7d --- a/sync-for-expenses/docs/models/shared/transaction.md +++ b/sync-for-expenses/docs/models/shared/transaction.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `integration_type` | [Optional[IntegrationType]](../../models/shared/integrationtype.md) | :heavy_minus_sign: | Type of transaction that has been processed e.g. Expense or Bank Feed. | expenses | +| `integration_type` | [Optional[shared.IntegrationType]](../../models/shared/integrationtype.md) | :heavy_minus_sign: | Type of transaction that has been processed e.g. Expense or Bank Feed. | expenses | | `message` | *Optional[str]* | :heavy_minus_sign: | Metadata such as validation errors or the resulting record created in the accounting software. | | -| `status` | [Optional[TransactionStatus]](../../models/shared/transactionstatus.md) | :heavy_minus_sign: | Status of the transaction. | Completed | +| `status` | [Optional[shared.TransactionStatus]](../../models/shared/transactionstatus.md) | :heavy_minus_sign: | Status of the transaction. | Completed | | `transaction_id` | *Optional[str]* | :heavy_minus_sign: | Your unique idenfier of the transaction. | aa02271d-ed5f-47f5-be76-778d5905225a | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/transactions.md b/sync-for-expenses/docs/models/shared/transactions.md old mode 100755 new mode 100644 index 0cc12f4d9..f69947d2d --- a/sync-for-expenses/docs/models/shared/transactions.md +++ b/sync-for-expenses/docs/models/shared/transactions.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Transaction](../../models/shared/transaction.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Transaction](../../models/shared/transaction.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/transactionstatus.md b/sync-for-expenses/docs/models/shared/transactionstatus.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/contactreftype.md b/sync-for-expenses/docs/models/shared/type.md old mode 100755 new mode 100644 similarity index 87% rename from sync-for-expenses/docs/models/shared/contactreftype.md rename to sync-for-expenses/docs/models/shared/type.md index c5c1ce3c1..0c8688ed8 --- a/sync-for-expenses/docs/models/shared/contactreftype.md +++ b/sync-for-expenses/docs/models/shared/type.md @@ -1,4 +1,4 @@ -# ContactRefType +# Type The type of contact. diff --git a/sync-for-expenses/docs/models/shared/updatecustomerresponse.md b/sync-for-expenses/docs/models/shared/updatecustomerresponse.md old mode 100755 new mode 100644 index 17c870ff4..642b387c8 --- a/sync-for-expenses/docs/models/shared/updatecustomerresponse.md +++ b/sync-for-expenses/docs/models/shared/updatecustomerresponse.md @@ -5,17 +5,17 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `data` | [Optional[Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | > View the coverage for customers in the Data coverage explorer.

## Overview

A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers).

Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice).
| | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `data` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | > View the coverage for customers in the Data coverage explorer.

## Overview

A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers).

Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice).
| | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/updateexpenserequest.md b/sync-for-expenses/docs/models/shared/updateexpenserequest.md old mode 100755 new mode 100644 index a90ebe9ee..9c1a04e98 --- a/sync-for-expenses/docs/models/shared/updateexpenserequest.md +++ b/sync-for-expenses/docs/models/shared/updateexpenserequest.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `bank_account_ref` | [Optional[UpdateExpenseRequestBankAccountReference]](../../models/shared/updateexpenserequestbankaccountreference.md) | :heavy_minus_sign: | N/A | | -| `contact_ref` | [Optional[ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | N/A | | -| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency the transaction was recorded in. | GBP | -| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `issue_date` | *str* | :heavy_check_mark: | Date the transaction was recorded. | 2022-06-28T00:00:00.000Z | -| `lines` | List[[ExpenseTransactionLine](../../models/shared/expensetransactionline.md)] | :heavy_minus_sign: | Array of transaction lines. | | -| `merchant_name` | *Optional[str]* | :heavy_minus_sign: | Name of the merchant where the purchase took place | Amazon UK | -| `notes` | *Optional[str]* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 | -| `type` | *Any* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bank_account_ref` | [Optional[shared.UpdateExpenseRequestBankAccountReference]](../../models/shared/updateexpenserequestbankaccountreference.md) | :heavy_minus_sign: | N/A | | +| `contact_ref` | [Optional[shared.ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | N/A | | +| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency the transaction was recorded in. | GBP | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. \| | | +| `issue_date` | *str* | :heavy_check_mark: | Date the transaction was recorded. | 2022-06-28T00:00:00.000Z | +| `lines` | List[[shared.ExpenseTransactionLine](../../models/shared/expensetransactionline.md)] | :heavy_minus_sign: | Array of transaction lines. | | +| `merchant_name` | *Optional[str]* | :heavy_minus_sign: | Name of the merchant where the purchase took place | Amazon UK | +| `notes` | *Optional[str]* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 | +| `type` | *Any* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/updateexpenserequestbankaccountreference.md b/sync-for-expenses/docs/models/shared/updateexpenserequestbankaccountreference.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/updateexpenseresponse.md b/sync-for-expenses/docs/models/shared/updateexpenseresponse.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/updatesupplierresponse.md b/sync-for-expenses/docs/models/shared/updatesupplierresponse.md old mode 100755 new mode 100644 index e9ad2b7b9..ee13cc5a8 --- a/sync-for-expenses/docs/models/shared/updatesupplierresponse.md +++ b/sync-for-expenses/docs/models/shared/updatesupplierresponse.md @@ -5,17 +5,17 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `data` | [Optional[Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | > View the coverage for suppliers in the Data coverage explorer.

## Overview

From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). | | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `data` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | > View the coverage for suppliers in the Data coverage explorer.

## Overview

From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). | | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/validation.md b/sync-for-expenses/docs/models/shared/validation.md old mode 100755 new mode 100644 index 294281b51..4cfc544dc --- a/sync-for-expenses/docs/models/shared/validation.md +++ b/sync-for-expenses/docs/models/shared/validation.md @@ -5,7 +5,7 @@ A human-readable object describing validation decisions Codat has made when push ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `errors` | List[[ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | -| `warnings` | List[[ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `errors` | List[[shared.ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | +| `warnings` | List[[shared.ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/validationitem.md b/sync-for-expenses/docs/models/shared/validationitem.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/shared/validdatatypelinks.md b/sync-for-expenses/docs/models/shared/validdatatypelinks.md new file mode 100644 index 000000000..61f7858d8 --- /dev/null +++ b/sync-for-expenses/docs/models/shared/validdatatypelinks.md @@ -0,0 +1,50 @@ +# ValidDataTypeLinks + +When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. + +For example, `validDatatypeLinks` might indicate the following references: + +- Which tax rates are valid to use on the line item of a bill. +- Which items can be used when creating an invoice. + +You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + +## `validDatatypeLinks` example + +The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. + +```json validDatatypeLinks for an account +{ + "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + "nominalCode": "090", + "name": "Business Bank Account", + #... + "validDatatypeLinks": [ + { + "property": "Id", + "links": [ + "Payment.AccountRef.Id", + "BillPayment.AccountRef.Id", + "DirectIncome.LineItems.AccountRef.Id", + "DirectCost.LineItems.AccountRef.Id" + ] + } + ] + } +``` + + + +## Support for `validDatatypeLinks` + +Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. + +If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `links` | List[*str*] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | +| `property` | *Optional[str]* | :heavy_minus_sign: | The property from the account that can be linked. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/accountmappinginfovalidtransactiontypes.md b/sync-for-expenses/docs/models/shared/validtransactiontypes.md old mode 100755 new mode 100644 similarity index 90% rename from sync-for-expenses/docs/models/shared/accountmappinginfovalidtransactiontypes.md rename to sync-for-expenses/docs/models/shared/validtransactiontypes.md index 8f4f170b6..caed065f1 --- a/sync-for-expenses/docs/models/shared/accountmappinginfovalidtransactiontypes.md +++ b/sync-for-expenses/docs/models/shared/validtransactiontypes.md @@ -1,4 +1,4 @@ -# AccountMappingInfoValidTransactionTypes +# ValidTransactionTypes ## Values diff --git a/sync-for-expenses/docs/models/utils/retryconfig.md b/sync-for-expenses/docs/models/utils/retryconfig.md old mode 100755 new mode 100644 diff --git a/sync-for-expenses/docs/models/webhooks/clientratelimitreachedresponse.md b/sync-for-expenses/docs/models/webhooks/clientratelimitreachedresponse.md old mode 100755 new mode 100644 index 690170c94..4408f824d --- a/sync-for-expenses/docs/models/webhooks/clientratelimitreachedresponse.md +++ b/sync-for-expenses/docs/models/webhooks/clientratelimitreachedresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/webhooks/clientratelimitresetresponse.md b/sync-for-expenses/docs/models/webhooks/clientratelimitresetresponse.md old mode 100755 new mode 100644 index 9fdae0007..14a24dc94 --- a/sync-for-expenses/docs/models/webhooks/clientratelimitresetresponse.md +++ b/sync-for-expenses/docs/models/webhooks/clientratelimitresetresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/webhooks/synccompleteresponse.md b/sync-for-expenses/docs/models/webhooks/synccompleteresponse.md old mode 100755 new mode 100644 index 25f0fd387..443293629 --- a/sync-for-expenses/docs/models/webhooks/synccompleteresponse.md +++ b/sync-for-expenses/docs/models/webhooks/synccompleteresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/webhooks/syncfailedresponse.md b/sync-for-expenses/docs/models/webhooks/syncfailedresponse.md old mode 100755 new mode 100644 index 9b560f9a2..0ce59f2b4 --- a/sync-for-expenses/docs/models/webhooks/syncfailedresponse.md +++ b/sync-for-expenses/docs/models/webhooks/syncfailedresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/webhooks/syncstartedresponse.md b/sync-for-expenses/docs/models/webhooks/syncstartedresponse.md old mode 100755 new mode 100644 index 0108dfd38..512f8f94c --- a/sync-for-expenses/docs/models/webhooks/syncstartedresponse.md +++ b/sync-for-expenses/docs/models/webhooks/syncstartedresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/accounts/README.md b/sync-for-expenses/docs/sdks/accounts/README.md old mode 100755 new mode 100644 index 09f8c8b34..5e616aa62 --- a/sync-for-expenses/docs/sdks/accounts/README.md +++ b/sync-for-expenses/docs/sdks/accounts/README.md @@ -37,31 +37,27 @@ s = codatsyncexpenses.CodatSyncExpenses( ) req = operations.CreateAccountRequest( - account=shared.Account( + account_prototype=shared.AccountPrototype( currency='USD', current_balance=Decimal('0'), description='Invoices the business has issued but has not yet collected payment on.', fully_qualified_category='Asset.Current', fully_qualified_name='Cash On Hand', - id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e', - metadata=shared.AccountMetadata(), - modified_date='2022-10-23T00:00:00.000Z', name='Accounts Receivable', nominal_code='610', - source_modified_date='2022-10-23T00:00:00.000Z', status=shared.AccountStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "Money": { - "blue": 'shred', + 'key': { + 'key': 'string', }, }, ), type=shared.AccountType.ASSET, valid_datatype_links=[ - shared.AccountValidDataTypeLinks( + shared.ValidDataTypeLinks( links=[ - 'abnormally', + 'string', ], ), ], @@ -88,7 +84,12 @@ if res.create_account_response is not None: ### Response **[operations.CreateAccountResponse](../../models/operations/createaccountresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get_create_model @@ -138,4 +139,9 @@ if res.push_option is not None: ### Response **[operations.GetCreateChartOfAccountsModelResponse](../../models/operations/getcreatechartofaccountsmodelresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md old mode 100755 new mode 100644 index e152b19a0..b56efefd0 --- a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md +++ b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md @@ -13,7 +13,7 @@ integrations with multiple accounting platforms through a standardized API. [See our OpenAPI spec](https://github.com/codatio/oas) -Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Commerce](https://docs.codat.io/sync-for-expenses-v1-api#/). +Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). ### Available Operations diff --git a/sync-for-expenses/docs/sdks/companies/README.md b/sync-for-expenses/docs/sdks/companies/README.md old mode 100755 new mode 100644 index 8889b6dc5..20bc613da --- a/sync-for-expenses/docs/sdks/companies/README.md +++ b/sync-for-expenses/docs/sdks/companies/README.md @@ -56,7 +56,12 @@ if res.company is not None: ### Response **[operations.CreateCompanyResponse](../../models/operations/createcompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## delete @@ -97,7 +102,12 @@ if res.status_code == 200: ### Response **[operations.DeleteCompanyResponse](../../models/operations/deletecompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get @@ -137,7 +147,12 @@ if res.company is not None: ### Response **[operations.GetCompanyResponse](../../models/operations/getcompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -179,7 +194,12 @@ if res.companies is not None: ### Response **[operations.ListCompaniesResponse](../../models/operations/listcompaniesresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## update @@ -223,4 +243,9 @@ if res.company is not None: ### Response **[operations.UpdateCompanyResponse](../../models/operations/updatecompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/configuration/README.md b/sync-for-expenses/docs/sdks/configuration/README.md old mode 100755 new mode 100644 index 642434f4e..6946a0003 --- a/sync-for-expenses/docs/sdks/configuration/README.md +++ b/sync-for-expenses/docs/sdks/configuration/README.md @@ -49,7 +49,12 @@ if res.company_configuration is not None: ### Response **[operations.GetCompanyConfigurationResponse](../../models/operations/getcompanyconfigurationresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get_mapping_options @@ -89,7 +94,12 @@ if res.mapping_options is not None: ### Response **[operations.GetMappingOptionsResponse](../../models/operations/getmappingoptionsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## set @@ -136,4 +146,9 @@ if res.company_configuration is not None: ### Response **[operations.SetCompanyConfigurationResponse](../../models/operations/setcompanyconfigurationresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/connections/README.md b/sync-for-expenses/docs/sdks/connections/README.md old mode 100755 new mode 100644 index b35bef0b3..8ced9568c --- a/sync-for-expenses/docs/sdks/connections/README.md +++ b/sync-for-expenses/docs/sdks/connections/README.md @@ -57,7 +57,12 @@ if res.connection is not None: ### Response **[operations.CreateConnectionResponse](../../models/operations/createconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## create_partner_expense_connection @@ -97,7 +102,12 @@ if res.connection is not None: ### Response **[operations.CreatePartnerExpenseConnectionResponse](../../models/operations/createpartnerexpenseconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## delete @@ -139,7 +149,12 @@ if res.status_code == 200: ### Response **[operations.DeleteConnectionResponse](../../models/operations/deleteconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get @@ -180,7 +195,12 @@ if res.connection is not None: ### Response **[operations.GetConnectionResponse](../../models/operations/getconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -223,7 +243,12 @@ if res.connections is not None: ### Response **[operations.ListConnectionsResponse](../../models/operations/listconnectionsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## unlink @@ -265,4 +290,9 @@ if res.connection is not None: ### Response **[operations.UnlinkConnectionResponse](../../models/operations/unlinkconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/customers/README.md b/sync-for-expenses/docs/sdks/customers/README.md old mode 100755 new mode 100644 index e3209dd8b..42b6958cc --- a/sync-for-expenses/docs/sdks/customers/README.md +++ b/sync-for-expenses/docs/sdks/customers/README.md @@ -40,7 +40,7 @@ s = codatsyncexpenses.CodatSyncExpenses( req = operations.CreateCustomerRequest( customer=shared.Customer( addresses=[ - shared.Items( + shared.AccountingAddress( type=shared.AccountingAddressType.BILLING, ), ], @@ -49,9 +49,9 @@ req = operations.CreateCustomerRequest( address=shared.Items( type=shared.AccountingAddressType.BILLING, ), - modified_date='2022-10-23T00:00:00.000Z', + modified_date='2022-10-23T00:00:00Z', phone=[ - shared.ContactPhone( + shared.Phone( number='01224 658 999', type=shared.PhoneNumberType.MOBILE, ), @@ -61,13 +61,13 @@ req = operations.CreateCustomerRequest( ], default_currency='GBP', metadata=shared.Metadata(), - modified_date='2022-10-23T00:00:00.000Z', - source_modified_date='2022-10-23T00:00:00.000Z', + modified_date='2022-10-23T00:00:00Z', + source_modified_date='2022-10-23T00:00:00Z', status=shared.CustomerStatus.ARCHIVED, supplemental_data=shared.SupplementalData( content={ - "grey": { - "technology": 'East', + 'key': { + 'key': 'string', }, }, ), @@ -94,7 +94,12 @@ if res.create_customer_response is not None: ### Response **[operations.CreateCustomerResponse](../../models/operations/createcustomerresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get @@ -121,7 +126,7 @@ s = codatsyncexpenses.CodatSyncExpenses( req = operations.GetCustomerRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - customer_id='Northeast Hatchback Kia', + customer_id='string', ) res = s.customers.get(req) @@ -142,7 +147,12 @@ if res.customer is not None: ### Response **[operations.GetCustomerResponse](../../models/operations/getcustomerresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -190,7 +200,12 @@ if res.customers is not None: ### Response **[operations.ListCustomersResponse](../../models/operations/listcustomersresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## update @@ -220,7 +235,7 @@ s = codatsyncexpenses.CodatSyncExpenses( req = operations.UpdateCustomerRequest( customer=shared.Customer( addresses=[ - shared.Items( + shared.AccountingAddress( type=shared.AccountingAddressType.DELIVERY, ), ], @@ -229,9 +244,9 @@ req = operations.UpdateCustomerRequest( address=shared.Items( type=shared.AccountingAddressType.UNKNOWN, ), - modified_date='2022-10-23T00:00:00.000Z', + modified_date='2022-10-23T00:00:00Z', phone=[ - shared.ContactPhone( + shared.Phone( number='+44 25691 154789', type=shared.PhoneNumberType.LANDLINE, ), @@ -241,20 +256,20 @@ req = operations.UpdateCustomerRequest( ], default_currency='EUR', metadata=shared.Metadata(), - modified_date='2022-10-23T00:00:00.000Z', - source_modified_date='2022-10-23T00:00:00.000Z', + modified_date='2022-10-23T00:00:00Z', + source_modified_date='2022-10-23T00:00:00Z', status=shared.CustomerStatus.ARCHIVED, supplemental_data=shared.SupplementalData( content={ - "redundant": { - "cheater": 'Islands', + 'key': { + 'key': 'string', }, }, ), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='withdrawal extend', + customer_id='string', ) res = s.customers.update(req) @@ -275,4 +290,9 @@ if res.update_customer_response is not None: ### Response **[operations.UpdateCustomerResponse](../../models/operations/updatecustomerresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/expenses/README.md b/sync-for-expenses/docs/sdks/expenses/README.md old mode 100755 new mode 100644 index e1c63dd1b..f943f42fc --- a/sync-for-expenses/docs/sdks/expenses/README.md +++ b/sync-for-expenses/docs/sdks/expenses/README.md @@ -13,7 +13,21 @@ Create expense datasets and upload receipts. ## create -Create an expense transaction +The *Create expense* endpoint creates an [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting platform for a given company's connection. + +[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + +**Integration-specific behaviour** + +Some accounting platforms support the option of pushing transactions to a draft state. This can be done by setting the postAsDraft property on the transaction to true. For platforms without this feature, the postAsDraft property should be ignored or set to false. + +| Integration | Draft State | Details | +|-------------|-------------|--------------------------------------------------------------------------------------------------------------| +| Dynamics 365 Business Central | Yes | Setting postAsDraft to true will push the transactions to a drafted state rather than posting directly to the ledger. For transactions in a draft state, they can then be approved and posted within the accounting platform. | +| Quickbooks Online | No | - | +| Xero | No | - | +| NetSuite | No | - | ### Example Usage @@ -32,29 +46,31 @@ req = operations.CreateExpenseTransactionRequest( create_expense_request=shared.CreateExpenseRequest( items=[ shared.ExpenseTransaction( - bank_account_ref=shared.ExpenseTransactionBankAccountReference( + bank_account_ref=shared.BankAccountReference( id='787dfb37-5707-4dc0-8a86-8d74e4cc78ea', ), contact_ref=shared.ContactRef( id='40e3e57c-2322-4898-966c-ca41adfd23fd', - type=shared.ContactRefType.SUPPLIER, + type=shared.Type.SUPPLIER, ), currency='GBP', id='4d7c6929-7770-412b-91bb-44d3bc71d111', - issue_date='2022-10-23T00:00:00.000Z', + issue_date='2022-10-23T00:00:00Z', lines=[ shared.ExpenseTransactionLine( account_ref=shared.RecordRef( id='40e3e57c-2322-4898-966c-ca41adfd23fd', ), + invoice_to=shared.InvoiceTo(), net_amount=Decimal('110.42'), tax_amount=Decimal('14.43'), tax_rate_ref=shared.RecordRef( id='40e3e57c-2322-4898-966c-ca41adfd23fd', ), tracking_refs=[ - shared.RecordRef( - id='40e3e57c-2322-4898-966c-ca41adfd23fd', + shared.TrackingRef( + data_type=shared.TrackingRefDataType.TRACKING_CATEGORIES, + id='e9a1b63d-9ff0-40e7-8038-016354b987e6', ), ], ), @@ -86,11 +102,23 @@ if res.create_expense_response is not None: ### Response **[operations.CreateExpenseTransactionResponse](../../models/operations/createexpensetransactionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## update -Update an expense transaction +The *Update expense* endpoint updates an existing [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting platform for a given company's connection. + +[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + +**Integration-specific behaviour** + +At the moment you can update expenses only for Xero ([Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction type only). ### Example Usage @@ -112,7 +140,7 @@ req = operations.UpdateExpenseTransactionRequest( ), contact_ref=shared.ContactRef( id='40e3e57c-2322-4898-966c-ca41adfd23fd', - type=shared.ContactRefType.SUPPLIER, + type=shared.Type.SUPPLIER, ), currency='GBP', issue_date='2022-06-28T00:00:00.000Z', @@ -121,21 +149,23 @@ req = operations.UpdateExpenseTransactionRequest( account_ref=shared.RecordRef( id='40e3e57c-2322-4898-966c-ca41adfd23fd', ), + invoice_to=shared.InvoiceTo(), net_amount=Decimal('110.42'), tax_amount=Decimal('14.43'), tax_rate_ref=shared.RecordRef( id='40e3e57c-2322-4898-966c-ca41adfd23fd', ), tracking_refs=[ - shared.RecordRef( - id='40e3e57c-2322-4898-966c-ca41adfd23fd', + shared.TrackingRef( + data_type=shared.TrackingRefDataType.TRACKING_CATEGORIES, + id='e9a1b63d-9ff0-40e7-8038-016354b987e6', ), ], ), ], merchant_name='Amazon UK', notes='APPLE.COM/BILL - 09001077498 - Card Ending: 4590', - type='Van', + type='string', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', transaction_id='336694d8-2dca-4cb5-a28d-3ccb83e55eee', @@ -159,11 +189,29 @@ if res.update_expense_response is not None: ### Response **[operations.UpdateExpenseTransactionResponse](../../models/operations/updateexpensetransactionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,422,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## upload_attachment -Creates an attachment in the accounting software against the given transactionId +The *Upload attachment* endpoint uploads an attachment in the accounting software against the given transactionId. + +[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + +**Integration-specific behaviour** + +Each accounting software supports different file formats and sizes. + +| Integration | File Size | File Extension | +|-------------|-------------|--------------------------------------------------------------------------------------------------------------| +| Xero | 4MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | +| QuickBooks Online | 100MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | +| NetSuite | 100MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP | +| Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that "You can attach any type of file, such as text, image, or video files". | ### Example Usage @@ -178,9 +226,11 @@ s = codatsyncexpenses.CodatSyncExpenses( ) req = operations.UploadExpenseAttachmentRequest( - request_body=operations.UploadExpenseAttachmentRequestBody( - content='v/ghW&IC$x'.encode(), - request_body='Elegant Producer Electric', + attachment_upload=shared.AttachmentUpload( + file=shared.CodatFile( + content='0xE3ABc1980E'.encode(), + file_name='elegant_producer_electric.jpeg', + ), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', sync_id='6fb40d5e-b13e-11ed-afa1-0242ac120002', @@ -205,4 +255,9 @@ if res.attachment is not None: ### Response **[operations.UploadExpenseAttachmentResponse](../../models/operations/uploadexpenseattachmentresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/managedata/README.md b/sync-for-expenses/docs/sdks/managedata/README.md old mode 100755 new mode 100644 index 8bc148d79..f93614f72 --- a/sync-for-expenses/docs/sdks/managedata/README.md +++ b/sync-for-expenses/docs/sdks/managedata/README.md @@ -35,7 +35,7 @@ req = operations.GetDataStatusRequest( res = s.manage_data.get(req) -if res.data_status_response is not None: +if res.data_statuses is not None: # handle response pass ``` @@ -51,7 +51,12 @@ if res.data_status_response is not None: ### Response **[operations.GetDataStatusResponse](../../models/operations/getdatastatusresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get_pull_operation @@ -92,7 +97,12 @@ if res.pull_operation is not None: ### Response **[operations.GetPullOperationResponse](../../models/operations/getpulloperationresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list_pull_operations @@ -135,7 +145,12 @@ if res.pull_operations is not None: ### Response **[operations.ListPullOperationsResponse](../../models/operations/listpulloperationsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## refresh_all_data_types @@ -179,7 +194,12 @@ if res.status_code == 200: ### Response **[operations.RefreshAllDataTypesResponse](../../models/operations/refreshalldatatypesresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## refresh_data_type @@ -201,7 +221,7 @@ s = codatsyncexpenses.CodatSyncExpenses( req = operations.RefreshDataTypeRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - data_type=shared.DataType.INVOICES, + data_type=shared.SchemaDataType.INVOICES, ) res = s.manage_data.refresh_data_type(req) @@ -222,4 +242,9 @@ if res.pull_operation is not None: ### Response **[operations.RefreshDataTypeResponse](../../models/operations/refreshdatatyperesponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/pushoperations/README.md b/sync-for-expenses/docs/sdks/pushoperations/README.md old mode 100755 new mode 100644 index d798817dc..eeb917194 --- a/sync-for-expenses/docs/sdks/pushoperations/README.md +++ b/sync-for-expenses/docs/sdks/pushoperations/README.md @@ -49,7 +49,12 @@ if res.push_operation is not None: ### Response **[operations.GetPushOperationResponse](../../models/operations/getpushoperationresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -92,4 +97,9 @@ if res.push_operations is not None: ### Response **[operations.ListPushOperationsResponse](../../models/operations/listpushoperationsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/suppliers/README.md b/sync-for-expenses/docs/sdks/suppliers/README.md old mode 100755 new mode 100644 index 04b78accb..99f195774 --- a/sync-for-expenses/docs/sdks/suppliers/README.md +++ b/sync-for-expenses/docs/sdks/suppliers/README.md @@ -40,19 +40,19 @@ s = codatsyncexpenses.CodatSyncExpenses( req = operations.CreateSupplierRequest( supplier=shared.Supplier( addresses=[ - shared.SupplierAccountingAddress( + shared.Items( type=shared.AccountingAddressType.BILLING, ), ], metadata=shared.Metadata(), - modified_date='2022-10-23T00:00:00.000Z', + modified_date='2022-10-23T00:00:00Z', phone='(877) 492-8687', - source_modified_date='2022-10-23T00:00:00.000Z', + source_modified_date='2022-10-23T00:00:00Z', status=shared.SupplierStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "innovative": { - "blue": 'shred', + 'key': { + 'key': 'string', }, }, ), @@ -79,7 +79,12 @@ if res.create_supplier_response is not None: ### Response **[operations.CreateSupplierResponse](../../models/operations/createsupplierresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get @@ -127,7 +132,12 @@ if res.supplier is not None: ### Response **[operations.GetSupplierResponse](../../models/operations/getsupplierresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -175,7 +185,12 @@ if res.suppliers is not None: ### Response **[operations.ListSuppliersResponse](../../models/operations/listsuppliersresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## update @@ -205,26 +220,26 @@ s = codatsyncexpenses.CodatSyncExpenses( req = operations.UpdateSupplierRequest( supplier=shared.Supplier( addresses=[ - shared.SupplierAccountingAddress( + shared.Items( type=shared.AccountingAddressType.DELIVERY, ), ], metadata=shared.Metadata(), - modified_date='2022-10-23T00:00:00.000Z', + modified_date='2022-10-23T00:00:00Z', phone='(877) 492-8687', - source_modified_date='2022-10-23T00:00:00.000Z', + source_modified_date='2022-10-23T00:00:00Z', status=shared.SupplierStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "male": { - "Metal": 'cheater', + 'key': { + 'key': 'string', }, }, ), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - supplier_id='13d946f0-c5d5-42bc-b092-97ece17923ab', + supplier_id='7110701885', ) res = s.suppliers.update(req) @@ -245,4 +260,9 @@ if res.update_supplier_response is not None: ### Response **[operations.UpdateSupplierResponse](../../models/operations/updatesupplierresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/sync/README.md b/sync-for-expenses/docs/sdks/sync/README.md old mode 100755 new mode 100644 index 85eb885ba..052234f89 --- a/sync-for-expenses/docs/sdks/sync/README.md +++ b/sync-for-expenses/docs/sdks/sync/README.md @@ -52,7 +52,12 @@ if res.company_sync_status is not None: ### Response **[operations.GetSyncByIDResponse](../../models/operations/getsyncbyidresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get_last_successful_sync @@ -92,7 +97,12 @@ if res.company_sync_status is not None: ### Response **[operations.GetLastSuccessfulSyncResponse](../../models/operations/getlastsuccessfulsyncresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get_latest_sync @@ -132,7 +142,12 @@ if res.company_sync_status is not None: ### Response **[operations.GetLatestSyncResponse](../../models/operations/getlatestsyncresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## initiate_sync @@ -177,7 +192,12 @@ if res.sync_initiated is not None: ### Response **[operations.InitiateSyncResponse](../../models/operations/initiatesyncresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,422,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -201,7 +221,7 @@ req = operations.ListSyncsRequest( res = s.sync.list(req) -if res.company_sync_statuses is not None: +if res.classes is not None: # handle response pass ``` @@ -217,4 +237,9 @@ if res.company_sync_statuses is not None: ### Response **[operations.ListSyncsResponse](../../models/operations/listsyncsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/docs/sdks/transactionstatus/README.md b/sync-for-expenses/docs/sdks/transactionstatus/README.md old mode 100755 new mode 100644 index 7e7574206..c92144517 --- a/sync-for-expenses/docs/sdks/transactionstatus/README.md +++ b/sync-for-expenses/docs/sdks/transactionstatus/README.md @@ -50,7 +50,12 @@ if res.transaction is not None: ### Response **[operations.GetSyncTransactionResponse](../../models/operations/getsynctransactionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -93,4 +98,9 @@ if res.transactions is not None: ### Response **[operations.ListSyncTransactionsResponse](../../models/operations/listsynctransactionsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/sync-for-expenses/files.gen b/sync-for-expenses/files.gen index ea47c34e9..482935e34 100755 --- a/sync-for-expenses/files.gen +++ b/sync-for-expenses/files.gen @@ -1,47 +1,45 @@ src/codatsyncexpenses/sdkconfiguration.py -src/codatsyncexpenses/accounts.py src/codatsyncexpenses/companies.py -src/codatsyncexpenses/configuration.py src/codatsyncexpenses/connections.py +src/codatsyncexpenses/accounts.py src/codatsyncexpenses/customers.py -src/codatsyncexpenses/expenses.py +src/codatsyncexpenses/suppliers.py src/codatsyncexpenses/manage_data.py src/codatsyncexpenses/push_operations.py -src/codatsyncexpenses/suppliers.py +src/codatsyncexpenses/configuration.py +src/codatsyncexpenses/expenses.py src/codatsyncexpenses/sync.py src/codatsyncexpenses/transaction_status.py src/codatsyncexpenses/sdk.py pylintrc setup.py src/codatsyncexpenses/__init__.py -src/codatsyncexpenses/models/__init__.py -src/codatsyncexpenses/models/errors/sdkerror.py src/codatsyncexpenses/utils/__init__.py src/codatsyncexpenses/utils/retries.py src/codatsyncexpenses/utils/utils.py -src/codatsyncexpenses/models/operations/create_account.py -src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py +src/codatsyncexpenses/models/errors/sdkerror.py +tests/helpers.py src/codatsyncexpenses/models/operations/create_company.py src/codatsyncexpenses/models/operations/delete_company.py src/codatsyncexpenses/models/operations/get_company.py src/codatsyncexpenses/models/operations/list_companies.py src/codatsyncexpenses/models/operations/update_company.py -src/codatsyncexpenses/models/operations/get_company_configuration.py -src/codatsyncexpenses/models/operations/get_mapping_options.py -src/codatsyncexpenses/models/operations/set_company_configuration.py src/codatsyncexpenses/models/operations/create_connection.py src/codatsyncexpenses/models/operations/create_partner_expense_connection.py src/codatsyncexpenses/models/operations/delete_connection.py src/codatsyncexpenses/models/operations/get_connection.py src/codatsyncexpenses/models/operations/list_connections.py src/codatsyncexpenses/models/operations/unlink_connection.py +src/codatsyncexpenses/models/operations/create_account.py +src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py src/codatsyncexpenses/models/operations/create_customer.py src/codatsyncexpenses/models/operations/get_customer.py src/codatsyncexpenses/models/operations/list_customers.py src/codatsyncexpenses/models/operations/update_customer.py -src/codatsyncexpenses/models/operations/create_expense_transaction.py -src/codatsyncexpenses/models/operations/update_expense_transaction.py -src/codatsyncexpenses/models/operations/upload_expense_attachment.py +src/codatsyncexpenses/models/operations/create_supplier.py +src/codatsyncexpenses/models/operations/get_supplier.py +src/codatsyncexpenses/models/operations/list_suppliers.py +src/codatsyncexpenses/models/operations/update_supplier.py src/codatsyncexpenses/models/operations/get_data_status.py src/codatsyncexpenses/models/operations/get_pull_operation.py src/codatsyncexpenses/models/operations/list_pull_operations.py @@ -49,10 +47,12 @@ src/codatsyncexpenses/models/operations/refresh_all_data_types.py src/codatsyncexpenses/models/operations/refresh_data_type.py src/codatsyncexpenses/models/operations/get_push_operation.py src/codatsyncexpenses/models/operations/list_push_operations.py -src/codatsyncexpenses/models/operations/create_supplier.py -src/codatsyncexpenses/models/operations/get_supplier.py -src/codatsyncexpenses/models/operations/list_suppliers.py -src/codatsyncexpenses/models/operations/update_supplier.py +src/codatsyncexpenses/models/operations/get_company_configuration.py +src/codatsyncexpenses/models/operations/get_mapping_options.py +src/codatsyncexpenses/models/operations/set_company_configuration.py +src/codatsyncexpenses/models/operations/create_expense_transaction.py +src/codatsyncexpenses/models/operations/update_expense_transaction.py +src/codatsyncexpenses/models/operations/upload_expense_attachment.py src/codatsyncexpenses/models/operations/get_sync_by_id.py src/codatsyncexpenses/models/operations/get_last_successful_sync.py src/codatsyncexpenses/models/operations/get_latest_sync.py @@ -60,8 +60,15 @@ src/codatsyncexpenses/models/operations/initiate_sync.py src/codatsyncexpenses/models/operations/list_syncs.py src/codatsyncexpenses/models/operations/get_sync_transaction.py src/codatsyncexpenses/models/operations/list_sync_transactions.py -src/codatsyncexpenses/models/operations/__init__.py -src/codatsyncexpenses/models/shared/errormessage.py +src/codatsyncexpenses/models/shared/company.py +src/codatsyncexpenses/models/shared/connection.py +src/codatsyncexpenses/models/shared/dataconnectionstatus.py +src/codatsyncexpenses/models/shared/dataconnectionerror.py +src/codatsyncexpenses/models/shared/companyrequestbody.py +src/codatsyncexpenses/models/shared/companies.py +src/codatsyncexpenses/models/shared/links.py +src/codatsyncexpenses/models/shared/halref.py +src/codatsyncexpenses/models/shared/connections.py src/codatsyncexpenses/models/shared/createaccountresponse.py src/codatsyncexpenses/models/shared/validation.py src/codatsyncexpenses/models/shared/validationitem.py @@ -74,29 +81,13 @@ src/codatsyncexpenses/models/shared/accountstatus.py src/codatsyncexpenses/models/shared/pushoperationchange.py src/codatsyncexpenses/models/shared/pushchangetype.py src/codatsyncexpenses/models/shared/pushoperationref.py +src/codatsyncexpenses/models/shared/accountprototype.py src/codatsyncexpenses/models/shared/pushoption.py src/codatsyncexpenses/models/shared/pushvalidationinfo.py src/codatsyncexpenses/models/shared/pushfieldvalidation.py src/codatsyncexpenses/models/shared/pushoptiontype.py src/codatsyncexpenses/models/shared/pushoptionproperty.py src/codatsyncexpenses/models/shared/pushoptionchoice.py -src/codatsyncexpenses/models/shared/company.py -src/codatsyncexpenses/models/shared/connection.py -src/codatsyncexpenses/models/shared/dataconnectionstatus.py -src/codatsyncexpenses/models/shared/dataconnectionerror.py -src/codatsyncexpenses/models/shared/companyrequestbody.py -src/codatsyncexpenses/models/shared/companies.py -src/codatsyncexpenses/models/shared/links.py -src/codatsyncexpenses/models/shared/halref.py -src/codatsyncexpenses/models/shared/companyconfiguration.py -src/codatsyncexpenses/models/shared/supplierdetails.py -src/codatsyncexpenses/models/shared/customerdetails.py -src/codatsyncexpenses/models/shared/bankaccount.py -src/codatsyncexpenses/models/shared/mappingoptions.py -src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py -src/codatsyncexpenses/models/shared/taxratemappinginfo.py -src/codatsyncexpenses/models/shared/accountmappinginfo.py -src/codatsyncexpenses/models/shared/connections.py src/codatsyncexpenses/models/shared/createcustomerresponse.py src/codatsyncexpenses/models/shared/customer.py src/codatsyncexpenses/models/shared/customerstatus.py @@ -107,25 +98,38 @@ src/codatsyncexpenses/models/shared/items.py src/codatsyncexpenses/models/shared/accountingaddresstype.py src/codatsyncexpenses/models/shared/customers.py src/codatsyncexpenses/models/shared/updatecustomerresponse.py +src/codatsyncexpenses/models/shared/createsupplierresponse.py +src/codatsyncexpenses/models/shared/supplier.py +src/codatsyncexpenses/models/shared/supplierstatus.py +src/codatsyncexpenses/models/shared/suppliers.py +src/codatsyncexpenses/models/shared/updatesupplierresponse.py +src/codatsyncexpenses/models/shared/datastatus.py +src/codatsyncexpenses/models/shared/pulloperation.py +src/codatsyncexpenses/models/shared/pulloperations.py +src/codatsyncexpenses/models/shared/schema_datatype.py +src/codatsyncexpenses/models/shared/pushoperation.py +src/codatsyncexpenses/models/shared/pushoperations.py +src/codatsyncexpenses/models/shared/companyconfiguration.py +src/codatsyncexpenses/models/shared/supplierdetails.py +src/codatsyncexpenses/models/shared/customerdetails.py +src/codatsyncexpenses/models/shared/bankaccount.py +src/codatsyncexpenses/models/shared/mappingoptions.py +src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py +src/codatsyncexpenses/models/shared/taxratemappinginfo.py +src/codatsyncexpenses/models/shared/accountmappinginfo.py src/codatsyncexpenses/models/shared/createexpenseresponse.py src/codatsyncexpenses/models/shared/createexpenserequest.py src/codatsyncexpenses/models/shared/expensetransaction.py src/codatsyncexpenses/models/shared/expensetransactionline.py +src/codatsyncexpenses/models/shared/trackingref.py src/codatsyncexpenses/models/shared/recordref.py +src/codatsyncexpenses/models/shared/invoiceto.py src/codatsyncexpenses/models/shared/contactref.py src/codatsyncexpenses/models/shared/updateexpenseresponse.py src/codatsyncexpenses/models/shared/updateexpenserequest.py src/codatsyncexpenses/models/shared/attachment.py -src/codatsyncexpenses/models/shared/datastatus.py -src/codatsyncexpenses/models/shared/pulloperation.py -src/codatsyncexpenses/models/shared/pulloperations.py -src/codatsyncexpenses/models/shared/pushoperation.py -src/codatsyncexpenses/models/shared/pushoperations.py -src/codatsyncexpenses/models/shared/createsupplierresponse.py -src/codatsyncexpenses/models/shared/supplier.py -src/codatsyncexpenses/models/shared/supplierstatus.py -src/codatsyncexpenses/models/shared/suppliers.py -src/codatsyncexpenses/models/shared/updatesupplierresponse.py +src/codatsyncexpenses/models/shared/attachmentupload.py +src/codatsyncexpenses/models/shared/codatfile.py src/codatsyncexpenses/models/shared/companysyncstatus.py src/codatsyncexpenses/models/shared/syncinitiated.py src/codatsyncexpenses/models/shared/initiatesync.py @@ -143,19 +147,17 @@ src/codatsyncexpenses/models/shared/synccompletewebhookdata.py src/codatsyncexpenses/models/shared/syncfailedwebhook.py src/codatsyncexpenses/models/shared/syncfailedwebhookdata.py src/codatsyncexpenses/models/shared/syncstartedwebhook.py -src/codatsyncexpenses/models/shared/__init__.py +src/codatsyncexpenses/models/errors/errormessage.py src/codatsyncexpenses/models/webhooks/client_rate_limit_reached.py src/codatsyncexpenses/models/webhooks/client_rate_limit_reset.py src/codatsyncexpenses/models/webhooks/sync_complete.py src/codatsyncexpenses/models/webhooks/sync_failed.py src/codatsyncexpenses/models/webhooks/sync_started.py -src/codatsyncexpenses/models/webhooks/__init__.py +src/codatsyncexpenses/models/__init__.py src/codatsyncexpenses/models/errors/__init__.py -USAGE.md -docs/models/operations/createaccountrequest.md -docs/models/operations/createaccountresponse.md -docs/models/operations/getcreatechartofaccountsmodelrequest.md -docs/models/operations/getcreatechartofaccountsmodelresponse.md +src/codatsyncexpenses/models/operations/__init__.py +src/codatsyncexpenses/models/shared/__init__.py +src/codatsyncexpenses/models/webhooks/__init__.py docs/models/operations/createcompanyresponse.md docs/models/operations/deletecompanyrequest.md docs/models/operations/deletecompanyresponse.md @@ -165,12 +167,6 @@ docs/models/operations/listcompaniesrequest.md docs/models/operations/listcompaniesresponse.md docs/models/operations/updatecompanyrequest.md docs/models/operations/updatecompanyresponse.md -docs/models/operations/getcompanyconfigurationrequest.md -docs/models/operations/getcompanyconfigurationresponse.md -docs/models/operations/getmappingoptionsrequest.md -docs/models/operations/getmappingoptionsresponse.md -docs/models/operations/setcompanyconfigurationrequest.md -docs/models/operations/setcompanyconfigurationresponse.md docs/models/operations/createconnectionrequestbody.md docs/models/operations/createconnectionrequest.md docs/models/operations/createconnectionresponse.md @@ -185,6 +181,10 @@ docs/models/operations/listconnectionsresponse.md docs/models/operations/unlinkconnectionupdateconnection.md docs/models/operations/unlinkconnectionrequest.md docs/models/operations/unlinkconnectionresponse.md +docs/models/operations/createaccountrequest.md +docs/models/operations/createaccountresponse.md +docs/models/operations/getcreatechartofaccountsmodelrequest.md +docs/models/operations/getcreatechartofaccountsmodelresponse.md docs/models/operations/createcustomerrequest.md docs/models/operations/createcustomerresponse.md docs/models/operations/getcustomerrequest.md @@ -193,13 +193,14 @@ docs/models/operations/listcustomersrequest.md docs/models/operations/listcustomersresponse.md docs/models/operations/updatecustomerrequest.md docs/models/operations/updatecustomerresponse.md -docs/models/operations/createexpensetransactionrequest.md -docs/models/operations/createexpensetransactionresponse.md -docs/models/operations/updateexpensetransactionrequest.md -docs/models/operations/updateexpensetransactionresponse.md -docs/models/operations/uploadexpenseattachmentrequestbody.md -docs/models/operations/uploadexpenseattachmentrequest.md -docs/models/operations/uploadexpenseattachmentresponse.md +docs/models/operations/createsupplierrequest.md +docs/models/operations/createsupplierresponse.md +docs/models/operations/getsupplierrequest.md +docs/models/operations/getsupplierresponse.md +docs/models/operations/listsuppliersrequest.md +docs/models/operations/listsuppliersresponse.md +docs/models/operations/updatesupplierrequest.md +docs/models/operations/updatesupplierresponse.md docs/models/operations/getdatastatusrequest.md docs/models/operations/getdatastatusresponse.md docs/models/operations/getpulloperationrequest.md @@ -214,14 +215,18 @@ docs/models/operations/getpushoperationrequest.md docs/models/operations/getpushoperationresponse.md docs/models/operations/listpushoperationsrequest.md docs/models/operations/listpushoperationsresponse.md -docs/models/operations/createsupplierrequest.md -docs/models/operations/createsupplierresponse.md -docs/models/operations/getsupplierrequest.md -docs/models/operations/getsupplierresponse.md -docs/models/operations/listsuppliersrequest.md -docs/models/operations/listsuppliersresponse.md -docs/models/operations/updatesupplierrequest.md -docs/models/operations/updatesupplierresponse.md +docs/models/operations/getcompanyconfigurationrequest.md +docs/models/operations/getcompanyconfigurationresponse.md +docs/models/operations/getmappingoptionsrequest.md +docs/models/operations/getmappingoptionsresponse.md +docs/models/operations/setcompanyconfigurationrequest.md +docs/models/operations/setcompanyconfigurationresponse.md +docs/models/operations/createexpensetransactionrequest.md +docs/models/operations/createexpensetransactionresponse.md +docs/models/operations/updateexpensetransactionrequest.md +docs/models/operations/updateexpensetransactionresponse.md +docs/models/operations/uploadexpenseattachmentrequest.md +docs/models/operations/uploadexpenseattachmentresponse.md docs/models/operations/getsyncbyidrequest.md docs/models/operations/getsyncbyidresponse.md docs/models/operations/getlastsuccessfulsyncrequest.md @@ -236,7 +241,16 @@ docs/models/operations/getsynctransactionrequest.md docs/models/operations/getsynctransactionresponse.md docs/models/operations/listsynctransactionsrequest.md docs/models/operations/listsynctransactionsresponse.md -docs/models/shared/errormessage.md +docs/models/shared/company.md +docs/models/shared/sourcetype.md +docs/models/shared/connection.md +docs/models/shared/dataconnectionstatus.md +docs/models/shared/dataconnectionerror.md +docs/models/shared/companyrequestbody.md +docs/models/shared/companies.md +docs/models/shared/links.md +docs/models/shared/halref.md +docs/models/shared/connections.md docs/models/shared/createaccountresponse.md docs/models/shared/validation.md docs/models/shared/validationitem.md @@ -251,70 +265,68 @@ docs/models/shared/accountstatus.md docs/models/shared/pushoperationchange.md docs/models/shared/pushchangetype.md docs/models/shared/pushoperationref.md +docs/models/shared/validdatatypelinks.md +docs/models/shared/accountprototype.md docs/models/shared/pushoption.md docs/models/shared/pushvalidationinfo.md docs/models/shared/pushfieldvalidation.md docs/models/shared/pushoptiontype.md docs/models/shared/pushoptionproperty.md docs/models/shared/pushoptionchoice.md -docs/models/shared/company.md -docs/models/shared/connectionsourcetype.md -docs/models/shared/connection.md -docs/models/shared/dataconnectionstatus.md -docs/models/shared/dataconnectionerror.md -docs/models/shared/companyrequestbody.md -docs/models/shared/companies.md -docs/models/shared/links.md -docs/models/shared/halref.md -docs/models/shared/companyconfiguration.md -docs/models/shared/supplierdetails.md -docs/models/shared/customerdetails.md -docs/models/shared/bankaccount.md -docs/models/shared/mappingoptions.md -docs/models/shared/trackingcategorymappinginfo.md -docs/models/shared/taxratemappinginfovalidtransactiontypes.md -docs/models/shared/taxratemappinginfo.md -docs/models/shared/accountmappinginfoaccounttype.md -docs/models/shared/accountmappinginfovalidtransactiontypes.md -docs/models/shared/accountmappinginfo.md -docs/models/shared/connections.md docs/models/shared/createcustomerresponse.md +docs/models/shared/accountingaddress.md docs/models/shared/customer.md docs/models/shared/customerstatus.md docs/models/shared/metadata.md -docs/models/shared/contactphone.md +docs/models/shared/phone.md docs/models/shared/contact.md docs/models/shared/phonenumbertype.md docs/models/shared/items.md docs/models/shared/accountingaddresstype.md docs/models/shared/customers.md docs/models/shared/updatecustomerresponse.md +docs/models/shared/createsupplierresponse.md +docs/models/shared/supplier.md +docs/models/shared/supplierstatus.md +docs/models/shared/suppliers.md +docs/models/shared/updatesupplierresponse.md +docs/models/shared/datatypes.md +docs/models/shared/datastatus.md +docs/models/shared/status.md +docs/models/shared/pulloperation.md +docs/models/shared/pulloperations.md +docs/models/shared/schemadatatype.md +docs/models/shared/pushoperation.md +docs/models/shared/pushoperations.md +docs/models/shared/companyconfiguration.md +docs/models/shared/supplierdetails.md +docs/models/shared/customerdetails.md +docs/models/shared/bankaccount.md +docs/models/shared/mappingoptions.md +docs/models/shared/trackingcategorymappinginfo.md +docs/models/shared/taxratemappinginfovalidtransactiontypes.md +docs/models/shared/taxratemappinginfo.md +docs/models/shared/accountmappinginfoaccounttype.md +docs/models/shared/validtransactiontypes.md +docs/models/shared/accountmappinginfo.md docs/models/shared/createexpenseresponse.md docs/models/shared/createexpenserequest.md -docs/models/shared/expensetransactionbankaccountreference.md +docs/models/shared/bankaccountreference.md docs/models/shared/expensetransactiontype.md docs/models/shared/expensetransaction.md docs/models/shared/expensetransactionline.md +docs/models/shared/trackingrefdatatype.md +docs/models/shared/trackingref.md docs/models/shared/recordref.md -docs/models/shared/contactreftype.md +docs/models/shared/invoiceto.md +docs/models/shared/type.md docs/models/shared/contactref.md docs/models/shared/updateexpenseresponse.md docs/models/shared/updateexpenserequestbankaccountreference.md docs/models/shared/updateexpenserequest.md docs/models/shared/attachment.md -docs/models/shared/datastatusdatatypes.md -docs/models/shared/datastatus.md -docs/models/shared/pulloperationstatus.md -docs/models/shared/pulloperation.md -docs/models/shared/pulloperations.md -docs/models/shared/pushoperation.md -docs/models/shared/pushoperations.md -docs/models/shared/createsupplierresponse.md -docs/models/shared/supplieraccountingaddress.md -docs/models/shared/supplier.md -docs/models/shared/supplierstatus.md -docs/models/shared/suppliers.md -docs/models/shared/updatesupplierresponse.md +docs/models/shared/attachmentupload.md +docs/models/shared/codatfile.md docs/models/shared/companysyncstatus.md docs/models/shared/syncinitiated.md docs/models/shared/initiatesync.md @@ -331,8 +343,9 @@ docs/models/shared/synccompletewebhook.md docs/models/shared/synccompletewebhookdata.md docs/models/shared/syncfailedwebhook.md docs/models/shared/syncfailedwebhookdata.md -docs/models/shared/syncstartedwebhookdata.md +docs/models/shared/data.md docs/models/shared/syncstartedwebhook.md +docs/models/errors/errormessage.md docs/models/webhooks/clientratelimitreachedresponse.md docs/models/webhooks/clientratelimitresetresponse.md docs/models/webhooks/synccompleteresponse.md @@ -340,15 +353,16 @@ docs/models/webhooks/syncfailedresponse.md docs/models/webhooks/syncstartedresponse.md docs/sdks/codatsyncexpenses/README.md docs/models/utils/retryconfig.md -docs/sdks/accounts/README.md docs/sdks/companies/README.md -docs/sdks/configuration/README.md docs/sdks/connections/README.md +docs/sdks/accounts/README.md docs/sdks/customers/README.md -docs/sdks/expenses/README.md +docs/sdks/suppliers/README.md docs/sdks/managedata/README.md docs/sdks/pushoperations/README.md -docs/sdks/suppliers/README.md +docs/sdks/configuration/README.md +docs/sdks/expenses/README.md docs/sdks/sync/README.md docs/sdks/transactionstatus/README.md +USAGE.md .gitattributes \ No newline at end of file diff --git a/sync-for-expenses/gen.yaml b/sync-for-expenses/gen.yaml index 24a57c693..740f3a75c 100644 --- a/sync-for-expenses/gen.yaml +++ b/sync-for-expenses/gen.yaml @@ -1,26 +1,44 @@ configVersion: 1.0.0 management: - docChecksum: cd39427322ae650607fb0524405a4f11 + docChecksum: 99670d69142722af36276697633475ba docVersion: prealpha - speakeasyVersion: 1.100.2 - generationVersion: 2.159.2 + speakeasyVersion: 1.126.3 + generationVersion: 2.214.3 generation: + comments: {} sdkClassName: CodatSyncExpenses - singleTagPerOp: false + repoURL: https://github.com/codatio/client-sdk-python.git + usageSnippets: + optionalPropertyRendering: withExample telemetryEnabled: true features: python: - core: 3.0.2 + core: 4.3.0 deprecations: 2.81.1 - examples: 2.81.2 - globalSecurity: 2.82.0 - globalServerURLs: 2.82.0 + examples: 2.81.3 + globalSecurity: 2.83.1 + globalServerURLs: 2.82.1 + inputOutputModels: 2.82.0 nameOverrides: 2.81.1 retries: 2.82.0 python: - version: 4.0.0 + version: 5.0.0 author: Codat + clientServerStatusCodesAsErrors: true description: Push expenses to accounting platforms. flattenGlobalSecurity: false + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models/shared + webhooks: models/webhooks + inputModelSuffix: input + installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=sync-for-expenses maxMethodParams: 0 + outputModelSuffix: output packageName: codat-sync-for-expenses + published: true + repoSubDirectory: sync-for-expenses diff --git a/sync-for-expenses/pylintrc b/sync-for-expenses/pylintrc old mode 100755 new mode 100644 diff --git a/sync-for-expenses/setup.py b/sync-for-expenses/setup.py old mode 100755 new mode 100644 index 35f05bc18..75dbd400d --- a/sync-for-expenses/setup.py +++ b/sync-for-expenses/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="codat-sync-for-expenses", - version="4.0.0", + version="5.0.0", author="Codat", description="Push expenses to accounting platforms.", long_description=long_description, @@ -30,7 +30,7 @@ "six>=1.16.0", "typing-inspect>=0.9.0", "typing_extensions>=4.7.1", - "urllib3>=2.0.4", + "urllib3>=1.26.18", ], extras_require={ "dev":["pylint==2.16.2"] diff --git a/sync-for-expenses/src/codatsyncexpenses/__init__.py b/sync-for-expenses/src/codatsyncexpenses/__init__.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/accounts.py b/sync-for-expenses/src/codatsyncexpenses/accounts.py old mode 100755 new mode 100644 index f1bed8de1..361987542 --- a/sync-for-expenses/src/codatsyncexpenses/accounts.py +++ b/sync-for-expenses/src/codatsyncexpenses/accounts.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def create(self, request: operations.CreateAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateAccountResponse: r"""Create account The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company's connection. @@ -29,14 +30,17 @@ def create(self, request: operations.CreateAccountRequest, retries: Optional[uti 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", True, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.CreateAccountRequest, "account_prototype", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -55,7 +59,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreateAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -64,16 +68,20 @@ def do_request(): res.create_account_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get_create_model(self, request: operations.GetCreateChartOfAccountsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateChartOfAccountsModelResponse: r"""Get create account model The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company and integration. @@ -93,7 +101,10 @@ def get_create_model(self, request: operations.GetCreateChartOfAccountsModelRequ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -112,7 +123,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetCreateChartOfAccountsModelResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -121,12 +132,15 @@ def do_request(): res.push_option = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/companies.py b/sync-for-expenses/src/codatsyncexpenses/companies.py old mode 100755 new mode 100644 index 9662dbccc..a3e207faf --- a/sync-for-expenses/src/codatsyncexpenses/companies.py +++ b/sync-for-expenses/src/codatsyncexpenses/companies.py @@ -13,7 +13,8 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config - def create(self, request: shared.CompanyRequestBody, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCompanyResponse: + + def create(self, request: Optional[shared.CompanyRequestBody], retries: Optional[utils.RetryConfig] = None) -> operations.CreateCompanyResponse: r"""Create company Creates a new company that can be used to assign connections to. @@ -23,13 +24,16 @@ def create(self, request: shared.CompanyRequestBody, retries: Optional[utils.Ret url = base_url + '/companies' headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, Optional[shared.CompanyRequestBody], "request", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -48,7 +52,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreateCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -57,16 +61,20 @@ def do_request(): res.company = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 429]: + elif http_res.status_code in [400, 401, 402, 403, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def delete(self, request: operations.DeleteCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteCompanyResponse: r"""Delete a company Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned. @@ -78,7 +86,10 @@ def delete(self, request: operations.DeleteCompanyRequest, retries: Optional[uti headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -97,21 +108,25 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.DeleteCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 204: pass - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get(self, request: operations.GetCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyResponse: r"""Get company Returns the company for a valid identifier. If the identifier is for a deleted company, a not found response is returned. @@ -123,7 +138,10 @@ def get(self, request: operations.GetCompanyRequest, retries: Optional[utils.Ret headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -142,7 +160,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -151,16 +169,20 @@ def do_request(): res.company = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListCompaniesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCompaniesResponse: r"""List companies Returns a list of your companies. The company schema contains a list of [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) related to the company. @@ -173,7 +195,10 @@ def list(self, request: operations.ListCompaniesRequest, retries: Optional[utils headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -192,7 +217,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListCompaniesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -201,16 +226,20 @@ def do_request(): res.companies = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def update(self, request: operations.UpdateCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCompanyResponse: r"""Update company Updates both the name and description of the company. @@ -219,13 +248,16 @@ def update(self, request: operations.UpdateCompanyRequest, retries: Optional[uti url = utils.generate_url(operations.UpdateCompanyRequest, base_url, '/companies/{companyId}', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "company_request_body", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.UpdateCompanyRequest, "company_request_body", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -244,7 +276,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.UpdateCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -253,12 +285,15 @@ def do_request(): res.company = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/configuration.py b/sync-for-expenses/src/codatsyncexpenses/configuration.py old mode 100755 new mode 100644 index cc00fcd0f..4426e34a9 --- a/sync-for-expenses/src/codatsyncexpenses/configuration.py +++ b/sync-for-expenses/src/codatsyncexpenses/configuration.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def get(self, request: operations.GetCompanyConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyConfigurationResponse: r"""Get company configuration Gets a companies expense sync configuration @@ -24,7 +25,10 @@ def get(self, request: operations.GetCompanyConfigurationRequest, retries: Optio headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -43,7 +47,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetCompanyConfigurationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -52,16 +56,20 @@ def do_request(): res.company_configuration = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get_mapping_options(self, request: operations.GetMappingOptionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetMappingOptionsResponse: r"""Mapping options Gets the expense mapping options for a companies accounting software @@ -73,7 +81,10 @@ def get_mapping_options(self, request: operations.GetMappingOptionsRequest, retr headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -92,7 +103,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetMappingOptionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -101,16 +112,20 @@ def do_request(): res.mapping_options = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def set(self, request: operations.SetCompanyConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.SetCompanyConfigurationResponse: r"""Set company configuration Sets a companies expense sync configuration @@ -119,13 +134,16 @@ def set(self, request: operations.SetCompanyConfigurationRequest, retries: Optio url = utils.generate_url(operations.SetCompanyConfigurationRequest, base_url, '/companies/{companyId}/sync/expenses/config', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "company_configuration", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.SetCompanyConfigurationRequest, "company_configuration", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -144,7 +162,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.SetCompanyConfigurationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -153,12 +171,15 @@ def do_request(): res.company_configuration = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/connections.py b/sync-for-expenses/src/codatsyncexpenses/connections.py old mode 100755 new mode 100644 index 7abf7f6fc..18baf5320 --- a/sync-for-expenses/src/codatsyncexpenses/connections.py +++ b/sync-for-expenses/src/codatsyncexpenses/connections.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def create(self, request: operations.CreateConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateConnectionResponse: r"""Create connection Creates a connection for the company by providing a valid `platformKey`. @@ -23,13 +24,16 @@ def create(self, request: operations.CreateConnectionRequest, retries: Optional[ url = utils.generate_url(operations.CreateConnectionRequest, base_url, '/companies/{companyId}/connections', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request_body", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.CreateConnectionRequest, "request_body", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -48,7 +52,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreateConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -57,16 +61,20 @@ def do_request(): res.connection = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def create_partner_expense_connection(self, request: operations.CreatePartnerExpenseConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreatePartnerExpenseConnectionResponse: r"""Create partner expense connection Creates a partner expense data connection @@ -78,7 +86,10 @@ def create_partner_expense_connection(self, request: operations.CreatePartnerExp headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -97,7 +108,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreatePartnerExpenseConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -106,16 +117,20 @@ def do_request(): res.connection = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def delete(self, request: operations.DeleteConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteConnectionResponse: r"""Delete connection Revoke and remove a connection from a company. @@ -128,7 +143,10 @@ def delete(self, request: operations.DeleteConnectionRequest, retries: Optional[ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -147,21 +165,25 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.DeleteConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: pass - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get(self, request: operations.GetConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetConnectionResponse: r"""Get connection Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. @@ -173,7 +195,10 @@ def get(self, request: operations.GetConnectionRequest, retries: Optional[utils. headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -192,7 +217,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -201,16 +226,20 @@ def do_request(): res.connection = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListConnectionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListConnectionsResponse: r"""List connections List the connections for a company. @@ -223,7 +252,10 @@ def list(self, request: operations.ListConnectionsRequest, retries: Optional[uti headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -242,7 +274,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListConnectionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -251,16 +283,20 @@ def do_request(): res.connections = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def unlink(self, request: operations.UnlinkConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UnlinkConnectionResponse: r"""Unlink connection This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. @@ -269,13 +305,16 @@ def unlink(self, request: operations.UnlinkConnectionRequest, retries: Optional[ url = utils.generate_url(operations.UnlinkConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request_body", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.UnlinkConnectionRequest, "request_body", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -294,7 +333,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.UnlinkConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -303,12 +342,15 @@ def do_request(): res.connection = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/customers.py b/sync-for-expenses/src/codatsyncexpenses/customers.py old mode 100755 new mode 100644 index 2b0f3088d..1341c8430 --- a/sync-for-expenses/src/codatsyncexpenses/customers.py +++ b/sync-for-expenses/src/codatsyncexpenses/customers.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def create(self, request: operations.CreateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCustomerResponse: r"""Create customer The *Create customer* endpoint creates a new [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. @@ -29,14 +30,17 @@ def create(self, request: operations.CreateCustomerRequest, retries: Optional[ut 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", True, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.CreateCustomerRequest, "customer", True, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -55,7 +59,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreateCustomerResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -64,16 +68,20 @@ def do_request(): res.create_customer_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCustomerResponse: r"""Get customer The *Get customer* endpoint returns a single customer for a given customerId. @@ -91,7 +99,10 @@ def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.Re headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -110,7 +121,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetCustomerResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -119,16 +130,20 @@ def do_request(): res.customer = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 409, 429]: + elif http_res.status_code in [401, 402, 403, 404, 409, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListCustomersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomersResponse: r"""List customers The *List customers* endpoint returns a list of [customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. @@ -145,7 +160,10 @@ def list(self, request: operations.ListCustomersRequest, retries: Optional[utils headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -164,7 +182,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListCustomersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -173,16 +191,20 @@ def do_request(): res.customers = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 409]: + elif http_res.status_code in [400, 401, 402, 403, 404, 409, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def update(self, request: operations.UpdateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCustomerResponse: r"""Update customer The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. @@ -199,14 +221,17 @@ def update(self, request: operations.UpdateCustomerRequest, retries: Optional[ut 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", True, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.UpdateCustomerRequest, "customer", True, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -225,7 +250,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.UpdateCustomerResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -234,12 +259,15 @@ def do_request(): res.update_customer_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/expenses.py b/sync-for-expenses/src/codatsyncexpenses/expenses.py old mode 100755 new mode 100644 index e7938066f..de8082b6f --- a/sync-for-expenses/src/codatsyncexpenses/expenses.py +++ b/sync-for-expenses/src/codatsyncexpenses/expenses.py @@ -13,21 +13,39 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def create(self, request: operations.CreateExpenseTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateExpenseTransactionResponse: r"""Create expense transaction - Create an expense transaction + The *Create expense* endpoint creates an [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting platform for a given company's connection. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + + **Integration-specific behaviour** + + Some accounting platforms support the option of pushing transactions to a draft state. This can be done by setting the postAsDraft property on the transaction to true. For platforms without this feature, the postAsDraft property should be ignored or set to false. + + | Integration | Draft State | Details | + |-------------|-------------|--------------------------------------------------------------------------------------------------------------| + | Dynamics 365 Business Central | Yes | Setting postAsDraft to true will push the transactions to a drafted state rather than posting directly to the ledger. For transactions in a draft state, they can then be approved and posted within the accounting platform. | + | Quickbooks Online | No | - | + | Xero | No | - | + | NetSuite | No | - | """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.CreateExpenseTransactionRequest, base_url, '/companies/{companyId}/sync/expenses/data/expense-transactions', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "create_expense_request", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.CreateExpenseTransactionRequest, "create_expense_request", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -46,7 +64,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreateExpenseTransactionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -55,31 +73,45 @@ def do_request(): res.create_expense_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def update(self, request: operations.UpdateExpenseTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateExpenseTransactionResponse: r"""Update expense-transactions - Update an expense transaction + The *Update expense* endpoint updates an existing [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting platform for a given company's connection. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + + **Integration-specific behaviour** + + At the moment you can update expenses only for Xero ([Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction type only). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.UpdateExpenseTransactionRequest, base_url, '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "update_expense_request", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.UpdateExpenseTransactionRequest, "update_expense_request", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -98,7 +130,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.UpdateExpenseTransactionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 202: @@ -107,31 +139,51 @@ def do_request(): res.update_expense_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 422, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 422, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def upload_attachment(self, request: operations.UploadExpenseAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadExpenseAttachmentResponse: r"""Upload attachment - Creates an attachment in the accounting software against the given transactionId + The *Upload attachment* endpoint uploads an attachment in the accounting software against the given transactionId. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + **Integration-specific behaviour** + + Each accounting software supports different file formats and sizes. + + | Integration | File Size | File Extension | + |-------------|-------------|--------------------------------------------------------------------------------------------------------------| + | Xero | 4MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | + | QuickBooks Online | 100MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | + | NetSuite | 100MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP | + | Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that \"You can attach any type of file, such as text, image, or video files\". | """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.UploadExpenseAttachmentRequest, base_url, '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request_body", False, True, 'multipart') + req_content_type, data, form = utils.serialize_request_body(request, operations.UploadExpenseAttachmentRequest, "attachment_upload", False, True, 'multipart') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -150,7 +202,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.UploadExpenseAttachmentResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -159,12 +211,15 @@ def do_request(): res.attachment = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/manage_data.py b/sync-for-expenses/src/codatsyncexpenses/manage_data.py old mode 100755 new mode 100644 index 452a2637d..f45ff0d2d --- a/sync-for-expenses/src/codatsyncexpenses/manage_data.py +++ b/sync-for-expenses/src/codatsyncexpenses/manage_data.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def get(self, request: operations.GetDataStatusRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDataStatusResponse: r"""Get data status Get the state of each data type for a company @@ -24,7 +25,10 @@ def get(self, request: operations.GetDataStatusRequest, retries: Optional[utils. headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -43,25 +47,29 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetDataStatusResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[Dict[str, shared.DataStatus]]) - res.data_status_response = out + res.data_statuses = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get_pull_operation(self, request: operations.GetPullOperationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPullOperationResponse: r"""Get pull operation Retrieve information about a single dataset or pull operation. @@ -73,7 +81,10 @@ def get_pull_operation(self, request: operations.GetPullOperationRequest, retrie headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -92,7 +103,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetPullOperationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -101,16 +112,20 @@ def do_request(): res.pull_operation = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list_pull_operations(self, request: operations.ListPullOperationsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPullOperationsResponse: r"""List pull operations Gets the pull operation history (datasets) for a given company. @@ -123,7 +138,10 @@ def list_pull_operations(self, request: operations.ListPullOperationsRequest, re headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -142,7 +160,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListPullOperationsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -151,16 +169,20 @@ def do_request(): res.pull_operations = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def refresh_all_data_types(self, request: operations.RefreshAllDataTypesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.RefreshAllDataTypesResponse: r"""Refresh all data Refreshes all data types with `fetch on first link` set to `true` for a given company. @@ -176,7 +198,10 @@ def refresh_all_data_types(self, request: operations.RefreshAllDataTypesRequest, headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -195,21 +220,25 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.RefreshAllDataTypesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 204: pass - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def refresh_data_type(self, request: operations.RefreshDataTypeRequest, retries: Optional[utils.RetryConfig] = None) -> operations.RefreshDataTypeResponse: r"""Refresh data type Refreshes a given data type for a given company. @@ -224,7 +253,10 @@ def refresh_data_type(self, request: operations.RefreshDataTypeRequest, retries: headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -243,7 +275,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.RefreshDataTypeResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -252,12 +284,15 @@ def do_request(): res.pull_operation = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/models/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/__init__.py old mode 100755 new mode 100644 index 36628d6cc..722bb9982 --- a/sync-for-expenses/src/codatsyncexpenses/models/__init__.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/__init__.py @@ -1,3 +1,4 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" -# __init__.py + +# package diff --git a/sync-for-expenses/src/codatsyncexpenses/models/errors/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/errors/__init__.py old mode 100755 new mode 100644 index cfd848441..bf15fd116 --- a/sync-for-expenses/src/codatsyncexpenses/models/errors/__init__.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/errors/__init__.py @@ -1,4 +1,6 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" -from .sdkerror import SDKError -__all__ = ["SDKError"] +from .errormessage import * +from .sdkerror import * + +__all__ = ["ErrorMessage","SDKError"] diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py b/sync-for-expenses/src/codatsyncexpenses/models/errors/errormessage.py old mode 100755 new mode 100644 similarity index 92% rename from sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py rename to sync-for-expenses/src/codatsyncexpenses/models/errors/errormessage.py index 3e6365dc5..cfea19ec8 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/errormessage.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/errors/errormessage.py @@ -8,8 +8,10 @@ @dataclass_json(undefined=Undefined.EXCLUDE) + @dataclasses.dataclass -class ErrorMessage: +class ErrorMessage(Exception): + r"""The request made is not valid.""" can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) r"""`True` if the error occurred transiently and can be retried.""" correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) @@ -24,3 +26,5 @@ class ErrorMessage: r"""The HTTP status code returned by the error.""" + def __str__(self) -> str: + return utils.marshal_json(self, type(self)) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/errors/sdkerror.py b/sync-for-expenses/src/codatsyncexpenses/models/errors/sdkerror.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py old mode 100755 new mode 100644 index 123450ca1..7b3a76202 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/__init__.py @@ -42,4 +42,4 @@ from .update_supplier import * from .upload_expense_attachment import * -__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateCustomerRequest","CreateCustomerResponse","CreateExpenseTransactionRequest","CreateExpenseTransactionResponse","CreatePartnerExpenseConnectionRequest","CreatePartnerExpenseConnectionResponse","CreateSupplierRequest","CreateSupplierResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","GetCompanyConfigurationRequest","GetCompanyConfigurationResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCreateChartOfAccountsModelRequest","GetCreateChartOfAccountsModelResponse","GetCustomerRequest","GetCustomerResponse","GetDataStatusRequest","GetDataStatusResponse","GetLastSuccessfulSyncRequest","GetLastSuccessfulSyncResponse","GetLatestSyncRequest","GetLatestSyncResponse","GetMappingOptionsRequest","GetMappingOptionsResponse","GetPullOperationRequest","GetPullOperationResponse","GetPushOperationRequest","GetPushOperationResponse","GetSupplierRequest","GetSupplierResponse","GetSyncByIDRequest","GetSyncByIDResponse","GetSyncTransactionRequest","GetSyncTransactionResponse","InitiateSyncRequest","InitiateSyncResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListCustomersRequest","ListCustomersResponse","ListPullOperationsRequest","ListPullOperationsResponse","ListPushOperationsRequest","ListPushOperationsResponse","ListSuppliersRequest","ListSuppliersResponse","ListSyncTransactionsRequest","ListSyncTransactionsResponse","ListSyncsRequest","ListSyncsResponse","RefreshAllDataTypesRequest","RefreshAllDataTypesResponse","RefreshDataTypeRequest","RefreshDataTypeResponse","SetCompanyConfigurationRequest","SetCompanyConfigurationResponse","UnlinkConnectionRequest","UnlinkConnectionResponse","UnlinkConnectionUpdateConnection","UpdateCompanyRequest","UpdateCompanyResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateExpenseTransactionRequest","UpdateExpenseTransactionResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadExpenseAttachmentRequest","UploadExpenseAttachmentRequestBody","UploadExpenseAttachmentResponse"] +__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateCustomerRequest","CreateCustomerResponse","CreateExpenseTransactionRequest","CreateExpenseTransactionResponse","CreatePartnerExpenseConnectionRequest","CreatePartnerExpenseConnectionResponse","CreateSupplierRequest","CreateSupplierResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","GetCompanyConfigurationRequest","GetCompanyConfigurationResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCreateChartOfAccountsModelRequest","GetCreateChartOfAccountsModelResponse","GetCustomerRequest","GetCustomerResponse","GetDataStatusRequest","GetDataStatusResponse","GetLastSuccessfulSyncRequest","GetLastSuccessfulSyncResponse","GetLatestSyncRequest","GetLatestSyncResponse","GetMappingOptionsRequest","GetMappingOptionsResponse","GetPullOperationRequest","GetPullOperationResponse","GetPushOperationRequest","GetPushOperationResponse","GetSupplierRequest","GetSupplierResponse","GetSyncByIDRequest","GetSyncByIDResponse","GetSyncTransactionRequest","GetSyncTransactionResponse","InitiateSyncRequest","InitiateSyncResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListCustomersRequest","ListCustomersResponse","ListPullOperationsRequest","ListPullOperationsResponse","ListPushOperationsRequest","ListPushOperationsResponse","ListSuppliersRequest","ListSuppliersResponse","ListSyncTransactionsRequest","ListSyncTransactionsResponse","ListSyncsRequest","ListSyncsResponse","RefreshAllDataTypesRequest","RefreshAllDataTypesResponse","RefreshDataTypeRequest","RefreshDataTypeResponse","SetCompanyConfigurationRequest","SetCompanyConfigurationResponse","UnlinkConnectionRequest","UnlinkConnectionResponse","UnlinkConnectionUpdateConnection","UpdateCompanyRequest","UpdateCompanyResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateExpenseTransactionRequest","UpdateExpenseTransactionResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadExpenseAttachmentRequest","UploadExpenseAttachmentResponse"] diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py old mode 100755 new mode 100644 index 30c894086..9d732a849 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_account.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import account as shared_account -from ..shared import createaccountresponse as shared_createaccountresponse -from ..shared import errormessage as shared_errormessage +from ...models.shared import accountprototype as shared_accountprototype +from ...models.shared import createaccountresponse as shared_createaccountresponse from typing import Optional @@ -15,7 +14,7 @@ class CreateAccountRequest: r"""Unique identifier for a company.""" connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }}) r"""Unique identifier for a connection.""" - account: Optional[shared_account.Account] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }}) + account_prototype: Optional[shared_accountprototype.AccountPrototype] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }}) allow_sync_on_push_complete: Optional[bool] = dataclasses.field(default=True, metadata={'query_param': { 'field_name': 'allowSyncOnPushComplete', 'style': 'form', 'explode': True }}) r"""Allow a sync upon push completion.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }}) @@ -28,13 +27,11 @@ class CreateAccountRequest: class CreateAccountResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" create_account_response: Optional[shared_createaccountresponse.CreateAccountResponse] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py old mode 100755 new mode 100644 index 3225796a8..6d6514892 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_company.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import company as shared_company -from ..shared import errormessage as shared_errormessage +from ...models.shared import company as shared_company from typing import Optional @@ -12,13 +11,11 @@ class CreateCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company: Optional[shared_company.Company] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py old mode 100755 new mode 100644 index 4cea97fdf..17911be2d --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_connection.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import errormessage as shared_errormessage +from ...models.shared import connection as shared_connection from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -32,13 +31,11 @@ class CreateConnectionRequest: class CreateConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py old mode 100755 new mode 100644 index 314cb49ef..6fd91dcbf --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_customer.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import createcustomerresponse as shared_createcustomerresponse -from ..shared import customer as shared_customer -from ..shared import errormessage as shared_errormessage +from ...models.shared import createcustomerresponse as shared_createcustomerresponse +from ...models.shared import customer as shared_customer from typing import Optional @@ -28,13 +27,11 @@ class CreateCustomerRequest: class CreateCustomerResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" create_customer_response: Optional[shared_createcustomerresponse.CreateCustomerResponse] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py old mode 100755 new mode 100644 index d95ec0557..3bb4d54bc --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_expense_transaction.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import createexpenserequest as shared_createexpenserequest -from ..shared import createexpenseresponse as shared_createexpenseresponse -from ..shared import errormessage as shared_errormessage +from ...models.shared import createexpenserequest as shared_createexpenserequest +from ...models.shared import createexpenseresponse as shared_createexpenseresponse from typing import Optional @@ -22,13 +21,11 @@ class CreateExpenseTransactionRequest: class CreateExpenseTransactionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" create_expense_response: Optional[shared_createexpenseresponse.CreateExpenseResponse] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py old mode 100755 new mode 100644 index 9df550ec7..bda377eb1 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_partner_expense_connection.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import errormessage as shared_errormessage +from ...models.shared import connection as shared_connection from typing import Optional @@ -20,13 +19,11 @@ class CreatePartnerExpenseConnectionRequest: class CreatePartnerExpenseConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py old mode 100755 new mode 100644 index 5f6b0a3cc..28464ac8b --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/create_supplier.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import createsupplierresponse as shared_createsupplierresponse -from ..shared import errormessage as shared_errormessage -from ..shared import supplier as shared_supplier +from ...models.shared import createsupplierresponse as shared_createsupplierresponse +from ...models.shared import supplier as shared_supplier from typing import Optional @@ -28,13 +27,11 @@ class CreateSupplierRequest: class CreateSupplierResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" create_supplier_response: Optional[shared_createsupplierresponse.CreateSupplierResponse] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py old mode 100755 new mode 100644 index 0c7da43c5..cee215d50 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_company.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -19,11 +17,9 @@ class DeleteCompanyRequest: class DeleteCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py old mode 100755 new mode 100644 index 568a81d83..f6c98ce2b --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/delete_connection.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -21,11 +19,9 @@ class DeleteConnectionRequest: class DeleteConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py old mode 100755 new mode 100644 index 9660394e9..2938755e5 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import company as shared_company -from ..shared import errormessage as shared_errormessage +from ...models.shared import company as shared_company from typing import Optional @@ -20,13 +19,11 @@ class GetCompanyRequest: class GetCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company: Optional[shared_company.Company] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company_configuration.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company_configuration.py old mode 100755 new mode 100644 index 061c6ca65..7bb4d5f62 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company_configuration.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_company_configuration.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companyconfiguration as shared_companyconfiguration -from ..shared import errormessage as shared_errormessage +from ...models.shared import companyconfiguration as shared_companyconfiguration from typing import Optional @@ -20,13 +19,11 @@ class GetCompanyConfigurationRequest: class GetCompanyConfigurationResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company_configuration: Optional[shared_companyconfiguration.CompanyConfiguration] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py old mode 100755 new mode 100644 index c21ca84ed..80642dd26 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_connection.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import errormessage as shared_errormessage +from ...models.shared import connection as shared_connection from typing import Optional @@ -22,13 +21,11 @@ class GetConnectionRequest: class GetConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py old mode 100755 new mode 100644 index 7961bde4f..029cfcc20 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_create_chartofaccounts_model.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pushoption as shared_pushoption +from ...models.shared import pushoption as shared_pushoption from typing import Optional @@ -22,13 +21,11 @@ class GetCreateChartOfAccountsModelRequest: class GetCreateChartOfAccountsModelResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py old mode 100755 new mode 100644 index da9681beb..ea6aa0090 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_customer.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import customer as shared_customer -from ..shared import errormessage as shared_errormessage +from ...models.shared import customer as shared_customer from typing import Optional @@ -22,13 +21,11 @@ class GetCustomerRequest: class GetCustomerResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" customer: Optional[shared_customer.Customer] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py old mode 100755 new mode 100644 index f6135ac0d..47c2dde92 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_data_status.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import datastatus as shared_datastatus -from ..shared import errormessage as shared_errormessage +from ...models.shared import datastatus as shared_datastatus from typing import Dict, Optional @@ -20,13 +19,11 @@ class GetDataStatusRequest: class GetDataStatusResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - data_status_response: Optional[Dict[str, shared_datastatus.DataStatus]] = dataclasses.field(default=None) + data_statuses: Optional[Dict[str, shared_datastatus.DataStatus]] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_last_successful_sync.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_last_successful_sync.py old mode 100755 new mode 100644 index 54808eedc..8bfca0564 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_last_successful_sync.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_last_successful_sync.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companysyncstatus as shared_companysyncstatus -from ..shared import errormessage as shared_errormessage +from ...models.shared import companysyncstatus as shared_companysyncstatus from typing import Optional @@ -20,13 +19,11 @@ class GetLastSuccessfulSyncRequest: class GetLastSuccessfulSyncResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company_sync_status: Optional[shared_companysyncstatus.CompanySyncStatus] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_latest_sync.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_latest_sync.py old mode 100755 new mode 100644 index 17e4554f5..d674b7efe --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_latest_sync.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_latest_sync.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companysyncstatus as shared_companysyncstatus -from ..shared import errormessage as shared_errormessage +from ...models.shared import companysyncstatus as shared_companysyncstatus from typing import Optional @@ -20,13 +19,11 @@ class GetLatestSyncRequest: class GetLatestSyncResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company_sync_status: Optional[shared_companysyncstatus.CompanySyncStatus] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_mapping_options.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_mapping_options.py old mode 100755 new mode 100644 index d34081207..b173d4afa --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_mapping_options.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_mapping_options.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import mappingoptions as shared_mappingoptions +from ...models.shared import mappingoptions as shared_mappingoptions from typing import Optional @@ -20,13 +19,11 @@ class GetMappingOptionsRequest: class GetMappingOptionsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" mapping_options: Optional[shared_mappingoptions.MappingOptions] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py old mode 100755 new mode 100644 index 09ba964b9..0afe77aaf --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_pull_operation.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pulloperation as shared_pulloperation +from ...models.shared import pulloperation as shared_pulloperation from typing import Optional @@ -22,13 +21,11 @@ class GetPullOperationRequest: class GetPullOperationResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" pull_operation: Optional[shared_pulloperation.PullOperation] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py old mode 100755 new mode 100644 index 3b11bb84d..d40da909e --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_push_operation.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pushoperation as shared_pushoperation +from ...models.shared import pushoperation as shared_pushoperation from typing import Optional @@ -22,13 +21,11 @@ class GetPushOperationRequest: class GetPushOperationResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" push_operation: Optional[shared_pushoperation.PushOperation] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py old mode 100755 new mode 100644 index 03c3a6d9e..b9a96bf71 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_supplier.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import supplier as shared_supplier +from ...models.shared import supplier as shared_supplier from typing import Optional @@ -22,12 +21,10 @@ class GetSupplierRequest: class GetSupplierResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" supplier: Optional[shared_supplier.Supplier] = dataclasses.field(default=None) r"""Success""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_by_id.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_by_id.py old mode 100755 new mode 100644 index f6dc0159b..8223094f9 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_by_id.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_by_id.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companysyncstatus as shared_companysyncstatus -from ..shared import errormessage as shared_errormessage +from ...models.shared import companysyncstatus as shared_companysyncstatus from typing import Optional @@ -22,13 +21,11 @@ class GetSyncByIDRequest: class GetSyncByIDResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company_sync_status: Optional[shared_companysyncstatus.CompanySyncStatus] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py old mode 100755 new mode 100644 index 2e9fe7446..65e002113 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/get_sync_transaction.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import transaction as shared_transaction +from ...models.shared import transaction as shared_transaction from typing import Optional @@ -24,12 +23,10 @@ class GetSyncTransactionRequest: class GetSyncTransactionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" transaction: Optional[shared_transaction.Transaction] = dataclasses.field(default=None) r"""Success""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py old mode 100755 new mode 100644 index d855e9fc9..daf5ee82e --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/initiate_sync.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import initiatesync as shared_initiatesync -from ..shared import syncinitiated as shared_syncinitiated +from ...models.shared import initiatesync as shared_initiatesync +from ...models.shared import syncinitiated as shared_syncinitiated from typing import Optional @@ -22,12 +21,10 @@ class InitiateSyncRequest: class InitiateSyncResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""If model is incorrect""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" sync_initiated: Optional[shared_syncinitiated.SyncInitiated] = dataclasses.field(default=None) r"""Returns the newly created SyncId""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py old mode 100755 new mode 100644 index 601c3326c..72bcc118a --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_companies.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companies as shared_companies -from ..shared import errormessage as shared_errormessage +from ...models.shared import companies as shared_companies from typing import Optional @@ -26,13 +25,11 @@ class ListCompaniesRequest: class ListCompaniesResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" companies: Optional[shared_companies.Companies] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py old mode 100755 new mode 100644 index 8c85c3ad3..24f4c54f5 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_connections.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connections as shared_connections -from ..shared import errormessage as shared_errormessage +from ...models.shared import connections as shared_connections from typing import Optional @@ -28,13 +27,11 @@ class ListConnectionsRequest: class ListConnectionsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connections: Optional[shared_connections.Connections] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py old mode 100755 new mode 100644 index 8a7091822..d6a05381e --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_customers.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import customers as shared_customers -from ..shared import errormessage as shared_errormessage +from ...models.shared import customers as shared_customers from typing import Optional @@ -28,13 +27,11 @@ class ListCustomersRequest: class ListCustomersResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" customers: Optional[shared_customers.Customers] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py old mode 100755 new mode 100644 index 609e02e50..348e80bd8 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_pull_operations.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pulloperations as shared_pulloperations +from ...models.shared import pulloperations as shared_pulloperations from typing import Optional @@ -28,13 +27,11 @@ class ListPullOperationsRequest: class ListPullOperationsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" pull_operations: Optional[shared_pulloperations.PullOperations] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py old mode 100755 new mode 100644 index 31aa99ee3..989e10b46 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_push_operations.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pushoperations as shared_pushoperations +from ...models.shared import pushoperations as shared_pushoperations from typing import Optional @@ -28,13 +27,11 @@ class ListPushOperationsRequest: class ListPushOperationsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" push_operations: Optional[shared_pushoperations.PushOperations] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py old mode 100755 new mode 100644 index 6b100113a..c77b1ce6f --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_suppliers.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import suppliers as shared_suppliers +from ...models.shared import suppliers as shared_suppliers from typing import Optional @@ -28,12 +27,10 @@ class ListSuppliersRequest: class ListSuppliersResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" suppliers: Optional[shared_suppliers.Suppliers] = dataclasses.field(default=None) r"""Success""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py old mode 100755 new mode 100644 index 42250e6e9..25c62621f --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_sync_transactions.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import transactions as shared_transactions +from ...models.shared import transactions as shared_transactions from typing import Optional @@ -26,12 +25,10 @@ class ListSyncTransactionsRequest: class ListSyncTransactionsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" transactions: Optional[shared_transactions.Transactions] = dataclasses.field(default=None) r"""Success""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_syncs.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_syncs.py old mode 100755 new mode 100644 index da54b7875..497fdcac5 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/list_syncs.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/list_syncs.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companysyncstatus as shared_companysyncstatus -from ..shared import errormessage as shared_errormessage +from ...models.shared import companysyncstatus as shared_companysyncstatus from typing import List, Optional @@ -20,13 +19,11 @@ class ListSyncsRequest: class ListSyncsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - company_sync_statuses: Optional[List[shared_companysyncstatus.CompanySyncStatus]] = dataclasses.field(default=None) + classes: Optional[List[shared_companysyncstatus.CompanySyncStatus]] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py old mode 100755 new mode 100644 index 526ab213e..a67673841 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_all_data_types.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -19,11 +17,9 @@ class RefreshAllDataTypesRequest: class RefreshAllDataTypesResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py old mode 100755 new mode 100644 index ad5ef640d..ea9a0a6be --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/refresh_data_type.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import datatype as shared_datatype -from ..shared import errormessage as shared_errormessage -from ..shared import pulloperation as shared_pulloperation +from ...models.shared import pulloperation as shared_pulloperation +from ...models.shared import schema_datatype as shared_schema_datatype from typing import Optional @@ -13,7 +12,7 @@ class RefreshDataTypeRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) r"""Unique identifier for a company.""" - data_type: shared_datatype.DataType = dataclasses.field(metadata={'path_param': { 'field_name': 'dataType', 'style': 'simple', 'explode': False }}) + data_type: shared_schema_datatype.SchemaDataType = dataclasses.field(metadata={'path_param': { 'field_name': 'dataType', 'style': 'simple', 'explode': False }}) r"""The key of a Codat data type""" connection_id: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'connectionId', 'style': 'form', 'explode': True }}) r"""Optionally, provide a data connection id to only queue pull operations on that connection.""" @@ -25,13 +24,11 @@ class RefreshDataTypeRequest: class RefreshDataTypeResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" pull_operation: Optional[shared_pulloperation.PullOperation] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py old mode 100755 new mode 100644 index 3855cc61e..ee1ef6008 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/set_company_configuration.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companyconfiguration as shared_companyconfiguration -from ..shared import errormessage as shared_errormessage +from ...models.shared import companyconfiguration as shared_companyconfiguration from typing import Optional @@ -21,13 +20,11 @@ class SetCompanyConfigurationRequest: class SetCompanyConfigurationResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company_configuration: Optional[shared_companyconfiguration.CompanyConfiguration] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py old mode 100755 new mode 100644 index 95d19d557..080564ea5 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/unlink_connection.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import dataconnectionstatus as shared_dataconnectionstatus -from ..shared import errormessage as shared_errormessage +from ...models.shared import connection as shared_connection +from ...models.shared import dataconnectionstatus as shared_dataconnectionstatus from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -35,13 +34,11 @@ class UnlinkConnectionRequest: class UnlinkConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py old mode 100755 new mode 100644 index 6f159a98a..3df4f661f --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_company.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import company as shared_company -from ..shared import companyrequestbody as shared_companyrequestbody -from ..shared import errormessage as shared_errormessage +from ...models.shared import company as shared_company +from ...models.shared import companyrequestbody as shared_companyrequestbody from typing import Optional @@ -22,13 +21,11 @@ class UpdateCompanyRequest: class UpdateCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company: Optional[shared_company.Company] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py old mode 100755 new mode 100644 index 73d484a67..284f96c03 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_customer.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import customer as shared_customer -from ..shared import errormessage as shared_errormessage -from ..shared import updatecustomerresponse as shared_updatecustomerresponse +from ...models.shared import customer as shared_customer +from ...models.shared import updatecustomerresponse as shared_updatecustomerresponse from typing import Optional @@ -32,12 +31,10 @@ class UpdateCustomerRequest: class UpdateCustomerResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" update_customer_response: Optional[shared_updatecustomerresponse.UpdateCustomerResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py old mode 100755 new mode 100644 index b244d2b84..096aebdfd --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_expense_transaction.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import updateexpenserequest as shared_updateexpenserequest -from ..shared import updateexpenseresponse as shared_updateexpenseresponse +from ...models.shared import updateexpenserequest as shared_updateexpenserequest +from ...models.shared import updateexpenseresponse as shared_updateexpenseresponse from typing import Optional @@ -24,12 +23,10 @@ class UpdateExpenseTransactionRequest: class UpdateExpenseTransactionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" update_expense_response: Optional[shared_updateexpenseresponse.UpdateExpenseResponse] = dataclasses.field(default=None) r"""Accepted""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py old mode 100755 new mode 100644 index 1e995b680..e6a610e68 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/update_supplier.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import supplier as shared_supplier -from ..shared import updatesupplierresponse as shared_updatesupplierresponse +from ...models.shared import supplier as shared_supplier +from ...models.shared import updatesupplierresponse as shared_updatesupplierresponse from typing import Optional @@ -32,12 +31,10 @@ class UpdateSupplierRequest: class UpdateSupplierResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" update_supplier_response: Optional[shared_updatesupplierresponse.UpdateSupplierResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py b/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py old mode 100755 new mode 100644 index 39386cf88..f669abc31 --- a/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/operations/upload_expense_attachment.py @@ -3,19 +3,11 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import attachment as shared_attachment -from ..shared import errormessage as shared_errormessage +from ...models.shared import attachment as shared_attachment +from ...models.shared import attachmentupload as shared_attachmentupload from typing import Optional -@dataclasses.dataclass -class UploadExpenseAttachmentRequestBody: - content: bytes = dataclasses.field(metadata={'multipart_form': { 'content': True }}) - request_body: str = dataclasses.field(metadata={'multipart_form': { 'field_name': 'requestBody' }}) - - - - @dataclasses.dataclass class UploadExpenseAttachmentRequest: company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) @@ -24,7 +16,7 @@ class UploadExpenseAttachmentRequest: r"""Unique identifier for a sync.""" transaction_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'transactionId', 'style': 'simple', 'explode': False }}) r"""The unique identifier for your SMB's transaction.""" - request_body: Optional[UploadExpenseAttachmentRequestBody] = dataclasses.field(default=None, metadata={'multipart_form': { 'file': True }, 'request': { 'media_type': 'multipart/form-data' }}) + attachment_upload: Optional[shared_attachmentupload.AttachmentUpload] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'multipart/form-data' }}) @@ -33,13 +25,11 @@ class UploadExpenseAttachmentRequest: class UploadExpenseAttachmentResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py old mode 100755 new mode 100644 index 47bcf4090..c3a2316cb --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/__init__.py @@ -3,14 +3,17 @@ from .account import * from .accountingaddresstype import * from .accountmappinginfo import * +from .accountprototype import * from .accountstatus import * from .accounttype import * from .attachment import * +from .attachmentupload import * from .bankaccount import * from .clientratelimitreachedwebhook import * from .clientratelimitreachedwebhookdata import * from .clientratelimitresetwebhook import * from .clientratelimitresetwebhookdata import * +from .codatfile import * from .companies import * from .company import * from .companyconfiguration import * @@ -33,12 +36,12 @@ from .dataconnectionstatus import * from .datastatus import * from .datatype import * -from .errormessage import * from .expensetransaction import * from .expensetransactionline import * from .halref import * from .initiatesync import * from .integrationtype import * +from .invoiceto import * from .items import * from .links import * from .mappingoptions import * @@ -59,6 +62,7 @@ from .pushoptiontype import * from .pushvalidationinfo import * from .recordref import * +from .schema_datatype import * from .security import * from .supplementaldata import * from .supplier import * @@ -73,6 +77,7 @@ from .syncstartedwebhook import * from .taxratemappinginfo import * from .trackingcategorymappinginfo import * +from .trackingref import * from .transaction import * from .transactions import * from .transactionstatus import * @@ -83,4 +88,4 @@ from .validation import * from .validationitem import * -__all__ = ["Account","AccountMappingInfo","AccountMappingInfoAccountType","AccountMappingInfoValidTransactionTypes","AccountMetadata","AccountStatus","AccountType","AccountValidDataTypeLinks","AccountingAddressType","Attachment","BankAccount","ClientRateLimitReachedWebhook","ClientRateLimitReachedWebhookData","ClientRateLimitResetWebhook","ClientRateLimitResetWebhookData","Companies","Company","CompanyConfiguration","CompanyRequestBody","CompanySyncStatus","Connection","ConnectionSourceType","Connections","Contact","ContactPhone","ContactRef","ContactRefType","CreateAccountResponse","CreateCustomerResponse","CreateExpenseRequest","CreateExpenseResponse","CreateSupplierResponse","Customer","CustomerDetails","CustomerStatus","Customers","DataConnectionError","DataConnectionStatus","DataStatus","DataStatusDataTypes","DataType","ErrorMessage","ExpenseTransaction","ExpenseTransactionBankAccountReference","ExpenseTransactionLine","ExpenseTransactionType","HalRef","InitiateSync","IntegrationType","Items","Links","MappingOptions","Metadata","PhoneNumberType","PullOperation","PullOperationStatus","PullOperations","PushChangeType","PushFieldValidation","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","RecordRef","Security","SupplementalData","Supplier","SupplierAccountingAddress","SupplierDetails","SupplierStatus","Suppliers","SyncCompleteWebhook","SyncCompleteWebhookData","SyncFailedWebhook","SyncFailedWebhookData","SyncInitiated","SyncStartedWebhook","SyncStartedWebhookData","TaxRateMappingInfo","TaxRateMappingInfoValidTransactionTypes","TrackingCategoryMappingInfo","Transaction","TransactionStatus","Transactions","UpdateCustomerResponse","UpdateExpenseRequest","UpdateExpenseRequestBankAccountReference","UpdateExpenseResponse","UpdateSupplierResponse","Validation","ValidationItem"] +__all__ = ["Account","AccountMappingInfo","AccountMappingInfoAccountType","AccountMetadata","AccountPrototype","AccountStatus","AccountType","AccountValidDataTypeLinks","AccountingAddress","AccountingAddressType","Attachment","AttachmentUpload","BankAccount","BankAccountReference","ClientRateLimitReachedWebhook","ClientRateLimitReachedWebhookData","ClientRateLimitResetWebhook","ClientRateLimitResetWebhookData","CodatFile","Companies","Company","CompanyConfiguration","CompanyRequestBody","CompanySyncStatus","Connection","Connections","Contact","ContactRef","CreateAccountResponse","CreateCustomerResponse","CreateExpenseRequest","CreateExpenseResponse","CreateSupplierResponse","Customer","CustomerDetails","CustomerStatus","Customers","Data","DataConnectionError","DataConnectionStatus","DataStatus","DataType","DataTypes","ExpenseTransaction","ExpenseTransactionLine","ExpenseTransactionType","HalRef","InitiateSync","IntegrationType","InvoiceTo","Items","Links","MappingOptions","Metadata","Phone","PhoneNumberType","PullOperation","PullOperations","PushChangeType","PushFieldValidation","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","RecordRef","SchemaDataType","Security","SourceType","Status","SupplementalData","Supplier","SupplierDetails","SupplierStatus","Suppliers","SyncCompleteWebhook","SyncCompleteWebhookData","SyncFailedWebhook","SyncFailedWebhookData","SyncInitiated","SyncStartedWebhook","TaxRateMappingInfo","TaxRateMappingInfoValidTransactionTypes","TrackingCategoryMappingInfo","TrackingRef","TrackingRefDataType","Transaction","TransactionStatus","Transactions","Type","UpdateCustomerResponse","UpdateExpenseRequest","UpdateExpenseRequestBankAccountReference","UpdateExpenseResponse","UpdateSupplierResponse","ValidDataTypeLinks","ValidTransactionTypes","Validation","ValidationItem"] diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py old mode 100755 new mode 100644 index 44bbd4427..47dad4d58 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/account.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import accountstatus as shared_accountstatus -from ..shared import accounttype as shared_accounttype -from ..shared import supplementaldata as shared_supplementaldata +from .accountstatus import AccountStatus +from .accounttype import AccountType +from .supplementaldata import SupplementalData from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from decimal import Decimal @@ -81,27 +81,27 @@ class Account: ## Overview - Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. + Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. The categories for an account include: - * Asset - * Expense - * Income - * Liability - * Equity. + * Asset + * Expense + * Income + * Liability + * Equity. - The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. + The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. - At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. + At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. - To determine the list of allowed categories for a specific integration, you can: + To determine the list of allowed categories for a specific integration, you can: - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). - - Refer to the integration's own documentation. + - Refer to the integration's own documentation. > **Accounts with no category** - > + > > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`. - > + > > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. """ currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) @@ -139,14 +139,14 @@ class Account: nominal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode') }}) r"""Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - status: Optional[shared_accountstatus.AccountStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + status: Optional[AccountStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Status of the account""" - 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 }}) + supplemental_data: Optional[SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ - type: Optional[shared_accounttype.AccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + type: Optional[AccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) r"""Type of account""" valid_datatype_links: Optional[List[AccountValidDataTypeLinks]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validDatatypeLinks') }}) r"""The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks).""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accountingaddresstype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountingaddresstype.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accountmappinginfo.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountmappinginfo.py old mode 100755 new mode 100644 index 92f544e2c..4ca99a44e --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/accountmappinginfo.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountmappinginfo.py @@ -15,7 +15,7 @@ class AccountMappingInfoAccountType(str, Enum): EXPENSE = 'Expense' EQUITY = 'Equity' -class AccountMappingInfoValidTransactionTypes(str, Enum): +class ValidTransactionTypes(str, Enum): PAYMENT = 'Payment' REFUND = 'Refund' REWARD = 'Reward' @@ -37,7 +37,7 @@ class AccountMappingInfo: r"""Unique identifier of account.""" name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) r"""Name of the account as it appears in the companies accounting software.""" - valid_transaction_types: Optional[List[AccountMappingInfoValidTransactionTypes]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validTransactionTypes') }}) + valid_transaction_types: Optional[List[ValidTransactionTypes]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validTransactionTypes') }}) r"""Supported transaction types for the account.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accountprototype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountprototype.py new file mode 100644 index 000000000..d355b4a18 --- /dev/null +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountprototype.py @@ -0,0 +1,111 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from .accountstatus import AccountStatus +from .accounttype import AccountType +from .supplementaldata import SupplementalData +from codatsyncexpenses import utils +from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal +from typing import List, Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class ValidDataTypeLinks: + r"""When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. + + For example, `validDatatypeLinks` might indicate the following references: + + - Which tax rates are valid to use on the line item of a bill. + - Which items can be used when creating an invoice. + + You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + + ## `validDatatypeLinks` example + + The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. + + ```json validDatatypeLinks for an account + { + \"id\": \"bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4\", + \"nominalCode\": \"090\", + \"name\": \"Business Bank Account\", + #... + \"validDatatypeLinks\": [ + { + \"property\": \"Id\", + \"links\": [ + \"Payment.AccountRef.Id\", + \"BillPayment.AccountRef.Id\", + \"DirectIncome.LineItems.AccountRef.Id\", + \"DirectCost.LineItems.AccountRef.Id\" + ] + } + ] + } + ``` + + + + ## Support for `validDatatypeLinks` + + Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. + + If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + """ + links: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('links') }}) + r"""Supported `dataTypes` that the record can be linked to.""" + property: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('property') }}) + r"""The property from the account that can be linked.""" + + + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class AccountPrototype: + currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) + r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + + ## Unknown currencies + + In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. + + There are only a very small number of edge cases where this currency code is returned by the Codat system. + """ + current_balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder }}) + r"""Current balance in the account.""" + description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description') }}) + r"""Description for the account.""" + fully_qualified_category: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fullyQualifiedCategory') }}) + r"""Full category of the account. + + For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. + """ + fully_qualified_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fullyQualifiedName') }}) + r"""Full name of the account, for example: + - `Cash On Hand` + - `Rents Held In Trust` + - `Fixed Asset` + """ + is_bank_account: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBankAccount'), 'exclude': lambda f: f is None }}) + r"""Confirms whether the account is a bank account or not.""" + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) + r"""Name of the account.""" + nominal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode') }}) + r"""Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system.""" + status: Optional[AccountStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + r"""Status of the account""" + supplemental_data: Optional[SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) + r"""Supplemental data is additional data you can include in our standard data types. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. + """ + type: Optional[AccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + r"""Type of account""" + valid_datatype_links: Optional[List[ValidDataTypeLinks]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validDatatypeLinks') }}) + r"""The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks).""" + + diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accountstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accountstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/accounttype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/accounttype.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/attachment.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/attachment.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/attachmentupload.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/attachmentupload.py new file mode 100644 index 000000000..5ff7f47c9 --- /dev/null +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/attachmentupload.py @@ -0,0 +1,13 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from .codatfile import CodatFile + + +@dataclasses.dataclass +class AttachmentUpload: + file: CodatFile = dataclasses.field(metadata={'multipart_form': { 'file': True }}) + r"""The file to be uploaded as an attachment.""" + + diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/bankaccount.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/bankaccount.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhook.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhook.py old mode 100755 new mode 100644 index d60ab4d3c..41772ea8e --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhook.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhook.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import clientratelimitreachedwebhookdata as shared_clientratelimitreachedwebhookdata +from .clientratelimitreachedwebhookdata import ClientRateLimitReachedWebhookData from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -18,7 +18,7 @@ class ClientRateLimitReachedWebhook: r"""Unique identifier for your client in Codat.""" client_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ClientName'), 'exclude': lambda f: f is None }}) r"""Name of your client in Codat.""" - data: Optional[shared_clientratelimitreachedwebhookdata.ClientRateLimitReachedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + data: Optional[ClientRateLimitReachedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }}) r"""A human readable message about the webhook.""" rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhookdata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitreachedwebhookdata.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhook.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhook.py old mode 100755 new mode 100644 index eeb34129a..fe52b7e68 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhook.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhook.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import clientratelimitresetwebhookdata as shared_clientratelimitresetwebhookdata +from .clientratelimitresetwebhookdata import ClientRateLimitResetWebhookData from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -18,7 +18,7 @@ class ClientRateLimitResetWebhook: r"""Unique identifier for your client in Codat.""" client_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ClientName'), 'exclude': lambda f: f is None }}) r"""Name of your client in Codat.""" - data: Optional[shared_clientratelimitresetwebhookdata.ClientRateLimitResetWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + data: Optional[ClientRateLimitResetWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }}) r"""A human readable message about the webhook.""" rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhookdata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/clientratelimitresetwebhookdata.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/codatfile.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/codatfile.py new file mode 100644 index 000000000..3a08327c7 --- /dev/null +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/codatfile.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses + + +@dataclasses.dataclass +class CodatFile: + content: bytes = dataclasses.field(metadata={'multipart_form': { 'content': True }}) + file_name: str = dataclasses.field(metadata={'multipart_form': { 'field_name': 'fileName' }}) + + diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py old mode 100755 new mode 100644 index fbdbc0849..ba2a40289 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/companies.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import company as shared_company -from ..shared import links as shared_links +from .company import Company +from .links import Links from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Companies: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_company.Company]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[Company]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py old mode 100755 new mode 100644 index 042ab10d1..5cb7a2be2 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/company.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import connection as shared_connection +from .connection import Connection from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -46,7 +46,7 @@ class Company: """ created_by_user_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdByUserName'), 'exclude': lambda f: f is None }}) r"""Name of user that created the company in Codat.""" - data_connections: Optional[List[shared_connection.Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnections'), 'exclude': lambda f: f is None }}) + data_connections: Optional[List[Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnections'), 'exclude': lambda f: f is None }}) description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Additional information about the company. This can be used to store foreign IDs, references, etc.""" last_sync: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSync'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/companyconfiguration.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/companyconfiguration.py old mode 100755 new mode 100644 index b0e933bb2..c989bb2a0 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/companyconfiguration.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/companyconfiguration.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import bankaccount as shared_bankaccount -from ..shared import customerdetails as shared_customerdetails -from ..shared import supplierdetails as shared_supplierdetails +from .bankaccount import BankAccount +from .customerdetails import CustomerDetails +from .supplierdetails import SupplierDetails from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json @@ -12,8 +12,8 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CompanyConfiguration: - bank_account: shared_bankaccount.BankAccount = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccount') }}) - customer: shared_customerdetails.CustomerDetails = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customer') }}) - supplier: shared_supplierdetails.SupplierDetails = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplier') }}) + bank_account: BankAccount = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccount') }}) + customer: CustomerDetails = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customer') }}) + supplier: SupplierDetails = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplier') }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/companyrequestbody.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/companyrequestbody.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/companysyncstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/companysyncstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py old mode 100755 new mode 100644 index 43d71b6df..744bcb863 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/connection.py @@ -2,14 +2,14 @@ from __future__ import annotations import dataclasses -from ..shared import dataconnectionerror as shared_dataconnectionerror -from ..shared import dataconnectionstatus as shared_dataconnectionstatus +from .dataconnectionerror import DataConnectionError +from .dataconnectionstatus import DataConnectionStatus from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from enum import Enum from typing import Any, Dict, List, Optional -class ConnectionSourceType(str, Enum): +class SourceType(str, Enum): r"""The type of platform of the connection.""" ACCOUNTING = 'Accounting' BANKING = 'Banking' @@ -65,13 +65,13 @@ class Connection: r"""Name of integration connected to company.""" source_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceId') }}) r"""A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.""" - source_type: ConnectionSourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }}) + source_type: SourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }}) r"""The type of platform of the connection.""" - status: shared_dataconnectionstatus.DataConnectionStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: DataConnectionStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current authorization status of the data connection.""" additional_properties: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalProperties'), 'exclude': lambda f: f is None }}) connection_info: Optional[Dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('connectionInfo'), 'exclude': lambda f: f is None }}) - data_connection_errors: Optional[List[shared_dataconnectionerror.DataConnectionError]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionErrors'), 'exclude': lambda f: f is None }}) + data_connection_errors: Optional[List[DataConnectionError]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionErrors'), 'exclude': lambda f: f is None }}) last_sync: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSync'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py old mode 100755 new mode 100644 index 5bb865452..78b9ac150 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/connections.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import connection as shared_connection -from ..shared import links as shared_links +from .connection import Connection +from .links import Links from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Connections: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_connection.Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/contact.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/contact.py old mode 100755 new mode 100644 index 308e6fed2..bb5cefb66 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/contact.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/contact.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import customerstatus as shared_customerstatus -from ..shared import items as shared_items -from ..shared import phonenumbertype as shared_phonenumbertype +from .customerstatus import CustomerStatus +from .items import Items +from .phonenumbertype import PhoneNumberType from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,10 +12,10 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class ContactPhone: +class Phone: number: Optional[str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('number') }}) r"""A phone number.""" - type: shared_phonenumbertype.PhoneNumberType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: PhoneNumberType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of phone number""" @@ -24,9 +24,9 @@ class ContactPhone: @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Contact: - status: shared_customerstatus.CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of customer.""" - address: Optional[shared_items.Items] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('address'), 'exclude': lambda f: f is None }}) + address: Optional[Items] = 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') }}) r"""Email of a contact for a customer.""" modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) @@ -52,7 +52,7 @@ class Contact: """ name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) r"""Name of a contact for a customer.""" - phone: Optional[List[ContactPhone]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phone') }}) + phone: Optional[List[Phone]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phone') }}) r"""An array of Phone numbers.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/contactref.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/contactref.py old mode 100755 new mode 100644 index e2ec795b1..44da65e7a --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/contactref.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/contactref.py @@ -7,7 +7,7 @@ from enum import Enum from typing import Optional -class ContactRefType(str, Enum): +class Type(str, Enum): r"""The type of contact.""" SUPPLIER = 'Supplier' @@ -17,7 +17,7 @@ class ContactRefType(str, Enum): class ContactRef: id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Identifier of supplier or customer.""" - type: Optional[ContactRefType] = dataclasses.field(default=ContactRefType.SUPPLIER, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + type: Optional[Type] = dataclasses.field(default=Type.SUPPLIER, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) r"""The type of contact.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py old mode 100755 new mode 100644 index 602b7ee3b..dbf543dad --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createaccountresponse.py @@ -2,11 +2,11 @@ from __future__ import annotations import dataclasses -from ..shared import account as shared_account -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import validation as shared_validation +from .account import Account +from .datatype import DataType +from .pushoperationchange import PushOperationChange +from .pushoperationstatus import PushOperationStatus +from .validation import Validation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -42,11 +42,11 @@ 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.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) r"""Push status code.""" - changes: Optional[List[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -69,37 +69,37 @@ 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. """ - data: Optional[shared_account.Account] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) + data: Optional[Account] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) r"""> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. View the coverage for accounts in the Data coverage explorer. ## Overview - Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. + Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. The categories for an account include: - * Asset - * Expense - * Income - * Liability - * Equity. + * Asset + * Expense + * Income + * Liability + * Equity. - The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. + The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. - At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. + At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. - To determine the list of allowed categories for a specific integration, you can: + To determine the list of allowed categories for a specific integration, you can: - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). - - Refer to the integration's own documentation. + - Refer to the integration's own documentation. > **Accounts with no category** - > + > > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`. - > + > > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. """ - data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[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') }}) r"""A message about the error.""" @@ -110,7 +110,7 @@ class CreateAccountResponse: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py old mode 100755 new mode 100644 index 8d8056c5d..bac477fb3 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createcustomerresponse.py @@ -2,11 +2,11 @@ from __future__ import annotations import dataclasses -from ..shared import customer as shared_customer -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import validation as shared_validation +from .customer import Customer +from .datatype import DataType +from .pushoperationchange import PushOperationChange +from .pushoperationstatus import PushOperationStatus +from .validation import Validation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -42,11 +42,11 @@ 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.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) r"""Push status code.""" - changes: Optional[List[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -69,7 +69,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. """ - data: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) + data: Optional[Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) r"""> View the coverage for customers in the Data coverage explorer. ## Overview @@ -78,7 +78,7 @@ class CreateCustomerResponse: Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). """ - 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 }}) + data_type: Optional[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') }}) r"""A message about the error.""" @@ -89,7 +89,7 @@ class CreateCustomerResponse: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenserequest.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenserequest.py old mode 100755 new mode 100644 index 8870029dd..b3d74debe --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenserequest.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenserequest.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import expensetransaction as shared_expensetransaction +from .expensetransaction import ExpenseTransaction from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -11,6 +11,6 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CreateExpenseRequest: - items: Optional[List[shared_expensetransaction.ExpenseTransaction]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('items'), 'exclude': lambda f: f is None }}) + items: Optional[List[ExpenseTransaction]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('items'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenseresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createexpenseresponse.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py old mode 100755 new mode 100644 index 863dcce89..8b53a208a --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/createsupplierresponse.py @@ -2,11 +2,11 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import supplier as shared_supplier -from ..shared import validation as shared_validation +from .datatype import DataType +from .pushoperationchange import PushOperationChange +from .pushoperationstatus import PushOperationStatus +from .supplier import Supplier +from .validation import Validation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -42,11 +42,11 @@ 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.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) r"""Push status code.""" - changes: Optional[List[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -69,14 +69,14 @@ 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. """ - data: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) + data: Optional[Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) r"""> View the coverage for suppliers in the Data coverage explorer. ## Overview From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). """ - 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 }}) + data_type: Optional[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') }}) r"""A message about the error.""" @@ -87,7 +87,7 @@ class CreateSupplierResponse: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py old mode 100755 new mode 100644 index a7cfebc7f..c25746bd3 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/customer.py @@ -2,16 +2,37 @@ from __future__ import annotations import dataclasses -from ..shared import contact as shared_contact -from ..shared import customerstatus as shared_customerstatus -from ..shared import items as shared_items -from ..shared import metadata as shared_metadata -from ..shared import supplementaldata as shared_supplementaldata +from .accountingaddresstype import AccountingAddressType +from .contact import Contact +from .customerstatus import CustomerStatus +from .metadata import Metadata +from .supplementaldata import SupplementalData from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class AccountingAddress: + type: AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + r"""The type of the address""" + city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city') }}) + r"""City of the customer address.""" + country: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('country') }}) + r"""Country of the customer address.""" + line1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('line1') }}) + r"""Line 1 of the customer address.""" + line2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('line2') }}) + r"""Line 2 of the customer address.""" + postal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postalCode') }}) + r"""Postal code or zip code.""" + region: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('region') }}) + r"""Region of the customer address.""" + + + + @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Customer: @@ -23,13 +44,13 @@ class Customer: Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). """ - status: shared_customerstatus.CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of customer.""" - addresses: Optional[List[shared_items.Items]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses') }}) + addresses: Optional[List[AccountingAddress]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses') }}) r"""An array of Addresses.""" contact_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactName') }}) r"""Name of the main contact for the identified customer.""" - contacts: Optional[List[shared_contact.Contact]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contacts') }}) + contacts: Optional[List[Contact]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contacts') }}) r"""An array of Contacts.""" customer_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerName') }}) r"""Name of the customer as recorded in the accounting system, typically the company name.""" @@ -46,14 +67,14 @@ class Customer: r"""Email address the customer can be contacted by.""" 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 customer, unique to the company in the accounting platform.""" - metadata: Optional[shared_metadata.Metadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }}) + metadata: Optional[Metadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }}) modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) phone: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phone') }}) r"""Phone number the customer can be contacted by.""" registration_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('registrationNumber') }}) r"""Company number. In the UK, this is typically the Companies House company registration number.""" 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 }}) + supplemental_data: Optional[SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/customerdetails.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/customerdetails.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py old mode 100755 new mode 100644 index f6ddaf7a4..d9d04313b --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/customers.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import customer as shared_customer -from ..shared import links as shared_links +from .customer import Customer +from .links import Links from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Customers: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_customer.Customer]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[Customer]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/customerstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/customerstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnectionerror.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnectionerror.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnectionstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/dataconnectionstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py old mode 100755 new mode 100644 index 774558ecf..ef2e3a05d --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/datastatus.py @@ -7,7 +7,7 @@ from enum import Enum from typing import Optional -class DataStatusDataTypes(str, Enum): +class DataTypes(str, Enum): r"""Available Data types""" ACCOUNT_TRANSACTIONS = 'accountTransactions' BALANCE_SHEET = 'balanceSheet' @@ -24,6 +24,7 @@ class DataStatusDataTypes(str, Enum): DIRECT_COSTS = 'directCosts' DIRECT_INCOMES = 'directIncomes' INVOICES = 'invoices' + ITEM_RECEIPTS = 'itemReceipts' ITEMS = 'items' JOURNAL_ENTRIES = 'journalEntries' JOURNALS = 'journals' @@ -59,7 +60,7 @@ class DataStatus: r"""Describes the state of data in the Codat cache for a company and data type""" current_status: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentStatus') }}) r"""The current status of the dataset in Codat's cache.""" - data_type: DataStatusDataTypes = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType') }}) + data_type: DataTypes = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType') }}) r"""Available Data types""" last_successful_sync: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSuccessfulSync') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py old mode 100755 new mode 100644 index ea726125d..df149bcf0 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/datatype.py @@ -20,6 +20,7 @@ class DataType(str, Enum): DIRECT_COSTS = 'directCosts' DIRECT_INCOMES = 'directIncomes' INVOICES = 'invoices' + ITEM_RECEIPTS = 'itemReceipts' ITEMS = 'items' JOURNAL_ENTRIES = 'journalEntries' JOURNALS = 'journals' diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py old mode 100755 new mode 100644 index e949051da..b90e424d3 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransaction.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import contactref as shared_contactref -from ..shared import expensetransactionline as shared_expensetransactionline +from .contactref import ContactRef +from .expensetransactionline import ExpenseTransactionLine from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from decimal import Decimal @@ -13,7 +13,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class ExpenseTransactionBankAccountReference: +class BankAccountReference: id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Identifier of the bank account.""" @@ -61,8 +61,8 @@ class ExpenseTransaction: """ type: ExpenseTransactionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of transaction.""" - bank_account_ref: Optional[ExpenseTransactionBankAccountReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountRef'), 'exclude': lambda f: f is None }}) - contact_ref: Optional[shared_contactref.ContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }}) + bank_account_ref: Optional[BankAccountReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountRef'), 'exclude': lambda f: f is None }}) + contact_ref: Optional[ContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }}) currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. @@ -89,12 +89,21 @@ class ExpenseTransaction: | **GBP** | £20 | 1.277 | $25.54 | | **EUR** | €20 | 1.134 | $22.68 | | **RUB** | ₽20 | 0.015 | $0.30 | + + + ### Integration-specific details + + | Integration | Scenario | System behavior | + |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. | """ - lines: Optional[List[shared_expensetransactionline.ExpenseTransactionLine]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lines'), 'exclude': lambda f: f is None }}) + lines: Optional[List[ExpenseTransactionLine]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lines'), 'exclude': lambda f: f is None }}) r"""Array of transaction lines.""" merchant_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('merchantName'), 'exclude': lambda f: f is None }}) r"""Name of the merchant where the purchase took place""" notes: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('notes'), 'exclude': lambda f: f is None }}) r"""Any private, company notes about the transaction.""" + post_as_draft: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postAsDraft') }}) + r"""For supported accouting platforms, setting this optional property to true will post the transaction to a drafted state.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransactionline.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransactionline.py old mode 100755 new mode 100644 index 40be0402c..8dd1525ca --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransactionline.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/expensetransactionline.py @@ -2,7 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import recordref as shared_recordref +from .invoiceto import InvoiceTo +from .recordref import RecordRef +from .trackingref import TrackingRef from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from decimal import Decimal @@ -12,12 +14,14 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ExpenseTransactionLine: - account_ref: shared_recordref.RecordRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef') }}) + account_ref: RecordRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef') }}) net_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of the line, exclusive of tax.""" tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of tax for the line.""" - tax_rate_ref: Optional[shared_recordref.RecordRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) - tracking_refs: Optional[List[shared_recordref.RecordRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingRefs'), 'exclude': lambda f: f is None }}) + invoice_to: Optional[InvoiceTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoiceTo') }}) + r"""Unique identifier of the customer the expense is billable to. The invoiceTo object is currently only supported for QBO.""" + tax_rate_ref: Optional[RecordRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) + tracking_refs: Optional[List[TrackingRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingRefs') }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/halref.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/halref.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/initiatesync.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/initiatesync.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/integrationtype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/integrationtype.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/invoiceto.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/invoiceto.py new file mode 100644 index 000000000..68ac3da62 --- /dev/null +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/invoiceto.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses + + +@dataclasses.dataclass +class InvoiceTo: + r"""Unique identifier of the customer the expense is billable to. The invoiceTo object is currently only supported for QBO.""" + + diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/items.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/items.py old mode 100755 new mode 100644 index 9c94cec7f..5440879ff --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/items.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/items.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import accountingaddresstype as shared_accountingaddresstype +from .accountingaddresstype import AccountingAddressType from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -11,7 +11,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Items: - type: shared_accountingaddresstype.AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of the address""" city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city') }}) r"""City of the customer address.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py old mode 100755 new mode 100644 index bfeb0ab08..4c6f117bd --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/links.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import halref as shared_halref +from .halref import HalRef from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -11,9 +11,9 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Links: - current: shared_halref.HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('current') }}) - self_: shared_halref.HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('self') }}) - next: Optional[shared_halref.HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }}) - previous: Optional[shared_halref.HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('previous'), 'exclude': lambda f: f is None }}) + current: HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('current') }}) + self_: HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('self') }}) + next: Optional[HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }}) + previous: Optional[HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('previous'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/mappingoptions.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/mappingoptions.py old mode 100755 new mode 100644 index 6a4856565..e231f5f20 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/mappingoptions.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/mappingoptions.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import accountmappinginfo as shared_accountmappinginfo -from ..shared import taxratemappinginfo as shared_taxratemappinginfo -from ..shared import trackingcategorymappinginfo as shared_trackingcategorymappinginfo +from .accountmappinginfo import AccountMappingInfo +from .taxratemappinginfo import TaxRateMappingInfo +from .trackingcategorymappinginfo import TrackingCategoryMappingInfo from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -13,13 +13,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MappingOptions: - accounts: Optional[List[shared_accountmappinginfo.AccountMappingInfo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accounts') }}) + accounts: Optional[List[AccountMappingInfo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accounts') }}) r"""Array of available accounts for mapping.""" expense_provider: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expenseProvider') }}) r"""Name of the expense integration.""" - tax_rates: Optional[List[shared_taxratemappinginfo.TaxRateMappingInfo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRates') }}) + tax_rates: Optional[List[TaxRateMappingInfo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRates') }}) r"""Array of available tax rates for mapping.""" - tracking_categories: Optional[List[shared_trackingcategorymappinginfo.TrackingCategoryMappingInfo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategories') }}) + tracking_categories: Optional[List[TrackingCategoryMappingInfo]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategories') }}) r"""Array of available tracking categories for mapping.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/metadata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/metadata.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/phonenumbertype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/phonenumbertype.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py old mode 100755 new mode 100644 index 2d7092c68..be456afbf --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperation.py @@ -2,13 +2,12 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from enum import Enum from typing import Optional -class PullOperationStatus(str, Enum): +class Status(str, Enum): r"""The current status of the pull operation.""" INITIAL = 'Initial' QUEUED = 'Queued' @@ -45,12 +44,12 @@ class PullOperation: r"""Unique identifier of the company associated to this pull operation.""" connection_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('connectionId') }}) r"""Unique identifier of the connection associated to this pull operation.""" - data_type: shared_datatype.DataType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType') }}) - r"""Available Data types""" + data_type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType') }}) + r"""The data type you are requesting in a pull operation.""" id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) r"""Unique identifier of the pull operation.""" is_completed: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isCompleted') }}) - r"""`True` if the pull operation completed successfully.""" + r"""`True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead.""" is_errored: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isErrored') }}) r"""`True` if the pull operation entered an error state.""" progress: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('progress') }}) @@ -76,7 +75,7 @@ class PullOperation: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: PullOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: Status = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the pull operation.""" 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: @@ -101,5 +100,7 @@ class PullOperation: """ error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage') }}) r"""A message about a transient or persistent error.""" + status_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusDescription') }}) + r"""Additional information about the dataset status.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py old mode 100755 new mode 100644 index 6dbc9a2d2..861c5a489 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pulloperations.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import links as shared_links -from ..shared import pulloperation as shared_pulloperation +from .links import Links +from .pulloperation import PullOperation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PullOperations: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_pulloperation.PullOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[PullOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushchangetype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushchangetype.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushfieldvalidation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushfieldvalidation.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py old mode 100755 new mode 100644 index 1e7d08a08..1c3c65c4b --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperation.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import validation as shared_validation +from .datatype import DataType +from .pushoperationchange import PushOperationChange +from .pushoperationstatus import PushOperationStatus +from .validation import Validation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -41,11 +41,11 @@ class PushOperation: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) r"""Push status code.""" - changes: Optional[List[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -68,7 +68,7 @@ class PushOperation: > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[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') }}) r"""A message about the error.""" @@ -79,7 +79,7 @@ class PushOperation: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py old mode 100755 new mode 100644 index 593bb6c3d..32d42eb26 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationchange.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import pushchangetype as shared_pushchangetype -from ..shared import pushoperationref as shared_pushoperationref +from .pushchangetype import PushChangeType +from .pushoperationref import PushOperationRef from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -14,8 +14,8 @@ class PushOperationChange: attachment_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachmentId') }}) r"""Unique identifier for the attachment created otherwise null.""" - record_ref: Optional[shared_pushoperationref.PushOperationRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) - type: Optional[shared_pushchangetype.PushChangeType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + record_ref: Optional[PushOperationRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) + type: Optional[PushChangeType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) r"""Type of change being applied to record in third party platform.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py old mode 100755 new mode 100644 index a7b772e66..c0c1c3349 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationref.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype +from .datatype import DataType from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -11,7 +11,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PushOperationRef: - data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + data_type: Optional[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 }}) r"""Unique identifier for a push operation.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py old mode 100755 new mode 100644 index 7454ed7c5..330d7ab9a --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperations.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import links as shared_links -from ..shared import pushoperation as shared_pushoperation +from .links import Links +from .pushoperation import PushOperation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PushOperations: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_pushoperation.PushOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[PushOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoperationstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoption.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoption.py old mode 100755 new mode 100644 index 571e8e12e..0c71ccf0c --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoption.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoption.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import pushoptionchoice as shared_pushoptionchoice -from ..shared import pushoptionproperty as shared_pushoptionproperty -from ..shared import pushoptiontype as shared_pushoptiontype -from ..shared import pushvalidationinfo as shared_pushvalidationinfo +from .pushoptionchoice import PushOptionChoice +from .pushoptionproperty import PushOptionProperty +from .pushoptiontype import PushOptionType +from .pushvalidationinfo import PushValidationInfo from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Dict, List, Optional @@ -18,12 +18,12 @@ class PushOption: r"""The property's display name.""" required: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required') }}) r"""The property is required if `True`.""" - type: shared_pushoptiontype.PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The option type.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""A description of the property.""" - options: Optional[List[shared_pushoptionchoice.PushOptionChoice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options') }}) - properties: Optional[Dict[str, shared_pushoptionproperty.PushOptionProperty]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties') }}) - 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 }}) + options: Optional[List[PushOptionChoice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options') }}) + properties: Optional[Dict[str, PushOptionProperty]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties') }}) + validation: Optional[PushValidationInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionchoice.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionchoice.py old mode 100755 new mode 100644 index cf92fe45e..2c9ba053f --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionchoice.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionchoice.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import pushoptiontype as shared_pushoptiontype +from .pushoptiontype import PushOptionType from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -17,7 +17,7 @@ class PushOptionChoice: r"""The property's display name.""" required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required'), 'exclude': lambda f: f is None }}) r"""The property is required if `True`.""" - 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 }}) + type: Optional[PushOptionType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) r"""The option type.""" 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.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionproperty.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionproperty.py old mode 100755 new mode 100644 index efbc9c9a3..1d17451c3 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionproperty.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptionproperty.py @@ -2,9 +2,9 @@ from __future__ import annotations import dataclasses -from ..shared import pushoptionchoice as shared_pushoptionchoice -from ..shared import pushoptiontype as shared_pushoptiontype -from ..shared import pushvalidationinfo as shared_pushvalidationinfo +from .pushoptionchoice import PushOptionChoice +from .pushoptiontype import PushOptionType +from .pushvalidationinfo import PushValidationInfo from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Dict, List, Optional @@ -19,10 +19,10 @@ class PushOptionProperty: r"""The property's display name.""" required: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required') }}) r"""The property is required if `True`.""" - type: shared_pushoptiontype.PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The option type.""" - options: Optional[List[shared_pushoptionchoice.PushOptionChoice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options') }}) + options: Optional[List[PushOptionChoice]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options') }}) properties: Optional[Dict[str, PushOptionProperty]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties') }}) - 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 }}) + validation: Optional[PushValidationInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptiontype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushoptiontype.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushvalidationinfo.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushvalidationinfo.py old mode 100755 new mode 100644 index 4b100bbfd..d7ea59e17 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/pushvalidationinfo.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/pushvalidationinfo.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import pushfieldvalidation as shared_pushfieldvalidation +from .pushfieldvalidation import PushFieldValidation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -11,7 +11,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PushValidationInfo: - information: Optional[List[shared_pushfieldvalidation.PushFieldValidation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('information') }}) - warnings: Optional[List[shared_pushfieldvalidation.PushFieldValidation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings') }}) + information: Optional[List[PushFieldValidation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('information') }}) + warnings: Optional[List[PushFieldValidation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings') }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/recordref.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/recordref.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/schema_datatype.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/schema_datatype.py new file mode 100644 index 000000000..c6811c63c --- /dev/null +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/schema_datatype.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + +class SchemaDataType(str, Enum): + r"""Available Data types""" + ACCOUNT_TRANSACTIONS = 'accountTransactions' + BALANCE_SHEET = 'balanceSheet' + BANK_ACCOUNTS = 'bankAccounts' + BANK_TRANSACTIONS = 'bankTransactions' + BILL_CREDIT_NOTES = 'billCreditNotes' + BILL_PAYMENTS = 'billPayments' + BILLS = 'bills' + CASH_FLOW_STATEMENT = 'cashFlowStatement' + CHART_OF_ACCOUNTS = 'chartOfAccounts' + COMPANY = 'company' + CREDIT_NOTES = 'creditNotes' + CUSTOMERS = 'customers' + DIRECT_COSTS = 'directCosts' + DIRECT_INCOMES = 'directIncomes' + INVOICES = 'invoices' + ITEM_RECEIPTS = 'itemReceipts' + ITEMS = 'items' + JOURNAL_ENTRIES = 'journalEntries' + JOURNALS = 'journals' + PAYMENT_METHODS = 'paymentMethods' + PAYMENTS = 'payments' + PROFIT_AND_LOSS = 'profitAndLoss' + PURCHASE_ORDERS = 'purchaseOrders' + SALES_ORDERS = 'salesOrders' + SUPPLIERS = 'suppliers' + TAX_RATES = 'taxRates' + TRACKING_CATEGORIES = 'trackingCategories' + TRANSFERS = 'transfers' + BANKING_ACCOUNT_BALANCES = 'banking-accountBalances' + BANKING_ACCOUNTS = 'banking-accounts' + BANKING_TRANSACTION_CATEGORIES = 'banking-transactionCategories' + BANKING_TRANSACTIONS = 'banking-transactions' + COMMERCE_COMPANY_INFO = 'commerce-companyInfo' + COMMERCE_CUSTOMERS = 'commerce-customers' + COMMERCE_DISPUTES = 'commerce-disputes' + COMMERCE_LOCATIONS = 'commerce-locations' + COMMERCE_ORDERS = 'commerce-orders' + COMMERCE_PAYMENT_METHODS = 'commerce-paymentMethods' + COMMERCE_PAYMENTS = 'commerce-payments' + COMMERCE_PRODUCT_CATEGORIES = 'commerce-productCategories' + COMMERCE_PRODUCTS = 'commerce-products' + COMMERCE_TAX_COMPONENTS = 'commerce-taxComponents' + COMMERCE_TRANSACTIONS = 'commerce-transactions' diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/security.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/security.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplementaldata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplementaldata.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py old mode 100755 new mode 100644 index 95d12ce2f..ce4f5a51f --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplier.py @@ -2,36 +2,15 @@ from __future__ import annotations import dataclasses -from ..shared import accountingaddresstype as shared_accountingaddresstype -from ..shared import metadata as shared_metadata -from ..shared import supplementaldata as shared_supplementaldata -from ..shared import supplierstatus as shared_supplierstatus +from .items import Items +from .metadata import Metadata +from .supplementaldata import SupplementalData +from .supplierstatus import SupplierStatus from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class SupplierAccountingAddress: - type: shared_accountingaddresstype.AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - r"""The type of the address""" - city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city') }}) - r"""City of the customer address.""" - country: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('country') }}) - r"""Country of the customer address.""" - line1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('line1') }}) - r"""Line 1 of the customer address.""" - line2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('line2') }}) - r"""Line 2 of the customer address.""" - postal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postalCode') }}) - r"""Postal code or zip code.""" - region: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('region') }}) - r"""Region of the customer address.""" - - - - @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Supplier: @@ -41,9 +20,9 @@ class Supplier: From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). """ - status: shared_supplierstatus.SupplierStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: SupplierStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of the supplier.""" - addresses: Optional[List[SupplierAccountingAddress]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses') }}) + addresses: Optional[List[Items]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses') }}) r"""An array of Addresses.""" contact_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactName') }}) r"""Name of the main contact for the supplier.""" @@ -53,14 +32,14 @@ class Supplier: r"""Email address that the supplier may be contacted on.""" 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 supplier, unique to the company in the accounting platform.""" - metadata: Optional[shared_metadata.Metadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }}) + metadata: Optional[Metadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }}) modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) phone: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('phone') }}) r"""Phone number that the supplier may be contacted on.""" registration_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('registrationNumber') }}) r"""Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House.""" 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 }}) + supplemental_data: Optional[SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplierdetails.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplierdetails.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py old mode 100755 new mode 100644 index d6bc04bb3..48c1d7647 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/suppliers.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import links as shared_links -from ..shared import supplier as shared_supplier +from .links import Links +from .supplier import Supplier from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Suppliers: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_supplier.Supplier]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[Supplier]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/supplierstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/supplierstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhook.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhook.py old mode 100755 new mode 100644 index 315f2690c..65a08ea16 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhook.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhook.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import synccompletewebhookdata as shared_synccompletewebhookdata +from .synccompletewebhookdata import SyncCompleteWebhookData from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -20,7 +20,7 @@ class SyncCompleteWebhook: r"""Name of your client in Codat.""" company_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('CompanyId'), 'exclude': lambda f: f is None }}) r"""Unique identifier for your SMB in Codat.""" - data: Optional[shared_synccompletewebhookdata.SyncCompleteWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + data: Optional[SyncCompleteWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }}) r"""A human readable message about the webhook.""" rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhookdata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/synccompletewebhookdata.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhook.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhook.py old mode 100755 new mode 100644 index f82fac24d..f4175f3c6 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhook.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhook.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import syncfailedwebhookdata as shared_syncfailedwebhookdata +from .syncfailedwebhookdata import SyncFailedWebhookData from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -20,7 +20,7 @@ class SyncFailedWebhook: r"""Name of your client in Codat.""" company_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('CompanyId'), 'exclude': lambda f: f is None }}) r"""Unique identifier for your SMB in Codat.""" - data: Optional[shared_syncfailedwebhookdata.SyncFailedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + data: Optional[SyncFailedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }}) r"""A human readable message about the webhook.""" rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhookdata.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/syncfailedwebhookdata.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/syncinitiated.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/syncinitiated.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/syncstartedwebhook.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/syncstartedwebhook.py old mode 100755 new mode 100644 index 9e1bc1f29..49c6ee268 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/syncstartedwebhook.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/syncstartedwebhook.py @@ -9,7 +9,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class SyncStartedWebhookData: +class Data: sync_date_range_finish_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('SyncDateRangeFinishUtc'), '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: @@ -72,7 +72,7 @@ class SyncStartedWebhook: r"""Name of your client in Codat.""" company_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('CompanyId'), 'exclude': lambda f: f is None }}) r"""Unique identifier for your SMB in Codat.""" - data: Optional[SyncStartedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + data: Optional[Data] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }}) r"""A human readable message about the webhook.""" rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/taxratemappinginfo.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/taxratemappinginfo.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/trackingcategorymappinginfo.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/trackingref.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/trackingref.py new file mode 100644 index 000000000..05111b2bd --- /dev/null +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/trackingref.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from codatsyncexpenses import utils +from dataclasses_json import Undefined, dataclass_json +from enum import Enum +from typing import Optional + +class TrackingRefDataType(str, Enum): + r"""The type of the linked reference""" + TRACKING_CATEGORIES = 'trackingCategories' + CUSTOMERS = 'customers' + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class TrackingRef: + data_type: Optional[TrackingRefDataType] = dataclasses.field(default=TrackingRefDataType.TRACKING_CATEGORIES, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + r"""The type of the linked reference""" + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) + r"""Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer.""" + + diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py old mode 100755 new mode 100644 index 0d471ec97..0fafb7922 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/transaction.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import integrationtype as shared_integrationtype -from ..shared import transactionstatus as shared_transactionstatus +from .integrationtype import IntegrationType +from .transactionstatus import TransactionStatus from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -12,11 +12,11 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Transaction: - integration_type: Optional[shared_integrationtype.IntegrationType] = dataclasses.field(default=shared_integrationtype.IntegrationType.EXPENSES, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('integrationType') }}) + integration_type: Optional[IntegrationType] = dataclasses.field(default=IntegrationType.EXPENSES, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('integrationType') }}) r"""Type of transaction that has been processed e.g. Expense or Bank Feed.""" message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message') }}) r"""Metadata such as validation errors or the resulting record created in the accounting software.""" - status: Optional[shared_transactionstatus.TransactionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: Optional[TransactionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Status of the transaction.""" transaction_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactionId') }}) r"""Your unique idenfier of the transaction.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py old mode 100755 new mode 100644 index eaef82d9f..45d7bd18b --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/transactions.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import links as shared_links -from ..shared import transaction as shared_transaction +from .links import Links +from .transaction import Transaction from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Transactions: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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') }}) r"""Current page number.""" page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) r"""Number of items to return in results array.""" total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) r"""Total number of items.""" - results: Optional[List[shared_transaction.Transaction]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + results: Optional[List[Transaction]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionstatus.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/transactionstatus.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py old mode 100755 new mode 100644 index 642e2deeb..4b0777ccf --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatecustomerresponse.py @@ -2,11 +2,11 @@ from __future__ import annotations import dataclasses -from ..shared import customer as shared_customer -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import validation as shared_validation +from .customer import Customer +from .datatype import DataType +from .pushoperationchange import PushOperationChange +from .pushoperationstatus import PushOperationStatus +from .validation import Validation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -42,11 +42,11 @@ 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.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) r"""Push status code.""" - changes: Optional[List[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -69,7 +69,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. """ - data: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) + data: Optional[Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) r"""> View the coverage for customers in the Data coverage explorer. ## Overview @@ -78,7 +78,7 @@ class UpdateCustomerResponse: Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). """ - 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 }}) + data_type: Optional[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') }}) r"""A message about the error.""" @@ -89,7 +89,7 @@ class UpdateCustomerResponse: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py old mode 100755 new mode 100644 index be02539c5..da9459512 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenserequest.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import contactref as shared_contactref -from ..shared import expensetransactionline as shared_expensetransactionline +from .contactref import ContactRef +from .expensetransactionline import ExpenseTransactionLine from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from decimal import Decimal @@ -26,7 +26,7 @@ class UpdateExpenseRequest: r"""Date the transaction was recorded.""" type: Any = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) bank_account_ref: Optional[UpdateExpenseRequestBankAccountReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountRef'), 'exclude': lambda f: f is None }}) - contact_ref: Optional[shared_contactref.ContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }}) + contact_ref: Optional[ContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }}) currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) r"""Currency the transaction was recorded in.""" currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder }}) @@ -55,8 +55,15 @@ class UpdateExpenseRequest: | **GBP** | £20 | 1.277 | $25.54 | | **EUR** | €20 | 1.134 | $22.68 | | **RUB** | ₽20 | 0.015 | $0.30 | + + + ### Integration-specific details + + | Integration | Scenario | System behavior | + |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. | """ - lines: Optional[List[shared_expensetransactionline.ExpenseTransactionLine]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lines'), 'exclude': lambda f: f is None }}) + lines: Optional[List[ExpenseTransactionLine]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lines'), 'exclude': lambda f: f is None }}) r"""Array of transaction lines.""" merchant_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('merchantName'), 'exclude': lambda f: f is None }}) r"""Name of the merchant where the purchase took place""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenseresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updateexpenseresponse.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py old mode 100755 new mode 100644 index 194339197..70f91fe2c --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/updatesupplierresponse.py @@ -2,11 +2,11 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import supplier as shared_supplier -from ..shared import validation as shared_validation +from .datatype import DataType +from .pushoperationchange import PushOperationChange +from .pushoperationstatus import PushOperationStatus +from .supplier import Supplier +from .validation import Validation from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -42,11 +42,11 @@ 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.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The current status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) r"""Push status code.""" - changes: Optional[List[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -69,14 +69,14 @@ 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. """ - data: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) + data: Optional[Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }}) r"""> View the coverage for suppliers in the Data coverage explorer. ## Overview From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). """ - 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 }}) + data_type: Optional[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') }}) r"""A message about the error.""" @@ -87,7 +87,7 @@ class UpdateSupplierResponse: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py old mode 100755 new mode 100644 index 5941e6714..2e3837e15 --- a/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/shared/validation.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import validationitem as shared_validationitem +from .validationitem import ValidationItem from codatsyncexpenses import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,7 +12,7 @@ @dataclasses.dataclass class Validation: r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" - errors: Optional[List[shared_validationitem.ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors') }}) - warnings: Optional[List[shared_validationitem.ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings') }}) + errors: Optional[List[ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors') }}) + warnings: Optional[List[ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings') }}) diff --git a/sync-for-expenses/src/codatsyncexpenses/models/shared/validationitem.py b/sync-for-expenses/src/codatsyncexpenses/models/shared/validationitem.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/__init__.py b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/__init__.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reached.py b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reached.py old mode 100755 new mode 100644 index 20c411599..2e236f1a6 --- a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reached.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reached.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class ClientRateLimitReachedResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reset.py b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reset.py old mode 100755 new mode 100644 index 7e4b65419..27dbf5cb4 --- a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reset.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/client_rate_limit_reset.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class ClientRateLimitResetResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_complete.py b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_complete.py old mode 100755 new mode 100644 index 1c12d2a4f..5e7f61f93 --- a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_complete.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_complete.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class SyncCompleteResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_failed.py b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_failed.py old mode 100755 new mode 100644 index 2b6d068fd..77c4ae00f --- a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_failed.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_failed.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class SyncFailedResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_started.py b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_started.py old mode 100755 new mode 100644 index 03a077cdc..b1ccaf7b0 --- a/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_started.py +++ b/sync-for-expenses/src/codatsyncexpenses/models/webhooks/sync_started.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class SyncStartedResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/sync-for-expenses/src/codatsyncexpenses/push_operations.py b/sync-for-expenses/src/codatsyncexpenses/push_operations.py old mode 100755 new mode 100644 index 48b4d9621..961ebaa62 --- a/sync-for-expenses/src/codatsyncexpenses/push_operations.py +++ b/sync-for-expenses/src/codatsyncexpenses/push_operations.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def get(self, request: operations.GetPushOperationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPushOperationResponse: r"""Get push operation Retrieve push operation. @@ -24,7 +25,10 @@ def get(self, request: operations.GetPushOperationRequest, retries: Optional[uti headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -43,7 +47,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetPushOperationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -52,16 +56,20 @@ def do_request(): res.push_operation = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListPushOperationsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPushOperationsResponse: r"""List push operations List push operation records. @@ -74,7 +82,10 @@ def list(self, request: operations.ListPushOperationsRequest, retries: Optional[ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -93,7 +104,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListPushOperationsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -102,12 +113,15 @@ def do_request(): res.push_operations = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/sdk.py b/sync-for-expenses/src/codatsyncexpenses/sdk.py old mode 100755 new mode 100644 index a2aa0b421..530b8cbe4 --- a/sync-for-expenses/src/codatsyncexpenses/sdk.py +++ b/sync-for-expenses/src/codatsyncexpenses/sdk.py @@ -15,7 +15,7 @@ from .transaction_status import TransactionStatus from codatsyncexpenses import utils from codatsyncexpenses.models import shared -from typing import Dict +from typing import Callable, Dict, Union class CodatSyncExpenses: r"""Sync for Expenses: The API for Sync for Expenses. @@ -28,26 +28,26 @@ class CodatSyncExpenses: [See our OpenAPI spec](https://github.com/codatio/oas) - Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Commerce](https://docs.codat.io/sync-for-expenses-v1-api#/). + Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). """ - accounts: Accounts - r"""Accounts""" companies: Companies r"""Create and manage your Codat companies.""" - configuration: Configuration - r"""Manage mapping options and sync configuration.""" connections: Connections r"""Create and manage partner expense connection.""" + accounts: Accounts + r"""Accounts""" customers: Customers r"""Customers""" - expenses: Expenses - r"""Create expense datasets and upload receipts.""" + suppliers: Suppliers + r"""Suppliers""" manage_data: ManageData r"""Asynchronously retrieve data from an integration to refresh data in Codat.""" push_operations: PushOperations r"""Access create, update and delete operations made to an SMB's data connection.""" - suppliers: Suppliers - r"""Suppliers""" + configuration: Configuration + r"""Manage mapping options and sync configuration.""" + expenses: Expenses + r"""Create expense datasets and upload receipts.""" sync: Sync r"""Trigger and monitor expense syncs to accounting software.""" transaction_status: TransactionStatus @@ -56,7 +56,7 @@ class CodatSyncExpenses: sdk_configuration: SDKConfiguration def __init__(self, - security: shared.Security = None, + security: Union[shared.Security,Callable[[], shared.Security]] = None, server_idx: int = None, server_url: str = None, url_params: Dict[str, str] = None, @@ -66,7 +66,7 @@ def __init__(self, """Instantiates the SDK configuring it with the provided parameters. :param security: The security details required for authentication - :type security: shared.Security + :type security: Union[shared.Security,Callable[[], shared.Security]] :param server_idx: The index of the server to use for all operations :type server_idx: int :param server_url: The server URL to use for all operations @@ -81,28 +81,24 @@ def __init__(self, if client is None: client = requests_http.Session() - - security_client = utils.configure_security_client(client, security) - - if server_url is not None: if url_params is not None: server_url = utils.template_url(server_url, url_params) - self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx, retry_config=retry_config) + self.sdk_configuration = SDKConfiguration(client, security, server_url, server_idx, retry_config=retry_config) self._init_sdks() def _init_sdks(self): - self.accounts = Accounts(self.sdk_configuration) self.companies = Companies(self.sdk_configuration) - self.configuration = Configuration(self.sdk_configuration) self.connections = Connections(self.sdk_configuration) + self.accounts = Accounts(self.sdk_configuration) self.customers = Customers(self.sdk_configuration) - self.expenses = Expenses(self.sdk_configuration) + self.suppliers = Suppliers(self.sdk_configuration) self.manage_data = ManageData(self.sdk_configuration) self.push_operations = PushOperations(self.sdk_configuration) - self.suppliers = Suppliers(self.sdk_configuration) + self.configuration = Configuration(self.sdk_configuration) + self.expenses = Expenses(self.sdk_configuration) self.sync = Sync(self.sdk_configuration) self.transaction_status = TransactionStatus(self.sdk_configuration) \ No newline at end of file diff --git a/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py b/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py old mode 100755 new mode 100644 index bb6c0a645..c319fc2e0 --- a/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py +++ b/sync-for-expenses/src/codatsyncexpenses/sdkconfiguration.py @@ -2,9 +2,10 @@ import requests from dataclasses import dataclass -from typing import Dict, Tuple +from typing import Dict, Tuple, Callable, Union from .utils.retries import RetryConfig from .utils import utils +from codatsyncexpenses.models import shared SERVERS = [ @@ -15,14 +16,14 @@ @dataclass class SDKConfiguration: client: requests.Session - security_client: requests.Session + security: Union[shared.Security,Callable[[], shared.Security]] = None server_url: str = '' server_idx: int = 0 language: str = 'python' openapi_doc_version: str = 'prealpha' - sdk_version: str = '4.0.0' - gen_version: str = '2.159.2' - user_agent: str = 'speakeasy-sdk/python 4.0.0 2.159.2 prealpha codat-sync-for-expenses' + sdk_version: str = '5.0.0' + gen_version: str = '2.214.3' + user_agent: str = 'speakeasy-sdk/python 5.0.0 2.214.3 prealpha codat-sync-for-expenses' retry_config: RetryConfig = None def get_server_details(self) -> Tuple[str, Dict[str, str]]: diff --git a/sync-for-expenses/src/codatsyncexpenses/suppliers.py b/sync-for-expenses/src/codatsyncexpenses/suppliers.py old mode 100755 new mode 100644 index 2cad539e5..a698e4fe8 --- a/sync-for-expenses/src/codatsyncexpenses/suppliers.py +++ b/sync-for-expenses/src/codatsyncexpenses/suppliers.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def create(self, request: operations.CreateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateSupplierResponse: r"""Create supplier The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. @@ -29,14 +30,17 @@ def create(self, request: operations.CreateSupplierRequest, retries: Optional[ut 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", True, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.CreateSupplierRequest, "supplier", True, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -55,7 +59,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.CreateSupplierResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -64,16 +68,20 @@ def do_request(): res.create_supplier_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSupplierResponse: r"""Get supplier The *Get supplier* endpoint returns a single supplier for a given supplierId. @@ -91,7 +99,10 @@ def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.Re headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -110,7 +121,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetSupplierResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -119,16 +130,20 @@ def do_request(): res.supplier = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 409, 429]: + elif http_res.status_code in [401, 402, 403, 404, 409, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSuppliersResponse: r"""List suppliers The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. @@ -145,7 +160,10 @@ def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -164,7 +182,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListSuppliersResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -173,16 +191,20 @@ def do_request(): res.suppliers = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 409]: + elif http_res.status_code in [400, 401, 402, 403, 404, 409, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def update(self, request: operations.UpdateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateSupplierResponse: r"""Update supplier The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. @@ -199,14 +221,17 @@ def update(self, request: operations.UpdateSupplierRequest, retries: Optional[ut 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", True, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.UpdateSupplierRequest, "supplier", True, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -225,7 +250,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.UpdateSupplierResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -234,12 +259,15 @@ def do_request(): res.update_supplier_response = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/sync.py b/sync-for-expenses/src/codatsyncexpenses/sync.py old mode 100755 new mode 100644 index 226a960c6..50e334888 --- a/sync-for-expenses/src/codatsyncexpenses/sync.py +++ b/sync-for-expenses/src/codatsyncexpenses/sync.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def get(self, request: operations.GetSyncByIDRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSyncByIDResponse: r"""Get sync status Get the sync status for a specified sync @@ -24,7 +25,10 @@ def get(self, request: operations.GetSyncByIDRequest, retries: Optional[utils.Re headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -43,7 +47,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetSyncByIDResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -52,16 +56,20 @@ def do_request(): res.company_sync_status = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get_last_successful_sync(self, request: operations.GetLastSuccessfulSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetLastSuccessfulSyncResponse: r"""Last successful sync Gets the status of the last successful sync @@ -73,7 +81,10 @@ def get_last_successful_sync(self, request: operations.GetLastSuccessfulSyncRequ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -92,7 +103,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetLastSuccessfulSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -101,16 +112,20 @@ def do_request(): res.company_sync_status = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def get_latest_sync(self, request: operations.GetLatestSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetLatestSyncResponse: r"""Latest sync status Gets the latest sync status @@ -122,7 +137,10 @@ def get_latest_sync(self, request: operations.GetLatestSyncRequest, retries: Opt headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -141,7 +159,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetLatestSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -150,16 +168,20 @@ def do_request(): res.company_sync_status = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def initiate_sync(self, request: operations.InitiateSyncRequest, retries: Optional[utils.RetryConfig] = None) -> operations.InitiateSyncResponse: r"""Initiate sync Initiate sync of pending transactions. @@ -168,13 +190,16 @@ def initiate_sync(self, request: operations.InitiateSyncRequest, retries: Option url = utils.generate_url(operations.InitiateSyncRequest, base_url, '/companies/{companyId}/sync/expenses/syncs', request) headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "initiate_sync", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, operations.InitiateSyncRequest, "initiate_sync", False, True, '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'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -193,7 +218,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.InitiateSyncResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 202: @@ -202,16 +227,20 @@ def do_request(): res.sync_initiated = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [400, 404, 422]: + elif http_res.status_code in [400, 401, 402, 403, 404, 422, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListSyncsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSyncsResponse: r"""List sync statuses Gets a list of sync statuses @@ -223,7 +252,10 @@ def list(self, request: operations.ListSyncsRequest, retries: Optional[utils.Ret headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -242,21 +274,24 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListSyncsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[List[shared.CompanySyncStatus]]) - res.company_sync_statuses = out + res.classes = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/transaction_status.py b/sync-for-expenses/src/codatsyncexpenses/transaction_status.py old mode 100755 new mode 100644 index 11d6843b8..5f56e672b --- a/sync-for-expenses/src/codatsyncexpenses/transaction_status.py +++ b/sync-for-expenses/src/codatsyncexpenses/transaction_status.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def get(self, request: operations.GetSyncTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSyncTransactionResponse: r"""Get sync transaction Gets the status of a transaction for a sync @@ -24,7 +25,10 @@ def get(self, request: operations.GetSyncTransactionRequest, retries: Optional[u headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -43,7 +47,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.GetSyncTransactionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -52,16 +56,20 @@ def do_request(): res.transaction = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res + def list(self, request: operations.ListSyncTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSyncTransactionsResponse: r"""List sync transactions Gets the transactions and status for a sync @@ -74,7 +82,10 @@ def list(self, request: operations.ListSyncTransactionsRequest, retries: Optiona headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + if callable(self.sdk_configuration.security): + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security()) + else: + client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security) global_retry_config = self.sdk_configuration.retry_config retry_config = retries @@ -93,7 +104,7 @@ def do_request(): '5XX' ])) content_type = http_res.headers.get('Content-Type') - + res = operations.ListSyncTransactionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: @@ -102,12 +113,15 @@ def do_request(): res.transactions = out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) - elif http_res.status_code in [401, 404, 429]: + elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) - res.error_message = out + out = utils.unmarshal_json(http_res.text, errors.ErrorMessage) + out.raw_response = http_res + raise out else: raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600: + raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res) return res diff --git a/sync-for-expenses/src/codatsyncexpenses/utils/__init__.py b/sync-for-expenses/src/codatsyncexpenses/utils/__init__.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/utils/retries.py b/sync-for-expenses/src/codatsyncexpenses/utils/retries.py old mode 100755 new mode 100644 diff --git a/sync-for-expenses/src/codatsyncexpenses/utils/utils.py b/sync-for-expenses/src/codatsyncexpenses/utils/utils.py old mode 100755 new mode 100644 index ccfad9f7a..1a60d4064 --- a/sync-for-expenses/src/codatsyncexpenses/utils/utils.py +++ b/sync-for-expenses/src/codatsyncexpenses/utils/utils.py @@ -12,7 +12,7 @@ from typing import (Any, Callable, Dict, List, Optional, Tuple, Union, get_args, get_origin) from xmlrpc.client import boolean - +from typing_inspect import is_optional_type import dateutil.parser import requests from dataclasses_json import DataClassJsonMixin @@ -169,7 +169,7 @@ def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass serialization = param_metadata.get('serialization', '') if serialization != '': serialized_params = _get_serialized_params( - param_metadata, f_name, param) + param_metadata, field.type, f_name, param) for key, value in serialized_params.items(): path = path.replace( '{' + key + '}', value, 1) @@ -261,7 +261,7 @@ def get_query_params(clazz: type, query_params: dataclass, gbls: Dict[str, Dict[ f_name = metadata.get("field_name") serialization = metadata.get('serialization', '') if serialization != '': - serialized_parms = _get_serialized_params(metadata, f_name, value) + serialized_parms = _get_serialized_params(metadata, field.type, f_name, value) for key, value in serialized_parms.items(): if key in params: params[key].extend(value) @@ -304,12 +304,12 @@ def get_headers(headers_params: dataclass) -> Dict[str, str]: return headers -def _get_serialized_params(metadata: Dict, field_name: str, obj: any) -> Dict[str, str]: +def _get_serialized_params(metadata: Dict, field_type: type, field_name: str, obj: any) -> Dict[str, str]: params: Dict[str, str] = {} serialization = metadata.get('serialization', '') if serialization == 'json': - params[metadata.get("field_name", field_name)] = marshal_json(obj) + params[metadata.get("field_name", field_name)] = marshal_json(obj, field_type) return params @@ -394,14 +394,14 @@ def _get_delimited_query_params(metadata: Dict, field_name: str, obj: any, delim } -def serialize_request_body(request: dataclass, request_field_name: str, nullable: bool, optional: bool, serialization_method: str, encoder=None) -> Tuple[ +def serialize_request_body(request: dataclass, request_type: type, request_field_name: str, nullable: bool, optional: bool, serialization_method: str, encoder=None) -> Tuple[ str, any, any]: if request is None: if not nullable and optional: return None, None, None if not is_dataclass(request) or not hasattr(request, request_field_name): - return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], + return serialize_content_type(request_field_name, request_type, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request, encoder) request_val = getattr(request, request_field_name) @@ -421,13 +421,13 @@ def serialize_request_body(request: dataclass, request_field_name: str, nullable 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'), + return serialize_content_type(request_field_name, request_type, request_metadata.get('media_type', 'application/octet-stream'), request_val) -def serialize_content_type(field_name: str, media_type: str, request: dataclass, encoder=None) -> Tuple[str, any, List[List[any]]]: +def serialize_content_type(field_name: str, request_type: any, media_type: str, request: dataclass, encoder=None) -> Tuple[str, any, List[List[any]]]: if re.match(r'(application|text)\/.*?\+*json.*', media_type) is not None: - return media_type, marshal_json(request, encoder), None + return media_type, marshal_json(request, request_type, encoder), None if re.match(r'multipart\/.*', media_type) is not None: return serialize_multipart_form(media_type, request) if re.match(r'application\/x-www-form-urlencoded.*', media_type) is not None: @@ -478,7 +478,7 @@ def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, form.append([field_name, [file_name, content]]) elif field_metadata.get("json") is True: to_append = [field_metadata.get("field_name", field.name), [ - None, marshal_json(val), "application/json"]] + None, marshal_json(val, field.type), "application/json"]] form.append(to_append) else: field_name = field_metadata.get( @@ -531,7 +531,7 @@ def serialize_form_data(field_name: str, data: dataclass) -> Dict[str, any]: field_name = metadata.get('field_name', field.name) if metadata.get('json'): - form[field_name] = [marshal_json(val)] + form[field_name] = [marshal_json(val, field.type)] else: if metadata.get('style', 'form') == 'form': form = {**form, **_populate_form( @@ -697,15 +697,17 @@ def unmarshal_json(data, typ, decoder=None): return out.res if decoder is None else decoder(out.res) -def marshal_json(val, encoder=None): - marshal = make_dataclass('Marshal', [('res', type(val))], +def marshal_json(val, typ, encoder=None): + if not is_optional_type(typ) and val is None: + raise ValueError(f"Could not marshal None into non-optional type: {typ}") + + marshal = make_dataclass('Marshal', [('res', typ)], bases=(DataClassJsonMixin,)) marshaller = marshal(res=val) json_dict = marshaller.to_dict() - val = json_dict["res"] if encoder is None else encoder(json_dict["res"]) - return json.dumps(val) + return json.dumps(val, separators=(',', ':'), sort_keys=True) def match_content_type(content_type: str, pattern: str) -> boolean: @@ -759,6 +761,8 @@ def bigintencode(val: int): def bigintdecoder(val): + if isinstance(val, float): + raise ValueError(f"{val} is a float") return int(val) @@ -828,6 +832,24 @@ def list_decode(val: List): return list_decode +def union_encoder(all_encoders: Dict[str, Callable]): + def selective_encoder(val: any): + if type(val) in all_encoders: + return all_encoders[type(val)](val) + return val + return selective_encoder + +def union_decoder(all_decoders: List[Callable]): + def selective_decoder(val: any): + decoded = val + for decoder in all_decoders: + try: + decoded = decoder(val) + break + except (TypeError, ValueError): + continue + return decoded + return selective_decoder def get_field_name(name): def override(_, _field_name=name): diff --git a/sync-for-expenses/tests/helpers.py b/sync-for-expenses/tests/helpers.py new file mode 100644 index 000000000..b3d095040 --- /dev/null +++ b/sync-for-expenses/tests/helpers.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +import re + + +def sort_query_parameters(url): + parts = url.split("?") + + if len(parts) == 1: + return url + + query = parts[1] + params = query.split("&") + + params.sort(key=lambda x: x.split('=')[0]) + + return parts[0] + "?" + "&".join(params) + + +def sort_serialized_maps(inp: any, regex: str, delim: str): + + def sort_map(m): + entire_match = m.group(0) + + groups = m.groups() + + for group in groups: + pairs = [] + if '=' in group: + pairs = group.split(delim) + + pairs.sort(key=lambda x: x.split('=')[0]) + else: + values = group.split(delim) + + if len(values) == 1: + pairs = values + else: + pairs = [''] * int(len(values)/2) + # loop though every 2nd item + for i in range(0, len(values), 2): + pairs[int(i/2)] = values[i] + delim + values[i+1] + + pairs.sort(key=lambda x: x.split(delim)[0]) + + entire_match = entire_match.replace(group, delim.join(pairs)) + + return entire_match + + if isinstance(inp, str): + return re.sub(regex, sort_map, inp) + elif isinstance(inp, list): + for i, v in enumerate(inp): + inp[i] = sort_serialized_maps(v, regex, delim) + return inp + elif isinstance(inp, dict): + for k, v in inp.items(): + inp[k] = sort_serialized_maps(v, regex, delim) + return inp + else: + raise Exception("Unsupported type")